PointList Class |
The PointList class defines a type safe point list.
Inheritance Hierarchy
Namespace: Tekla.Structures.Drawing
Assembly: Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2023.0.3
Syntax
The PointList type exposes the following members.
Constructors
Properties
Methods
Name | Description | |
---|---|---|
Add |
Adds a new point to the end of the point list.
| |
AddRange |
Appends all points from another point list to the end of this point list.
| |
Contains |
Checks if the given point is in the list.
| |
GetRange |
Gets a part of the point list.
| |
IndexOf(Point) |
Gets the index of the specified point.
| |
IndexOf(Point, Int32) |
Gets the index of the specified point between the index to start the search
from and the end of the list.
| |
IndexOf(Point, Int32, Int32) |
Gets the index of the specified point between the index to start the search from and startIndex + count.
| |
Insert |
Inserts the point to the specified index.
| |
IsEqual |
Compares the current object with an object of the same type.
| |
LastIndexOf(Point) |
Searches for the last occurence of the point in the list.
| |
LastIndexOf(Point, Int32) |
Searches for the last occurence of the point in the list.
| |
LastIndexOf(Point, Int32, Int32) |
Searches for the last occurence of the point in the list.
| |
Remove |
Removes the first occurence of the point from the list.
| |
RemoveRange |
Removes a range of items starting from the given index.
| |
ToArray |
Copies the points to a point array.
|
Examples
The following example adds a few points to the point list and inserts a new polygon:
using Tekla.Structures.Drawing; using Tekla.Structures.Geometry3d; public class Example { public void Example1() { Drawing MyDrawing = new GADrawing(); View MyView = new View(MyDrawing.GetSheet(), new CoordinateSystem(), new CoordinateSystem(), new AABB(new Point(), new Point(30000, 30000, 10000))); PointList MyPointList = new PointList(); MyPointList.Add(new Point(0.0, 0.0, 0.0)); MyPointList.Add(new Point(100.0, 0.0, 0.0)); MyPointList.Add(new Point(100.0, 500.0, 0.0)); MyPointList.Add(new Point(0.0, 500.0, 0.0)); Polygon MyPolygon = new Polygon(MyView, MyPointList); MyPolygon.Insert(); } }
See Also