From b7649e45d08802568ac47cc03c8972d7216b1066 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 21 Apr 2025 19:14:15 +0100 Subject: [PATCH] toolbox-inserts: break out AtFixings, wip Signed-off-by: Ian Jackson --- toolbox-inserts.scad | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/toolbox-inserts.scad b/toolbox-inserts.scad index cbaac46..440b2f1 100644 --- a/toolbox-inserts.scad +++ b/toolbox-inserts.scad @@ -188,10 +188,19 @@ module BoxBottomModel() { ////toplevel } } -module FullPlate() { ////toplevel +module AtFixings() { n_x = ceil(box_x / fixing_pitch / 2) + 1; n_y = ceil(box_y / fixing_pitch / 2) + 1; + for (xi=[ for (xi = [-n_x : n_x]) + if (xi != 0) + xi ]) + for (yi=[-n_y : n_y + 1]) + translate(fixing_pitch * [xi, yi - 0.5, 0]) + children(0); +} + +module FullPlate() { ////toplevel render() difference(){ render() intersection(){ BoxCavityModel(); @@ -199,20 +208,18 @@ module FullPlate() { ////toplevel } intersection(){ - for (xi=[ for (xi = [-n_x : n_x ]) - if (xi != 0) - xi ]) - for (yi=[-n_y : n_y + 1]) - translate(fixing_pitch * [xi, yi - 0.5, 0]) { - linextr(-20, -below_plane_z + fixing_head_th) - circle(r = fixing_head_d/2); - linextr(-20, 20) + union(){ + AtFixings() { + linextr(-20, -below_plane_z + fixing_head_th) + circle(r = fixing_head_d/2); + linextr(-20, 20) circle(r = fixing_nom_d/2); - } + } + } - linextr(-100, 100) - offset(r = -plate_unholed_edge_w) - BoxCavityModelMainPlan(); +// linextr(-100, 100) +// offset(r = -plate_unholed_edge_w) +// BoxCavityModelMainPlan(); } } } -- 2.30.2