grasshopper2 Rhinorhino3d.com
TopicType Reference
X → Number Conversions

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

Direct Conversions

This section lists all direct Direct conversions to the number type. A 'Direct' conversion indicates a relation between very related types, such as integers and numbers, or 2D and 3D points. Though note that even these conversions can fail due to out-of-bounds issues, or be narrowing due to reduction.

From Explanation
complex number Extracts the real component of a complex number.
integer Converts the integer to a decimal number.
integer (big) Converts the integer to a decimal number.

Fair Conversions

This section lists all fair Fair conversions to the number type. A 'Fair' conversion indicates the types involved are closesly related in a data layout sense, though not necessarily in a conceptual sense. For example booleans and integers, or points and vectors. Although these conversions may fail or narrow, it is nevertheless considered decent practice to rely upon them in algorithms.

From Explanation
angle Converts the angle value into a number of degrees.
arc Measures the length of the arc.
boolean Converts false to zero, true to one.
box Measures the surface area of the box.
brep Measures the surface area of the brep.
circle Measures the circumference of the circle.
curve Measures the length of the curve.
interval Measures the length of the interval.
line Measures the length of the line.
mesh Measures the surface area of the mesh.
polyline Measures the length of the polyline.
rectangle Measures the perimeter of the triangle.
sphere Measures the surface area of the sphere.
SubD Measures the surface area of the SubD.
surface Measures the surface area of the surface.
triangle Measures the perimeter of the triangle.
tube Measures the surface area of the tube.
vector Measures the length of the vector.

Plausible Conversions

This section lists all plausible Plausible conversions to the number type. A 'Plausible' conversion indicates a non-straightforward, but a still reasonable conversion between two types that share a salient quality, or where one is an obvious sub-type of the other. For example curves and intervals, or points and planes. Any plausible conversion can also be achieved through the explicit use of standard components.

From Explanation
colour Measures the luminance value of the colour.
Colour (RGB) Measures the luminance value of the colour.

Strange Conversions

This section lists all strange Strange conversions to the number 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 represents a mistake in the algorithm design, which is why this conversion level is the default for showing conversion warnings in the Grasshopper interface. Examples in this category include the conversion between colours and booleans, or between circles and triangles. Any strange conversion can also be achieved through the explicit use of standard components.

From Explanation
point2 Measures the distance from the origin to the 2D point.
point3 Measures the distance from the origin to the point.

Weird Conversions

This section lists all weird Weird conversions to the number type. A 'Weird' conversion indicates an exotic relationship between types which is almost certainly unintended on the part of the user. However, very occasionally these conversions make sense and allow the user to avoid the use of several components to achieve the same result. Examples in this category include conversions between planes and integers, or points and intervals.

From Explanation
plane Measures the distance from the world origin to the plane origin.