add climb / conventional overrides in pocket and trace
This commit is contained in:
parent
38ae2a0f3a
commit
09066f00c0
3 changed files with 20 additions and 14 deletions
|
|
@ -1483,6 +1483,7 @@ CAM.init = function(kiri, api) {
|
|||
select: 'camTraceMode',
|
||||
ov_topz: 'camTraceZTop',
|
||||
ov_botz: 'camTraceZBottom',
|
||||
ov_conv: '~camConventional',
|
||||
}).inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
select: UC.newSelect(LANG.cc_sele_s, {title:LANG.cc_sele_l}, "select"),
|
||||
|
|
@ -1505,6 +1506,7 @@ CAM.init = function(kiri, api) {
|
|||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
ov_topz: UC.newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:UC.toFloat, units:true}),
|
||||
ov_botz: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, units:true}),
|
||||
ov_conv: UC.newBoolean(LANG.ou_conv_s, undefined, {title:LANG.ou_conv_l}),
|
||||
exp_end: UC.endExpand(),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
menu: UC.newRow([ UC.newButton("select", func.traceAdd) ], {class:"ext-buttons f-row"}),
|
||||
|
|
@ -1526,6 +1528,7 @@ CAM.init = function(kiri, api) {
|
|||
outline: 'camPocketOutline',
|
||||
ov_topz: 'camPocketZTop',
|
||||
ov_botz: 'camPocketZBottom',
|
||||
ov_conv: '~camConventional',
|
||||
tolerance: 'camTolerance',
|
||||
}).inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
|
|
@ -1546,11 +1549,12 @@ CAM.init = function(kiri, api) {
|
|||
contour: UC.newBoolean(LANG.cp_cont_s, undefined, {title:LANG.cp_cont_s}),
|
||||
outline: UC.newBoolean(LANG.cp_outl_s, undefined, {title:LANG.cp_outl_l, show:() => !poppedRec.contour}),
|
||||
engrave: UC.newBoolean(LANG.cp_engr_s, undefined, {title:LANG.cp_engr_l, show:() => poppedRec.contour}),
|
||||
exp: UC.newExpand("overrides"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
ov_topz: UC.newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:UC.toFloat, units:true}),
|
||||
ov_botz: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, units:true}),
|
||||
exp_end: UC.endExpand(),
|
||||
exp: UC.newExpand("overrides"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
ov_topz: UC.newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:UC.toFloat, units:true}),
|
||||
ov_botz: UC.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:UC.toFloat, units:true}),
|
||||
ov_conv: UC.newBoolean(LANG.ou_conv_s, undefined, {title:LANG.ou_conv_l}),
|
||||
exp_end: UC.endExpand(),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
menu: UC.newRow([ UC.newButton("select", func.surfaceAdd) ], {class:"ext-buttons f-row"}),
|
||||
};
|
||||
|
|
@ -1704,7 +1708,7 @@ function createPopOp(type, map) {
|
|||
API.util.ui2rec(op.rec, op.inputs);
|
||||
for (let [key, val] of Object.entries(op.rec)) {
|
||||
let saveTo = map[key];
|
||||
if (saveTo) {
|
||||
if (saveTo && !key.startsWith("~")) {
|
||||
current.process[saveTo] = val;
|
||||
}
|
||||
}
|
||||
|
|
@ -1713,8 +1717,8 @@ function createPopOp(type, map) {
|
|||
},
|
||||
new: () => {
|
||||
let rec = { type };
|
||||
for (let [key, val] of Object.entries(map)) {
|
||||
rec[key] = current.process[val];
|
||||
for (let [key, src] of Object.entries(map)) {
|
||||
rec[key] = current.process[src.replace('~','')];
|
||||
}
|
||||
return rec;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -953,7 +953,8 @@ class OpTrace extends CamOp {
|
|||
|
||||
async slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { tool, rate, down, plunge, offset, offover, thru, ov_topz, ov_botz } = op;
|
||||
let { tool, rate, down, plunge, offset, offover, thru } = op;
|
||||
let { ov_topz, ov_botz, ov_conv } = op;
|
||||
let { settings, widget, addSlices, zThru, tabs, workarea } = state;
|
||||
let { updateToolDiams, cutTabs, cutPolys, healPolys, color } = state;
|
||||
let { process, stock } = settings;
|
||||
|
|
@ -975,7 +976,7 @@ class OpTrace extends CamOp {
|
|||
let toolDiam = camTool.fluteDiameter();
|
||||
let toolOver = toolDiam * op.step;
|
||||
let traceOffset = camTool.traceOffset()
|
||||
let cutdir = process.camConventional;
|
||||
let cutdir = ov_conv;
|
||||
let polys = [];
|
||||
let stockRect = stock.center && stock.x && stock.y ?
|
||||
newPolygon().centerRectangle(stock.center, stock.x, stock.y) : undefined;
|
||||
|
|
@ -1198,7 +1199,7 @@ class OpPocket extends CamOp {
|
|||
const debug = false;
|
||||
let { op, state } = this;
|
||||
let { tool, rate, down, plunge, expand, contour, smooth, tolerance } = op;
|
||||
let { ov_topz, ov_botz } = op;
|
||||
let { ov_topz, ov_botz, ov_conv } = op;
|
||||
let { settings, widget, addSlices, zBottom, zThru, tabs, color } = state;
|
||||
let { updateToolDiams, cutTabs, healPolys, shadowAt, workarea } = state;
|
||||
let { process } = settings;
|
||||
|
|
@ -1214,7 +1215,7 @@ class OpPocket extends CamOp {
|
|||
let camTool = new CAM.Tool(settings, tool);
|
||||
let toolDiam = camTool.fluteDiameter();
|
||||
let toolOver = toolDiam * op.step;
|
||||
let cutdir = process.camConventional;
|
||||
let cutdir = ov_conv;
|
||||
let engrave = contour && op.engrave;
|
||||
let zTop = workarea.top_z;
|
||||
if (contour) {
|
||||
|
|
@ -1451,7 +1452,7 @@ class OpPocket extends CamOp {
|
|||
if (min.pocket) {
|
||||
min.pocket.used = true;
|
||||
sliceOutput(min.pocket, {
|
||||
cutdir: process.camConventional,
|
||||
cutdir: op.ov_conv,
|
||||
depthFirst: process.camDepthFirst && !state.isIndexed,
|
||||
easeDown: op.down && process.easeDown ? op.down : 0,
|
||||
progress: (n,m) => progress(n/m, "pocket")
|
||||
|
|
|
|||
|
|
@ -496,8 +496,9 @@ const conf = exports({
|
|||
camTraceSpeed: 250,
|
||||
camTracePlunge: 200,
|
||||
camTraceOffOver: 0,
|
||||
camTraceDogbone: false,
|
||||
camTraceMerge: true,
|
||||
camTraceLines: false,
|
||||
// camTraceBottom: false,
|
||||
camTraceZTop: 0,
|
||||
camTraceZBottom: 0,
|
||||
camPocketSpindle: 1000,
|
||||
|
|
|
|||
Loading…
Reference in a new issue