mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 21:58:27 +01:00
spin direction sign fix
This commit is contained in:
parent
ef610906b0
commit
289d6afb3e
@ -3755,7 +3755,7 @@ function _find_anchor(anchor, geom) =
|
|||||||
direction= unit(mean([for(face=edgefaces) polygon_normal(select(vnf[0],vnf[1][face]))])),
|
direction= unit(mean([for(face=edgefaces) polygon_normal(select(vnf[0],vnf[1][face]))])),
|
||||||
edgedir = edge[1]-edge[0],
|
edgedir = edge[1]-edge[0],
|
||||||
nz = [for(i=[0:2]) if (!approx(edgedir[i],0)) i],
|
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)
|
spin = _compute_spin(direction, flip*edgedir)
|
||||||
)
|
)
|
||||||
[direction,spin]
|
[direction,spin]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user