]> www.fi.muni.cz Git - bike-lights.git/commitdiff
rearlight-dual holder
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 18 Aug 2020 15:00:57 +0000 (17:00 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Tue, 18 Aug 2020 15:01:37 +0000 (17:01 +0200)
parts/rearlight-dual.scad [new file with mode: 0644]

diff --git a/parts/rearlight-dual.scad b/parts/rearlight-dual.scad
new file mode 100644 (file)
index 0000000..9746f27
--- /dev/null
@@ -0,0 +1,160 @@
+// Holder for two Fraen FHS-HEB1-LB01-x lenses for Luxeon LEDs.
+
+eps = 0.01;
+infty = 100;
+
+wall = 1.5;
+lens_dist = 48;
+fraen_diam = 30.90;
+fraen_h = 29.3;
+pin_diam = 4;
+pin_offset = 10.35*1.4142;
+pin_len = 9.2;
+front_add = 4;
+
+rear_pin_dist = 9.1;
+rear_pin_diam = 3.25;
+
+side_barrier_x_offset = 13;
+side_barrier_pin_z_offset = 4.2;
+side_barrier_thickness = 2;
+
+heatsink_thickness = 2;
+heatsink_w = 15 + 0.5;
+heatsink_l = lens_dist + 1.5*heatsink_w;
+heatsink_z = 1 + wall;
+heatsink_hole_sep = 2*wall;
+
+clip_h1 = 27; // front height (on the heatsink side)
+clip_h2 = 20; // rear height (on the lens side)
+clip_l  = 28;
+clip_wall = wall;
+clip_space = 3.5;
+clip_bolt1_z = 6;
+clip_bolt1_x = 19.5;
+clip_bolt2_z = 22;
+clip_bolt2_x = 21;
+clip_angle = 18;
+clip_top_xoff = clip_l*tan(clip_angle);
+
+clip_y_off = 34;
+clip_x_off = 2;
+clip_x_rot = -3;
+
+screw_yoff = 13;
+screw_d = 4;
+screw_d2 = 12;
+screw_h = 8;
+screw_wall = 3*wall;
+
+       // vnitrni prumer kruhu by mel byt 30.75mm
+       // vnejsi prumer aspon 35 mm
+       // pin od stredu 10.35mm na x a y
+       // prumer pinu 4 mm
+       // pin ma od cela do zabrany 4.2mm, celkove by mel mit 9.2mm
+
+       // piny by mely pokracovat jeste tak 4mm pod nulu,
+       // a pak uz muze jit konv.obal do ctverce
+       // vnitrni rozmery ctverce 21.5x21.5, zakulacene rohy prumer 3.5
+       // vrch chladice (s LEDkou) -18.5
+       // konec nozicek -24.5
+
+front_len = fraen_h + wall;
+rear_mount_depth = 10;
+rear_sep = 0.3;
+
+module front_body() {
+       hull() for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, 0]) {
+               cylinder(r = fraen_diam/2 + pin_diam/2 + wall,
+                       h = front_len + wall);
+       }
+}
+
+module front_part() {
+       difference() {
+               front_body();
+               for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, 0]) {
+                       // front narower ring
+                       translate([0, 0, -eps])
+                               cylinder(r = fraen_diam/2 - wall, h = wall+2*eps);
+                       // main holes
+                       translate([0, 0, wall])
+                               cylinder(r = fraen_diam/2 , h = front_len + eps);
+                       // pin holes
+                       for (angle = [0, 90, 180, 270]) {
+                               rotate([0, 0, angle+45])
+                                       translate([pin_offset, 0, wall])
+                                               cylinder(r=pin_diam/2,
+                                                       h=front_len + eps);
+                       };
+               }
+               // rear mount
+               difference() {
+               hull() for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, front_len - rear_mount_depth] ) {
+                       cylinder(r = fraen_diam/2 + pin_diam/2,
+                               h = wall + rear_mount_depth + eps);
+               }
+               for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, front_len])
+               for (angle = [0, 90, 180, 270]) rotate([0, 0, angle])
+                       translate([rear_pin_dist, rear_pin_dist, 0])
+                               cylinder(r=rear_pin_diam/2, h = wall);
+               }
+               // screw holes
+               for (y = [-1, 1]) translate([0, y*screw_yoff, -eps])
+                       cylinder(r = screw_d/2,
+                               h = front_len + wall + 2*eps);
+       }
+}
+
+module rear_body() {
+       hull() for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, 0] ) {
+               cylinder(r = fraen_diam/2 + pin_diam/2 - rear_sep,
+                       h = wall + rear_mount_depth);
+       }
+}
+
+module rear_part() {
+       difference() {
+               rear_body();
+               // pins
+               for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, wall])
+               for (angle = [0, 90, 180, 270]) rotate([0, 0, angle])
+                       translate([rear_pin_dist, rear_pin_dist, 0])
+                               cylinder(r=rear_pin_diam/2, h = rear_mount_depth+wall+eps);
+               // pins hull
+               // for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, 2*wall]) hull()
+               // for (angle = [0, 90, 180, 270]) rotate([0, 0, angle])
+               //      translate([rear_pin_dist, rear_pin_dist, 0])
+               //              cylinder(r=rear_pin_diam/2, h = rear_mount_depth);
+               difference() {
+                       // outer wall
+                       hull() for (x = [-1, 1]) scale([x, 1, 1]) translate([lens_dist/2, 0, heatsink_z + heatsink_thickness] ) {
+                               cylinder(r = fraen_diam/2 + pin_diam/2 - rear_sep - wall,
+                                       h = rear_mount_depth + wall + eps);
+                       }
+                       // minus screw mounts
+                       for (y = [-1, 1]) translate([0, y*screw_yoff, 0])
+                               cylinder(r = screw_d/2 + screw_wall,
+                                       h = rear_mount_depth + wall + eps);
+               }
+               // screw holes
+               for (y = [-1, 1]) translate([0, y*screw_yoff, -eps])
+                       cylinder(r = screw_d/2,
+                               h = rear_mount_depth + wall + 2*eps);
+               // heatsink
+               translate([-heatsink_l/2, -heatsink_w/2, heatsink_z])
+                       cube([heatsink_l, heatsink_w, rear_mount_depth]);
+               // heatsink back hole
+               translate([-heatsink_l/2 + heatsink_hole_sep,
+                               -heatsink_w/2 + heatsink_hole_sep, -eps])
+                       cube([heatsink_l-2*heatsink_hole_sep,
+                               heatsink_w-2*heatsink_hole_sep,
+                               heatsink_z+2*eps]);
+       }
+}
+
+translate([0, fraen_diam *1.5, 0])
+       front_part($fn = 128);
+
+rear_part($fn = 128);
+