cleanup left menu mode groups

This commit is contained in:
Stewart Allen 2024-05-26 22:51:44 -04:00
commit 849dfb3c4c
5 changed files with 263 additions and 275 deletions

View file

@ -38,7 +38,8 @@ gapp.register("kiri.init", [], (root, exports) => {
GCODE = [MODES.FDM, MODES.LASER, MODES.CAM], GCODE = [MODES.FDM, MODES.LASER, MODES.CAM],
LASER = [MODES.LASER], LASER = [MODES.LASER],
proto = location.protocol, proto = location.protocol,
ver = Date.now().toString(36); ver = Date.now().toString(36),
driven = true;
let currentDevice = null, let currentDevice = null,
deviceURL = null, deviceURL = null,
@ -1730,6 +1731,8 @@ gapp.register("kiri.init", [], (root, exports) => {
stockDepth: $('stock-width'), stockDepth: $('stock-width'),
stockHeight: $('stock-width'), stockHeight: $('stock-width'),
/** Device Browser / Editor */
device: uc.newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}), device: uc.newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}),
deviceName: uc.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"70%", text:true, action:updateDeviceName}), deviceName: uc.newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"70%", text:true, action:updateDeviceName}),
@ -1752,23 +1755,23 @@ gapp.register("kiri.init", [], (root, exports) => {
filamentSource: uc.newSelect(LANG.dv_fsrc_s, {title: LANG.dv_fsrc_l, action: filamentSourceSave, modes:FDM}, "filasrc"), filamentSource: uc.newSelect(LANG.dv_fsrc_s, {title: LANG.dv_fsrc_l, action: filamentSourceSave, modes:FDM}, "filasrc"),
fwRetract: uc.newBoolean(LANG.dv_retr_s, onBooleanClick, {title:LANG.dv_retr_l, modes:FDM}), fwRetract: uc.newBoolean(LANG.dv_retr_s, onBooleanClick, {title:LANG.dv_retr_l, modes:FDM}),
deviceOrigin: uc.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:FDM_LZR, show:() => !ui.deviceRound.checked}), deviceOrigin: uc.newBoolean(LANG.dv_orgc_s, onBooleanClick, {title:LANG.dv_orgc_l, modes:FDM_LZR, show:() => !ui.deviceRound.checked}),
deviceRound: uc.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, modes:FDM, trigger:true, show:isNotBelt}), deviceRound: uc.newBoolean(LANG.dv_bedc_s, onBooleanClick, {title:LANG.dv_bedc_l, trigger:true, show:isNotBelt}),
deviceBelt: uc.newBoolean(LANG.dv_belt_s, onBooleanClick, {title:LANG.dv_belt_l, modes:FDM, trigger:true, show:() => !ui.deviceRound.checked}), deviceBelt: uc.newBoolean(LANG.dv_belt_s, onBooleanClick, {title:LANG.dv_belt_l, trigger:true, show:() => !ui.deviceRound.checked}),
extruder: uc.newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}), extruder: uc.newGroup(LANG.dv_gr_ext, $('device2'), {group:"dext", inline:true, modes:FDM}),
extFilament: uc.newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:uc.toFloat, modes:FDM}), extFilament: uc.newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:uc.toFloat, modes:FDM}),
extNozzle: uc.newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:uc.toFloat, modes:FDM}), extNozzle: uc.newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:uc.toFloat, modes:FDM}),
extOffsetX: uc.newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:uc.toFloat, modes:FDM}), extOffsetX: uc.newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:uc.toFloat, modes:FDM}),
extOffsetY: uc.newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:uc.toFloat, modes:FDM}), extOffsetY: uc.newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:uc.toFloat, modes:FDM}),
extSelect: uc.newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, modes:FDM, size:14, height:3, area:gcode}), extSelect: uc.newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode}),
extDeselect: uc.newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, modes:FDM, size:14, height:3, area:gcode}), extDeselect: uc.newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode}),
extPad: uc.newBlank({class:"grow", modes:FDM}), extPad: uc.newBlank({class:"grow", modes:FDM}),
extActions: uc.newRow([ extActions: uc.newRow([
ui.extPrev = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}), ui.extPrev = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}),
ui.extAdd = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}), ui.extAdd = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-plus"></i>'}),
ui.extDel = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}), ui.extDel = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-minus"></i>'}),
ui.extNext = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'}) ui.extNext = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'})
], {modes:FDM, class:"dev-buttons ext-buttons"}), ], {class:"dev-buttons ext-buttons"}),
palette: uc.newGroup(LANG.dv_gr_pal, $('palette3'), {group:"dext2", inline:true, modes:FDM}), palette: uc.newGroup(LANG.dv_gr_pal, $('palette3'), {group:"dext2", inline:true, modes:FDM}),
paletteId: uc.newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}), paletteId: uc.newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}),
@ -1802,6 +1805,8 @@ gapp.register("kiri.init", [], (root, exports) => {
(ui.gcodeSpindle = uc.newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode, show:() => ui.spindleMax.value > 0})).button (ui.gcodeSpindle = uc.newGCode(LANG.dv_sspd_s, {title:LANG.dv_sspd_l, modes:CAM, area:gcode, show:() => ui.spindleMax.value > 0})).button
], {class:"ext-buttons f-row gcode-macros"}), ], {class:"ext-buttons f-row gcode-macros"}),
/** Preferences Menu */
lprefs: uc.newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}), lprefs: uc.newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
antiAlias: uc.newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}), antiAlias: uc.newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}),
reverseZoom: uc.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}), reverseZoom: uc.newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
@ -1841,251 +1846,225 @@ gapp.register("kiri.init", [], (root, exports) => {
prefadd: uc.checkpoint($('prefs-add')), prefadd: uc.checkpoint($('prefs-add')),
process: uc.newGroup(LANG.sl_menu, $('fdm-layers'), {modes:FDM_LZR}), /** FDM Settings */
sliceHeight: uc.newInput(LANG.sl_lahi_s, {title:LANG.sl_lahi_l, convert:uc.toFloat, modes:FDM}),
sliceMinHeight: uc.newInput(LANG.ad_minl_s, {title:LANG.ad_minl_l, bound:uc.bound(0,3.0), convert:uc.toFloat, modes:FDM, show: () => ui.sliceAdaptive.checked}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
sliceShells: uc.newInput(LANG.sl_shel_s, {title:LANG.sl_shel_l, convert:uc.toFloat, modes:FDM}),
sliceLineWidth: uc.newInput(LANG.sl_line_s, {title:LANG.sl_line_l, convert:uc.toFloat, bound:uc.bound(0,5), modes:FDM}),
outputFanLayer: uc.newInput(LANG.ou_fanl_s, {title:LANG.ou_fanl_l, convert:uc.toInt, bound:uc.bound(0,255), modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
sliceTopLayers: uc.newInput(LANG.sl_ltop_s, {title:LANG.sl_ltop_l, convert:uc.toInt, modes:FDM}),
sliceBottomLayers: uc.newInput(LANG.sl_lbot_s, {title:LANG.sl_lbot_l, convert:uc.toInt, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
sliceDetectThin: uc.newSelect(LANG.ad_thin_s, {title: LANG.ad_thin_l, action: thinWallSave, modes:FDM}, "thin"),
sliceAdaptive: uc.newBoolean(LANG.ad_adap_s, onBooleanClick, {title: LANG.ad_adap_l, modes:FDM, trigger: true}),
laserMode: uc.newGroup(LANG.sl_menu, $('settings'), {modes:LASER}), process: uc.newGroup(LANG.sl_menu, $('fdm-layers'), { modes:FDM, driven }),
laserOffset: uc.newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:uc.toFloat, modes:LASER}), sliceHeight: uc.newInput(LANG.sl_lahi_s, { title:LANG.sl_lahi_l, convert:uc.toFloat }),
laserSliceHeight: uc.newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:uc.toFloat, modes:LASER, trigger: true}), sliceMinHeight: uc.newInput(LANG.ad_minl_s, { title:LANG.ad_minl_l, bound:uc.bound(0,3.0), convert:uc.toFloat, show: () => ui.sliceAdaptive.checked}),
laserSliceHeightMin: uc.newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:uc.toFloat, modes:LASER, show:() => { return ui.laserSliceHeight.value == 0 }}), sliceShells: uc.newInput(LANG.sl_shel_s, { title:LANG.sl_shel_l, convert:uc.toFloat }),
laserSep: uc.newBlank({class:"pop-sep", modes:LASER}), sliceLineWidth: uc.newInput(LANG.sl_line_s, { title:LANG.sl_line_l, convert:uc.toFloat, bound:uc.bound(0,5) }),
laserSliceSingle: uc.newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l, modes:LASER}), outputFanLayer: uc.newInput(LANG.ou_fanl_s, { title:LANG.ou_fanl_l, convert:uc.toInt, bound:uc.bound(0,255) }),
sliceTopLayers: uc.newInput(LANG.sl_ltop_s, { title:LANG.sl_ltop_l, convert:uc.toInt }),
sliceBottomLayers: uc.newInput(LANG.sl_lbot_s, { title:LANG.sl_lbot_l, convert:uc.toInt }),
sliceDetectThin: uc.newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"),
sliceAdaptive: uc.newBoolean(LANG.ad_adap_s, onBooleanClick, {title: LANG.ad_adap_l, trigger: true}),
firstLayer: uc.newGroup(LANG.fl_menu, null, {modes:FDM}), firstLayer: uc.newGroup(LANG.fl_menu, $('fdm-base'), { modes:FDM, driven }),
firstSliceHeight: uc.newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:uc.toFloat, modes:FDM, show:isNotBelt}), firstSliceHeight: uc.newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:uc.toFloat, show:isNotBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}), firstLayerNozzleTemp:uc.newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:uc.toInt, show:isNotBelt}),
firstLayerNozzleTemp:uc.newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:uc.toInt, modes:FDM, show:isNotBelt}), firstLayerBedTemp: uc.newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:uc.toInt, show:isNotBelt}),
firstLayerBedTemp: uc.newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:uc.toInt, modes:FDM, show:isNotBelt}), firstLayerFanSpeed: uc.newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:uc.toInt, bound:uc.bound(0,255), show:isBelt}),
firstLayerFanSpeed: uc.newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:uc.toInt, bound:uc.bound(0,255), modes:FDM, show:isBelt}), firstLayerYOffset: uc.newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:uc.toFloat, show:isBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}), firstLayerFlatten: uc.newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:uc.toFloat, show:isBelt}),
firstLayerYOffset: uc.newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:uc.toFloat, modes:FDM, show:isBelt}), firstLayerRate: uc.newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:uc.toFloat}),
firstLayerFlatten: uc.newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:uc.toFloat, modes:FDM, show:isBelt}), firstLayerFillRate: uc.newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:uc.toFloat, show:isNotBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isBelt}), firstLayerLineMult: uc.newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:uc.toFloat, bound:uc.bound(0.5,2), show:isNotBelt}),
firstLayerRate: uc.newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:uc.toFloat, modes:FDM}), firstLayerPrintMult: uc.newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:uc.toFloat}),
firstLayerFillRate: uc.newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:uc.toFloat, modes:FDM, show:isNotBelt}), firstLayerBrim: uc.newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:uc.toInt, show:isBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}), firstLayerBrimIn: uc.newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:uc.toInt, show:isBelt}),
firstLayerLineMult: uc.newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:uc.toFloat, bound:uc.bound(0.5,2), modes:FDM, show:isNotBelt}), firstLayerBrimTrig: uc.newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:uc.toInt, show:isBelt}),
firstLayerPrintMult: uc.newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:uc.toFloat, modes:FDM}), firstLayerBrimGap: uc.newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:uc.toFloat, show:isBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isBelt}), firstLayerBeltLead: uc.newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:uc.toFloat, show:isBelt}),
firstLayerBrim: uc.newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:uc.toInt, modes:FDM, show:isBelt}), firstLayerBeltBump: uc.newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:uc.toFloat, bound:uc.bound(0, 10), show:isBelt}),
firstLayerBrimIn: uc.newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:uc.toInt, modes:FDM, show:isBelt}), outputBrimCount: uc.newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:uc.toInt, show:isNotBelt}),
firstLayerBrimTrig: uc.newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:uc.toInt, modes:FDM, show:isBelt}), outputBrimOffset: uc.newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:uc.toFloat, show:isNotBelt}),
firstLayerBrimGap: uc.newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:uc.toFloat, modes:FDM, show:isBelt}), outputRaftSpacing: uc.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:uc.toFloat, bound:uc.bound(0.0,3.0), show: () => ui.outputRaft.checked && isNotBelt() }),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isBelt}), outputRaft: uc.newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger: true, show:() => isNotBelt()}),
firstLayerBeltLead: uc.newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:uc.toFloat, modes:FDM, show:isBelt}), outputDraftShield: uc.newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, trigger: true, show:() => isNotBelt()}),
firstLayerBeltBump: uc.newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:uc.toFloat, bound:uc.bound(0, 10), modes:FDM, show:isBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}),
outputBrimCount: uc.newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:uc.toInt, modes:FDM, show:isNotBelt}),
outputBrimOffset: uc.newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:uc.toFloat, modes:FDM, show:isNotBelt}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}),
outputRaftSpacing: uc.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:uc.toFloat, bound:uc.bound(0.0,3.0), modes:FDM, show: () => ui.outputRaft.checked && isNotBelt() }),
outputRaft: uc.newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM, trigger: true, show:() => isNotBelt()}),
outputDraftShield: uc.newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, modes:FDM, trigger: true, show:() => isNotBelt()}),
fdmInfill: uc.newGroup(LANG.fi_menu, $('settings'), {modes:FDM}), fdmInfill: uc.newGroup(LANG.fi_menu, $('fdm-fill'), { modes:FDM, driven }),
sliceFillType: uc.newSelect(LANG.fi_type, {modes:FDM, trigger:true}, "infill"), sliceFillType: uc.newSelect(LANG.fi_type, {trigger:true}, "infill"),
sliceFillSparse: uc.newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:uc.toFloat, bound:uc.bound(0.0,1.0), modes:FDM}), sliceFillSparse: uc.newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:uc.toFloat, bound:uc.bound(0.0,1.0)}),
sliceFillRepeat: uc.newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:uc.toInt, bound:uc.bound(1,10), show:fillShow, modes:FDM}), sliceFillRepeat: uc.newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:uc.toInt, bound:uc.bound(1,10), show:fillShow}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), sliceFillOverlap: uc.newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}),
sliceFillOverlap: uc.newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0), modes:FDM}), sliceFillRate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt, bound:uc.bound(0,500)}),
sliceFillRate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt, bound:uc.bound(0,500), modes:FDM}), sliceSolidRate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt, bound:uc.bound(0,500)}),
sliceSolidRate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt, bound:uc.bound(0,500), modes:FDM}), sliceFillGrow: uc.newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:uc.toFloat}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), sliceFillAngle: uc.newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:uc.toFloat}),
sliceFillGrow: uc.newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:uc.toFloat, modes:FDM}),
sliceFillAngle: uc.newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:uc.toFloat, modes:FDM}),
fdmSupport: uc.newGroup(LANG.sp_menu, null, {modes:FDM, marker:false}), fdmSupport: uc.newGroup(LANG.sp_menu, $('fdm-support'), { modes:FDM, marker:false, driven }),
sliceSupportNozzle: uc.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM}, "extruders"), sliceSupportNozzle: uc.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l}, "extruders"),
sliceSupportDensity: uc.newInput(LANG.sp_dens_s, {title:LANG.sp_dens_l, convert:uc.toFloat, bound:uc.bound(0.0,1.0), modes:FDM}), sliceSupportDensity: uc.newInput(LANG.sp_dens_s, {title:LANG.sp_dens_l, convert:uc.toFloat, bound:uc.bound(0.0,1.0)}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), sliceSupportSize: uc.newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:uc.bound(1.0,200.0), convert:uc.toFloat}),
sliceSupportSize: uc.newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:uc.bound(1.0,200.0), convert:uc.toFloat, modes:FDM}), sliceSupportOffset: uc.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat}),
sliceSupportOffset: uc.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat, modes:FDM}), sliceSupportGap: uc.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:uc.bound(0,5), convert:uc.toInt}),
sliceSupportGap: uc.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:uc.bound(0,5), convert:uc.toInt, modes:FDM}), sliceSupportArea: uc.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), sliceSupportExtra: uc.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat}),
sliceSupportArea: uc.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat, modes:FDM}), sliceSupportGrow: uc.newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat}),
sliceSupportExtra: uc.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat, modes:FDM}), sliceSupportAngle: uc.newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:uc.bound(0.0,90.0), convert:uc.toFloat}),
sliceSupportGrow: uc.newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat, modes:FDM}), sliceSupportSpan: uc.newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat, show:() => ui.sliceSupportEnable.checked}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), sliceSupportEnable: uc.newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, show:isNotBelt}),
sliceSupportAngle: uc.newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:uc.bound(0.0,90.0), convert:uc.toFloat, modes:FDM}), sliceSupportOutline: uc.newBoolean(LANG.sp_outl_s, onBooleanClick, {title:LANG.sp_outl_l}),
sliceSupportSpan: uc.newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat, modes:FDM, show:() => ui.sliceSupportEnable.checked}),
sliceSupportEnable: uc.newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, modes:FDM, show:isNotBelt}),
sliceSupportOutline: uc.newBoolean(LANG.sp_outl_s, onBooleanClick, {title:LANG.sp_outl_l, modes:FDM}),
sliceSupportGen: uc.newRow([ sliceSupportGen: uc.newRow([
ui.ssaGen = uc.newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"}) ui.ssaGen = uc.newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"})
], { modes: FDM, class: "ext-buttons f-row grow" }), ], { modes: FDM, class: "ext-buttons f-row grow" }),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM, show:isNotBelt}),
sliceSupportManual: uc.newRow([ sliceSupportManual: uc.newRow([
(ui.ssmAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})), (ui.ssmAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
(ui.ssmDun = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})), (ui.ssmDun = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})),
(ui.ssmClr = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'})) (ui.ssmClr = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
], {modes:FDM, class:"ext-buttons f-row"}), ], {class:"ext-buttons f-row"}),
camTabs: uc.newGroup(LANG.ct_menu, null, {modes:CAM, marker:true}), fdmOutput: uc.newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven }),
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}), outputTemp: uc.newInput(LANG.ou_nozl_s, {title:LANG.ou_nozl_l, convert:uc.toInt}),
camTabsHeight: uc.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:uc.toFloat, bound:uc.bound(0.005,100), modes:CAM, units:true}), outputBedTemp: uc.newInput(LANG.ou_bedd_s, {title:LANG.ou_bedd_l, convert:uc.toInt}),
camTabsDepth: uc.newInput(LANG.ct_dpth_s, {title:LANG.ct_dpth_l, convert:uc.toFloat, bound:uc.bound(0.005,100), modes:CAM, units:true}), outputFanSpeed: uc.newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:uc.toInt, bound:uc.bound(0,255)}),
camTabsMidline: uc.newBoolean(LANG.ct_midl_s, onBooleanClick, {title:LANG.ct_midl_l, modes:CAM}), outputFeedrate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt}),
camSep: uc.newBlank({class:"pop-sep"}), outputFinishrate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt}),
outputSeekrate: uc.newInput(LANG.ou_move_s, {title:LANG.ou_move_l, convert:uc.toInt}),
outputShellMult: uc.newInput(LANG.ou_shml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}),
outputFillMult: uc.newInput(LANG.ou_flml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}),
outputSparseMult: uc.newInput(LANG.ou_spml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}),
sliceShellOrder: uc.newSelect(LANG.sl_ordr_s, {title:LANG.sl_ordr_l}, "shell"),
sliceLayerStart: uc.newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"),
outputLayerRetract: uc.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}),
outputAvoidGaps: uc.newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}),
outputAlternating: uc.newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}),
outputBeltFirst: uc.newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}),
fdmExpert: uc.newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven }),
outputRetractDist: uc.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:uc.toFloat}),
outputRetractSpeed: uc.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:uc.toInt}),
outputRetractWipe: uc.newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, bound:uc.bound(0.0,10), convert:uc.toFloat}),
outputRetractDwell: uc.newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:uc.toInt}),
sliceSolidMinArea: uc.newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:uc.toFloat}),
outputMinSpeed: uc.newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:uc.bound(1,200), convert:uc.toFloat}),
outputShortPoly: uc.newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:uc.bound(0,10000), convert:uc.toFloat}),
outputCoastDist: uc.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:uc.bound(0.0,10), convert:uc.toFloat}),
zHopDistance: uc.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:uc.bound(0,3.0), convert:uc.toFloat}),
arcTolerance: uc.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:uc.bound(0,1.0), convert:uc.toFloat, show:() => { return isNotBelt() }}),
antiBacklash: uc.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:uc.bound(0,3), convert:uc.toInt}),
outputLoops: uc.newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:uc.toInt, bound:uc.bound(-1,1000), show:isBelt}),
outputPurgeTower: uc.newInput(LANG.ad_purg_s, {title:LANG.ad_purg_l, convert:uc.toInt, bound:uc.bound(0,1000)}),
fdmRanges: $('fdm-ranges'),
/** CAM Settings */
camTabs: uc.newGroup(LANG.ct_menu, $('cam-tabs'), { modes:CAM, marker:true, driven }),
camTabsWidth: uc.newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:uc.toFloat, bound:uc.bound(0.005,100), units:true}),
camTabsHeight: uc.newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:uc.toFloat, bound:uc.bound(0.005,100), units:true}),
camTabsDepth: uc.newInput(LANG.ct_dpth_s, {title:LANG.ct_dpth_l, convert:uc.toFloat, bound:uc.bound(0.005,100), units:true}),
camTabsMidline: uc.newBoolean(LANG.ct_midl_s, onBooleanClick, {title:LANG.ct_midl_l}),
camTabsManual: uc.newRow([ camTabsManual: uc.newRow([
(ui.tabAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})), (ui.tabAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
(ui.tabDun = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})), (ui.tabDun = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})),
(ui.tabClr = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'})) (ui.tabClr = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
], {modes:CAM, class:"ext-buttons f-row"}), ], {class:"ext-buttons f-row"}),
camStock: uc.newGroup(LANG.cs_menu, null, {modes:CAM}), camStock: uc.newGroup(LANG.cs_menu, $('cam-stock'), { modes:CAM, driven }),
camStockX: uc.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:uc.toFloat, bound:uc.bound(0,9999), modes:CAM, units:true}), camStockX: uc.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:uc.toFloat, bound:uc.bound(0,9999), units:true}),
camStockY: uc.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:uc.toFloat, bound:uc.bound(0,9999), modes:CAM, units:true}), camStockY: uc.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:uc.toFloat, bound:uc.bound(0,9999), units:true}),
camStockZ: uc.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:uc.toFloat, bound:uc.bound(0,9999), modes:CAM, units:true}), camStockZ: uc.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:uc.toFloat, bound:uc.bound(0,9999), units:true}),
camSep: uc.newBlank({class:"pop-sep", modes:CAM}), camStockOffset: uc.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l}),
camStockOffset: uc.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l, modes:CAM}), camStockClipTo: uc.newBoolean(LANG.cs_clip_s, onBooleanClick, {title:LANG.cs_clip_l}),
camStockClipTo: uc.newBoolean(LANG.cs_clip_s, onBooleanClick, {title:LANG.cs_clip_l, modes:CAM}), camStockIndexed: uc.newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}),
camSep: uc.newBlank({class:"pop-sep", modes:CAM}), camStockIndexGrid: uc.newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}),
camStockIndexed: uc.newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l, modes:CAM}),
camStockIndexGrid: uc.newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, modes:CAM, show:() => ui.camStockIndexed.checked}),
camCommon: uc.newGroup(LANG.cc_menu, null, {modes:CAM}), camLimits: uc.newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven }),
camZAnchor: uc.newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, modes:CAM, trace:true, show:() => !ui.camStockIndexed.checked}, "zanchor"), camZAnchor: uc.newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, trace:true, show:() => !ui.camStockIndexed.checked}, "zanchor"),
camSep: uc.newBlank({class:"pop-sep", modes:CAM, show:() => !ui.camStockIndexed.checked}), camZOffset: uc.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:uc.toFloat, units:true}),
camZOffset: uc.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:uc.toFloat, modes:CAM, units:true}), camZBottom: uc.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:uc.toFloat, units:true, trigger: true}),
camZBottom: uc.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:uc.toFloat, modes:CAM, units:true, trigger: true}), camZThru: uc.newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:uc.toFloat, bound:uc.bound(0.0,100), units:true, show:() => { return ui.camZBottom.value == 0 }}),
camZThru: uc.newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:uc.toFloat, bound:uc.bound(0.0,100), modes:CAM, units:true, show:() => { return ui.camZBottom.value == 0 }}), camZClearance: uc.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:uc.toFloat, bound:uc.bound(0.01,100), units:true}),
camSep: uc.newBlank({class:"pop-sep", modes:CAM}), camFastFeedZ: uc.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:uc.toFloat, units:true}),
camZClearance: uc.newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:uc.toFloat, bound:uc.bound(0.01,100), modes:CAM, units:true}), camFastFeed: uc.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:uc.toFloat, units:true}),
camSep: uc.newBlank({class:"pop-sep", modes:CAM}),
camFastFeedZ: uc.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:uc.toFloat, modes:CAM, units:true}),
camFastFeed: uc.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:uc.toFloat, modes:CAM, units:true}),
laserLayout: uc.newGroup(LANG.lo_menu, null, {modes:LASER}), camOutput: uc.newGroup(LANG.ou_menu, $('cam-output'), { modes:CAM, driven }),
outputTileSpacing: uc.newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:uc.toInt, modes:LASER}), camConventional: uc.newBoolean(LANG.ou_conv_s, onBooleanClick, {title:LANG.ou_conv_l}),
outputLaserMerged: uc.newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l, modes:LASER}), camEaseDown: uc.newBoolean(LANG.cr_ease_s, onBooleanClick, {title:LANG.cr_ease_l}),
outputLaserGroup: uc.newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l, modes:LASER}), camDepthFirst: uc.newBoolean(LANG.ou_depf_s, onBooleanClick, {title:LANG.ou_depf_l}),
camToolInit: uc.newBoolean(LANG.ou_toin_s, onBooleanClick, {title:LANG.ou_toin_l}),
camFirstZMax: uc.newBoolean(LANG.ou_z1st_s, onBooleanClick, {title:LANG.ou_z1st_l}),
camForceZMax: uc.newBoolean(LANG.ou_forz_s, onBooleanClick, {title:LANG.ou_forz_l}),
knife: uc.newGroup(LANG.dk_menu, null, {modes:LASER, marker:true}), camOrigin: uc.newGroup(LANG.co_menu, $('cam-origin'), { modes:CAM, driven }),
outputKnifeDepth: uc.newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:uc.toFloat, bound:uc.bound(0.0,5.0), modes:LASER}), camOriginTop: uc.newBoolean(LANG.or_topp_s, onBooleanClick, {title:LANG.or_topp_l}),
outputKnifePasses: uc.newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:uc.toInt, bound:uc.bound(0,5), modes:LASER}), camOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
outputKnifeTip: uc.newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:uc.toFloat, bound:uc.bound(0.0,10.0), modes:LASER}), camOriginOffX: uc.newInput(LANG.co_offx_s, {title:LANG.co_offx_l, convert:uc.toFloat, units:true}),
knifeSep: uc.newBlank({class:"pop-sep", modes:LASER}), camOriginOffY: uc.newInput(LANG.co_offy_s, {title:LANG.co_offy_l, convert:uc.toFloat, units:true}),
knifeOn: uc.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ou_drkn_l, modes:LASER}), camOriginOffZ: uc.newInput(LANG.co_offz_s, {title:LANG.co_offz_l, convert:uc.toFloat, units:true}),
output: uc.newGroup(LANG.ou_menu, null, {modes:GCODE}), camExpert: uc.newGroup(LANG.op_xprt_s, $('cam-expert'), { group: "cam_expert", modes:CAM, marker: false, driven }),
outputLaserPower: uc.newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:uc.toInt, bound:uc.bound(1,100), modes:LASER}), camExpertFast: uc.newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, show: () => !ui.camTrueShadow.checked }),
outputLaserSpeed: uc.newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:uc.toInt, modes:LASER}), camTrueShadow: uc.newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, show: () => !ui.camExpertFast.checked }),
laserSep: uc.newBlank({class:"pop-sep", modes:LASER}),
outputLaserZColor: uc.newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, modes:LASER, show:() => { return ui.outputLaserMerged.checked === false }}),
outputLaserLayer: uc.newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l, modes:LASER}),
outputLaserStack: uc.newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l, modes:LASER}),
laserSep: uc.newBlank({class:"pop-sep", modes:LASER}),
outputTemp: uc.newInput(LANG.ou_nozl_s, {title:LANG.ou_nozl_l, convert:uc.toInt, modes:FDM}), /** LASER Settings */
outputBedTemp: uc.newInput(LANG.ou_bedd_s, {title:LANG.ou_bedd_l, convert:uc.toInt, modes:FDM}),
outputFanSpeed: uc.newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:uc.toInt, bound:uc.bound(0,255), modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
outputFeedrate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt, modes:FDM}),
outputFinishrate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt, modes:FDM}),
outputSeekrate: uc.newInput(LANG.ou_move_s, {title:LANG.ou_move_l, convert:uc.toInt, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
outputShellMult: uc.newInput(LANG.ou_shml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0), modes:FDM}),
outputFillMult: uc.newInput(LANG.ou_flml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0), modes:FDM}),
outputSparseMult: uc.newInput(LANG.ou_spml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0), modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
sliceShellOrder: uc.newSelect(LANG.sl_ordr_s, {title:LANG.sl_ordr_l, modes:FDM}, "shell"),
sliceLayerStart: uc.newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l, modes:FDM}, "start"),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
outputLayerRetract: uc.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM}),
outputAvoidGaps: uc.newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l, modes:FDM}),
outputAlternating: uc.newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l, modes:FDM}),
outputBeltFirst: uc.newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt, modes:FDM}),
camConventional: uc.newBoolean(LANG.ou_conv_s, onBooleanClick, {title:LANG.ou_conv_l, modes:CAM}),
camEaseDown: uc.newBoolean(LANG.cr_ease_s, onBooleanClick, {title:LANG.cr_ease_l, modes:CAM}),
camDepthFirst: uc.newBoolean(LANG.ou_depf_s, onBooleanClick, {title:LANG.ou_depf_l, modes:CAM}),
camToolInit: uc.newBoolean(LANG.ou_toin_s, onBooleanClick, {title:LANG.ou_toin_l, modes:CAM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM_CAM}),
camFirstZMax: uc.newBoolean(LANG.ou_z1st_s, onBooleanClick, {title:LANG.ou_z1st_l, modes:CAM}),
camForceZMax: uc.newBoolean(LANG.ou_forz_s, onBooleanClick, {title:LANG.ou_forz_l, modes:CAM}),
outputOriginBounds: uc.newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l, modes:LASER}),
outputOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l, modes:LASER}),
camOrigin: uc.newGroup(LANG.co_menu, null, {modes:CAM}), laserMode: uc.newGroup(LANG.sl_menu, $('lzr-slice'), { modes:LASER, driven }),
camOriginTop: uc.newBoolean(LANG.or_topp_s, onBooleanClick, {title:LANG.or_topp_l, modes:CAM}), laserOffset: uc.newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:uc.toFloat}),
camOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l, modes:CAM}), laserSliceHeight: uc.newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:uc.toFloat, trigger: true}),
camSep: uc.newBlank({class:"pop-sep", modes:CAM}), laserSliceHeightMin: uc.newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:uc.toFloat, show:() => { return ui.laserSliceHeight.value == 0 }}),
camOriginOffX: uc.newInput(LANG.co_offx_s, {title:LANG.co_offx_l, convert:uc.toFloat, units:true, modes:CAM}), laserSliceSingle: uc.newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l}),
camOriginOffY: uc.newInput(LANG.co_offy_s, {title:LANG.co_offy_l, convert:uc.toFloat, units:true, modes:CAM}),
camOriginOffZ: uc.newInput(LANG.co_offz_s, {title:LANG.co_offz_l, convert:uc.toFloat, units:true, modes:CAM}),
camExpert: uc.newGroup(LANG.op_xprt_s, null, {group: "cam_expert", modes:CAM, marker: false}), laserLayout: uc.newGroup(LANG.lo_menu, $('lzr-layout'), { modes:LASER, driven }),
camExpertFast: uc.newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, modes:CAM, show: () => !ui.camTrueShadow.checked }), outputTileSpacing: uc.newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:uc.toInt}),
camTrueShadow: uc.newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, modes:CAM, show: () => !ui.camExpertFast.checked }), outputLaserMerged: uc.newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l}),
outputLaserGroup: uc.newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l}),
advanced: uc.newGroup(LANG.ad_menu, null, {modes:FDM}), knife: uc.newGroup(LANG.dk_menu, $('lzr-knife'), { modes:LASER, marker:true, driven }),
outputRetractDist: uc.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:uc.toFloat, modes:FDM}), outputKnifeDepth: uc.newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:uc.toFloat, bound:uc.bound(0.0,5.0)}),
outputRetractSpeed: uc.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:uc.toInt, modes:FDM}), outputKnifePasses: uc.newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:uc.toInt, bound:uc.bound(0,5)}),
outputRetractWipe: uc.newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, bound:uc.bound(0.0,10), convert:uc.toFloat, modes:FDM}), outputKnifeTip: uc.newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:uc.toFloat, bound:uc.bound(0.0,10.0)}),
outputRetractDwell: uc.newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:uc.toInt, modes:FDM}), knifeOn: uc.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ou_drkn_l}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
sliceSolidMinArea: uc.newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:uc.toFloat, modes:FDM}),
outputMinSpeed: uc.newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:uc.bound(1,200), convert:uc.toFloat, modes:FDM}),
outputShortPoly: uc.newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:uc.bound(0,10000), convert:uc.toFloat, modes:FDM}),
outputCoastDist: uc.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:uc.bound(0.0,10), convert:uc.toFloat, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
zHopDistance: uc.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:uc.bound(0,3.0), convert:uc.toFloat, modes:FDM}),
arcTolerance: uc.newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:uc.bound(0,1.0), convert:uc.toFloat, modes:FDM, show:() => { return isNotBelt() }}),
antiBacklash: uc.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:uc.bound(0,3), convert:uc.toInt, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}),
outputLoops: uc.newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:uc.toInt, bound:uc.bound(-1,1000), modes:FDM, show:isBelt}),
outputPurgeTower: uc.newInput(LANG.ad_purg_s, {title:LANG.ad_purg_l, convert:uc.toInt, bound:uc.bound(0,1000), modes:FDM}),
// SLA laserOutput: uc.newGroup(LANG.dk_menu, $('lzr-origin'), { modes:LASER, marker:true, driven }),
slaProc: uc.newGroup(LANG.sa_menu, null, {modes:SLA, group:"sla-slice"}), outputOriginBounds: uc.newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l}),
slaSlice: uc.newInput(LANG.sa_lahe_s, {title:LANG.sa_lahe_l, convert:uc.toFloat, modes:SLA}), outputOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
slaShell: uc.newInput(LANG.sa_shel_s, {title:LANG.sa_shel_l, convert:uc.toFloat, modes:SLA}),
slaOpenTop: uc.newBoolean(LANG.sa_otop_s, onBooleanClick, {title:LANG.sa_otop_l, modes:SLA}),
slaOpenBase: uc.newBoolean(LANG.sa_obas_s, onBooleanClick, {title:LANG.sa_obas_l, modes:SLA}),
// SLA output: uc.newGroup(LANG.ou_menu, $('lzr-output'), { modes:LASER, driven }),
slaOutput: uc.newGroup(LANG.sa_layr_m, null, {modes:SLA, group:"sla-layers"}), outputLaserPower: uc.newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:uc.toInt, bound:uc.bound(1,100)}),
slaLayerOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_lton_l, convert:uc.toFloat, modes:SLA}), outputLaserSpeed: uc.newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:uc.toInt}),
slaLayerOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_ltof_l, convert:uc.toFloat, modes:SLA}), outputLaserZColor: uc.newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, show:() => { return ui.outputLaserMerged.checked === false }}),
slaPeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat, modes:SLA}), outputLaserLayer: uc.newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l}),
slaPeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat, modes:SLA}), outputLaserStack: uc.newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l}),
slaPeelDropRate: uc.newInput(LANG.sa_pldr_s, {title:LANG.sa_pldr_l, convert:uc.toFloat, modes:SLA}),
slaOutput: uc.newGroup(LANG.sa_base_m, null, {modes:SLA, group:"sla-base"}), /** SLA SETTINGS */
slaBaseLayers: uc.newInput(LANG.sa_balc_s, {title:LANG.sa_balc_l, convert:uc.toInt, modes:SLA}), slaProc: uc.newGroup(LANG.sa_menu, $('sla-slice'), { modes:SLA, group:"sla-slice", driven }),
slaBaseOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_bltn_l, convert:uc.toFloat, modes:SLA}), slaSlice: uc.newInput(LANG.sa_lahe_s, {title:LANG.sa_lahe_l, convert:uc.toFloat}),
slaBaseOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_bltf_l, convert:uc.toFloat, modes:SLA}), slaShell: uc.newInput(LANG.sa_shel_s, {title:LANG.sa_shel_l, convert:uc.toFloat}),
slaBasePeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat, modes:SLA}), slaOpenTop: uc.newBoolean(LANG.sa_otop_s, onBooleanClick, {title:LANG.sa_otop_l}),
slaBasePeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat, modes:SLA}), slaOpenBase: uc.newBoolean(LANG.sa_obas_s, onBooleanClick, {title:LANG.sa_obas_l}),
slaFill: uc.newGroup(LANG.sa_infl_m, null, {modes:SLA, group:"sla-infill"}), slaLayers: uc.newGroup(LANG.sa_layr_m, $('sla-layers'), { modes:SLA, group:"sla-layers", driven }),
slaFillDensity: uc.newInput(LANG.sa_ifdn_s, {title:LANG.sa_ifdn_l, convert:uc.toFloat, bound:uc.bound(0,1), modes:SLA}), slaLayerOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_lton_l, convert:uc.toFloat}),
slaFillLine: uc.newInput(LANG.sa_iflw_s, {title:LANG.sa_iflw_l, convert:uc.toFloat, bound:uc.bound(0,5), modes:SLA}), slaLayerOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_ltof_l, convert:uc.toFloat}),
slaPeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat}),
slaPeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat}),
slaPeelDropRate: uc.newInput(LANG.sa_pldr_s, {title:LANG.sa_pldr_l, convert:uc.toFloat}),
slaSupport: uc.newGroup(LANG.sa_supp_m, null, {modes:SLA, group:"sla-support"}), slaBase: uc.newGroup(LANG.sa_base_m, $('sla-base'), { modes:SLA, group:"sla-base", driven }),
slaSupportLayers: uc.newInput(LANG.sa_slyr_s, {title:LANG.sa_slyr_l, convert:uc.toInt, bound:uc.bound(5,100), modes:SLA}), slaBaseLayers: uc.newInput(LANG.sa_balc_s, {title:LANG.sa_balc_l, convert:uc.toInt}),
slaSupportGap: uc.newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:uc.toInt, bound:uc.bound(3,30), modes:SLA}), slaBaseOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_bltn_l, convert:uc.toFloat}),
slaSupportDensity: uc.newInput(LANG.sa_sldn_s, {title:LANG.sa_sldn_l, convert:uc.toFloat, bound:uc.bound(0.01,0.9), modes:SLA}), slaBaseOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_bltf_l, convert:uc.toFloat}),
slaSupportSize: uc.newInput(LANG.sa_slsz_s, {title:LANG.sa_slsz_l, convert:uc.toFloat, bound:uc.bound(0.1,1), modes:SLA}), slaBasePeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat}),
slaSupportPoints: uc.newInput(LANG.sa_slpt_s, {title:LANG.sa_slpt_l, convert:uc.toInt, bound:uc.bound(3,10), modes:SLA}), slaBasePeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat}),
slaSupportEnable: uc.newBoolean(LANG.enable, onBooleanClick, {title:LANG.sl_slen_l, modes:SLA}),
slaOutput: uc.newGroup(LANG.sa_outp_m, null, {modes:SLA, group:"sla-first"}), slaFill: uc.newGroup(LANG.sa_infl_m, $('sla-fill'), { modes:SLA, group:"sla-infill", driven }),
slaFirstOffset: uc.newInput(LANG.sa_opzo_s, {title:LANG.sa_opzo_l, convert:uc.toFloat, bound:uc.bound(0,1), modes:SLA}), slaFillDensity: uc.newInput(LANG.sa_ifdn_s, {title:LANG.sa_ifdn_l, convert:uc.toFloat, bound:uc.bound(0,1)}),
slaAntiAlias: uc.newSelect(LANG.sa_opaa_s, {title:LANG.sa_opaa_l, modes:SLA}, "antialias"), slaFillLine: uc.newInput(LANG.sa_iflw_s, {title:LANG.sa_iflw_l, convert:uc.toFloat, bound:uc.bound(0,5)}),
fdmRanges: $('fdm-ranges'), slaSupport: uc.newGroup(LANG.sa_supp_m, $('sla-support'), { modes:SLA, group:"sla-support", driven }),
slaSupportLayers: uc.newInput(LANG.sa_slyr_s, {title:LANG.sa_slyr_l, convert:uc.toInt, bound:uc.bound(5,100)}),
slaSupportGap: uc.newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:uc.toInt, bound:uc.bound(3,30)}),
slaSupportDensity: uc.newInput(LANG.sa_sldn_s, {title:LANG.sa_sldn_l, convert:uc.toFloat, bound:uc.bound(0.01,0.9)}),
slaSupportSize: uc.newInput(LANG.sa_slsz_s, {title:LANG.sa_slsz_l, convert:uc.toFloat, bound:uc.bound(0.1,1)}),
slaSupportPoints: uc.newInput(LANG.sa_slpt_s, {title:LANG.sa_slpt_l, convert:uc.toInt, bound:uc.bound(3,10)}),
slaSupportEnable: uc.newBoolean(LANG.enable, onBooleanClick, {title:LANG.sl_slen_l}),
slaOutput: uc.newGroup(LANG.sa_outp_m, $('sla-output'), { modes:SLA, group:"sla-first", driven }),
slaFirstOffset: uc.newInput(LANG.sa_opzo_s, {title:LANG.sa_opzo_l, convert:uc.toFloat, bound:uc.bound(0,1)}),
slaAntiAlias: uc.newSelect(LANG.sa_opaa_s, {title:LANG.sa_opaa_l}, "antialias"),
settingsSave: $('settingsSave'), settingsSave: $('settingsSave'),
settingsName: $('settingsName'), settingsName: $('settingsName'),

View file

@ -569,7 +569,6 @@ function platformDeletePost() {
// render list of current widgets // render list of current widgets
function platformChanged() { function platformChanged() {
h.bind($('ws-widgets'), api.widgets.all().map(w => { h.bind($('ws-widgets'), api.widgets.all().map(w => {
console.log('widget ...',w);
let color; let color;
return [ return [
h.button({ h.button({

View file

@ -240,12 +240,12 @@ gapp.register("kiri.ui", [], (root, exports) => {
return el; return el;
} }
function newGroup(label, div, options) { function newGroup(label, div, opt = {}) {
lastDiv = div || lastDiv; lastDiv = div || lastDiv;
return addCollapsableGroup(label, lastDiv, options); // return addCollapsableGroup(label, lastDiv, options);
} // }
function addCollapsableGroup(label, div, opt = {}) { // function addCollapsableGroup(label, div, opt = {}) {
opt.inline = true; opt.inline = true;
@ -253,21 +253,8 @@ gapp.register("kiri.ui", [], (root, exports) => {
let row = DOC.createElement('div'), let row = DOC.createElement('div'),
dbkey = `beta-${prefix}-show-${group}`, dbkey = `beta-${prefix}-show-${group}`,
// popper = !opt.inline && label,
link; link;
// if (popper) {
// let pop = DOC.createElement('div');
// pop.classList.add('set-pop');
// if (opt.class) {
// for (let ce of opt.class.split(' ')) {
// pop.classList.add(ce);
// }
// }
// row.appendChild(pop);
// row.setAttribute("class", "set-group noselect");
// addTo = pop;
// } else {
if (opt.class) { if (opt.class) {
opt.class.split(' ').forEach(ce => { opt.class.split(' ').forEach(ce => {
row.classList.add(ce); row.classList.add(ce);
@ -275,22 +262,18 @@ gapp.register("kiri.ui", [], (root, exports) => {
} else { } else {
row.setAttribute("class", "set-header"); row.setAttribute("class", "set-header");
} }
if (div && opt.driven) {
addModeControls(div, opt);
}
addTo = lastDiv; addTo = lastDiv;
// }
div.appendChild(row); div.appendChild(row);
if (label) { if (label) {
// let l1 = DOC.createElement('hr');
// l1.classList.add('set-header-line');
// row.appendChild(l1);
link = DOC.createElement('a'); link = DOC.createElement('a');
link.appendChild(DOC.createTextNode(label)); link.appendChild(DOC.createTextNode(label));
row.appendChild(link); row.appendChild(link);
let l2 = DOC.createElement('hr');
l2.classList.add('set-header-line');
row.appendChild(l2);
} }
addModeControls(row, opt); addModeControls(row, opt);
@ -756,7 +739,6 @@ gapp.register("kiri.ui", [], (root, exports) => {
} }
} }
if (!ip.convert) ip.convert = raw.bind(ip); if (!ip.convert) ip.convert = raw.bind(ip);
// addModeControls(ip);
return ip; return ip;
} }

View file

@ -1874,8 +1874,10 @@ th, tr, td, label {
} }
.set2-group .set-header a { .set2-group .set-header a {
text-transform: uppercase;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
font-size: smaller;
flex-grow: 1; flex-grow: 1;
} }
.set2-group .set-header hr { .set2-group .set-header hr {

View file

@ -269,7 +269,33 @@
</div> </div>
<!-- <div class="chonk"></div> --> <!-- <div class="chonk"></div> -->
<div id="settings" class="f-col grow"> <div id="settings" class="f-col grow">
<!-- FDM -->
<div id="fdm-layers" class="f-col set2-group mode-fdm"></div> <div id="fdm-layers" class="f-col set2-group mode-fdm"></div>
<div id="fdm-base" class="f-col set2-group mode-fdm"></div>
<div id="fdm-fill" class="f-col set2-group mode-fdm"></div>
<div id="fdm-support" class="f-col set2-group mode-fdm"></div>
<div id="fdm-output" class="f-col set2-group mode-fdm"></div>
<div id="fdm-expert" class="f-col set2-group mode-fdm"></div>
<!-- CAM -->
<div id="cam-tabs" class="f-col set2-group mode-cam"></div>
<div id="cam-stock" class="f-col set2-group mode-cam"></div>
<div id="cam-limits" class="f-col set2-group mode-cam"></div>
<div id="cam-output" class="f-col set2-group mode-cam"></div>
<div id="cam-origin" class="f-col set2-group mode-cam"></div>
<div id="cam-expert" class="f-col set2-group mode-cam"></div>
<!-- LASER -->
<div id="lzr-slice" class="f-col set2-group mode-laser"></div>
<div id="lzr-layout" class="f-col set2-group mode-laser"></div>
<div id="lzr-knife" class="f-col set2-group mode-laser"></div>
<div id="lzr-origin" class="f-col set2-group mode-laser"></div>
<div id="lzr-output" class="f-col set2-group mode-laser"></div>
<!-- SLA -->
<div id="sla-slice" class="f-col set2-group mode-sla"></div>
<div id="sla-layers" class="f-col set2-group mode-sla"></div>
<div id="sla-base" class="f-col set2-group mode-sla"></div>
<div id="sla-fill" class="f-col set2-group mode-sla"></div>
<div id="sla-support" class="f-col set2-group mode-sla"></div>
<div id="sla-output" class="f-col set2-group mode-sla"></div>
</div> </div>
<div class="chonk"></div> <div class="chonk"></div>
</div> </div>