Shift indices automacally for different curves!

Hello Dynamo community!

Is it possible to Shift indices automatically for different curves?
I always need the index 0 in the middle to the top curve.

Thank you for your helpCurves.dyn|attachment (18.4 KB)
Curves.rvt (1.2 MB)

If index 0 is the start point of your curve just count the number of points and shift indices back half that many.

One of the polycurves in your example has all component curves parallel to the XY plane.

Modified your graph to give the midpoint of the top curve as the first item of each list of points.
Curves.dyn (42.1 KB)

1 Like

Hello Nick,

Thank you for your answer!

If you see my script this is I did but I want something more automatically.

Hello Vikram!

Thank you for your answer and for the script, unfortunatelly your script is in Dynamo 2.0 and I have Dynamo 1.3.3. I rewrote your script but there is something wrong. Could you please see where is my mistake?

Thank youCurvesVersion_Vikram.dyn|attachment (19.7 KB)

I meant automate that same process. Use nodes to count the number of points and divide that in half.

Hi Nick,

Thank you again for your time and your answer.
I will try your method and keep you informed of the result.


Hi Vikram,
Your script work right. There are only four things that I don’t understand.

Your script with Code block doesn’t work, I had to install your node from Dynamo Packages. I think there is a conflict with Archilab Package.
The node List.SortByKey from Core doesn’t work with your node but with the node [&] List.SortByKey from Ampersand work perfect.
Please look the script, I made some modifications because for the first group of curves (who contains 4 Arcs) the Parameter 0.5 in the node Curve.PointAtParameter is not right. I had to guess between 0 and 1.
In the last part of the script I had to reverse the first group of curves for join the points between curves correctly.
Thank you very much!

This is the script with the last modifications!
CurvesVersion_Vikram.dyn (31.8 KB)

Seems like your objective is to get the isolines, you can try something like this instead.
CurvesVersion_Vikram.dyn (18.3 KB)

It’s just perfect, thank you very much Vikram.

1 Like