true when the grips this object has on are edit points, of either kind.
Remarks: The read-side companion of EnableEditPointGrips(). EnabledGripsId answers the same question for a plug-in's own kind, by comparing the id it registered.
Remarks:Guid.Empty both for default grips and for no grips at all. GripsOn tells those two apart. Record it to replay a grip selection later: handing it back to EnableGrips(Guid) restores the same kind. From a grip, reach it as GripObject.Owner.EnabledGripsId.
Every object has a Guid (globally unique identifier, also known as UUID, or universally unique identifier). The default value is Guid.Empty.
When an object is added to a model, the value is checked. If the value is Guid.Empty, a new Guid is created. If the value is not null but it is already used by another object in the model, a new Guid is created. If the value is not Guid.Empty and it is not used by another object in the model, then that value persists. When an object is updated, by a move for example, the value of ObjectId persists.
This value is the same as the one returned by this.Attributes.ObjectId.
When a component is in a model as part of the information required for a linked instance definition, this value identifies the linked instance definition reference model.
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
Gets a value indicating if an object is a reference object. An object from a work session reference model is a reference object and cannot be modified. An object is a reference object if, and only if, it is on a reference layer.
Remarks: If the component is being managed by a model, this value identifies the model. In Rhino, this value is the document runtime serial number. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
When a component is in a model for reference, this value identifies the reference model.
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.
Gets the render material associated with this object or null if there is none. This does not pay attention to the material source and will not check parent objects or layers for a RenderMaterial.
True when the display should draw this object's preview mesh instead of its render or analysis mesh.
Remarks: Only meaningful while drawing: the meshing worker thread raises this for the objects it is previewing and it is false the rest of the time. A texture or false colour VisualAnalysisMode reads it from SetUpDisplayAttributes to decide whether to show mesh wires, which is what the built-in analysis modes do.
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.
Turns on edit point grips, the ones the EditPtOn command turns on.
Remarks: Curves and SubDs carry separate kinds of edit point grips. This picks the one that suits the object, as EditPtOn does, so a caller does not have to. An object that is neither is left exactly as it was. For a curve or a SubD, what happens to grips already on is described by EnableGrips(Guid).
Returns: true if the object has edit point grips when this returns. false for an object that has none: anything that is not a curve or a SubD, a curve with more than 1000 edit points or too few control points to have any, an empty SubD, and the cases EnableGrips(Guid) returns false for.
Returns: true if the object has grips of the requested kind when this returns. false if nothing is registered for gripsId, if the object has no grips of that kind (a polysurface has no default grips), or if the grips already on refused to turn off, which they do while they are being dragged.
true if the mode should be activated; false otherwise.
Returns: true if this object supports the analysis mode.
EnsurePrivateCopy
publicvoidEnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
Called when Rhino wants the bounding box of this object. Viewpoert can be null. This is the default base class version that will go through to the C++ base class if it is called from the custom object
While an object is being dynamically transformed (dragged, rotated, ...), the current transformation can be retrieved and used for creating dynamic display.
Returns: True if the object is being edited and its transformation is available. False if the object is not being edited, in which case the identity transform is returned.
Gets material that this object uses based on it's attributes and the document that the object is associated with. In the rare case that a document is not associated with this object, null will be returned.
Get the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Optional object attributes used to determine the material source, if null the objects attributes are used.
Returns: Returns the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Get the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Returns: Returns the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Get the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Returns the material associated with the specified sub object or the objects top level material if it is set to ComponentIndex.Unset
Returns: Returns the Material associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level material is returned.
Gets the RenderMaterial that this object uses based on it's attributes and the document that the object is associated with. If there is no RenderMaterial associated with this object then null is returned. If null is returned you should call GetMaterial to get the material used to render this object.
Gets the RenderMaterial associated with this object if there is one. If there is no RenderMaterial associated with this object then null is returned. If null is returned you should call GetMaterial to get the material used to render this object.
Optional object attributes used to determine the material source, if null the objects attributes are used.
Returns: Returns the RenderMaterial associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level RenderMaterail is returned. If this method returns null it means there is no RenderMaterial associated with the object or sub object so you should may GetMaterial get the objects generic material.
Gets the RenderMaterial associated with this object if there is one. If there is no RenderMaterial associated with this object then null is returned. If null is returned you should call GetMaterial to get the material used to render this object.
Returns: Returns the RenderMaterial associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level RenderMaterail is returned. If this method returns null it means there is no RenderMaterial associated with the object or sub object so you should may GetMaterial get the objects generic material.
Gets the RenderMaterial associated with this object if there is one. If there is no RenderMaterial associated with this object then null is returned. If null is returned you should call GetMaterial to get the material used to render this object.
Returns the RenderMaterial associated with the specified sub object or the objects top level material if it is set to ComponentIndex.Unset
Returns: Returns the RenderMaterial associated with the sub object identified by componentIndex if the component index is set to ComponentIndex.Unset then the top level RenderMaterail is returned. If this method returns null it means there is no RenderMaterial associated with the object or sub object so you should may GetMaterial get the objects generic material.
Returns the meshing parameters that this object uses for generating render meshes. If this object does not have per-object meshing parameters, then the document's meshing parameters are returned.
If true, then return the per-object meshing parameters for this object. If this object does not have per-object meshing parameters, then the document's meshing parameters are returned. If false, then return the per-object meshing parameters for this object. If this object does not have per-object meshing parameters, then null is returned.
Returns: The render meshing parameters if successful, null otherwise.
obsoleteThis version is obsolete because it returns the obsolete RenderPrimitiveList - ie, the old school custom render meshes. Use CustomRenderMeshes instead.
obsoleteThis version is obsolete because it returns the obsolete RenderPrimitiveList - ie, the old school custom render meshes. Use CustomRenderMeshes instead.
If true and the input tight_bbox is valid, then returned tight_bbox is the union of the input tight_bbox and the tight bounding box of this Rhino object.
Determine if this object is active in a particular viewport.
Remarks: The default implementation tests for space and viewport id. This handles things like testing if a page space object is visible in a modeling view.
If true and the entire object is not highlighted, and some subset of the object is highlighted, like some edges of a surface, then 3 is returned. If false and the entire object is not highlighted, then zero is returned.
Returns:
0: object is not highlighted.
1: entire object is highlighted.
3: one or more proper sub-objects are highlighted.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Returns: true if object is capable of being selected.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
If true, then objects with grips on can be selected. If false, then the value returned by the object's IsSelectableWithGripsOn() function decides if the object can be selected.
(false is good default) If true and the entire object is not selected, and some subset of the object is selected, like some edges of a surface, then 3 is returned. If false and the entire object is not selected, then zero is returned.
Returns: 0 = object is not selected. 1 = object is selected. 2 = entire object is selected persistently. 3 = one or more proper sub-objects are selected.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then that object is not selectable if it has grips turned on.
Computes an estimate of the number of bytes that this object is using in memory. Note that this is a runtime memory estimate and does not directly compare to the amount of space take up by the object when saved to a file.
Returns: The estimated number of bytes this object occupies in memory.
RhinoObjects can have several different types of meshes and different numbers of meshes. A b-rep can have a render and an analysis mesh on each face. A mesh object has a single render mesh and no analysis mesh. Curve, point, and annotation objects have no meshes.
Returns a set of custom render primitives for this object.
Some providers - Displacement in particular - compute their meshes asynchronously. Until that work finishes, this method returns the object's ordinary render mesh instead of the custom one and reports that by setting RenderMeshProvider.Flags.Incomplete in flags. That mesh is valid geometry but does not yet reflect the provider, so a caller that measures it will see the object as it was beforehand. Test for the flag rather than trusting the first result.
On input, the options to apply; on return, the same value with any status flags added. Reset it before each call rather than passing the returned value back in. To wait for an asynchronous provider, call again while RenderMeshProvider.Flags.Incomplete remains set, calling RhinoApp.Wait() in between: the provider needs the main thread's message queue pumped before it can publish its result, so a retry loop that does not pump will never see the flag clear.
Display attributes for the caller - null if this is a full rendering.
Returns: A set of custom render primitives for this object, or the object's ordinary render mesh if an asynchronous provider has not finished - see flags. Null if the object is not in a document.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
If true, then objects with grips on can be selected. If false, then the value returned by the object's IsSelectableWithGripsOn() function decides if the object can be selected when it has grips turned on.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
If this object has a history record, the CopyOnReplace field is set When an object is replaced in a document and the old object has a history record with this field set, the history record is copied and attached to the new object. That allows a descendant object to continue the history linkage after it is edited.
For expert use only. Sets the history record that describes how this object was created. This information is used to update this object when Rhino history is enabled and an input object changes.
Sets the per-object meshing parameters for this object. When set, this object will use these meshing parameters when generating a render mesh, instead of those provided by the document.
The per-object meshing parameters. Note: if null, then the per-object meshing parameters will be removed, and this object will revert to using the meshing parameters provided by the document.
If a Rhino object has been manipulated by Rhino's gumball, and the gumball is not in its default position, then the object's repositioned gumball frame is returned.
Gets the gumball frame for this object under the current gumball alignment mode (Object / World / CPlane). For Object mode the frame always reflects the object's orientation (including any user relocation in that mode). For World and CPlane mode the frame is only returned when the user has manually repositioned the gumball for this object; if it has never been moved in that mode, the method returns false. Sub-object selections are not taken into account; this is a whole-object helper.
Returns: true if a frame is available for the current alignment mode; false when the gumball has not been repositioned in the active World or CPlane mode.