Extract Min radius and Max radius

Hi Rhino :grinning:

I want to extract with points the locations of the “Min radius” and “Max radius” on [Max Range] showed in the CurvatureAnalysis window.

Is it possible? :sweat_smile:

Be aware that the Max radius option in CurvatureAnalysis does not work properly for areas where the Guassian curvature is negative, also known as warped, saddle-like and anticlastic surfaces. I reported it in this thread Command Error: CurvatureAnalysis - Max Radius which is for the V6 WIP but the same problem occurs in V5.

If so, Can I get the correct value using a script?
If possible, I request the script. :sweat_smile:

Hi Knead - here’s a quick Python

import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc

def test():
    id = rs.GetObject( filter=8, preselect=True)
    if not id:return
    pt = rs.GetPointOnSurface(id)

    par = rs.SurfaceClosestPoint(id, pt)
        geo = sc.doc.Objects.Find(id).Geometry.Surfaces[0]
        x = geo. CurvatureAt(par[0], par[1])
        max = x.Kappa(0)
        min= x.Kappa(1)
        print "Maximum curvature = " + str(max) +"\n" +"Minimum curvature = " + str(min)
        rs.AddTextDot(str(max) + "\n" + str(min), pt)
if __name__ == "__main__":


Because there is a bug in the current Rhino build, the result is not correct. :sob:
That is why, I’m going to calculate the curvature manually (to get accurate results). :scream:

Thus, I want to find that *** the locations *** of the “Max radius” and the “Min radius” calculated when [ Max Range ] is pressed. :mask: