如何使用dxfwrite在python中绘制六边形(或具有4个以上边的任何多边形)形状?先感谢您。
最佳答案
使用POLYLINE实体:
http://pythonhosted.org/dxfwrite/entities/polyline.html
from dxfwrite import DXFEngine as dxf
dwg = dxf.drawing('polyline.dxf')
points = [(0, 3), (2, 0), (5, 0), (7, 3), (5, 6), (2, 6)]
polyline = dxf.polyline(points)
polyline.close()
dwg.add(polyline)
dwg.save()
关于python - 如何使用python dxfwrite绘制六角形,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43996573/