add area trace thru for better outline / rough behavior

This commit is contained in:
Stewart Allen 2025-12-14 10:23:35 -05:00
commit d40f19fe50
3 changed files with 5 additions and 2 deletions

View file

@ -222,7 +222,7 @@ class OpArea extends CamOp {
} else } else
if (mode === 'trace') { if (mode === 'trace') {
let { tr_type } = op; let { tr_type } = op;
let zs = down ? base_util.lerp(zTop, zBottom || area.minZ(), down) : [ bounds.min.z ]; let zs = down ? base_util.lerp(zTop, op.thru ? zBottom : area.minZ(), down) : [ bounds.min.z ];
let zroc = 0; let zroc = 0;
let zinc = 1 / zs.length; let zinc = 1 / zs.length;
for (let z of zs) { for (let z of zs) {

View file

@ -49,6 +49,7 @@ class OpOutline extends CamOp {
steps: op.wide ? op.steps + 1 : 1, steps: op.wide ? op.steps + 1 : 1,
surfaces: {}, surfaces: {},
tool, tool,
thru: true,
tr_type: 'outside', tr_type: 'outside',
})); }));
} else { } else {
@ -75,6 +76,7 @@ class OpOutline extends CamOp {
spindle, spindle,
surfaces: {}, surfaces: {},
tool, tool,
thru: true,
tr_type: 'outside', tr_type: 'outside',
})); }));
if (!inside) { if (!inside) {

View file

@ -96,7 +96,8 @@ class OpRough extends CamOp {
ov_botz: op.ov_botz, ov_botz: op.ov_botz,
ov_topz: op.ov_topz, ov_topz: op.ov_topz,
areas: { [widget.id]: areas.map(p => p.toArray()) }, areas: { [widget.id]: areas.map(p => p.toArray()) },
surfaces: {} surfaces: {},
thru: true
})); }));
} }