【发布时间】:2022-01-05 17:43:11
【问题描述】:
我的目标是从 dxf 文件中获取所有圈子,其中包含 3 个信息,例如:circumference, X center, Y center。到目前为止,我能够得到圆周。我怎样才能得到Y & X?这是我当前的代码:
import sys
import ezdxf
doc = ezdxf.readfile("File.dxf")
msp = doc.modelspace()
for e in msp:
if e.dxftype() == 'CIRCLE':
dc = 2 * math.pi * e.dxf.radius
print('circumference: ' + str(dc))
【问题讨论】: