Generated by DocFX

Class Polygon

A closed planar PolyLine.

Inheritance
System.Object
NurbsBase
PolyLine
Polygon
Inherited Members
PolyLine.SegmentsCount
PolyLine.StartPoint
PolyLine.MidPoint
PolyLine.EndPoint
PolyLine.Length
PolyLine.Segments
PolyLine.IsClosed
PolyLine.GetBoundingBox()
PolyLine.LengthAt(Double)
PolyLine.Close()
PolyLine.PointAt(Double)
PolyLine.PointAtLength(Double)
PolyLine.PointAtNormalizedLength(Double)
PolyLine.ParameterAtLength(Double)
PolyLine.SegmentAtLength(Double)
PolyLine.ClosestParameter(Point3)
PolyLine.ClosestPoint(Point3)
PolyLine.Reverse()
PolyLine.Offset(Double, Plane)
PolyLine.Equals(PolyLine)
PolyLine.ToString()
NurbsBase.Weights
NurbsBase.Degree
NurbsBase.ControlPointLocations
NurbsBase.ControlPoints
NurbsBase.Knots
NurbsBase.IsPeriodic
NurbsBase.ParameterAtChordLength(Double, Double)
NurbsBase.DivideByChordLength(Double)
NurbsBase.TangentAt(Double)
NurbsBase.DerivativeAt(Double, Int32)
NurbsBase.Extrema()
NurbsBase.CurvatureAt(Double)
NurbsBase.PerpendicularFrameAt(Double)
NurbsBase.ClampEnds()
NurbsBase.Join(IList<NurbsBase>)
NurbsBase.DecomposeIntoBeziers()
NurbsBase.ElevateDegree(Int32)
NurbsBase.ReduceDegree(Double)
NurbsBase.Divide(Int32)
NurbsBase.Divide(Double, Boolean)
NurbsBase.PerpendicularFrames(List<Double>, Nullable<Vector3>, Nullable<Vector3>)
NurbsBase.SplitAt(Double)
NurbsBase.SplitAt(Double[])
NurbsBase.SubCurve(Interval)
NurbsBase.Equals(NurbsBase)
NurbsBase.Equals(Object)
NurbsBase.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Syntax
public class Polygon : PolyLine, IGeometry<NurbsBase>, IEquatable<NurbsBase>, ITransformable<NurbsBase>, IGeometry<PolyLine>, IEquatable<PolyLine>, ITransformable<PolyLine>

Constructors

| Improve this Doc View Source

Polygon(IList<Point3>)

Declaration
public Polygon(IList<Point3> vertices)
Parameters
Type Name Description
System.Collections.Generic.IList<Point3> vertices

Properties

| Improve this Doc View Source

Area

Gets the area from a list of points.
The list should represent a closed curve and planar.
https://stackoverflow.com/questions/25340106/boostgeometry-find-area-of-2d-polygon-in-3d-space
http://geomalgorithms.com/a01-_area.html

Declaration
public double Area { get; }
Property Value
Type Description
System.Double

Area calculated.

| Improve this Doc View Source

CentroidByArea

Gets the centroid of mass of the polygon.
https://stackoverflow.com/questions/9815699/how-to-calculate-centroid
http://csharphelper.com/blog/2014/07/find-the-centroid-of-a-polygon-in-c/

Declaration
public Point3 CentroidByArea { get; }
Property Value
Type Description
Point3
| Improve this Doc View Source

CentroidByVertices

Gets the centroid averaging the vertices.

Declaration
public Point3 CentroidByVertices { get; }
Property Value
Type Description
Point3
| Improve this Doc View Source

Plane

Gets the plane of the Polygon.

Declaration
public Plane Plane { get; }
Property Value
Type Description
Plane

Methods

| Improve this Doc View Source

Rectangle(Plane, Double, Double)

Creates a rectangle on a plane.
The plane is located at the centre of the rectangle.

Declaration
public static Polygon Rectangle(Plane plane, double xDimension, double yDimension)
Parameters
Type Name Description
Plane plane

The plane on where the rectangle will be created.

System.Double xDimension

The value dimension of the rectangle along the x direction of the plane.

System.Double yDimension

The value dimension of the rectangle along the y direction of the plane.

Returns
Type Description
Polygon
| Improve this Doc View Source

RegularPolygon(Plane, Double, Int32)

Creates a regular polygon, inscribed into a circle.
The plane is located at the centre of the polygon.

Declaration
public static Polygon RegularPolygon(Plane plane, double radius, int numberOfSegments)
Parameters
Type Name Description
Plane plane

The plane on where the polygon will be created.

System.Double radius

The distance from the center to the corners of the polygon.

System.Int32 numberOfSegments

Number of segments of the polygon.

Returns
Type Description
Polygon
| Improve this Doc View Source

Transform(TransformMatrix)

Applies a transformation to all the points.

Declaration
public Polygon Transform(TransformMatrix transform)
Parameters
Type Name Description
TransformMatrix transform

Transformation matrix to apply.

Returns
Type Description
Polygon

A polygon transformed.

Implements

IGeometry<T>
System.IEquatable<T>
ITransformable<T>
IGeometry<T>
System.IEquatable<T>
ITransformable<T>