Hello everyone,

**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)

**Possible Solution:** What I’m trying to do now, is to measure the distance between the points. So as a first step, Grasshopper should measure the distance between Point 0 to Point 1, Point 1 to Point 2, Point n to Point n+1 etc. (the points have to be in in order, of course). I guess it should be enough to measure the distance using the x- and y-coordinates of the points, kinda like an Euclidiean distance:

In a second step, the distances should draw new 2D-points (x = measured distance from step 1, y = 0), to combine them with the z-value of the intilal points to construct a new 3D-Points (x= distance, y= 0, z= initial points). In a last step, I can fit a circle through the new points an measure the radius of it.

I tried now for some hourse to solve step 1 and 2, but I’m still new to Grasshopper and nothing I tried worked. If anyone could help me with my problem or give me some hints on how to solve the first two steps, I would be eternally grateful!

Best regards and thanks in advance,

Manuel