Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7111 closed enhancement (fixed)

DXF: Implement LEADER and MULTILEADER support

Reported by: Alan Thomas Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf
Cc:

Description (last modified by Alan Thomas)

If you are coming here from a search engine because you want to read DXF LEADER and MULTILEADER, you may like to read some of the conclusions drawn during the solving of this ticket: http://atlight.github.io/formats/dxf-leader.html

LEADER and MULTILEADER are two DXF entities which lack support from OGR.

LEADER is the classic way of storing leader objects. It is allied to DIMENSION - the two entity types use the same dimension styling infrastructure. (I plan to add this support to DIMENSION in a separate patch.)

MULTILEADER (also known as MLEADER) was introduced in AutoCAD 2008. It combines the leader and its associated text or block into a single object, and does not use the dimension style infrastructure. The MULTILEADER documentation in the DXF spec is next to useless - it even gives the wrong name for the entity - so much of this implementation is reverse-engineered through experimentation with AutoCAD.

I have been unable to identify any open-source DXF frameworks - including general-purpose DXF reader libraries - that have any support at all for MULTILEADERs, so this is pioneering territory!

Change History (15)

comment:1 by Alan Thomas, 6 years ago

https://github.com/OSGeo/gdal/pull/253

Note that the pull request will have to be rebased after the merge of t-7106-secfixes, but I have uploaded it based on trunk for now to allow for review.

comment:2 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 40569:

DXF: Read DIMSTYLEs and block record handles; Add support for LEADER and MULTILEADER (patch by Alan Thomas, https://github.com/OSGeo/gdal/pull/253, fixes #7111)

comment:3 by Even Rouault, 6 years ago

In 40571:

comment:4 by Even Rouault, 6 years ago

In 40572:

Add missing include (refs #7111, https://github.com/OSGeo/gdal/pull/253)

comment:5 by Even Rouault, 6 years ago

In 40574:

Fix -Wfloat-conversion warnings (refs #7111, https://github.com/OSGeo/gdal/pull/253)

comment:6 by Even Rouault, 6 years ago

In 40575:

Address cppcheck issues (passing by reference, static method) (refs #7111, https://github.com/OSGeo/gdal/pull/253)

comment:7 by Even Rouault, 6 years ago

In 40579:

Fix memory leak in error code path, as raised by CLang Static Analyzer (refs #7111, ​https://github.com/OSGeo/gdal/pull/253)

comment:8 by Alan Thomas, 6 years ago

Sorry to make you do all these follow-ups!! I'll try to be more careful in future.

comment:9 by Even Rouault, 6 years ago

I'm not sure why Travis-CI checks don't run for your pull requests. I've just created a dummy pull request at https://github.com/OSGeo/gdal/pull/254 and Travis-CI checks are run. As an alternative you could active an account on Travis-CI (linked to your github account), and hopefully when you push your branches to your github account, your Travis-CI account will also run the tests

comment:10 by Even Rouault, 6 years ago

In 40581:

DXF: Fix heap-buffer-overflow on corrupted DXF. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3887. Credit to OSS Fuzz (refs #7111, ​https://github.com/OSGeo/gdal/pull/253)

comment:11 by Alan Thomas, 6 years ago

In 40789:

DXF: Support multiple leader lines, block content, text style and line color in MULTILEADER entities (refs #7111)

comment:12 by Alan Thomas, 6 years ago

In 40799:

DXF: Fix memory leak in MULTILEADER under error conditions (refs #7111)

comment:13 by Alan Thomas, 6 years ago

Just noting that r40799 is credited to OSS-Fuzz (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4383). I omitted to mention this in the commit message.

comment:14 by Alan Thomas, 6 years ago

In 40821:

DXF: Fix memory leak in MULTILEADER when leader line is turned off. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4413. Credit to OSS-Fuzz (refs #7111)

comment:15 by Alan Thomas, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.