Skip to content

DiGi.Rhino.Geometry.Core.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Rhino.Geometry.Core.Classes Namespace

Classes

GooBakeAwareSerializableObject<TSerializableObject> Class

Represents an abstract base class for objects that are both serializable and aware of the baking process into a Rhino document.

public abstract class GooBakeAwareSerializableObject<TSerializableObject> : DiGi.Rhino.Core.Classes.GooSerializableObject<TSerializableObject>, DiGi.Rhino.Geometry.Core.Interfaces.IGooBakeAwareSerializableObject, DiGi.Rhino.Geometry.Core.Interfaces.IGooBakeAware
    where TSerializableObject : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TSerializableObject

The type of the serializable object, which must implement DiGi.Core.Interfaces.ISerializableObject.

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<TSerializableObject>DiGi.Rhino.Core.Classes.GooSerializableObject<TSerializableObject>Grasshopper.Kernel.IGH_PreviewDataGrasshopper.Kernel.IGH_BakeAwareData → GooBakeAwareSerializableObject<TSerializableObject>

Derived
GooIntersectionResult3D

Implements IGooBakeAwareSerializableObject, IGooBakeAware

Constructors

GooBakeAwareSerializableObject() Constructor

Initializes a new instance of the GooBakeAwareSerializableObject<TSerializableObject> class.

public GooBakeAwareSerializableObject();

GooBakeAwareSerializableObject(TSerializableObject) Constructor

Initializes a new instance of the GooBakeAwareSerializableObject<TSerializableObject> class with a specified geometry value.

public GooBakeAwareSerializableObject(TSerializableObject? geometry);

Parameters

geometry TSerializableObject

The serializable geometry object to initialize the value with.

Properties

GooBakeAwareSerializableObject<TSerializableObject>.ClippingBox Property

Gets the bounding box of the geometries associated with this object, used for clipping.

public virtual BoundingBox ClippingBox { get; }

Property Value

Rhino.Geometry.BoundingBox

GooBakeAwareSerializableObject<TSerializableObject>.Geometries Property

Gets the array of geometries that represent this object in 3D space.

public abstract DiGi.Geometry.Core.Interfaces.IGeometry[]? Geometries { get; }

Implements Geometries

Property Value

DiGi.Geometry.Core.Interfaces.IGeometry[]

Methods

GooBakeAwareSerializableObject<TSerializableObject>.BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>) Method

Bakes the associated geometries into the specified Rhino document using the provided attributes and returns a list of all created object Guids.

public virtual bool BakeGeometry(RhinoDoc? rhinoDoc, ObjectAttributes? objectAttributes, out System.Collections.Generic.List<System.Guid>? guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The target Rhino document.

objectAttributes Rhino.DocObjects.ObjectAttributes

The attributes to apply to the baked objects.

guids System.Collections.Generic.List<System.Guid>

When this method returns, contains a list of Guids for all successfully baked objects.

Implements BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>)

Returns

System.Boolean
true if baking was successful; otherwise, false.

GooBakeAwareSerializableObject<TSerializableObject>.BakeGeometry(RhinoDoc, ObjectAttributes, Guid) Method

Bakes the associated geometries into the specified Rhino document using the provided attributes.

public virtual bool BakeGeometry(RhinoDoc? rhinoDoc, ObjectAttributes? objectAttributes, out System.Guid guid);

Parameters

rhinoDoc Rhino.RhinoDoc

The target Rhino document.

objectAttributes Rhino.DocObjects.ObjectAttributes

The attributes to apply to the baked objects.

guid System.Guid

When this method returns, contains the Guid of the first baked object, or System.Guid.Empty if baking failed.

Returns

System.Boolean
true if at least one geometry was successfully baked; otherwise, false.

GooBakeAwareSerializableObject<TSerializableObject>.DrawViewportMeshes(GH_PreviewMeshArgs) Method

Draws the mesh representations of the geometries in the Rhino viewport.

public void DrawViewportMeshes(GH_PreviewMeshArgs? args);

Parameters

args Grasshopper.Kernel.GH_PreviewMeshArgs

The arguments containing preview and material information.

GooBakeAwareSerializableObject<TSerializableObject>.DrawViewportWires(GH_PreviewWireArgs) Method

Draws the wireframe representations of the geometries in the Rhino viewport.

public void DrawViewportWires(GH_PreviewWireArgs? args);

Parameters

args Grasshopper.Kernel.GH_PreviewWireArgs

The arguments containing preview and color information.

GooBakeAwareSerializableParam<X,T> Class

Represents a Grasshopper parameter that handles serializable and bake-aware objects.

public class GooBakeAwareSerializableParam<X,T> : DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<X, T>, DiGi.Rhino.Geometry.Core.Interfaces.IGooBakeAwareParam
    where X : DiGi.Rhino.Geometry.Core.Classes.GooBakeAwareSerializableObject<T>
    where T : DiGi.Core.Interfaces.ISerializableObject

Type parameters

X

The type of the Goo object, which must inherit from GooBakeAwareSerializableObject<TSerializableObject>.

T

The type of the underlying serializable object, which must implement DiGi.Core.Interfaces.ISerializableObject.

Inheritance Grasshopper.Kernel.GH_PersistentParamDiGi.Rhino.Core.Classes.GooPresistentParam<X,T>DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<X,T>Grasshopper.Kernel.IGH_PreviewObjectGrasshopper.Kernel.IGH_BakeAwareObject → GooBakeAwareSerializableParam<X,T>

Derived
GooIntersectionResult3DParam

Implements IGooBakeAwareParam

Constructors

GooBakeAwareSerializableParam() Constructor

Initializes a new instance of the GooBakeAwareSerializableParam<X,T> class.

public GooBakeAwareSerializableParam();

Properties

GooBakeAwareSerializableParam<X,T>.ClippingBox Property

Gets the clipping box for the parameter's preview based on its volatile data.

public virtual BoundingBox ClippingBox { get; }

Property Value

Rhino.Geometry.BoundingBox

GooBakeAwareSerializableParam<X,T>.Hidden Property

Gets or sets a value indicating whether the parameter is hidden from view.

public virtual bool Hidden { get; set; }

Property Value

System.Boolean

GooBakeAwareSerializableParam<X,T>.IsBakeCapable Property

Gets a value indicating whether the current data in the parameter can be baked into Rhino.

public virtual bool IsBakeCapable { get; }

Property Value

System.Boolean

GooBakeAwareSerializableParam<X,T>.IsPreviewCapable Property

Gets a value indicating whether the current data in the parameter can be previewed in the viewport.

public virtual bool IsPreviewCapable { get; }

Property Value

System.Boolean

Methods

GooBakeAwareSerializableParam<X,T>.BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>) Method

Bakes the objects contained within the parameter into the specified Rhino document using provided attributes.

public virtual void BakeGeometry(RhinoDoc? rhinoDoc, ObjectAttributes? objectAttributes, System.Collections.Generic.List<System.Guid>? guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The target Rhino document.

objectAttributes Rhino.DocObjects.ObjectAttributes

The attributes to apply to the baked objects.

guids System.Collections.Generic.List<System.Guid>

The list to which the Guids of the baked objects will be added. If null, a new list may be initialized internally but not returned unless passed by reference.

GooBakeAwareSerializableParam<X,T>.BakeGeometry(RhinoDoc, List<Guid>) Method

Bakes the objects contained within the parameter into the specified Rhino document using default attributes.

public virtual void BakeGeometry(RhinoDoc rhinoDoc, System.Collections.Generic.List<System.Guid> guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The target Rhino document.

guids System.Collections.Generic.List<System.Guid>

The list to which the Guids of the baked objects will be added.

GooBakeAwareSerializableParam<X,T>.DrawViewportMeshes(IGH_PreviewArgs) Method

Handles the rendering of mesh previews for the objects contained within the parameter.

public virtual void DrawViewportMeshes(IGH_PreviewArgs args);

Parameters

args Grasshopper.Kernel.IGH_PreviewArgs

The preview arguments provided by Grasshopper.

GooBakeAwareSerializableParam<X,T>.DrawViewportWires(IGH_PreviewArgs) Method

Handles the rendering of wireframe previews for the objects contained within the parameter.

public virtual void DrawViewportWires(IGH_PreviewArgs args);

Parameters

args Grasshopper.Kernel.IGH_PreviewArgs

The preview arguments provided by Grasshopper.

GooGeometry<T> Class

A generic Grasshopper Goo wrapper for DiGi geometry types that implement DiGi.Geometry.Core.Interfaces.IGeometry. Provides baking, viewport preview, and type-casting capabilities.

public class GooGeometry<T> : DiGi.Rhino.Core.Classes.GooSerializableObject<T>, DiGi.Rhino.Geometry.Core.Interfaces.IGooGeometry, DiGi.Rhino.Geometry.Core.Interfaces.IGooBakeAware
    where T : DiGi.Geometry.Core.Interfaces.IGeometry

Type parameters

T

The DiGi geometry type being wrapped. Must implement DiGi.Geometry.Core.Interfaces.IGeometry.

Inheritance Grasshopper.Kernel.Types.GH_GooGrasshopper.Kernel.Types.IGH_GooGH_IO.GH_ISerializableDiGi.Rhino.Core.Classes.GooObject<T>DiGi.Rhino.Core.Classes.GooSerializableObject<T>Grasshopper.Kernel.IGH_PreviewDataGrasshopper.Kernel.IGH_BakeAwareData → GooGeometry<T>

Derived
GooGeometry2D<T>
GooGeometry3D<T>

Implements IGooGeometry, IGooBakeAware

Constructors

GooGeometry() Constructor

Initializes a new default instance of GooGeometry<T>.

public GooGeometry();

GooGeometry(T) Constructor

Initializes a new instance of GooGeometry<T> with the specified geometry value.

public GooGeometry(T? geometry);

Parameters

geometry T

The geometry object to wrap, or null.

Properties

GooGeometry<T>.ClippingBox Property

Gets the Rhino bounding box used for viewport clipping.

public virtual BoundingBox ClippingBox { get; }

Property Value

Rhino.Geometry.BoundingBox

Methods

GooGeometry<T>.BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>) Method

Bakes the wrapped geometry into a Rhino document, returning all generated GUIDs.

public bool BakeGeometry(RhinoDoc? rhinoDoc, ObjectAttributes? objectAttributes, out System.Collections.Generic.List<System.Guid>? guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The Rhino document to bake into, or null.

objectAttributes Rhino.DocObjects.ObjectAttributes

The object attributes to apply when baking, or null.

guids System.Collections.Generic.List<System.Guid>

When this method returns, contains the list of GUIDs of all baked objects, or null.

Implements BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>)

Returns

System.Boolean
true if baking was successful; otherwise false.

GooGeometry<T>.BakeGeometry(RhinoDoc, ObjectAttributes, Guid) Method

Bakes the wrapped geometry into a Rhino document, returning the GUID of the first baked object.

public bool BakeGeometry(RhinoDoc rhinoDoc, ObjectAttributes objectAttributes, out System.Guid guid);

Parameters

rhinoDoc Rhino.RhinoDoc

The Rhino document to bake into.

objectAttributes Rhino.DocObjects.ObjectAttributes

The object attributes to apply when baking.

guid System.Guid

When this method returns, contains the GUID of the first baked object, or System.Guid.Empty if baking failed.

Returns

System.Boolean
true if baking was successful; otherwise false.

GooGeometry<T>.CastFrom(object) Method

Attempts to cast from a source object into this wrapper's value.

public override bool CastFrom(object? source);

Parameters

source System.Object

The source object to cast from.

Returns

System.Boolean
true if the cast was successful; otherwise false.

GooGeometry<T>.CastTo<Y>(Y) Method

Attempts to cast the wrapped geometry value to the specified target type Y.

public override bool CastTo<Y>(ref Y target);

Type parameters

Y

The target type to cast to.

Parameters

target Y

When this method returns, contains the cast value if successful.

Returns

System.Boolean
true if the cast was successful; otherwise false.

GooGeometry<T>.DrawViewportMeshes(GH_PreviewMeshArgs) Method

Draws the geometry as shaded meshes in the Grasshopper viewport preview.

public void DrawViewportMeshes(GH_PreviewMeshArgs args);

Parameters

args Grasshopper.Kernel.GH_PreviewMeshArgs

The preview mesh arguments including material settings.

GooGeometry<T>.DrawViewportWires(GH_PreviewWireArgs) Method

Draws the geometry as wireframe curves in the Grasshopper viewport preview.

public void DrawViewportWires(GH_PreviewWireArgs args);

Parameters

args Grasshopper.Kernel.GH_PreviewWireArgs

The preview wire arguments including color settings.

GooGeometry<T>.Duplicate() Method

Creates a duplicate of this GooGeometry<T> instance.

public override IGH_Goo Duplicate();

Returns

Grasshopper.Kernel.Types.IGH_Goo
A new Grasshopper.Kernel.Types.IGH_Goo wrapping the same geometry value.

GooGeometryParam Class

A non-generic Grasshopper persistent parameter for DiGi.Geometry.Core.Interfaces.IGeometry values, specializing GooGeometryParam<T> with DiGi.Geometry.Core.Interfaces.IGeometry.

public class GooGeometryParam : DiGi.Rhino.Geometry.Core.Classes.GooGeometryParam<DiGi.Geometry.Core.Interfaces.IGeometry>

Inheritance Grasshopper.Kernel.GH_PersistentParamDiGi.Rhino.Core.Classes.GooPresistentParam<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<DiGi.Geometry.Core.Interfaces.IGeometry>,DiGi.Geometry.Core.Interfaces.IGeometry>DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<DiGi.Geometry.Core.Interfaces.IGeometry>,DiGi.Geometry.Core.Interfaces.IGeometry>Grasshopper.Kernel.IGH_PreviewObjectGrasshopper.Kernel.IGH_BakeAwareObjectDiGi.Rhino.Geometry.Core.Classes.GooGeometryParam<DiGi.Geometry.Core.Interfaces.IGeometry> → GooGeometryParam

Constructors

GooGeometryParam() Constructor

Initializes a new default instance of GooGeometryParam.

public GooGeometryParam();

Properties

GooGeometryParam.ComponentGuid Property

Gets the unique identifier for this parameter component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooGeometryParam<T> Class

A generic Grasshopper persistent parameter for GooGeometry<T> values, supporting baking and viewport preview.

public class GooGeometryParam<T> : DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>, T>, DiGi.Rhino.Geometry.Core.Interfaces.IGooGeometryParam, DiGi.Rhino.Geometry.Core.Interfaces.IGooBakeAwareParam
    where T : DiGi.Geometry.Core.Interfaces.IGeometry

Type parameters

T

The DiGi geometry type. Must implement DiGi.Geometry.Core.Interfaces.IGeometry.

Inheritance Grasshopper.Kernel.GH_PersistentParamDiGi.Rhino.Core.Classes.GooPresistentParam<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>,T>DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>,T>Grasshopper.Kernel.IGH_PreviewObjectGrasshopper.Kernel.IGH_BakeAwareObject → GooGeometryParam<T>

Derived
GooGeometryParam
GooBoundingBox2DParam
GooBoundingBox3DParam
GooEllipse2DParam
GooGeometry2DParam
GooPoint2DParam
GooPolygon2DParam
GooPolygonal2DParam
GooPolygonalFace2DParam
GooRectangle2DParam
GooSegment2DParam
GooVector2DParam
GooEllipsoidParam
GooGeometry3DParam
GooMesh3DParam
GooPlaneParam
GooPoint3DParam
GooPolygonal3DParam
GooPolygonalFace3DParam
GooPolyhedronParam
GooPolyline3DParam
GooRay3DParam
GooSegment3DParam
GooTriangle3DParam
GooVector3DParam

Implements IGooGeometryParam, IGooBakeAwareParam

Constructors

GooGeometryParam() Constructor

Initializes a new default instance of GooGeometryParam<T>.

public GooGeometryParam();

Properties

GooGeometryParam<T>.ClippingBox Property

Gets the Rhino bounding box enclosing all geometry values held in this parameter.

public BoundingBox ClippingBox { get; }

Property Value

Rhino.Geometry.BoundingBox

GooGeometryParam<T>.ComponentGuid Property

Gets the unique identifier for this parameter component.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

GooGeometryParam<T>.Hidden Property

Gets or sets a value indicating whether this parameter is hidden in the viewport.

public bool Hidden { get; set; }

Property Value

System.Boolean

GooGeometryParam<T>.IsBakeCapable Property

Gets a value indicating whether this parameter is capable of baking geometry to Rhino.

public bool IsBakeCapable { get; }

Property Value

System.Boolean

GooGeometryParam<T>.IsPreviewCapable Property

Gets a value indicating whether this parameter is capable of showing a viewport preview.

public bool IsPreviewCapable { get; }

Property Value

System.Boolean

Methods

GooGeometryParam<T>.BakeGeometry(RhinoDoc, ObjectAttributes, List<Guid>) Method

Bakes all geometry values in this parameter to a Rhino document with the specified attributes.

public void BakeGeometry(RhinoDoc? rhinoDoc, ObjectAttributes? objectAttributes, System.Collections.Generic.List<System.Guid>? guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The Rhino document to bake into, or null.

objectAttributes Rhino.DocObjects.ObjectAttributes

The object attributes to apply when baking, or null.

guids System.Collections.Generic.List<System.Guid>

The list to which the GUIDs of all baked objects are added, or null.

GooGeometryParam<T>.BakeGeometry(RhinoDoc, List<Guid>) Method

Bakes all geometry values in this parameter to a Rhino document using default attributes.

public void BakeGeometry(RhinoDoc rhinoDoc, System.Collections.Generic.List<System.Guid> guids);

Parameters

rhinoDoc Rhino.RhinoDoc

The Rhino document to bake into.

guids System.Collections.Generic.List<System.Guid>

The list to which the GUIDs of all baked objects are added.

GooGeometryParam<T>.Prompt_Plural(List<GooGeometry<T>>) Method

Prompts the user to select multiple geometry values.

protected override GH_GetterResult Prompt_Plural(ref System.Collections.Generic.List<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>?> values);

Parameters

values System.Collections.Generic.List<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>>

The list of selected values.

Returns

Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the result of the prompt.

GooGeometryParam<T>.Prompt_Singular(GooGeometry<T>) Method

Prompts the user to select a single geometry value.

protected override GH_GetterResult Prompt_Singular(ref DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>? value);

Parameters

value DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>

The selected value.

Returns

Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the result of the prompt.

RhinoInfo Class

Provides assembly information for the Rhino geometry library.

public class RhinoInfo

Inheritance Grasshopper.Kernel.GH_AssemblyInfo → RhinoInfo

Properties

RhinoInfo.AuthorContact Property

Gets the contact information for the author.

public override string AuthorContact { get; }

Property Value

System.String

RhinoInfo.AuthorName Property

Gets the name of the author.

public override string AuthorName { get; }

Property Value

System.String

RhinoInfo.Description Property

Gets the description of the assembly.

public override string Description { get; }

Property Value

System.String

RhinoInfo.Icon Property

Gets the icon for the assembly.

public override System.Drawing.Bitmap? Icon { get; }

Property Value

System.Drawing.Bitmap

RhinoInfo.Id Property

Gets the unique identifier for the assembly.

public override System.Guid Id { get; }

Property Value

System.Guid

RhinoInfo.Name Property

Gets the name of the assembly.

public override string Name { get; }

Property Value

System.String

ToDiGi Class

A Grasshopper component that converts Rhino geometry to DiGi 3D geometry.

public class ToDiGi : DiGi.Rhino.Core.Classes.VariableParameterComponent

Inheritance Grasshopper.Kernel.GH_ComponentDiGi.Rhino.Core.Classes.ComponentGrasshopper.Kernel.IGH_VariableParameterComponentDiGi.Rhino.Core.Classes.VariableParameterComponent → ToDiGi

Constructors

ToDiGi() Constructor

Initializes a new instance of object.

public ToDiGi();

Properties

ToDiGi.ComponentGuid Property

Gets the unique ID for this component. Do not change this ID after release.

public override System.Guid ComponentGuid { get; }

Property Value

System.Guid

ToDiGi.Exposure Property

Gets the exposure level of the component in the Grasshopper canvas.

public override GH_Exposure Exposure { get; }

Property Value

Grasshopper.Kernel.GH_Exposure

ToDiGi.Inputs Property

Registers all the input parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }

Property Value

DiGi.Rhino.Core.Classes.Param[]

ToDiGi.Outputs Property

Registers all the output parameters for this component.

protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }

Property Value

DiGi.Rhino.Core.Classes.Param[]

Methods

ToDiGi.SolveInstance(IGH_DataAccess) Method

This is the method that actually does the work.

protected override void SolveInstance(IGH_DataAccess dataAccess);

Parameters

dataAccess Grasshopper.Kernel.IGH_DataAccess

The DA object is used to retrieve from inputs and store in outputs.

Clone this wiki locally