CustomObjectGrips

References
public abstract class CustomObjectGrips : IDisposable

Constructors

CustomObjectGrips

#
protected CustomObjectGrips()

CustomObjectGrips

#
protected CustomObjectGrips(ObjectGripsType gripsType)
Creates grips that present themselves to Rhino as gripsType.
gripsType (ObjectGripsType)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
public bool GripsMoved { get; }
If GripsMoved is true if some of the grips have ever been moved GripObject.NewLocation() sets GripsMoved=true.

GripsType

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

NewLocation

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

OwnerObject

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

Methods

AddGrip

#
protected void AddGrip(CustomGripObject grip)
grip (CustomGripObject)

Dispose

#Since v5.0
public void Dispose()

Dispose

#
protected virtual void Dispose(bool disposing)
disposing (bool)

Dragging

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

Grip

#Since v5.0
public CustomGripObject Grip(int index)
index (int)

NeighborGrip

#
protected virtual GripObject NeighborGrip(int gripIndex, int dr, int ds, int dt, bool wrap)
Get neighbors.
gripIndex (int)index of grip where the search begins.
dr (int)

1 = next grip in the first parameter direction.

-1 = previous grip in the first parameter direction.

ds (int)

1 = next grip in the second parameter direction.

-1 = previous grip in the second parameter direction.

dt (int)

1 = next grip in the third parameter direction.

-1 = rev grip in the third parameter direction.

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

NewGeometry

#
protected virtual GeometryBase 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.
The new geometry. The default implementation returns null.

NurbsCurve

#
protected virtual NurbsCurve 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.
A pointer to a NURBS curve or null.

NurbsCurveGrip

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

NurbsSurface

#
protected virtual NurbsSurface 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.
A pointer to a NURBS surface or null.

NurbsSurfaceGrip

#
protected virtual GripObject NurbsSurfaceGrip(int i, int j)
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.
i (int)The index in the first dimension.
j (int)The index in the second dimension.
A grip controlling a NURBS surface CV or null.

OnDraw

#
protected virtual void OnDraw(GripsDrawEventArgs args)
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.
args (GripsDrawEventArgs)The grips draw event arguments.

OnReset

#
protected virtual void 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.

OnResetMeshes

#
protected virtual void 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.

OnUpdateMesh

#
protected virtual void OnUpdateMesh(MeshType meshType)
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.
meshType (MeshType)The mesh type being updated.

RegisterGripsEnabler

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