ixmilia / dxf

MIT License
221 stars 67 forks source link

Unable to associate entity to Dimension, eg. DxfDiameterDimension #177

Closed ChrisSmales closed 2 years ago

ChrisSmales commented 2 years ago

I am struggling to work out how to use the various Dimension entities such as DxfDiameterDimension. I was assuming for such a dimension a Circle entity would be associated with it in some way and from that the dimension entity would determine the diameter. Would if be possible to provide an example of the use of these objects ?

brettfo commented 2 years ago

I just pushed a commit to main that contains an example of adding a dimension, but the short answer is that there is no association in the DXF file between the dimension entity and the value being measured; it's entirely up to you to do this.

This is what the new example looks like in LibreCAD 2.1.3:

image

But note, however, that DefinitionPoint1 and DefinitionPoint2 can be set to anything resulting in the non-sensical:

image