GH_Convert
Provides static converters for different data types inside Grasshopper. This class both has specific and generic converters.
Fields
PureDateTicks
#Represents the total number of ticks past midnight that (by Grasshopper convention) identifies a pure date.
Properties
CultureTable
#Gets the cached culture table. Do not modify this dictionary unless you know what you are doing.
Methods
BackSolveExpression
#Try and backsolve an expression
Parameters:
| exp (string) | Expression to back solve. |
| variable (string) | Name of input variable. |
| target (double) | Result to look for. |
| minimum (double) | Lowest input to try. |
| maximum (double) | Highest input to try. |
| steps (int) | Number of steps per iteration. |
| t (ref double) | Value for variable that closest approximates the target value. |
| v (ref double) | Value of expression for the best approximation. |
Returns: True on success, false on failure..
ByteArrayToCommonObject<T>
#Convert an OpenNurbs compliant compressed byte array into a RhinoCommon object.
Parameters:
| data (byte[]) | Byte array to de-serialize. |
Returns: A RhinoCommon object instance or null on failure.
CombineDateAndTime
#Combine a pure date and a pure time.
CommonObjectToByteArray
#Convert a RhinoCommon object into a compressed byte-array using OpenNurbs serialization.
Parameters:
| data (CommonObject) | Object to serialize. |
Returns: A byte array representing the object or null on failure.
CreatePureDate
#Convert a datetime structure into a pure date, i.e. remove the time portion. As per convention, this leaves 1 tick into the day in question intact.
Parameters:
| date (DateTime) |
CreatePureTime
#Convert a datetime structure into a pure time, i.e. remove the date portion. As per convention, this means setting the year, month and day to 1.
Parameters:
| date (DateTime) |
CreatePureTime
#Create a pure time instance. If the total number of hours, minutes and seconds exceeds a full year then it is not possible to create a pure time and the largest possible pure time will be returned instead.
FileToHash
#Create a hash of a file.
Parameters:
| path (string) | File to hash. |
Returns: A hash of the file contents. File name and attributes are not taken into consideration.
FindRhinoObjectByNameAndType
#Search the current Rhino document for an object with a given name of a given type.
Parameters:
| name (string) | Name of object. |
| type (ObjectType) | Geometry type of object. |
Returns: An object that matches the name + type filter or null if no object could be found.
GeometryToObjRef
#Create an ObjRef for a referenced IGH_GeometricGoo. Unreferenced IGH_GeometryGoo will return null.
Parameters:
| in (IGH_GeometricGoo) | geometric goo to get an ObjRef from |
Returns: An instance of an ObjRef when the goo is referenced geometry. It is up to the caller to Dispose of the objref when it is no longer needed Null for unreferenced geometry
GetBrepFromDocument
#Harvest a brep object from a Rhino document.
GetClippingPlaneFromDocument
#Harvest a clipping plane surface from a Rhino document.
GetCurveFromDocument
#Harvest a curve object from a Rhino document.
GetExtrusionFromDocument
#Harvest an extrusion object from a Rhino document.
GetMeshFromDocument
#Harvest a mesh object from a Rhino document.
GetPlaneFromDocument
#Harvest the object frame plane from a Rhino document.
GetPointFromDocument
#Harvest a point object from a Rhino document.
GetSubDFromDocument
#Harvest a sub-d object from a Rhino document.
GetSurfaceFromDocument
#Harvest a surface object from a Rhino document.
GetTimeKind
#Gets the kind of time implied by two System.DateTime values.
Returns: GH_TimeKind.PureTime, GH_TimeKind.PureDate or GH_TimeKind.DateAndTime if both kinds are the same. GH_TimeKind.DateAndTime is one is a pure date and the other a DateAndTime value. GH_TimeKind.Mixed is one is a pure time and the other one is not.
GetTimeKind
#Gets the kind of time implied by a System.DateTime value.
Parameters:
| time (DateTime) | Time to evaluate. |
Returns: GH_TimeKind.PureTime, GH_TimeKind.PureDate or GH_TimeKind.DateAndTime.
IsPureDate
#Tests whether a DateTime instance represents a pure date (i.e. that the time portion is undefined). Pure dates are a Grasshopper convention, basically a pure date is 1 tick past midnight.
Parameters:
| potentialDate (DateTime) | Date to test. |
Returns: True if the date is considered pure.
IsPureTime
#Tests whether a DateTime instance represents a pure time (i.e. that the date portion is undefined). Pure times are a Grasshopper convention, basically a pure time is 2 ticks past any second.
Parameters:
| potentialTime (DateTime) | Date to test. |
Returns: True if the time is considered undefined.
ObjRefToGeometry
#Convert a Rhino Object Reference into Grasshopper IGH_GeometricGoo.
Parameters:
| in (ObjRef) | Object reference to convert. |
Returns: An instance that implements IGH_GeometricGoo on success or false on failure.
StringToDate
#Convert a string representing a date into an actual date. If a pure date is possible it will be returned. If the input is a pure time this method will fail, you need to use StringToTime instead.
StringToGuid
#Create a Guid based on SHA256 hashing of a string.
Parameters:
| text (string) | Text to hash. |
Returns: A guid representing the string.
StringToTime
#Convert a string representing a time into an pure time. Allowed separators of hour, minute and second portions are colons, semi-colons, points and commas. Grasshopper itself uses colons when formatting times. A PM or AM symbol is allowed provided it does not border on any alphabetical characters. A time can be prefixed by a "X day[s] + " string which defines the total number of 24-hour periods to include.
To_GH_ClassPrefixTypeName
#Rename a Type FullName from the pre-"GH_"-prefix ea.
Parameters:
| old_name (string) | Type name (Type.FullName) to process. |
Returns: The renamed typename.
ToAnnotationBase
#public static bool ToAnnotationBase(object data, ref AnnotationBase rc, GH_Conversion conversion_level)
Convert data into Rhino.Geometry.AnnotationBase.
Parameters:
| data (object) | Data to convert |
| rc (ref AnnotationBase) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToAnnotationBase_Primary
#Performs a direct cast from Rhino.Geometry.AnnotationBase or GH_AnnotationBase. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref AnnotationBase) | Result of conversion |
Returns: A AnnotationBase instance if successful, or Nothing on failure.
ToAnnotationBase_Secondary
#Attempts to convert other data types into an Rhino.Geometry.AnnotationBase. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref AnnotationBase) |
Returns: An Rhino.Geometry.AnnotationBase instance if successful, or Nothing on failure.
ToArc
#Convert data into Rhino.Geometry.Arc.
Parameters:
| data (object) | Data to convert |
| rc (ref Arc) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToArc_Primary
#Performs a direct cast from OnArc or GH_Arc. Data is not quaranteed to be duplicated.
ToArc_Secondary
#Attempts to convert other data types into an OnArc. Data is not quaranteed to be duplicated.
ToBoolean
#Convert data into Booleans.
Parameters:
| data (object) | Data to convert |
| destination (ref bool) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToBoolean_Primary
#Performs a direct cast from boolean or GH_Boolean.
ToBoolean_Secondary
#Performs indirect casts from other data types into booleans.
ToBoundingBox_Primary
#Performs a direct cast from OnBoundingBox. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref BoundingBox) |
Returns: An OnBoundingBox instance if successful, or Nothing on failure.
ToBox_Primary
#Performs a direct cast from Box. Data is not quaranteed to be duplicated.
ToBrep
#Convert data into Rhino.Geometry.Brep.
Parameters:
| data (object) | Data to convert |
| rc (ref Brep) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToBrep_Primary
#Performs a direct cast from OnBrep or GH_Brep. Data is not quaranteed to be duplicated.
ToBrep_Secondary
#Attempts to convert other data types into an OnBrep. Data is not quaranteed to be duplicated.
ToCircle
#Convert data into Rhino.Geometry.Circle.
Parameters:
| data (object) | Data to convert |
| rc (ref Circle) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToCircle_Primary
#Performs a direct cast from OnCircle or GH_Circle. Data is not quaranteed to be duplicated.
ToCircle_Secondary
#Attempts to convert other data types into an OnCircle. Data is not quaranteed to be duplicated.
ToClippingPlane
#public static bool ToClippingPlane(object data, ref ClippingPlaneSurface rc, GH_Conversion conversion_level)
Convert data into Rhino.Geometry.ClippingPlaneSurface.
Parameters:
| data (object) | Data to convert |
| rc (ref ClippingPlaneSurface) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToClippingPlane_Primary
#Performs a direct cast from Rhino.Geometry.ClippingPlaneSurface or GH_ClippingPlane. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref ClippingPlaneSurface) | Result of conversion |
Returns: A TextDot instance if successful, or Nothing on failure.
ToClippingPlane_Secondary
#Attempts to convert other data types into an Rhino.Geometry.ClippingPlaneSurface. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref ClippingPlaneSurface) |
Returns: An Rhino.Geometry.ClippingPlaneSurface instance if successful, or Nothing on failure.
ToColor
#Convert data into Colors.
Parameters:
| data (object) | Data to convert |
| destination (ref Color) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToColor_Primary
#Performs a direct cast from Drawing.Color, GH_Color and OnColor.
ToColor_Secondary
#Performs indirect casts from other data types into Colors.
ToComplex
#Convert data into Complex.
Parameters:
| data (object) | Data to convert |
| destination (ref Complex) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToComplex_Primary
#Performs a direct cast from Complex or GH_ComplexNumber
ToComplex_Secondary
#Performs indirect casts from other data types into Complex.
ToCoordinates
#ToCulture
#public static bool ToCulture(object data, ref CultureInfo destination, GH_Conversion conversion_level)
Convert data into Colors.
Parameters:
| data (object) | Data to convert. |
| destination (ref CultureInfo) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToCulture_Primary
#Performs a direct cast from System.Globalization.CultureInfo and GH_Culture.
Parameters:
| data (object) | Data to convert. |
| destination (ref CultureInfo) | Target for value assignment. |
Returns: True on success, false on failure.
ToCulture_Secondary
#Performs indirect casts from other data types into CultureInfo.
Parameters:
| data (object) | Data to convert. |
| destination (ref CultureInfo) | Target for value assignment. |
Returns: True on success, false on failure.
ToCurve
#Convert data into Rhino.Geometry.Curve.
Parameters:
| data (object) | Data to convert |
| rc (ref Curve) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToCurve_Primary
#Performs a direct cast from OnCurve or GH_Curve. Data is not quaranteed to be duplicated.
ToCurve_Secondary
#Attempts to convert other data types into an IOnCurve. Data is not quaranteed to be duplicated.
ToDate
#Convert data into Dates.
Parameters:
| data (object) | Data to convert |
| destination (ref DateTime) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToDate_Primary
#Performs a direct cast from DateTime or GH_DateTime.
ToDate_Secondary
#Performs indirect casts from other data types into DateTime constructs.
ToDimension
#Convert data into Rhino.Geometry.Dimension.
Parameters:
| data (object) | Data to convert |
| rc (ref Dimension) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToDimension_Primary
#Performs a direct cast from Rhino.Geometry.Dimension or GH_Dimension. Data is not guaranteed to be duplicated.
ToDimension_Secondary
#Attempts to convert other data types into an Rhino.Geometry.Dimension. Data is not quaranteed to be duplicated.
ToDouble
#Convert data into Doubles.
Parameters:
| data (object) | Data to convert |
| destination (ref double) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToDouble_Primary
#Performs a direct cast from Double or GH_Number.
ToDouble_Secondary
#Performs indirect casts from other data types into Doubles.
ToExtrusion
#Convert data into Rhino.Geometry.Brep.
Parameters:
| data (object) | Data to convert |
| rc (ref Extrusion) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToExtrusion_Primary
#Performs a direct cast from Rhino.Geometry.Extrusion or GH_Extrusion. Data is not quaranteed to be duplicated.
ToExtrusion_Secondary
#Attempts to convert other data types into a Extrusion. Data is not quaranteed to be duplicated.
ToGeometricGoo
#Converts an object into GeometricGoo. Does not duplicate the data if a lossless conversion is possible.
Parameters:
| data (object) | Data to convert. |
Returns: An instance that implements IGH_GeometricGoo on success or null on failure.
ToGeometryBase
#Attempt to convert an object into a Rhino.Geometry.GeometryBase instance.
Parameters:
| data (object) | Data to convert. |
Returns: A GeometryBase instance on success or null on failure.
ToGHAngularDimension
#public static bool ToGHAngularDimension(object data, GH_Conversion conversion_level, ref GH_AngularDimension target)
Convert data into GH_AngularDimension.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_AngularDimension) | Destination of conversion. If Null, a new instance will be created. |
ToGHAngularDimension_Primary
#Converts similar data into a GH_AngularDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_AngularDimension) | Target instance. If null, a new GH_AngularDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHAngularDimension_Secondary
#Converts similar data into a GH_AngularDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_AngularDimension) | Target instance. If null, a new GH_AngularDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHAnnotationBase
#public static bool ToGHAnnotationBase(object data, GH_Conversion conversion_level, ref GH_AnnotationBase target)
Convert data into GH_AnnotationBase.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_AnnotationBase) | Destination of conversion. If Null, a new instance will be created. |
ToGHArc
#Convert data into GH_Arcs.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Arc) | Destination of conversion. If Null, a new instance will be created. |
ToGHArc_Primary
#Converts similar data into a GH_Arc instance. Data is not quaranteed to be duplicated.
ToGHArc_Secondary
#Converts similar data into a GH_Arc instance. Data is not quaranteed to be duplicated.
ToGHBoolean
#Convert data into GH_Boolean.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Boolean) | Destination of conversion. If Null, a new instance will be created. |
ToGHBoolean_Primary
#Converts similar data into a GH_Boolean instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Boolean) | Target instance. If null, a new GH_Boolean will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHBoolean_Secondary
#Converts similar data into a GH_Boolean instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Boolean) | Target instance. If null, a new GH_Boolean will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHBox
#Convert data into GH_Boxes.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Box) | Destination of conversion. If Null, a new instance will be created. |
ToGHBox_Primary
#Converts similar data into a GH_Box instance. Data is not guaranteed to be duplicated.
ToGHBox_Secondary
#Converts similar data into a GH_Box instance. Data is not quaranteed to be duplicated.
ToGHBrep
#Convert data into GH_Breps.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Brep) | Destination of conversion. If Null, a new instance will be created. |
ToGHBrep_Primary
#Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
ToGHBrep_Secondary
#Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
ToGHCentermark
#public static bool ToGHCentermark(object data, GH_Conversion conversion_level, ref GH_Centermark target)
Convert data into GH_Centermark.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Centermark) | Destination of conversion. If Null, a new instance will be created. |
ToGHCentermark_Primary
#Converts similar data into a GH_Centermark instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Centermark) | Target instance. If null, a new GH_Centermark will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHCentermark_Secondary
#Converts similar data into a GH_Centermark instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Centermark) | Target instance. If null, a new GH_Centermark will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHCircle
#Convert data into GH_Circles.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Circle) | Destination of conversion. If Null, a new instance will be created. |
ToGHCircle_Primary
#Converts similar data into a GH_Circle instance. Data is not quaranteed to be duplicated.
ToGHCircle_Secondary
#Converts similar data into a GH_Circle instance. Data is not quaranteed to be duplicated.
ToGHClippingPlane
#public static bool ToGHClippingPlane(object data, GH_Conversion conversion_level, ref GH_ClippingPlane target)
Convert data into GH_ClippingPlane.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_ClippingPlane) | Destination of conversion. If Null, a new instance will be created. |
ToGHClippingPlane_Primary
#Converts similar data into a GH_ClippingPlane instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_ClippingPlane) | Target instance. If null, a new GH_ClippingPlane will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHClippingPlane_Secondary
#Converts similar data into a GH_Clipping instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_ClippingPlane) | Target instance. If null, a new GH_ClippingPlane will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHColour
#Convert data into GH_Colour.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Colour) | Destination of conversion. If Null, a new instance will be created. |
ToGHColour_Primary
#Converts similar data into a GH_Colour instance. Data is not quaranteed to be duplicated.
ToGHColour_Secondary
#Converts similar data into a GH_Colour instance. Data is not quaranteed to be duplicated.
ToGHComplexNumber
#public static bool ToGHComplexNumber(object data, GH_Conversion conversion_level, ref GH_ComplexNumber target)
Convert data into GH_ComplexNumber.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_ComplexNumber) | Destination of conversion. If Null, a new instance will be created. |
ToGHComplexNumber_Primary
#Converts similar data into a GH_ComplexNumber instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_ComplexNumber) | Target instance. If null, a new GH_ComplexNumber will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHComplexNumber_Secondary
#Converts similar data into a GH_ComplexNumber instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_ComplexNumber) | Target instance. If null, a new GH_ComplexNumber will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHCurve
#Convert data into GH_Curves.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Curve) | Destination of conversion. If Null, a new instance will be created. |
ToGHCurve_Primary
#Converts similar data into a GH_Curve instance. Data is not quaranteed to be duplicated.
ToGHCurve_Secondary
#Converts similar data into a GH_Curve instance. Data is not quaranteed to be duplicated.
ToGHDimension
#public static bool ToGHDimension(object data, GH_Conversion conversion_level, ref GH_Dimension target)
Convert data into GH_Dimension.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Dimension) | Destination of conversion. If Null, a new instance will be created. |
ToGHExtrusion
#public static bool ToGHExtrusion(object data, GH_Conversion conversion_level, ref GH_Extrusion target)
Convert data into GH_Extrusion.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Extrusion) | Destination of conversion. If Null, a new instance will be created. |
ToGHExtrusion_Primary
#Converts similar data into a GH_Extrusion instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Extrusion) | Target instance. If null, a new GH_Brep will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHExtrusion_Secondary
#Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Extrusion) | Target instance. If null, a new GH_Brep will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHGuid
#Convert data into GH_Guid.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Guid) | Destination of conversion. If Null, a new instance will be created. |
ToGHGuid_Primary
#Converts similar data into a GH_Guid instance. Data is not quaranteed to be duplicated.
ToGHGuid_Secondary
#Converts similar data into a GH_Guid instance. Data is not quaranteed to be duplicated.
ToGHHatch
#Convert data into GH_Hatch.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Hatch) | Destination of conversion. If Null, a new instance will be created. |
ToGHHatch_Primary
#Converts similar data into a GH_Hatch instance. Data is not guaranteed to be duplicated.
ToGHHatch_Secondary
#Converts similar data into a GH_Hatch instance. Data is not guaranteed to be duplicated.
ToGHInstanceReference
#public static bool ToGHInstanceReference(object data, GH_Conversion conversion_level, ref GH_InstanceReference target)
Convert data into GH_InstanceReference.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_InstanceReference) | Destination of conversion. If Null, a new instance will be created. |
ToGHInstanceReference_Primary
#Converts similar data into a GH_InstanceReference instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_InstanceReference) | Target instance. If null, a new GH_InstanceReference will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInstanceReference_Secondary
#Converts similar data into a GH_InstanceReference instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_InstanceReference) | Target instance. If null, a new GH_InstanceReference will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInteger
#Convert data into GH_Integer.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Integer) | Destination of conversion. If Null, a new instance will be created. |
ToGHInteger_Primary
#Converts similar data into a GH_Integer instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Integer) | Target instance. If null, a new GH_Integer will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInteger_Secondary
#Converts similar data into a GH_Integer instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Integer) | Target instance. If null, a new GH_Integer will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInterval
#public static bool ToGHInterval(object data, GH_Conversion conversion_level, ref GH_Interval target)
Convert data into GH_Intervals.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Interval) | Destination of conversion. If Null, a new instance will be created. |
ToGHInterval_Primary
#Converts similar data into a GH_Interval instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Interval) | Target instance. If null, a new GH_Interval will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInterval_Secondary
#Converts similar data into a GH_Interval instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Interval) | Target instance. If null, a new GH_Interval will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInterval2D
#public static bool ToGHInterval2D(object data, GH_Conversion conversion_level, ref GH_Interval2D target)
Convert data into GH_Interval2Ds.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Interval2D) | Destination of conversion. If Null, a new instance will be created. |
ToGHInterval2D_Primary
#Converts similar data into a GH_Interval2D instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Interval2D) | Target instance. If null, a new GH_Interval2D will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHInterval2D_Secondary
#Converts similar data into a GH_Interval2D instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Interval2D) | Target instance. If null, a new GH_Interval2D will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHLeader
#Convert data into GH_Leader.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Leader) | Destination of conversion. If Null, a new instance will be created. |
ToGHLeader_Primary
#Converts similar data into a GH_Leader instance. Data is not guaranteed to be duplicated.
ToGHLeader_Secondary
#Converts similar data into a GH_Leader instance. Data is not guaranteed to be duplicated.
ToGHLight
#Convert data into GH_Light.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Light) | Destination of conversion. If Null, a new instance will be created. |
ToGHLight_Primary
#Converts similar data into a GH_Light instance. Data is not guaranteed to be duplicated.
ToGHLight_Secondary
#Converts similar data into a GH_Light instance. Data is not guaranteed to be duplicated.
ToGHLine
#Convert data into GH_Lines.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Line) | Destination of conversion. If Null, a new instance will be created. |
ToGHLine_Primary
#Converts similar data into a GH_Line instance. Data is not quaranteed to be duplicated.
ToGHLine_Secondary
#Converts similar data into a GH_Line instance. Data is not quaranteed to be duplicated.
ToGHLinearDimension
#public static bool ToGHLinearDimension(object data, GH_Conversion conversion_level, ref GH_LinearDimension target)
Convert data into GH_LinearDimension.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_LinearDimension) | Destination of conversion. If Null, a new instance will be created. |
ToGHLinearDimension_Primary
#Converts similar data into a GH_LinearDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_LinearDimension) | Target instance. If null, a new GH_LinearDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHLinearDimension_Secondary
#Converts similar data into a GH_LinearDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_LinearDimension) | Target instance. If null, a new GH_LinearDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHMatrix
#Convert data into ToGHMatrix.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Matrix) | Destination of conversion. If Null, a new instance will be created. |
ToGHMatrix_Primary
#Converts similar data into a GH_Matrix instance. Data is not quaranteed to be duplicated.
ToGHMatrix_Secondary
#Converts similar data into a GH_Matrix instance. Data is not quaranteed to be duplicated.
ToGHMesh
#Convert data into GH_Meshs.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Mesh) | Destination of conversion. If Null, a new instance will be created. |
ToGHMesh_Primary
#Converts similar data into a GH_Mesh instance. Data is not quaranteed to be duplicated.
ToGHMesh_Secondary
#Converts similar data into a GH_Mesh instance. Data is not quaranteed to be duplicated.
ToGHMeshFace
#public static bool ToGHMeshFace(object data, GH_Conversion conversion_level, ref GH_MeshFace target)
Convert data into GH_MeshFaces.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_MeshFace) | Destination of conversion. If Null, a new instance will be created. |
ToGHMeshFace_Primary
#Converts similar data into a GH_MeshFace instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_MeshFace) | Target instance. If null, a new GH_MeshFace will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHMeshFace_Secondary
#Converts similar data into a GH_MeshFace instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_MeshFace) | Target instance. If null, a new GH_MeshFace will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHNumber
#Convert data into GH_Number.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Number) | Destination of conversion. If Null, a new instance will be created. |
ToGHNumber_Primary
#Converts similar data into a GH_Number instance. Data is not quaranteed to be duplicated.
ToGHNumber_Secondary
#Converts similar data into a GH_Number instance. Data is not quaranteed to be duplicated.
ToGHOrdinateDimension
#public static bool ToGHOrdinateDimension(object data, GH_Conversion conversion_level, ref GH_OrdinateDimension target)
Convert data into GH_OrdinateDimension.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_OrdinateDimension) | Destination of conversion. If Null, a new instance will be created. |
ToGHOrdinateDimension_Primary
#Converts similar data into a GH_OrdinateDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_OrdinateDimension) | Target instance. If null, a new GH_OrdinateDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHOrdinateDimension_Secondary
#Converts similar data into a GH_OrdinateDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_OrdinateDimension) | Target instance. If null, a new GH_OrdinateDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHPlane
#Convert data into GH_Planes.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Plane) | Destination of conversion. If Null, a new instance will be created. |
ToGHPlane_Primary
#Converts similar data into a GH_Plane instance. Data is not quaranteed to be duplicated.
ToGHPlane_Secondary
#Converts similar data into a GH_Plane instance. Data is not quaranteed to be duplicated.
ToGHPoint
#Convert data into GH_Points.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Point) | Destination of conversion. If Null, a new instance will be created. |
ToGHPoint_Primary
#Converts similar data into a GH_Point instance. Data is not quaranteed to be duplicated.
ToGHPoint_Secondary
#Converts similar data into a GH_Point instance. Data is not quaranteed to be duplicated.
ToGHPointCloud
#public static bool ToGHPointCloud(object data, GH_Conversion conversion_level, ref GH_PointCloud target)
Convert data into GH_PointCloud.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_PointCloud) | Destination of conversion. If Null, a new instance will be created. |
ToGHPointCloud_Primary
#Converts similar data into a GH_PointCloud instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_PointCloud) | Target instance. If null, a new GH_PointCloud will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHPointCloud_Secondary
#Converts similar data into a GH_PointCloud instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_PointCloud) | Target instance. If null, a new GH_PointCloud will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHRadialDimension
#public static bool ToGHRadialDimension(object data, GH_Conversion conversion_level, ref GH_RadialDimension target)
Convert data into GH_RadialDimension.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_RadialDimension) | Destination of conversion. If Null, a new instance will be created. |
ToGHRadialDimension_Primary
#Converts similar data into a GH_RadialDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_RadialDimension) | Target instance. If null, a new GH_RadialDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHRadialDimension_Secondary
#Converts similar data into a GH_RadialDimension instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_RadialDimension) | Target instance. If null, a new GH_RadialDimension will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHRectangle
#public static bool ToGHRectangle(object data, GH_Conversion conversion_level, ref GH_Rectangle target)
Convert data into GH_Rectangles.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Rectangle) | Destination of conversion. If Null, a new instance will be created. |
ToGHRectangle_Primary
#Converts similar data into a GH_Rectangle instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Rectangle) | Target instance. If null, a new GH_Rectangle will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHRectangle_Secondary
#Converts similar data into a GH_Rectangle instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Rectangle) | Target instance. If null, a new GH_Rectangle will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHString
#Convert data into GH_String.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_String) | Destination of conversion. If Null, a new instance will be created. |
ToGHString_Primary
#Converts similar data into a GH_String instance. Data is not quaranteed to be duplicated.
ToGHString_Secondary
#Converts similar data into a GH_String instance. Data is not quaranteed to be duplicated.
ToGHSubD
#Convert data into GH_SubDs.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_SubD) | Destination of conversion. If Null, a new instance will be created. |
ToGHSubD_Primary
#Converts similar data into a GH_SubD instance. Data is not quaranteed to be duplicated.
ToGHSubD_Secondary
#Converts similar data into a GH_SubD instance. Data is not quaranteed to be duplicated.
ToGHSurface
#Convert data into GH_Surfaces.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Surface) | Destination of conversion. If Null, a new instance will be created. |
ToGHSurface_Primary
#Converts similar data into a GH_Surface instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Surface) | Target instance. If null, a new GH_Surface will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHSurface_Secondary
#Converts similar data into a GH_Surface instance. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_Surface) | Target instance. If null, a new GH_Surface will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHTextDot
#Convert data into GH_TextDot.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_TextDot) | Destination of conversion. If Null, a new instance will be created. |
ToGHTextDot_Primary
#Converts similar data into a GH_TextDot instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_TextDot) | Target instance. If null, a new GH_TextDot will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHTextDot_Secondary
#Converts similar data into a GH_TextDot instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_TextDot) | Target instance. If null, a new GH_TextDot will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHTextEntity
#public static bool ToGHTextEntity(object data, GH_Conversion conversion_level, ref GH_TextEntity target)
Convert data into GH_TextEntity.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_TextEntity) | Destination of conversion. If Null, a new instance will be created. |
ToGHTextEntity_Primary
#Converts similar data into a GH_TextEntity instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_TextEntity) | Target instance. If null, a new GH_TextEntity will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHTextEntity_Secondary
#Converts similar data into a GH_TextEntity instance. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| target (ref GH_TextEntity) | Target instance. If null, a new GH_TextEntity will be constructed. If not null, the instance values will be set. |
Returns: True on success, False on failure.
ToGHTime
#Convert data into GH_Time.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Time) | Destination of conversion. If Null, a new instance will be created. |
ToGHTime_Primary
#Converts similar data into a GH_Time instance. Data is not quaranteed to be duplicated.
ToGHTime_Secondary
#Converts similar data into a GH_Time instance. Data is not quaranteed to be duplicated.
ToGHVector
#Convert data into GH_Vectors.
Parameters:
| data (object) | Data to convert |
| conversion_level (GH_Conversion) | Level of conversion. |
| target (ref GH_Vector) | Destination of conversion. If Null, a new instance will be created. |
ToGHVector_Primary
#Converts similar data into a GH_Vector instance. Data is not quaranteed to be duplicated.
ToGHVector_Secondary
#Converts similar data into a GH_Vector instance. Data is not quaranteed to be duplicated.
ToGoo
#Converts an object into Goo. Does not duplicate the data if a lossless conversion is possible.
Remarks: This function calls a whole sh*tload of other conversion functions. IT IS SLOW.
Parameters:
| data (object) | Data to convert. |
Returns: IGH_Goo instance. If Data is not a null reference this function ALWAYS returns a GOO instance.
ToGUID
#Convert data into Guids.
Parameters:
| data (object) | Data to convert |
| destination (ref Guid) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToGUID_Primary
#Performs a direct cast from Guid, GH_Guid, String and GH_String.
ToGUID_Secondary
#Performs indirect casts from other data types into Guids.
ToHatch
#Convert data into Rhino.Geometry.Hatch.
Parameters:
| data (object) | Data to convert |
| rc (ref Hatch) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToHatch_Primary
#Performs a direct cast from Rhino.Geometry.Hatch or GH_Hatch. Data is not guaranteed to be duplicated.
ToHatch_Secondary
#Attempts to convert other data types into an Rhino.Geometry.Hatch. Data is not quaranteed to be duplicated.
ToInt32
#Convert data into Int32s.
Parameters:
| data (object) | Data to convert |
| destination (ref int) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToInt32_Primary
#Performs a direct cast from Int32 or GH_Integer.
ToInt32_Secondary
#Performs indirect casts from other data types into Integers.
ToInterval
#Convert data into Rhino.Geometry.Interval.
Parameters:
| data (object) | Data to convert |
| rc (ref Interval) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToInterval_Primary
#Performs a direct cast from OnInterval or GH_Interval.
ToInterval_Secondary
#Attempts to convert other data types into an Interval. Data is not quaranteed to be duplicated.
ToLeader
#Convert data into Rhino.Geometry.Leader.
Parameters:
| data (object) | Data to convert |
| rc (ref Leader) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToLeader_Primary
#Performs a direct cast from Rhino.Geometry.Leader or GH_Leader. Data is not guaranteed to be duplicated.
ToLeader_Secondary
#Attempts to convert other data types into an Rhino.Geometry.Leader. Data is not quaranteed to be duplicated.
ToLight_Secondary
#Attempts to convert other data types into an Rhino.Geometry.Light. Data is not quaranteed to be duplicated.
ToLine
#Convert data into Rhino.Geometry.Line.
Parameters:
| data (object) | Data to convert |
| rc (ref Line) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToLine_Primary
#Performs a direct cast from OnLine or GH_Line. Data is not quaranteed to be duplicated.
ToLine_Secondary
#Attempts to convert other data types into an OnLine. Data is not quaranteed to be duplicated.
ToMatrix
#Convert data into Rhino.Geometry.Matrix.
Parameters:
| data (object) | Data to convert |
| rc (ref Matrix) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToMatrix_Primary
#Performs a direct cast from Matrix or GH_Matrix.
ToMatrix_Secondary
#Attempts to convert other data types into a Matrix. Data is not quaranteed to be duplicated.
ToMesh
#Convert data into Rhino.Geometry.Mesh.
Parameters:
| data (object) | Data to convert |
| rc (ref Mesh) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToMesh_Primary
#Performs a direct cast from Rhino.Geometry.Mesh or GH_Mesh. Data is not guaranteed to be duplicated.
ToMesh_Secondary
#Attempts to convert other data types into an OnMesh. Data is not quaranteed to be duplicated.
ToNextPowerOfTen
#Round a number upwards to the nearest power of ten.
Parameters:
| num (double) | Number to round. |
Returns: The power of ten equal to or higher than num.
ToPlane
#Convert data into Rhino.Geometry.Plane.
Parameters:
| data (object) | Data to convert |
| rc (ref Plane) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToPlane_Primary
#Performs a direct cast from OnPlane or GH_Plane. Data is not quaranteed to be duplicated.
ToPlane_Secondary
#Attempts to convert other data types into an OnPlane. Data is not quaranteed to be duplicated.
ToPlural
#Apply english rules to convert a noun into its plural form. This algorithm is not water-tight as it will not handle any irregular cases.
Parameters:
| singular (string) | Singular form of noun. |
Returns: Plural form of noun.
ToPoint
#public static Point ToPoint(PointF in)
Convert a floating point GDI point structure to an integer rounded point.
Parameters:
| in (PointF) | PointF to convert. |
Returns: Integer accuracy point.
ToPoint3d
#Convert data into Rhino.Geometry.Point3d.
Parameters:
| data (object) | Data to convert |
| rc (ref Point3d) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToPoint3d_Primary
#Performs a direct cast from On3dPoint or GH_Point. Data is not quaranteed to be duplicated.
ToPoint3d_Secondary
#Attempts to convert other data types into an Point. Data is not quaranteed to be duplicated.
ToPointCloud
#Convert data into Rhino.Geometry.PointCloud.
Parameters:
| data (object) | Data to convert |
| rc (ref PointCloud) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToPointCloud_Primary
#Performs a direct cast from Rhino.Geometry.PointCloud or GH_PointCloud. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref PointCloud) | Result of conversion |
Returns: A PointCloud instance if successful, or Nothing on failure.
ToPointCloud_Secondary
#Attempts to convert other data types into an Rhino.Geometry.PointCloud. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref PointCloud) |
Returns: An Rhino.Geometry.PointCloud instance if successful, or Nothing on failure.
ToPointF
#Convert a Rhino SDK point structure to a GDI point structure.
Parameters:
| in (Point3d) | Point3d to convert. |
Returns: Floating point accuracy GDI point.
ToPrevPowerOfTen
#Round a number downwards to the nearest power of ten.
Parameters:
| num (double) | Number to round. |
Returns: The power of ten equal to or less than num.
ToRectangle
#Convert a floating point GDI rectangle structure to an integer rounded rectangle. Use this method for any and all GUI conversions as the specific rounding scheme used here avoids pixel jitter.
Parameters:
| in (RectangleF) | RectangleF to convert. |
Returns: Integer accuracy rectangle.
ToRectangle3d
#Convert data into Rhino.Geometry.Line.
Parameters:
| data (object) | Data to convert |
| rc (ref Rectangle3d) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToRectangle3d_Primary
#Performs a direct cast from Rectangle3d or GH_Rectangle. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref Rectangle3d) |
Returns: A Rectangle3d instance if successful, or Nothing on failure.
ToRectangle3d_Secondary
#Attempts to convert other data types into a Rectangle3d. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref Rectangle3d) |
Returns: A Rectangle3d instance if successful, or Nothing on failure.
ToRelativePath
#obsoleteDo not use this method, it is lame
Create a relative path from two absolute paths.
Parameters:
| anchor_path (string) | Anchor path, the relative path result will be based on this location. Must be absolute. |
| target_path (string) | Target path, this is the path that will be converted. Must be absolute and must have the same root as the Anchor. |
Returns: The relative path on success or null on failure.
Exceptions:
| ArgumentNullException | Thrown if anchor_path is a null reference. |
| ArgumentNullException | Thrown if target_path is a null reference. |
ToSafeRhinoCommonObject
#Convert RhinoCommon types that are dangerous to use out of context (BrepFace, BrepEdge, etc.) into safe types (Brep, Curve, etc.).
Parameters:
| data (object) | Data to convert. |
Returns: Safe data.
ToSHA_Hash
#Create a SHA hash. The hash algorithm is only guaranteed to yield the same results from within a unique application domain.
Parameters:
| data (byte[]) | Data to hash. |
Returns: A guid representing the (partial) SHA hash.
ToSHA_Hash
#Create a SHA hash. The hash algorithm is only guaranteed to yield the same results from within a unique application domain.
Parameters:
| data (Stream) | Data to hash. |
Returns: A guid representing the (partial) SHA hash.
ToSize
#public static Size ToSize(SizeF in)
Convert a floating point GDI size structure to an integer rounded size.
Parameters:
| in (SizeF) | SizeF to convert. |
Returns: Integer accuracy size.
ToString
#Convert data into Colors.
Parameters:
| data (object) | Data to convert |
| destination (ref string) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToString_Primary
#Performs a direct cast from String and GH_String.
ToString_Secondary
#Creates a String representation of an object by calling the ToString() function.
ToSubD
#Convert data into Rhino.Geometry.SubD.
Parameters:
| data (object) | Data to convert |
| rc (ref SubD) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToSubD_Primary
#Performs a direct cast from OnSubD or GH_SubD. Data is not quaranteed to be duplicated.
ToSubD_Secondary
#Attempts to convert other data types into a Sub-D. Data is not quaranteed to be duplicated.
ToSurface
#Convert data into Rhino.Geometry.Surface.
Parameters:
| data (object) | Data to convert |
| rc (ref Surface) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToSurface_Primary
#Performs a direct cast from OnSurface or GH_Surface. Data is not quaranteed to be duplicated. If data is of type GH_Surface, then trim curves are ignored.
ToSurface_Secondary
#Attempts to convert other data types into an IOnSurface. Data is not quaranteed to be duplicated.
ToTextDot
#Convert data into Rhino.Geometry.TextDot.
Parameters:
| data (object) | Data to convert |
| rc (ref TextDot) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToTextDot_Primary
#Performs a direct cast from Rhino.Geometry.TextDot or GH_TextDot. Data is not guaranteed to be duplicated.
ToTextDot_Secondary
#Attempts to convert other data types into an Rhino.Geometry.TextDot. Data is not quaranteed to be duplicated.
ToTextEntity
#Convert data into Rhino.Geometry.TextEntity.
Parameters:
| data (object) | Data to convert |
| rc (ref TextEntity) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToTextEntity_Primary
#Performs a direct cast from Rhino.Geometry.TextEntity or GH_TextEntity. Data is not guaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref TextEntity) | Result of conversion |
Returns: A TextEntity instance if successful, or Nothing on failure.
ToTextEntity_Secondary
#Attempts to convert other data types into an Rhino.Geometry.TextEntity. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref TextEntity) |
Returns: An Rhino.Geometry.TextEntity instance if successful, or Nothing on failure.
ToUVInterval
#Convert data into Grasshopper.Kernel.Types.UVInterval.
Parameters:
| data (object) | Data to convert |
| rc (ref UVInterval) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToUVInterval_Primary
#Performs a direct cast from UVInterval or GH_Interval2D.
Parameters:
| data (object) | Data to convert |
| rc (ref UVInterval) | [out] Interval cast. |
Returns: True on success, false on failure.
ToUVInterval_Secondary
#Attempts to convert other data types into a UVInterval. Data is not quaranteed to be duplicated.
Parameters:
| data (object) | Data to convert |
| rc (ref UVInterval) | [out] Interval cast. |
Returns: True on success, false on failure.
ToVariableName
#Extract the implied variable name from a compound string. A string is considered compound if it contains a parenthesis pair with at least one character within the brackets.
Parameters:
| compound (string) | String to parse. |
Returns: The variable name as extracted or the original compound if no name was implied.
ToVariant
#Convert an object to a Grasshopper Expression Variant if possible.
Parameters:
| value (object) | Data to convert. |
Returns: An expression variant that matches the input best or a VAR_Null instance.
ToVector3d
#Convert data into Rhino.Geometry.Vector3d.
Parameters:
| data (object) | Data to convert |
| rc (ref Vector3d) | |
| conversion_level (GH_Conversion) | Level of conversion. |
ToVector3d_Primary
#Performs a direct cast from On3dVector or GH_Vector. Data is not quaranteed to be duplicated.