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.
Returns: Success or failure.
AreaCentroid
Measure the area of an instance.
Returns: Success or failure.
BoundingBox
Gets the world aligned boundingbox for an instance.
Returns: BoundingBox.
ClosestPoint
Gets the point on an instance closest to a locus point.
Returns: Success or failure.
Returns: Duplicate.
Copy
#Create an exact duplicate of an instance.
T Copy()
T
instance
Instance to duplicate.
Returns: Duplicate.
Deform
Morph an instance of T.
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.
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.
DescribeSecondary
Give the secondary description of a value. The secondary description may elaborate on the value. This method may always return null.
DescribeSecondary
#Give the secondary description of a value. The secondary description may elaborate on the value. This method may always return null.
Draw
Add a shape to a display bag.
Format
Format an instance so that it yields parsable text.
FurthestPoint
Gets the point on an instance furthest away from a locus point.
Returns: Success or failure.
FurthestPoint
#Gets the point on an instance furthest away from a locus point.
Returns: Success or failure.
Hash
Hash an instance of the object. The default implementation calls GetHash() on the instance.
Length
Measure the length of an instance.
Returns: Success or failure.
Link
Update a pear which contains reference meta data.
LinkResult Link()
existing,
Pear with referencing meta data.
out IPear
relinked,
The updated copy if the result is LinkResult.Relinked, otherwise the existing pear.
document
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.
LinkResult Link()
existing,
Pear with referencing meta data.
out IPear
relinked,
The updated copy if the result is LinkResult.Relinked, otherwise the existing pear.
document
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.
ObjectAttributes ModifyBakeAttributes()
pear,
The pear associated with the attributes.
file,
The Rhino 3dm file into which the geometry will be baked.
initial
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.
ObjectAttributes ModifyBakeAttributes()
pear,
The pear associated with the attributes.
document,
The Rhino document into which the geometry will be baked.
initial
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.
ObjectAttributes ModifyBakeAttributes()
pear,
The pear associated with the attributes.
document,
The Rhino document into which the geometry will be baked.
initial
The attributes to be used.
Returns: Modified attributes.
Parse
Parse a text representation with an optional pre-existing value.
Returns: Result of parsing attempt.
Parse
#Parse a text representation with an optional pre-existing value.
Returns: True on success, false on failure.
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.
Returns: True if a value was picked.
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.
Returns: True if a value was picked.
Read
Read an instance from a GrasshopperIO archive.
Returns: Success or failure.
Returns: Display proxy.
Test
Determine the validity of an instance.
Returns: True if the instance is valid, false if otherwise.
Returns: True if the instance is valid, false if otherwise.
Test
#Determine the validity of an instance.
Returns: True if the instance is valid, false if otherwise.
Test
#Determine the validity of an 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.
Text
#Create a string which can function as a sorting key for this value.
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.
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.
Returns: A collection of zero or more Rhino document compliant shapes.
Transform
Transform an instance of T.
Returns: Transformed object.
TransformBox
Gets the transformation aligned boundingbox for an instance.
Returns: BoundingBox.
Volume
Measure the volume of an instance.
Returns: Success or failure.
VolumeCentroid
Measure the volume of an instance.
Returns: Success or failure.
Write
Write an instance to a GrasshopperIO archive.
Returns: Success or failure.