Don't loose polygon winding

This commit is contained in:
LarsBrubaker 2021-02-07 10:12:06 -08:00
parent 2026bb220c
commit 73b810c30f
4 changed files with 3 additions and 5 deletions

View file

@ -72,9 +72,7 @@ namespace MatterHackers.MatterControl.DesignTools
// remove every face above the cut plane
RemoveFacesAboveCut(mesh);
var aPolys = slice.GetCorrectedWinding();
aPolys.Vertices().TriangulateFaces(null, mesh, CutHeight);
slice.Vertices().TriangulateFaces(null, mesh, CutHeight);
mesh.Transform(itemMatrix.Inverted);

View file

@ -644,7 +644,7 @@ namespace MatterHackers.MatterControl
this.LoadedGCode = loadedGCode;
// Constrain to max layers
if (this.ActiveLayerIndex > loadedGCode.LayerCount)
if (this.ActiveLayerIndex > loadedGCode?.LayerCount)
{
this.ActiveLayerIndex = loadedGCode.LayerCount;
}

Binary file not shown.

@ -1 +1 @@
Subproject commit 9693c16ef9df11e1ebb3a4ea5a2bf94916341207
Subproject commit ccc47a29cd2ab3c0ebc3fbc8584e1194f38b20d1