fix preview and gcode export for lathe ops

This commit is contained in:
Stewart Allen 2023-02-11 11:10:20 -05:00
commit 55ea6825eb
4 changed files with 15 additions and 23 deletions

View file

@ -165,12 +165,12 @@ CAM.slice = async function(settings, widget, onupdate, ondone) {
addPolyIndexing(poly.inner, a);
}
function addSlices(slices) {
function addSlices(slices, addIndexing = isIndexed) {
if (!Array.isArray(slices)) {
slices = [ slices ];
}
sliceAll.appendAll(slices);
if (isIndexed && axisIndex !== undefined) {
if (addIndexing && axisIndex !== undefined) {
// update slice cam lines to add axis indexing
for (let slice of slices.filter(s => s.camLines)) {
addPolyIndexing(slice.camLines, -axisIndex);