Add side-firing 0603 LED footprint
authorKeith Packard <keithp@keithp.com>
Fri, 19 Jul 2013 17:52:01 +0000 (10:52 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 19 Jul 2013 17:53:00 +0000 (10:53 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/diodes/0603-sideled.5c [new file with mode: 0644]
packages/diodes/Makefile
packages/footprint.5c

diff --git a/packages/diodes/0603-sideled.5c b/packages/diodes/0603-sideled.5c
new file mode 100644 (file)
index 0000000..36570d2
--- /dev/null
@@ -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();
index 03346043ee2f23ef1190b5df7dc20875801c2d41..130be0f1b5fbb898fbcbc48bb0cb496f5d4ce05e 100644 (file)
@@ -4,7 +4,8 @@ FOOTPRINTS = \
        0605.fp \
        powerdi123.fp \
        topled.fp \
-       2125.fp
+       2125.fp \
+       0603-sideled.fp
 
 .5c.fp:
        nickle $*.5c > $@
index e3bcdd485183a9e12db4855a5fe5c955704cbbbf..0cc39b3ffa04ce9d48036d19ef855c4338887428 100644 (file)
@@ -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);
+       }
 }