在python中使用DXFwriter API绘制螺旋线圈

2024-09-28 19:01:55 发布

您现在位置:Python中文网/ 问答频道 /正文

Hi people,
I am trying to generate the PCB coil dxf format using python DXFwriter

https://pypi.python.org/pypi/dxfwrite/

There are built in shapes like ARC,Circle,Polyline,Polymesh.

I am not able to draw spiral shape using the API.

Can any one please guide me with this query.


Tags: thetohttpspypiformatdxfhiam
1条回答
网友
1楼 · 发布于 2024-09-28 19:01:55

Hi People , I am able to create the Spiral shapes using the library as below

I am using the shape Polyline api

for t in range(0,360):
angle=t*.1
y=(b+angle)*math.sin(angle)
x=(a+angle)*math.cos(angle)
polyline.add_vertex((x,y))

其中a&b是常数 使用方程式

^{pr2}$

相关问题 更多 >