From 289d6afb3e6f2380734d8521b87903a49bdf0ae6 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Mon, 2 Sep 2024 08:14:30 -0400 Subject: [PATCH] spin direction sign fix --- attachments.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attachments.scad b/attachments.scad index 3dcbc80..fa8350f 100644 --- a/attachments.scad +++ b/attachments.scad @@ -3755,7 +3755,7 @@ function _find_anchor(anchor, geom) = direction= unit(mean([for(face=edgefaces) polygon_normal(select(vnf[0],vnf[1][face]))])), edgedir = edge[1]-edge[0], nz = [for(i=[0:2]) if (!approx(edgedir[i],0)) i], - flip = last(nz) < 0 ? -1 : 1, + flip = edgedir[last(nz)] < 0 ? -1 : 1, spin = _compute_spin(direction, flip*edgedir) ) [direction,spin]