Grasshopper_Curvature Analysis of Surfaces_Find Minimum Radius range

Hello,
I am trying to get Minimum Radius range of Curved Surfaces in grasshopper. Is there anyway to get that value in grasshopper? later I want to use those values to cull out the surfaces from the list, that are exceeding the required range of Minimum radius.

In rhino with curvature analysis I can get this range easily. But then I have to pick the surface one by one. It would be great if anyone can tell me how to find Minimum Radius Range of Surface in grasshopper.

ps. I do not necessarily want to have color gradient. Just the range is fine.

Please find attach image
Thank You!!

I have a variety of C#'s that do a variety of things related with surface Lists curvatures (Gauss, Mean, Kappa etc etc). I could add a few lines (if required) and do anything imaginale (including custom queries, visual indication options etc etc).

Notify if you think that a similar “black box” (if you are not familiar with code) solution could be useful to you.

Till some extent I can understand your code. I would like like to go in detail and understand it thoroughly.

I need to crosscheck minimum radius range surfaces with machine limitation before sending data for fabrication. Is it possible for you to attach Gh file ?

Thanks for the help!

You mean that you need that type of stuff? (plus related queries [locate div U/V pts with this curvature [Gauss. Mean] range, min, max, average etc etc])

PS: Can you modify the C# code in order to get 100% the desired results of yours? Or I should implement some basic stuff here and there?

I only want to find out curvature range when the style is Min Radius and not Gaussian or mean. If you can only show that in script it would be easy for me to understand.

ps.
I will also try editing your code and ll try to get what i want out of it .
However now that you showed whole lot of features in the script i ll take time to understand all.

Thanks!

Indeed there’s various more things available on that C# captured written for “similar” (but not the same) facade pre-proccesing purposes.

I’ll add soon (max ETA: this w/e) some Osculating R options (min, max, average) to the most suitable - existed - C# … plus corresponding queries to locate topics of interest [either vertices or mesh quads].

Hi again,
Thanks for you help so far.
I tried using the part of script you made to get the result I needed.
I think I’m pretty much there but for some reason second value in curvature range is always coming out higher from the script if I happen to compare with curvature analysis in Rhino.

Can you tell me where am I going wrong?
find attached script and image

Thanks!

List<double> range = new List<double>();
CurvatureRange_MinRadius(srf, U_num, V_num, out range);

A = range;

public void CurvatureRange_MinRadius(Surface srf, int uNum, int vNum, out List curvatureRange)
{
curvatureRange = new List();

List<double> remMin = new List<double>();
//List<double> remMax = new List<double>();

// parameterize surface
srf.SetDomain(0, new Interval(0, 1));
srf.SetDomain(1, new Interval(0, 1));

for(int i = 0; i <= uNum;i++)
{
  for(int j = 0; j <= vNum; j++)
  {
    double iun = i / (double) uNum; //conver all the value here from whatever to 0 to 1
    double ivn = j / (double) vNum;  //conver all the value here from whatever to 0 to 1

    SurfaceCurvature srfCrv = srf.CurvatureAt(iun, ivn);
    double minRad = srfCrv.OsculatingCircle(1).Radius;  remMin.Add(minRad);
    double maxRad = srfCrv.OsculatingCircle(0).Radius;  remMin.Add(maxRad);
  }
}
curvatureRange.Add(remMin.Max());
curvatureRange.Add(remMin.Min());

}

Try the attached and if it does bananas … well … blame Karma.

Surface_OsculatingCurvatures_V1.gh (124.4 KB)

1 Like

It does bananas but I think there is a way!

Can you tell me what exactly rangeR value does?
Is it like Auto Range? I think this rangeR value has to be unique for every surface.
when it is adjusted it gives me right output for that particular one surface but other values get messed up.

please find attached ref. images

Hope you can help me with this!

The range works (for the moment in all surfaces) as follows:

Meaning that indeed if filters what to get following a common rule.

Other than that get the trad update (added a search Interval, but still the rearchR is global)

Surface_OsculatingCurvatures_V1A.gh (134.3 KB)

1 Like

BTW: Using the best brain boosters available (Huan Valdez espresso + cigars) … I can’t see why a global searchR is a bad thing: Imagine having 2 surfaces: a flatish one (meaning sky high R values) and a heavily curved one (meaning “reasonable” R values). So … a globalR just excludes values from the flatish related Interval … that nobody needs anyway. That said if you remove that Interval inclusion filter you’ll get lot’s of NaN values (flat portions in the demo surface list). Nor has any meaning testing against, say, *Math.Sign(d)int.MaxValue (not to mention double.MaxValue or double.IsNaN(d) or double.IsPositiveInfinity(d) blah, blah).

Added some visual indication related with the outOfRange U/V pts.

Surface_OsculatingCurvatures_V1B.gh (130.4 KB)

1 Like