Match 3D curve length

Hello,
I have a list of curves that need to be matched according to the length of the longest curve. In the file the longest curve is 962mm and I need all the curves to be of the same length. Does anyone have a solution for this problem.

thanks,
Rane
Match lengths.gh (275.4 KB)

Your curves look like lines, but are in fact very dense polylines that start and end at the same point, in other words the curve runs back over itself. If your curves were just lines it would be possible to extend a curve to a certain length, but in this case it is difficult.

Rotate your view…

:person_facepalming: :person_facepalming: :person_facepalming:

Find attached a possible solution. If you have questions, let me know.

Match lengths-bisection.gh (283.2 KB)

Hello Menno,
thanks for working on a solution. I am trying to rework you script to solve these problems. let me know if you have a solution.

1- The top of the curves do not meet at the same point.
image

2- Some curves just explode out.

I don’t code with C# hence I’m trying to modify your code with Chat GPT.

Let me know if you have a solution for this.

I’m not seeing that with the C# code I provided. ChatGPT is notoriously untrustworthy when it comes to editing code, it will just hallucinate something that often turns out not to be a solution.

Hello Menno,
The script works perfect thanks for the help.

1 Like