Opened 8 years ago
Closed 8 years ago
#6459 closed enhancement (fixed)
Improve dxf driver
Reported by: | perob | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 2.1.0 |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | dxf |
Cc: |
Description (last modified by )
Hi,
I have modified dxf driver for better support of drawings drawn in various object coordinate systems. Pull request is sent also.
Entities changed are: point, line, polyline, ellipse, spline and text.
Remove ocs transformations for: point, line and spline. Remove ocs transformations based on entity data: polyline, ellipse. Add anchor position for text entity.
Points, lines and splines are always in world coordinate system.
Polylines may be 2d (ocs, with or without elevation) or 3d (wcs) and this information is stored in polyline flag.
Ellipses are stored in wcs but calculations must be done in ocs. Added inverse transform to OCSTransformer class and updated ellipse handling accordingly.
Anchor position for text entities was added to style string.
Object coordinate system features of DXF format are rarely used so please comment if this feature is needed for dxf driver.
Screenshots of sample files show desired output in CAD program.
Thanks, bye
EDIT: Forgot to say that I disabled parsing of polygon/polyface meshes stored in polyline entity. It's possible to handle them. Question is in which geometry to store them? Collection of polygons?
Attachments (4)
Change History (6)
by , 8 years ago
Attachment: | ocs2wcs1.dxf added |
---|
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Keywords: | dxf added |
---|---|
Milestone: | → 2.1.0 |
Resolution: | → fixed |
Status: | new → closed |
trunk r33980, branches/2.1 r33981 r33982 "DXF reader: better handling of various object coordinate systems found in dxf files for point, line, polyline, spline and ellipse entities. Add anchor position to text styles. Remove polygon/polyface mesh parsing from polyline entity (patch by Pero Brbora, https://github.com/OSGeo/gdal/pull/118, #6459)"
Note: to keep test data as small as possible, I've stripped down your dxf files to just contain the ENTITIES section.
ocs xy plane parallel to wcs