update precision to more accurately capture slices touching a belt. fix starting point for that case.

This commit is contained in:
Stewart Allen 2021-04-12 20:45:50 -04:00
commit d2ac6ba9d0
2 changed files with 2 additions and 2 deletions

View file

@ -413,7 +413,7 @@
// output seek to start point between mesh slices if previous data // output seek to start point between mesh slices if previous data
printPoint = print.slicePrintPath( printPoint = print.slicePrintPath(
slice, slice,
slice.belt && slice.belt.touch ? newPoint(-wtb.w, wtb.d * 2, 0) : printPoint.sub(offset), slice.belt && slice.belt.touch ? newPoint(-5000, 0, 0) : printPoint.sub(offset),
offset, offset,
layerout, layerout,
{ {

View file

@ -339,7 +339,7 @@
maxx = Math.max(maxx, poly.bounds.maxx); maxx = Math.max(maxx, poly.bounds.maxx);
} }
} }
if (Math.abs(slice.belt.miny - smin) < 0.001) { if (Math.abs(slice.belt.miny - smin) < 0.01) {
slice.belt.touch = true; slice.belt.touch = true;
if (!start) start = slice; if (!start) start = slice;
} }