I have a group of unordered points (attached) that I need to fit a curve through. Something like _Circle, _FitPoints although with a curve instead of a circle.
Initially I thought to use rs.AddCurve then rebuild it with less control points however as my points are unordered the curve jumps from one side to the other.
I have a lot of these groups and would like some way to automate this process. The result should look something like this:
This is just a quick suggestion - iterating through your unordered points and finding the closest one.
Play around with the number of final curve control points a little bit get some different shapes (for now it’s 19).
I think some guru around here might come up with a better solution.
edit: added checking for duplicate points. fitCurveThroughPoints.py (2.1 KB)