more belt tweaks

This commit is contained in:
Stewart Allen 2021-01-08 14:42:01 -05:00
commit 9a94a87aef
4 changed files with 41 additions and 17 deletions

View file

@ -398,6 +398,24 @@
print.output = output;
// if belt, adjust z and y to baselines
if (false && isBelt) {
let miny = Infinity, minz = Infinity;
for (let layer of output) {
for (let rec of layer) {
miny = Math.min(miny, rec.point.y);
minz = Math.min(minz, rec.point.y);
}
}
console.log({miny, minz});
for (let layer of output) {
for (let rec of layer) {
// rec.point.y -= minz;
// rec.point.z -= miny;
}
}
}
// render if not explicitly disabled
if (render) {
print.render = FDM.prepareRender(output, (progress, layer) => {