// Holder for Fraen FHS-HEB1-LB01-x lens for Luxeon LEDs. // I use it for my rear lights. epsilon = 0.01; infty = 100; debug = 0; wall_thickness = 2; fraen_diam = 30.75; fraen_h = 29.8; pin_diam = 4; pin_offset = 10.35*1.4142; pin_len = 9.2; front_add = 4; side_barrier_x_offset = 13; side_barrier_pin_z_offset = 4.2; side_barrier_thickness = 2; heatsink_thickness = 2.5; clip_h1 = 27; // front height (on the heatsink side) clip_h2 = 20; // rear height (on the lens side) clip_l = 28; clip_wall = wall_thickness; clip_space = 3.5; clip_bolt1_z = 6; clip_bolt1_x = 20; clip_bolt2_z = 22; clip_bolt2_x = 23; clip_angle = 24; clip_top_xoff = clip_l*tan(clip_angle); clip_y_off = 37; clip_x_off = 0; // z-axis is up module bolt_mount(d, h, w1, w2, fn) { difference() { translate([0, 0, -epsilon]) cylinder(r1=w2/2, r2=w1/2, h=h+epsilon); translate([0, 0, -2*epsilon]) cylinder(r=d/2, h=h+3*epsilon, $fn=fn); }; }; module seat_clip() { difference() { union() { // right part hull() { translate([0, clip_space/2, 0]) cube([clip_h1, clip_wall, epsilon]); translate([clip_top_xoff, clip_space/2, clip_l]) cube([clip_h2, clip_wall, epsilon]); }; // left part hull() { translate([0, -clip_space/2-clip_wall, 0]) cube([clip_h1, clip_wall, epsilon]); translate([0+clip_top_xoff, -clip_space/2-clip_wall, clip_l]) cube([clip_h2, clip_wall, epsilon]); }; // top part hull() { translate([-clip_wall, -clip_space/2-clip_wall, 0]) cube([clip_wall+epsilon, 2*clip_wall+clip_space, epsilon]); translate([-clip_wall+clip_top_xoff, -clip_space/2-clip_wall, clip_l]) cube([clip_wall+epsilon, 2*clip_wall+clip_space, epsilon]); }; // bolt mounts translate([clip_bolt1_x, clip_space/2 + clip_wall, clip_bolt1_z]) rotate([-90, 0, 0]) bolt_mount(6.5, 2, 7, 12, 32); translate([clip_bolt1_x, -clip_space/2 - clip_wall, clip_bolt1_z]) rotate([90, 0, 0]) bolt_mount(6.5, 2, 7, 12, 6); translate([clip_bolt2_x, clip_space/2 + clip_wall, clip_bolt2_z]) rotate([-90, 0, 0]) bolt_mount(6.5, 2, 7, 12, 32); translate([clip_bolt2_x, -clip_space/2 - clip_wall, clip_bolt2_z]) rotate([90, 0, 0]) bolt_mount(6.5, 2, 7, 12, 6); }; // bolt holes translate([clip_bolt1_x, infty/2, clip_bolt1_z]) rotate([90, 0, 0]) cylinder(r=2, h=infty, $fn = 6); translate([clip_bolt2_x, infty/2, clip_bolt2_z]) rotate([90, 0, 0]) cylinder(r=2, h=infty, $fn = 6); } } // upper part of the lens holder module round_part() { difference() { cylinder(r = fraen_diam/2 + pin_diam/2 + wall_thickness, h = front_add + pin_len); hull() { translate([0, 0, -epsilon]) cylinder(r = fraen_diam/2, h = pin_len + front_add + 2*epsilon); for (angle = [0, 90, 180, 270]) { rotate([0, 0, angle+45]) translate([pin_offset, 0, -epsilon]) cylinder(r=pin_diam/2, h=epsilon, $fn=32); }; } // front cone translate([0, 0, pin_len + 0.5*wall_thickness - epsilon]) cylinder(r1 = fraen_diam/2, r2 = (fraen_diam+pin_diam + wall_thickness)/2, h = front_add - 0.5*wall_thickness+ 2*epsilon); // pin holes for (angle = [0, 90, 180, 270]) { rotate([0, 0, angle+45]) translate([pin_offset, 0, epsilon]) cylinder(r=pin_diam/2, h=pin_len+epsilon, $fn=32); }; }; // side barriers for (angle = [0, 90, 180]) // omit the bottom one rotate([0, 0, angle]) intersection() { cylinder(r=fraen_diam/2+epsilon, h=infty); translate([-infty/2, side_barrier_x_offset, wall_thickness + pin_len - side_barrier_pin_z_offset - side_barrier_thickness ]) cube([infty, infty, side_barrier_thickness]); }; }; module square_cone() { difference() { hull() { translate([0, 0, fraen_h - pin_len]) cylinder(r = fraen_diam/2 + pin_diam/2 + wall_thickness, h = epsilon); for (angle = [0, 90, 180, 270]) rotate([0, 0, angle]) translate([9.1, 9.1, 0]) cylinder(r=wall_thickness+3.75/2, h = epsilon); } hull() { translate([0, 0, fraen_h - pin_len + epsilon]) cylinder(r = fraen_diam/2, h = epsilon); for (angle = [0, 90, 180, 270]) { rotate([0, 0, angle]) translate([9.1, 9.1, -epsilon]) cylinder(r=3.75/2, h = epsilon); rotate([0, 0, angle+45]) translate([pin_offset, 0, fraen_h - pin_len + epsilon]) cylinder(r=pin_diam/2, h=epsilon, $fn=32); } } } } rear_spring_w = 4; module rear_spring() { translate([0, 0, wall_thickness/2]) cube([18+2*wall_thickness+3.5, rear_spring_w, wall_thickness], center=true); difference() { rotate([90, 0, 0]) translate([0, 0, -rear_spring_w/2]) cylinder(r=6-heatsink_thickness, h = rear_spring_w); translate([0, 0, -infty/2+epsilon]) cube(infty, center=true); }; }; module heatsink_holder() { for (angle = [0, 180]) { rotate([0, 0, angle]) translate([9.1+wall_thickness, 0, 6/2]) cube([3.5/2+wall_thickness, 2*9.1-3.5-0.5, 6], center=true); } } module lens_holder() { difference() { union() { translate([0, 0, fraen_h - pin_len]) round_part(); square_cone(); }; // 0.5mm hole in the bottom // translate([side_barrier_x_offset-epsilon, -0.25, -epsilon]) translate([0, -0.25, (fraen_h - pin_len)/2]) cube([infty, 0.5, infty]); // cable hole, 2*3mm translate([9.1, 0, 6+3]) rotate([0, 0, 60]) cube([infty, 2, 3]); // side LED hole, 3mm translate([0, 0, fraen_h - pin_len]) rotate([90, 0, 0]) cylinder(r=3.5/2, h=infty, $fn=6); }; rear_spring(); heatsink_holder(); }; union() { lens_holder($fn = 128); translate([clip_x_off, clip_y_off, 0]) seat_clip(); /* hull() { translate([0, 9.1+3.5/2+epsilon, wall_thickness/2]) cube([9.1, epsilon, wall_thickness], center=true); translate([20-clip_wall/2, 40-clip_space/2-clip_wall+epsilon, wall_thickness/2]) cube([9.1, epsilon/2, wall_thickness], center=true); }; hull() { translate([0, 9.1+3.5/2+epsilon, wall_thickness/2]) cube([2*.259+3.5, epsilon, wall_thickness], center=true); translate([20-clip_wall/2, 40-clip_space/2-clip_wall+epsilon, wall_thickness/2]) cube([clip_h1+clip_wall, epsilon/2, wall_thickness], center=true); }; translate([7.5, 13.3, 0]) cube([wall_thickness, 23, fraen_h - pin_len - wall_thickness]); } //translate([-infty/2, -infty/2, 8]) // cube(infty); */ }; // 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