fix reflected indices, rotation before re-shadow

This commit is contained in:
Stewart Allen 2022-11-03 17:26:45 -04:00
commit 7e3c950944
2 changed files with 3 additions and 2 deletions

View file

@ -229,6 +229,7 @@ CAM.slice = function(settings, widget, onupdate, ondone) {
op.slice((progress, message) => {
onupdate((opSum + (progress * weight)) / opTot, message || op.type());
});
tracker.rotation = isIndexed ? axisRotation : 0;
// setup new state when indexing the workspace
if (true && op.op.type === "index") {
let points = base.verticesToPoints(widget.getGeoVertices(true, true));
@ -241,7 +242,6 @@ CAM.slice = function(settings, widget, onupdate, ondone) {
// console.log('reshadow', progress.round(3));
});
}
tracker.rotation = isIndexed ? axisRotation : 0;
camOps.push(op);
opSum += weight;
}

View file

@ -394,7 +394,8 @@ class Slicer {
}
// filter duplicate values
array = array.map(v => v.round(5)).filter((e,i,a) => i < 1 || a[i-1] !== a[i]);
return array.map(v => Math.abs(parseFloat(v.toFixed(5))));
// return array.map(v => Math.abs(parseFloat(v.toFixed(5))));
return array.map(v => parseFloat(v.toFixed(5)));
}
}