-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Rhino.Geometry.Core.Classes
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.ISerializableObjectTSerializableObject
The type of the serializable object, which must implement DiGi.Core.Interfaces.ISerializableObject.
Inheritance Grasshopper.Kernel.Types.GH_Goo → Grasshopper.Kernel.Types.IGH_Goo → GH_IO.GH_ISerializable → DiGi.Rhino.Core.Classes.GooObject<TSerializableObject> → DiGi.Rhino.Core.Classes.GooSerializableObject<TSerializableObject> → Grasshopper.Kernel.IGH_PreviewData → Grasshopper.Kernel.IGH_BakeAwareData → GooBakeAwareSerializableObject<TSerializableObject>
Derived
↳ GooIntersectionResult3D
Implements IGooBakeAwareSerializableObject, IGooBakeAware
Initializes a new instance of the GooBakeAwareSerializableObject<TSerializableObject> class.
public GooBakeAwareSerializableObject();Initializes a new instance of the GooBakeAwareSerializableObject<TSerializableObject> class with a specified geometry value.
public GooBakeAwareSerializableObject(TSerializableObject? geometry);geometry TSerializableObject
The serializable geometry object to initialize the value with.
Gets the bounding box of the geometries associated with this object, used for clipping.
public virtual BoundingBox ClippingBox { get; }Gets the array of geometries that represent this object in 3D space.
public abstract DiGi.Geometry.Core.Interfaces.IGeometry[]? Geometries { get; }Implements Geometries
DiGi.Geometry.Core.Interfaces.IGeometry[]
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);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>)
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);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.
System.Boolean
true if at least one geometry was successfully baked; otherwise, false.
Draws the mesh representations of the geometries in the Rhino viewport.
public void DrawViewportMeshes(GH_PreviewMeshArgs? args);args Grasshopper.Kernel.GH_PreviewMeshArgs
The arguments containing preview and material information.
Draws the wireframe representations of the geometries in the Rhino viewport.
public void DrawViewportWires(GH_PreviewWireArgs? args);args Grasshopper.Kernel.GH_PreviewWireArgs
The arguments containing preview and color information.
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.ISerializableObjectX
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_PersistentParam → DiGi.Rhino.Core.Classes.GooPresistentParam<X,T> → DiGi.Rhino.Core.Classes.GooSerializablePresistentParam<X,T> → Grasshopper.Kernel.IGH_PreviewObject → Grasshopper.Kernel.IGH_BakeAwareObject → GooBakeAwareSerializableParam<X,T>
Derived
↳ GooIntersectionResult3DParam
Implements IGooBakeAwareParam
Initializes a new instance of the GooBakeAwareSerializableParam<X,T> class.
public GooBakeAwareSerializableParam();Gets the clipping box for the parameter's preview based on its volatile data.
public virtual BoundingBox ClippingBox { get; }Gets or sets a value indicating whether the parameter is hidden from view.
public virtual bool Hidden { get; set; }Gets a value indicating whether the current data in the parameter can be baked into Rhino.
public virtual bool IsBakeCapable { get; }Gets a value indicating whether the current data in the parameter can be previewed in the viewport.
public virtual bool IsPreviewCapable { get; }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);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.
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);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.
Handles the rendering of mesh previews for the objects contained within the parameter.
public virtual void DrawViewportMeshes(IGH_PreviewArgs args);args Grasshopper.Kernel.IGH_PreviewArgs
The preview arguments provided by Grasshopper.
Handles the rendering of wireframe previews for the objects contained within the parameter.
public virtual void DrawViewportWires(IGH_PreviewArgs args);args Grasshopper.Kernel.IGH_PreviewArgs
The preview arguments provided by Grasshopper.
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.IGeometryT
The DiGi geometry type being wrapped. Must implement DiGi.Geometry.Core.Interfaces.IGeometry.
Inheritance Grasshopper.Kernel.Types.GH_Goo → Grasshopper.Kernel.Types.IGH_Goo → GH_IO.GH_ISerializable → DiGi.Rhino.Core.Classes.GooObject<T> → DiGi.Rhino.Core.Classes.GooSerializableObject<T> → Grasshopper.Kernel.IGH_PreviewData → Grasshopper.Kernel.IGH_BakeAwareData → GooGeometry<T>
Derived
↳ GooGeometry2D<T>
↳ GooGeometry3D<T>
Implements IGooGeometry, IGooBakeAware
Initializes a new default instance of GooGeometry<T>.
public GooGeometry();Initializes a new instance of GooGeometry<T> with the specified geometry value.
public GooGeometry(T? geometry);geometry T
The geometry object to wrap, or null.
Gets the Rhino bounding box used for viewport clipping.
public virtual BoundingBox ClippingBox { get; }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);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>)
System.Boolean
true if baking was successful; otherwise false.
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);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.
System.Boolean
true if baking was successful; otherwise false.
Attempts to cast from a source object into this wrapper's value.
public override bool CastFrom(object? source);source System.Object
The source object to cast from.
System.Boolean
true if the cast was successful; otherwise false.
Attempts to cast the wrapped geometry value to the specified target type Y.
public override bool CastTo<Y>(ref Y target);Y
The target type to cast to.
target Y
When this method returns, contains the cast value if successful.
System.Boolean
true if the cast was successful; otherwise false.
Draws the geometry as shaded meshes in the Grasshopper viewport preview.
public void DrawViewportMeshes(GH_PreviewMeshArgs args);args Grasshopper.Kernel.GH_PreviewMeshArgs
The preview mesh arguments including material settings.
Draws the geometry as wireframe curves in the Grasshopper viewport preview.
public void DrawViewportWires(GH_PreviewWireArgs args);args Grasshopper.Kernel.GH_PreviewWireArgs
The preview wire arguments including color settings.
Creates a duplicate of this GooGeometry<T> instance.
public override IGH_Goo Duplicate();Grasshopper.Kernel.Types.IGH_Goo
A new Grasshopper.Kernel.Types.IGH_Goo wrapping the same geometry value.
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_PersistentParam → DiGi.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_PreviewObject → Grasshopper.Kernel.IGH_BakeAwareObject → DiGi.Rhino.Geometry.Core.Classes.GooGeometryParam<DiGi.Geometry.Core.Interfaces.IGeometry> → GooGeometryParam
Initializes a new default instance of GooGeometryParam.
public GooGeometryParam();Gets the unique identifier for this parameter component.
public override System.Guid ComponentGuid { get; }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.IGeometryT
The DiGi geometry type. Must implement DiGi.Geometry.Core.Interfaces.IGeometry.
Inheritance Grasshopper.Kernel.GH_PersistentParam → DiGi.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_PreviewObject → Grasshopper.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
Initializes a new default instance of GooGeometryParam<T>.
public GooGeometryParam();Gets the Rhino bounding box enclosing all geometry values held in this parameter.
public BoundingBox ClippingBox { get; }Gets the unique identifier for this parameter component.
public override System.Guid ComponentGuid { get; }Gets or sets a value indicating whether this parameter is hidden in the viewport.
public bool Hidden { get; set; }Gets a value indicating whether this parameter is capable of baking geometry to Rhino.
public bool IsBakeCapable { get; }Gets a value indicating whether this parameter is capable of showing a viewport preview.
public bool IsPreviewCapable { get; }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);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.
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);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.
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);values System.Collections.Generic.List<DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>>
The list of selected values.
Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the result of the prompt.
Prompts the user to select a single geometry value.
protected override GH_GetterResult Prompt_Singular(ref DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>? value);value DiGi.Rhino.Geometry.Core.Classes.GooGeometry<T>
The selected value.
Grasshopper.Kernel.GH_GetterResult
A Grasshopper.Kernel.GH_GetterResult indicating the result of the prompt.
Provides assembly information for the Rhino geometry library.
public class RhinoInfoInheritance Grasshopper.Kernel.GH_AssemblyInfo → RhinoInfo
Gets the contact information for the author.
public override string AuthorContact { get; }Gets the name of the author.
public override string AuthorName { get; }Gets the description of the assembly.
public override string Description { get; }Gets the icon for the assembly.
public override System.Drawing.Bitmap? Icon { get; }Gets the unique identifier for the assembly.
public override System.Guid Id { get; }Gets the name of the assembly.
public override string Name { get; }A Grasshopper component that converts Rhino geometry to DiGi 3D geometry.
public class ToDiGi : DiGi.Rhino.Core.Classes.VariableParameterComponentInheritance Grasshopper.Kernel.GH_Component → DiGi.Rhino.Core.Classes.Component → Grasshopper.Kernel.IGH_VariableParameterComponent → DiGi.Rhino.Core.Classes.VariableParameterComponent → ToDiGi
Initializes a new instance of object.
public ToDiGi();Gets the unique ID for this component. Do not change this ID after release.
public override System.Guid ComponentGuid { get; }Gets the exposure level of the component in the Grasshopper canvas.
public override GH_Exposure Exposure { get; }Grasshopper.Kernel.GH_Exposure
Registers all the input parameters for this component.
protected override DiGi.Rhino.Core.Classes.Param[] Inputs { protected get; }DiGi.Rhino.Core.Classes.Param[]
Registers all the output parameters for this component.
protected override DiGi.Rhino.Core.Classes.Param[] Outputs { protected get; }DiGi.Rhino.Core.Classes.Param[]
This is the method that actually does the work.
protected override void SolveInstance(IGH_DataAccess dataAccess);dataAccess Grasshopper.Kernel.IGH_DataAccess
The DA object is used to retrieve from inputs and store in outputs.