CustomObjectGrips

References
public abstract class CustomObjectGrips : IDisposable

Constructors

CustomObjectGrips

#
protected CustomObjectGrips()

CustomObjectGrips

#
Creates grips that present themselves to Rhino as gripsType.
protected CustomObjectGrips(
gripsType
What the grips control. Fixed for the life of the object.
)

Finalizer

~CustomObjectGrips

#
~CustomObjectGrips()

Properties

GripCount

#Since v5.0
public int GripCount { get; }

GripsMoved

#Since v5.0
If GripsMoved is true if some of the grips have ever been moved GripObject.NewLocation() sets GripsMoved=true.
public bool GripsMoved { get; }

GripsType

#Since v8.36
What these grips control. Set at construction.
public ObjectGripsType GripsType { get; }

NewLocation

#Since v5.0
true if some of the grips have been moved. GripObject.NewLocation() sets NewLocation=true. Derived classes can set NewLocation to false after updating temporary display information.
public bool NewLocation { get; set; }

OwnerObject

#Since v5.0
Owner of the grips.
public RhinoObject OwnerObject { get; }

Methods

AddGrip

#
protected void AddGrip()

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(
disposing
)

Dragging

#Since v5.0
Determines if grips are currently being dragged.
public static bool Dragging()
true if grips are dragged.

Grip

#Since v5.0
public CustomGripObject Grip(
index
)

NeighborGrip

#
Get neighbors.
protected virtual GripObject NeighborGrip(
gripIndex,
index of grip where the search begins.
dr,

1 = next grip in the first parameter direction.

-1 = previous grip in the first parameter direction.

ds,

1 = next grip in the second parameter direction.

-1 = previous grip in the second parameter direction.

dt,

1 = next grip in the third parameter direction.

-1 = rev grip in the third parameter direction.

wrap
If true and object is "closed", the search will wrap.
)
Pointer to the desired neighbor or NULL if there is no neighbor.

NewGeometry

#
If the grips control just one object, then override NewGeometry(). When NewGeometry() is called, return new geometry calculated from the current grip locations. This happens once at the end of a grip drag.
protected virtual GeometryBase NewGeometry()
The new geometry. The default implementation returns null.

NurbsCurve

#
If the grips control a NURBS curve, this returns a pointer to that curve. You can look at but you must NEVER change this curve. Return a curve held in a field, never a temporary: Rhino keeps the underlying pointer after this call returns.
protected virtual NurbsCurve NurbsCurve()
A pointer to a NURBS curve or null.

NurbsCurveGrip

#
If the grips are control points of a NURBS curve, then this gets the grip that controls the i-th CV.
protected virtual GripObject NurbsCurveGrip(
i
The control point index.
)
A grip controlling a NURBS curve CV or null.

NurbsSurface

#
If the grips control a NURBS surface, this returns a pointer to that surface. You can look at but you must NEVER change this surface. Return a surface held in a field, never a temporary: Rhino keeps the underlying pointer after this call returns.
protected virtual NurbsSurface NurbsSurface()
A pointer to a NURBS surface or null.

NurbsSurfaceGrip

#
If the grips are control points of a NURBS surface, then this gets the index of the grip that controls the (i,j)-th CV.
protected virtual GripObject NurbsSurfaceGrip(
i,
The index in the first dimension.
j
The index in the second dimension.
)
A grip controlling a NURBS surface CV or null.

OnDraw

#
Draws the grips. In your implementation, override this if you need to draw dynamic elements and then call this base implementation to draw the grips themselves.
protected virtual void OnDraw(
args
The grips draw event arguments.
)

OnReset

#
Resets location of all grips to original spots and cleans up stuff that was created by dynamic dragging. This is required when dragging is canceled or in the Copy command when grips are "copied". The override should clean up dynamic workspace stuff.
protected virtual void OnReset()

OnResetMeshes

#
Just before Rhino turns off object grips, it calls this function. If grips have modified any display meshes, they must override this function and restore the meshes to their original states.
protected virtual void OnResetMeshes()

OnUpdateMesh

#
Just before Rhino shades an object with grips on, it calls this method to update the display meshes. Grips that modify surface or mesh objects must override this function and modify the display meshes here.
protected virtual void OnUpdateMesh(
meshType
The mesh type being updated.
)

RegisterGripsEnabler

#Since v5.0
public static void RegisterGripsEnabler(
enabler,
customGripsType
)