Feature Wish - Constrain CurveThroughPt to Specific Axes

As far as I’ve been able to discover - given a collection of points, CurveThroughPt will always evaluate the points based on proximity in all axes, returning a result like the middle curve.

If it was possible to constrain that evaluation to a specific axis - (world defined or possibly otherwise?) - then the bottom curve could be generated with the command.

(Please let me know if this is a crazy idea or if there is some other straightforward way to accomplish this. I’ve seen some approaches in Grasshopper that look like they’d work, but I’m trying to stay in the standard Rhino space for these operations right now.)

Hello- yeah the way Rhino does it is to try to string them together in a sort of ‘reasonable’ order - but a jumble of points like this is unlikely to get what users want every time. Your request seems like a reasonable one to me - I don’t know of any way in plain Rhino to make that happen.

RH-77398 CurveThroughPt: offer sorting

@Zaxxon - this only handles World XYZ at the moment but may help:

OrderedPolyline.py (3.0 KB)
@Zaxxon - updated to handle World and CPlane. I think.

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"


Wow, @pascal - that is amazing, it does the thing exactly, and totally helps.

(Top curve is script output)

Thanks for creating that code