mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-25 09:04:36 +02:00
56 lines
801 B
Plaintext
56 lines
801 B
Plaintext
|
/* MACHINE-GENERATED ! */
|
||
|
|
||
|
frame pin {
|
||
|
set n = col*R+row+1
|
||
|
|
||
|
__0: vec @(hole/2, hole/2)
|
||
|
__1: vec @(hole*ratio/2, -hole*ratio/2)
|
||
|
__2: vec @(-hole/2, -hole/2)
|
||
|
hole . __0
|
||
|
__3: vec @(-hole*ratio/2, hole*ratio/2)
|
||
|
rpad "$n" . __1
|
||
|
}
|
||
|
|
||
|
frame pins {
|
||
|
loop row = 0, R-1
|
||
|
|
||
|
loop col = 0, C-1
|
||
|
|
||
|
__1: vec @(-P*(C-1)/2, -P*(R-1)/2)
|
||
|
__0: vec .(col*P, row*P)
|
||
|
frame pin .
|
||
|
}
|
||
|
|
||
|
frame outline {
|
||
|
set x = C*P
|
||
|
|
||
|
set y = R*P
|
||
|
|
||
|
__0: vec @(x/2, y/2)
|
||
|
__1: vec @(-x/2, -y/2)
|
||
|
rect . __0 width
|
||
|
}
|
||
|
|
||
|
package "HDR-${C}x${R}-$P"
|
||
|
unit mm
|
||
|
|
||
|
table
|
||
|
{ R }
|
||
|
{ 1 }
|
||
|
{ 2 }
|
||
|
|
||
|
table
|
||
|
{ P, hole, ratio }
|
||
|
{ 100mil, 0.8mm, 2 }
|
||
|
{ 200mil, 1mm, 2.5 }
|
||
|
|
||
|
set width = 5mil
|
||
|
|
||
|
loop C = 2, 20
|
||
|
|
||
|
frame pins @
|
||
|
frame outline @
|
||
|
measy outline.__1 >> outline.__0 1mm
|
||
|
measx pin.__2 -> pin.__0 -P/2-1mm
|
||
|
measx pin.__3 -> pin.__1 (R-0.5)*P+1mm
|