From: Ian Jackson Date: Fri, 9 May 2025 16:03:02 +0000 (+0100) Subject: toolbox-inserts: move AtPlateFixings to the right place X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b8c8bd22bfaadb7afca39021274acf181aad2ffc;p=reprap-play.git toolbox-inserts: move AtPlateFixings to the right place Signed-off-by: Ian Jackson --- diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index 4d6ea5b..ac29e5d 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -261,6 +261,23 @@ module AtRails() { //---------- plates and the fixing holes ---------- +module AtPlateFixings() { + 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 (!( yi >= -3 && yi < 2 )) + if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > -1.25) + + translate(fixing_pitch * [xi, yi, 0]) { + children(); + } +} + module FullPlate(right) { ////toplevel render() union() { difference(){ @@ -333,23 +350,6 @@ module DriverHandleHolder() { ////toplevel DriverHandlePositive(); } -module AtPlateFixings() { - 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 (!( yi >= -3 && yi < 2 )) - if (( n_y - abs(yi) ) + ( n_x - abs(xi) ) > -1.25) - - translate(fixing_pitch * [xi, yi, 0]) { - children(); - } -} - //---------- RatchetHandle ---------- module RatchetHandlePositive() { ////toplevel