From e81c942f3e4348a99cff829ae1f3ea4bbed9a372 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Wed, 31 Jul 2019 18:48:26 -0700 Subject: [PATCH] Changed offset in anchoring to special-case CENTER --- attachments.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments.scad b/attachments.scad index d20721c..d1efe14 100644 --- a/attachments.scad +++ b/attachments.scad @@ -153,7 +153,7 @@ function find_anchor(anchor, h, size, size2=undef, shift=[0,0], offset=[0,0,0], ), botpt = point3d(vmul(size/2,xyal))+DOWN*h/2, toppt = point3d(vmul(size2/2,xyal)+shift)+UP*h/2, - offset = vmul(offset,vabs(anchor)), + offset = anchor==CENTER? [0,0,0] : offset, pos = lerp(botpt, toppt, (anchor.z+1)/2) + offset, sidevec = two_d? point3d(xyal) : approx(norm(xyal),0)? [0,0,0] :