Reorder points according to a curve

1
The index of the points are not in order.
In grasshopper, I can use a reference curve (red curve in the pic) to reorder them

But how to do it in Dynamo?

If you are familiar with RevitAPI / Python than you could use this function of a curve class:
https://www.revitapidocs.com/2015/b87fc3e4-ea25-2a75-5b5a-53065b099d2a.htm

It projects a point to the curve, which not only would give you a closest point on the curve (to the point given) but also it’s parameter. Curve parameters are ascending along the curve so you could use them to order your indexes.

1 Like