Skip to main content

Parts

Parts are objects with a name that can be included in other objects. The can be compared to functions in programming langanges. Like functions, parts can have zero or more parameters. The shape below is a simple example of chair that has no parameters. When the design is completed the name is set to Chair and you go back to the main gallery by clicking on <.

The Table part has two parameters: one for the width and one for the lenght of the table. To define a parameter drag the statement from the variables menu. The parameter has a name and a default value. To use the variable for setting the dimension of the block, the default number is replaced by a variable. You can click on the number field in a block and drag to the bin or press delete. To insert the variable drag the statement from the variables menu and change the name, or copy-paste the variable from the variable statement that is already included.

The part below shows a conference table set with chairs. The part has one parameter: the number of chairs. It also includes the Table and Chair object. You can include these objects by dragging the statement Part from the objects menu. In the part statement select the name of the object. If the object has parameters they will automatically be appended to the statement. For example, the part Table shows two extra fields for width and length. For the width we set a constant value and for the length we insert an expression that calculates the length based on the number of chairs. You can find these expressions under the math section. The set of table and chairs is saved as Conference table.

The new Conference table part with parameter number of chairs can now be used in another object. We first create an array of three sets with two chairs and then a separate long table with 14 chairs, rotated 90 degrees. This example shows how parts can include other parts.