ixmilia / dxf

MIT License
221 stars 67 forks source link

More indexes in code 1, 40 and 290 #186

Closed rocchellid closed 1 year ago

rocchellid commented 2 years ago

I have a dxf in which I have::

I am sending you the DXF file in private because I cannot publish it here. Regards, Davide

1 40 290

rocchellid commented 2 years ago

The problem isn't in 0.8.3; I found it with the latest sources updates I downloaded ...

brettfo commented 1 year ago

Short Version

I've found the issue and will start working on it now.

Extra Code 290

Thank you for pointing this out. Turns out the spec has different layouts under subclass marker AcDbRenderSettings as specified in code 90. The spec for MENTALRAYRENDERSETTINGS (which is the object type specified in your sample file) explicitly lists class version 1 (row 7 in that table), but the file you sent me specifies class version 2 (line 347630, if you open it in a text editor), and the order of the codes just happens to match the AcDbRenderSettings listed in object RAPIDRTRENDERSETTINGS. I'll work on fixing the reader for AcDbRenderSettings to handle the different class version numbers.

Extra Code 1

This problem appears to come from the code 290 issue above; version 2 of AcDbRenderSettings has an extra code 1 value which messes up the subsequent count. This should be fixed when I fix the code 290/class version 2 problem.

Extra Code 40

The object in the file you sent me has 2 code pairs at the very end that the spec doesn't account for: 290, and 40. I'll adjust the reader to allow these unknown fields to exist so the file can be read.

brettfo commented 1 year ago

Fixed in main.