clean up init fn calls

This commit is contained in:
Stewart Allen 2024-05-27 13:53:16 -04:00
commit 933c23fdac
3 changed files with 328 additions and 316 deletions

View file

@ -1535,6 +1535,9 @@ gapp.register("kiri.init", [], (root, exports) => {
function init_one() { function init_one() {
let { event, conf, view, show } = api; let { event, conf, view, show } = api;
let { bound, toInt, toFloat } = uc;
let { newBlank, newButton, newBoolean, newGroup, newInput } = uc;
let { newInput2, newSelect, newText, newRow, newGCode } = uc;
event.emit('init.one'); event.emit('init.one');
@ -1733,349 +1736,356 @@ gapp.register("kiri.init", [], (root, exports) => {
/** Device Browser / Editor */ /** Device Browser / Editor */
device: uc.newGroup(LANG.dv_gr_dev, $('device1'), {group:"ddev", inline:true, class:"noshow"}), device: 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: newInput(LANG.dv_name_s, {title:LANG.dv_name_l, size:"70%", text:true, action:updateDeviceName}),
devbed: uc.newRow([ devbed: newRow([
uc.newLabel(LANG.volume, { class: "grow" }), uc.newLabel(LANG.volume, { class: "grow" }),
uc.newLabel('X'), uc.newLabel('X'),
ui.bedWidth = uc.newInput2({title:LANG.dv_bedw_l, convert:uc.toFloat, size:5, units:true, round:2, action:updateDeviceSize}), ui.bedWidth = newInput2({title:LANG.dv_bedw_l, convert:toFloat, size:5, units:true, round:2, action:updateDeviceSize}),
uc.newLabel('Y'), uc.newLabel('Y'),
ui.bedDepth = uc.newInput2({title:LANG.dv_bedd_l, convert:uc.toFloat, size:5, units:true, round:2, action:updateDeviceSize}), ui.bedDepth = newInput2({title:LANG.dv_bedd_l, convert:toFloat, size:5, units:true, round:2, action:updateDeviceSize}),
uc.newLabel('Z'), uc.newLabel('Z'),
ui.maxHeight = uc.newInput2({title:LANG.dv_bedh_l, convert:uc.toFloat, size:5, modes:FDM_SLA, action:updateDeviceSize}), ui.maxHeight = newInput2({title:LANG.dv_bedh_l, convert:toFloat, size:5, modes:FDM_SLA, action:updateDeviceSize}),
], { class: "var-area" }), ], { class: "var-area" }),
resolutionX: uc.newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:uc.toInt, size:5, modes:SLA}), resolutionX: newInput(LANG.dv_rezx_s, {title:LANG.dv_rezx_l, convert:toInt, size:5, modes:SLA}),
resolutionY: uc.newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:uc.toInt, size:5, modes:SLA}), resolutionY: newInput(LANG.dv_rezy_s, {title:LANG.dv_rezy_l, convert:toInt, size:5, modes:SLA}),
spindleMax: uc.newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:uc.toInt, size:5, modes:CAM, trigger:1}), spindleMax: newInput(LANG.dv_spmx_s, {title:LANG.dv_spmx_l, convert:toInt, size:5, modes:CAM, trigger:1}),
deviceZMax: uc.newInput(LANG.dv_zmax_s, {title:LANG.dv_zmax_l, convert:uc.toInt, size:5, modes:FDM}), deviceZMax: newInput(LANG.dv_zmax_s, {title:LANG.dv_zmax_l, convert:toInt, size:5, modes:FDM}),
gcodeTime: uc.newInput(LANG.dv_time_s, {title:LANG.dv_time_l, convert:uc.toFloat, size:5, modes:FDM}), gcodeTime: newInput(LANG.dv_time_s, {title:LANG.dv_time_l, convert:toFloat, size:5, modes:FDM}),
fdmSep: uc.newBlank({class:"pop-sep", modes:FDM}), separator: newBlank({class:"pop-sep", modes:FDM}),
filamentSource: uc.newSelect(LANG.dv_fsrc_s, {title: LANG.dv_fsrc_l, action: filamentSourceSave, modes:FDM}, "filasrc"), filamentSource: 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: 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: 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, trigger:true, show:isNotBelt}), deviceRound: 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, trigger:true, show:() => !ui.deviceRound.checked}), deviceBelt: 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: 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: newInput(LANG.dv_fila_s, {title:LANG.dv_fila_l, convert:toFloat, modes:FDM}),
extNozzle: uc.newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:uc.toFloat, modes:FDM}), extNozzle: newInput(LANG.dv_nozl_s, {title:LANG.dv_nozl_l, convert:toFloat, modes:FDM}),
extOffsetX: uc.newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:uc.toFloat, modes:FDM}), extOffsetX: newInput(LANG.dv_exox_s, {title:LANG.dv_exox_l, convert:toFloat, modes:FDM}),
extOffsetY: uc.newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:uc.toFloat, modes:FDM}), extOffsetY: newInput(LANG.dv_exoy_s, {title:LANG.dv_exoy_l, convert:toFloat, modes:FDM}),
extSelect: uc.newText(LANG.dv_exts_s, {title:LANG.dv_exts_l, size:14, height:3, area:gcode}), extSelect: 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, size:14, height:3, area:gcode}), extDeselect: newText(LANG.dv_dext_s, {title:LANG.dv_dext_l, size:14, height:3, area:gcode}),
extPad: uc.newBlank({class:"grow", modes:FDM}), extPad: newBlank({class:"grow", modes:FDM}),
extActions: uc.newRow([ extActions: newRow([
ui.extPrev = uc.newButton(undefined, undefined, {icon:'<i class="fas fa-less-than"></i>'}), ui.extPrev = 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 = 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 = 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 = newButton(undefined, undefined, {icon:'<i class="fas fa-greater-than"></i>'})
], {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: 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: newInput(LANG.dv_paid_s, {title:LANG.dv_paid_l, modes:FDM, size:15, text:true}),
palettePing: uc.newInput(LANG.dv_paps_s, {title:LANG.dv_paps_l, modes:FDM, convert:uc.toInt}), palettePing: newInput(LANG.dv_paps_s, {title:LANG.dv_paps_l, modes:FDM, convert:toInt}),
paletteFeed: uc.newInput(LANG.dv_pafe_s, {title:LANG.dv_pafe_l, modes:FDM, convert:uc.toInt}), paletteFeed: newInput(LANG.dv_pafe_s, {title:LANG.dv_pafe_l, modes:FDM, convert:toInt}),
palettePush: uc.newInput(LANG.dv_papl_s, {title:LANG.dv_papl_l, modes:FDM, convert:uc.toInt}), palettePush: newInput(LANG.dv_papl_s, {title:LANG.dv_papl_l, modes:FDM, convert:toInt}),
paletteOffset: uc.newInput(LANG.dv_paof_s, {title:LANG.dv_paof_l, modes:FDM, convert:uc.toInt}), paletteOffset: newInput(LANG.dv_paof_s, {title:LANG.dv_paof_l, modes:FDM, convert:toInt}),
paletteSep: uc.newBlank({class:"pop-sep", modes:FDM}), paletteSep: newBlank({class:"pop-sep", modes:FDM}),
paletteHeat: uc.newInput(LANG.dv_pahe_s, {title:LANG.dv_pahe_l, modes:FDM, convert:uc.toInt}), paletteHeat: newInput(LANG.dv_pahe_s, {title:LANG.dv_pahe_l, modes:FDM, convert:toInt}),
paletteCool: uc.newInput(LANG.dv_paco_s, {title:LANG.dv_paco_l, modes:FDM, convert:uc.toInt}), paletteCool: newInput(LANG.dv_paco_s, {title:LANG.dv_paco_l, modes:FDM, convert:toInt}),
palettePress: uc.newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:uc.toInt}), palettePress: newInput(LANG.dv_pacm_s, {title:LANG.dv_pacm_l, modes:FDM, convert:toInt}),
gcode: uc.newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}), gcode: newGroup(LANG.dv_gr_out, $('device2'), {group:"dgco", inline:true, modes:CAM_LZR}),
gcodeStrip: uc.newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}), gcodeStrip: newBoolean(LANG.dv_strc_s, onBooleanClick, {title:LANG.dv_strc_l, modes:CAM}),
gcodeSpace: uc.newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}), gcodeSpace: newBoolean(LANG.dv_tksp_s, onBooleanClick, {title:LANG.dv_tksp_l, modes:CAM_LZR}),
useLaser: uc.newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}), useLaser: newBoolean(LANG.dv_lazr_s, onBooleanClick, {title:LANG.dv_lazr_l, modes:CAM}),
gcodeFExt: uc.newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LZR, size:7, text:true}), gcodeFExt: newInput(LANG.dv_fext_s, {title:LANG.dv_fext_l, modes:CAM_LZR, size:7, text:true}),
gcodeEd: uc.newGroup(LANG.dv_gr_gco, $('dg'), {group:"dgcp", inline:true, modes:GCODE}), gcodeEd: newGroup(LANG.dv_gr_gco, $('dg'), {group:"dgcp", inline:true, modes:GCODE}),
gcodeMacros: uc.newRow([ gcodeMacros: newRow([
(ui.gcodePre = uc.newGCode(LANG.dv_head_s, {title:LANG.dv_head_l, modes:GCODE, area:gcode})).button, (ui.gcodePre = newGCode(LANG.dv_head_s, {title:LANG.dv_head_l, modes:GCODE, area:gcode})).button,
(ui.gcodePost = uc.newGCode(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:GCODE, area:gcode})).button, (ui.gcodePost = newGCode(LANG.dv_foot_s, {title:LANG.dv_foot_l, modes:GCODE, area:gcode})).button,
(ui.gcodeLayer = uc.newGCode(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, area:gcode})).button, (ui.gcodeLayer = newGCode(LANG.dv_layr_s, {title:LANG.dv_layr_l, modes:FDM, area:gcode})).button,
(ui.gcodeTrack = uc.newGCode(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, area:gcode})).button, (ui.gcodeTrack = newGCode(LANG.dv_prog_s, {title:LANG.dv_prog_l, modes:FDM, area:gcode})).button,
(ui.gcodeFan = uc.newGCode(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, area:gcode})).button, (ui.gcodeFan = newGCode(LANG.dv_fanp_s, {title:LANG.dv_fanp_l, modes:FDM, area:gcode})).button,
(ui.gcodeFeature = uc.newGCode(LANG.dv_feat_s, {title:LANG.dv_feat_l, modes:FDM, area:gcode})).button, (ui.gcodeFeature = newGCode(LANG.dv_feat_s, {title:LANG.dv_feat_l, modes:FDM, area:gcode})).button,
(ui.gcodeLaserOn = uc.newGCode(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, area:gcode})).button, (ui.gcodeLaserOn = newGCode(LANG.dv_lzon_s, {title:LANG.dv_lzon_l, modes:LASER, area:gcode})).button,
(ui.gcodeLaserOff = uc.newGCode(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, area:gcode})).button, (ui.gcodeLaserOff = newGCode(LANG.dv_lzof_s, {title:LANG.dv_lzof_l, modes:LASER, area:gcode})).button,
(ui.gcodeChange = uc.newGCode(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:CAM, area:gcode})).button, (ui.gcodeChange = newGCode(LANG.dv_tool_s, {title:LANG.dv_tool_l, modes:CAM, area:gcode})).button,
(ui.gcodeDwell = uc.newGCode(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, area:gcode})).button, (ui.gcodeDwell = newGCode(LANG.dv_dwll_s, {title:LANG.dv_dwll_l, modes:CAM, area:gcode})).button,
(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 = 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 */ /** Preferences Menu */
lprefs: uc.newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}), lprefs: newGroup(LANG.op_menu, $('prefs-gen1'), {inline: true}),
antiAlias: uc.newBoolean(LANG.op_anta_s, booleanSave, {title:LANG.op_anta_l}), antiAlias: 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: newBoolean(LANG.op_invr_s, booleanSave, {title:LANG.op_invr_l}),
ortho: uc.newBoolean(LANG.op_orth_s, booleanSave, {title:LANG.op_orth_l}), ortho: newBoolean(LANG.op_orth_s, booleanSave, {title:LANG.op_orth_l}),
dark: uc.newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}), dark: newBoolean(LANG.op_dark_s, booleanSave, {title:LANG.op_dark_l}),
devel: uc.newBoolean(LANG.op_devl_s, booleanSave, {title:LANG.op_devl_l}), devel: newBoolean(LANG.op_devl_s, booleanSave, {title:LANG.op_devl_l}),
lprefs: uc.newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}), lprefs: newGroup(LANG.op_disp, $('prefs-gen2'), {inline: true}),
showOrigin: uc.newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}), showOrigin: newBoolean(LANG.op_shor_s, booleanSave, {title:LANG.op_shor_l}),
showRulers: uc.newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}), showRulers: newBoolean(LANG.op_shru_s, booleanSave, {title:LANG.op_shru_l}),
showSpeeds: uc.newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}), showSpeeds: newBoolean(LANG.op_sped_s, speedSave, {title:LANG.op_sped_l}),
decals: uc.newBoolean(LANG.op_decl_s, booleanSave, {title:LANG.op_decl_s}), decals: newBoolean(LANG.op_decl_s, booleanSave, {title:LANG.op_decl_s}),
shiny: uc.newBoolean(LANG.op_shny_s, booleanSave, {title:LANG.op_shny_l, modes:FDM}), shiny: newBoolean(LANG.op_shny_s, booleanSave, {title:LANG.op_shny_l, modes:FDM}),
lineType: uc.newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"), lineType: newSelect(LANG.op_line_s, {title: LANG.op_line_l, action: lineTypeSave, modes:FDM}, "linetype"),
animesh: uc.newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"), animesh: newSelect(LANG.op_anim_s, {title: LANG.op_anim_l, action: aniMeshSave, modes:CAM}, "animesh"),
units: uc.newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM, trace:true}, "units"), units: newSelect(LANG.op_unit_s, {title: LANG.op_unit_l, action: unitsSave, modes:CAM, trace:true}, "units"),
layout: uc.newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}), layout: newGroup(LANG.lo_menu, $('prefs-lay'), {inline: true}),
autoSave: uc.newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}), autoSave: newBoolean(LANG.op_save_s, booleanSave, {title:LANG.op_save_l}),
autoLayout: uc.newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}), autoLayout: newBoolean(LANG.op_auto_s, booleanSave, {title:LANG.op_auto_l}),
freeLayout: uc.newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}), freeLayout: newBoolean(LANG.op_free_s, booleanSave, {title:LANG.op_free_l}),
spaceRandoX: uc.newBoolean(LANG.op_spcx_s, booleanSave, {title:LANG.op_spcx_l, show:isBelt}), spaceRandoX: newBoolean(LANG.op_spcx_s, booleanSave, {title:LANG.op_spcx_l, show:isBelt}),
spaceLayout: uc.newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:uc.toFloat, size:3, units:true}), spaceLayout: newInput(LANG.op_spcr_s, {title:LANG.op_spcr_l, convert:toFloat, size:3, units:true}),
export: uc.newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}), export: newGroup(LANG.xp_menu, $('prefs-xpo'), {inline: true}),
exportLocal: uc.newBoolean(`Grid:Local`, booleanSave, {title:LANG.op_exgl_l}), exportLocal: newBoolean(`Grid:Local`, booleanSave, {title:LANG.op_exgl_l}),
exportGhost: uc.newBoolean(`Grid:Host`, booleanSave, {title:LANG.op_exgh_l}), exportGhost: newBoolean(`Grid:Host`, booleanSave, {title:LANG.op_exgh_l}),
exportOcto: uc.newBoolean(`OctoPrint`, booleanSave, {title:LANG.op_exop_l}), exportOcto: newBoolean(`OctoPrint`, booleanSave, {title:LANG.op_exop_l}),
exportThumb: uc.newBoolean(`Thumbnail`, booleanSave, {modes:FDM}), exportThumb: newBoolean(`Thumbnail`, booleanSave, {modes:FDM}),
exportPreview: uc.newBoolean(`Code Preview`, booleanSave), exportPreview: newBoolean(`Code Preview`, booleanSave),
parts: uc.newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}), parts: newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}),
detail: uc.newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"), detail: newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"),
healMesh: uc.newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}), healMesh: newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}),
threaded: uc.newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:FDM_CAM_SLA}), threaded: newBoolean(LANG.pt_thrd_s, booleanSave, {title: LANG.pt_thrd_l, modes:FDM_CAM_SLA}),
assembly: uc.newBoolean(LANG.pt_assy_s, booleanSave, {title: LANG.pt_assy_l, modes:FDM_CAM_SLA}), assembly: newBoolean(LANG.pt_assy_s, booleanSave, {title: LANG.pt_assy_l, modes:FDM_CAM_SLA}),
prefadd: uc.checkpoint($('prefs-add')), prefadd: uc.checkpoint($('prefs-add')),
/** FDM Settings */ /** FDM Settings */
process: uc.newGroup(LANG.sl_menu, $('fdm-layers'), { modes:FDM, driven }), process: newGroup(LANG.sl_menu, $('fdm-layers'), { modes:FDM, driven }),
sliceHeight: uc.newInput(LANG.sl_lahi_s, { title:LANG.sl_lahi_l, convert:uc.toFloat }), sliceHeight: newInput(LANG.sl_lahi_s, { title:LANG.sl_lahi_l, convert:toFloat }),
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}), sliceMinHeight: newInput(LANG.ad_minl_s, { title:LANG.ad_minl_l, bound:bound(0,3.0), convert:toFloat, show: () => ui.sliceAdaptive.checked}),
sliceShells: uc.newInput(LANG.sl_shel_s, { title:LANG.sl_shel_l, convert:uc.toFloat }), sliceShells: newInput(LANG.sl_shel_s, { title:LANG.sl_shel_l, convert:toFloat }),
sliceLineWidth: uc.newInput(LANG.sl_line_s, { title:LANG.sl_line_l, convert:uc.toFloat, bound:uc.bound(0,5) }), sliceLineWidth: newInput(LANG.sl_line_s, { title:LANG.sl_line_l, convert:toFloat, bound:bound(0,5) }),
outputFanLayer: uc.newInput(LANG.ou_fanl_s, { title:LANG.ou_fanl_l, convert:uc.toInt, bound:uc.bound(0,255) }), outputFanLayer: newInput(LANG.ou_fanl_s, { title:LANG.ou_fanl_l, convert:toInt, bound:bound(0,255) }),
sliceTopLayers: uc.newInput(LANG.sl_ltop_s, { title:LANG.sl_ltop_l, convert:uc.toInt }), sliceTopLayers: newInput(LANG.sl_ltop_s, { title:LANG.sl_ltop_l, convert:toInt }),
sliceBottomLayers: uc.newInput(LANG.sl_lbot_s, { title:LANG.sl_lbot_l, convert:uc.toInt }), sliceBottomLayers: newInput(LANG.sl_lbot_s, { title:LANG.sl_lbot_l, convert:toInt }),
sliceDetectThin: uc.newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"), separator: newBlank({ class:"set-sep", driven }),
sliceAdaptive: uc.newBoolean(LANG.ad_adap_s, onBooleanClick, {title: LANG.ad_adap_l, trigger: true}), sliceDetectThin: newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"),
sliceAdaptive: newBoolean(LANG.ad_adap_s, onBooleanClick, {title: LANG.ad_adap_l, trigger: true}),
firstLayer: uc.newGroup(LANG.fl_menu, $('fdm-base'), { modes:FDM, driven }), firstLayer: newGroup(LANG.fl_menu, $('fdm-base'), { modes:FDM, driven }),
firstSliceHeight: uc.newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:uc.toFloat, show:isNotBelt}), firstSliceHeight: newInput(LANG.fl_lahi_s, {title:LANG.fl_lahi_l, convert:toFloat, show:isNotBelt}),
firstLayerNozzleTemp:uc.newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:uc.toInt, show:isNotBelt}), firstLayerNozzleTemp:newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:toInt, show:isNotBelt}),
firstLayerBedTemp: uc.newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:uc.toInt, show:isNotBelt}), firstLayerBedTemp: newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:toInt, 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: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255), show:isBelt}),
firstLayerYOffset: uc.newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:uc.toFloat, show:isBelt}), firstLayerYOffset: newInput(LANG.fl_zoff_s, {title:LANG.fl_zoff_l, convert:toFloat, show:isBelt}),
firstLayerFlatten: uc.newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:uc.toFloat, show:isBelt}), firstLayerFlatten: newInput(LANG.fl_flat_s, {title:LANG.fl_flat_l, convert:toFloat, show:isBelt}),
firstLayerRate: uc.newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:uc.toFloat}), firstLayerRate: newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:toFloat}),
firstLayerFillRate: uc.newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:uc.toFloat, show:isNotBelt}), firstLayerFillRate: newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:toFloat, show:isNotBelt}),
firstLayerLineMult: uc.newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:uc.toFloat, bound:uc.bound(0.5,2), show:isNotBelt}), firstLayerLineMult: newInput(LANG.fl_sfac_s, {title:LANG.fl_sfac_l, convert:toFloat, bound:bound(0.5,2), show:isNotBelt}),
firstLayerPrintMult: uc.newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:uc.toFloat}), firstLayerPrintMult: newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:toFloat}),
firstLayerBrim: uc.newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:uc.toInt, show:isBelt}), firstLayerBrim: newInput(LANG.fl_brim_s, {title:LANG.fl_brim_l, convert:toInt, show:isBelt}),
firstLayerBrimIn: uc.newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:uc.toInt, show:isBelt}), firstLayerBrimIn: newInput(LANG.fl_brin_s, {title:LANG.fl_brin_l, convert:toInt, show:isBelt}),
firstLayerBrimTrig: uc.newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:uc.toInt, show:isBelt}), firstLayerBrimTrig: newInput(LANG.fl_brmn_s, {title:LANG.fl_brmn_l, convert:toInt, show:isBelt}),
firstLayerBrimGap: uc.newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:uc.toFloat, show:isBelt}), firstLayerBrimGap: newInput(LANG.fl_brgp_s, {title:LANG.fl_brgp_l, convert:toFloat, show:isBelt}),
firstLayerBeltLead: uc.newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:uc.toFloat, show:isBelt}), firstLayerBeltLead: newInput(LANG.fl_bled_s, {title:LANG.fl_bled_l, convert:toFloat, show:isBelt}),
firstLayerBeltBump: uc.newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:uc.toFloat, bound:uc.bound(0, 10), show:isBelt}), firstLayerBeltBump: newInput(LANG.fl_blmp_s, {title:LANG.fl_blmp_l, convert:toFloat, bound:bound(0, 10), show:isBelt}),
outputBrimCount: uc.newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:uc.toInt, show:isNotBelt}), outputBrimCount: newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:toInt, show:isNotBelt}),
outputBrimOffset: uc.newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:uc.toFloat, show:isNotBelt}), outputBrimOffset: newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:toFloat, show:isNotBelt}),
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() }), outputRaftSpacing: newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:toFloat, bound:bound(0.0,3.0), show: () => ui.outputRaft.checked && isNotBelt() }),
outputRaft: uc.newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger: true, show:() => isNotBelt()}), separator: newBlank({ class:"set-sep", driven }),
outputDraftShield: uc.newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, trigger: true, show:() => isNotBelt()}), outputRaft: newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger: true, show:() => isNotBelt()}),
outputDraftShield: newBoolean(LANG.fr_draf_s, onBooleanClick, {title:LANG.fr_draf_l, trigger: true, show:() => isNotBelt()}),
fdmInfill: uc.newGroup(LANG.fi_menu, $('fdm-fill'), { modes:FDM, driven }), fdmInfill: newGroup(LANG.fi_menu, $('fdm-fill'), { modes:FDM, driven }),
sliceFillType: uc.newSelect(LANG.fi_type, {trigger:true}, "infill"), sliceFillType: 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)}), sliceFillSparse: newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:toFloat, bound: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}), sliceFillRepeat: newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:toInt, bound:bound(1,10), show:fillShow}),
sliceFillOverlap: uc.newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}), sliceFillOverlap: newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:toFloat, bound:bound(0.0,2.0)}),
sliceFillRate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt, bound:uc.bound(0,500)}), sliceFillRate: newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:toInt, bound:bound(0,500)}),
sliceSolidRate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt, bound:uc.bound(0,500)}), sliceSolidRate: newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:toInt, bound:bound(0,500)}),
sliceFillGrow: uc.newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:uc.toFloat}), sliceFillGrow: newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:toFloat}),
sliceFillAngle: uc.newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:uc.toFloat}), sliceFillAngle: newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:toFloat}),
fdmSupport: uc.newGroup(LANG.sp_menu, $('fdm-support'), { modes:FDM, marker:false, driven }), fdmSupport: newGroup(LANG.sp_menu, $('fdm-support'), { modes:FDM, marker:false, driven }),
sliceSupportNozzle: uc.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l}, "extruders"), sliceSupportNozzle: 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)}), sliceSupportDensity: newInput(LANG.sp_dens_s, {title:LANG.sp_dens_l, convert:toFloat, bound:bound(0.0,1.0)}),
sliceSupportSize: uc.newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:uc.bound(1.0,200.0), convert:uc.toFloat}), sliceSupportSize: newInput(LANG.sp_size_s, {title:LANG.sp_size_l, bound:bound(1.0,200.0), convert:toFloat}),
sliceSupportOffset: uc.newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat}), sliceSupportOffset: newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, bound:bound(0.0,200.0), convert:toFloat}),
sliceSupportGap: uc.newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:uc.bound(0,5), convert:uc.toInt}), sliceSupportGap: newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, bound:bound(0,5), convert:toInt}),
sliceSupportArea: uc.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:uc.bound(0.0,200.0), convert:uc.toFloat}), sliceSupportArea: newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:bound(0.0,200.0), convert:toFloat}),
sliceSupportExtra: uc.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat}), sliceSupportExtra: newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:bound(0.0,10.0), convert:toFloat}),
sliceSupportGrow: uc.newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, bound:uc.bound(0.0,10.0), convert:uc.toFloat}), sliceSupportGrow: newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, bound:bound(0.0,10.0), convert:toFloat}),
sliceSupportAngle: uc.newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:uc.bound(0.0,90.0), convert:uc.toFloat}), sliceSupportAngle: newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:bound(0.0,90.0), convert:toFloat}),
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}), sliceSupportSpan: newInput(LANG.sp_span_s, {title:LANG.sp_span_l, bound:bound(0.0,200.0), convert:toFloat, show:() => ui.sliceSupportEnable.checked}),
sliceSupportEnable: uc.newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, show:isNotBelt}), separator: newBlank({ class:"set-sep", driven }),
sliceSupportOutline: uc.newBoolean(LANG.sp_outl_s, onBooleanClick, {title:LANG.sp_outl_l}), sliceSupportEnable: newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, show:isNotBelt}),
separator: uc.newBlank({ class:"set-sep", driven }), sliceSupportOutline: newBoolean(LANG.sp_outl_s, onBooleanClick, {title:LANG.sp_outl_l}),
sliceSupportGen: uc.newRow([ separator: newBlank({ class:"set-sep", driven }),
ui.ssaGen = uc.newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"}) sliceSupportGen: newRow([
ui.ssaGen = 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" }),
sliceSupportManual: uc.newRow([ sliceSupportManual: newRow([
(ui.ssmAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})), (ui.ssmAdd = 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 = 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 = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
], {class:"ext-buttons f-row"}), ], {class:"ext-buttons f-row"}),
fdmOutput: uc.newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven }), fdmOutput: newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven }),
outputTemp: uc.newInput(LANG.ou_nozl_s, {title:LANG.ou_nozl_l, convert:uc.toInt}), outputTemp: newInput(LANG.ou_nozl_s, {title:LANG.ou_nozl_l, convert:toInt}),
outputBedTemp: uc.newInput(LANG.ou_bedd_s, {title:LANG.ou_bedd_l, convert:uc.toInt}), outputBedTemp: newInput(LANG.ou_bedd_s, {title:LANG.ou_bedd_l, convert:toInt}),
outputFanSpeed: uc.newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:uc.toInt, bound:uc.bound(0,255)}), outputFanSpeed: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255)}),
outputFeedrate: uc.newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:uc.toInt}), outputFeedrate: newInput(LANG.ou_feed_s, {title:LANG.ou_feed_l, convert:toInt}),
outputFinishrate: uc.newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:uc.toInt}), outputFinishrate: newInput(LANG.ou_fini_s, {title:LANG.ou_fini_l, convert:toInt}),
outputSeekrate: uc.newInput(LANG.ou_move_s, {title:LANG.ou_move_l, convert:uc.toInt}), outputSeekrate: newInput(LANG.ou_move_s, {title:LANG.ou_move_l, convert:toInt}),
outputShellMult: uc.newInput(LANG.ou_shml_s, {title:LANG.ou_exml_l, convert:uc.toFloat, bound:uc.bound(0.0,2.0)}), outputShellMult: newInput(LANG.ou_shml_s, {title:LANG.ou_exml_l, convert:toFloat, bound: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)}), outputFillMult: newInput(LANG.ou_flml_s, {title:LANG.ou_exml_l, convert:toFloat, bound: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)}), outputSparseMult: newInput(LANG.ou_spml_s, {title:LANG.ou_exml_l, convert:toFloat, bound:bound(0.0,2.0)}),
sliceShellOrder: uc.newSelect(LANG.sl_ordr_s, {title:LANG.sl_ordr_l}, "shell"), sliceShellOrder: newSelect(LANG.sl_ordr_s, {title:LANG.sl_ordr_l}, "shell"),
sliceLayerStart: uc.newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"), sliceLayerStart: newSelect(LANG.sl_strt_s, {title:LANG.sl_strt_l}, "start"),
outputLayerRetract: uc.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}), separator: newBlank({ class:"set-sep", driven }),
outputAvoidGaps: uc.newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}), outputLayerRetract: newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l}),
outputAlternating: uc.newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}), outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}),
outputBeltFirst: uc.newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}), outputAlternating: newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}),
outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show: isBelt}),
fdmExpert: uc.newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven }), fdmExpert: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven }),
outputRetractDist: uc.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:uc.toFloat}), outputRetractDist: newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:toFloat}),
outputRetractSpeed: uc.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:uc.toInt}), outputRetractSpeed: newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:toInt}),
outputRetractWipe: uc.newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, bound:uc.bound(0.0,10), convert:uc.toFloat}), outputRetractWipe: newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, bound:bound(0.0,10), convert:toFloat}),
outputRetractDwell: uc.newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:uc.toInt}), outputRetractDwell: newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:toInt}),
sliceSolidMinArea: uc.newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:uc.toFloat}), sliceSolidMinArea: newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:toFloat}),
outputMinSpeed: uc.newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:uc.bound(1,200), convert:uc.toFloat}), outputMinSpeed: newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:bound(1,200), convert:toFloat}),
outputShortPoly: uc.newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:uc.bound(0,10000), convert:uc.toFloat}), outputShortPoly: newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:bound(0,10000), convert:toFloat}),
outputCoastDist: uc.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:uc.bound(0.0,10), convert:uc.toFloat}), outputCoastDist: newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:bound(0.0,10), convert:toFloat}),
zHopDistance: uc.newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:uc.bound(0,3.0), convert:uc.toFloat}), zHopDistance: newInput(LANG.ad_zhop_s, {title:LANG.ad_zhop_l, bound:bound(0,3.0), convert: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() }}), arcTolerance: newInput(LANG.ad_arct_s, {title:LANG.ad_arct_l, bound:bound(0,1.0), convert:toFloat, show:() => { return isNotBelt() }}),
antiBacklash: uc.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:uc.bound(0,3), convert:uc.toInt}), antiBacklash: newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:bound(0,3), convert:toInt}),
outputLoops: uc.newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:uc.toInt, bound:uc.bound(-1,1000), show:isBelt}), outputLoops: newInput(LANG.ag_loop_s, {title:LANG.ag_loop_l, convert:toInt, bound: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)}), outputPurgeTower: newInput(LANG.ad_purg_s, {title:LANG.ad_purg_l, convert:toInt, bound:bound(0,1000)}),
fdmRanges: $('fdm-ranges'), fdmRanges: $('fdm-ranges'),
/** CAM Settings */ /** CAM Settings */
camTabs: uc.newGroup(LANG.ct_menu, $('cam-tabs'), { modes:CAM, marker:true, driven }), camTabs: 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}), camTabsWidth: newInput(LANG.ct_wdth_s, {title:LANG.ct_wdth_l, convert:toFloat, bound: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}), camTabsHeight: newInput(LANG.ct_hght_s, {title:LANG.ct_hght_l, convert:toFloat, bound: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}), camTabsDepth: newInput(LANG.ct_dpth_s, {title:LANG.ct_dpth_l, convert:toFloat, bound:bound(0.005,100), units:true}),
camTabsMidline: uc.newBoolean(LANG.ct_midl_s, onBooleanClick, {title:LANG.ct_midl_l}), separator: newBlank({ class:"set-sep", driven }),
separator: uc.newBlank({ class:"set-sep", driven }), camTabsMidline: newBoolean(LANG.ct_midl_s, onBooleanClick, {title:LANG.ct_midl_l}),
camTabsManual: uc.newRow([ separator: newBlank({ class:"set-sep", driven }),
(ui.tabAdd = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})), camTabsManual: newRow([
(ui.tabDun = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})), (ui.tabAdd = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),
(ui.tabClr = uc.newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'})) (ui.tabDun = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-check"></i>'})),
(ui.tabClr = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-trash-alt"></i>'}))
], {class:"ext-buttons f-row"}), ], {class:"ext-buttons f-row"}),
camStock: uc.newGroup(LANG.cs_menu, $('cam-stock'), { modes:CAM, driven }), camStock: 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), units:true}), camStockX: newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:toFloat, bound: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), units:true}), camStockY: newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:toFloat, bound: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), units:true}), camStockZ: newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:toFloat, bound:bound(0,9999), units:true}),
camStockOffset: uc.newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l}), separator: newBlank({ class:"set-sep", driven }),
camStockClipTo: uc.newBoolean(LANG.cs_clip_s, onBooleanClick, {title:LANG.cs_clip_l}), camStockOffset: newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l}),
camStockIndexed: uc.newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}), camStockClipTo: newBoolean(LANG.cs_clip_s, onBooleanClick, {title:LANG.cs_clip_l}),
camStockIndexGrid: uc.newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}), camStockIndexed: newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}),
camStockIndexGrid: newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}),
camLimits: uc.newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven }), camLimits: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven }),
camZAnchor: uc.newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, trace:true, show:() => !ui.camStockIndexed.checked}, "zanchor"), camZAnchor: newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, trace:true, show:() => !ui.camStockIndexed.checked}, "zanchor"),
camZOffset: uc.newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:uc.toFloat, units:true}), camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units:true}),
camZBottom: uc.newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:uc.toFloat, units:true, trigger: true}), camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, 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: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), 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}), camZClearance: newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:toFloat, bound:bound(0.01,100), units:true}),
camFastFeedZ: uc.newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:uc.toFloat, units:true}), camFastFeedZ: newInput(LANG.cc_rzpd_s, {title:LANG.cc_rzpd_l, convert:toFloat, units:true}),
camFastFeed: uc.newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:uc.toFloat, units:true}), camFastFeed: newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:toFloat, units:true}),
camOutput: uc.newGroup(LANG.ou_menu, $('cam-output'), { modes:CAM, driven }), camOutput: newGroup(LANG.ou_menu, $('cam-output'), { modes:CAM, driven }),
camConventional: uc.newBoolean(LANG.ou_conv_s, onBooleanClick, {title:LANG.ou_conv_l}), camConventional: newBoolean(LANG.ou_conv_s, onBooleanClick, {title:LANG.ou_conv_l}),
camEaseDown: uc.newBoolean(LANG.cr_ease_s, onBooleanClick, {title:LANG.cr_ease_l}), camEaseDown: newBoolean(LANG.cr_ease_s, onBooleanClick, {title:LANG.cr_ease_l}),
camDepthFirst: uc.newBoolean(LANG.ou_depf_s, onBooleanClick, {title:LANG.ou_depf_l}), camDepthFirst: newBoolean(LANG.ou_depf_s, onBooleanClick, {title:LANG.ou_depf_l}),
camToolInit: uc.newBoolean(LANG.ou_toin_s, onBooleanClick, {title:LANG.ou_toin_l}), camToolInit: newBoolean(LANG.ou_toin_s, onBooleanClick, {title:LANG.ou_toin_l}),
camFirstZMax: uc.newBoolean(LANG.ou_z1st_s, onBooleanClick, {title:LANG.ou_z1st_l}), camFirstZMax: newBoolean(LANG.ou_z1st_s, onBooleanClick, {title:LANG.ou_z1st_l}),
camForceZMax: uc.newBoolean(LANG.ou_forz_s, onBooleanClick, {title:LANG.ou_forz_l}), camForceZMax: newBoolean(LANG.ou_forz_s, onBooleanClick, {title:LANG.ou_forz_l}),
camOrigin: uc.newGroup(LANG.co_menu, $('cam-origin'), { modes:CAM, driven }), camOrigin: newGroup(LANG.co_menu, $('cam-origin'), { modes:CAM, driven }),
camOriginTop: uc.newBoolean(LANG.or_topp_s, onBooleanClick, {title:LANG.or_topp_l}), camOriginOffX: newInput(LANG.co_offx_s, {title:LANG.co_offx_l, convert:toFloat, units:true}),
camOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}), camOriginOffY: newInput(LANG.co_offy_s, {title:LANG.co_offy_l, convert:toFloat, units:true}),
camOriginOffX: uc.newInput(LANG.co_offx_s, {title:LANG.co_offx_l, convert:uc.toFloat, units:true}), camOriginOffZ: newInput(LANG.co_offz_s, {title:LANG.co_offz_l, convert:toFloat, units:true}),
camOriginOffY: uc.newInput(LANG.co_offy_s, {title:LANG.co_offy_l, convert:uc.toFloat, units:true}), separator: newBlank({ class:"set-sep", driven }),
camOriginOffZ: uc.newInput(LANG.co_offz_s, {title:LANG.co_offz_l, convert:uc.toFloat, units:true}), camOriginTop: newBoolean(LANG.or_topp_s, onBooleanClick, {title:LANG.or_topp_l}),
camOriginCenter: newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
camExpert: uc.newGroup(LANG.op_xprt_s, $('cam-expert'), { group: "cam_expert", modes:CAM, marker: false, driven }), camExpert: newGroup(LANG.op_xprt_s, $('cam-expert'), { group: "cam_expert", modes:CAM, marker: false, driven }),
camExpertFast: uc.newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, show: () => !ui.camTrueShadow.checked }), camExpertFast: newBoolean(LANG.cx_fast_s, onBooleanClick, {title:LANG.cx_fast_l, show: () => !ui.camTrueShadow.checked }),
camTrueShadow: uc.newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, show: () => !ui.camExpertFast.checked }), camTrueShadow: newBoolean(LANG.cx_true_s, onBooleanClick, {title:LANG.cx_true_l, show: () => !ui.camExpertFast.checked }),
/** LASER Settings */ /** LASER Settings */
laserMode: uc.newGroup(LANG.sl_menu, $('lzr-slice'), { modes:LASER, driven }), laserMode: newGroup(LANG.sl_menu, $('lzr-slice'), { modes:LASER, driven }),
laserOffset: uc.newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:uc.toFloat}), laserOffset: newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:toFloat}),
laserSliceHeight: uc.newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:uc.toFloat, trigger: true}), laserSliceHeight: newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:toFloat, trigger: true}),
laserSliceHeightMin: uc.newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:uc.toFloat, show:() => { return ui.laserSliceHeight.value == 0 }}), laserSliceHeightMin: newInput(LANG.ls_lahm_s, {title:LANG.ls_lahm_l, convert:toFloat, show:() => { return ui.laserSliceHeight.value == 0 }}),
laserSliceSingle: uc.newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l}), separator: newBlank({ class:"set-sep", driven }),
laserSliceSingle: newBoolean(LANG.ls_sngl_s, onBooleanClick, {title:LANG.ls_sngl_l}),
laserLayout: uc.newGroup(LANG.lo_menu, $('lzr-layout'), { modes:LASER, driven }), laserLayout: newGroup(LANG.lo_menu, $('lzr-layout'), { modes:LASER, driven }),
outputTileSpacing: uc.newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:uc.toInt}), outputTileSpacing: newInput(LANG.ou_spac_s, {title:LANG.ou_spac_l, convert:toInt}),
outputLaserMerged: uc.newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l}), outputLaserMerged: newBoolean(LANG.ou_mrgd_s, onBooleanClick, {title:LANG.ou_mrgd_l}),
outputLaserGroup: uc.newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l}), outputLaserGroup: newBoolean(LANG.ou_grpd_s, onBooleanClick, {title:LANG.ou_grpd_l}),
knife: uc.newGroup(LANG.dk_menu, $('lzr-knife'), { modes:LASER, marker:true, driven }), knife: newGroup(LANG.dk_menu, $('lzr-knife'), { modes:LASER, marker:true, driven }),
outputKnifeDepth: uc.newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:uc.toFloat, bound:uc.bound(0.0,5.0)}), outputKnifeDepth: newInput(LANG.dk_dpth_s, {title:LANG.dk_dpth_l, convert:toFloat, bound:bound(0.0,5.0)}),
outputKnifePasses: uc.newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:uc.toInt, bound:uc.bound(0,5)}), outputKnifePasses: newInput(LANG.dk_pass_s, {title:LANG.dk_pass_l, convert:toInt, bound:bound(0,5)}),
outputKnifeTip: uc.newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:uc.toFloat, bound:uc.bound(0.0,10.0)}), outputKnifeTip: newInput(LANG.dk_offs_s, {title:LANG.dk_offs_l, convert:toFloat, bound:bound(0.0,10.0)}),
knifeOn: uc.newBoolean(LANG.enable, onBooleanClick, {title:LANG.ou_drkn_l}), separator: newBlank({ class:"set-sep", driven }),
knifeOn: newBoolean(LANG.enable, onBooleanClick, {title:LANG.ou_drkn_l}),
laserOutput: uc.newGroup(LANG.dk_menu, $('lzr-origin'), { modes:LASER, marker:true, driven }), laserOutput: newGroup(LANG.ou_menu, $('lzr-output'), { modes:LASER, driven }),
outputOriginBounds: uc.newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l}), outputLaserPower: newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:toInt, bound:bound(1,100)}),
outputOriginCenter: uc.newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}), outputLaserSpeed: newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:toInt}),
separator: newBlank({ class:"set-sep", driven }),
output: uc.newGroup(LANG.ou_menu, $('lzr-output'), { modes:LASER, driven }), outputOriginBounds: newBoolean(LANG.or_bnds_s, onBooleanClick, {title:LANG.or_bnds_l}),
outputLaserPower: uc.newInput(LANG.ou_powr_s, {title:LANG.ou_powr_l, convert:uc.toInt, bound:uc.bound(1,100)}), outputOriginCenter: newBoolean(LANG.or_cntr_s, onBooleanClick, {title:LANG.or_cntr_l}),
outputLaserSpeed: uc.newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:uc.toInt}), separator: newBlank({ class:"set-sep", driven }),
outputLaserZColor: uc.newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, show:() => { return ui.outputLaserMerged.checked === false }}), outputLaserZColor: newBoolean(LANG.ou_layo_s, onBooleanClick, {title:LANG.ou_layo_l, show:() => { return ui.outputLaserMerged.checked === false }}),
outputLaserLayer: uc.newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l}), outputLaserLayer: newBoolean(LANG.ou_layr_s, onBooleanClick, {title:LANG.ou_layr_l}),
outputLaserStack: uc.newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l}), outputLaserStack: newBoolean(LANG.ou_lays_s, onBooleanClick, {title:LANG.ou_lays_l}),
/** SLA SETTINGS */ /** SLA SETTINGS */
slaProc: uc.newGroup(LANG.sa_menu, $('sla-slice'), { modes:SLA, group:"sla-slice", driven }),
slaSlice: uc.newInput(LANG.sa_lahe_s, {title:LANG.sa_lahe_l, convert:uc.toFloat}),
slaShell: uc.newInput(LANG.sa_shel_s, {title:LANG.sa_shel_l, convert:uc.toFloat}),
slaOpenTop: uc.newBoolean(LANG.sa_otop_s, onBooleanClick, {title:LANG.sa_otop_l}),
slaOpenBase: uc.newBoolean(LANG.sa_obas_s, onBooleanClick, {title:LANG.sa_obas_l}),
slaLayers: uc.newGroup(LANG.sa_layr_m, $('sla-layers'), { modes:SLA, group:"sla-layers", driven }), slaProc: newGroup(LANG.sa_menu, $('sla-slice'), { modes:SLA, group:"sla-slice", driven }),
slaLayerOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_lton_l, convert:uc.toFloat}), slaSlice: newInput(LANG.sa_lahe_s, {title:LANG.sa_lahe_l, convert:toFloat}),
slaLayerOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_ltof_l, convert:uc.toFloat}), slaShell: newInput(LANG.sa_shel_s, {title:LANG.sa_shel_l, convert:toFloat}),
slaPeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat}), slaOpenTop: newBoolean(LANG.sa_otop_s, onBooleanClick, {title:LANG.sa_otop_l}),
slaPeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat}), slaOpenBase: newBoolean(LANG.sa_obas_s, onBooleanClick, {title:LANG.sa_obas_l}),
slaPeelDropRate: uc.newInput(LANG.sa_pldr_s, {title:LANG.sa_pldr_l, convert:uc.toFloat}),
slaBase: uc.newGroup(LANG.sa_base_m, $('sla-base'), { modes:SLA, group:"sla-base", driven }), slaLayers: newGroup(LANG.sa_layr_m, $('sla-layers'), { modes:SLA, group:"sla-layers", driven }),
slaBaseLayers: uc.newInput(LANG.sa_balc_s, {title:LANG.sa_balc_l, convert:uc.toInt}), slaLayerOn: newInput(LANG.sa_lton_s, {title:LANG.sa_lton_l, convert:toFloat}),
slaBaseOn: uc.newInput(LANG.sa_lton_s, {title:LANG.sa_bltn_l, convert:uc.toFloat}), slaLayerOff: newInput(LANG.sa_ltof_s, {title:LANG.sa_ltof_l, convert:toFloat}),
slaBaseOff: uc.newInput(LANG.sa_ltof_s, {title:LANG.sa_bltf_l, convert:uc.toFloat}), slaPeelDist: newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:toFloat}),
slaBasePeelDist: uc.newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:uc.toFloat}), slaPeelLiftRate: newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:toFloat}),
slaBasePeelLiftRate: uc.newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:uc.toFloat}), slaPeelDropRate: newInput(LANG.sa_pldr_s, {title:LANG.sa_pldr_l, convert:toFloat}),
slaFill: uc.newGroup(LANG.sa_infl_m, $('sla-fill'), { modes:SLA, group:"sla-infill", driven }), slaBase: newGroup(LANG.sa_base_m, $('sla-base'), { modes:SLA, group:"sla-base", driven }),
slaFillDensity: uc.newInput(LANG.sa_ifdn_s, {title:LANG.sa_ifdn_l, convert:uc.toFloat, bound:uc.bound(0,1)}), slaBaseLayers: newInput(LANG.sa_balc_s, {title:LANG.sa_balc_l, convert:toInt}),
slaFillLine: uc.newInput(LANG.sa_iflw_s, {title:LANG.sa_iflw_l, convert:uc.toFloat, bound:uc.bound(0,5)}), slaBaseOn: newInput(LANG.sa_lton_s, {title:LANG.sa_bltn_l, convert:toFloat}),
slaBaseOff: newInput(LANG.sa_ltof_s, {title:LANG.sa_bltf_l, convert:toFloat}),
slaBasePeelDist: newInput(LANG.sa_pldi_s, {title:LANG.sa_pldi_l, convert:toFloat}),
slaBasePeelLiftRate: newInput(LANG.sa_pllr_s, {title:LANG.sa_pllr_l, convert:toFloat}),
slaSupport: uc.newGroup(LANG.sa_supp_m, $('sla-support'), { modes:SLA, group:"sla-support", driven }), slaFill: newGroup(LANG.sa_infl_m, $('sla-fill'), { modes:SLA, group:"sla-infill", driven }),
slaSupportLayers: uc.newInput(LANG.sa_slyr_s, {title:LANG.sa_slyr_l, convert:uc.toInt, bound:uc.bound(5,100)}), slaFillDensity: newInput(LANG.sa_ifdn_s, {title:LANG.sa_ifdn_l, convert:toFloat, bound:bound(0,1)}),
slaSupportGap: uc.newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:uc.toInt, bound:uc.bound(3,30)}), slaFillLine: newInput(LANG.sa_iflw_s, {title:LANG.sa_iflw_l, convert:toFloat, bound:bound(0,5)}),
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 }), slaSupport: newGroup(LANG.sa_supp_m, $('sla-support'), { modes:SLA, group:"sla-support", driven }),
slaFirstOffset: uc.newInput(LANG.sa_opzo_s, {title:LANG.sa_opzo_l, convert:uc.toFloat, bound:uc.bound(0,1)}), slaSupportLayers: newInput(LANG.sa_slyr_s, {title:LANG.sa_slyr_l, convert:toInt, bound:bound(5,100)}),
slaAntiAlias: uc.newSelect(LANG.sa_opaa_s, {title:LANG.sa_opaa_l}, "antialias"), slaSupportGap: newInput(LANG.sa_slgp_s, {title:LANG.sa_slgp_l, convert:toInt, bound:bound(3,30)}),
slaSupportDensity: newInput(LANG.sa_sldn_s, {title:LANG.sa_sldn_l, convert:toFloat, bound:bound(0.01,0.9)}),
slaSupportSize: newInput(LANG.sa_slsz_s, {title:LANG.sa_slsz_l, convert:toFloat, bound:bound(0.1,1)}),
slaSupportPoints: newInput(LANG.sa_slpt_s, {title:LANG.sa_slpt_l, convert:toInt, bound:bound(3,10)}),
slaSupportEnable: newBoolean(LANG.enable, onBooleanClick, {title:LANG.sl_slen_l}),
settingsSave: $('settingsSave'), slaOutput: newGroup(LANG.sa_outp_m, $('sla-output'), { modes:SLA, group:"sla-first", driven }),
settingsName: $('settingsName'), slaFirstOffset: newInput(LANG.sa_opzo_s, {title:LANG.sa_opzo_l, convert:toFloat, bound:bound(0,1)}),
slaAntiAlias: newSelect(LANG.sa_opaa_s, {title:LANG.sa_opaa_l}, "antialias"),
layers: uc.setGroup($("layers")), layers: uc.setGroup($("layers")),
}); });
// override old style settings two-button menu // override old style settings two-button menu
ui.settingsSave.onclick = () => { $('settingsSave').onclick = () => {
settingsSave(undefined, ui.settingsName.value); settingsSave(undefined, $('settingsName').value);
}; };
function optSelected(sel) { function optSelected(sel) {

View file

@ -241,11 +241,7 @@ gapp.register("kiri.ui", [], (root, exports) => {
} }
function newGroup(label, div, opt = {}) { function newGroup(label, div, opt = {}) {
lastDiv = div || lastDiv; lastDiv = div = (div || lastDiv);
// return addCollapsableGroup(label, lastDiv, options);
// }
// function addCollapsableGroup(label, div, opt = {}) {
opt.inline = true; opt.inline = true;

View file

@ -289,7 +289,6 @@
<div id="lzr-slice" class="f-col set2-group mode-laser"></div> <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-layout" class="f-col set2-group mode-laser"></div>
<div id="lzr-knife" 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> <div id="lzr-output" class="f-col set2-group mode-laser"></div>
<!-- SLA --> <!-- SLA -->
<div id="sla-slice" class="f-col set2-group mode-sla"></div> <div id="sla-slice" class="f-col set2-group mode-sla"></div>
@ -493,21 +492,26 @@
<!-- vertical separation between workspace and right tray --> <!-- vertical separation between workspace and right tray -->
<div class="mid-sep"></div> <div class="mid-sep"></div>
<div id="right-work" class="f-col j-start"> <div id="right-work" class="f-col j-start">
<div class="work-header"><span>workspace</span></div> <div class="set-header f-col">
<a class="work-header"><span>workspace</span></a>
<div id="ws-widgets" class="f-col"></div>
</div>
<div class="line-sep"></div>
<div class="chonk"></div> <div class="chonk"></div>
<div id="ws-widgets" class="f-col"></div> <div class="line-sep"></div>
<div class="contents mode-fdm"> <div class="set-header f-col mode-fdm">
<div class="chonk"></div> <a class="work-header"><span>ranges</span></a>
<div id="fdm-ranges" class="f-col"></div> <div id="fdm-ranges" class="f-col"></div>
</div> </div>
<div id="workspace-tool"></div> <div id="workspace-tool"></div>
<div class="contents mode-cam"> <div class="contents mode-cam">
<div class="chonk"></div>
<div class="work-header"> <div class="work-header">
<span>CNC</span> <span>CNC</span>
<span>operations</span> <span>operations</span>
</div> </div>
<div class="line-sep"></div>
<div class="chonk"></div> <div class="chonk"></div>
<div class="line-sep"></div>
<div id="camops" class="f-col a-stretch grow"> <div id="camops" class="f-col a-stretch grow">
<div id="oplist" class="f-col j-center"></div> <div id="oplist" class="f-col j-center"></div>
<div id="op-add" class="opdiv"> <div id="op-add" class="opdiv">
@ -533,7 +537,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="line-sep"></div>
<div class="chonk"></div> <div class="chonk"></div>
<div class="line-sep"></div>
</div> </div>
</div> </div>
</div> </div>