layer one works

This commit is contained in:
2026-04-27 11:41:04 -04:00
parent 49b02fce5e
commit 2b9e5909b0

View File

@@ -15,56 +15,43 @@ include <BOSL2/std.scad>
include <sgc_params.scad> include <sgc_params.scad>
lw = 2*nW; // line width lw = 2*nW; // line width
lh = LH+10; // layer height lh = LH; // layer height
// these MUST be the cavity size // these MUST be the cavity size
gridX=4.8; gridX=4.8;
gridY=7.4; gridY=4.8;
// these ARE the number of cavities // these ARE the number of cavities
xCount=15; xCount=7;
yCount=26; yCount=7;
// these MUST be the calculated dimensions // these MUST be the calculated dimensions
xw = (gridX*xCount)+((lw+1)*xCount)-lw; // X width xw = ((2*gridX)*xCount)+((2*lw)*xCount); // X width
yw = (gridY*yCount)+((lw+1)*yCount)-lw; // Y width yw = ((2*gridY)*yCount)+((2*lw)*yCount)+lw; // Y width
yj = (2*gridY)+(0.5*lw); // jump by this amount yj = (2*gridY)+(0.5*lw); // jump by this amount
hc = 3; //height count = height of stack hc = 3; //height count = height of stack
li = 10+VOID; // lead-in line on the Y *base_shape();
module base_shape() {
*base_shape(liY=li); cuboid([xw, yw, lh]);
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 xCavity();
/* module xCavity() {
module void_block_odd(liY) { jumpY = ((0.5*yw)-(0.5*gridY))-lw;
oddStart = 0;
difference() { difference() {
base_shape(liY=li); color("Gray") base_shape();
translate([-((0.5*liY)-lw), -((0.5*yw)-(0.5*gridY)-(lw)), 0]) cuboid([xw, gridY, lh+VOID]); }
} */
void_block_odd(liY=li); union() {
module void_block_odd(liY) { for (i = [0:(yCount-1)]) {
oddJump = ((0.5*yw)-(0.5*gridY)-(lw)); translate([lw, -(jumpY-(i*((2*lw)+(2*gridY)))), 0])
for (i = [0:(xCount-1)]) { color("Gainsboro") cuboid([xw, gridY, lh+VOID]); }
difference() {
base_shape(liY=li);
translate([-((0.5*liY)-lw), oddJump-(yj*i), 0]) #cuboid([xw, gridY, lh+VOID]); }
}}
*void_block_even(liY=li); for (i = [0:(yCount-1)]) {
module void_block_even(liY) { translate([-lw, -((jumpY-(lw+gridY))-(i*((2*lw)+(2*gridY)))), 0])
evenStart = 0; color("White") cuboid([xw, gridY, lh+VOID]); }
difference() { }}
base_shape(liY=li);
translate([-((0.5*liY)-lw), -((0.5*yw)-(0.5*gridY)-(lw)), 0]) cuboid([xw, gridY, lh+VOID]); }
} }