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,
decimate: true,
detail: "good",
animesh: "200"
animesh: "200",
healMesh: false
},
// label state preferences
labels: {

View file

@ -152,6 +152,7 @@
control.exportLocal = UI.exportLocal.checked;
control.exportPreview = UI.exportPreview.checked;
control.decimate = UI.decimate.checked;
control.healMesh = UI.healMesh.checked;
SPACE.view.setZoom(control.reverseZoom, control.zoomSpeed);
// platform.layout();
API.conf.save();
@ -1645,6 +1646,7 @@
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"),
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')),
@ -2373,6 +2375,7 @@
UI.reverseZoom.checked = control.reverseZoom;
UI.autoSave.checked = control.autoSave;
UI.decimate.checked = control.decimate;
UI.healMesh.checked = control.healMesh;
lineTypeSave();
detailSave();
updateFPS();

View file

@ -530,6 +530,9 @@
// for topo slices, we just need the raw lines
if (!topoMode && !simpleMode) {
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) {
const dash = xray || 3;
slice.lines.forEach((line, i) => {