explicit control for adaptive slicing. reorder menus

This commit is contained in:
Stewart Allen 2020-11-20 15:15:07 -05:00
commit a2a75dc5f7
4 changed files with 27 additions and 11 deletions

View file

@ -325,6 +325,7 @@
outputInvertY: false,
detectThinWalls: false,
sliceMinHeight: 0,
sliceAdaptive: false,
zHopDistance: 0.2,
antiBacklash: 1,
gcodePause: "",

View file

@ -1417,10 +1417,14 @@
process: UC.newGroup(LANG.sl_menu, $('settings'), {modes:FDM_LASER}),
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, expert:true, show: () => UI.sliceAdaptive.checked}),
sliceShells: UC.newInput(LANG.sl_shel_s, {title:LANG.sl_shel_l, convert:UC.toInt, modes:FDM}),
sliceTopLayers: UC.newInput(LANG.sl_ltop_s, {title:LANG.sl_ltop_l, convert:UC.toInt, modes:FDM}),
sliceSolidLayers: UC.newInput(LANG.sl_lsld_s, {title:LANG.sl_lsld_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}),
detectThinWalls: UC.newBoolean(LANG.ad_thin_s, onBooleanClick, {title: LANG.ad_thin_l, modes:FDM, expert:true}),
sliceAdaptive: UC.newBoolean(LANG.ad_adap_s, onBooleanClick, {title: LANG.ad_adap_l, modes:FDM, expert:true, trigger: true}),
laserOffset: UC.newInput(LANG.ls_offs_s, {title:LANG.ls_offs_l, convert:UC.toFloat, modes:LASER}),
laserSliceHeight: UC.newInput(LANG.ls_lahi_s, {title:LANG.ls_lahi_l, convert:UC.toFloat, modes:LASER, trigger: true}),
@ -1438,8 +1442,10 @@
firstLayerRate: UC.newInput(LANG.fl_rate_s, {title:LANG.fl_rate_l, convert:UC.toFloat, modes:FDM}),
firstLayerFillRate: UC.newInput(LANG.fl_frat_s, {title:LANG.fl_frat_l, convert:UC.toFloat, modes:FDM}),
firstLayerPrintMult: UC.newInput(LANG.fl_mult_s, {title:LANG.fl_mult_l, convert:UC.toFloat, modes:FDM, expert:true}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
outputBrimCount: UC.newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:UC.toInt, modes:FDM}),
outputBrimOffset: UC.newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:UC.toFloat, modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
firstLayerNozzleTemp:UC.newInput(LANG.fl_nozl_s, {title:LANG.fl_nozl_l, convert:UC.toInt, modes:FDM, expert:true}),
firstLayerBedTemp: UC.newInput(LANG.fl_bedd_s, {title:LANG.fl_bedd_l, convert:UC.toInt, modes:FDM, expert:true}),
@ -1452,10 +1458,12 @@
sliceSupportArea: UC.newInput(LANG.sp_area_s, {title:LANG.sp_area_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM, expert:true}),
sliceSupportNozzle: UC.newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, modes:FDM, expert:true}, "extruders"),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
sliceSupportEnable: UC.newBoolean(LANG.enable, onBooleanClick, {modes:FDM}),
fdmRaft: UC.newGroup(LANG.fr_menu, null, {modes:FDM, marker:true}),
outputRaftSpacing: UC.newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:UC.toFloat, bound:UC.bound(0.0,3.0), modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
outputRaft: UC.newBoolean(LANG.enable, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM}),
camRough: UC.newGroup(LANG.cr_menu, null, {modes:CAM, marker:true}),
@ -1550,14 +1558,18 @@
outputLaserSpeed: UC.newInput(LANG.ou_sped_s, {title:LANG.ou_sped_l, convert:UC.toInt, 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}),
outputTemp: UC.newInput(LANG.ou_nozl_s, {title:LANG.ou_nozl_l, convert:UC.toInt, modes:FDM}),
outputBedTemp: UC.newInput(LANG.ou_bedd_s, {title:LANG.ou_bedd_l, convert:UC.toInt, 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}),
outputFanLayer: UC.newInput(LANG.ou_fanl_s, {title:LANG.ou_fanl_l, convert:UC.toInt, bound:UC.bound(0,100), modes:FDM, expert:true}),
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}),
@ -1571,17 +1583,18 @@
outputRetractDist: UC.newInput(LANG.ad_rdst_s, {title:LANG.ad_rdst_l, convert:UC.toFloat, modes:FDM, expert:true}),
outputRetractSpeed: UC.newInput(LANG.ad_rrat_s, {title:LANG.ad_rrat_l, convert:UC.toInt, modes:FDM, expert:true}),
outputRetractDwell: UC.newInput(LANG.ad_rdwl_s, {title:LANG.ad_rdwl_l, convert:UC.toInt, modes:FDM, expert:true}),
outputCoastDist: UC.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM, expert:true}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
// outputWipeDistance: UC.newInput("wipe", {title:"non-printing move at\close of polygon\nin millimeters", bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM, expert:true}),
sliceSolidMinArea: UC.newInput(LANG.ad_msol_s, {title:LANG.ad_msol_l, convert:UC.toFloat, modes:FDM, expert:true}),
sliceMinHeight: UC.newInput(LANG.ad_minl_s, {title:LANG.ad_minl_l, bound:UC.bound(0,3.0), convert:UC.toFloat, modes:FDM, expert:true}),
outputMinSpeed: UC.newInput(LANG.ad_mins_s, {title:LANG.ad_mins_l, bound:UC.bound(5,200), convert:UC.toFloat, modes:FDM, expert:true}),
outputCoastDist: UC.newInput(LANG.ad_scst_s, {title:LANG.ad_scst_l, bound:UC.bound(0.0,10), convert:UC.toFloat, modes:FDM, expert:true}),
outputShortPoly: UC.newInput(LANG.ad_spol_s, {title:LANG.ad_spol_l, bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM, expert:true}),
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, expert:true}),
antiBacklash: UC.newInput(LANG.ad_abkl_s, {title:LANG.ad_abkl_l, bound:UC.bound(0,3), convert:UC.toInt, modes:FDM, expert:true}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
sliceRotation: LOCAL ? UC.newInput(LANG.ad_slrt_s, {title:LANG.ad_slrt_l, bound:UC.bound(-45,45), convert:UC.toFloat, modes:FDM, expert:true}) : null,
gcodePauseLayers: UC.newInput(LANG.ag_paws_s, {title:LANG.ag_paws_l, modes:FDM, expert:true, comma:true}),
detectThinWalls: UC.newBoolean(LANG.ad_thin_s, onBooleanClick, {title: LANG.ad_thin_l, modes:FDM, expert:true}),
outputLayerRetract: UC.newBoolean(LANG.ad_lret_s, onBooleanClick, {title:LANG.ad_lret_l, modes:FDM, expert:true}),
// SLA

View file

@ -134,9 +134,12 @@
// } });
// onSliceDone(slices);
const sliceMinHeight = spro.sliceAdaptive && spro.sliceMinHeight > 0 ?
Math.min(spro.sliceMinHeight, sliceHeight) : 0;
SLICER.sliceWidget(widget, {
height: sliceHeight,
minHeight: sliceHeight > spro.sliceMinHeight ? spro.sliceMinHeight : 0,
minHeight: sliceMinHeight,
firstHeight: spro.firstSliceHeight,
// debug: true,
// xray: 3,

View file

@ -183,6 +183,8 @@ kiri.lang['en-us'] = {
sl_menu: "slicing",
sl_lahi_s: "layer height",
sl_lahi_l: "height of each slice\nlayer in millimeters",
ad_minl_s: "layer min",
ad_minl_l: "adaptive min layer height\nin millimeters\nmust be non-zero",
sl_shel_s: "shell count",
sl_shel_l: "number of perimeter\nwalls to generate",
sl_ltop_s: "top layers",
@ -191,6 +193,10 @@ kiri.lang['en-us'] = {
sl_lsld_l: "solid fill areas computed\nfrom layer deltas. see\nlayer pop menu",
sl_lbot_s: "base layers",
sl_lbot_l: "number of solid layers\nto enforce at the\nbottom of the print",
ad_thin_s: "thin walls",
ad_thin_l: "detect and fill gaps\nbetween shell walls",
ad_adap_s: "adaptive",
ad_adap_l: "use adaptive layer heights\nwith 'layer height' as max\nand 'layer min' as the min",
// FDM FILL
fi_menu: "infill",
@ -310,9 +316,6 @@ kiri.lang['en-us'] = {
// CNC CONTOUR
cu_menu: "trace",
// CNC FINISHING
// cf_menu: "finishing",
// CNC DRILLING
cd_menu: "drill",
cd_plpr_s: "plunge per",
@ -441,8 +444,6 @@ kiri.lang['en-us'] = {
ad_scst_l: "non-printing end\nof perimeter shells\nin millimeters",
ad_msol_s: "min solid",
ad_msol_l: "minimum area (mm^2)\nrequired to keep solid\nmust be > 0.1",
ad_minl_s: "min layer",
ad_minl_l: "enables adaptive slicing with\nthis as the min layer height\nin millimeters\n0 to disable",
ad_mins_s: "min speed",
ad_mins_l: "minimum speed\nfor short segments",
ad_spol_s: "slow poly",
@ -451,8 +452,6 @@ kiri.lang['en-us'] = {
ad_zhop_l: "amount to raise z\non retraction moves\nin millimeters\n0 to disable",
ad_abkl_s: "anti-backlash",
ad_abkl_l: "use micro-movements to cancel\nbacklash during fills\nin millimeters",
ad_thin_s: "thin walls",
ad_thin_l: "detect and fill gaps\nbetween shell walls",
ad_slrt_s: "slice rotation",
ad_slrt_l: "slice object on a bias\nangle in the y axis.\nuseful for extremely\nlarge format prints",
ad_lret_s: "layer retract",