Conversation
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
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.
Since #1174, reading a DXF 2013+ keeps only the last 310 line of each ACDSDATA record, so
ModelerGeometry.AcisDatacomes back truncated. Insamples/sample_AC1032_ascii.dxfthe 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 throughdefault:and overwritesCodeValuePair, so the 94 length and then each 310 line replace the previous one. This change appends the 310 lines, asDxfObjectsSectionReaderalready 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.