C# Class GeometryClassLibrary.LineSegmentListExtensions

ファイルを表示 Open project: ParagonTruss/GeometryClassLibrary

Public Methods

Method Description
AreAllCoplanar ( this passedLineList ) : bool

Returns true if all of the passed LineSegments are in the same plane, false otherwise

AreAllParallel ( this passedLineList ) : bool

Returns true if all of the passed LineSegments are in the same plane, false otherwise

AtleastOneIntersection ( this listOfSegments ) : bool
CreatePolygonIfValid ( this segments ) : Polygon

Creates a polygon if its valid to, otherwise returns null Use this over the ordinary constructor if you want to avoid a throw exception

DoFormClosedRegion ( this passedBoundaries ) : bool

Checks that all the boundaries meet end to end.

ExteriorProfileFromSegments ( this segments2D, Vector referenceNormal = null ) : Polygon
FixSegmentOrientation ( this segments ) : List

Returns a new list of segments with their directions such that they all flow in a consistent direction.

GetAllPoints ( this segments ) : List

Gets a list of all the unique Points represented in this list of LineSegments (both end and base points)

MakeCoplanarLineSegmentsIntoPolygons ( this passedLineSegments ) : List
ProjectAllOntoPlane ( this segmentList, Plane plane ) : List
SegmentsAdjacentTo ( this segmentList, LineSegment lineSegment ) : List

Note this will return two copies of the segment itself as well

SegmentsAdjacentTo ( this segmentList, Point vertex ) : List

given a list of edges, and a vertex, this returns all the edges that use the vertex as a base or end point NoteL this returns copies of those edges, and reorients them so that they use the vertex as a basepoint

Shift ( this lineSegments, Shift shift ) : List

Shifts the List of LineSegments with the given shift

ValidateForPolygon ( this segments ) : void

Returns true if the Polygon is valid (is a closed region and the LineSegments are all coplaner)

VerticesAdjacentTo ( this edgeList, Point vertex ) : List

Finds all points that are points adjacent to this point via one of these linesegments

Method Details

AreAllCoplanar() public static method

Returns true if all of the passed LineSegments are in the same plane, false otherwise
public static AreAllCoplanar ( this passedLineList ) : bool
passedLineList this
return bool

AreAllParallel() public static method

Returns true if all of the passed LineSegments are in the same plane, false otherwise
public static AreAllParallel ( this passedLineList ) : bool
passedLineList this
return bool

AtleastOneIntersection() public static method

public static AtleastOneIntersection ( this listOfSegments ) : bool
listOfSegments this
return bool

CreatePolygonIfValid() public static method

Creates a polygon if its valid to, otherwise returns null Use this over the ordinary constructor if you want to avoid a throw exception
public static CreatePolygonIfValid ( this segments ) : Polygon
segments this
return Polygon

DoFormClosedRegion() public static method

Checks that all the boundaries meet end to end.
public static DoFormClosedRegion ( this passedBoundaries ) : bool
passedBoundaries this
return bool

ExteriorProfileFromSegments() public static method

public static ExteriorProfileFromSegments ( this segments2D, Vector referenceNormal = null ) : Polygon
segments2D this
referenceNormal Vector
return Polygon

FixSegmentOrientation() public static method

Returns a new list of segments with their directions such that they all flow in a consistent direction.
public static FixSegmentOrientation ( this segments ) : List
segments this
return List

GetAllPoints() public static method

Gets a list of all the unique Points represented in this list of LineSegments (both end and base points)
public static GetAllPoints ( this segments ) : List
segments this
return List

MakeCoplanarLineSegmentsIntoPolygons() public static method

public static MakeCoplanarLineSegmentsIntoPolygons ( this passedLineSegments ) : List
passedLineSegments this
return List

ProjectAllOntoPlane() public static method

public static ProjectAllOntoPlane ( this segmentList, Plane plane ) : List
segmentList this
plane Plane
return List

SegmentsAdjacentTo() public static method

Note this will return two copies of the segment itself as well
public static SegmentsAdjacentTo ( this segmentList, LineSegment lineSegment ) : List
segmentList this
lineSegment LineSegment
return List

SegmentsAdjacentTo() public static method

given a list of edges, and a vertex, this returns all the edges that use the vertex as a base or end point NoteL this returns copies of those edges, and reorients them so that they use the vertex as a basepoint
public static SegmentsAdjacentTo ( this segmentList, Point vertex ) : List
segmentList this
vertex Point
return List

Shift() public static method

Shifts the List of LineSegments with the given shift
public static Shift ( this lineSegments, Shift shift ) : List
lineSegments this The List of Line Segments to Shift
shift Shift
return List

ValidateForPolygon() public static method

Returns true if the Polygon is valid (is a closed region and the LineSegments are all coplaner)
public static ValidateForPolygon ( this segments ) : void
segments this
return void

VerticesAdjacentTo() public static method

Finds all points that are points adjacent to this point via one of these linesegments
public static VerticesAdjacentTo ( this edgeList, Point vertex ) : List
edgeList this
vertex Point
return List