Sometimes I have too many vertices and rebuild doesn’t quite do what I need. How do I merge vertices by distance? Thank you.
Is this for polylines? There is a function for that in Grasshopper, as well as in RhinoCommon. However for arbitrary NURBS curves, there is not, only Rebuild or RebuildCrvNonUniform.
You could try to use the control points to make a polyline and then reduce the number of points using the above mentioned function, then reconverting to a NURBS curve, but I don’t know if that would be really useful or any better…
Thanks. Yes for polylines. Those functions kind of do the job. The issue is with maintaining sharp corners.
For polylines, sharp corners are always maintained… they stay polylines.
Hi Peter - see if this helps - I’m not sure it does what you need but it might
CleanUpPolyline.py (1.9 KB)
To use the Python script use
RunPythonScript, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
Thanks Pascal. Ill give it a shot next time the issue arises.
Here’s mine just in case…
ReducePolylines.py (2.7 KB)