/* MACHINE-GENERATED ! */

frame pad {
	ur: vec @(a/2, 0mm)
	ll: vec .(-a, b)
	pad "$name" ur .
	center: vec @(0mm, b/2)
}

frame solder_paste {
	ur: vec @(a/2-0.025mm, 0.1mm*e*-1)
	ll: vec .(-a+0.05mm, b+0.2mm*e)
	pad "" ur . paste
	center: vec @(0mm, b/2)
}

frame pads_b {
	set a = w

	set b = l_b

	set e = -1

	set name = i*2-1

	loop i = 1, nr_b

	__0: vec @((nr_b-1)/2*p-p*(i-1), -C/2)
	frame pad .
	frame solder_paste .
}

frame pads_u {
	set a = w

	set b = -l_u

	set e = 1

	set name = (i-nr_b)*2

	loop i = nr_b+1, nr_b+nr_u

	__0: vec @((nr_u-1)/2*p-p*(i-(nr_b+1)), C/2)
	frame pad .
	frame solder_paste .
}

frame pads {
	frame pads_b @
	frame pads_u @
}

frame outline {
	ur: vec @(A/2, B/2)
	ll: vec @(-A/2, -B/2)
	rect ur . silk
}

package "header20x2_smd_100mil"
unit mm
set p = 2.54mm

set w = 1.3mm

set l_u = 3.2mm

set l_b = 3.2mm

set C = 9mm

set nr_u = 20

set nr_b = 20

set A = 51mm

set B = 9.2mm

set silk = 0.1mm

__2: vec @(A/2+1mm, -B/2+1mm)
__3: vec .(0.5mm, 0mm)
circ __2 . silk*2
frame pads @
frame outline @
measy pads_b.__0 -> pads_u.__0 2mm
measy pads_u.__0 <- pad.ll -w-1mm
measx pad.ll -> pad.ur -l_b-0.5mm
measy pad.ll -> pad.ll 0.5mm
measx pads_u.__0 -> pads_u.__0 1mm
measy pad.center -> pad.center 1.5mm
