About Typing Tolerance

In xGenerative Design, every input and output parameters have a type, and most operators need to be connected to a specific type of input. To extend the input types supported by an operator, a mechanism allows to convert automatically a type to another.

This page discusses:

Types Conversion

The following table describes the conversions that can be automatically performed by the conversion mechanism.

Expected Type Accepted Equivalent Types
  • Angle
  • Integer
  • Length
  • Real
Note: To ensure consistency, the dimension unit set on real inputs is taken into account in your operations.

Therefore, output results have the same dimension unit as their inputs.

  • Angle
  • Integer
  • Length
  • Real
  • Boolean
  • Integer
  • Boolean
  • Integer

The equivalence between Boolean and Integer is bidirectional:

  • False = 1
  • True = 2

For more information, see Conversion of Boolean to Integer below.

Matrix
  • Axis System
  • Plane
Plane
  • Linear Curve
  • Planar Curve
  • Planar Surface
Vector
  • Point
  • Plane
  • Line
  • Linear Curve
  • Planar Curve (Takes the normal direction). See the example below.
  • Planar Surface (Takes the normal direction)
Line Plane

Example

The Extrude operator expects a vector input for its direction parameter (dir). Thanks to the conversion mechanism, it is possible to connect the direction parameter to a planar surface.

Conversion of Boolean to Integer

The Boolean type allows to test conditions while using the Get Item, Select, or Dispatch operators. Converting a boolean parameter to an integer parameter allows to add conditional treatment.

Using Get Item Operator

The following example illustrates the conversion of a boolean parameter to an integer parameter using the Get Item operator.

For more information, see Get Item.

Using Dispatch Operator

The following example illustrates the conversion of a boolean parameter to an integer parameter using the Dispatch operator.

For more information, see Dispatch.