Changes to input geometry properties,
EdgeEnumerator includes boundary mark, Mesh Check method signature changed git-svn-id: https://triangle.svn.codeplex.com/svn@69725 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5
This commit is contained in:
@@ -626,8 +626,13 @@ namespace MeshExplorer
|
||||
{
|
||||
if (mesh != null)
|
||||
{
|
||||
mesh.Check();
|
||||
ShowLog();
|
||||
bool isConsistent, isDelaunay;
|
||||
mesh.Check(out isConsistent, out isDelaunay);
|
||||
|
||||
if (!isConsistent || !isDelaunay)
|
||||
{
|
||||
ShowLog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace TriangleNet.Geometry
|
||||
/// </summary>
|
||||
public int P0
|
||||
{
|
||||
get; private set;
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,7 +31,8 @@ namespace TriangleNet.Geometry
|
||||
/// </summary>
|
||||
public int P1
|
||||
{
|
||||
get; private set;
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,7 +40,8 @@ namespace TriangleNet.Geometry
|
||||
/// </summary>
|
||||
public int Boundary
|
||||
{
|
||||
get; private set;
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace TriangleNet.Geometry
|
||||
IEnumerator<Triangle> triangles;
|
||||
Otri tri = default(Otri);
|
||||
Otri neighbor = default(Otri);
|
||||
Osub sub = default(Osub);
|
||||
Edge current;
|
||||
Vertex p1, p2;
|
||||
|
||||
@@ -82,7 +83,10 @@ namespace TriangleNet.Geometry
|
||||
p1 = tri.Org();
|
||||
p2 = tri.Dest();
|
||||
|
||||
current = new Edge(p1.id, p2.id);
|
||||
tri.SegPivot(ref sub);
|
||||
|
||||
// Boundary mark of dummysub is 0, so we don't need to worry about that.
|
||||
current = new Edge(p1.id, p2.id, sub.seg.boundary);
|
||||
}
|
||||
|
||||
tri.orient++;
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace TriangleNet.Geometry
|
||||
/// <summary>
|
||||
/// Gets the list of input segments.
|
||||
/// </summary>
|
||||
public IEnumerable<Edge> Segments
|
||||
public ICollection<Edge> Segments
|
||||
{
|
||||
get { return segments; }
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace TriangleNet.Geometry
|
||||
/// <summary>
|
||||
/// Gets the list of input holes.
|
||||
/// </summary>
|
||||
public IEnumerable<Point> Holes
|
||||
public ICollection<Point> Holes
|
||||
{
|
||||
get { return holes; }
|
||||
}
|
||||
@@ -102,7 +102,7 @@ namespace TriangleNet.Geometry
|
||||
/// <summary>
|
||||
/// Gets the list of regions.
|
||||
/// </summary>
|
||||
public IEnumerable<RegionPointer> Regions
|
||||
public ICollection<RegionPointer> Regions
|
||||
{
|
||||
get { return regions; }
|
||||
}
|
||||
|
||||
@@ -516,10 +516,12 @@ namespace TriangleNet
|
||||
/// <summary>
|
||||
/// Check mesh consistency and (constrained) Delaunay property.
|
||||
/// </summary>
|
||||
public void Check()
|
||||
/// <param name="isConsistent">Value indicating if mesh topology is consistent.</param>
|
||||
/// <param name="isDelaunay">Value indicating if mesh is Delaunay.</param>
|
||||
public void Check(out bool isConsistent, out bool isDelaunay)
|
||||
{
|
||||
quality.CheckMesh();
|
||||
quality.CheckDelaunay();
|
||||
isConsistent = quality.CheckMesh();
|
||||
isDelaunay = quality.CheckDelaunay();
|
||||
}
|
||||
|
||||
#region Options
|
||||
|
||||
@@ -123,21 +123,20 @@ namespace TriangleNet
|
||||
}
|
||||
}
|
||||
|
||||
if (horrors == 0)
|
||||
if (horrors == 0 && Behavior.Verbose)
|
||||
{
|
||||
if (Behavior.Verbose)
|
||||
{
|
||||
logger.Info("In my studied opinion, the mesh appears to be consistent.");
|
||||
}
|
||||
}
|
||||
else if (horrors == 1)
|
||||
{
|
||||
logger.Info("Precisely one festering wound discovered.");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Info(horrors + " abominations witnessed.");
|
||||
logger.Info("Mesh topology appears to be consistent.");
|
||||
//logger.Info("In my studied opinion, the mesh appears to be consistent.");
|
||||
}
|
||||
//else if (horrors == 1)
|
||||
//{
|
||||
// logger.Info("Precisely one festering wound discovered.");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// logger.Info(horrors + " abominations witnessed.");
|
||||
//}
|
||||
|
||||
// Restore the status of exact arithmetic.
|
||||
Behavior.NoExact = saveexact;
|
||||
|
||||
@@ -212,21 +211,21 @@ namespace TriangleNet
|
||||
}
|
||||
|
||||
}
|
||||
if (horrors == 0)
|
||||
|
||||
if (horrors == 0 && Behavior.Verbose)
|
||||
{
|
||||
if (Behavior.Verbose)
|
||||
{
|
||||
logger.Info("By virtue of my perceptive intelligence, I declare the mesh Delaunay.");
|
||||
}
|
||||
}
|
||||
else if (horrors == 1)
|
||||
{
|
||||
logger.Info("Precisely one terrifying transgression identified.");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.Info(horrors + " obscenities viewed with horror.");
|
||||
logger.Info("Mesh is Delaunay.");
|
||||
//logger.Info("By virtue of my perceptive intelligence, I declare the mesh Delaunay.");
|
||||
}
|
||||
//else if (horrors == 1)
|
||||
//{
|
||||
// logger.Info("Precisely one terrifying transgression identified.");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// logger.Info(horrors + " obscenities viewed with horror.");
|
||||
//}
|
||||
|
||||
// Restore the status of exact arithmetic.
|
||||
Behavior.NoExact = saveexact;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user