Polyline

Properties:

  1. Area: Calculate and return the area of a closed polyline (if it is closed).
  2. Perimeter: Calculate and return the perimeter of the polyline.
  3. IsClosed: A property to check if the polyline is closed (i.e., the last vertex connects to the first).
  4. IsPlanar: A property to check if all vertices of the polyline lie in the same plane.
  5. BoundingBox: Get the bounding box of the polyline, which can be represented by two CustomPoint3d objects (min and max extents).
  6. Centroid: Calculate and return the centroid of the polyline based on its vertices.
  7. LengthAtVertex(index): Get the accumulated length of the polyline up to a specified vertex index.
  8. SegmentLengths: Return a list of the lengths of individual segments between vertices.

Methods:

  1. AddVertex(point): Add a new vertex to the polyline.
  2. RemoveVertex(index): Remove a vertex at the specified index.
  3. InsertVertex(index, point): Insert a new vertex at the specified index.
  4. Close(): Close an open polyline by connecting the last vertex to the first.
  5. ReverseDirection(): Reverse the order of vertices and update the corresponding lines.
  6. Explode(): Split the polyline into multiple line segments and return them as a list.
  7. IntersectWith(otherPolyline): Check if the polyline intersects with another polyline and return the intersection points.
  8. Offset(distance): Offset the polyline by a specified distance, creating a new polyline.
  9. SplitAtVertex(index): Split the polyline into two separate polylines at the specified vertex index.