Click or drag to resize

GH_Convert Methods

The GH_Convert type exposes the following members.

Methods
  NameDescription
Public methodStatic memberBackSolveExpression
Try and backsolve an expression
Public methodStatic memberByteArrayToCommonObjectT
Convert an OpenNurbs compliant compressed byte array into a RhinoCommon object.
Public methodStatic memberCombineDateAndTime
Combine a pure date and a pure time.
Public methodStatic memberCommonObjectToByteArray
Convert a RhinoCommon object into a compressed byte-array using safe Rhino 5.0 OpenNurbs serialization.
Public methodStatic memberCreatePureDate
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.
Public methodStatic memberCreatePureTime(DateTime)
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.
Public methodStatic memberCreatePureTime(Int32, Int32, Int32)
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.
Public methodStatic memberFileToHash
Create a hash of a file.
Public methodStatic memberFindRhinoObjectByNameAndType
Search the current Rhino document for an object with a given name of a given type.
Public methodStatic memberGeometryToObjRef
Create an ObjRef for a referenced IGH_GeometricGoo. Unreferenced IGH_GeometryGoo will return null
Public methodStatic memberGetBrepFromDocument
Harvest a brep object from a Rhino document.
Public methodStatic memberGetClippingPlaneFromDocument
Harvest a clipping plane surface from a Rhino document.
Public methodStatic memberGetCurveFromDocument
Harvest a curve object from a Rhino document.
Public methodStatic memberGetMeshFromDocument
Harvest a mesh object from a Rhino document.
Public methodStatic memberGetPointFromDocument
Harvest a point object from a Rhino document.
Public methodStatic memberGetSubDFromDocument
Harvest a sub-d object from a Rhino document.
Public methodStatic memberGetSurfaceFromDocument
Harvest a surface object from a Rhino document.
Public methodStatic memberGetTimeKind(DateTime)
Gets the kind of time implied by a System.DateTime value.
Public methodStatic memberGetTimeKind(DateTime, DateTime)
Gets the kind of time implied by two System.DateTime values.
Public methodStatic memberIsPureDate
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.
Public methodStatic memberIsPureTime
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.
Public methodStatic memberObjRefToGeometry
Convert a Rhino Object Reference into Grasshopper IGH_GeometricGoo.
Public methodStatic memberParseExpression
Attempts to parse an expression.
Public methodStatic memberStringToDate
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.
Public methodStatic memberStringToGuid
Create a Guid based on SHA256 hashing of a string.
Public methodStatic memberStringToTime
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.
Public methodStatic memberToArc
Convert data into Rhino.Geometry.Arc.
Public methodStatic memberToArc_Primary
Performs a direct cast from OnArc or GH_Arc. Data is not quaranteed to be duplicated.
Public methodStatic memberToArc_Secondary
Attempts to convert other data types into an OnArc. Data is not quaranteed to be duplicated.
Public methodStatic memberToBoolean
Convert data into Booleans.
Public methodStatic memberToBoolean_Primary
Performs a direct cast from boolean or GH_Boolean.
Public methodStatic memberToBoolean_Secondary
Performs indirect casts from other data types into booleans.
Public methodStatic memberToBoundingBox_Primary
Performs a direct cast from OnBoundingBox. Data is not quaranteed to be duplicated.
Public methodStatic memberToBox_Primary
Performs a direct cast from Box. Data is not quaranteed to be duplicated.
Public methodStatic memberToBrep
Convert data into Rhino.Geometry.Brep.
Public methodStatic memberToBrep_Primary
Performs a direct cast from OnBrep or GH_Brep. Data is not quaranteed to be duplicated.
Public methodStatic memberToBrep_Secondary
Attempts to convert other data types into an OnBrep. Data is not quaranteed to be duplicated.
Public methodStatic memberToCircle
Convert data into Rhino.Geometry.Circle.
Public methodStatic memberToCircle_Primary
Performs a direct cast from OnCircle or GH_Circle. Data is not quaranteed to be duplicated.
Public methodStatic memberToCircle_Secondary
Attempts to convert other data types into an OnCircle. Data is not quaranteed to be duplicated.
Public methodStatic memberToColor
Convert data into Colors.
Public methodStatic memberToColor_Primary
Performs a direct cast from Drawing.Color, GH_Color and OnColor.
Public methodStatic memberToColor_Secondary
Performs indirect casts from other data types into Colors.
Public methodStatic memberToComplex
Convert data into Complex.
Public methodStatic memberToComplex_Primary
Performs a direct cast from Complex or GH_ComplexNumber
Public methodStatic memberToComplex_Secondary
Performs indirect casts from other data types into Complex.
Public methodStatic memberToCoordinates
Public methodStatic memberToCulture
Convert data into Colors.
Public methodStatic memberToCulture_Primary
Performs a direct cast from System.Globalization.CultureInfo and GH_Culture.
Public methodStatic memberToCulture_Secondary
Performs indirect casts from other data types into CultureInfo.
Public methodStatic memberToCurve
Convert data into Rhino.Geometry.Curve.
Public methodStatic memberToCurve_Primary
Performs a direct cast from OnCurve or GH_Curve. Data is not quaranteed to be duplicated.
Public methodStatic memberToCurve_Secondary
Attempts to convert other data types into an IOnCurve. Data is not quaranteed to be duplicated.
Public methodStatic memberToDate
Convert data into Dates.
Public methodStatic memberToDate_Primary
Performs a direct cast from DateTime or GH_DateTime.
Public methodStatic memberToDate_Secondary
Performs indirect casts from other data types into DateTime constructs.
Public methodStatic memberToDouble
Convert data into Doubles.
Public methodStatic memberToDouble_Primary
Performs a direct cast from Double or GH_Number.
Public methodStatic memberToDouble_Secondary
Performs indirect casts from other data types into Doubles.
Public methodStatic memberToGeometricGoo
Converts an object into GeometricGoo. Does not duplicate the data if a lossless conversion is possible.
Public methodStatic memberToGeometryBase
Attempt to convert an object into a Rhino.Geometry.GeometryBase instance.
Public methodStatic memberToGHArc
Convert data into GH_Arcs.
Public methodStatic memberToGHArc_Primary
Converts similar data into a GH_Arc instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHArc_Secondary
Converts similar data into a GH_Arc instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBoolean
Convert data into GH_Boolean.
Public methodStatic memberToGHBoolean_Primary
Converts similar data into a GH_Boolean instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBoolean_Secondary
Converts similar data into a GH_Boolean instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBox
Convert data into GH_Boxes.
Public methodStatic memberToGHBox_Primary
Converts similar data into a GH_Box instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBox_Secondary
Converts similar data into a GH_Box instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBrep
Convert data into GH_Breps.
Public methodStatic memberToGHBrep_Primary
Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHBrep_Secondary
Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHCircle
Convert data into GH_Circles.
Public methodStatic memberToGHCircle_Primary
Converts similar data into a GH_Circle instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHCircle_Secondary
Converts similar data into a GH_Circle instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHColour
Convert data into GH_Colour.
Public methodStatic memberToGHColour_Primary
Converts similar data into a GH_Colour instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHColour_Secondary
Converts similar data into a GH_Colour instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHComplexNumber
Convert data into GH_ComplexNumber.
Public methodStatic memberToGHComplexNumber_Primary
Converts similar data into a GH_ComplexNumber instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHComplexNumber_Secondary
Converts similar data into a GH_ComplexNumber instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHCurve
Convert data into GH_Curves.
Public methodStatic memberToGHCurve_Primary
Converts similar data into a GH_Curve instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHCurve_Secondary
Converts similar data into a GH_Curve instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHGuid
Convert data into GH_Guid.
Public methodStatic memberToGHGuid_Primary
Converts similar data into a GH_Guid instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHGuid_Secondary
Converts similar data into a GH_Guid instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInteger
Convert data into GH_Integer.
Public methodStatic memberToGHInteger_Primary
Converts similar data into a GH_Integer instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInteger_Secondary
Converts similar data into a GH_Integer instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInterval
Convert data into GH_Intervals.
Public methodStatic memberToGHInterval_Primary
Converts similar data into a GH_Interval instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInterval_Secondary
Converts similar data into a GH_Interval instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInterval2D
Convert data into GH_Interval2Ds.
Public methodStatic memberToGHInterval2D_Primary
Converts similar data into a GH_Interval2D instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHInterval2D_Secondary
Converts similar data into a GH_Interval2D instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHLine
Convert data into GH_Lines.
Public methodStatic memberToGHLine_Primary
Converts similar data into a GH_Line instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHLine_Secondary
Converts similar data into a GH_Line instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMatrix
Convert data into ToGHMatrix.
Public methodStatic memberToGHMatrix_Primary
Converts similar data into a GH_Matrix instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMatrix_Secondary
Converts similar data into a GH_Matrix instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMesh
Convert data into GH_Meshs.
Public methodStatic memberToGHMesh_Primary
Converts similar data into a GH_Mesh instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMesh_Secondary
Converts similar data into a GH_Mesh instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMeshFace
Convert data into GH_MeshFaces.
Public methodStatic memberToGHMeshFace_Primary
Converts similar data into a GH_MeshFace instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHMeshFace_Secondary
Converts similar data into a GH_MeshFace instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHNumber
Convert data into GH_Number.
Public methodStatic memberToGHNumber_Primary
Converts similar data into a GH_Number instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHNumber_Secondary
Converts similar data into a GH_Number instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHPlane
Convert data into GH_Planes.
Public methodStatic memberToGHPlane_Primary
Converts similar data into a GH_Plane instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHPlane_Secondary
Converts similar data into a GH_Plane instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHPoint
Convert data into GH_Points.
Public methodStatic memberToGHPoint_Primary
Converts similar data into a GH_Point instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHPoint_Secondary
Converts similar data into a GH_Point instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHRectangle
Convert data into GH_Rectangles.
Public methodStatic memberToGHRectangle_Primary
Converts similar data into a GH_Rectangle instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHRectangle_Secondary
Converts similar data into a GH_Rectangle instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHString
Convert data into GH_String.
Public methodStatic memberToGHString_Primary
Converts similar data into a GH_String instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHString_Secondary
Converts similar data into a GH_String instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHSubD
Convert data into GH_SubDs.
Public methodStatic memberToGHSubD_Primary
Converts similar data into a GH_SubD instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHSubD_Secondary
Converts similar data into a GH_Brep instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHSurface
Convert data into GH_Surfaces.
Public methodStatic memberToGHSurface_Primary
Converts similar data into a GH_Surface instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHSurface_Secondary
Converts similar data into a GH_Surface instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHTime
Convert data into GH_Time.
Public methodStatic memberToGHTime_Primary
Converts similar data into a GH_Time instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHTime_Secondary
Converts similar data into a GH_Time instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHVector
Convert data into GH_Vectors.
Public methodStatic memberToGHVector_Primary
Converts similar data into a GH_Vector instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGHVector_Secondary
Converts similar data into a GH_Vector instance. Data is not quaranteed to be duplicated.
Public methodStatic memberToGoo
Converts an object into Goo. Does not duplicate the data if a lossless conversion is possible.
Public methodStatic memberToGUID
Convert data into Guids.
Public methodStatic memberToGUID_Primary
Performs a direct cast from Guid, GH_Guid, String and GH_String.
Public methodStatic memberToGUID_Secondary
Performs indirect casts from other data types into Guids.
Public methodStatic memberToInt32
Convert data into Int32s.
Public methodStatic memberToInt32_Primary
Performs a direct cast from Int32 or GH_Integer.
Public methodStatic memberToInt32_Secondary
Performs indirect casts from other data types into Integers.
Public methodStatic memberToInterval
Convert data into Rhino.Geometry.Interval.
Public methodStatic memberToInterval_Primary
Performs a direct cast from OnInterval or GH_Interval.
Public methodStatic memberToInterval_Secondary
Attempts to convert other data types into an Interval. Data is not quaranteed to be duplicated.
Public methodStatic memberToLine
Convert data into Rhino.Geometry.Line.
Public methodStatic memberToLine_Primary
Performs a direct cast from OnLine or GH_Line. Data is not quaranteed to be duplicated.
Public methodStatic memberToLine_Secondary
Attempts to convert other data types into an OnLine. Data is not quaranteed to be duplicated.
Public methodStatic memberToMatrix
Convert data into Rhino.Geometry.Matrix.
Public methodStatic memberToMatrix_Primary
Performs a direct cast from Matrix or GH_Matrix.
Public methodStatic memberToMatrix_Secondary
Attempts to convert other data types into a Matrix. Data is not quaranteed to be duplicated.
Public methodStatic memberToMesh
Convert data into Rhino.Geometry.Mesh.
Public methodStatic memberToMesh_Primary
Performs a direct cast from OnMesh or GH_Mesh. Data is not quaranteed to be duplicated.
Public methodStatic memberToMesh_Secondary
Attempts to convert other data types into an OnMesh. Data is not quaranteed to be duplicated.
Public methodStatic memberToNextPowerOfTen
Round a number upwards to the nearest power of ten.
Public methodStatic memberToPlane
Convert data into Rhino.Geometry.Plane.
Public methodStatic memberToPlane_Primary
Performs a direct cast from OnPlane or GH_Plane. Data is not quaranteed to be duplicated.
Public methodStatic memberToPlane_Secondary
Attempts to convert other data types into an OnPlane. Data is not quaranteed to be duplicated.
Public methodStatic memberToPlural
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.
Public methodStatic memberToPoint
Convert a floating point GDI point structure to an integer rounded point.
Public methodStatic memberToPoint3d
Convert data into Rhino.Geometry.Point3d.
Public methodStatic memberToPoint3d_Primary
Performs a direct cast from On3dPoint or GH_Point. Data is not quaranteed to be duplicated.
Public methodStatic memberToPoint3d_Secondary
Attempts to convert other data types into an Point. Data is not quaranteed to be duplicated.
Public methodStatic memberToPointF
Convert a Rhino SDK point structure to a GDI point structure.
Public methodStatic memberToPrevPowerOfTen
Round a number downwards to the nearest power of ten.
Public methodStatic memberToRectangle
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.
Public methodStatic memberToRectangle3d
Convert data into Rhino.Geometry.Line.
Public methodStatic memberToRectangle3d_Primary
Performs a direct cast from Rectangle3d or GH_Rectangle. Data is not quaranteed to be duplicated.
Public methodStatic memberToRectangle3d_Secondary
Attempts to convert other data types into a Rectangle3d. Data is not quaranteed to be duplicated.
Public methodStatic memberToRelativePath Obsolete.
Create a relative path from two absolute paths.
Public methodStatic memberToSafeRhinoCommonObject
Convert RhinoCommon types that are dangerous to use out of context (BrepFace, BrepEdge, etc.) into safe types (Brep, Curve, etc.).
Public methodStatic memberToSHA_Hash(Byte)
Create a SHA hash. The hash algorithm is only guaranteed to yield the same results from within a unique application domain.
Public methodStatic memberToSHA_Hash(Stream)
Create a SHA hash. The hash algorithm is only guaranteed to yield the same results from within a unique application domain.
Public methodStatic memberToSize
Convert a floating point GDI size structure to an integer rounded size.
Public methodStatic memberToString
Convert data into Colors.
Public methodStatic memberToString_Primary
Performs a direct cast from String and GH_String.
Public methodStatic memberToString_Secondary
Creates a String representation of an object by calling the ToString() function.
Public methodStatic memberToSubD_Secondary
Attempts to convert other data types into a Sub-D. Data is not quaranteed to be duplicated.
Public methodStatic memberToSurface
Convert data into Rhino.Geometry.Surface.
Public methodStatic memberToSurface_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.
Public methodStatic memberToSurface_Secondary
Attempts to convert other data types into an IOnSurface. Data is not quaranteed to be duplicated.
Public methodStatic memberToUVInterval
Convert data into Grasshopper.Kernel.Types.UVInterval.
Public methodStatic memberToUVInterval_Primary
Performs a direct cast from UVInterval or GH_Interval2D.
Public methodStatic memberToUVInterval_Secondary
Attempts to convert other data types into a UVInterval. Data is not quaranteed to be duplicated.
Public methodStatic memberToVariableName
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.
Public methodStatic memberToVariant
Convert an object to a Grasshopper Expression Variant if possible.
Public methodStatic memberToVector3d
Convert data into Rhino.Geometry.Vector3d.
Public methodStatic memberToVector3d_Primary
Performs a direct cast from On3dVector or GH_Vector. Data is not quaranteed to be duplicated.
Public methodStatic memberToVector3d_Secondary
Attempts to convert other data types into a Vector. Data is not quaranteed to be duplicated.
Top
See Also