writer
writer copied to clipboard
Aligned dimensions cannot place the text above the dimension line
I am trying out your newest version, 3.0.0-alpha.13, which is incredibly awesome, thank you for making and sharing this! However I have run into an issue creating aligned dimensions. Aligned dimensions seem to ignore the specified 'middle' point and calculates it from the definition point and the offset. This results in the text always being placed exactly on the dimension line. Linear dimensions seem to position the text correctly.
let alignedDim = dxf.modelSpace.addAlignedDim({
start: { x: 0, y: 0, z: 0 },
end: { x: 50, y: 0, z: 0 },
definition: { x: 0, y: 10, z: 0 },
insertion: { x: 0, y: 0, z: 0 },
middle: { x: 25, y: 15, z: 0 },
textRotation: 0,
text: '',
layerName: '0',
attachment: AttachmentPoint.MiddleCenter,
textLineSpacingFactor: 1,
textLineSpacingStyle: DimTextLineSpacingStyle.AtLeast,
offset: 10,
dimStyleName: 'Standard',
lineTypeName: 'ByLayer',
colorNumber: 256,
lineWeight: -1,
});
console.log(alignedDim.middle) // should be { x: 25, y: 15, z: 0 }??