Check that there are adds

This commit is contained in:
LarsBrubaker 2021-11-21 16:38:30 -08:00
parent 3437373ac7
commit 699921c0e2
2 changed files with 6 additions and 1 deletions

View file

@ -150,6 +150,11 @@ namespace MatterHackers.PolygonMesh
private static void EnsureFaceNormals(Plane plane, Mesh resultsMesh, int countPreAdd)
{
if (countPreAdd >= resultsMesh.Faces.Count)
{
return;
}
// Check that the new face normals are pointed in the right direction
if ((new Vector3(resultsMesh.Faces[countPreAdd].normal) - plane.Normal).LengthSquared > .1)
{

@ -1 +1 @@
Subproject commit a2677435dc039e3480e7ac31e70b16e4becc6e7f
Subproject commit 6f4172fc6bfeae29d55af26e6453e6807b651ab6