You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ezdxf import recover, bbox
dxf_doc, dxf_auditor= recover.readfile('test.dxf')
for e in dxf_doc.modelspace():
if e.dxftype() == 'HATCH' and e.dxf.layer == 'A-土建墙柱' and e.dxf.handle == '2D96':
print(bbox.extents([e]))
the bouding box of HATCH 2D96 is [(0.0, -16193.16197130624, 0.0), (102859.1130844388, 43806.83802869376, 0.0)]
As we can see, when I select the HATCH 2D96, the coordinate origin will be selected. I think this is the reason why I calculate the bouding box [(0.0, -16193.16197130624, 0.0), (102859.1130844388, 43806.83802869376, 0.0)].
I guess the coordinate origin for this hatch is something like 'control vertice'
I wonder if there is any approach that I can calculate bouding box only with the showing part without any 'control vertices'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
test.zip
the bouding box of HATCH 2D96 is [(0.0, -16193.16197130624, 0.0), (102859.1130844388, 43806.83802869376, 0.0)]
As we can see, when I select the HATCH 2D96, the coordinate origin will be selected. I think this is the reason why I calculate the bouding box [(0.0, -16193.16197130624, 0.0), (102859.1130844388, 43806.83802869376, 0.0)].
I guess the coordinate origin for this hatch is something like 'control vertice'
I wonder if there is any approach that I can calculate bouding box only with the showing part without any 'control vertices'
Beta Was this translation helpful? Give feedback.
All reactions