Display a map on NURBS surface


#1

Hello,

I have created a small script that extracts the curvature values at many (u,v) points on a NURBS surface and writes them into a file. Essentially, it uses the functions rhinoscriptsyntax.SurfaceDomain and rhinoscriptsyntax.SurfaceCurvature.

I would like now to display a map of the curvature values in the Rhino graphical interface. I have no idea how to do that, but I suspect I can not do it at the level of a script and would have to go to a higher level. I would be very grateful if someone could give me a starting point where to start with this (I know python and C++).

Regards,
Guillaume


(Dale Fugier) #2

Hi Guillaume,

This this different than this?

http://docs.mcneel.com/rhino/5/help/en-us/commands/curvatureanalysis.htm

If so, what does this graph look like?

– Dale


#3

Hello Dale,

I basically want to redo the same as the CurvatureAnalysis command. The reason is that in a second step I will need to display yet another quantity which depends on the curvature and the normal. If the code for the CurvatureAnalysis is freely available, that could also be a way to go, but I don’t think it is the case.

Regards,
Guillaume


(Dale Fugier) #4

CurvatureAnalysis uses what’s called a Visual Analysis Mode. Basically the object is assigned a special analysis mode that control’s its visibility. Rhino has a number of visual analysis modes: Curvature, EMap, Zebra, etc.

Plug-in can create their own visual analysis modes. In C++, you’d do this by deriving a custom class from CRhinoVisualAnalysisMode. You can find a sample of this here:

https://github.com/mcneel/Rhino5Samples_CPP/tree/master/SampleAnalysisMode

In RhinoCommon equivalent to this is the VisualAnalysisMode class. I thought I had an example of this, but I can’t seem to locate it at the moment.

If you don’t want to create a full blown visual analysis mode, a simple way to display the results of analysis is with a false-color mesh. Basically you create a display conduit, and display a custom mesh, generated from the object, that has vertex colors based on the analysis.

– Dale