Hello everyone, I’m new to this forum and also to Grasshopper, so please excuse me if I ask something obvious.
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!
Thank you in advance and best regards,
Manuel