VisualAnalysisMode

References
public abstract class VisualAnalysisMode
Represents a base class for visual analysis modes.

This class is abstract.

Properties

Id

#Since v5.0
public Guid Id { get; }
Gets the visual analysis mode GUID. The Guid is specified with the GuidAttribute applied to the class.

Name

#Since v5.0
public abstract string Name { get; }
Gets the name of the analysis mode. It is used by the _What command and the object properties details window to describe the object.

RhinoCurvatureColorAnalyisModeId

#Since v5.0
public static Guid RhinoCurvatureColorAnalyisModeId { get; }
Id for Rhino's built-in curvature color analysis mode. Surface curvature is shown using false color mapping.

RhinoCurvatureGraphAnalysisModeId

#Since v5.0
public static Guid RhinoCurvatureGraphAnalysisModeId { get; }
Id for Rhino's built-in curvature graphs analysis mode. Curvature hair is shown on curves and surfaces.

RhinoDirectionAnalysisModeId

#Since v9.0
public static Guid RhinoDirectionAnalysisModeId { get; }
Id for Rhino's built-in direction analysis mode.

RhinoDraftAngleAnalysisModeId

#Since v5.0
public static Guid RhinoDraftAngleAnalysisModeId { get; }
Id for Rhino's built-in draft angle analysis mode. Draft angle is displayed using false colors.

RhinoEdgeAnalysisModeId

#Since v5.0
public static Guid RhinoEdgeAnalysisModeId { get; }
Id for Rhino's built-in edge analysis mode. Brep and mesh edges are shown in a selected color.

RhinoEdgeContinuityAlalysisModeId

#Since v7.0
public static Guid RhinoEdgeContinuityAlalysisModeId { get; }
Id for Rhino's built-in edge continuity analysis mode.

RhinoEmapAnalysisModeId

#Since v5.0
public static Guid RhinoEmapAnalysisModeId { get; }
Id for Rhino's built-in emap analysis mode. An environment map is shown on surfaces and meshes.

RhinoEndAnalysisModeId

#Since v9.0
public static Guid RhinoEndAnalysisModeId { get; }
Id for Rhino's built-in End analysis mode.

RhinoThicknessAnalysisModeId

#Since v5.0
public static Guid RhinoThicknessAnalysisModeId { get; }
Id for Rhino's built-in thickness analysis mode.

RhinoZebraStripeAnalysisModeId

#Since v5.0
public static Guid RhinoZebraStripeAnalysisModeId { get; }
Id for Rhino's built-in zebra stripe analysis mode. Zebra stripes are shown on surfaces and meshes.

ShowIsoCurves

#Since v5.0
public virtual bool ShowIsoCurves { get; }
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.

Style

#Since v5.0
public abstract VisualAnalysisMode.AnalysisStyle Style { get; }
Gets the visual analysis mode style.

Methods

AdjustAnalysisMeshes

#Since v7.0
public static bool AdjustAnalysisMeshes(RhinoDoc doc, Guid analysisModeId)
Interactively adjusts surface analysis meshes of objects using a Rhino built-in analysis mode.
doc (RhinoDoc)The Rhino document.
analysisModeId (Guid)The id of the analysis mode.
true if successful, false otherwise.

CurvatureColorAutoRange

#Since v9.0
public static void CurvatureColorAutoRange()
Adjusts the auto range values for curvature analysis.

CurvatureColorMaxRange

#Since v9.0
public static void CurvatureColorMaxRange()
Adjusts the max range values for curvature analysis.

DrawBrepObject

#
protected virtual void DrawBrepObject(BrepObject brep, DisplayPipeline pipeline)
Draws one brep. Override this method to add your custom behavior.

The default implementation does nothing.

brep (BrepObject)A brep object.
pipeline (DisplayPipeline)The current display pipeline.

DrawCurveObject

#
protected virtual void DrawCurveObject(CurveObject curve, DisplayPipeline pipeline)
If Style==Wireframe, then the default decomposes the curve object into nurbs curve segments and calls the virtual DrawNurbsCurve for each segment.
curve (CurveObject)A document curve object.
pipeline (DisplayPipeline)The drawing pipeline.

DrawExtrusionObject

#
protected virtual void DrawExtrusionObject(ExtrusionObject extrusion, DisplayPipeline pipeline)
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.
extrusion (ExtrusionObject)An extrusion object.
pipeline (DisplayPipeline)The current display pipeline.

DrawMesh

#
protected virtual void DrawMesh(RhinoObject obj, Mesh mesh, DisplayPipeline pipeline)
Draws a mesh.

The default implementation does nothing.

obj (RhinoObject)A Rhino object corresponding to the surface.
mesh (Mesh)The mesh geometry.
pipeline (DisplayPipeline)The current display pipeline.

DrawMeshObject

#
protected virtual void DrawMeshObject(MeshObject mesh, DisplayPipeline pipeline)
Draws one mesh. Override this method to add your custom behavior.

The default implementation does nothing.

mesh (MeshObject)A mesh object.
pipeline (DisplayPipeline)The current display pipeline.

DrawNurbsCurve

#
protected virtual void DrawNurbsCurve(RhinoObject obj, NurbsCurve curve, DisplayPipeline pipeline)
Draws a NURBS curve. This is a good function to override for analysis modes like curvature hair display.

The default implementation does nothing.

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.

obj (RhinoObject)A Rhino object corresponding to the surface.
surface (NurbsSurface)The surface geometry.
pipeline (DisplayPipeline)The current display pipeline.

DrawPointCloudObject

#
protected virtual void DrawPointCloudObject(PointCloudObject pointCloud, DisplayPipeline pipeline)
Draws one point cloud. Override this method to add your custom behavior.

The default implementation does nothing.

pointCloud (PointCloudObject)A point cloud object.
pipeline (DisplayPipeline)The current display pipeline.

DrawPointObject

#
protected virtual void DrawPointObject(PointObject point, DisplayPipeline pipeline)
Draws one point. Override this method to add your custom behavior.

The default implementation does nothing.

point (PointObject)A point object.
pipeline (DisplayPipeline)The current display pipeline.

DrawSubDObject

#
protected virtual void DrawSubDObject(SubDObject subd, DisplayPipeline pipeline)
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.
subd (SubDObject)A SubD object.
pipeline (DisplayPipeline)The current display pipeline.

EnableUserInterface

#Since v5.0
public virtual void EnableUserInterface(bool on)
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.
on (bool)true if the interface should be shown; false if it should be concealed.

Find

#Since v5.0
public static VisualAnalysisMode Find(Guid id)
Finds a visual analysis mode by guid.
id (Guid)The globally unique identifier to search for.
The found visual analysis mode, or null if it was not found, or on error.

Find

#Since v5.0
public static VisualAnalysisMode Find(Type t)
Finds a visual analysis mode by type.
t (Type)A visual analysis mode type.
A visual analysis mode on success, or null on error.

ObjectSupportsAnalysisMode

#Since v5.0
public virtual bool ObjectSupportsAnalysisMode(RhinoObject obj)
Gets a value indicating if this visual analysis mode can be used on a given Rhino object.
obj (RhinoObject)The object to be tested.
true if this mode can indeed be used on the object; otherwise false.

Register

#Since v5.0
public static VisualAnalysisMode Register(Type customAnalysisModeType)
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.
customAnalysisModeType (Type)Must be a type that is a subclass of VisualAnalysisMode.
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.
obj (RhinoObject)The object for which to set up attributes.
attributes (DisplayPipelineAttributes)The linked attributes.

UpdateVertexColors

#
protected virtual void UpdateVertexColors(RhinoObject obj, Mesh[] meshes)
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.
obj (RhinoObject)The object for which to update vertex colors.
meshes (Mesh[])An array of meshes that should be updated.