Skip to content

fix(dxf): decode DWG proxy DXF-filer streams - #653

Merged
HakanSeven12 merged 2 commits into
hakanaktt:mainfrom
PandemRus:fix/proxy-dxf-filer-4866
Nov 24, 2026
Merged

HakanSeven12 merged 2 commits into
hakanaktt:mainfrom
PandemRus:fix/proxy-dxf-filer-4866

Conversation

@PandemRus

@PandemRus PandemRus commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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.

@PandemRus
PandemRus marked this pull request as ready for review November 24, 2026 13:54
@HakanSeven12
HakanSeven12 merged commit 2d3db25 into hakanaktt:main Nov 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DXF writer: proxy data in DXF format (group 70 = 1) is written as binary 93/310, so ODA cannot read the file

2 participants