curves-only fix to handle small epsilon in flat face vertices

This commit is contained in:
Stewart Allen 2021-04-26 09:19:38 -04:00
commit 904c600552
3 changed files with 6 additions and 6 deletions

View file

@ -140,7 +140,7 @@
function push_point(x,y,z) {
const newP = newPoint(x,y,z);
// todo: merge co-linear, not just co-planar
if (lastP && lastP.z === z) {
if (lastP && Math.abs(lastP.z - z) < 0.005) {
if (curvesOnly) {
end_poly();
} else {