Click or drag to resize

ObjRef Class

Represents a reference to a Rhino object.
Inheritance Hierarchy
SystemObject
  Rhino.DocObjectsObjRef

Namespace:  Rhino.DocObjects
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public class ObjRef : IDisposable

The ObjRef type exposes the following members.

Constructors
  NameDescription
Public methodObjRef(Guid)
Initializes a new object reference from a globally unique identifier (Guid).
Public methodObjRef(RhinoObject)
Initializes a new object reference from a Rhino object.
Public methodObjRef(RhinoObject, PickContext)
Initialized a new object reference from a Rhino object and pick context
Top
Properties
  NameDescription
Public propertyGeometryComponentIndex
Gets the component index of the referenced (sub) geometry. Some objects have subobjects that are valid pieces of geometry. For example, breps have edges and faces that are valid curves and surfaces. Each subobject has a component index that is > 0. The parent geometry has a component index = -1.
Public propertyObjectId
Returns the id of the referenced Rhino object.
Public propertyRuntimeSerialNumber
If > 0, then this is the value of a Rhino object's serial number field. The serial number is used instead of the pointer to prevent crashes in cases when the RhinoObject is deleted but an ObjRef continues to reference the Rhino object. The value of RuntimeSerialNumber is not saved in archives because it generally changes if you save and reload an archive.
Top
Methods
  NameDescription
Public methodCode exampleBrep
Gets the brep if this reference geometry is one.
Public methodClippingPlaneSurface
Gets the clipping plane surface if this reference targeted one.
Public methodCode exampleCurve
Gets the curve if this reference targeted one.
Public methodCode exampleCurveParameter
If the reference geometry is a curve or edge with a selection point, then this gets the parameter of the selection point.
Public methodDispose
Actively reclaims unmanaged resources that this instance uses.
Protected methodDispose(Boolean)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

Public methodEdge
Gets the edge if this reference geometry is one.
Public methodEquals (Inherited from Object.)
Public methodFace
If the referenced geometry is a brep face, a brep with one face, or a surface, this returns the brep face.
Protected methodFinalize
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
(Overrides ObjectFinalize.)
Public methodGeometry
Gets the geometry linked to the object targeted by this reference.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodHatch
Gets the hatch if the referenced geometry is one.
Public methodInstanceDefinitionPart
If subobject selection is enabled and a piece of an instance reference is selected, this will return the selected piece.
Public methodLight
Gets the light if the referenced geometry is one.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMesh
Gets the mesh if the referenced geometry is one.
Public methodCode exampleObject
Returns the referenced Rhino object.
Public methodPoint
Gets the point if the referenced geometry is one.
Public methodPointCloud
Gets the point cloud if the referenced geometry is one.
Public methodSelectionMethod
Gets the method used to select this object.
Public methodCode exampleSelectionPoint
If the object was selected by picking a point on it, then SelectionPoint() returns the point where the selection occured, otherwise it returns Point3d.Unset.
Public methodSetSelectionComponent
When an object is selected by picking a sub-object, SetSelectionComponent may be used to identify the sub-object.
Public methodCode exampleSurface
Gets the surface if the referenced geometry is one.
Public methodSurfaceParameter
If the reference geometry is a surface, brep with one face, or surface edge with a selection point, then this gets the surface paramters of the selection point.
Public methodTextDot
Gets the text dot if the referenced geometry is one.
Public methodTextEntity
Gets the text entity if the referenced geometry is one.
Public methodToString (Inherited from Object.)
Public methodTrim
If the referenced geometry is an edge of a surface, this returns the associated brep trim.
Top
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.2
See Also