From a998eecfe89a9e33002a1eda2b7263716e6cb7e0 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Tue, 4 Feb 2014 13:24:18 +0100 Subject: [PATCH] PoC is klaar, nu nog de goede waarden invullen en printen --- Power_bar_screwdown/power_bar_screwdown.scad | 43 +++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/Power_bar_screwdown/power_bar_screwdown.scad b/Power_bar_screwdown/power_bar_screwdown.scad index ca3d32e..1cb35e3 100644 --- a/Power_bar_screwdown/power_bar_screwdown.scad +++ b/Power_bar_screwdown/power_bar_screwdown.scad @@ -11,6 +11,19 @@ wall_thickness = 3; max_length = 30; +socket_diameter = 40; +socket_distance_from_edge = 5 + (width_longest-width_shortest)/2; + +wire_diameter = 8; +wire_cover_diameter = 20; + +switch_width = 20 + 100; // enough not to leave material hanging +switch_length = 30; +switch_distance_from_edge = 5 + (width_longest-width_shortest)/2; + +wireend = 0; // 0 or 1 +withswitch = 0; // 0 or 1 + // Gotta do some mathematics triangle_height = (width_longest - width_shortest) / 2; @@ -70,6 +83,30 @@ module shell(){ translate([wall_thickness, wall_thickness, 0]){ body(radius_side, height, width_longest, 1); } + + if (withswitch == 0) { + // substract socket + translate([(width_longest + wall_thickness*2)/2, socket_distance_from_edge+socket_diameter/2, (height + wall_thickness*2)/2 - wall_thickness*2]){ + cylinder(h=wall_thickness*3, r=socket_diameter/2, $fn=FN); + } + } else { + translate([(width_longest + wall_thickness*2)/2 - switch_length/2, switch_distance_from_edge, (height + wall_thickness*2)/2 - wall_thickness*2]){ + cube([switch_length, switch_width, wall_thickness*3]); + } + } + + if (wireend == 1) { + // substract wire cover bit + translate([(width_longest + wall_thickness*2)/2, - wall_thickness, 0]){ + rotate([270, 0, 0]){ + cylinder(h=wall_thickness*3, r=wire_cover_diameter/2, $fn=FN); + } + } + // and substract space for the wire to be able to fit the cover + translate([(width_longest + wall_thickness*2)/2 - wire_diameter/2, -1, -(height+wall_thickness*2)/2-1]){ + cube([wire_diameter, max_length+10, (height + wall_thickness*2)/2 + 1]); + } + } } translate([0,0,-(height+wall_thickness*2)/2]){ cube([width_longest+ wall_thickness*2,max_length,height+wall_thickness*2]); @@ -113,6 +150,8 @@ module assembly(){ } } -translate([0,0,height/2+wall_thickness]){ - assembly(); +rotate([90,0,0]){ + translate([0,0,height/2+wall_thickness]){ + assembly(); + } }