Door Grasshopper Styles Tutorial

Comparison between the Grasshopper door on the left and the VisualARQ door on the right.

In this tutorial a parametric door style from a Grasshopper definition will be created. Both doors and windows follow the same principles, that’s why everything on this door style tutorial is valid for a window style.

The 3 main steps to follow are the same as in any other Grasshopper style:

  1. Grasshopper definition setup
  2. Create the VisualARQ door style
  3. Insert and edit a VisualARQ door created from a Grasshopper style

1. Grasshopper definition setup

You can download the complete Grasshopper file clicking here.

Type Grasshopper in the Rhino Command line to launch Grasshopper.

2 important things to take into account when creating the Grasshopper definition of a door or a window, in order to align it properly to the host wall later on:

  • The opening panel must be aligned with the XZ plane.
  • The middle bottom point of the opening profile must be placed in the (0,0,0) coordinates.

  1. Input parameters components:

    They define the values of the resulting door style. These are the different parameters we can find in this definition:

    • Numeric value (floating point): Used to get the thickness of the host wall. By setting the name of the slider to %<>% it will get automatically the value once converted to a VisualARQ style. This is useful for objects hosted in walls like doors and windows.
    • Numeric value (floating point): Used for the various dimensions of the door. Depending on the GH definition there will be more or less of them.
    • Numeric value (floating point): Used to specify the aperture of the door panel. It should go from 0 to 1 to be successfully converted later to a percentage value from 0% to 100%.
    • Value list: Corresponds to two integers (0 and 1) and is used to specify the opening side of the door.
  2. Output components:

    They are the “ending” components. They need to be Geometry Params that are no further connected to any other components. They will be read by VisualARQ as the different parts of the door style. In this example there are three Geometry Params:

    • Two Brep Params, one for the panel and another one for the guide.
    • One Curve Param that corresponds to the opening profile curve. This one will determine the shape of the hole that the door will perform on the wall. The middle bottom point of this opening profile curve must be located in the (0,0,0) coordinates. That output curve is only necessary when the bounding box of the output breps doesn’t correspond with the hole in the wall, like in this case.

The complete Grasshopper definition is shown in the image below:

The door Grasshopper style definition. On the left the various input parameters and on the right the geometry components as output.

The Grasshopper definition that generates the door.

2. Create the VisualARQ door style

In this case the Grasshopper style will be created and managed from the Door Styles Properties dialog.

2.1: Create the new style

Assuming the Grasshopper definition (.gh file) is already done, open the door styles dialog: _vaDoorStyles.

Click on the New… button and select the Grasshopper style option.

The door styles dialog with the "Grasshopper style" option visible after clicking on the "New..." button.

The Grasshopper Style wizard will appear. This wizard will guide you through the steps to define the door Grasshopper style parameters. The left side of the wizard will show a preview of the object style generated as soon as the required information is completed.

2.2: Open the Grasshopper definition

Click on the Browse button to select the .gh file created before.

First step of the Door Grasshopper Style Wizard. In this step the Grasshopper file is selected.

2.3: Configuration

Set the Door Grasshopper style global values:

  • Style name: set the desired name.
  • Definition units: in this case the Grasshopper definition has been prepared in millimeters.
  • Opening profile: an input curve parameter component representing the closed curve that will be used to create the opening on the wall. If no curve is selected then the bounding box of the door will be used to create the hole, which in this case wouldn’t work.
Second step of the Door Grasshopper Style Wizard. In this step the name, the units and the opening profile curve from the Grasshopper file are selected.

2.4: Geometry

Specify which of the output geometry components to import into VisualARQ. The identifiers of these elements are taken from the names of the output components in the Grasshopper definition and can be modified only once the style has been created.

Each component can be assigned to a different representation:

  • Model: the object representation in 3D.
  • Plan: the object representation in plan view. Visible when the Cut Plane of the level where the object is placed is enabled and intersects the element.

In this case there are two geometry outputs that correspond to the Model representation. The Plan representation will be taken from the horizontal section of the 3D elements according to the level’s cut plane height.

Third step of the Door Grasshopper Style Wizard. In this step the geometry to be displayed and its representation is chosen.

2.5: Parameters

This step shows the settings available for the list of input parameters that define the door style. The “Filter by” dropdown can be used to view individually each of the named groups of input parameters that were created in the Grasshopper file. The settings available for each of the inputs are:

Name: is the identifier of the parameter and can be modified if desired in this step.

Editable by:

  • Definition: the parameter will be hidden in the VisualARQ style and properties dialog.
  • Style: the parameter can be edited by style, so the changes will apply to all elements with that style.
  • Object: in this case this option will be selected so the parameters can be edited separately for each element with that style in the model. In case no value is provided by object the one defined by style will be used.

You can change the settings of different parameters at the same time by selecting them while holding the Ctrl key.

Fourth step of the Door Grasshopper Style Wizard. In this step one of the settings is the "Editable by", which has a dropdown with three options (definition, style and object).

Default (value): shows the default value for the parameters (the ones specified in the Grasshopper definition) and lets you set different default values.

Type: shows the different types of values available for each kind of parameter. In this case most of them are floating point values that automatically have been set to Length. There is also a value list for the opening side which has been set to an Integer value since it corresponds to 0 or 1. The only one that needs to be changed is the Aperture input, which should be set to Percentage to get the corresponding value between 0% and 100%. In the Grasshopper definition a floating point number (a decimal) input parameter between 0 and 1 should have been set to get this conversion successfully.

Fourth step of the Door Grasshopper Style Wizard. In this step one of the settings is the "Type", which allow to set the corresponding value type for each of the parameters.

3. Insert and edit a VisualARQ door created from the Grasshopper Door Style

3.1 Edit the door style

Once the Grasshopper style wizard is completed, the new style will appear in the door styles list with its corresponding subcomponents (Guide and Panel). To edit the style again, right-click on the style name to open the context menu and select Edit. This operation will open the Grasshopper style wizard again. The parameters will be available under the “Parameters” tab and will appear grouped as in the Grasshopper definition. In case the name of the group matches an existing category they will appear combined.

The door styles dialog with the new door style. When it is selected the parameters appear under the "Parameters" section grouped as in the Grasshopper definition.

3.2 Insert the Grasshopper style

Once the door style is created, you will be able to insert an instance in the document and it will create a hole on the host wall as any other door. You will be able to change the values of its parameters from the VisualARQ door icon located under the Properties panel. Only those input parameters that were set as editable “by Object” in the step 2.5 will be visible.

Example of a door with the new style. The two input parameters appear in the Properties panel since they have been set as editable by object.