add trace option to ignore part boundaries
This commit is contained in:
parent
bdf3de7b04
commit
8a0d827c2a
7 changed files with 18 additions and 3 deletions
|
|
@ -191,7 +191,12 @@ class OpArea extends CamOp {
|
|||
let outs = [];
|
||||
let clip = [];
|
||||
let firstOff = -(toolDiam / 2 + (op.leave_xy ?? 0));
|
||||
POLY.subtract([ area ], shadow, clip, undefined, undefined, 0);
|
||||
// remove shadow from area
|
||||
if (op.ignore) {
|
||||
clip = [ area ];
|
||||
} else {
|
||||
POLY.subtract([ area ], shadow, clip, undefined, undefined, 0);
|
||||
}
|
||||
POLY.offset(clip, [ firstOff, -toolOver ], {
|
||||
count: op.walls ? 1 : (op.steps ?? 999), outs, flat: true, z: z - zMov, ...offopt
|
||||
});
|
||||
|
|
@ -258,7 +263,7 @@ class OpArea extends CamOp {
|
|||
for (let z of zs) {
|
||||
let slice = newLayer(z);
|
||||
let layers = slice.output();
|
||||
let shadow = await shadowAt(z);
|
||||
let shadow = op.base ? state.shadow.base : await shadowAt(z);
|
||||
let outs = [];
|
||||
if (tr_type === 'none') {
|
||||
// todo: move this out of the zs loop and only setZ when needed
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ class OpOutline extends CamOp {
|
|||
let areas = shadow.base.clone(true);
|
||||
ops_list.push(new OpArea(state, {
|
||||
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
||||
base: true,
|
||||
direction,
|
||||
dogbones,
|
||||
down,
|
||||
drape: true,
|
||||
expand: 0,
|
||||
mode: 'trace',
|
||||
omitinner: omitvoid,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class OpTrace extends CamOp {
|
|||
|
||||
async slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { areas, direction, down, expand, follow, offover, offset, outline, mode, ov_botz, ov_topz } = op;
|
||||
let { areas, direction, down, expand, follow, offover, offset, outline, ignore, mode, ov_botz, ov_topz } = op;
|
||||
let { plunge, rate, refine, smooth, spindle, step, steps, thru, tolerance, tool } = op;
|
||||
let trace = {
|
||||
areas,
|
||||
|
|
@ -21,6 +21,7 @@ class OpTrace extends CamOp {
|
|||
down,
|
||||
expand,
|
||||
follow,
|
||||
ignore,
|
||||
mode: mode === 'clear' ? 'clear' : 'trace',
|
||||
outline,
|
||||
ov_botz,
|
||||
|
|
|
|||
Loading…
Reference in a new issue