From 7c32fb292771106a4b4a9c1fa12cfbf74cb7b2e9 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Fri, 3 May 2019 16:09:14 -0700 Subject: [PATCH] Fix orient_and_anchor() orig_anchor argument for named anchors. --- attachments.scad | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/attachments.scad b/attachments.scad index 610d733..aa55da2 100644 --- a/attachments.scad +++ b/attachments.scad @@ -153,7 +153,8 @@ module orient_and_anchor( m = matrix4_mult(concat( (orig_anchor==CENTER)? [] : [ // If original anchor is not centered, center it. - matrix4_translate(vmul(size/2, -orig_anchor)) + let(anch = find_anchor(orig_anchor, size.z, size, size2=size2, shift=shift, geometry=geometry, two_d=two_d)) + matrix4_translate(anch[1]) ], (orig_orient==ORIENT_Z)? [] : [ // If original orientation is not upright, rotate it upright.