mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-04 17:47:31 +02:00
Tweak to rounded_prismoid() to use new square() with rounding.
This commit is contained in:
@@ -410,6 +410,7 @@ module prismoid(
|
|||||||
module rounded_prismoid(
|
module rounded_prismoid(
|
||||||
size1, size2, h, shift=[0,0],
|
size1, size2, h, shift=[0,0],
|
||||||
r=undef, r1=undef, r2=undef,
|
r=undef, r1=undef, r2=undef,
|
||||||
|
edges=EDGES_ALL,
|
||||||
anchor=BOTTOM, spin=0, orient=UP
|
anchor=BOTTOM, spin=0, orient=UP
|
||||||
) {
|
) {
|
||||||
eps = 0.001;
|
eps = 0.001;
|
||||||
@@ -422,16 +423,12 @@ module rounded_prismoid(
|
|||||||
down(h/2) {
|
down(h/2) {
|
||||||
hull() {
|
hull() {
|
||||||
linear_extrude(height=eps, center=false, convexity=2) {
|
linear_extrude(height=eps, center=false, convexity=2) {
|
||||||
offset(r=rr1) {
|
square([max(eps, size1[0]-2*rr1), max(eps, size1[1]-2*rr1)], rounding=rr1, center=true);
|
||||||
square([max(eps, size1[0]-2*rr1), max(eps, size1[1]-2*rr1)], center=true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
up(h-0.01) {
|
up(h-0.01) {
|
||||||
translate(shiftby) {
|
translate(shiftby) {
|
||||||
linear_extrude(height=eps, center=false, convexity=2) {
|
linear_extrude(height=eps, center=false, convexity=2) {
|
||||||
offset(r=rr2) {
|
square([max(eps, size2[0]-2*rr2), max(eps, size2[1]-2*rr2)], rounding=rr2, center=true);
|
||||||
square([max(eps, size2[0]-2*rr2), max(eps, size2[1]-2*rr2)], center=true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,101];
|
BOSL_VERSION = [2,0,102];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Reference in New Issue
Block a user