add visual marker when cam operation is enabled
This commit is contained in:
parent
2952e202f4
commit
4c43f5864d
5 changed files with 33 additions and 6 deletions
|
|
@ -1292,7 +1292,7 @@
|
||||||
sliceSupportNozzle: UC.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM, expert:true}, "extruders"),
|
sliceSupportNozzle: UC.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM, expert:true}, "extruders"),
|
||||||
sliceSupportEnable: UC.newBoolean(LANG.enable, onBooleanClick, {modes:FDM}),
|
sliceSupportEnable: UC.newBoolean(LANG.enable, onBooleanClick, {modes:FDM}),
|
||||||
|
|
||||||
roughing: UC.newGroup(LANG.cr_menu, null, {modes:CAM}),
|
roughing: UC.newGroup(LANG.cr_menu, null, {modes:CAM, marker:true}),
|
||||||
roughingTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
roughingTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
roughingSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
roughingSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
||||||
roughingOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
|
roughingOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.1,1.0), modes:CAM}),
|
||||||
|
|
@ -1304,7 +1304,7 @@
|
||||||
camPocketOnlyRough: UC.newBoolean(LANG.cc_pock_s, onBooleanClick, {title:LANG.cc_pock_l, modes:CAM}),
|
camPocketOnlyRough: UC.newBoolean(LANG.cc_pock_s, onBooleanClick, {title:LANG.cc_pock_l, modes:CAM}),
|
||||||
roughingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
roughingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||||
|
|
||||||
finishing: UC.newGroup(LANG.cf_menu, null, {modes:CAM}),
|
finishing: UC.newGroup(LANG.cf_menu, null, {modes:CAM, marker:true}),
|
||||||
finishingTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
finishingTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
finishingSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
finishingSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
||||||
finishingOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
finishingOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
||||||
|
|
@ -1318,7 +1318,7 @@
|
||||||
finishingYOn: UC.newBoolean(LANG.cf_liny_s, onBooleanClick, {title:LANG.cf_liny_l, modes:CAM}),
|
finishingYOn: UC.newBoolean(LANG.cf_liny_s, onBooleanClick, {title:LANG.cf_liny_l, modes:CAM}),
|
||||||
finishCurvesOnly: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
finishCurvesOnly: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
||||||
|
|
||||||
drilling: UC.newGroup(LANG.cd_menu, null, {modes:CAM}),
|
drilling: UC.newGroup(LANG.cd_menu, null, {modes:CAM, marker:true}),
|
||||||
drillTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
drillTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
drillSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
drillSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM}),
|
||||||
drillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM}),
|
drillDown: UC.newInput(LANG.cd_plpr_s, {title:LANG.cd_plpr_l, convert:UC.toFloat, modes:CAM}),
|
||||||
|
|
@ -1327,19 +1327,19 @@
|
||||||
drillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM}),
|
drillLift: UC.newInput(LANG.cd_lift_s, {title:LANG.cd_lift_l, convert:UC.toFloat, modes:CAM}),
|
||||||
drillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
drillingOn: UC.newBoolean(LANG.enable, onBooleanClick, {modes:CAM}),
|
||||||
|
|
||||||
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
|
||||||
|
|
||||||
output: UC.newGroup(LANG.fr_menu, null, {modes:FDM}),
|
output: UC.newGroup(LANG.fr_menu, null, {modes:FDM}),
|
||||||
outputRaftSpacing: UC.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:UC.toFloat, bound:UC.bound(0.0,3.0), modes:FDM}),
|
outputRaftSpacing: UC.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:UC.toFloat, bound:UC.bound(0.0,3.0), modes:FDM}),
|
||||||
outputRaft: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM}),
|
outputRaft: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM}),
|
||||||
|
|
||||||
camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM}),
|
camTabs: UC.newGroup(LANG.ct_menu, null, {modes:CAM, marker:true}),
|
||||||
camTabsAngle: UC.newInput(LANG.ct_angl_s, {title:LANG.ct_angl_l, convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}),
|
camTabsAngle: UC.newInput(LANG.ct_angl_s, {title:LANG.ct_angl_l, convert:UC.toInt, bound:UC.bound(0,360), modes:CAM}),
|
||||||
camTabsCount: UC.newInput(LANG.ct_numb_s, {title:LANG.ct_numb_l, convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}),
|
camTabsCount: UC.newInput(LANG.ct_numb_s, {title:LANG.ct_numb_l, convert:UC.toInt, bound:UC.bound(1,20), modes:CAM}),
|
||||||
camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
camTabsWidth: UC.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
||||||
camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
camTabsHeight: UC.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:UC.toFloat, bound:UC.bound(0.1,100), modes:CAM}),
|
||||||
camTabsOn: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ct_nabl_l, modes:CAM}),
|
camTabsOn: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ct_nabl_l, modes:CAM}),
|
||||||
|
|
||||||
|
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
||||||
|
|
||||||
camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}),
|
camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}),
|
||||||
camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||||
camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM}),
|
||||||
|
|
|
||||||
|
|
@ -1459,6 +1459,7 @@
|
||||||
settings.controller.view = view;
|
settings.controller.view = view;
|
||||||
}
|
}
|
||||||
SDB.setItem('ws-settings', JSON.stringify(settings));
|
SDB.setItem('ws-settings', JSON.stringify(settings));
|
||||||
|
API.event.emit('settings.saved', settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
function settingsImport(data, ask) {
|
function settingsImport(data, ask) {
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,12 @@
|
||||||
addTo = lastDiv;
|
addTo = lastDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.marker) {
|
||||||
|
let marker = row.marker = DOC.createElement('div');
|
||||||
|
marker.setAttribute('class', 'marker');
|
||||||
|
row.appendChild(marker);
|
||||||
|
}
|
||||||
|
|
||||||
div.appendChild(row);
|
div.appendChild(row);
|
||||||
if (label) {
|
if (label) {
|
||||||
link = DOC.createElement('a');
|
link = DOC.createElement('a');
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,16 @@
|
||||||
$('set-tools').style.display = isCAM ? '' : 'none';
|
$('set-tools').style.display = isCAM ? '' : 'none';
|
||||||
kiri.space.platform.setColor(isCAM ? 0xeeeeee : 0xcccccc);
|
kiri.space.platform.setColor(isCAM ? 0xeeeeee : 0xcccccc);
|
||||||
});
|
});
|
||||||
|
api.event.on("settings.saved", (settings) => {
|
||||||
|
let proc = settings.process;
|
||||||
|
api.ui.camTabs.marker.style.display = proc.camTabsOn ? 'flex' : 'none';
|
||||||
|
api.ui.roughing.marker.style.display = proc.roughingOn ? 'flex' : 'none';
|
||||||
|
api.ui.drilling.marker.style.display = proc.drillingOn ? 'flex' : 'none';
|
||||||
|
api.ui.finishing.marker.style.display =
|
||||||
|
proc.finishingOn ||
|
||||||
|
proc.finishingXOn ||
|
||||||
|
proc.finishingYOn ? 'flex' : 'none';
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getToolById(settings, id) {
|
function getToolById(settings, id) {
|
||||||
|
|
|
||||||
|
|
@ -882,6 +882,16 @@ th, tr, td {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
.marker {
|
||||||
|
xdisplay: none;
|
||||||
|
position:absolute;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: rgba(0,0,0,0.25);
|
||||||
|
bottom: 1px;
|
||||||
|
left: 1px;
|
||||||
|
width: 4px;
|
||||||
|
height: 4px;
|
||||||
|
}
|
||||||
#layers .var-row {
|
#layers .var-row {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue