Reorder points according to a curve

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:

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