diff --git a/attachments.scad b/attachments.scad index fe3cd9bb..82b9066e 100644 --- a/attachments.scad +++ b/attachments.scad @@ -916,7 +916,7 @@ module attach(parent, child, overlap, align, spin=0, norot, inset=0, shiftout=0, anchor_data = _find_anchor(anchor, $parent_geom); anchor_pos = anchor_data[1]; anchor_dir = factor*anchor_data[2]; - anchor_spin = !inside || anchor_data[3]==0 ? anchor_data[3] : 180+anchor_data[3]; + anchor_spin = !inside || anchor==TOP || anchor==BOT ? anchor_data[3] : 180+anchor_data[3]; $anchor=anchor; for(align_ind = idx(align_list)){ align = is_undef(align_list[align_ind]) ? undef diff --git a/shapes3d.scad b/shapes3d.scad index d45589af..f6ee63b4 100644 --- a/shapes3d.scad +++ b/shapes3d.scad @@ -130,6 +130,10 @@ function cube(size=1, center, anchor, spin=0, orient=UP) = // orient = Vector to rotate top towards. See [orient](attachments.scad#subsection-orient). Default: `UP` // Example: Simple regular cube. // cuboid(40); +// Example: Cuboid with a corner at the origin +// cuboid(40, anchor=FRONT+LEFT+BOT); +// Example: Cuboid anchored on its right face +// cuboid(40, anchor=RIGHT); // Example: Cube with minimum cornerpoint given. // cuboid(20, p1=[10,0,0]); // Example: Rectangular cube, with given X, Y, and Z sizes.