-1

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.

Community
  • 1
  • 1
Vijay
  • 278
  • 5
  • 19

1 Answers1

1

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))

Where the a & b are the constants Using the equation

r=a+b@ 
Community
  • 1
  • 1
Vijay
  • 278
  • 5
  • 19