Opened 8 years ago

Closed 8 years ago

#6436 closed defect (fixed)

OGR dxf driver, spline entity not read correctly

Reported by: perob Owned by: warmerdam
Priority: normal Milestone: 2.1.0
Component: default Version: svn-trunk
Severity: normal Keywords: ogr, dxf, driver, spline


There are many methods to create splines, but at the end they are all defined with degree, control points, weights and knots. Currently dxf driver reads only control points and degree data from dxf file, but weights (present if not all are 1) and knots are stored in dxf file too.

Sample drawing is attached. Within drawing splines are converted to polylines and placed above splines. ogr2ogr output of sample is also attached.

Attached screenshot shows ogr output of sample dxf file.

Samples show that dxf driver fails when: 1) splines have weights other than 1 associated with control points - because it doesn't read them and 2) splines are defined as closed - because it adds unnecessary control points.

I will submit pull request for this issue.

Attachments (3)

spline.dxf (337.8 KB ) - added by perob 8 years ago.
Sample drawing with splines
spline-ogr.dxf (43.5 KB ) - added by perob 8 years ago.
ogr2ogr output of sample drawing
spline.png (20.8 KB ) - added by perob 8 years ago.
Screenshot of ogr2ogr output

Download all attachments as: .zip

Change History (4)

by perob, 8 years ago

Attachment: spline.dxf added

Sample drawing with splines

by perob, 8 years ago

Attachment: spline-ogr.dxf added

ogr2ogr output of sample drawing

by perob, 8 years ago

Attachment: spline.png added

Screenshot of ogr2ogr output

comment:1 by Even Rouault, 8 years ago

Milestone: 2.1.0
Resolution: fixed
Status: newclosed

trunk r33888 "DXF: take into account full definition of spline entity (degree, control points, weights and knots) when stroking splines (patch by Pero Brbora, #6436,"

Note: See TracTickets for help on using tickets.