如何使用dxfwrite在python中绘制六边形(或任何多边4边多边形)的形状?提前谢谢。
答案 0 :(得分:1)
使用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()