]> www.fi.muni.cz Git - things.git/commitdiff
openparking led arrow
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 12 May 2015 16:33:42 +0000 (18:33 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 12 May 2015 16:33:42 +0000 (18:33 +0200)
led-arrow.scad [new file with mode: 0644]

diff --git a/led-arrow.scad b/led-arrow.scad
new file mode 100644 (file)
index 0000000..807a743
--- /dev/null
@@ -0,0 +1,73 @@
+eps = 0.01;
+infty = 100;
+
+module chamber() {
+       for (i = [-1, 1]) {
+               hull() {
+                       translate([-3, 0, 0.4])
+                       scale([1.25, 1, 1])
+                       cylinder(r1 = 8, r2 = 10, h = 4, $fn = 3);
+                       // translate([i+2, 0, 0])
+                       rotate([0, 35*i, 0])
+                               translate([0, 0, 7])
+                               cylinder(r1 = 8/2, r2 = 5.5/2,h = 4, $fn = 6);
+               }
+                       rotate([0, 35*i, 0])
+                               translate([0, 0, 10])
+                                       cylinder(r = 5.5/2, h = 5, $fn = 10);
+                               intersection() {
+                               rotate([0, 35*i, 0])
+                               translate([0, 0, 15-eps])
+                                       cylinder(r = 8/2, h = 10, $fn = 10);
+                               translate([-30/2, -15/2, eps])
+                                       cube([30, 15, 15]);
+                               }
+               difference() {
+                       translate([-32/2, -16/2, 15])
+                               cube([32, 16, 20]);
+                       
+                       translate([screw_x-12/2, screw_y-12/2,0])
+                               cube([12, 12, infty]);
+               }
+       }
+
+}
+
+screw_x = 5;
+screw_y = 10;
+
+module body() {
+       hull() {
+               // top cube
+               translate([-36/2, -20/2, 15])
+                       cube([36, 20, 5]);
+               // bottom triangle
+               translate([-3, 0, 0])
+                       scale([1.25, 1, 1])
+                       cylinder(r = 11, h = eps, $fn = 3);
+               // screw base
+               translate([screw_x-12/2, screw_y-12/2,17])
+                       cube([12, 12, 3]);
+       }
+}
+
+module light() {
+       difference() {
+               body();
+               chamber();
+               // screw head hole
+               translate([-4+screw_x, screw_y-8/2, 17-infty])
+                       cube([8, infty, infty]);
+               // screw hole
+               translate([screw_x-4, screw_y-4/2, -eps])
+                       cube([8, 4, infty]);
+
+               // cable hole
+               translate([-9-eps, 0, 17])
+                       cube([8, infty, infty]);
+
+               // debug
+               // translate([-infty/2, -infty, -infty/2]) cube(infty);
+       }
+}
+light();