version 1 ready
Layer one is a continuous line, but the rest of the layers are single line segments. The next version should have continuous lines for all layers.
This commit is contained in:
@@ -19,31 +19,35 @@ lh = LH; // layer height
|
||||
|
||||
// these MUST be the cavity size
|
||||
gridX=4.8;
|
||||
gridY=4.8;
|
||||
gridY=9.6;
|
||||
|
||||
// these ARE the number of cavities
|
||||
xCount=7;
|
||||
yCount=7;
|
||||
xCount=3;
|
||||
yCount=4;
|
||||
|
||||
// these MUST be the calculated dimensions
|
||||
xw = ((2*gridX)*xCount)+((2*lw)*xCount); // X width
|
||||
yw = ((2*gridY)*yCount)+((2*lw)*yCount)+lw; // Y width
|
||||
//xw = ((2*gridX)*xCount)+((2*lw)*xCount); // X width
|
||||
//yw = ((2*gridY)*yCount)+((2*lw)*yCount)+lw; // Y width
|
||||
xw = ((gridX)*xCount)+((lw)*xCount)+lw; // X width
|
||||
yw = ((gridY)*yCount)+((lw)*yCount)+lw; // Y width
|
||||
yj = (2*gridY)+(0.5*lw); // jump by this amount
|
||||
|
||||
hc = 3; //height count = height of stack
|
||||
|
||||
|
||||
*base_shape();
|
||||
module base_shape() {
|
||||
*base_shape(nozzleStart = 10);
|
||||
module base_shape(nozzleStart) {
|
||||
cuboid([xw, yw, lh]);
|
||||
translate([(0.5*xw)+(0.5*nozzleStart)-VOID, -((0.5*yw)-(0.5*lw)), 0])
|
||||
cuboid([nozzleStart, lw, lh]);
|
||||
}
|
||||
|
||||
xCavity();
|
||||
module xCavity() {
|
||||
*layerOne();
|
||||
module layerOne() {
|
||||
jumpY = ((0.5*yw)-(0.5*gridY))-lw;
|
||||
|
||||
difference() {
|
||||
color("Gray") base_shape();
|
||||
color("Gray") base_shape(nozzleStart = 10);
|
||||
|
||||
union() {
|
||||
for (i = [0:(yCount-1)]) {
|
||||
@@ -55,3 +59,20 @@ jumpY = ((0.5*yw)-(0.5*gridY))-lw;
|
||||
color("White") cuboid([xw, gridY, lh+VOID]); }
|
||||
}}
|
||||
}
|
||||
|
||||
buildGrid();
|
||||
module buildGrid() {
|
||||
|
||||
layerOne();
|
||||
|
||||
for (c = [0:(hc-1)]) {
|
||||
translate([(0.5*xw)-(0.5*lw), 0, (c*((2*lh)-VOID))]) union() {
|
||||
for (i = [0:(xCount)]) {
|
||||
translate([-(i*(gridX+lw)), 0, lh]) color("Blue") cuboid([lw, yw, lh]);
|
||||
}}
|
||||
|
||||
translate([0, (0.5*yw)-(0.5*lw), (lh)+(c*((2*lh)-VOID))]) union() {
|
||||
for (i = [0:(yCount)]) {
|
||||
translate([0, -(i*(gridY+lw)), lh]) color("Red") cuboid([xw, lw, lh]);
|
||||
}}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user