Unfold quadrant curve with kink(s)

Hello everyone, I’m new to this forum and also to Grasshopper, so please excuse me if I ask something obvious. :slightly_smiling_face:

Situation: I’m working on the geometry of ribbed vaults and I’m trying to write a little program in Grasshopper, which should calculate the radius of a circle best fitting to measured points with a laser total station. So, I have some measured points and Grasshopper should fit a circle through them. Until now, we used a really old program and we always had to extract the points in Rhino, save it as a txt-file and open it with the other program. It would be much easier to do all the steps in Rhino/Grasshopper, so that’s what I’m trying to achieve.

Problem: The curve of the points has a kink in it and does not form a “straight line”, where I could easily fit a circle. Without this kink, the curve would form a quadrant of a circle - so the parts of the curve before and after the kink have the same radius. Here’s a picture of one of those curves for a better understanding:

and the Rhino-File of the curve shown in the picture:

Testkurve.3dm (33.4 KB)

What I’m trying to do now is to unfold the curve and “eliminate the kink”. The result should be a “flattened” curve with the measured points in the exact relation as before on it, so I can fit a circle and calculate the radius. Now at this point, I’m completely lost on how to solve this problem.

Attempts: I think the solution to the problem is somewhere in transforming or moving the Y-coordinates of the points and align them new with the given relation. I already tried to project the point onto a new plane without the Y-Coordinates, but needless to say that it’s not working, because the relation of the points all get mixed up:

As I sadly don’t know Grasshopper well yet, I’m not sure what possible solutions I could try and how to tackle this problem of unfolding the curve.

If someone could help me with this or just share some ideas, I would be eternally grateful! :slightly_smiling_face:

Thank you in advance and best regards,

If I understood correctly, you want to extract the best fitting circle to the points of the first sector but also take into account the projection of the points of the second sector onto the plane of the first (right?)
in this definition, you select manually the first group of points with the slider.arc.gh (9.9 KB)

1 Like

Thank you very much, Aris, this solution is really elegant! :smiley:

Maybe I have to adjust some settings, because the radius is slightly different to the one calculated by my old program (propably the old program is not working correctly anymore). However, the deviation of the fitted circle in your solution is now much lower and I will do some testing now with other curves!

Thank you again, your help is very much appreciated!

1 Like