VisualAnalysisMode
ReferencesRepresents a base class for visual analysis modes.
This class is abstract.
Properties
Gets the visual analysis mode GUID. The Guid is specified with the GuidAttribute applied to the class.
Gets the name of the analysis mode. It is used by the _What command and the object properties details window to describe the object.
Id for Rhino's built-in curvature color analysis mode. Surface curvature is shown using false color mapping.
Id for Rhino's built-in curvature graphs analysis mode. Curvature hair is shown on curves and surfaces.
Id for Rhino's built-in direction analysis mode.
Id for Rhino's built-in draft angle analysis mode. Draft angle is displayed using false colors.
Id for Rhino's built-in edge analysis mode. Brep and mesh edges are shown in a selected color.
Id for Rhino's built-in edge continuity analysis mode.
Id for Rhino's built-in emap analysis mode. An environment map is shown on surfaces and meshes.
Id for Rhino's built-in End analysis mode.
Id for Rhino's built-in thickness analysis mode.
Id for Rhino's built-in zebra stripe analysis mode. Zebra stripes are shown on surfaces and meshes.
Gets true if this visual analysis mode will show isocuves on shaded surface objects. Often a mode's user interface will provide a way to change this setting.
The default is false.
Gets the visual analysis mode style.
Methods
Interactively adjusts surface analysis meshes of objects using a Rhino built-in analysis mode.
public static void CurvatureColorAutoRange()
Adjusts the auto range values for curvature analysis.
public static void CurvatureColorMaxRange()
Adjusts the max range values for curvature analysis.
DrawBrepObject
#Draws one brep. Override this method to add your custom behavior.
The default implementation does nothing.
Parameters:
| brep (BrepObject) | A brep object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawCurveObject
#If Style==Wireframe, then the default decomposes the curve object into nurbs curve segments and calls the virtual DrawNurbsCurve for each segment.
Parameters:
| curve (CurveObject) | A document curve object. |
| pipeline (DisplayPipeline) | The drawing pipeline. |
DrawExtrusionObject
#Draws one extrusion. Override this method to add your custom behavior.
The default implementation does nothing.
Remarks: Extrusions are not breps, so DrawBrepObject(BrepObject, DisplayPipeline) is not called for them. A mode that should treat the two alike needs to override both.
Parameters:
| extrusion (ExtrusionObject) | An extrusion object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawMesh
#Draws a mesh.
The default implementation does nothing.
Parameters:
| obj (RhinoObject) | A Rhino object corresponding to the surface. |
| mesh (Mesh) | The mesh geometry. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawMeshObject
#Draws one mesh. Override this method to add your custom behavior.
The default implementation does nothing.
Parameters:
| mesh (MeshObject) | A mesh object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawNurbsCurve
#Draws a NURBS curve. This is a good function to override for analysis modes like curvature hair display.
The default implementation does nothing.
Parameters:
| obj (RhinoObject) | A Rhino object corresponding to the curve. |
| curve (NurbsCurve) | The curve geometry. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawNurbsSurface
#protected virtual void DrawNurbsSurface(RhinoObject obj, NurbsSurface surface, DisplayPipeline pipeline)
Draws a NURBS surface. This is a good function to override to display object-related meshes.
The default implementation does nothing.
Parameters:
| obj (RhinoObject) | A Rhino object corresponding to the surface. |
| surface (NurbsSurface) | The surface geometry. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawPointCloudObject
#Draws one point cloud. Override this method to add your custom behavior.
The default implementation does nothing.
Parameters:
| pointCloud (PointCloudObject) | A point cloud object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawPointObject
#Draws one point. Override this method to add your custom behavior.
The default implementation does nothing.
Parameters:
| point (PointObject) | A point object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
DrawSubDObject
#Draws one SubD. Override this method to add your custom behavior.
The default implementation does nothing.
Remarks: The default ObjectSupportsAnalysisMode(RhinoObject) does not accept SubD objects, so a mode that wants them must override that as well and return true for them.
Parameters:
| subd (SubDObject) | A SubD object. |
| pipeline (DisplayPipeline) | The current display pipeline. |
Turns the analysis mode's user interface on and off. For Rhino's built in modes this opens or closes the modeless dialog that controls the analysis mode's display settings.
Parameters:
| on (bool) | true if the interface should be shown; false if it should be concealed. |
Finds a visual analysis mode by guid.
Parameters:
| id (Guid) | The globally unique identifier to search for. |
Returns: The found visual analysis mode, or null if it was not found, or on error.
Finds a visual analysis mode by type.
Parameters:
| t (Type) | A visual analysis mode type. |
Returns: A visual analysis mode on success, or null on error.
Gets a value indicating if this visual analysis mode can be used on a given Rhino object.
Parameters:
| obj (RhinoObject) | The object to be tested. |
Returns: true if this mode can indeed be used on the object; otherwise false.
Registers a custom visual analysis mode for use in Rhino. It is OK to call register multiple times for a single custom analysis mode type, since subsequent register calls will notice that the type has already been registered.
Parameters:
| customAnalysisModeType (Type) | Must be a type that is a subclass of VisualAnalysisMode. |
Returns: An instance of registered analysis mode on success.
SetUpDisplayAttributes
#protected virtual void SetUpDisplayAttributes(RhinoObject obj, DisplayPipelineAttributes attributes)
If an analysis mode needs to modify display attributes, this is the place to do it. In particular, Style==Texture, then this function must be overridden.
Remarks: Shaded analysis modes that use texture mapping, like zebra and emap, override this function set the texture, diffuse_color, and EnableLighting parameter.
Parameters:
| obj (RhinoObject) | The object for which to set up attributes. |
| attributes (DisplayPipelineAttributes) | The linked attributes. |
UpdateVertexColors
#If Style==falseColor, then this virtual function must be overridden. Rhino calls this function when it is time for to set the false colors on the analysis mesh vertices. For breps, there is one mesh per face. For mesh objects there is a single mesh.
Parameters:
| obj (RhinoObject) | The object for which to update vertex colors. |
| meshes (Mesh[]) | An array of meshes that should be updated. |