[英]How to draw hexagonal shape using python dxfwrite
如何使用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()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.