From: Keith Packard Date: Fri, 19 Jul 2013 17:52:01 +0000 (-0700) Subject: Add side-firing 0603 LED footprint X-Git-Tag: telelco-v3.0~862^2 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=77f7270b7ad0cc3e033df0eabb7f65f2ad160313;p=hw%2Faltusmetrum Add side-firing 0603 LED footprint Signed-off-by: Keith Packard --- diff --git a/packages/diodes/0603-sideled.5c b/packages/diodes/0603-sideled.5c new file mode 100644 index 0000000..36570d2 --- /dev/null +++ b/packages/diodes/0603-sideled.5c @@ -0,0 +1,38 @@ +load "../footprint.5c" +import Footprint; + +real total_width=1; +real total_height=2.1; +real body_width = 0.5; +real lens_height=1.7; +real pad_height=1.5; +real pad_space_y = 1.0; +real pad_width=1.0; +real lens_width = 0.5; +real pad_center_x = 0; +real pad_center_y = pad_space_y / 2 + pad_height / 2; +real arc_y = lens_height / 2 - lens_width; +real arc_x = -body_width/2; + +element_start("0603-sideled"); + +pad_mm(0, -pad_center_y, pad_width, pad_height, "1", "1"); +pad_mm(0, pad_center_y, pad_width, pad_height, "2", "2"); + +real line_left = pad_center_x + 0.5; +real line_right = pad_center_x + pad_width / 2 + .3; +real line_top = 0 - pad_height / 2 - .3; + +arc(arc_x, -arc_y, lens_width, lens_width, -90, 90); +line(arc_x - lens_width, -arc_y, arc_x - lens_width, arc_y); +arc(arc_x, arc_y, lens_width, lens_width, 0, 90); +line(-body_width / 2, arc_y + lens_width, -body_width / 2, total_height / 2); +line(-body_width / 2, total_height / 2, + body_width / 2, total_height / 2); +line(body_width / 2, total_height / 2, + body_width / 2, -total_height / 2); +line(body_width / 2, -total_height / 2, + -body_width / 2, -total_height / 2); +line(-body_width / 2, -total_height / 2, + -body_width / 2, -arc_y - lens_width); +element_end(); diff --git a/packages/diodes/Makefile b/packages/diodes/Makefile index 0334604..130be0f 100644 --- a/packages/diodes/Makefile +++ b/packages/diodes/Makefile @@ -4,7 +4,8 @@ FOOTPRINTS = \ 0605.fp \ powerdi123.fp \ topled.fp \ - 2125.fp + 2125.fp \ + 0603-sideled.fp .5c.fp: nickle $*.5c > $@ diff --git a/packages/footprint.5c b/packages/footprint.5c index e3bcdd4..0cc39b3 100644 --- a/packages/footprint.5c +++ b/packages/footprint.5c @@ -282,4 +282,14 @@ namespace Footprint { line(x+w,y+h,x,y+h); line(x,y+h,x,y); } + + public void arc (real center_x, real center_y, + real radius_x, real radius_y, + real start_angle, real delta_angle) + { + printf (" ElementArc[ %6d %6d %6d %6d %3d %3d %d]\n", + mm2mils100(center_x), mm2mils100(center_y), + mm2mils100(radius_x), mm2mils100(radius_y), + start_angle, delta_angle, line_thickness); + } }