fix use of flatness to drop points in cpu contour

This commit is contained in:
Stewart Allen 2025-12-23 10:36:33 -05:00
commit df72bb8996

View file

@ -725,7 +725,7 @@ export class Trace {
const slope = Math.atan2(dz, dl); const slope = Math.atan2(dz, dl);
if (curvesOnly && Math.abs(dz) < flatness) { if (curvesOnly && Math.abs(dz) < flatness) {
end_poly(newP); end_poly(newP);
} else if (lastSlope !== undefined && Math.abs(lastSlope - slope) < 0.001) { } else if (lastSlope !== undefined && Math.abs(lastSlope - slope) < flatness) {
latent = newP; latent = newP;
} else { } else {
if (latent) { if (latent) {