Reduce polyline point count function/command

When dealing with terrain data, often it is in the form of polylines, and depending on what data source it is from and how it has been scaled, they can be very, very dense. There is a component in Grasshopper that reduces polyline point count within a given tolerance (using the Douglas-Peucker algorithm if I’m not mistaken); it has also been implemented as a method in RhinoCommon - Rhino.Geometry. Polyline.ReduceSegments(tolerance). I have implemented several scripts here that use this.

My wish would be to have this as a native function in Rhino - either as a separate command or perhaps as part of FitCrv. Right now you cannot FitCrv with less than degree 2. Perhaps if the user could enter 1 as a degree, it could either use Convert (under the hood) with a spline input of degree 2+, or use the Reduce algorithm if the input curve was a degree 1 polycurve or a polyline.

If it was to be a separate command from FitCrv, then I would propose also integrating a polyline smoothing function as an option (also available in RhinoCommmon).

Thanks, --Mitch

Hi Mitch- thanks -

https://mcneel.myjetbrains.com/youtrack/issue/RH-44758

-Pascal