X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=sleepphone-cable-box.scad;h=b5bae407f73d4f787b1091bde9728cdc1c6f94e5;hp=2c896959ace1e666d95021bf43a85bb6150c02df;hb=29f7697011ed4618a0d2c02eb7fc4bfe3c574d81;hpb=457f3dfe608e27b8dd0c983f21cbffcca1064fcc diff --git a/sleepphone-cable-box.scad b/sleepphone-cable-box.scad index 2c89695..b5bae40 100644 --- a/sleepphone-cable-box.scad +++ b/sleepphone-cable-box.scad @@ -3,9 +3,13 @@ include wall = 0.75 * [1,1,1]; -phone = [ 76.40, 30.96, 6.26 ]; // includes socket +wall_bot = 1.0; + +phone = [ 76.40, 30.96, 6.00 ]; // includes socket phone_button_z = 6.58; -minwall = 0.25; +minwall = 0.50; + +button_dz = 1.35; button_dy_outer = 28.42; button_dy_inner = 19.05; @@ -21,7 +25,7 @@ led_dia = 4.4; plug_maxw = 10.95 + 0.35; plug_minw= 6.53 + 0.35; plug_sllen= 6.50; -plug_totlen = 84.90; // to maxw, including phone +plug_totlen = 84.90 - 1.5; // to maxw, including phone plug_h = 6.5; plug_tooth_h = 0.5; @@ -31,6 +35,7 @@ keeper_prong = 2; keeper_stalk_basewidth = 4; keeper_stalk_len = 70; keeper_stalk_gap = 2; +keeper_stalk_thick = wall_bot; // calculated @@ -50,7 +55,7 @@ plugkeeper_d_u = unitvector2d( module MainProfileInnerHalf(){ p = phone + phone_slop; - pb = phone_button_z + phone_slop[2]; + pb = p[2] + button_dz; polygon([[ -2, 0 ], [ p[1]/2, 0 ], [ p[1]/2, p[2] ], @@ -65,13 +70,18 @@ module MainProfileInnerHalf(){ module MainProfile(){ p = phone + phone_slop; - for (m=[0,1]) mirror([m,0]) { - difference(){ - translate([-1, -wall[2] ]) - square([ p[1]/2 + wall[1] + 1, top_z + wall[2] ]); + difference(){ + for (m=[0,1]) mirror([m,0]) { + minkowski(){ + translate([ -wall[1], -wall_bot ]) + square([ wall[1]*2, wall_bot + wall[2] ]); + MainProfileInnerHalf(); + } + } + for (m=[0,1]) mirror([m,0]) { MainProfileInnerHalf(); } - } + } } module BoxMain(){ @@ -101,14 +111,14 @@ module PlugKeeperStalkProfile(){ hull(){ for (m=[0,1]) mirror([0,m,0]) PlugKeeperProfileHalf(); translate([ plugkeeper_x_maxw + keeper_stalk_len, 0,0 ]) - square([ 0.1, keeper_stalk_basewidth/2 ], center=true); + square([ 0.1, keeper_stalk_basewidth ], center=true); } } module PlugKeeper(){ for (m=[0,1]) mirror([0,m,0]) { - translate([0,0, -wall[2]]) - linear_extrude(height=plug_h + wall[2]) + translate([0,0, -keeper_stalk_thick]) + linear_extrude(height=plug_h + keeper_stalk_thick) PlugKeeperProfileHalf(); translate([0, 0, plug_h - plug_tooth_h]) @@ -118,8 +128,8 @@ module PlugKeeper(){ } - translate([0,0, -wall[2]]) - linear_extrude(height = wall[2]) + translate([0,0, -keeper_stalk_thick]) + linear_extrude(height = keeper_stalk_thick) PlugKeeperStalkProfile(); } @@ -139,6 +149,7 @@ module Box(){ PlugKeeper(); } -//MainProfileInner(); +//MainProfileInnerHalf(); +//MainProfile(); Box();