mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 17:59:41 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
4161941649
1 changed files with 25 additions and 19 deletions
|
@ -198,7 +198,7 @@ module cuboid(
|
||||||
(corner.x<0? xflip() : ident(4)) *
|
(corner.x<0? xflip() : ident(4)) *
|
||||||
(corner.y<0? yflip() : ident(4)) *
|
(corner.y<0? yflip() : ident(4)) *
|
||||||
(corner.z<0? zflip() : ident(4)) *
|
(corner.z<0? zflip() : ident(4)) *
|
||||||
scale(s+[1,1,1]*0.01) *
|
scale(s+[1,1,1]*0.001) *
|
||||||
move(-[1,1,1]/2)
|
move(-[1,1,1]/2)
|
||||||
) polyhedron(
|
) polyhedron(
|
||||||
[[1,1,1],[1,1,0],[1,0,0],[0,1,1],[0,1,0],[1,0,1],[0,0,1]],
|
[[1,1,1],[1,1,0],[1,0,0],[0,1,1],[0,1,0],[1,0,1],[0,0,1]],
|
||||||
|
@ -241,39 +241,45 @@ module cuboid(
|
||||||
translate(c3) cube(m, center=true);
|
translate(c3) cube(m, center=true);
|
||||||
} else if (cnt == 1) {
|
} else if (cnt == 1) {
|
||||||
if (e.x) {
|
if (e.x) {
|
||||||
mat = (corner.y<0? yflip() : ident(4)) *
|
|
||||||
(corner.z<0? zflip() : ident(4)) *
|
|
||||||
yrot(-90) * move(-[1,1]*0.01);
|
|
||||||
right(c3.x) {
|
right(c3.x) {
|
||||||
intersection() {
|
intersection() {
|
||||||
xtcyl(l=m, r=r);
|
xtcyl(l=m, r=r);
|
||||||
multmatrix(mat)
|
multmatrix(
|
||||||
linear_extrude(height=m+0.1, center=true)
|
(corner.y<0? yflip() : ident(4)) *
|
||||||
polygon([[r,0],[0.99*r,0],[0,0.99*r],[0,r],[r,r]]);
|
(corner.z<0? zflip() : ident(4))
|
||||||
|
) {
|
||||||
|
yrot(-90) linear_extrude(height=m+0.1, center=true) {
|
||||||
|
polygon([[r,0],[0.999*r,0],[0,0.999*r],[0,r],[r,r]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (e.y) {
|
} else if (e.y) {
|
||||||
mat = (corner.x<0? xflip() : ident(4)) *
|
|
||||||
(corner.z<0? zflip() : ident(4)) *
|
|
||||||
xrot(90) * move(-[1,1]*0.01);
|
|
||||||
back(c3.y) {
|
back(c3.y) {
|
||||||
intersection() {
|
intersection() {
|
||||||
ytcyl(l=m, r=r);
|
ytcyl(l=m, r=r);
|
||||||
multmatrix(mat)
|
multmatrix(
|
||||||
linear_extrude(height=m+0.1, center=true)
|
(corner.x<0? xflip() : ident(4)) *
|
||||||
polygon([[r,0],[0.99*r,0],[0,0.99*r],[0,r],[r,r]]);
|
(corner.z<0? zflip() : ident(4))
|
||||||
|
) {
|
||||||
|
xrot(90) linear_extrude(height=m+0.1, center=true) {
|
||||||
|
polygon([[r,0],[0.999*r,0],[0,0.999*r],[0,r],[r,r]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (e.z) {
|
} else if (e.z) {
|
||||||
mat = (corner.x<0? xflip() : ident(4)) *
|
|
||||||
(corner.y<0? yflip() : ident(4)) *
|
|
||||||
move(-[1,1]*0.01);
|
|
||||||
up(c3.z) {
|
up(c3.z) {
|
||||||
intersection() {
|
intersection() {
|
||||||
zcyl(l=m, r=r);
|
zcyl(l=m, r=r);
|
||||||
multmatrix(mat)
|
multmatrix(
|
||||||
linear_extrude(height=m+0.1, center=true)
|
(corner.x<0? xflip() : ident(4)) *
|
||||||
polygon([[r,0],[0.99*r,0],[0,0.99*r],[0,r],[r,r]]);
|
(corner.y<0? yflip() : ident(4))
|
||||||
|
) {
|
||||||
|
linear_extrude(height=m+0.1, center=true) {
|
||||||
|
polygon([[r,0],[0.999*r,0],[0,0.999*r],[0,r],[r,r]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue