diff --git a/attachments.scad b/attachments.scad index 5493727..6b1f163 100644 --- a/attachments.scad +++ b/attachments.scad @@ -275,8 +275,8 @@ module orient_and_anchor( hidden = any([for (tag=tags) in_list(tag, h_tags)]); if ($attach_to != undef) { anch = find_anchor($attach_to, size.z, size, size2=size2, shift=shift, offset=offset, anchors=anchors, geometry=geometry, two_d=two_d); - ang = vector_angle(anch[2], DOWN); - axis = vector_axis(anch[2], DOWN); + ang = vector_angle(anch[2], two_d? BACK : DOWN); + axis = two_d? UP : vector_axis(anch[2], DOWN); ang2 = (anch[2]==UP || anch[2]==DOWN)? 0 : 180-anch[3]; axis2 = rotate_points3d([axis],[0,0,ang2])[0]; $attach_to = undef; diff --git a/primitives.scad b/primitives.scad index f25d103..0577d37 100644 --- a/primitives.scad +++ b/primitives.scad @@ -136,7 +136,7 @@ function circle(r, d, realign=false, circum=false, anchor=CENTER, spin=0) = -// Section: Primitive Shapes +// Section: Primitive 3D Shapes // Module: cube() diff --git a/shapes2d.scad b/shapes2d.scad index d9f0838..3942752 100644 --- a/shapes2d.scad +++ b/shapes2d.scad @@ -781,8 +781,12 @@ function trapezoid(h, w1, w2, anchor=CENTER, spin=0) = -module trapezoid(h, w1, w2, anchor=CENTER, spin=0) - polygon(trapezoid(h=h, w1=w1, w2=w2, anchor=anchor, spin=spin)); +module trapezoid(h, w1, w2, anchor=CENTER, spin=0) { + orient_and_anchor([w1,h,0], size2=[w2,h], UP, anchor, spin=spin, two_d=true, chain=true) { + polygon(trapezoid(h=h, w1=w1, w2=w2)); + children(); + } +} // Function&Module: teardrop2d() diff --git a/version.scad b/version.scad index 16675dc..ffadd36 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,86]; +BOSL_VERSION = [2,0,87]; // Section: BOSL Library Version Functions