ITypeAssistant<T>
ReferencesNothing matches.
Base interface for type assistants. Do not implement this interface from scratch, instead inherit from TypeAssistant<T>.
Type parameters:
| T | Actual type to assist. |
Properties
Constructors
Enumerate all defined constructors for this type.
IsReimplementation
Gets whether or not this assistant is a type-safe re-implementation of a more generic assistant.
Name
Gets the (singular) name of this type as meant for human consumption. I.e. "point", "number", "boolean", etc.
ReimplementationBase
Gets the base assistant (if any) this assistant is a re-implementation of.
ZupportsArea
Gets whether this type assistant has support for Area metrics.
ZupportsAreaCentroid
Gets whether this type assistant has support for Area centroid metrics.
ZupportsBake
Gets whether this type assistant supports conversion to Rhino compliant shapes.
ZupportsBoundingBox
Gets whether this type assistant has support for bounding boxes.
ZupportsClosestPoint
Gets whether this type assistant has support for closest point resolution.
ZupportsDeform
Gets whether this type assistant has support for non-linear deformations.
ZupportsDraw
Gets whether this type assistant has support for geometry displays.
ZupportsFurthestPoint
Gets whether this type assistant has support for furthest point resolution.
ZupportsLength
Gets whether this type assistant has support for Length metrics.
ZupportsLink
Gets whether this type assistant has support for geometry referencing.
ZupportsPick
Gets whether the assistants supports UI for specifying new values.
ZupportsReadWrite
Gets whether this assistant supports (de)serializing instances of T.
ZupportsRoundTripping
Gets whether this assistant supports round-tripping from T to string to T. For this to be true, both ITypeAssistant.Format(object) and ITypeAssistant.Parse(string, string, IPear) must be implemented.
ZupportsTransform
Gets whether this type assistant has support for linear transformations.
ZupportsTransformBox
Gets whether this type assistant has support for transform aligned bounding boxes.
ZupportsVolume
Gets whether this type assistant has support for Volume metrics.
ZupportsVolumeCentroid
Gets whether this type assistant has support for Volume centroid metrics.
Methods
Area
#Measure the area of an instance.
Parameters:
| instance (T) | Instance to measure. |
| area (out double) | Measured area. |
Returns: Success or failure.
AreaCentroid
Measure the area of an instance.
AreaCentroid
#Measure the area of an instance.
BoundingBox
Gets the world aligned boundingbox for an instance.
Parameters:
| instance (object) | Instance to measure. |
Returns: BoundingBox.
BoundingBox
#Gets the world aligned boundingbox for an instance.
Parameters:
| instance (T) | Instance to measure. |
Returns: BoundingBox.
ClosestPoint
Gets the point on an instance closest to a locus point.
ClosestPoint
#Gets the point on an instance closest to a locus point.
Parameters:
| instance (object) | Instance to duplicate. |
Returns: Duplicate.
Copy
#T Copy(T instance)
Create an exact duplicate of an instance.
Parameters:
| instance (T) | Instance to duplicate. |
Returns: Duplicate.
Parameters:
| instance (object) | Instance to morph. |
| morph (SpaceMorph) | Morping class. |
Returns: Morphed object.
Deform
#Morph an instance of T.
Parameters:
| instance (T) | Instance to morph. |
| morph (SpaceMorph) | Morping class. |
Returns: Morphed object.
DescribePrimary
Give the primary description of a value. This does not need to yield a parsable string, the results are meant only for human consumption.
Parameters:
| pear (IPear) | Pear to describe. |
DescribePrimary
#Give the primary description of a value. This does not need to yield a parsable string, the results are meant only for human consumption.
Parameters:
| pear (Pear<T>) | Pear to describe. |
DescribeSecondary
Give the secondary description of a value. The secondary description may elaborate on the value. This method may always return null.
Parameters:
| pear (IPear) | Pear th describe. |
DescribeSecondary
#Give the secondary description of a value. The secondary description may elaborate on the value. This method may always return null.
Parameters:
| pear (Pear<T>) | Pear th describe. |
Parameters:
| pear (IPear) | (value, meta) pear to display. |
| bag (DisplayBag) | Bag to populate. |
Draw
#Add a shape to a display bag.
Parameters:
| pear (Pear<T>) | (value, meta) pear to display. |
| bag (DisplayBag) | Bag to populate. |
Parameters:
| instance (object) | Instance to format. |
Format
#Format an instance so that it yields parsable text.
Parameters:
| instance (T) | Instance to format. |
FurthestPoint
Gets the point on an instance furthest away from a locus point.
FurthestPoint
#Gets the point on an instance furthest away from a locus point.
Hash
Hash an instance of the object. The default implementation calls GetHash() on the instance.
Parameters:
| instance (object) |
Length
#Measure the length of an instance.
Parameters:
| instance (T) | Instance to measure. |
| length (out double) | Measured length. |
Returns: Success or failure.
Link
Update a pear which contains reference meta data.
Parameters:
| existing (IPear) | Pear with referencing meta data. |
| relinked (out IPear) | The updated copy if the result is LinkResult.Relinked, otherwise the existing pear. |
| document (RhinoDoc) | Rhino document to search. |
Returns: Whether the pear was relinked, was unchanged, or could not be relinked.
Link
#Update a pear which contains reference meta data.
Parameters:
| existing (Pear<T>) | Pear with referencing meta data. |
| relinked (out IPear) | The updated copy if the result is LinkResult.Relinked, otherwise the existing pear. |
| document (RhinoDoc) | Rhino document to search. |
Returns: Whether the pear was relinked, was unchanged, or could not be relinked.
ModifyBakeAttributes
By overriding this method, the type implementor may add modifications to the attributes of objects baked to Rhino files. For example, vectors when baked require an arrowhead to be set at the curve end, and this must be specified via the object attributes.
Parameters:
| pear (IPear) | The pear associated with the attributes. |
| file (File3dm) | The Rhino 3dm file into which the geometry will be baked. |
| initial (ObjectAttributes) | The attributes to be used. |
Returns: Modified attributes.
ModifyBakeAttributes
By overriding this method, the type implementor may add modifications to the attributes of objects baked to Rhino documents. For example, vectors when baked require an arrowhead to be set at the curve end, and this must be specified via the object attributes.
Parameters:
| pear (IPear) | The pear associated with the attributes. |
| document (RhinoDoc) | The Rhino document into which the geometry will be baked. |
| initial (ObjectAttributes) | The attributes to be used. |
Returns: Modified attributes.
ModifyBakeAttributes
#By overriding this method the type implementor may add modifications to the attributes of objects baked via the ToGeometry(Pear<T>) implementation. For example, vectors when baked require an arrowhead to be set at the curve end, and this must be specified via the object attributes.
Parameters:
| pear (Pear<T>) | The pear associated with the attributes. |
| document (RhinoDoc) | The Rhino document into which the geometry will be baked. |
| initial (ObjectAttributes) | The attributes to be used. |
Returns: Modified attributes.
Parse
Parse a text representation with an optional pre-existing value.
Parse
#Parse a text representation with an optional pre-existing value.
Pick
Ask the user to specify (or pick) a new value. When this method is invoked, it is assumed that it will start a RhinoGet operation or otherwise pop some kind of UI on the screen.
Pick
#Ask the user to specify (or pick) a new value. When this method is invoked, it is assumed that it will start a RhinoGet operation or otherwise pop some kind of modal UI onto the screen.
Read
Read an instance from a GrasshopperIO archive.
Read
#Read an instance from a GrasshopperIO archive.
Parameters:
| pear (IPear) | (value, meta) pear to display. |
Returns: Display proxy.
Show
#Create a Grasshopper display proxy.
Parameters:
| pear (Pear<T>) | (value, meta) pear to display. |
Returns: Display proxy.
Parameters:
| instance (object) | Instance. |
Returns: True if the instance is valid, false if otherwise.
Test
#Determine the validity of an instance.
Parameters:
| instance (T) | Instance. |
| invalidReason (out string) | If the instance is not valid, the problem description will be returned here. |
Returns: True if the instance is valid, false if otherwise.
Test
#Determine the validity of an instance.
Parameters:
| instance (T) | Instance. |
Returns: True if the instance is valid, false if otherwise.
Text
Create a Prose.Text which can function as a comparison stand-in for this value for the purposes of sorting. Particularly when it comes to sorting values of different types.
Parameters:
| instance (object) | Instance. |
Text
#Create a string which can function as a sorting key for this value.
Parameters:
| instance (T) | Instance. |
Returns: String to be used as a sorting key.
ToGeometry
Convert a pear into a collection of Rhino compliant geometries. This is used primarily for the standard baking of geometric data.
Parameters:
| pear (IPear) | Pear to convert. |
Returns: A collection of zero or more Rhino document compliant shapes.
ToGeometry
#Convert a pear into a collection of Rhino compliant geometries. This is used primarily for the standard baking of geometric data.
Parameters:
| pear (Pear<T>) | Pear to convert. |
Returns: A collection of zero or more Rhino document compliant shapes.
Transform
#Transform an instance of T.
Parameters:
| instance (T) | Instance to transform. |
| matrix (Transform) | Transformation matrix. |
Returns: Transformed object.
TransformBox
Gets the transformation aligned boundingbox for an instance.
TransformBox
#Gets the transformation aligned boundingbox for an instance.
Parameters:
| instance (T) | |
| transformation (Transform) |
Returns: BoundingBox.
Volume
#Measure the volume of an instance.
Parameters:
| instance (T) | Instance to measure. |
| volume (out double) | Measured volume. |
Returns: Success or failure.
VolumeCentroid
Measure the volume of an instance.
VolumeCentroid
#Measure the volume of an instance.
Write
Write an instance to a GrasshopperIO archive.
Write
#Write an instance to a GrasshopperIO archive.