How to evaluate the surface radius in a user specified direction?

How can I determine the radius (of curvature) at a point on a surface in a direction I specify?

More specifically, I want to know the radius of curvature of a surface at a point on an edge, in the direction perpendicular to this edge.

The principal curvatures have no relation to the direction of the (trimmed or not) edge in many cases. So this I cannot use. I had the idea to add a perp frame to the edge at the specified point and then intersect this with the surface and measure the curve radius at that point. This works in most cases, but when the point is at a corner point of the surface it can happen no curve intersection is found.

The radius of a surface in any direction can be determined from the principal curvatures and their directions using Euler’s equation:

1/R = (cos(theta)^2 / R1 + (sin(theta))^2 / R2

R is the radius
1/R1 is one principle curvature
1/R2 is the other principle curvature
theta is the angle between the direction of R1 and the direction of R

1 Like

The direction perpendicular to an edge is indeterminate and not unique at a corner or kink.

A plane perpendicular to the edge of surface may or may not intersect a surface at a corner/kink if the angle between adjacent edges at the corner/kink is less than 90 degrees.

Corner intersections.3dm (1.6 MB)

I temporarily unchecked the solution, I need to do some more tests in my script.

Does this matter for the first equation you posted?

The formula works anywhere including corners where the surface has continuous curvature. (Equivalent to the zebra of the surface (with sufficiently refined mesh) not having any kinks.)

What is the direction perpendicular to the edge at a corner or kink?
Is it the direction perpendicular to one edge near the corner/kink?
Is it the direction perpendicular to the other edge near the corner/kink?
Is it the average of the directions of the two edges near the corner/kink?
Is it some other combination of the directions of the the two edges near the corner/kink?
There are an infinite number of choices.

for now I’m assuming that the surface has no kinks and that I only need to know the direction perpendicular to one edge at a given point, so this means the formula should work.

(but I will have to look at my script with a fresh mind as there seems to be a bug that’s giving me odd results)

Maybe you can take a look at this example where I have visualized the problem. The radius of a curve perpendicular to the edge at its end compared to the formula gives almost but not the exact same results. What am I doing wrong? (32.0 KB)

edit: after having a fresh look the formula seems to do the right thing, but I still don’t understand why it doesn’t match with the curve’s radius

Your formula looks okay to me though I’m not a Grasshopper user.

My guess is the most likely cause of the small difference in curvature is the accuracy of the section curve. In general the intersection curve cannot be represented exactly by a NURBS curve. Rhino uses enough spans/control points that the curve is within the absolute tolerance of the theoretical solution. The differences between the NURBS curve and the theoretical curve can result in curvature differences between the curve and the surface.

1 Like

Does this help any? (24.9 KB)

– Dale

Hi @dale, thanks for taking a look. I was looking for a way to find the curvature not in primary directions but in the direction perpendicular to the edge. And in doing that I was comparing it with intersection curves perpendicular to the edge and found some differences, but as @davidcockey mentioned it has probably to do with the fact that a nurbs from intersection is always going to be an approximation.