Class Polyline2d
Represents a 2-dimensional polyline.
Inheritance
System.Object
Polyline2d
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Polyline2d : object
Constructors
| Improve this Doc View SourcePolyline2d(List<Point2d>, Boolean)
Initializes a new instance of the Polyline2d class.
Declaration
public Polyline2d(List<Point2d> vertices, bool closed)
Parameters
Type | Name | Description |
---|---|---|
List<Point2d> | vertices | Vertices of the polyline. |
System.Boolean | closed | Determine if polyline should be closed or not. |
Properties
| Improve this Doc View SourceBoundingBox
Gets the bounding box of the polyline.
Declaration
public Rectangle2d BoundingBox { get; }
Property Value
Type | Description |
---|---|
Rectangle2d | 2D bounding box. |
Domain
Gets the domain of the polyline.
Declaration
public Interval Domain { get; }
Property Value
Type | Description |
---|---|
Interval |
IsClosed
Gets or sets a value indicating whether the polyline is closed.
Declaration
public bool IsClosed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if closed. |
Length
Gets the length of the polyline.
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
System.Double |
Segments
Gets the polyline segments.
Declaration
public List<Line2d> Segments { get; }
Property Value
Type | Description |
---|---|
List<Line2d> | List of segments. |
Vertices
Gets or sets the polyline vertices.
Declaration
public List<Point2d> Vertices { get; }
Property Value
Type | Description |
---|---|
List<Point2d> | List of vertices. |
Methods
| Improve this Doc View SourceArea()
Computes the area of the polyline.
Declaration
public double Area()
Returns
Type | Description |
---|---|
System.Double | Area as number. |
IsClockwise()
Checks if the current polyline is CW or CCW.
Declaration
public bool IsClockwise()
Returns
Type | Description |
---|---|
System.Boolean | TRUE if the polyline is CW. FALSE if the polyline is CCW. |
Reparametrize()
Reparametrizes the current curve to a unit interval.
Declaration
public void Reparametrize()