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.

Unfortunately, polygon meshes are not supported by dxflib at this point. Note that polylines are supported but are different from polygon meshes. If addVertex is called outside the context of a polyline, the call should be ignored by the 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.

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.