Changes to workaround of issue #9390
git-svn-id: https://triangle.svn.codeplex.com/svn@67388 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5
This commit is contained in:
@@ -36,8 +36,7 @@ namespace TriangleNet
|
||||
Osub hullsubseg = default(Osub);
|
||||
Vertex horg, hdest;
|
||||
|
||||
int workaround, ntri = mesh.triangles.Count;
|
||||
Queue<Triangle> infectedTris = new Queue<Triangle>();
|
||||
int workaround, nseg= mesh.subsegs.Count;
|
||||
|
||||
// Find a triangle handle on the hull.
|
||||
hulltri.triangle = Mesh.dummytri;
|
||||
@@ -62,8 +61,6 @@ namespace TriangleNet
|
||||
{
|
||||
hulltri.Infect();
|
||||
mesh.viri.Add(hulltri.triangle);
|
||||
|
||||
infectedTris.Enqueue(hulltri.triangle);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -93,16 +90,15 @@ namespace TriangleNet
|
||||
nexttri.Copy(ref hulltri);
|
||||
hulltri.Oprev(ref nexttri);
|
||||
|
||||
workaround++;
|
||||
|
||||
if (workaround > ntri)
|
||||
if (++workaround > nseg)
|
||||
{
|
||||
// Reverse infection
|
||||
mesh.viri.Clear();
|
||||
while (infectedTris.Count > 0)
|
||||
foreach (var item in mesh.viri)
|
||||
{
|
||||
infectedTris.Dequeue().infected = false;
|
||||
item.infected = false;
|
||||
}
|
||||
mesh.viri.Clear();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user