start fdm support refactor

This commit is contained in:
Stewart Allen 2026-01-05 11:51:12 -05:00
commit 4043553012
4 changed files with 38 additions and 20 deletions

View file

@ -340,15 +340,17 @@ export const conf = {
sliceSupportAngle: 50, sliceSupportAngle: 50,
sliceSupportArea: 0.1, sliceSupportArea: 0.1,
sliceSupportDensity: 0.1, sliceSupportDensity: 0.1,
sliceSupportEnable: false, // sliceSupportEnable: false,
sliceSupportExtra: 0, sliceSupportExtra: 0,
sliceSupportGap: 1, sliceSupportGap: 1,
sliceSupportGrow: 0, // sliceSupportGrow: 0,
sliceSupportNozzle: 0, sliceSupportNozzle: 0,
sliceSupportOffset: 1.0, sliceSupportOffset: 1.0,
sliceSupportOutline: true, sliceSupportOutline: true,
sliceSupportSize: 5, // sliceSupportSize: 5,
sliceSupportSpan: 5, sliceSupportSpan: 5,
sliceSupportType: "automatic",
sliceSupportTree: false,
sliceTopLayers: 3, sliceTopLayers: 3,
sliceZInterleave: false, sliceZInterleave: false,
zHopDistance: 0.2, zHopDistance: 0.2,

View file

@ -23,6 +23,11 @@ const LISTS = {
{ name: "out-in" }, { name: "out-in" },
{ name: "alternate" } { name: "alternate" }
], ],
support: [
{ name: "disabled" },
{ name: "automatic" },
{ name: "manual" },
],
start: [ start: [
{ name: "last" }, { name: "last" },
{ name: "center" }, { name: "center" },

View file

@ -61,6 +61,10 @@ function isNotBelt() {
return !isBelt(); return !isBelt();
} }
function isTree() {
return api.conf.proc().sliceSupportTree;
}
function notFwRetract() { function notFwRetract() {
return !api.conf.get().device.fwRetract; return !api.conf.get().device.fwRetract;
} }
@ -107,23 +111,26 @@ export function menu() {
outputFanSpeed: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255)}), outputFanSpeed: newInput(LANG.ou_fans_s, {title:LANG.ou_fans_l, convert:toInt, bound:bound(0,255)}),
outputMinLayerTime: newInput(LANG.ou_layt_s, { title:LANG.ou_layt_l, convert:toInt, bound:bound(0,200) }), outputMinLayerTime: newInput(LANG.ou_layt_s, { title:LANG.ou_layt_l, convert:toInt, bound:bound(0,200) }),
_____: newGroup(LANG.sp_menu, $('fdm-support'), { modes:FDM, driven, hideable, separator, group:"fdm-supp" }), _____: newGroup(LANG.sp_menu, $('fdm-support'), { modes:FDM, driven, hideable, separator, group:"fdm-supp" }),
sliceSupportType: newSelect(LANG.sp_type_s, {title:LANG.sp_type_l}, "support"),
sliceSupportNozzle: newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, show:isMultiHead}, "extruders"), sliceSupportNozzle: newSelect(LANG.sp_nozl_s, {title:LANG.sp_nozl_l, show:isMultiHead}, "extruders"),
separator: newBlank({ class:"set-sep", driven }),
sliceSupportAngle: newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, convert:toFloat, bound:bound(0.0,90.0)}),
sliceSupportDensity: newInput(LANG.sp_dens_s, {title:LANG.sp_dens_l, convert:toFloat, bound: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: newInput(LANG.sp_size_s, {title:LANG.sp_size_l, convert:toFloat, bound:bound(1.0,200.0)}), // sliceSupportSize: newInput(LANG.sp_size_s, {title:LANG.sp_size_l, convert:toFloat, bound:bound(1.0,200.0)}),
sliceSupportOffset: newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, convert:toFloat, bound:bound(0.0,200.0)}),
sliceSupportGap: newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, convert:toInt, bound:bound(0,5)}), sliceSupportGap: newInput(LANG.sp_gaps_s, {title:LANG.sp_gaps_l, convert:toInt, bound:bound(0,5)}),
sliceSupportOffset: newInput(LANG.sp_offs_s, {title:LANG.sp_offs_l, convert:toFloat, bound:bound(0.0,200.0)}),
sliceSupportArea: newInput(LANG.sp_area_s, {title:LANG.sp_area_l, convert:toFloat, bound:bound(0.0,200.0)}), sliceSupportArea: newInput(LANG.sp_area_s, {title:LANG.sp_area_l, convert:toFloat, bound:bound(0.0,200.0)}),
sliceSupportExtra: newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, convert:toFloat, bound:bound(0.0,10.0)}), sliceSupportExtra: newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, convert:toFloat, bound:bound(0.0,10.0)}),
sliceSupportGrow: newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, convert:toFloat, bound:bound(0.0,10.0)}), // sliceSupportGrow: newInput(LANG.sp_grow_s, {title:LANG.sp_grow_l, convert:toFloat, bound:bound(0.0,10.0)}),
sliceSupportAngle: newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, convert:toFloat, bound:bound(0.0,90.0)}),
sliceSupportSpan: newInput(LANG.sp_span_s, {title:LANG.sp_span_l, convert:toFloat, bound:bound(0.0,200.0), show:() => ui.sliceSupportEnable.checked }), sliceSupportSpan: newInput(LANG.sp_span_s, {title:LANG.sp_span_l, convert:toFloat, bound:bound(0.0,200.0), show:() => ui.sliceSupportEnable.checked }),
separator: newBlank({ class:"set-sep", driven }), separator: newBlank({ class:"set-sep", driven }),
sliceSupportEnable: newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, show:isNotBelt}), sliceSupportTree: newBoolean(LANG.sp_tree_s, onBooleanClick, {title:LANG.sp_tree_s, trigger, show:isNotBelt}),
sliceSupportOutline: 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}),
sliceSupportOutline: newBoolean(LANG.sp_outl_s, onBooleanClick, {title:LANG.sp_outl_l, show: () => !isTree() }),
separator: newBlank({ class:"set-sep", driven }), separator: newBlank({ class:"set-sep", driven }),
sliceSupportGen: newRow([ sliceSupportGen: newRow([
ui.ssaGen = newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"}) 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", show: () => !ui.sliceSupportTree.checked }),
separator: newBlank({ class:"set-sep", driven }), separator: newBlank({ class:"set-sep", driven }),
sliceSupportManual: newRow([ sliceSupportManual: newRow([
(ui.ssmAdd = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})), (ui.ssmAdd = newButton(undefined, onButtonClick, {icon:'<i class="fas fa-plus"></i>'})),

View file

@ -464,30 +464,34 @@ self.lang['en-us'] = {
// FDM SUPPORT // FDM SUPPORT
sp_menu: "support", sp_menu: "support",
sp_detect: "detect", sp_detect: "detect",
sp_type_s: "type",
sp_type_l: ["automatic = detect","manual = paint on"],
sp_dens_s: "density", sp_dens_s: "density",
sp_dens_l: ["fraction 0.0 - 1.0","recommended 0.15","0 to disable"], sp_dens_l: ["fraction 0.0 - 1.0","recommended 0.15","0 to disable"],
sp_size_s: "pillar size", // sp_size_s: "pillar size",
sp_size_l: ["pillar width in millimeters","smaller values exponentially","increase detection times"], // sp_size_l: ["pillar width in millimeters","smaller values exponentially","increase detection times"],
sp_offs_s: "part offset", sp_offs_s: "part offset",
sp_offs_l: ["offset from part","in millimeters"], sp_offs_l: ["offset from part","in millimeters"],
sp_gaps_s: "gap layers", sp_gaps_s: "layer gap",
sp_gaps_l: ["number of layers","offset from part"], sp_gaps_l: ["number of layers","offset from part"],
sp_span_s: "max span", sp_span_s: "max span",
sp_span_l: ["unsupported span that causes","a new support to be generated","in millimeters"], sp_span_l: ["unsupported span that causes","a new support to be generated","in millimeters"],
sp_angl_s: "max angle", sp_angl_s: "angle",
sp_angl_l: ["max overhang angle before","supporting pillar is generated","normal values 45-60","belt values 0-10"], sp_angl_l: ["max overhang angle before","supporting pillar is generated","normal values 45-60","belt values 0-10"],
sp_area_s: "min area", sp_area_s: "min area",
sp_area_l: ["minimum area for","a support column","in millimeters","smaller values will","slow detection"], sp_area_l: ["minimum area for","a support column","in millimeters","smaller values will","slow detection"],
sp_xpnd_s: "expand", sp_xpnd_s: "expand",
sp_xpnd_l: ["expand support area","beyond part boundary","in millimeters"], sp_xpnd_l: ["expand support area","beyond part boundary","in millimeters"],
sp_grow_s: "grow", // sp_grow_s: "grow",
sp_grow_l: ["grow support column to fill small gaps","in millimeters"], // sp_grow_l: ["grow support column to fill small gaps","in millimeters"],
sp_nozl_s: "extruder", sp_nozl_s: "tool",
sp_nozl_l: ["in multi-extruder systems","the extruder to use for","support material"], sp_nozl_l: ["in multi-extruder systems","the toolhead to use for","support material"],
sp_outl_s: "enclosed", sp_outl_s: "enclosed",
sp_outl_l: ["enclose support pattern","inside a perimeter shell"], sp_outl_l: ["enclose support pattern","inside a perimeter shell"],
sp_auto_s: "automatic", // sp_auto_s: "automatic",
sp_auto_l: ["enable generated supports","using at-slice-time geometry","supports will only appear","after slicing completes"], // sp_auto_l: ["enable generated supports","using at-slice-time geometry","supports will only appear","after slicing completes"],
sp_tree_s: "tree type",
sp_tree_l: ["use tree type support structure"],
// CNC COMMON terms // CNC COMMON terms
cc_tool: "tool", cc_tool: "tool",