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
[SerializableAttribute]
public sealed class PointList : CollectionBase

The PointList type exposes the following members.

Constructors
  NameDescription
Public methodPointList
Initializes a new instance of the PointList class
Top
Properties
  NameDescription
Public propertyItem
Gets or sets the point at the specified index.
Top
Methods
  NameDescription
Public methodAdd
Adds a new point to the end of the point list.
Public methodAddRange
Appends all points from another point list to the end of this point list.
Public methodContains
Checks if the given point is in the list.
Public methodGetRange
Gets a part of the point list.
Public methodIndexOf(Point)
Gets the index of the specified point.
Public methodIndexOf(Point, Int32)
Gets the index of the specified point between the index to start the search from and the end of the list.
Public methodIndexOf(Point, Int32, Int32)
Gets the index of the specified point between the index to start the search from and startIndex + count.
Public methodInsert
Inserts the point to the specified index.
Public methodIsEqual
Compares the current object with an object of the same type.
Public methodLastIndexOf(Point)
Searches for the last occurence of the point in the list.
Public methodLastIndexOf(Point, Int32)
Searches for the last occurence of the point in the list.
Public methodLastIndexOf(Point, Int32, Int32)
Searches for the last occurence of the point in the list.
Public methodRemove
Removes the first occurence of the point from the list.
Public methodRemoveRange
Removes a range of items starting from the given index.
Public methodToArray
Copies the points to a point array.
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next