add non-manifold mesh healing preference

This commit is contained in:
Stewart Allen 2021-02-14 23:10:50 -05:00
commit e7e7188941
5 changed files with 11 additions and 1 deletions

View file

@ -655,7 +655,8 @@
exportPreview: false, exportPreview: false,
decimate: true, decimate: true,
detail: "good", detail: "good",
animesh: "200" animesh: "200",
healMesh: false
}, },
// label state preferences // label state preferences
labels: { labels: {

View file

@ -152,6 +152,7 @@
control.exportLocal = UI.exportLocal.checked; control.exportLocal = UI.exportLocal.checked;
control.exportPreview = UI.exportPreview.checked; control.exportPreview = UI.exportPreview.checked;
control.decimate = UI.decimate.checked; control.decimate = UI.decimate.checked;
control.healMesh = UI.healMesh.checked;
SPACE.view.setZoom(control.reverseZoom, control.zoomSpeed); SPACE.view.setZoom(control.reverseZoom, control.zoomSpeed);
// platform.layout(); // platform.layout();
API.conf.save(); API.conf.save();
@ -1645,6 +1646,7 @@
parts: UC.newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}), parts: UC.newGroup(LANG.pt_menu, $('prefs-prt'), {inline: true}),
detail: UC.newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"), detail: UC.newSelect(LANG.pt_qual_s, {title: LANG.pt_qual_l, action: detailSave}, "detail"),
decimate: UC.newBoolean(LANG.pt_deci_s, booleanSave, {title: LANG.pt_deci_l}), decimate: UC.newBoolean(LANG.pt_deci_s, booleanSave, {title: LANG.pt_deci_l}),
healMesh: UC.newBoolean(LANG.pt_heal_s, booleanSave, {title: LANG.pt_heal_l}),
prefadd: UC.checkpoint($('prefs-add')), prefadd: UC.checkpoint($('prefs-add')),
@ -2373,6 +2375,7 @@
UI.reverseZoom.checked = control.reverseZoom; UI.reverseZoom.checked = control.reverseZoom;
UI.autoSave.checked = control.autoSave; UI.autoSave.checked = control.autoSave;
UI.decimate.checked = control.decimate; UI.decimate.checked = control.decimate;
UI.healMesh.checked = control.healMesh;
lineTypeSave(); lineTypeSave();
detailSave(); detailSave();
updateFPS(); updateFPS();

View file

@ -530,6 +530,9 @@
// for topo slices, we just need the raw lines // for topo slices, we just need the raw lines
if (!topoMode && !simpleMode) { if (!topoMode && !simpleMode) {
slice.groups = connectLines(slice.lines, slice.z); slice.groups = connectLines(slice.lines, slice.z);
if (options.union) {
slice.groups = POLY.flatten(POLY.union(POLY.nest(slice.groups), null, true), null, true);
}
if ((debug && slice.lines.excessive) || xray) { if ((debug && slice.lines.excessive) || xray) {
const dash = xray || 3; const dash = xray || 3;
slice.lines.forEach((line, i) => { slice.lines.forEach((line, i) => {

View file

@ -151,6 +151,7 @@
height: sliceHeight, height: sliceHeight,
minHeight: sliceMinHeight, minHeight: sliceMinHeight,
firstHeight: firstSliceHeight, firstHeight: firstSliceHeight,
union: settings.controller.healMesh,
// debug: true, // debug: true,
// xray: 3, // xray: 3,
// view: view // view: view

View file

@ -164,6 +164,8 @@ kiri.lang['en-us'] = {
pt_deci_l: "enable or disable point decimation\nduring port import. for faster slicing\nand lower memory usage", pt_deci_l: "enable or disable point decimation\nduring port import. for faster slicing\nand lower memory usage",
pt_qual_s: "quality", pt_qual_s: "quality",
pt_qual_l: "level of detail to retain\nduring slicing operations\nlower is faster", pt_qual_l: "level of detail to retain\nduring slicing operations\nlower is faster",
pt_heal_s: "heal mesh",
pt_heal_l: "attempt to heal\nnon-manifild meshes",
xp_menu: "exports", xp_menu: "exports",