Firstly, thank you for this wonderful DXF parsing library!
I'm facing a problem when I read a POLYLINE entity. I have a file which contains a polygon mesh. It has four vertexes(1, 2, 3, 4) and three faces(face 1 contains vertexes: 1,2,3; face 2: 2, 3, 4; face 3: 1, 3, 4). As DXF specification mentioned that the three faces will also be presented as VERTEX entity and using group code 71, 72, 73, 74 to store vertext index, but when dxflib calls my addVertex function, the parameter DL_VertexData only contains the value of group code 10, 20, 30.
How can I get the group code that store vertext index?
So sorry for my poor English.
Can't reading POLYLINE correctly
Moderator: andrew
Thank you for replying so soon!
I think that polygon meshes are not complex. Why is it not supported at this point? I'v tried to fix it, my solution follows:
I just want to get the value of group code 71, 72, 73, 74, so I modified the DL_VertexData structure to contain more four fields, and in the DL_Dxf::addVertex() function, asign toReal(values[71]),toReal(values[72]),toReal(values[73]),toReal(values[74]) to these four fields, thus I know which points make up a face in my application.
I think that polygon meshes are not complex. Why is it not supported at this point? I'v tried to fix it, my solution follows:
I just want to get the value of group code 71, 72, 73, 74, so I modified the DL_VertexData structure to contain more four fields, and in the DL_Dxf::addVertex() function, asign toReal(values[71]),toReal(values[72]),toReal(values[73]),toReal(values[74]) to these four fields, thus I know which points make up a face in my application.
What exactly is the difference between a polygon mesh and a polyface mesh? I don't see a 'polygon mesh' entity in the autodesk specifications at this link:
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/
I do, however, see that a polyface mesh is just a special case of the polyline type, with the 64 bit set to 1 in the group's flags:
http://www.autodesk.com/techpubs/autoca ... dxf_06.htm
In my application it appears that these 'mesh vertices' are, in fact, being properly read in, although at the moment I'm only just drawing the vertices, not the faces.
http://www.autodesk.com/techpubs/autocad/acad2000/dxf/
I do, however, see that a polyface mesh is just a special case of the polyline type, with the 64 bit set to 1 in the group's flags:
http://www.autodesk.com/techpubs/autoca ... dxf_06.htm
In my application it appears that these 'mesh vertices' are, in fact, being properly read in, although at the moment I'm only just drawing the vertices, not the faces.
After a closer inspection I see exactly what Rex is talking about. I also want to say that it's quite a pain that the mesh functionality isn't supported by DXF LIB. I am currently also trying to figure out a good work around because I need meshes. I also would have preferred to not have to modify the dl_dxf library but there's apparently not a better solution. I am also forced into implementing a hack workaround similar to rex's solution rather than being able to create an elegant fix.