This topic provides a reference table for all automatic type conversions to angle, sorted by merit.
Fair Conversions
This section lists all fair
conversions to the angle 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 |
|---|---|
| complex number | Extracts the phase of the complex number as an angle in radians. |
| integer | Converts the integer to an angle in degrees. |
| integer (big) | Converts the integer to an angle in degrees. |
| number | Converts the number to an angle in degrees. |
Plausible Conversions
This section lists all plausible
conversions to the angle 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 |
|---|---|
| arc | Extracts the sweep angle of the arc in degrees. |
| circle | Extracts the sweep angle of the circle in degrees. |
| colour | Extracts the hue of the color as an angle in degrees. |
| Colour (RGB) | Extracts the hue of the color as an angle in degrees. |
| curve | Extracts angles from linear and arc-like curves. |
| line | Extracts the angle of the line's direction projected to the XY plane. |
| point2 | Measures the angle from the origin to the 2D point. |
| point3 | Measures the angle from the origin to the point's XY projection. |
| polyline | Extracts the angle of the polyline's direction projected to the XY plane. |
| vector | Measures the angle of the vector in the XY plane. |
Strange Conversions
This section lists all strange
conversions to the angle 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 |
|---|---|
| boolean | Converts false to zero degrees, true to ninety degrees. |
Weird Conversions
This section lists all weird
conversions to the angle 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 angle between the plane normal and the world Z direction. |