From b054edb5fb7d98342de415a512c340e770704be6 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Sun, 27 Dec 2020 21:55:36 -0800 Subject: [PATCH] Fix for anchors in trapezoid() when using shift=. --- shapes2d.scad | 6 +++--- version.scad | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shapes2d.scad b/shapes2d.scad index b9750da..4fec9a3 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -1250,7 +1250,7 @@ module trapezoid(h, w1, w2, angle, shift=0, anchor=CENTER, spin=0) { w2 = !is_undef(w2)? w2 : w1 - 2*(adj_ang_to_opp(h, angle) + shift); assert(w1>=0 && w2>=0 && h>0, "Degenerate trapezoid geometry."); path = [[w1/2,-h/2], [-w1/2,-h/2], [-w2/2+shift,h/2], [w2/2+shift,h/2]]; - attachable(anchor,spin, two_d=true, size=[w1,h], size2=w2) { + attachable(anchor,spin, two_d=true, size=[w1,h], size2=w2, shift=shift) { polygon(path); children(); } @@ -1325,8 +1325,8 @@ function teardrop2d(r, d, ang=45, cap_h, anchor=CENTER, spin=0) = // Arguments: // r = The radius of the end circles. // d = The diameter of the end circles. -// spread = The distance between the centers of the end circles. -// tangent = The angle in degrees of the tangent point for the joining arcs, measured away from the Y axis. +// spread = The distance between the centers of the end circles. Default: 10 +// tangent = The angle in degrees of the tangent point for the joining arcs, measured away from the Y axis. Default: 30 // anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#anchor). Default: `CENTER` // spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#spin). Default: `0` // Examples(2D): diff --git a/version.scad b/version.scad index ca80f65..15bdab9 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,485]; +BOSL_VERSION = [2,0,486]; // Section: BOSL Library Version Functions