This topic provides a reference table for all automatic type conversions to interval, sorted by merit.
Fair Conversions
This section lists all fair
conversions to the interval 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 | Creates an interval from zero to the angle value in degrees. |
| arc | Extracts the parameter domain of the arc. |
| circle | Extracts the parameter domain of the circle. |
| curve | Extracts the parameter domain of the curve. |
| integer | Creates an interval from zero to the integer value. |
| integer (big) | Creates an interval from zero to the integer value. |
| line | Extracts the parameter domain of the line. |
| number | Creates an interval from zero to the number value. |
| polyline | Extracts the parameter domain of the polyline. |
| rectangle | Extracts the parameter domain of the rectangle. |
| triangle | Extracts the parameter domain of the triangle. |
Plausible Conversions
This section lists all plausible
conversions to the interval 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 |
|---|---|
| boolean | Converts false to empty interval, true to unit interval. |
| complex number | Creates an interval from zero to the real component. |
Strange Conversions
This section lists all strange
conversions to the interval 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 |
|---|---|
| vector | Creates an interval from zero to the vector length. |
Weird Conversions
This section lists all weird
conversions to the interval 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 |
|---|---|
| point2 | Creates an interval from zero to the point's distance from the origin. |
| point3 | Creates an interval from zero to the point's distance from the origin. |