1
0
mirror of git://projects.qi-hardware.com/kicad-libs.git synced 2024-11-22 07:27:30 +02:00
kicad-libs/modules/lga.fpd

111 lines
2.1 KiB
Plaintext
Raw Normal View History

/* MACHINE-GENERATED ! */
frame piny {
table
{ ?cw, name }
{ 0, i*f+a }
{ 1, pins-a-i*f-nx+1 }
__0: vec @(dx*(pyy/2+pe), pyx/2)
__1: vec @(-dx*pyy/2, -pyx/2)
pad "$name" . __0
}
frame pinsy {
set y = e*(i-(ny-1)/2)
set x = sx/2-pyy/2-b
table
{ dx, f, a }
{ -1, -1, ny }
{ 1, 1, pins-ny-nx+1 }
loop i = 0, ny-1
__0: vec @(x*dx, y)
frame piny .
}
frame pinx {
table
{ ?cw, name }
{ 0, i*f+a }
{ 1, a+(nx-i-1)*f }
__0: vec @(pxx/2, -dy*pxy/2)
__1: vec @(-pxx/2, dy*pxy/2)
__2: vec .(0mm, dy*pe)
pad "$name" . __0
}
frame outline {
set corner = gap*2-(w+0.2mm)/sqrt(2)
__0: vec @(sx/2, sy/2)
__1: vec .(gap, gap)
__2: vec @(-sx/2, -sy/2)
__3: vec .(-gap, -gap)
rect . __1 w
__4: vec @((cw*2-1)*sx/2, sy/2)
__5: vec .((cw*2-1)*gap, gap)
__6: vec .((1-cw*2)*corner, 0mm)
__7: vec __5(0mm, -corner)
line . __6 w
}
frame pinsx {
set x = e*(i-(nx-1)/2)
set y = sy/2-pxy/2-b
table
{ dy, f, a }
{ -1, 1, ny+1 }
{ 1, -1, pins }
loop i = 0, nx-1
__0: vec @(x, y*dy)
frame pinx .
}
package "LGA-$pins-${sizex}x${sizey}${variant}"
unit mm
allow overlap
table
{ variant, nx, ny, sx, sy, e, b, pxx, pxy, pyx, pyy, pe, cw }
{ "", 3, 5, 3mm, 3mm, 0.5mm, 0.1mm, 0.25mm, 0.35mm, pxx, pxy, 0.2mm, 0 }
{ "-BME280", 0, 4, 2.5mm, 2.5mm, 0.65mm, 0.125mm, 0.35mm, 0.35mm, pxx, pxy, 0.15mm, 1 }
{ "-BMX055", 3, 7, 3mm, 4.5mm, 0.5mm, 0.1mm, 0.25mm, 0.375mm, pxx, 0.475mm, 0.2mm, 1 }
{ "-RUT", 1, 5, 1.7mm, 2mm, 0.4mm, -0.1mm, 0.2mm, 0.6mm, pxx, pxy, 0mm, 0 }
set pins = 2*(nx+ny)
set sizex = sx/1mm
set sizey = sy/1mm
set w = 5mil
set gap = 0.2mm+w/2+0.1mm
frame pinsx @
frame pinsy @
frame outline @
measx outline.__2 >> outline.__0 -1.5mm
measy outline.__2 >> outline.__0 1.5mm
measx pinsx.__0 -> pinsx.__0 -1.5mm
measx pinx.__2 -> pinx.__0 pxy+0.5mm
measy pinx.__1 -> pinx.__0 0.2mm
measy pinx.__2 -> pinx.__1 0.2mm
measy outline.__3 >> outline.__5 1.5mm
measx outline.__3 >> outline.__1 -1.5mm
measy pinx.__1 >> outline.__2 -0.5mm
measx piny.__0 -> piny.__1
measx piny.__1 -> piny.__1 0.8mm
measx piny.__0 -> piny.__0 1mm
measy pinsy.__0 -> pinsy.__0 1mm
measy pinx.__0 -> pinx.__0 2.2mm