VisualAnalysisMode

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

This class is abstract.

Properties

Id

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

Name

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

RhinoCurvatureColorAnalyisModeId

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

RhinoCurvatureGraphAnalysisModeId

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

RhinoDirectionAnalysisModeId

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

RhinoDraftAngleAnalysisModeId

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

RhinoEdgeAnalysisModeId

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

RhinoEdgeContinuityAlalysisModeId

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

RhinoEmapAnalysisModeId

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

RhinoEndAnalysisModeId

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

RhinoThicknessAnalysisModeId

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

RhinoZebraStripeAnalysisModeId

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

ShowIsoCurves

#Since v5.0
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.

public virtual bool ShowIsoCurves { get; }

Style

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

Methods

AdjustAnalysisMeshes

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

CurvatureColorAutoRange

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

CurvatureColorMaxRange

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

DrawBrepObject

#
Draws one brep. Override this method to add your custom behavior.

The default implementation does nothing.

protected virtual void DrawBrepObject(
brep,
A brep object.
pipeline
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.
protected virtual void DrawCurveObject(
curve,
A document curve object.
pipeline
The drawing pipeline.
)

DrawExtrusionObject

#
Draws one extrusion. Override this method to add your custom behavior.

The default implementation does nothing.

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

DrawMesh

#
Draws a mesh.

The default implementation does nothing.

protected virtual void DrawMesh(
obj,
A Rhino object corresponding to the surface.
Mesh
mesh,
The mesh geometry.
pipeline
The current display pipeline.
)

DrawMeshObject

#
Draws one mesh. Override this method to add your custom behavior.

The default implementation does nothing.

protected virtual void DrawMeshObject(
mesh,
A mesh object.
pipeline
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.

protected virtual void DrawNurbsCurve(
obj,
A Rhino object corresponding to the curve.
curve,
The curve geometry.
pipeline
The current display pipeline.
)

DrawNurbsSurface

#
Draws a NURBS surface. This is a good function to override to display object-related meshes.

The default implementation does nothing.

protected virtual void DrawNurbsSurface(
obj,
A Rhino object corresponding to the surface.
surface,
The surface geometry.
pipeline
The current display pipeline.
)

DrawPointCloudObject

#
Draws one point cloud. Override this method to add your custom behavior.

The default implementation does nothing.

protected virtual void DrawPointCloudObject(
pointCloud,
A point cloud object.
pipeline
The current display pipeline.
)

DrawPointObject

#
Draws one point. Override this method to add your custom behavior.

The default implementation does nothing.

protected virtual void DrawPointObject(
point,
A point object.
pipeline
The current display pipeline.
)

DrawSubDObject

#
Draws one SubD. Override this method to add your custom behavior.

The default implementation does nothing.

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

EnableUserInterface

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

Find

#Since v5.0
Finds a visual analysis mode by guid.
public static VisualAnalysisMode Find(
id
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
Finds a visual analysis mode by type.
public static VisualAnalysisMode Find(
t
A visual analysis mode type.
)
A visual analysis mode on success, or null on error.

ObjectSupportsAnalysisMode

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

Register

#Since v5.0
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.
public static VisualAnalysisMode Register(
customAnalysisModeType
Must be a type that is a subclass of VisualAnalysisMode.
)
An instance of registered analysis mode on success.

SetUpDisplayAttributes

#
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.
protected virtual void SetUpDisplayAttributes(
obj,
The object for which to set up attributes.
attributes
The linked attributes.
)
Remarks: Shaded analysis modes that use texture mapping, like zebra and emap, override this function set the texture, diffuse_color, and EnableLighting parameter.

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