Make sure we only split sorted meshes
This commit is contained in:
parent
5cb3d97bfa
commit
32e38ff3d6
1 changed files with 7 additions and 1 deletions
|
|
@ -61,9 +61,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
var ungroupItem = Scene.SelectedItem;
|
var ungroupItem = Scene.SelectedItem;
|
||||||
// clear the selection
|
// clear the selection
|
||||||
Scene.SelectedItem = null;
|
Scene.SelectedItem = null;
|
||||||
|
var ungroupMesh = ungroupItem.Mesh;
|
||||||
|
|
||||||
|
if (!ungroupMesh.Vertices.IsSorted)
|
||||||
|
{
|
||||||
|
ungroupMesh.CleanAndMergeMesh(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
// try to cut it up into multiple meshes
|
// try to cut it up into multiple meshes
|
||||||
var discreetMeshes = CreateDiscreteMeshes.SplitVolumesIntoMeshes(ungroupItem.Mesh, CancellationToken.None, (double progress0To1, string processingState) =>
|
var discreetMeshes = CreateDiscreteMeshes.SplitVolumesIntoMeshes(ungroupMesh, CancellationToken.None, (double progress0To1, string processingState) =>
|
||||||
{
|
{
|
||||||
//view3DWidget.ReportProgressChanged(progress0To1 * .5, processingState);
|
//view3DWidget.ReportProgressChanged(progress0To1 * .5, processingState);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue