From: Ian Jackson Date: Sun, 4 May 2025 21:54:58 +0000 (+0100) Subject: toolbox-inserts: rails wip reorg X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0a5accae2f5537bda786ad449406340ea637af21;p=reprap-play.git toolbox-inserts: rails wip reorg Signed-off-by: Ian Jackson --- diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index df5312d..f3f6461 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -228,13 +228,17 @@ module RailMountPositiveElevation() { ellipse([ rail_mount_mid_nom_r_w, rail_mount_mid_depth ]/2); } -// x origin is LHS of box +// origin is LHS of box, y is along the rail (ie, x in the rest of the model) +module RailSpaceNegative(length) { + translate([ 0, rail_mount_back_brace,0 ]) { + linextr_y_xz(rail_mount_tongue_len, length) + RailSpaceCutoutElevation(); + } +} module RailMountNegative(length) { translate([ 0, rail_mount_back_brace,0 ]) { linextr_y_xz(0, rail_mount_tongue_len + 1) RailMountCutoutElevation(); - linextr_y_xz(rail_mount_tongue_len, length) - RailSpaceCutoutElevation(); } } module RailMountPositive() { @@ -244,8 +248,16 @@ module RailMountPositive() { } } -//---------- plates and the fixing holes ---------- +module AtRails() { + for (mx = [0,1]) + for (y = rail_y) + mirror([mx, 0, 0]) + translate([-box_x/2, y, 0]) + rotate([0, 0, -90]) + children(); +} +//---------- plates and the fixing holes ---------- module FullPlate(right) { ////toplevel render() union() { @@ -255,12 +267,8 @@ module FullPlate(right) { ////toplevel linextr(-20, 0) square(1000, center=true); } - for (mx = [0,1]) for (y = rail_y) { - mirror([mx, 0, 0]) - translate([-box_x/2, y, 0]) - rotate([0, 0, -90]) - RailMountNegative(box_x/2); - } + AtRails() RailSpaceNegative(box_x/2); + AtRails() RailMountNegative(box_x/2); AtPlateFixings() render() { linextr(-20, fixing_head_top_z) @@ -400,6 +408,7 @@ module RailMountTest(){ ////toplevel linextr_y_xz(0, 30) rectfromto([-15, -below_plane_z ], [+15, 0 ]); + RailSpaceNegative(30); RailMountNegative(30); } RailMountPositive();