restore indexed output, fix ops weight in slicing progress

This commit is contained in:
Stewart Allen 2025-07-12 18:51:26 -04:00
commit 41ecf2951f
4 changed files with 11 additions and 3 deletions

View file

@ -7,6 +7,10 @@ export class OpIndex extends CamOp {
super(state, op);
}
weight() {
return 0.1;
}
async slice() {
let { op, state } = this;
if (!state.isIndexed) {

View file

@ -20,6 +20,10 @@ class OpShadow extends CamOp {
super(state, op);
}
weight() {
return 0.1;
}
async slice(progress) {
let state = this.state;
let { ops, slicer, widget, unsafe, addSlices, shadowAt } = state;

View file

@ -318,7 +318,7 @@ export function prepEach(widget, settings, print, firstPoint, update) {
p.x + wmx,
p.y + wmy,
p.z + zadd
)
).setA(p.a);
}
/**

View file

@ -267,12 +267,12 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
if (isIndexed) {
if (activeOps.length === 0 || activeOps[0].type !== 'index') {
opList.push(new OPS.index(state, { type: "index", index: 0 }));
opTot++;
opTot += opList.peek().weight();
}
} else {
opList.push(new OPS.shadow(state, { type: "shadow", silent: true }));
opTot++;
opTot += opList.peek().weight();
}
// determing # of steps and step weighting for progress bar