Fix for issue #9768

git-svn-id: https://triangle.svn.codeplex.com/svn@71203 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5
This commit is contained in:
SND\wo80_cp
2012-12-05 18:32:08 +00:00
parent fb6139a573
commit 40e15be85c
2 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -20,7 +20,7 @@ namespace TriangleNet
/// </remarks>
class NewLocation
{
const double EPS = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000001;
const double EPS = 1e-50;
Mesh mesh;
Behavior behavior;
@@ -91,7 +91,7 @@ namespace TriangleNet
// keeps the type of orientation if the triangle
int orientation = 0;
// keeps the coordinates of circumcenter of itself and neighbor triangle circumcenter
Point myCircumcenter = default(Point), neighborCircumcenter = default(Point);
Point myCircumcenter, neighborCircumcenter;
// keeps if bad triangle is almost good or not
int almostGood = 0;
@@ -170,8 +170,7 @@ namespace TriangleNet
dy = (xdo * aodist - xao * dodist) * denominator;
// for debugging and for keeping circumcenter to use later
// coordinate value of the circumcenter
myCircumcenter.x = torg.x + dx;
myCircumcenter.y = torg.y + dy;
myCircumcenter = new Point(torg.x + dx, torg.y + dy);
delotri = badotri; // save for later
///////////////// FINDING THE ORIENTATION OF TRIANGLE //////////////////
@@ -31,6 +31,8 @@ namespace TriangleNet.Smoothing
public void Smooth()
{
mesh.SetOption(Options.Quality, false);
// Take a few smoothing rounds.
for (int i = 0; i < 5; i++)
{
@@ -39,10 +41,7 @@ namespace TriangleNet.Smoothing
// Actually, we only want to rebuild, if mesh is no longer
// Delaunay. Flipping edges could be the right choice instead
// of re-triangulating...
var geometry = Rebuild();
mesh.SetOption(Options.Quality, false);
mesh.Triangulate(geometry);
mesh.Triangulate(Rebuild());
}
}