fix bug caused by clockwise helixes with same start/end

This commit is contained in:
bakedpotatolord 2025-07-19 16:16:56 -06:00
commit 0beeb78ace

View file

@ -575,7 +575,7 @@ export function arcToPath(start, end, arcdivs = 24, opts) {
let samePoint = Math.abs(ad) < 0.001
let ofFull = Math.abs(ad)/(2*Math.PI);
let steps = samePoint? arcdivs : Math.max(Math.floor( arcdivs * ofFull),4);
let step = (samePoint? (Math.PI*2) : ad) / steps;
let step = (samePoint? (Math.PI*2)*(clockwise? -1 : 1) : ad) / steps;
let zStart = start.z;
let zStep = -dz / steps;
let rot = a1;