Skip to content

Join every binary chunk of an ACDSDATA record column - #1268

Open
ilCosmico wants to merge 1 commit into
DomCR:masterfrom
ilCosmico:fix/acds-dxf-chunks
Open

ilCosmico wants to merge 1 commit into
DomCR:masterfrom
ilCosmico:fix/acds-dxf-chunks

Conversation

@ilCosmico

Copy link
Copy Markdown
Contributor

Since #1174, reading a DXF 2013+ keeps only the last 310 line of each ACDSDATA record, so ModelerGeometry.AcisData comes back truncated. In samples/sample_AC1032_ascii.dxf the 3DSOLID D65 has 7779 bytes and reads back as 32, which is the size of its last line. The other AutoCAD samples from AC1027 on, ascii and binary, behave the same way.

The cause is in readAcdsRecordColumn: every code goes through default: and overwrites CodeValuePair, so the 94 length and then each 310 line replace the previous one. This change appends the 310 lines, as DxfObjectsSectionReader already does for proxy data, and stores the whole payload once the column ends.

The existing test now also runs with the payload split over two 310 lines, and that case fails on master.

I also compared the ACIS bytes of every entity in 415 DWG and DXF files, read before #1174, on master and with this change. With the fix they all match what was read before #1174; the DWG files were already unchanged.

A column payload longer than one 310 line kept only the last chunk, so
ModelerGeometry.AcisData was truncated for real DXF 2013+ files.

This branch has not been deployed

No deployments
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.

1 participant