Error with bbox.extents()
yoriyouriri opened this issue · comments
Hi!
You are working with very strange (crappy) DXF files. This one fd1.dxf
is broken and AutoCAD cannot open it but BricsCAD can.
First you have to use the ezdxf.recover
module to load such files:
from ezdxf import recover, bbox
doc, auditor = recover.readfile("fd1.dxf")
if not auditor.has_errors:
print(bbox.extents(doc.modelspace()))
This is the short version, read this how to load DXF files from unreliable sources: https://ezdxf.mozman.at/docs/drawing/recover.html
Sadly this doesn't help to load this file, it still contains invalid B-spline definitions which ezdxf
can't handle.
ok, i see!
there is another DXF file, and the error info is a little difference from above error, is it also a broken file?
btw, i've tried open it with AutoCAD 2022 successfully
801.zip
ezdxf.recover
can open the file fd1.dxf
- fixes 1156 issues, mostly missing BLOCK definitions.
The file 801.dxf
only requires the recover
module to open. (17 fixed issues)
thank u! i'll try add recover
to my script