add fdm 'solidify' feature to remove inner voids from models at slice time
This commit is contained in:
parent
78a6d489b5
commit
a7fccd7636
5 changed files with 15 additions and 5 deletions
|
|
@ -330,6 +330,7 @@ export const conf = {
|
||||||
sliceMinHeight: 0,
|
sliceMinHeight: 0,
|
||||||
sliceShellOrder: "in-out",
|
sliceShellOrder: "in-out",
|
||||||
sliceShells: 3,
|
sliceShells: 3,
|
||||||
|
sliceSolidify: false,
|
||||||
sliceSolidMinArea: 1,
|
sliceSolidMinArea: 1,
|
||||||
sliceSupportAngle: 50,
|
sliceSupportAngle: 50,
|
||||||
sliceSupportArea: 0.1,
|
sliceSupportArea: 0.1,
|
||||||
|
|
|
||||||
|
|
@ -953,6 +953,7 @@ class Widget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// map found tris to polygons
|
||||||
let polys = found.map(a => {
|
let polys = found.map(a => {
|
||||||
return newPolygon()
|
return newPolygon()
|
||||||
.add(a[0].x, a[0].y, a[0].z)
|
.add(a[0].x, a[0].y, a[0].z)
|
||||||
|
|
@ -960,7 +961,7 @@ class Widget {
|
||||||
.add(a[2].x, a[2].y, a[2].z);
|
.add(a[2].x, a[2].y, a[2].z);
|
||||||
});
|
});
|
||||||
|
|
||||||
// recursively merge grid constrained subsets of triangles
|
// recursively merge grid constrained subsets of polygons
|
||||||
polys = unionTris(polys);
|
polys = unionTris(polys);
|
||||||
|
|
||||||
// for a more perfect union, pump shadows to merge very close lines
|
// for a more perfect union, pump shadows to merge very close lines
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ function fillIsLinear() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function zIntShow() {
|
function zIntShow() {
|
||||||
return settings().controller.devel;
|
return api.conf.get().controller.devel;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isBelt() {
|
function isBelt() {
|
||||||
|
|
@ -84,7 +84,7 @@ export function menu() {
|
||||||
sliceShellOrder: newSelect(LANG.sl_ordr_s, { title:LANG.sl_ordr_l}, "shell"),
|
sliceShellOrder: newSelect(LANG.sl_ordr_s, { title:LANG.sl_ordr_l}, "shell"),
|
||||||
sliceDetectThin: newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"),
|
sliceDetectThin: newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"),
|
||||||
outputAlternating: newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}),
|
outputAlternating: newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}),
|
||||||
sliceZInterleave: newBoolean(LANG.ad_zint_s, onBooleanClick, {title:LANG.ad_zint_l, show:zIntShow}),
|
sliceZInterleave: newBoolean(LANG.ad_zint_s, onBooleanClick, {title:LANG.ad_zint_l, show:() => zIntShow() }),
|
||||||
_____: newGroup(LANG.fs_menu, $('fdm-solid'), { modes:FDM, driven, hideable, separator, group:"fdm-solid" }),
|
_____: newGroup(LANG.fs_menu, $('fdm-solid'), { modes:FDM, driven, hideable, separator, group:"fdm-solid" }),
|
||||||
sliceFillAngle: newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:toFloat}),
|
sliceFillAngle: newInput(LANG.fi_angl_s, {title:LANG.fi_angl_l, convert:toFloat}),
|
||||||
sliceFillGrow: newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:toFloat}),
|
sliceFillGrow: newInput(LANG.fi_grow_s, {title:LANG.fi_grow_l, convert:toFloat}),
|
||||||
|
|
@ -148,7 +148,7 @@ export function menu() {
|
||||||
separator: newBlank({ class:"set-sep", driven, show:isNotBelt }),
|
separator: newBlank({ class:"set-sep", driven, show:isNotBelt }),
|
||||||
outputBrimCount: newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:toInt, show:isNotBelt}),
|
outputBrimCount: newInput(LANG.fl_skrt_s, {title:LANG.fl_skrt_l, convert:toInt, show:isNotBelt}),
|
||||||
outputBrimOffset: newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:toFloat, show:isNotBelt}),
|
outputBrimOffset: newInput(LANG.fl_skro_s, {title:LANG.fl_skro_l, convert:toFloat, show: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() }),
|
outputRaftSpacing: newInput(LANG.fr_spac_s, {title:LANG.fr_spac_l, convert:toFloat, bound:bound(0.0,3.0), show:() => ui.outputRaft.checked && isNotBelt() }),
|
||||||
separator: newBlank({ class:"set-sep", driven, show:isNotBelt }),
|
separator: newBlank({ class:"set-sep", driven, show:isNotBelt }),
|
||||||
outputRaft: newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger, show:() => isNotBelt()}),
|
outputRaft: newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, trigger, show:() => isNotBelt()}),
|
||||||
_____: newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven, hideable, separator, group:"fdm-out" }),
|
_____: newGroup(LANG.ou_menu, $('fdm-output'), { modes:FDM, driven, hideable, separator, group:"fdm-out" }),
|
||||||
|
|
@ -165,6 +165,7 @@ export function menu() {
|
||||||
outputRetractWipe: newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, convert:toFloat, bound:bound(0.0,10)}),
|
outputRetractWipe: newInput(LANG.ad_wpln_s, {title:LANG.ad_wpln_l, convert:toFloat, bound:bound(0.0,10)}),
|
||||||
separator: newBlank({ class:"set-sep", driven }),
|
separator: newBlank({ class:"set-sep", driven }),
|
||||||
outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}),
|
outputAvoidGaps: newBoolean(LANG.ad_agap_s, onBooleanClick, {title:LANG.ad_agap_l}),
|
||||||
|
sliceSolidify: newBoolean(LANG.ad_sold_s, onBooleanClick, {title:LANG.ad_sold_l}),
|
||||||
separator: newBlank({ class:"set-sep", driven, show:isBelt }),
|
separator: newBlank({ class:"set-sep", driven, show:isBelt }),
|
||||||
outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show:isBelt}),
|
outputBeltFirst: newBoolean(LANG.ad_lbir_s, onBooleanClick, {title:LANG.ad_lbir_l, show:isBelt}),
|
||||||
_____: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven, hideable, separator, group:"fdm-xprt" }),
|
_____: newGroup(LANG.ad_menu, $('fdm-expert'), { modes:FDM, driven, hideable, separator, group:"fdm-xprt" }),
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ export function slicePost(data, options) {
|
||||||
data.tops = POLY.nest(groups);
|
data.tops = POLY.nest(groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// solidfy (remove inners)
|
||||||
|
if (process.sliceSolidify) {
|
||||||
|
data.tops.forEach(poly => poly.inner = undefined);
|
||||||
|
}
|
||||||
|
|
||||||
// perimeter and inner hole compensation offsets
|
// perimeter and inner hole compensation offsets
|
||||||
if (compInner || compOuter) {
|
if (compInner || compOuter) {
|
||||||
let inner = POLY.inner(data.tops).flat();
|
let inner = POLY.inner(data.tops).flat();
|
||||||
|
|
@ -59,7 +64,7 @@ export function slicePost(data, options) {
|
||||||
const process = post_args.process;
|
const process = post_args.process;
|
||||||
if (process.sliceSupportGrow > 0) {
|
if (process.sliceSupportGrow > 0) {
|
||||||
// expand synth supports here so they can be clipped later
|
// expand synth supports here so they can be clipped later
|
||||||
data.tops = POLY.expand(data.tops, process.sliceSupportGrow, data.z, []);
|
data.tops = POLY.expand(data.tops, process.sliceSupportGrow, data.z, []);
|
||||||
}
|
}
|
||||||
// do not shell synth widgets because
|
// do not shell synth widgets because
|
||||||
// they will be clipped against peers later
|
// they will be clipped against peers later
|
||||||
|
|
|
||||||
|
|
@ -911,6 +911,8 @@ self.lang['en-us'] = {
|
||||||
ad_pspd_l: ["polishing speed","in millimeters / second"],
|
ad_pspd_l: ["polishing speed","in millimeters / second"],
|
||||||
ad_purg_s: "purge tower",
|
ad_purg_s: "purge tower",
|
||||||
ad_purg_l: ["purge tower area in mm^2","for multi extruder setups","0 = disabled"],
|
ad_purg_l: ["purge tower area in mm^2","for multi extruder setups","0 = disabled"],
|
||||||
|
ad_sold_s: "solidify",
|
||||||
|
ad_sold_l: ["remove inner voids","treat the model as a solid"],
|
||||||
|
|
||||||
// CAM EXPERT
|
// CAM EXPERT
|
||||||
cx_fast_s: "skip shadow",
|
cx_fast_s: "skip shadow",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue