Show / Hide Table of Contents

Class Polygon

Polygon class type for handling polygons made up of 2 or more points, a property defines in polygon is closed or open

Inheritance
System.Object
Polygon
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public class Polygon : Collection<IPolygonSegment>

Constructors

View Source

Polygon()

Construct

Declaration
public Polygon()
Remarks

Polygon will be open, first and last points not connected

View Source

Polygon(Point3d[], Boolean)

Construct a polygon from an array of Point3d[]'s

Declaration
public Polygon(Point3d[] points, bool closed = true)
Parameters
Type Name Description
Point3d[] points

Array of Poind3d

System.Boolean closed

Is a closed polygon

View Source

Polygon(Boolean)

Construct with a bool declared if polygon will be closed or not

Declaration
public Polygon(bool closed)
Parameters
Type Name Description
System.Boolean closed

Methods

View Source

AddArc(Point3d, Point3d, PolygonArcSegmentDirections)

Add a Arc segment to the polygon using the parameters passed

Declaration
public void AddArc(Point3d centre, Point3d start, PolygonArcSegmentDirections polygonArcSegmentDirection = PolygonArcSegmentDirections.CounterClockwise)
Parameters
Type Name Description
Point3d centre

Centre point of arc

Point3d start

Start point on circumference of arc

PolygonArcSegmentDirections polygonArcSegmentDirection

Direction in which the draw the arc, default: CCW

View Source

AddLine(Point3d)

Add a Line segment to the polygon using the coordinates in the parameter

Declaration
public void AddLine(Point3d start)
Parameters
Type Name Description
Point3d start

Projection or Zone name of the cartesian grid coordinates

View Source

AsGeoMapElementCollection(String)

Transforms polygon into a collection of GeoMapElements

Declaration
public GeoMapElementCollection AsGeoMapElementCollection(string projectionOfCartesianCoordinates)
Parameters
Type Name Description
System.String projectionOfCartesianCoordinates

Projection or Zone name of the cartesian grid coordinates

Returns
Type Description
GeoMapElementCollection
View Source

ConstructPolygonBoundary(List<Point3d>, List<Circle>)

Constructs a boundary polygon that fits to the extents of the point geometry. The resulted polygon will be convex and enclose all given points and circles.

Declaration
public static Polygon ConstructPolygonBoundary(List<Point3d> points, List<Circle> circles)
Parameters
Type Name Description
List<Point3d> points

Discrete vertices, must be 2D

List<Circle> circles

discrete circles, must be 2D

Returns
Type Description
Polygon
  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited