C# Класс TriangleNet.Quality

Provides methods for mesh quality enforcement and testing.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddBadSubseg ( TriangleNet.Data.BadSubseg badseg ) : void

Add a bad subsegment to the queue.

CheckDelaunay ( ) : bool

Ensure that the mesh is (constrained) Delaunay.

CheckMesh ( ) : bool

Test the mesh for topological consistency.

CheckSeg4Encroach ( TriangleNet.Data.Osub &testsubseg ) : int

Check a subsegment to see if it is encroached; add it to the list if it is.

A subsegment is encroached if there is a vertex in its diametral lens. For Ruppert's algorithm (-D switch), the "diametral lens" is the diametral circle. For Chew's algorithm (default), the diametral lens is just big enough to enclose two isosceles triangles whose bases are the subsegment. Each of the two isosceles triangles has two angles equal to 'b.minangle'. Chew's algorithm does not require diametral lenses at all--but they save time. Any vertex inside a subsegment's diametral lens implies that the triangle adjoining the subsegment will be too skinny, so it's only a matter of time before the encroaching vertex is deleted by Chew's algorithm. It's faster to simply not insert the doomed vertex in the first place, which is why I use diametral lenses with Chew's algorithm.

EnforceQuality ( ) : void

Remove all the encroached subsegments and bad triangles from the triangulation.

Quality ( Mesh mesh ) : System
TestTriangle ( TriangleNet.Data.Otri &testtri ) : void

Test a triangle for quality and size.

Tests a triangle to see if it satisfies the minimum angle condition and the maximum area condition. Triangles that aren't up to spec are added to the bad triangle queue.

Приватные методы

Метод Описание
SplitEncSegs ( bool triflaws ) : void

Split all the encroached subsegments.

Each encroached subsegment is repaired by splitting it - inserting a vertex at or near its midpoint. Newly inserted vertices may encroach upon other subsegments; these are also repaired.

SplitTriangle ( TriangleNet.Data.BadTriangle badtri ) : void

Inserts a vertex at the circumcenter of a triangle. Deletes the newly inserted vertex if it encroaches upon a segment.

TallyEncs ( ) : void

Traverse the entire list of subsegments, and check each to see if it is encroached. If so, add it to the list.

TallyFaces ( ) : void

Test every triangle in the mesh for quality measures.

Описание методов

AddBadSubseg() публичный Метод

Add a bad subsegment to the queue.
public AddBadSubseg ( TriangleNet.Data.BadSubseg badseg ) : void
badseg TriangleNet.Data.BadSubseg Bad subsegment.
Результат void

CheckDelaunay() публичный Метод

Ensure that the mesh is (constrained) Delaunay.
public CheckDelaunay ( ) : bool
Результат bool

CheckMesh() публичный Метод

Test the mesh for topological consistency.
public CheckMesh ( ) : bool
Результат bool

CheckSeg4Encroach() публичный Метод

Check a subsegment to see if it is encroached; add it to the list if it is.
A subsegment is encroached if there is a vertex in its diametral lens. For Ruppert's algorithm (-D switch), the "diametral lens" is the diametral circle. For Chew's algorithm (default), the diametral lens is just big enough to enclose two isosceles triangles whose bases are the subsegment. Each of the two isosceles triangles has two angles equal to 'b.minangle'. Chew's algorithm does not require diametral lenses at all--but they save time. Any vertex inside a subsegment's diametral lens implies that the triangle adjoining the subsegment will be too skinny, so it's only a matter of time before the encroaching vertex is deleted by Chew's algorithm. It's faster to simply not insert the doomed vertex in the first place, which is why I use diametral lenses with Chew's algorithm.
public CheckSeg4Encroach ( TriangleNet.Data.Osub &testsubseg ) : int
testsubseg TriangleNet.Data.Osub The subsegment to check.
Результат int

EnforceQuality() публичный Метод

Remove all the encroached subsegments and bad triangles from the triangulation.
public EnforceQuality ( ) : void
Результат void

Quality() публичный Метод

public Quality ( Mesh mesh ) : System
mesh Mesh
Результат System

TestTriangle() публичный Метод

Test a triangle for quality and size.
Tests a triangle to see if it satisfies the minimum angle condition and the maximum area condition. Triangles that aren't up to spec are added to the bad triangle queue.
public TestTriangle ( TriangleNet.Data.Otri &testtri ) : void
testtri TriangleNet.Data.Otri Triangle to check.
Результат void