checkpoint cam-op-pop editing
This commit is contained in:
parent
bcae84cb30
commit
fd3eb613aa
7 changed files with 311 additions and 219 deletions
192
src/kiri/init.js
192
src/kiri/init.js
|
|
@ -1637,102 +1637,102 @@
|
|||
(UI.ssmClr = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
|
||||
], {modes:FDM, class:"ext-buttons f-row"}),
|
||||
|
||||
camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, class:"rough"}),
|
||||
camRoughTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camRoughSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camRoughDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camRoughOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0), modes:CAM}),
|
||||
camRoughSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camRoughPlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camRoughStock: UC.newInput(LANG.cr_lsto_s, {title:LANG.cr_lsto_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camRoughVoid: UC.newBoolean(LANG.cr_clrp_s, onBooleanClick, {title:LANG.cr_clrp_l, modes:CAM}),
|
||||
camRoughFlat: UC.newBoolean(LANG.cr_clrf_s, onBooleanClick, {title:LANG.cr_clrf_l, modes:CAM}),
|
||||
camRoughTop: UC.newBoolean(LANG.cr_clrt_s, onBooleanClick, {title:LANG.cr_clrt_l, modes:CAM}),
|
||||
camRoughIn: UC.newBoolean(LANG.cr_olin_s, onBooleanClick, {title:LANG.cr_olin_l, modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camRoughAdd: UC.newRow([
|
||||
UI.crAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
|
||||
camOutline: UC.newGroup(LANG.co_menu, null, {modes:CAM, class:"outline"}),
|
||||
camOutlineTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camOutlineSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camOutlineOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, modes:CAM, bound:UC.bound(0.01,1.0), units:true, show:() => { return UI.camOutlineWide.checked }}),
|
||||
camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camOutlineDogbone: UC.newBoolean(LANG.co_dogb_s, onBooleanClick, {title:LANG.co_dogb_l, modes:CAM, show:() => { return !UI.camOutlineWide.checked }}),
|
||||
camOutlineIn: UC.newBoolean(LANG.co_olin_s, onBooleanClick, {title:LANG.co_olin_l, modes:CAM, show:() => { return !UI.camOutlineOut.checked }}),
|
||||
camOutlineOut: UC.newBoolean(LANG.co_olot_s, onBooleanClick, {title:LANG.co_olot_l, modes:CAM, show:() => { return !UI.camOutlineIn.checked }}),
|
||||
camOutlineWide: UC.newBoolean(LANG.co_wide_s, onBooleanClick, {title:LANG.co_wide_l, modes:CAM, show:() => { return !UI.camOutlineIn.checked }}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camOutlineAdd: UC.newRow([
|
||||
UI.coAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
|
||||
camContour: UC.newGroup(LANG.cn_menu, null, {modes:CAM}),
|
||||
camContourTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camContourSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camContourOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0), modes:CAM}),
|
||||
camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
camContourAngle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
||||
camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), modes:CAM, units:true}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camContourCurves: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
||||
camContourIn: UC.newBoolean(LANG.cf_olin_s, onBooleanClick, {title:LANG.cf_olin_l, modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camOutlineAdd: UC.newRow([
|
||||
UI.ccxAdd = UC.newButton('add x', onButtonClick, {class: "f-col grow a-center"}),
|
||||
UI.ccyAdd = UC.newButton('add y', onButtonClick, {class: "f-col grow a-center"})
|
||||
], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
|
||||
camTracing: UC.newGroup(LANG.cu_menu, null, {modes:CAM}),
|
||||
camTraceTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camTraceType: UC.newSelect(LANG.cu_type_s, {title:LANG.cu_type_l, modes:CAM}, "trace"),
|
||||
camTraceSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||
camTracePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camTraceSelect: UC.newRow([
|
||||
(UI.traceAdd = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
|
||||
(UI.traceDun = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})),
|
||||
(UI.traceClr = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
|
||||
], {modes:CAM, class:"ext-buttons f-row"}),
|
||||
|
||||
camDrill: UC.newGroup(LANG.cd_menu, null, {modes:CAM}),
|
||||
camDrillTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camDrillSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
camDrillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camDrillDownSpeed: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camDrillDwell: UC.newInput(LANG.cd_dwll_s, {title:LANG.cd_dwll_l, convert:UC.toFloat, modes:CAM}),
|
||||
camDrillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camDrillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||
camDrillAdd: UC.newRow([
|
||||
UI.drAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camSep: UC.newBlank({class:"pop-sep"}),
|
||||
camDrillAdd: UC.newRow([
|
||||
UC.newLabel('registrations', {class: "f-col grow center"})
|
||||
], { modes: CAM, class: "ext-buttons f-row" }),
|
||||
// camDrillReg: UC.newSelect(LANG.cd_regi_s, {modes:CAM, title:LANG.cd_regi_l}, "drillreg"),
|
||||
camDrillAdd: UC.newRow([
|
||||
UI.drX2Add = UC.newButton('x axis 2', onButtonClick, {class: "f-col grow a-center"}),
|
||||
UI.drX3Add = UC.newButton('x axis 3', onButtonClick, {class: "f-col grow a-center"}),
|
||||
], { modes: CAM, xclass: "ext-buttons f-row grow" }),
|
||||
camDrillAdd: UC.newRow([
|
||||
UI.drY2Add = UC.newButton('y axis 2', onButtonClick, {class: "f-col grow a-center"}),
|
||||
UI.drY3Add = UC.newButton('y axis 3', onButtonClick, {class: "f-col grow a-center"}),
|
||||
], { modes: CAM, xclass: "ext-buttons f-row grow" }),
|
||||
|
||||
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
||||
// camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, class:"rough"}),
|
||||
// camRoughTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camRoughSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
// camRoughDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camRoughOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0), modes:CAM}),
|
||||
// camRoughSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
// camRoughPlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
// camRoughStock: UC.newInput(LANG.cr_lsto_s, {title:LANG.cr_lsto_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camRoughVoid: UC.newBoolean(LANG.cr_clrp_s, onBooleanClick, {title:LANG.cr_clrp_l, modes:CAM}),
|
||||
// camRoughFlat: UC.newBoolean(LANG.cr_clrf_s, onBooleanClick, {title:LANG.cr_clrf_l, modes:CAM}),
|
||||
// camRoughTop: UC.newBoolean(LANG.cr_clrt_s, onBooleanClick, {title:LANG.cr_clrt_l, modes:CAM}),
|
||||
// camRoughIn: UC.newBoolean(LANG.cr_olin_s, onBooleanClick, {title:LANG.cr_olin_l, modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camRoughAdd: UC.newRow([
|
||||
// UI.crAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
// ], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
//
|
||||
// camOutline: UC.newGroup(LANG.co_menu, null, {modes:CAM, class:"outline"}),
|
||||
// camOutlineTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camOutlineSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
// camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camOutlineOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, modes:CAM, bound:UC.bound(0.01,1.0), units:true, show:() => { return UI.camOutlineWide.checked }}),
|
||||
// camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
// camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camOutlineDogbone: UC.newBoolean(LANG.co_dogb_s, onBooleanClick, {title:LANG.co_dogb_l, modes:CAM, show:() => { return !UI.camOutlineWide.checked }}),
|
||||
// camOutlineIn: UC.newBoolean(LANG.co_olin_s, onBooleanClick, {title:LANG.co_olin_l, modes:CAM, show:() => { return !UI.camOutlineOut.checked }}),
|
||||
// camOutlineOut: UC.newBoolean(LANG.co_olot_s, onBooleanClick, {title:LANG.co_olot_l, modes:CAM, show:() => { return !UI.camOutlineIn.checked }}),
|
||||
// camOutlineWide: UC.newBoolean(LANG.co_wide_s, onBooleanClick, {title:LANG.co_wide_l, modes:CAM, show:() => { return !UI.camOutlineIn.checked }}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camOutlineAdd: UC.newRow([
|
||||
// UI.coAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
// ], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
//
|
||||
// camContour: UC.newGroup(LANG.cn_menu, null, {modes:CAM}),
|
||||
// camContourTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camContourSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
// camContourOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.01,1.0), modes:CAM}),
|
||||
// camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM, units:true}),
|
||||
// camContourAngle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
||||
// camTolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), modes:CAM, units:true}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camContourCurves: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
||||
// camContourIn: UC.newBoolean(LANG.cf_olin_s, onBooleanClick, {title:LANG.cf_olin_l, modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camOutlineAdd: UC.newRow([
|
||||
// UI.ccxAdd = UC.newButton('add x', onButtonClick, {class: "f-col grow a-center"}),
|
||||
// UI.ccyAdd = UC.newButton('add y', onButtonClick, {class: "f-col grow a-center"})
|
||||
// ], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
//
|
||||
// camTracing: UC.newGroup(LANG.cu_menu, null, {modes:CAM}),
|
||||
// camTraceTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camTraceType: UC.newSelect(LANG.cu_type_s, {title:LANG.cu_type_l, modes:CAM}, "trace"),
|
||||
// camTraceSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||
// camTracePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camTraceSelect: UC.newRow([
|
||||
// (UI.traceAdd = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
|
||||
// (UI.traceDun = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})),
|
||||
// (UI.traceClr = UC.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
|
||||
// ], {modes:CAM, class:"ext-buttons f-row"}),
|
||||
//
|
||||
// camDrill: UC.newGroup(LANG.cd_menu, null, {modes:CAM}),
|
||||
// camDrillTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camDrillSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||
// camDrillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camDrillDownSpeed: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camDrillDwell: UC.newInput(LANG.cd_dwll_s, {title:LANG.cd_dwll_l, convert:UC.toFloat, modes:CAM}),
|
||||
// camDrillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM, units:true}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// // camDrillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||
// camDrillAdd: UC.newRow([
|
||||
// UI.drAdd = UC.newButton('add', onButtonClick, {class: "f-col grow a-center"})
|
||||
// ], { modes: CAM, class: "ext-buttons f-row grow" }),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camSep: UC.newBlank({class:"pop-sep"}),
|
||||
// camDrillAdd: UC.newRow([
|
||||
// UC.newLabel('registrations', {class: "f-col grow center"})
|
||||
// ], { modes: CAM, class: "ext-buttons f-row" }),
|
||||
// // camDrillReg: UC.newSelect(LANG.cd_regi_s, {modes:CAM, title:LANG.cd_regi_l}, "drillreg"),
|
||||
// camDrillAdd: UC.newRow([
|
||||
// UI.drX2Add = UC.newButton('x axis 2', onButtonClick, {class: "f-col grow a-center"}),
|
||||
// UI.drX3Add = UC.newButton('x axis 3', onButtonClick, {class: "f-col grow a-center"}),
|
||||
// ], { modes: CAM, xclass: "ext-buttons f-row grow" }),
|
||||
// camDrillAdd: UC.newRow([
|
||||
// UI.drY2Add = UC.newButton('y axis 2', onButtonClick, {class: "f-col grow a-center"}),
|
||||
// UI.drY3Add = UC.newButton('y axis 3', onButtonClick, {class: "f-col grow a-center"}),
|
||||
// ], { modes: CAM, xclass: "ext-buttons f-row grow" }),
|
||||
//
|
||||
// camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
||||
|
||||
camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM, marker:true}),
|
||||
camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.005,100), modes:CAM, units:true}),
|
||||
|
|
|
|||
|
|
@ -157,13 +157,6 @@
|
|||
{ name: "4", id: 4 },
|
||||
{ name: "8", id: 8 }
|
||||
],
|
||||
// drillreg: [
|
||||
// { name: "none" },
|
||||
// { name: "x axis" },
|
||||
// { name: "y axis" },
|
||||
// { name: "x axis 3" },
|
||||
// { name: "y axis 3" }
|
||||
// ],
|
||||
detail: [
|
||||
{ name: "best" },
|
||||
{ name: "good" },
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
current,
|
||||
API, FDM, SPACE, STACKS, MODES, VIEWS, UI, UC, LANG;
|
||||
|
||||
let traceOp = { type: "trace" },
|
||||
let traceOp = { type: "trace", mode:"follow", tool: 1000, rate: 1000, plunge: 200 },
|
||||
zaxis = { x: 0, y: 0, z: 1 },
|
||||
popOp = {},
|
||||
func = {};
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
UI.label.export.innerText = 'export';
|
||||
} else {
|
||||
UI.label.slice.innerText = 'start';
|
||||
checkOutlineSettings(api.conf.get());
|
||||
// checkOutlineSettings(api.conf.get());
|
||||
}
|
||||
// do not persist traces across page reloads
|
||||
func.traceClear();
|
||||
|
|
@ -81,15 +81,15 @@
|
|||
func.opRender();
|
||||
});
|
||||
|
||||
function checkOutlineSettings(settings) {
|
||||
let ui = api.ui, proc = settings.process;
|
||||
// fix invalid in/out enabled condition
|
||||
if (ui.camOutlineIn.checked && ui.camOutlineOut.checked) {
|
||||
proc.camOutlineIn = proc.camOutlineOut = false;
|
||||
ui.camOutlineIn.checked = ui.camOutlineOut.checked = false;
|
||||
api.uc.refresh();
|
||||
}
|
||||
}
|
||||
// function checkOutlineSettings(settings) {
|
||||
// let ui = api.ui, proc = settings.process;
|
||||
// // fix invalid in/out enabled condition
|
||||
// if (ui.camOutlineIn.checked && ui.camOutlineOut.checked) {
|
||||
// proc.camOutlineIn = proc.camOutlineOut = false;
|
||||
// ui.camOutlineIn.checked = ui.camOutlineOut.checked = false;
|
||||
// api.uc.refresh();
|
||||
// }
|
||||
// }
|
||||
|
||||
api.event.on("settings.saved", (settings) => {
|
||||
current = settings;
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
if (wannot.tab && wannot.tab.length) hasTabs = true;
|
||||
if (wannot.trace && wannot.trace.length) hasTraces = true;
|
||||
});
|
||||
checkOutlineSettings(settings);
|
||||
// checkOutlineSettings(settings);
|
||||
// show/hide dots in enabled process pop buttons
|
||||
api.ui.camTabs.marker.style.display = hasTabs ? 'flex' : 'none';
|
||||
api.ui.camStock.marker.style.display = proc.camStockOn ? 'flex' : 'none';
|
||||
|
|
@ -154,11 +154,123 @@
|
|||
}
|
||||
});
|
||||
|
||||
// TAB/TRACE BUTTON HANDLERS
|
||||
api.event.on("button.click", target => {
|
||||
$('op-add').onmouseenter = () => {
|
||||
if (func.unpop) func.unpop();
|
||||
};
|
||||
|
||||
$('op-add-list').onclick = (ev) => {
|
||||
let settings = API.conf.get();
|
||||
let { process, device } = settings;
|
||||
let drill;
|
||||
switch (ev.target.innerText) {
|
||||
case "rough":
|
||||
func.opAddRough();
|
||||
break;
|
||||
case "outline":
|
||||
func.opAddOutline();
|
||||
break;
|
||||
case "contour x":
|
||||
func.opAddContour('x');
|
||||
break;
|
||||
case "contour y":
|
||||
func.opAddContour('y');
|
||||
break;
|
||||
case "register x":
|
||||
func.opAddRegister('X', 2);
|
||||
break;
|
||||
case "register y":
|
||||
func.opAddRegister('Y', 2);
|
||||
break;
|
||||
case "drill":
|
||||
func.opAddDrill();
|
||||
break;
|
||||
case "trace":
|
||||
func.opAdd(traceOp);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
func.opAddRough = () => {
|
||||
let process = API.conf.get().process;
|
||||
func.opAdd({
|
||||
type: "rough",
|
||||
tool: process.camRoughTool,
|
||||
spindle: process.camRoughSpindle,
|
||||
step: process.camRoughOver,
|
||||
down: process.camRoughDown,
|
||||
rate: process.camRoughSpeed,
|
||||
plunge: process.camRoughPlunge,
|
||||
leave: process.camRoughStock,
|
||||
voids: process.camRoughVoid,
|
||||
flats: process.camRoughFlat,
|
||||
inside: process.camRoughIn,
|
||||
top: process.camRoughTop
|
||||
});
|
||||
};
|
||||
|
||||
func.opAddOutline = () => {
|
||||
let process = API.conf.get().process;
|
||||
func.opAdd({
|
||||
type: "outline",
|
||||
tool: process.camOutlineTool,
|
||||
spindle: process.camOutlineSpindle,
|
||||
step: process.camOutlineOver,
|
||||
down: process.camOutlineDown,
|
||||
rate: process.camOutlineSpeed,
|
||||
plunge: process.camOutlinePlunge,
|
||||
dogbones: process.camOutlineDogbone,
|
||||
outside: process.camOutlineOut,
|
||||
inside: process.camOutlineIn,
|
||||
wide: process.camOutlineWide
|
||||
});
|
||||
};
|
||||
|
||||
func.opAddContour = (axis) => {
|
||||
let process = API.conf.get().process;
|
||||
func.opAdd({
|
||||
type: "contour",
|
||||
tool: process.camContourTool,
|
||||
spindle: process.camContourSpindle,
|
||||
step: process.camContourOver,
|
||||
rate: process.camContourSpeed,
|
||||
angle: process.camContourAngle,
|
||||
tolerance: process.camTolerance,
|
||||
curves: process.camContourCurves,
|
||||
inside: process.camContourIn,
|
||||
axis: axis.toUpperCase()
|
||||
});
|
||||
};
|
||||
|
||||
func.opAddDrill = () => {
|
||||
let process = API.conf.get().process;
|
||||
func.opAdd({
|
||||
type: "drill",
|
||||
tool: process.camDrillTool,
|
||||
spindle: process.camDrillSpindle,
|
||||
down: process.camDrillDown,
|
||||
rate: process.camDrillDownSpeed,
|
||||
dwell: process.camDrillDwell,
|
||||
lift: process.camDrillLift
|
||||
});
|
||||
};
|
||||
|
||||
func.opAddRegister = (axis, points) => {
|
||||
let process = API.conf.get().process;
|
||||
func.opAdd({
|
||||
type: "register",
|
||||
tool: process.camDrillTool,
|
||||
spindle: process.camDrillSpindle,
|
||||
down: process.camDrillDown,
|
||||
rate: process.camDrillDownSpeed,
|
||||
dwell: process.camDrillDwell,
|
||||
lift: process.camDrillLift,
|
||||
points: points,
|
||||
axis: axis.toUpperCase()
|
||||
});
|
||||
};
|
||||
|
||||
// TAB/TRACE BUTTON HANDLERS
|
||||
api.event.on("button.click", target => {
|
||||
let process = API.conf.get().process;
|
||||
switch (target) {
|
||||
case api.ui.tabAdd:
|
||||
return func.tabAdd();
|
||||
|
|
@ -170,108 +282,45 @@
|
|||
});
|
||||
break;
|
||||
case api.ui.traceAdd:
|
||||
case api.ui.traceAdd2:
|
||||
return func.traceAdd();
|
||||
case api.ui.traceDun:
|
||||
case api.ui.traceDun2:
|
||||
return func.traceDone();
|
||||
case api.ui.traceClr:
|
||||
case api.ui.traceClr2:
|
||||
api.uc.confirm("clear traces?").then(ok => {
|
||||
if (ok) func.traceClear();
|
||||
});
|
||||
break;
|
||||
case api.ui.crAdd:
|
||||
func.opAdd({
|
||||
type: "rough",
|
||||
tool: process.camRoughTool,
|
||||
spindle: process.camRoughSpindle,
|
||||
step: process.camRoughOver,
|
||||
down: process.camRoughDown,
|
||||
rate: process.camRoughSpeed,
|
||||
plunge: process.camRoughPlunge,
|
||||
leave: process.camRoughStock,
|
||||
voids: process.camRoughVoid,
|
||||
flats: process.camRoughFlat,
|
||||
inside: process.camRoughIn,
|
||||
top: process.camRoughTop
|
||||
});
|
||||
func.opAddRough();
|
||||
break;
|
||||
case api.ui.coAdd:
|
||||
func.opAdd({
|
||||
type: "outline",
|
||||
tool: process.camOutlineTool,
|
||||
spindle: process.camOutlineSpindle,
|
||||
step: process.camOutlineOver,
|
||||
down: process.camOutlineDown,
|
||||
rate: process.camOutlineSpeed,
|
||||
plunge: process.camOutlinePlunge,
|
||||
dogbones: process.camOutlineDogbone,
|
||||
outside: process.camOutlineOut,
|
||||
inside: process.camOutlineIn,
|
||||
wide: process.camOutlineWide
|
||||
});
|
||||
func.opAddOutline();
|
||||
break;
|
||||
case api.ui.ccxAdd:
|
||||
func.opAdd({
|
||||
type: "contour x",
|
||||
tool: process.camContourTool,
|
||||
spindle: process.camContourSpindle,
|
||||
step: process.camContourOver,
|
||||
rate: process.camContourSpeed,
|
||||
angle: process.camContourAngle,
|
||||
tolerance: process.camTolerance,
|
||||
curves: process.camContourCurves,
|
||||
inside: process.camContourIn
|
||||
});
|
||||
func.opAddContour('x');
|
||||
break;
|
||||
case api.ui.ccyAdd:
|
||||
func.opAdd({
|
||||
type: "contour y",
|
||||
tool: process.camContourTool,
|
||||
spindle: process.camContourSpindle,
|
||||
step: process.camContourOver,
|
||||
rate: process.camContourSpeed,
|
||||
angle: process.camContourAngle,
|
||||
tolerance: process.camTolerance,
|
||||
curves: process.camContourCurves,
|
||||
inside: process.camContourIn
|
||||
});
|
||||
func.opAddContour('y');
|
||||
break;
|
||||
case api.ui.drAdd:
|
||||
func.opAdd({
|
||||
type: "drill",
|
||||
tool: process.camDrillTool,
|
||||
spindle: process.camDrillSpindle,
|
||||
down: process.camDrillDown,
|
||||
rate: process.camDrillDownSpeed,
|
||||
dwell: process.camDrillDwell,
|
||||
lift: process.camDrillLift
|
||||
});
|
||||
func.opAddDrill();
|
||||
break;
|
||||
case api.ui.drX2Add:
|
||||
drill = { axis: "X", points: 2 };
|
||||
func.opAddRegister("X", 2);
|
||||
break;
|
||||
case api.ui.drX3Add:
|
||||
drill = { axis: "X", points: 3 };
|
||||
func.opAddRegister("X", 3);
|
||||
break;
|
||||
case api.ui.drY2Add:
|
||||
drill = { axis: "Y", points: 2 };
|
||||
func.opAddRegister("Y", 2);
|
||||
break;
|
||||
case api.ui.drY3Add:
|
||||
drill = { axis: "Y", points: 3 };
|
||||
func.opAddRegister("Y", 3);
|
||||
break;
|
||||
}
|
||||
if (drill) {
|
||||
func.opAdd({
|
||||
type: "register",
|
||||
tool: process.camDrillTool,
|
||||
spindle: process.camDrillSpindle,
|
||||
down: process.camDrillDown,
|
||||
rate: process.camDrillDownSpeed,
|
||||
dwell: process.camDrillDwell,
|
||||
lift: process.camDrillLift,
|
||||
points: drill.points,
|
||||
axis: drill.axis
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// OPS FUNCS
|
||||
|
|
@ -301,10 +350,8 @@
|
|||
if (!isCamMode) return;
|
||||
let mark = Date.now();
|
||||
let html = [];
|
||||
let ops = current.process.ops;
|
||||
let oplist = ops && ops.length > 0 ? ops : [{
|
||||
type: "use right menu to add milling operations ... drag & drop to re-order"
|
||||
}];
|
||||
let oplist = current.process.ops;
|
||||
$('ophint').style.display = oplist.length === 0 ? 'flex' : 'none';
|
||||
let bind = {};
|
||||
let scale = API.view.unit_scale();
|
||||
oplist.forEach((rec,i) => {
|
||||
|
|
@ -343,7 +390,7 @@
|
|||
};
|
||||
el.onmouseenter = (ev) => {
|
||||
if (unpop) unpop();
|
||||
unpop = el.unpop;
|
||||
unpop = func.unpop = el.unpop;
|
||||
inside = true;
|
||||
poprec.use(rec);
|
||||
el.appendChild(poprec.div);
|
||||
|
|
@ -380,9 +427,9 @@
|
|||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
}
|
||||
ops.length = 0;
|
||||
oplist.length = 0;
|
||||
for (let child of listel.childNodes) {
|
||||
ops.push(child.rec);
|
||||
oplist.push(child.rec);
|
||||
}
|
||||
API.conf.save();
|
||||
func.opRender();
|
||||
|
|
@ -747,8 +794,9 @@
|
|||
wide: UC.newBoolean(LANG.co_wide_s, undefined, {title:LANG.co_wide_l, show:(op) => { return !op.inputs.inside.checked }})
|
||||
};
|
||||
|
||||
createPopOp('contour x').inputs = {
|
||||
createPopOp('contour').inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
axis: UC.newSelect(LANG.cd_axis, {}, "regaxis"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
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)}),
|
||||
|
|
@ -760,21 +808,20 @@
|
|||
inside: UC.newBoolean(LANG.cf_olin_s, undefined, {title:LANG.cf_olin_l})
|
||||
};
|
||||
|
||||
createPopOp('contour y').inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
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)}),
|
||||
rate: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, units:true}),
|
||||
angle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90)}),
|
||||
tolerance: UC.newInput(LANG.ou_toll_s, {title:LANG.ou_toll_l, convert:UC.toFloat, bound:UC.bound(0,10.0), units:true}),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
curves: UC.newBoolean(LANG.cf_curv_s, undefined, {title:LANG.cf_curv_l}),
|
||||
inside: UC.newBoolean(LANG.cf_olin_s, undefined, {title:LANG.cf_olin_l})
|
||||
createPopOp('trace').inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
mode: UC.newSelect(LANG.cu_type_s, {title:LANG.cu_type_l}, "trace"),
|
||||
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"}),
|
||||
select: UC.newRow([
|
||||
UC.newButton(undefined, func.traceAdd, {icon:'<i class="fas fa-plus"></i>'}),
|
||||
UC.newButton(undefined, func.traceDone, {icon:'<i class="fas fa-check"></i>'}),
|
||||
UC.newButton(undefined, func.traceClear, {icon:'<i class="fas fa-trash-alt"></i>'})
|
||||
], {class:"ext-buttons f-row"}),
|
||||
};
|
||||
|
||||
createPopOp('trace').inputs = { };
|
||||
|
||||
createPopOp('drill').inputs = {
|
||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||
sep: UC.newBlank({class:"pop-sep"}),
|
||||
|
|
|
|||
|
|
@ -871,8 +871,7 @@
|
|||
"shadow": OpShadow,
|
||||
"rough": OpRough,
|
||||
"outline": OpOutline,
|
||||
"contour x": OpContour,
|
||||
"contour y": OpContour,
|
||||
"contour": OpContour,
|
||||
"trace": OpTrace,
|
||||
"drill": OpDrill,
|
||||
"register": OpRegister
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@
|
|||
let { state, contour, onupdate, ondone } = opt;
|
||||
let { widget, settings, tshadow, center, tabs } = opt.state;
|
||||
let density = parseInt(settings.controller.animesh) * 2500,
|
||||
contourX = contour.type === "contour x",
|
||||
contourY = contour.type === "contour y",
|
||||
axis = contour.axis.toLowerCase(),
|
||||
contourX = axis === "x",
|
||||
contourY = axis === "y",
|
||||
bounds = widget.getBoundingBox().clone(),
|
||||
tolerance = contour.tolerace,
|
||||
proc = settings.process,
|
||||
|
|
|
|||
Loading…
Reference in a new issue