Opened 9 months ago

Closed 9 months ago

Last modified 8 months 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

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 (14)

comment:1 Changed 9 months ago by Alan Thomas

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 Changed 9 months ago by Even Rouault

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 Changed 9 months ago by Even Rouault

In 40571:

comment:4 Changed 9 months ago by Even Rouault

In 40572:

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

comment:5 Changed 9 months ago by Even Rouault

In 40574:

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

comment:6 Changed 9 months ago by Even Rouault

In 40575:

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

comment:7 Changed 9 months ago by Even Rouault

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 Changed 9 months ago by Alan Thomas

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

comment:9 Changed 9 months ago by Even Rouault

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 Changed 9 months ago by Even Rouault

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 Changed 8 months ago by Alan Thomas

In 40789:

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

comment:12 Changed 8 months ago by Alan Thomas

In 40799:

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

comment:13 Changed 8 months ago by Alan Thomas

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 Changed 8 months ago by Alan Thomas

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)

Note: See TracTickets for help on using tickets.