Polyline
Properties:
- Area: Calculate and return the area of a closed polyline (if it is closed).
- Perimeter: Calculate and return the perimeter of the polyline.
- IsClosed: A property to check if the polyline is closed (i.e., the last vertex connects to the first).
- IsPlanar: A property to check if all vertices of the polyline lie in the same plane.
- BoundingBox: Get the bounding box of the polyline, which can be represented by two
CustomPoint3d objects (min and max extents).
- Centroid: Calculate and return the centroid of the polyline based on its vertices.
- LengthAtVertex(index): Get the accumulated length of the polyline up to a specified vertex index.
- SegmentLengths: Return a list of the lengths of individual segments between vertices.
Methods:
- AddVertex(point): Add a new vertex to the polyline.
- RemoveVertex(index): Remove a vertex at the specified index.
- InsertVertex(index, point): Insert a new vertex at the specified index.
- Close(): Close an open polyline by connecting the last vertex to the first.
- ReverseDirection(): Reverse the order of vertices and update the corresponding lines.
- Explode(): Split the polyline into multiple line segments and return them as a list.
- IntersectWith(otherPolyline): Check if the polyline intersects with another polyline and return the intersection points.
- Offset(distance): Offset the polyline by a specified distance, creating a new polyline.
- SplitAtVertex(index): Split the polyline into two separate polylines at the specified vertex index.