Join colinear segments of a polyline

Is there a way to join the colinear segments of a polyline? Even if I try to shatter and rejoin, all the colinear segments are kept.

Even better, is there a way to join the colinear segments of a polyline with a provided tolerance?

Thanks in advance!

Simplify Curve :+1:

The RhinoCommon Polyline class has this method that one can implement in a scripting component:


241219_MergeColinearPolyline_00.gh (7.5 KB)

1 Like

Sorry for my lack of response… I got dragged to other projects!

Thanks both for your solutions.

1 Like