Properties

Constructors

#
IEnumerable<string> Constructors { get; }
Enumerate all defined constructors for this type.

Icon

#
IIcon Icon { get; }
Gets the icon associated with this type, if any.

IsReimplementation

#
bool IsReimplementation { get; }
Gets whether or not this assistant is a type-safe re-implementation of a more generic assistant.

Name

#
string Name { get; }
Gets the (singular) name of this type as meant for human consumption. I.e. "point", "number", "boolean", etc.

ReimplementationBase

#
ITypeAssistant ReimplementationBase { get; }
Gets the base assistant (if any) this assistant is a re-implementation of.

Type

#
Type Type { get; }
Gets the type associated with this assistant.

ZupportsArea

#
bool ZupportsArea { get; }
Gets whether this type assistant has support for Area metrics.

ZupportsAreaCentroid

#
bool ZupportsAreaCentroid { get; }
Gets whether this type assistant has support for Area centroid metrics.

ZupportsBake

#
bool ZupportsBake { get; }
Gets whether this type assistant supports conversion to Rhino compliant shapes.

ZupportsBoundingBox

#
bool ZupportsBoundingBox { get; }
Gets whether this type assistant has support for bounding boxes.

ZupportsClosestPoint

#
bool ZupportsClosestPoint { get; }
Gets whether this type assistant has support for closest point resolution.

ZupportsDeform

#
bool ZupportsDeform { get; }
Gets whether this type assistant has support for non-linear deformations.

ZupportsDraw

#
bool ZupportsDraw { get; }
Gets whether this type assistant has support for geometry displays.

ZupportsFurthestPoint

#
bool ZupportsFurthestPoint { get; }
Gets whether this type assistant has support for furthest point resolution.

ZupportsLength

#
bool ZupportsLength { get; }
Gets whether this type assistant has support for Length metrics.

ZupportsPick

#
bool ZupportsPick { get; }
Gets whether the assistants supports UI for specifying new values.

ZupportsReadWrite

#
bool ZupportsReadWrite { get; }
Gets whether this assistant supports (de)serializing instances of T.

ZupportsRoundTripping

#
bool ZupportsRoundTripping { get; }
Gets whether this assistant supports round-tripping from T to string to T. For this to be true, both Format(object) and Parse(string, string, IPear) must be implemented.

ZupportsTransform

#
bool ZupportsTransform { get; }
Gets whether this type assistant has support for linear transformations.

ZupportsTransformBox

#
bool ZupportsTransformBox { get; }
Gets whether this type assistant has support for transform aligned bounding boxes.

ZupportsVolume

#
bool ZupportsVolume { get; }
Gets whether this type assistant has support for Volume metrics.

ZupportsVolumeCentroid

#
bool ZupportsVolumeCentroid { get; }
Gets whether this type assistant has support for Volume centroid metrics.

Methods

Area

#
bool Area(object instance, out double area)
Measure the area of an instance.
instance (object)Instance to measure.
area (out double)Measured area.
Success or failure.

AreaCentroid

#
bool AreaCentroid(object instance, out double area, out Point3d centroid)
Measure the area of an instance.
instance (object)Instance to measure.
area (out double)Measured area.
centroid (out Point3d)Area centroid.
Success or failure.

BoundingBox

#
BoundingBox BoundingBox(object instance)
Gets the world aligned boundingbox for an instance.
instance (object)Instance to measure.
BoundingBox.

ClosestPoint

#
bool ClosestPoint(object instance, Point3d locus, out Point3d site)
Gets the point on an instance closest to a locus point.
instance (object)Instance to examine.
locus (Point3d)Locus (search) point.
site (out Point3d)Point on instance closest to locus.
Success or failure.

Copy

#
object Copy(object instance)
Create an exact duplicate of an instance.
instance (object)Instance to duplicate.
Duplicate.

Deform

#
object Deform(object instance, SpaceMorph morph)
Morph an instance of T.
instance (object)Instance to morph.
morph (SpaceMorph)Morping class.
Morphed object.

DescribePrimary

#
string DescribePrimary(IPear pear)
Give the primary description of a value. This does not need to yield a parsable string, the results are meant only for human consumption.
pear (IPear)Pear to describe.

DescribeSecondary

#
string DescribeSecondary(IPear pear)
Give the secondary description of a value. The secondary description may elaborate on the value. This method may always return null.
pear (IPear)Pear th describe.

Draw

#
void Draw(IPear pear, DisplayBag bag)
Add a shape to a display bag.
pear (IPear)(value, meta) pear to display.
bag (DisplayBag)Bag to populate.

Format

#
string Format(object instance)
Format an instance so that it yields parsable text.
instance (object)Instance to format.

FurthestPoint

#
bool FurthestPoint(object instance, Point3d locus, out Point3d site)
Gets the point on an instance furthest away from a locus point.
instance (object)Instance to examine.
locus (Point3d)Locus (search) point.
site (out Point3d)Point on instance furthest from locus.
Success or failure.

Hash

#
int Hash(object instance)
Hash an instance of the object. The default implementation calls GetHash() on the instance.
instance (object)

Length

#
bool Length(object instance, out double length)
Measure the length of an instance.
instance (object)Instance to measure.
length (out double)Measured length.
Success or failure.

ModifyBakeAttributes

#
ObjectAttributes ModifyBakeAttributes(IPear pear, File3dm file, ObjectAttributes initial)
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.
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.
Modified attributes.

ModifyBakeAttributes

#
ObjectAttributes ModifyBakeAttributes(IPear pear, RhinoDoc document, ObjectAttributes initial)
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.
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.
Modified attributes.

Parse

#
IResult Parse(string constructor, string text, IPear existing)
Parse a text representation with an optional pre-existing value.
constructor (string)Constructor code. Will be null if the source text was not part of constructor notation.
text (string)Text to parse.
existing (IPear)Pre-existing instance, or null if no such instance exists yet.
Result of parsing attempt.

Pick

#
bool Pick(IPear existing, out IPear pear)
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.
existing (IPear)Existing pear to overwrite.
pear (out IPear)Pear which was picked.
True if a value was picked.

Read

#
bool Read(IReader reader, Name location, out object instance)
Read an instance from a GrasshopperIO archive.
reader (IReader)Deserialization reader.
location (Name)Location of data. Whether the location points to an item or child node is up to the implementer to decide.
instance (out object)Deserialized instance.
Success or failure.

Same

#
bool Same(object a, object b)
Compare two instances for equality.
a (object)
b (object)

Show

#
IValueDisplay Show(IPear pear)
Create a Grasshopper display proxy.
pear (IPear)(value, meta) pear to display.
Display proxy.

Sort

#
int Sort(object a, object b)
Compare the sort order of two instances.
a (object)
b (object)

Test

#
bool Test(object instance, out string invalidReason)
Determine the validity of an instance.
instance (object)Instance.
invalidReason (out string)If the instance is not valid, the problem description will be returned here.
True if the instance is valid, false if otherwise.

Test

#
bool Test(object instance)
Determine the validity of an instance.
instance (object)Instance.
True if the instance is valid, false if otherwise.

Text

#
Prose.Text Text(object instance)
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.
instance (object)Instance.

ToGeometry

#
IEnumerable<GeometryBase> ToGeometry(IPear pear)
Convert a pear into a collection of Rhino compliant geometries. This is used primarily for the standard baking of geometric data.
pear (IPear)Pear to convert.
A collection of zero or more Rhino document compliant shapes.

Transform

#
object Transform(object instance, Transform matrix)
Transform an instance of T.
instance (object)Instance to transform.
matrix (Transform)Transformation matrix.
Transformed object.

TransformBox

#
BoundingBox TransformBox(object instance, Transform transformation)
Gets the transformation aligned boundingbox for an instance.
instance (object)
transformation (Transform)
BoundingBox.

Volume

#
bool Volume(object instance, out double volume)
Measure the volume of an instance.
instance (object)Instance to measure.
volume (out double)Measured volume.
Success or failure.

VolumeCentroid

#
bool VolumeCentroid(object instance, out double volume, out Point3d centroid)
Measure the volume of an instance.
instance (object)Instance to measure.
volume (out double)Measured volume.
centroid (out Point3d)Volume centroid.
Success or failure.

Write

#
bool Write(IWriter writer, Name location, object instance)
Write an instance to a GrasshopperIO archive.
writer (IWriter)Serialization writer.
location (Name)Location of data. Whether the location points to an item or child node is up to the implementer to decide.
instance (object)Instance to write.
Success or failure.