add trace 'offset z' option
This commit is contained in:
parent
181224b59e
commit
7aefc51e1f
5 changed files with 9 additions and 2 deletions
|
|
@ -256,10 +256,11 @@ class OpArea extends CamOp {
|
|||
progress(proc, 'clear');
|
||||
} else
|
||||
if (mode === 'trace') {
|
||||
let { tr_over, tr_type } = op;
|
||||
let { tr_over, tr_offz, tr_type } = op;
|
||||
let zs = down ? base_util.lerp(zTop, op.thru ? zBottom : Math.max(zBottom, area.minZ()), down) : [ bounds.min.z ];
|
||||
let zroc = 0;
|
||||
let zinc = 1 / zs.length;
|
||||
if (tr_offz) zs = zs.map(z => z - tr_offz);
|
||||
for (let z of zs) {
|
||||
let slice = newLayer(z);
|
||||
let layers = slice.output();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class OpTrace extends CamOp {
|
|||
|
||||
async slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { areas, direction, down, expand, follow, offover, offset, outline, ignore, mode, ov_botz, ov_topz } = op;
|
||||
let { areas, direction, down, expand, follow, offover, offset, offz, outline, ignore, mode, ov_botz, ov_topz } = op;
|
||||
let { plunge, rate, refine, smooth, spindle, step, steps, thru, tolerance, tool } = op;
|
||||
let trace = {
|
||||
areas,
|
||||
|
|
@ -40,6 +40,7 @@ class OpTrace extends CamOp {
|
|||
tool,
|
||||
thru,
|
||||
tr_over: offover,
|
||||
tr_offz: offz,
|
||||
tr_type: offset
|
||||
};
|
||||
this.op_trace = new OpArea(state, trace);
|
||||
|
|
|
|||
Loading…
Reference in a new issue