Repository navigation
fix(dxf): decode DWG proxy DXF-filer streams - #653
Merged
Merged
Conversation
PandemRus
marked this pull request as ready for review
November 24, 2026 13:54
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.
Closes #468.
The earlier fix keeps DXF-originated proxy groups only when they came from a DXF file. A proxy read from DWG still has only main/text/handle streams and is written with 70 0, losing the original DXF-filer meaning instead of producing the reference DXF groups.
This change decodes the DWG filer streams back into DXF groups for ACAD_PROXY_OBJECT. It covers all ODA-observed value encodings: BL/BS/BLL/BD values, BS booleans and bytes, three-axis points, legacy and Unicode text, binary chunks and handle references. The two leading ids are read from the payload without pinning the output class number. Malformed streams retain the existing safe binary fallback.
Red-tests commit: 14d1755 (test(dxf): cover DWG proxy DXF-filer decoding). On upstream/main 031c0a4, cargo test --test dxf_proxy_object_data gave 2 passed, 2 failed: the McDbContainer2 case and the all-value-types case were still binary with 70 0.
Fix commit: 78077dc (fix(dxf): decode DWG proxy DXF-filer streams). The minimal fixture's odd-length hex literal was corrected in this commit; the red commit was not rewritten.
Fixtures are bit streams written by ODA: the minimal McDbContainer2 from dwg__120272 and a synthetic proxy whose DXF groups cover strings, integer widths, booleans, doubles, points, binary chunks and handles.
Ran: cargo test --test dxf_proxy_object_data (4 passed), the 5 new decoder unit tests, and the full cargo test suite on 78077dc — all green.