refactor synth support widgets to use same output code path as automatic supports

This commit is contained in:
Stewart Allen 2022-10-13 20:31:44 -04:00
commit 6bbb844aa0
5 changed files with 43 additions and 33 deletions

View file

@ -1167,7 +1167,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
// use next nearest line strategy
if (near)
for (i=0; i<lines.length; i += 2) {
for (let i=0; i<lines.length; i += 2) {
t1 = lines[i];
if (t1.del) {
continue;
@ -1363,7 +1363,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
}
if (next.fill) {
next.fill.forEach(p => { p.z = z });
outputFills(next.fill, {fast: true});
outputFills(next.fill, {fast: true, near: true});
}
} else {
let top = next;
@ -1436,7 +1436,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
});
// produce polishing paths when present
if (slice.tops.length && slice.tops[0].polish) {
if (slice.tops && slice.tops.length && slice.tops[0].polish) {
let {x,y} = slice.tops[0].polish;
if (x) {
outputSparse(x, 0, process.polishSpeed);