Search Results for

    Show / Hide Table of Contents

    Class ConformingDelaunayTriangulator

    Computes a Conforming Delaunay Triangulation over a set of sites and a set of linear constraints.

    Inheritance
    object
    ConformingDelaunayTriangulator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Triangulate
    Assembly: NetTopologySuite.dll
    Syntax
    public class ConformingDelaunayTriangulator
    Remarks

    A conforming Delaunay triangulation is a true Delaunay triangulation. In it each constraint segment is present as a union of one or more triangulation edges. Constraint segments may be subdivided into two or more triangulation edges by the insertion of additional sites. The additional sites are called Steiner points, and are necessary to allow the segments to be faithfully reflected in the triangulation while maintaining the Delaunay property. Another way of stating this is that in a conforming Delaunay triangulation every constraint segment will be the union of a subset of the triangulation edges (up to tolerance).

    A Conforming Delaunay triangulation is distinct from a Constrained Delaunay triangulation. A Constrained Delaunay triangulation is not necessarily fully Delaunay, and it contains the constraint segments exactly as edges of the triangulation.

    A typical usage pattern for the triangulator is:

    ConformingDelaunayTriangulator cdt = new ConformingDelaunayTriangulator(sites, tolerance);
    

    // optional cdt.SplitPointFinder = splitPointFinder; cdt.VertexFactory = vertexFactory;

    cdt.SetConstraints(segments, new List<Vertex>(vertexMap.Values)); cdt.FormInitialDelaunay(); cdt.EnforceConstraints(); subdiv = cdt.Subdivision;

    Constructors

    | Edit this page View Source

    ConformingDelaunayTriangulator(IEnumerable<Vertex>, double)

    Creates a Conforming Delaunay Triangulation based on the given unconstrained initial vertices. The initial vertex set should not contain any vertices which appear in the constraint set.

    Declaration
    public ConformingDelaunayTriangulator(IEnumerable<Vertex> initialVertices, double tolerance)
    Parameters
    Type Name Description
    IEnumerable<Vertex> initialVertices

    a collection of ConstraintVertex

    double tolerance

    the distance tolerance below which points are considered identical

    Properties

    | Edit this page View Source

    ConstraintSegments

    Gets the Segments which represent the constraints.

    Declaration
    public ICollection<Segment> ConstraintSegments { get; }
    Property Value
    Type Description
    ICollection<Segment>
    | Edit this page View Source

    ConvexHull

    Gets the convex hull of all the sites in the triangulation, including constraint vertices. Only valid after the constraints have been enforced.

    Declaration
    public Geometry ConvexHull { get; }
    Property Value
    Type Description
    Geometry
    Remarks

    the convex hull of the sites

    | Edit this page View Source

    InitialVertices

    Gets the sites (vertices) used to initialize the triangulation.

    Declaration
    public IList<Vertex> InitialVertices { get; }
    Property Value
    Type Description
    IList<Vertex>
    | Edit this page View Source

    KDT

    Gets the KdTree<T> which contains the vertices of the triangulation.

    Declaration
    public KdTree<Vertex> KDT { get; }
    Property Value
    Type Description
    KdTree<Vertex>
    | Edit this page View Source

    SplitPointFinder

    Gets or sets the IConstraintSplitPointFinder to be used during constraint enforcement. Different splitting strategies may be appropriate for special situations.

    Declaration
    public IConstraintSplitPointFinder SplitPointFinder { get; set; }
    Property Value
    Type Description
    IConstraintSplitPointFinder
    Remarks

    the ConstraintSplitPointFinder to be used

    | Edit this page View Source

    Subdivision

    Gets the QuadEdgeSubdivision which represents the triangulation.

    Declaration
    public QuadEdgeSubdivision Subdivision { get; }
    Property Value
    Type Description
    QuadEdgeSubdivision
    | Edit this page View Source

    Tolerance

    Gets the tolerance value used to construct the triangulation.

    Declaration
    public double Tolerance { get; }
    Property Value
    Type Description
    double
    Remarks

    a tolerance value

    | Edit this page View Source

    VertexFactory

    Gets and sets the ConstraintVertexFactory used to create new constraint vertices at split points.

    Declaration
    public ConstraintVertexFactory VertexFactory { get; set; }
    Property Value
    Type Description
    ConstraintVertexFactory
    Remarks

    Allows the setting of a custom ConstraintVertexFactory to be used to allow vertices carrying extra information to be created.

    Methods

    | Edit this page View Source

    EnforceConstraints()

    Enforces the supplied constraints into the triangulation.

    Declaration
    public void EnforceConstraints()
    Exceptions
    Type Condition
    ConstraintEnforcementException

    if the constraints cannot be enforced

    | Edit this page View Source

    FormInitialDelaunay()

    Computes the Delaunay triangulation of the initial sites.

    Declaration
    public void FormInitialDelaunay()
    | Edit this page View Source

    InsertSite(Coordinate)

    Inserts a site into the triangulation, maintaining the conformal Delaunay property. This can be used to further refine the triangulation if required (e.g. to approximate the medial axis of the constraints, or to improve the grading of the triangulation).

    Declaration
    public void InsertSite(Coordinate p)
    Parameters
    Type Name Description
    Coordinate p

    the location of the site to insert

    | Edit this page View Source

    SetConstraints(IList<Segment>, IList<Vertex>)

    Sets the constraints to be conformed to by the computed triangulation. The constraints must not contain duplicate segments (up to orientation). The unique set of vertices (as ConstraintVertexes) forming the constraints must also be supplied. Supplying it explicitly allows the ConstraintVertexes to be initialized appropriately (e.g. with external data), and avoids re-computing the unique set if it is already available.

    Declaration
    public void SetConstraints(IList<Segment> segments, IList<Vertex> segVertices)
    Parameters
    Type Name Description
    IList<Segment> segments

    list of the constraint Segments

    IList<Vertex> segVertices

    the set of unique ConstraintVertexes referenced by the segments

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX