From: Ian Jackson Date: Sun, 27 Apr 2025 18:54:18 +0000 (+0100) Subject: toolbox-inserts: reorganise file for easier navigation X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0425862c53350e5567cadb76e931adabf5b106a8;p=reprap-play.git toolbox-inserts: reorganise file for easier navigation Signed-off-by: Ian Jackson --- diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index 51ebcee..8000263 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -54,6 +54,10 @@ well_stiffening_height = max( fixing_depth + fixing_surround_ceil ); +//==================== models - general ==================== + +//---------- fixings (general) ---------- + // AtFixingPositions([ screw, screw, ...]) ScrewItem(); // // Each screw is [x,y] or [x,y, depth] @@ -73,6 +77,8 @@ module FixingSurround() { circle(r= fixing_receptacle_d/2); } +//---------- wells (relating to the -ve space in holders) ---------- + module WellSurroundGapElevation(z_bottom, z_edge, z_wayhigh, gap) { rectfromto([ gap[0], z_bottom ], [ gap[1], z_wayhigh ]); @@ -151,25 +157,9 @@ module WellSurround( } } -module DriverHandlePositive() { ////toplevel - linextr_x_yz(0, driver_handle_total_l) - circle(r = driver_handle_shaft_d/2); - linextr_x_yz(driver_handle_shaft_l, driver_handle_total_l) - circle(r = driver_handle_handle_d/2); - linextr_x_yz(driver_handle_shaft_l + driver_handle_handle_front_l, driver_handle_total_l) - circle(r = driver_handle_handle_rear_d/2); -} -module DriverHandleHolder() { ////toplevel - WellSurround(driver_handle_handle_d/2, [ - [ 15, driver_handle_shaft_l - 15 ], - [ driver_handle_shaft_l + 15, driver_handle_shaft_l + 45 ], - ], [ - for (x = [0, 2,3,4,5,6,7,8,9, 11]) - for (y = [-0.5, +0.5]) - [ [ x, y ] ] - ], offset=[-5, 0]) - DriverHandlePositive(); -} +//==================== models - box and plates ==================== + +//---------- box ---------- module BoxCavityModelMainPlan() { hull(){ @@ -208,20 +198,8 @@ module BoxBottomModel() { ////toplevel } } -module AtFixings() { - n_x = floor((box_x / fixing_pitch - 1.0) / 2); - n_y = floor((box_y / fixing_pitch - 1.0) / 2); +//---------- plates and the fixing holes ---------- - for (xi=[ - for (xi= [-n_x : n_x + 1]) - xi - 0.5 - ]) - for (yi=[-n_y : n_y]) - if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > 0.25) - translate(fixing_pitch * [xi, yi, 0]) { - children(); - } -} module FullPlate(right) { ////toplevel render() difference(){ @@ -263,6 +241,48 @@ module LeftPlatePrint() { ////toplevel module RightPlatePrint() { ////toplevel rotate([180,0,0]) RightPlate(); } + +//==================== models - specific tools/objects ==================== + +//---------- DriverHandle - ratchet screwdriver handle (?) ---------- + +module DriverHandlePositive() { ////toplevel + linextr_x_yz(0, driver_handle_total_l) + circle(r = driver_handle_shaft_d/2); + linextr_x_yz(driver_handle_shaft_l, driver_handle_total_l) + circle(r = driver_handle_handle_d/2); + linextr_x_yz(driver_handle_shaft_l + driver_handle_handle_front_l, driver_handle_total_l) + circle(r = driver_handle_handle_rear_d/2); +} +module DriverHandleHolder() { ////toplevel + WellSurround(driver_handle_handle_d/2, [ + [ 15, driver_handle_shaft_l - 15 ], + [ driver_handle_shaft_l + 15, driver_handle_shaft_l + 45 ], + ], [ + for (x = [0, 2,3,4,5,6,7,8,9, 11]) + for (y = [-0.5, +0.5]) + [ [ x, y ] ] + ], offset=[-5, 0]) + DriverHandlePositive(); +} + +module AtFixings() { + n_x = floor((box_x / fixing_pitch - 1.0) / 2); + n_y = floor((box_y / fixing_pitch - 1.0) / 2); + + for (xi=[ + for (xi= [-n_x : n_x + 1]) + xi - 0.5 + ]) + for (yi=[-n_y : n_y]) + if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > 0.25) + translate(fixing_pitch * [xi, yi, 0]) { + children(); + } +} + +//==================== tests and demos ==================== + module TestPlatesPrint() { ////toplevel rotate([180,0,0]) intersection() { union(){