Properties

Constructors

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

Icon

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

IsReimplementation

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

Name

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

ReimplementationBase

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

Type

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

ZupportsArea

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

ZupportsAreaCentroid

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

ZupportsBake

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

ZupportsBoundingBox

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

ZupportsClosestPoint

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

ZupportsDeform

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

ZupportsDraw

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

ZupportsFurthestPoint

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

ZupportsLength

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

ZupportsPick

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

ZupportsReadWrite

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

ZupportsRoundTripping

#
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.
bool ZupportsRoundTripping { get; }

ZupportsTransform

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

ZupportsTransformBox

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

ZupportsVolume

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

ZupportsVolumeCentroid

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

Methods

Area

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

AreaCentroid

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

BoundingBox

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

ClosestPoint

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

Copy

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

Deform

#
Morph an instance of T.
object Deform(
instance,
Instance to morph.
morph
Morping class.
)
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.
string DescribePrimary(
pear
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.
string DescribeSecondary(
pear
Pear th describe.
)

Draw

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

Format

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

FurthestPoint

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

Hash

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

Length

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

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.
)
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.
)
Modified attributes.

Parse

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

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

Read

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

Same

#
Compare two instances for equality.
bool Same()

Show

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

Sort

#
Compare the sort order of two instances.
int Sort()

Test

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

Test

#
Determine the validity of an instance.
bool Test(
instance
Instance.
)
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.
Prose.Text Text(
instance
Instance.
)

ToGeometry

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

Transform

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

TransformBox

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

Volume

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

VolumeCentroid

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

Write

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