DomCR / ACadSharp

C# library to read/write cad files like dxf/dwg.
MIT License
420 stars 118 forks source link

Trying to read DXF files created in LibreCAD throws an exception #120

Closed tchrdav closed 1 year ago

tchrdav commented 1 year ago

Describe the bug I tried to open a DXF files created in LibreCAD and got a CadLib.Exceptions.DxfException

To Reproduce Download LibreCAD from https://librecad.org Create any DXF file, and save it on disk. Open with ACadSharp library.

Expected behavior File must be opened without exceptions.

Additional context Circle.zip

DomCR commented 1 year ago

Hi @tchrdav,

I've checked the dxf, the file doesn't follow the official dxf documentation and seems to have some invalid fields, this is what I've found:

DIMSTYLE documentation

After this investigation I've noticed that Autocad doesn't seem to be bother for this issues in the file and it can be opened without any problems so I'll open a branch to make the DxfReader more flexible for this irregularities.

Actions: