add slice layer naming using op notes. fixes #447

This commit is contained in:
Stewart Allen 2025-11-13 22:25:06 -05:00
commit 04da5abccb
6 changed files with 11 additions and 8 deletions

View file

@ -310,8 +310,11 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
workover.bottom_z = isIndexed ? valz.ov_botz : bottom_stock + valz.ov_botz;
workover.bottom_cut = Math.max(workover.bottom_z, -zThru);
}
// state.workarea = workover;
let { note, type } = op.op;
let named = note ? note.split(' ').filter(v => v.charAt(0) === '#') : [];
let layername = named.length ? named : (note ? `${type} (${note})` : type);
Object.assign(state, {
layername,
zBottom,
zThru,
ztOff,