add option to turn off support shell
This commit is contained in:
parent
5a64336270
commit
3107021f0e
4 changed files with 40 additions and 5 deletions
|
|
@ -329,6 +329,7 @@
|
|||
sliceSupportAngle: 50,
|
||||
sliceSupportNozzle: 0,
|
||||
sliceSupportEnable: false,
|
||||
sliceSupportOutline: true,
|
||||
sliceSolidMinArea: 1,
|
||||
sliceSolidLayers: 3,
|
||||
sliceBottomLayers: 3,
|
||||
|
|
|
|||
|
|
@ -1735,6 +1735,7 @@
|
|||
sliceSupportAngle: UC.newInput(LANG.sp_angl_s, {title:LANG.sp_angl_l, bound:UC.bound(0.0,90.0), convert:UC.toFloat, modes:FDM, show:() => !UI.sliceSupportEnable.checked}),
|
||||
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, show:() => !UI.sliceSupportEnable.checked}),
|
||||
|
||||
sliceSupportGen: UC.newRow([
|
||||
UI.ssaGen = UC.newButton(LANG.sp_detect, onButtonClick, {class: "f-col grow a-center"})
|
||||
|
|
|
|||
|
|
@ -513,6 +513,7 @@
|
|||
}
|
||||
} else if (isSynth) {
|
||||
// fill manual supports differently
|
||||
let outline = process.sliceSupportOutline || false;
|
||||
let promises = isConcurrent ? [] : undefined;
|
||||
let resolve = [];
|
||||
forSlices(0.5, promises ? 0.6 : 0.7, slice => {
|
||||
|
|
@ -520,11 +521,17 @@
|
|||
let density = params.sliceSupportDensity;
|
||||
if (density)
|
||||
for (let top of slice.tops) {
|
||||
if (!outline) {
|
||||
let offset = top.shells;
|
||||
fillSupportPolys(promises, offset, lineWidth, density, slice.z);
|
||||
resolve.push({top, offset});
|
||||
} else {
|
||||
let offset = [];
|
||||
POLY.expand(top.shells || [], -nozzleSize/4, slice.z, offset);
|
||||
fillSupportPolys(promises, offset, lineWidth, density, slice.z);
|
||||
resolve.push({top, offset});
|
||||
}
|
||||
}
|
||||
}, "infill");
|
||||
if (promises) {
|
||||
await tracker(promises, (i, t) => {
|
||||
|
|
@ -532,7 +539,31 @@
|
|||
});
|
||||
}
|
||||
for (let rec of resolve) {
|
||||
rec.top.fill_lines = rec.offset.map(o => o.fill).flat().filter(v => v);
|
||||
let lines = rec.top.fill_lines = rec.offset.map(o => o.fill).flat().filter(v => v);
|
||||
// if copying simply's support type, eliminate shells
|
||||
// and zig/zag lines connectd by shell segments
|
||||
if (!outline) {
|
||||
let newlines = [];
|
||||
let op1, op2;
|
||||
let eo = 0;
|
||||
for (let i=0; i<lines.length; i += 2) {
|
||||
let p1 = lines[i];
|
||||
let p2 = lines[i+1];
|
||||
if (eo++ % 2 === 1) {
|
||||
let t = p1;
|
||||
p1 = p2;
|
||||
p2 = t;
|
||||
}
|
||||
if (op2) {
|
||||
newlines.push(op2);
|
||||
newlines.push(p1);
|
||||
}
|
||||
newlines.push(op1 = p1);
|
||||
newlines.push(op2 = p2);
|
||||
}
|
||||
rec.top.fill_lines = newlines;
|
||||
rec.top.shells = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -367,6 +367,8 @@ kiri.lang['en-us'] = {
|
|||
sp_xpnd_l: ["expand support area","beyond part boundary","in millimeters"],
|
||||
sp_nozl_s: "extruder",
|
||||
sp_nozl_l: ["in multi-extruder systems","the extruder to use for","support material"],
|
||||
sp_outl_s: "outline",
|
||||
sp_outl_l: ["enclose support pattern","inside a perimeter shell"],
|
||||
sp_auto_s: "automatic",
|
||||
sp_auto_l: ["enable generated supports","using at-slice-time geometry","supports will only appear","after slicing completes"],
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue