To find the highest mean curvature value on
that double-curved surface using the
components on your canvas, you need to
systematically analyze a dense grid of points
across the entire surface domain.
Here is exactly how to set up the algorithm
step-by-step:
Step 1: Subdivide the Surface into a Dense
Grid
Instead of looking at just a single point on a
curve, you need to sample points across the
entire face of the double-curved surface.
1. Drop an Isotrim (SubSrf) component or
a Divide Surface (DivSrf) component onto
your canvas.
2. Connect your Double-Curvature
Surface parameter component into it.
3. If using Divide Surface, use two
number sliders set to a high density (e.g.,
U = 50, V = 50) to generate a
comprehensive grid of points across the
geometry.
Step 2: Evaluate the Curvature Properties
Now you will feed those sampled coordinate
points into the evaluation engine.
1. Drop a Surface Closest Point (SrfCP)
component.
o Connect the grid of points into the
Point (P) input.
o Connect the original surface into the
Surface (S) input.
o This generates the precise UV
coordinate addresses for every single
point.
2. Drop the Principal Curvatures
(Curvature) component.
o Connect your surface to the Surface
(S) input.
o Connect the UV output from SrfCP
directly into the Parameter (uv) input.
Step 3: Calculate the Mean Curvature Array
The Curvature component outputs the
maximum and minimum principal curvatures
($K_1$ and $K_2$) for every sampled
location.
1. Drop an Evaluate (Eval) or Expression
component.
2. Set the expression formula to calculate
the average of the two values:
$$(x + y) / 2$$
(where $x = K_1$ and $y = K_2$).
3. Because mean curvature can result in
negative values depending on the surface
orientation vector, pass the output through
an Absolute (Abs) component. This
ensures you are finding the highest total
magnitude of curvature.
Step 4: Isolate the Highest Value
1. First, right-click the output wire of your
Absolute component and select Flatten to
compress all your data rows into a single
flat list of numbers.
2. Drop a Sort List (Sort) component.
Plug your flat list of curvature numbers
into the Keys (K) input.
o By default, Grasshopper sorts lists
from lowest to highest value.
3. Drop a Reverse List (Rev) component
and connect it to the sorted Keys (K)
output. The very first item in this reversed
list is now your absolute maximum.
4. Drop a List Item (Item) component and
connect it to the reversed list. Leave the
index (i) at its default value of 0.
The output of this List Item component will be
the exact highest mean curvature value
across your surface geometry.