Show / Hide Table of Contents

    Class SetOperations

    Operations on sets of edges.

    Inheritance
    System.Object
    SetOperations
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements
    Assembly: Hypar.Elements.dll
    Syntax
    public static class SetOperations

    Methods

    BuildGraph(List<(Vector3 from, Vector3 to, SetClassification classification)>, IList<SetClassification>)

    Build a half edge graph from a collection of segments.

    Declaration
    public static HalfEdgeGraph2d BuildGraph(List<(Vector3 from, Vector3 to, SetClassification classification)> set, IList<SetClassification> boundaryClassifications = null)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.ValueTuple<Vector3, Vector3, SetClassification>> set

    A collection of classified segments.

    System.Collections.Generic.IList<SetClassification> boundaryClassifications

    A list of boundary classifications where edges will be created running in both directions. This is required for situations where the graph will be expected to produce multiple polygons with shared edges.

    Returns
    Type Description
    HalfEdgeGraph2d

    ClassifySegments2d(Polygon, Polygon, Func<(Vector3 from, Vector3 to, SetClassification classification), Boolean>)

    Intersect all segments in each polygon against all segments in the other polygon, splitting segments, and classify all the resulting segments.

    Declaration
    public static List<(Vector3 from, Vector3 to, SetClassification classification)> ClassifySegments2d(Polygon a, Polygon b, Func<(Vector3 from, Vector3 to, SetClassification classification), bool> filter = null)
    Parameters
    Type Name Description
    Polygon a
    Polygon b
    System.Func<System.ValueTuple<Vector3, Vector3, SetClassification>, System.Boolean> filter
    Returns
    Type Description
    System.Collections.Generic.List<System.ValueTuple<Vector3, Vector3, SetClassification>>
    In This Article
    • Methods
      • BuildGraph(List<(Vector3 from, Vector3 to, SetClassification classification)>, IList<SetClassification>)
      • ClassifySegments2d(Polygon, Polygon, Func<(Vector3 from, Vector3 to, SetClassification classification), Boolean>)