Minor changes
git-svn-id: https://triangle.svn.codeplex.com/svn@75118 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5
This commit is contained in:
@@ -13,7 +13,15 @@ namespace TriangleNet.IO
|
||||
|
||||
public static class FileProcessor
|
||||
{
|
||||
static List<IFileFormat> formats = new List<IFileFormat>();
|
||||
static List<IFileFormat> formats;
|
||||
|
||||
static FileProcessor()
|
||||
{
|
||||
formats = new List<IFileFormat>();
|
||||
|
||||
// Add Triangle file format as default.
|
||||
formats.Add(new TriangleFormat());
|
||||
}
|
||||
|
||||
public static void Add(IFileFormat format)
|
||||
{
|
||||
|
||||
@@ -345,6 +345,8 @@ namespace TriangleNet
|
||||
behavior.MaxArea = quality.MaximumArea;
|
||||
behavior.UserTest = quality.UserTest;
|
||||
|
||||
behavior.SteinerPoints = quality.SteinerPoints == 0 ? -1 : quality.SteinerPoints;
|
||||
|
||||
behavior.Quality = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,17 +20,16 @@ namespace TriangleNet
|
||||
{
|
||||
Otri tri = default(Otri);
|
||||
Otri oppotri = default(Otri), oppooppotri = default(Otri);
|
||||
Vertex triorg, tridest, triapex;
|
||||
Vertex org, dest, apex;
|
||||
Vertex oppoorg, oppodest;
|
||||
int horrors;
|
||||
bool saveexact;
|
||||
|
||||
var logger = Log.Instance;
|
||||
|
||||
// Temporarily turn on exact arithmetic if it's off.
|
||||
saveexact = Behavior.NoExact;
|
||||
bool saveexact = Behavior.NoExact;
|
||||
Behavior.NoExact = false;
|
||||
horrors = 0;
|
||||
|
||||
int horrors = 0;
|
||||
|
||||
// Run through the list of triangles, checking each one.
|
||||
foreach (var t in mesh.triangles.Values)
|
||||
@@ -40,14 +39,14 @@ namespace TriangleNet
|
||||
// Check all three edges of the triangle.
|
||||
for (tri.orient = 0; tri.orient < 3; tri.orient++)
|
||||
{
|
||||
triorg = tri.Org();
|
||||
tridest = tri.Dest();
|
||||
org = tri.Org();
|
||||
dest = tri.Dest();
|
||||
if (tri.orient == 0)
|
||||
{
|
||||
// Only test for inversion once.
|
||||
// Test if the triangle is flat or inverted.
|
||||
triapex = tri.Apex();
|
||||
if (RobustPredicates.CounterClockwise(triorg, tridest, triapex) <= 0.0)
|
||||
apex = tri.Apex();
|
||||
if (RobustPredicates.CounterClockwise(org, dest, apex) <= 0.0)
|
||||
{
|
||||
if (Log.Verbose)
|
||||
{
|
||||
@@ -78,7 +77,7 @@ namespace TriangleNet
|
||||
// of their shared vertices.
|
||||
oppoorg = oppotri.Org();
|
||||
oppodest = oppotri.Dest();
|
||||
if ((triorg != oppodest) || (tridest != oppoorg))
|
||||
if ((org != oppodest) || (dest != oppoorg))
|
||||
{
|
||||
if (Log.Verbose)
|
||||
{
|
||||
@@ -135,21 +134,20 @@ namespace TriangleNet
|
||||
Osub opposubseg = default(Osub);
|
||||
Vertex org, dest, apex;
|
||||
Vertex oppoapex;
|
||||
Vertex inf1, inf2, inf3;
|
||||
|
||||
bool shouldbedelaunay;
|
||||
int horrors;
|
||||
bool saveexact;
|
||||
|
||||
var logger = Log.Instance;
|
||||
|
||||
// Temporarily turn on exact arithmetic if it's off.
|
||||
saveexact = Behavior.NoExact;
|
||||
bool saveexact = Behavior.NoExact;
|
||||
Behavior.NoExact = false;
|
||||
horrors = 0;
|
||||
|
||||
inf1 = mesh.infvertex1;
|
||||
inf2 = mesh.infvertex2;
|
||||
inf3 = mesh.infvertex3;
|
||||
int horrors = 0;
|
||||
|
||||
var inf1 = mesh.infvertex1;
|
||||
var inf2 = mesh.infvertex2;
|
||||
var inf3 = mesh.infvertex3;
|
||||
|
||||
// Run through the list of triangles, checking each one.
|
||||
foreach (var tri in mesh.triangles.Values)
|
||||
|
||||
@@ -42,5 +42,14 @@ namespace TriangleNet.Meshing
|
||||
/// be used to check if a triangle needs refinement.
|
||||
/// </remarks>
|
||||
public bool VariableArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of Steiner points to be inserted into the mesh.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If the value is 0 (default), an unknown number of Steiner points may be inserted
|
||||
/// to meet the other qulaity constraints.
|
||||
/// </remarks>
|
||||
public int SteinerPoints { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user