Opened 6 years ago

Closed 5 years ago

#6246 closed defect (fixed)

OGR does not read properly DXF Polyface Meshes

Reported by: oleinik Owned by: warmerdam
Priority: normal Milestone: 2.2.0
Component: OGR_SF Version: 2.0.1
Severity: normal Keywords:

Description (last modified by oleinik)

DXF POLYLINE entities can represent a Polyface Meshes. It determined by the presence of the group code 70 with value of 64. Group code 71 represents number of points in mesh and group code 72 represents number of faces. In this mode VERTEX entities with group code 70 = 192 (128 + 64) represents points with coordinates 10,20,30 group codes and VERTEX with group code 70 = 128 represents faces of this mesh and group codes 71,72,73,74 contains indexes of previosly defined points, staring at 1. Such POLYLINE entities must be translated to wkbMultiPolygon, wkbMultiPolygon25D but not wkbLineString, wkbLineString25D. Or may be translated to wkbCurvePolygon, wkbCurvePolygonZ. I don't know what will be better.

Attachments (1)

test.dxf.7z (69.2 KB) - added by oleinik 6 years ago.
Test file with one Polyline Mesh

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by oleinik

Attachment: test.dxf.7z added

Test file with one Polyline Mesh

comment:1 Changed 6 years ago by oleinik

Description: modified (diff)

comment:2 Changed 6 years ago by meier

Hmm, this can be a tricky issue because it depends on the plane of the vector's projection [to the best of my knowledge]. If the vector resides within a plane, casting into OGRPolygon or OGRMultiPolygon is all right, but if it doesn't, then it might be a polyhedral surface. This is unfortunately not handled by the OGR core as of yet [You can check]. A temporary workaround is to cast geometries into OGRMultiPolygon if they are of type polygon mesh or polyface mesh.

Last edited 6 years ago by meier (previous) (diff)

comment:3 Changed 5 years ago by Even Rouault

Milestone: 2.2.0
Resolution: fixed
Status: newclosed

Since the merge of RFC 64: Triangle, Polyhedral surface and TIN, the geometry is now reported as a POLYHEDRALSURFACE Z

Note: See TracTickets for help on using tickets.