restore laser slice, preview, export

This commit is contained in:
Stewart Allen 2020-11-08 20:19:50 -05:00
commit 9842a0e43c
5 changed files with 71 additions and 149 deletions

View file

@ -73,10 +73,13 @@
if (options && options.flat) {
return this.addFlats(polys, options);
}
if (options) {
if (options && !options.thin) {
return this.addPaths(polys, options);
}
polys = flat(polys);
if (options && options.thin && options.z !== undefined) {
polys.forEach(p => p.setZ(options.z));
}
this.current.polys.appendAll(polys);
this.stats.line_poly += polys.length;
return this;