From 49b02fce5ee1930da5486001aabf2e344073d263 Mon Sep 17 00:00:00 2001 From: TheRON Date: Fri, 24 Apr 2026 16:10:16 -0400 Subject: [PATCH] Creating the first layer The loop distribution is off, the amount each cavity moves needs to be calculated still. --- BOSL2/V08APR26/SKU2689999/sgc/gridstack.scad | 57 +++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/BOSL2/V08APR26/SKU2689999/sgc/gridstack.scad b/BOSL2/V08APR26/SKU2689999/sgc/gridstack.scad index cd425b7..49c76cc 100644 --- a/BOSL2/V08APR26/SKU2689999/sgc/gridstack.scad +++ b/BOSL2/V08APR26/SKU2689999/sgc/gridstack.scad @@ -12,4 +12,59 @@ /////////////////////////////////////////////////////////////////////////////// include -include +include + +lw = 2*nW; // line width +lh = LH+10; // layer height + +// these MUST be the cavity size +gridX=4.8; +gridY=7.4; + +// these ARE the number of cavities +xCount=15; +yCount=26; + +// these MUST be the calculated dimensions +xw = (gridX*xCount)+((lw+1)*xCount)-lw; // X width +yw = (gridY*yCount)+((lw+1)*yCount)-lw; // Y width +yj = (2*gridY)+(0.5*lw); // jump by this amount + +hc = 3; //height count = height of stack + + +li = 10+VOID; // lead-in line on the Y + +*base_shape(liY=li); +module base_shape(liY) { + difference() { + cuboid([xw+liY, yw, lh]); + translate([(0.5*(xw+liY))-(0.5*liY), lw, 0]) cuboid([li+VOID, yw, lh+VOID]); } +} + +*void_block_odd(liY=li); // backup +/* +module void_block_odd(liY) { +oddStart = 0; + + difference() { + base_shape(liY=li); + translate([-((0.5*liY)-lw), -((0.5*yw)-(0.5*gridY)-(lw)), 0]) cuboid([xw, gridY, lh+VOID]); } +} */ + +void_block_odd(liY=li); +module void_block_odd(liY) { +oddJump = ((0.5*yw)-(0.5*gridY)-(lw)); + for (i = [0:(xCount-1)]) { + difference() { + base_shape(liY=li); + translate([-((0.5*liY)-lw), oddJump-(yj*i), 0]) #cuboid([xw, gridY, lh+VOID]); } +}} + +*void_block_even(liY=li); +module void_block_even(liY) { +evenStart = 0; + difference() { + base_shape(liY=li); + translate([-((0.5*liY)-lw), -((0.5*yw)-(0.5*gridY)-(lw)), 0]) cuboid([xw, gridY, lh+VOID]); } +}