Fix orient_and_anchor() orig_anchor argument for named anchors.

This commit is contained in:
Revar Desmera 2019-05-03 16:09:14 -07:00
parent c79e887612
commit 7c32fb2927

View file

@ -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.