From c859cd67bc527c161aa0883528defef683c39d3f Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Sun, 9 May 2021 16:44:51 -0700 Subject: [PATCH] Improvements for bosl1compat.scad --- bosl1compat.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bosl1compat.scad b/bosl1compat.scad index dba7fd0..fb512b9 100644 --- a/bosl1compat.scad +++ b/bosl1compat.scad @@ -37,15 +37,15 @@ module chamfcube(size=[1,1,1],chamfer=0.25,chamfaxes=[1,1,1],chamfcorners=false) ); } -module trapezoid(size1=[1,1], size2=[1,1], h=1, center=false) - prismoid(size1=size1, size2=size2, h=h, anchor=center?CENTER:BOT); +module trapezoid(size1=[1,1], size2=[1,1], h=1, shift=[0,0], align=CTR, orient=0, center) + prismoid(size1=size1, size2=size2, h=h, shift=shift, spin=orient, anchor=center==undef? -align : center?CENTER:BOT); module pyramid(n=4, h=1, l=1, r, d, circum=false) { radius = get_radius(r=r, d=d, dflt=l/2/sin(180/n)); cyl(r1=radius, r2=0, l=h, circum=circum, $fn=n, realign=true, anchor=BOT); } -module prism(n=3, h=1, l=1, r=undef, d=undef, circum=false, center=false) { +module prism(n=3, h=1, l=1, r, d, circum=false, center=false) { radius = get_radius(r=r, d=d, dflt=l/2/sin(180/n)); cyl(r=radius, l=h, circum=circum, $fn=n, realign=true, anchor=center?CENTER:BOT); } @@ -60,7 +60,7 @@ module chamf_cyl(h=1, r, d, chamfer=0.25, chamfedge, angle=45, center=false, top cyl(h=h, r=r, d=d, chamfer1=(bottom?chamf:0), chamfer2=(top?chamf:0), chamfang=angle, anchor=center?CENTER:BOT); } -module filleted_cylinder(h=1, r=undef, d=undef, r1, r2, d1, d2, fillet=0.25, center=false) +module filleted_cylinder(h=1, r, d, r1, r2, d1, d2, fillet=0.25, center=false) cyl(l=h, r=r, d=d, r1=r1, r2=r2, d1=d1, d2=d2, rounding=fillet, anchor=center?CENTER:BOT); module rcylinder(h=1, r=1, r1, r2, d, d1, d2, fillet=0.25, center=false)