reduce memory consumption by deferring clipper point conversion and point keys until time of use

This commit is contained in:
Stewart Allen 2021-06-18 16:56:41 -04:00
commit e44ea73683
4 changed files with 72 additions and 70 deletions

View file

@ -803,7 +803,7 @@
if (isNaN(x)) {
solids.push(x);
} else {
line.push(newPoint(x,y,slice.z));
line.push(newPoint(x, y, slice.z));
slice.isSparseFill = true;
}
},
@ -904,6 +904,7 @@
return;
}
lines = lines.map(a => a.map(p => p.toClipper()));
clip.AddPaths(lines, ptyp.ptSubject, false);
clip.AddPaths(POLY.toClipper(polys), ptyp.ptClip, true);