grasshopper2 Rhinorhino3d.com
TopicType Reference
X → Integer Conversions

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

Direct Conversions

This section lists all direct Direct conversions to the integer 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 Extracts and rounds the real component of a complex number.
integer (big) Converts the big integer to a standard, 32-bit integer.
number Rounds the decimal number to an integer.

Fair Conversions

This section lists all fair Fair conversions to the integer 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
angle Converts the angle value to a integral number of degrees.
arc Measures and rounds the length of the arc.
B-Rep Measures and rounds the total surface area.
boolean Converts false to zero, true to one.
box Measures and rounds the area of the box.
circle Measures and rounds the circumference of the circle.
curve Measures and rounds the length of the curve.
interval Measures and rounds the length of the interval.
line Measures and rounds the length of the line.
mesh Measures and rounds the area of the mesh.
polyline Measures and rounds the length of the polyline.
rectangle Measures and rounds the perimeter of the polyline.
sphere Measures and rounds the area of the sphere.
SubD Measures and rounds the area of the SubD.
surface Measures and rounds the area of the surface.
tree path Measures the number of elements in the path.
triangle Measures and rounds the perimeter of the triangle.
tube Measures and rounds the area of the tube.
vector Measures and rounds the length of the vector.

Plausible Conversions

This section lists all plausible Plausible conversions to the integer 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
colour Measures the luminance value as an integer.
Colour (RGB) Measures the luminance value as an integer.

Strange Conversions

This section lists all strange Strange conversions to the integer 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
point2 Measures and rounds the distance from the point to origin.
point3 Measures and rounds the distance from the point to origin.

Weird Conversions

This section lists all weird Weird conversions to the integer 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. No standard conversion currently falls into this category.

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