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

@ -180,7 +180,7 @@ function prepareSlices(callback, scale = 1, offset = 0) {
for (let w of slicing) {
totalProgress += (track[w.id] || 0);
}
show.progress(offset + (totalProgress / widgets.length) * scale, msg);
show.progress(offset + (totalProgress / slicing.length) * scale, msg);
}
});
}

View file

@ -155,7 +155,7 @@ class Slice {
findClosestPointTo(target) {
let min, find;
if (this.tops.length) {
if (this.tops && this.tops.length) {
this.tops.forEach(function(top) {
find = top.poly.findClosestPointTo(target);
if (!min || find.distance < min.distance) {