问题
What is the relationship between polyLines and points in the block of DXF file? If I provide grade rule table file, how to connect them ?
回答1:
There is no such relationship.
In DXF format. block may contain different entities like points, lines, polylines. Each of them has:
- position for: point, text, block reference, attribute
- start point and endpoint in case of line
- coordinates for polylines
In grade rule table You have named points
like point #1, #2, #3
.
In AAMA DXF file there are text entities with content for example #1
. You may have a lot of such texts in one DXF file, and one block.
For example RUL file ( Grade rule table) describes
- In Size S point #1 has displacements X= -5 , Y= -3
- In Size M point #1 has displacements X= 0 , Y= 0
- In Size L point #1 has displacements X= 5 , Y= 3
- In Size XL point #1 has displacements X= 10 , Y= 6
Now in DXF file You have a block for example "Cuff size S". Inside this block You have a lot of lines, polylines.... on each coordinate of each entity You have Text ( or MText) on specific layer ( layer is "1" if I understand it correctly but it's described in standard ).
For example if on startline of polyline there is text #1
You have to stretch it X=-5,Y=-3
.
Other block would be "Cuff size M" so for each entity where on point there is extra text #1 coordinate should be not stretched because for point #1
on M size, X=0, Y=0
.
Other block would be "Cuff size XL" so for each entity where on point there is extra text #1 coordinate should be stretched size, X=10, Y=6
because for point #1
on M
.
calculation formula would be like:
X1-(X1-X2)*( lx / L)
Where:
- lx - is distance between #1 and point to stretch - measured by curve not stright distance between points
- L - is distance between #1 and #2 - measured by curve not stright distance between points
来源:https://stackoverflow.com/questions/58767514/what-is-the-relationship-between-polylines-vertex-and-points-in-the-block-of-dxf