add cut thru option to trace
This commit is contained in:
parent
6b85e44b67
commit
d9e5f2d4f8
5 changed files with 9 additions and 3 deletions
|
|
@ -1301,6 +1301,7 @@ CAM.init = function(kiri, api) {
|
|||
tool: 'camTraceTool',
|
||||
step: 'camTraceOver',
|
||||
down: 'camTraceDown',
|
||||
thru: 'camTraceThru',
|
||||
rate: 'camTraceSpeed',
|
||||
plunge: 'camTracePlunge',
|
||||
bottom: 'camTraceBottom',
|
||||
|
|
@ -1314,6 +1315,7 @@ CAM.init = function(kiri, api) {
|
|||
spindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, show:hasSpindle}),
|
||||
step: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0), show:(op) => popOp.trace.rec.mode === "clear"}),
|
||||
down: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, units:true}),
|
||||
thru: UC.newInput(LANG.cc_thru_s, {title:LANG.cc_thru_l, convert:UC.toFloat, units:true}),
|
||||
rate: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
|
||||
plunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, units:true}),
|
||||
sep: UC.newBlank({class:"pop-sep", modes:MCAM, show:zBottom, poop:true }),
|
||||
|
|
|
|||
|
|
@ -818,7 +818,7 @@ class OpTrace extends CamOp {
|
|||
|
||||
slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { tool, rate, down, plunge, offset } = op;
|
||||
let { tool, rate, down, plunge, offset, thru } = op;
|
||||
let { settings, widget, addSlices, zMax, zTop, zThru, tabs } = state;
|
||||
let { updateToolDiams, cutTabs, cutPolys, healPolys, color } = state;
|
||||
let { process, stock } = settings;
|
||||
|
|
@ -973,7 +973,7 @@ class OpTrace extends CamOp {
|
|||
}
|
||||
for (let pi of poly)
|
||||
if (down) {
|
||||
let zto = pi.getZ();
|
||||
let zto = pi.getZ() - thru;
|
||||
if (zThru && similar(zto,0)) {
|
||||
zto -= zThru;
|
||||
}
|
||||
|
|
@ -989,7 +989,7 @@ class OpTrace extends CamOp {
|
|||
const zbo = widget.track.top - widget.track.box.d;
|
||||
let zmap = {};
|
||||
for (let poly of polys) {
|
||||
let z = poly.getZ();
|
||||
let z = poly.getZ() - thru;
|
||||
if (op.bottom && camZBottom) {
|
||||
z = Math.max(z, camZBottom) - zbo;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue