grasshopper2 Rhinorhino3d.com
TopicType Reference
X → Vector Conversions

This topic provides a reference table for all automatic type conversions to vector, sorted by merit.

Direct Conversions

This section lists all direct Direct conversions to the vector type. A direct conversion indicates a relation between very related types. Though note that even these conversions can fail due to out-of-bounds issues, or they may narrow due to reduction. Examples in this category include conversions from circles to curves, or from integers to numbers.

From Explanation
complex number Maps real and imaginary components to X and Y vector components.
point2 Converts the point coordinates into vector components.
point3 Converts the point coordinates into vector components.

Fair Conversions

This section lists all fair Fair conversions to the vector type. A fair conversion indicates the types involved are closely related in a data layout sense, though not necessarily in a conceptual sense. Although these conversions may fail or narrow, it is nevertheless considered decent practice to rely upon them. Examples in this category include conversions from booleans to integers, or from curves to intervals.

From Explanation
B-Rep Extracts the normal vector of a flat, single-face polysurface.
curve Straight curves yield their direction and length, planar curves their normal vector.
ITuple Convert coordinate tuples to vectors.
line Creates a vector from the line's direction and length.
mesh Extracts the normal vector of a flat mesh.
plane Extracts the Z-axis direction vector of the plane.
polyline Linear polylines yield tangent vectors, planar polylines yield normal vectors.
rectangle Extracts the normal vector of the rectangle plane.
surface Extracts the normal vector of a flat surface.
triangle Extracts the normal vector of the triangle plane.
view Get the camera direction of the view.

Plausible Conversions

This section lists all plausible Plausible conversions to the vector type. A plausible conversion indicates a non-straightforward, but still a reasonable conversion between two types sharing a salient quality, or where one is an obvious sub-type of the other. Any plausible conversion can also be achieved through the explicit use of standard components. Examples in this category include conversions from points to planes, or from boxes to rectangles.

From Explanation
angle Creates a counter-clockwise vector in XY plane at the specified angle.
integer Creates a vertical vector whose signed magnitude equals the number.
integer (big) Creates a vertical vector whose signed magnitude equals the number.
number Creates a vertical vector whose signed magnitude equals the number.

Strange Conversions

This section lists all strange Strange conversions to the vector type. A strange conversion indicates a peculiar, but occasionally sensible, translation between types. However, it is equally likely that the conversion was not intended and thus signals a mistake in the algorithm design, which is why this conversion level is the default for showing conversion warnings. Examples in this category include the conversion from decimal numbers to languages, or from views to meshes. Any strange conversion can also be achieved through the explicit use of standard components.

From Explanation
arc Extracts the normal vector of the arc plane.
boolean Converts false to zero vector, true to unit Z vector.
box Extracts the normal vector of the box plane.
circle Extracts the normal vector of the circle plane.
interval Creates a vector with the interval length as Z component.
sphere Extracts the axis direction vector of the sphere.
tube Extracts the axis direction vector of the tube.