Bugfix dxf filter - #491
Merged
Merged
Conversation
A DXF LWPOLYLINE vertex count (group code 90) is 32-bit, but tools::Polygon is indexed by sal_uInt16. Render polylines with more than 65535 points as consecutive Polygon segments that overlap by one point, walking the source array with the full 32-bit index, so the whole line is drawn without narrowing it to 16 bits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 2f0de83e3857a766280165977d6304354eb43806) (cherry picked from commit ac9bccefb1d87a770f60d12a2e6523cc8ef496a9)
…here to corp the picture. We have to estimate font size and width, since we have no renderer at that point. so we estimate the size. (cherry picked from commit 2c10eb18ea27ba6eba6a25520a663b8636044f74)
…pends on creators actions and may be stale. Better to calculate it by ourselfs.
fix correct rendering for arcs.
fixed negative-z extrusion arcs
…entifiy DXF files. On import we tollerate now 1.0 as 1. Before it broke the read Measuring the arc's swept extent, not the full circle, so large-radius arcs don't blow up the scaling box ond collapse the drawing.
…x), case-insensitive VPORT lookup, 3D text via glyph outlines
The dxf filter is now prepared to receive a overide which encoding is to be used. With this fix no higher level has been included to use this method. no test have been done on the code. All test are done in a compilde AOO version, by loading test files.
leginee
force-pushed
the
bugfix-dxf-filter
branch
from
July 7, 2026 04:35
559ada8 to
96b0524
Compare
Contributor
|
Looks good to me! |
ardovm
added a commit
that referenced
this pull request
Jul 31, 2026
Bugfix dxf filter (cherry pick and adaptation of merge commit c082241)
ardovm
added a commit
that referenced
this pull request
Jul 31, 2026
Bugfix dxf filter (cherry pick and adaptation of merge commit c082241)
leginee
added a commit
that referenced
this pull request
Aug 14, 2026
Back-port of #491 (merge c082241, trunk, 2026-07-28), squashed. The work originated on the local branch dxf-filter-fix, which used Bazel only as a fast iteration harness; the deliverable was always a source-only C++ fix, so it went upstream first and returns here. The tree is byte-identical to trunk's post-PR state for all 11 files. Twelve defects, all root-caused in main/filter/source/graphicfilter/idxf/Readme.md (added here as the permanent developer doc: pipeline, the coordinate systems that cause most DXF bugs, and the root cause per Bugzilla id): - 58347 / 70274 stale header $EXTMIN/$EXTMAX used as the scaling box; always measure geometry instead, plus a 1% page-fit margin. - 16564 negative-Z extrusion arcs drawn as their complement (Mirror() tested the 3D, not the 2D projected, determinant); R13 curves are ELLIPSE/SPLINE, which were unsupported — now implemented. - 122565 three bugs: detector rejected leading 999 comments; ReadI rejected float-formatted int flags; ARC bbox unioned the full circle instead of the swept extent. Also an OOB write. - 112320 LWPOLYLINE per-vertex bulge (group 42) dropped -> circle drawn as a bar; now tessellated. - 70273 case-sensitive SearchVPort missed *Active -> flat drop-Z. - 70275 zero-length dot in a linetype pattern rendered invisible. - 99893 OCS extrusion transform wrongly applied to WCS entities -> scattered 3D; DXFCoordsAreWCS gate + 3D text via outlines. - (no BZ) HATCH pattern fills flood-filled as solid blobs; now render real section lines via VCL DrawHatch. - (no BZ) oversized LWPOLYLINE truncated; now chunked. - 99892 filter half only: $DWGCODEPAGE resolution, system-encoding default with a UTF-8 guard, and a CharacterSet override seam. The UI chooser that would feed it is still open. makefile.mk gains $(SVTOOLLIB) because idxf.cxx now reads FilterConfigItem; under Bazel the graphic_filter macro already supplies it, so //main/filter:idx needed no change. The PR's .gitignore hunk is deliberately NOT taken. Squashed from these 11 upstream trunk commits (kept here so they are identifiable despite the lost patch-id parity — see CLAUDE.md, BACKPORT #2): 999d0e5 22079cd 65c7e15 e345bd9 030749d 82ba6d6 c4b51fd 5ed424c 3931960 05e2156 96b0524 The 13.5 MB Bugzilla sample corpus and the still-open cases stay out of this tree, on the local branch bugfix-dxf-filter-open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello all,
This branch fixes dxf related issue. I set the scope within the filter. There are issues currently open, their root cause are render issues, and not rooted in the filter. To limit impact of the patch I skipped them for now.
Bugzilla is updated accordingly.