1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
from kicad import *
### ALL measurements are in mm
class meander(kicad_container):
def __init__(self, dim1, dim2, width, n):
kicad_container.__init__(self)
self.length = 0
for i in range(0, n):
self.length += dim1 + dim2
if i % 2 == 0:
self.add(kicad_pcb_track(0, i*dim2, dim1, i*dim2, width, 0))
self.add(kicad_pcb_track(dim1, i*dim2, dim1, (i+1)*dim2, width, 0))
else:
self.add(kicad_pcb_track(dim1, i*dim2, 0, i*dim2, width, 0))
self.add(kicad_pcb_track(0, i*dim2, 0, (i+1)*dim2, width, 0))
module = kicad_board('RepRap Heating Plate')
p = meander(150, 1.5, 0.8, 99/1.5)
module.add(p)
print module.render()
|