Date:2012-06-07 00:08:46 (7 years 4 months ago)
Author:Werner Almesberger
Commit:0eb38811d125d27ab04d593a7be3d31718e21206
Message:modules/bat-clip-aa-th.fpd: open clip for AA batteries, through-hole

Files: modules/INFO (1 diff)
modules/bat-clip-aa-th.fpd (1 diff)

Change Details

modules/INFO
297297# USB 2.0 from usb_20_040908, page 99
298298F: usb-a-pcb
299299
300
300# Open clip for AA batteries, through-hole
301# http://www.memoryprotectiondevices.com/datasheets/BK-92-datasheet.pdf
302# Note: should generalize this for AAA and maybe also larger sizes
303F: bat-clip-aa-th
modules/bat-clip-aa-th.fpd
1/* MACHINE-GENERATED ! */
2
3frame pin {
4    set Rh = Cdiam/2
5
6    set Rr = Cdiam/2*ratio
7
8    __0: vec @(Rr, Rr)
9    __1: vec @(-Rr, -Rr)
10    rpad "$name" . __0
11    __2: vec @(Rh, -Rh)
12    __3: vec @(-Rh, Rh)
13    hole . __2
14}
15
16frame outer {
17    set name = 2*grp+2
18
19    frame pin @
20}
21
22frame inner {
23    set name = 2*grp+1
24
25    frame pin @
26}
27
28frame clip {
29    __0: vec @(0mm, -Cpitch*d)
30    frame outer .
31    frame inner @
32}
33
34frame side {
35    __0: vec @(0mm, Blen/2)
36    __1: vec @(0mm, -Blen/2)
37    line __0 . w
38}
39
40frame outline {
41    set ?pair = 1
42
43    __0: vec @(0mm, Cgap/2)
44    __1: vec .(Bdia/2, 0mm)
45    frame side .
46    __2: vec __0(-Bdia/2, 0mm)
47    frame side .
48}
49
50frame marker {
51    table
52        { Mx, My, Marm }
53        { -5mm, -9mm, 1.2mm }
54
55    set ?pair = 1
56
57    __0: vec @(Mx, My)
58    __1: vec .(0mm, Marm)
59    __2: vec __0(Marm, 0mm)
60    __3: vec __0(-Marm, 0mm)
61    line . __2 w
62    __4: vec __0(0mm, -Marm)
63    line __1 . w
64}
65
66package "BAT-CLIP-AA-TH$cfg"
67unit mm
68
69table
70    { cfg, pair }
71    { "", 0 }
72    { "-PAIR", 1 }
73
74table
75    { Blen, Bdia }
76    { 50mm, 14mm }
77
78table
79    { Cpitch, Cgap, Cdiam }
80    { 7.62mm, 33.53mm, 1.7mm }
81
82set ratio = 3
83
84table
85    { ?pair, n, grp, d }
86    { 0, 1, 0, 1 }
87    { 1, 1, 0, 1 }
88    { 1, 2, 1, -1 }
89
90set w = 0.2mm
91
92__0: vec @(0mm, Cgap*(n-1))
93frame clip .
94frame outline @
95frame marker @
96measx pin.__3 -> pin.__2 -5mm
97measx pin.__1 -> pin.__0 -3mm
98measy clip.__0 -> __0
99measy __0 >> __0
100measy clip.__0 >> clip.__0 4mm
101measx side.__0 >> side.__0 5mm
102measy side.__1 -> side.__0 2mm

Archive Download the corresponding diff file

Branches:
master



interactive