PolygonCornerCollection

A collection of corner coordinates.

Example

app = cf.GetApplication()
project = app:NewProject()
polygon = project.Geometry:AddPolygon({cf.Point(1,0,0), cf.Point(1,1,0), cf.Point(1,1,1)})

    -- Use the collection to count the corners and modify the last point

cornerCount = #polygon.Corners  
polygon.Corners[cornerCount].U = 0

Usage locations (collections)

The following objects contain the PolygonCornerCollection collection:

Property List

Count
The number of LocalCoordinates items in the collection. (Read only number)

Method List

Add (point Coordinate)
Add a corner coordinate to the polygon.
Item (index number)
Returns the LocalCoordinates at the given index. (Returns a LocalCoordinates object.)
Modify (index number, point Coordinate)
Modify the corner coordinate at the given index.
Remove (index number)
Remove a corner from the polygon at the given index.
Set (points List of Point)
Replace the corners with a list of points.

Index List

[number]
Returns the LocalCoordinates at the given index in the collection. (Read LocalCoordinates)

Property Details

Count
The number of LocalCoordinates items in the collection.
Type
number
Access
Read only

Method Details

Add (point Coordinate)
Add a corner coordinate to the polygon.
Input Parameters
point(Coordinate)
The corner coordinate.
Item (index number)
Returns the LocalCoordinates at the given index.
Input Parameters
index(number)
The index of the LocalCoordinates.
Return
LocalCoordinates
The LocalCoordinates at the given index.
Modify (index number, point Coordinate)
Modify the corner coordinate at the given index.
Input Parameters
index(number)
The corner index.
point(Coordinate)
The new corner coordinate.
Remove (index number)
Remove a corner from the polygon at the given index.
Input Parameters
index(number)
The corner index.
Set (points List of Point)
Replace the corners with a list of points.
Input Parameters
points(List of Point)
A table of points.