RhinoCommon API
PolylineMergeColinearSegments Method |
Merge co-linear consecutive segments in a polyline.
This method will automatically remove any zero-length segments as well.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)

public int MergeColinearSegments( double angleTolerance, bool includeSeam )
Public Function MergeColinearSegments ( angleTolerance As Double, includeSeam As Boolean ) As Integer
Parameters
- angleTolerance
- Type: SystemDouble
The angle tolerance between adjacent segments for co-linearlity test. - includeSeam
- Type: SystemBoolean
If true, the seam point of a closed polyline will be moved forwards if it is colinear too.
Return Value
Type: Int32Number of segments removed from the entire polyline.

Rhino for Windows
Supported in: 6.14