re-enable old school support generation. fix undefined error resulting from unset shadow

This commit is contained in:
Stewart Allen 2021-01-20 11:15:41 -05:00
commit 97e1006172
4 changed files with 7 additions and 5 deletions

View file

@ -296,6 +296,7 @@
sliceSupportExtra: 0,
sliceSupportAngle: 50,
sliceSupportNozzle: 0,
sliceSupportEnable: false,
sliceSolidMinArea: 1,
sliceSolidLayers: 3,
sliceBottomLayers: 3,

View file

@ -1655,6 +1655,7 @@
sliceSupportExtra: UC.newInput(LANG.sp_xpnd_s, {title:LANG.sp_xpnd_l, bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
sliceSupportAngle: UC.newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:UC.bound(0.0,90.0), convert:UC.toFloat, modes:FDM}),
sliceSupportEnable: UC.newBoolean(LANG.sp_auto_s, onBooleanClick, {title:LANG.sp_auto_l, modes:FDM, show:isNotBelt}),
sliceSupportGen: UC.newRow([
UI.ssaGen = UC.newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"})

View file

@ -199,8 +199,8 @@
// fixed supports (generated ahead of time)
const fixed = Object.values(settings.widget[widget.id].support || {});
let shadow;
if (fixed.length) {
let shadow = null;
if (fixed.length || spro.sliceSupportEnable) {
// create shadow. TODO test if any supports set
let alltops = slices.map(slice => slice.topPolys()).flat();
shadow = POLY.union(alltops,null,0.1);
@ -946,7 +946,7 @@
});
// merge pillars and replace with convex hull of outer points (aka smoothing)
pillars = POLY.union(pillars).forEach(function(pillar) {
pillars = POLY.union(pillars, null, true).forEach(function(pillar) {
supports.push(BASE.newPolygon().createConvexHull(pillar.points));
});
})();

View file

@ -251,8 +251,8 @@ kiri.lang['en-us'] = {
sp_xpnd_l: "expand support area\nbeyond part boundary\nin millimeters",
sp_nozl_s: "extruder",
sp_nozl_l: "in multi-extruder systems\nthe extruder to use for\nsupport material",
sp_auto_s: "enable auto",
sp_auto_l: "enable generated supports\nusing specified parameters",
sp_auto_s: "automatic",
sp_auto_l: "enable generated supports\nusing at-slice-time geometry\nsupports will only appear\nafter slicing completes",
// LASER SLICING
ls_offs_s: "offset",