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 column style
  3. Insert and edit a door created from a Grasshopper style


1. Grasshopper definition setup

Prerequisites to consider when creating a Grasshopper definition for a door Grasshopper style:

  • The geometry in Grasshopper that represents the door panel must be aligned with the XZ plane. (Fig. 1)
  • The door requires an insert point, which is measured from the document origin of coordinates (0,0,0). (Fig. 2)
  • The door requires a profile curve as an output parameter to define the shape of the rough opening on the host object (wall, curtain wall, etc). If no profile curve is created, the opening will be measured from the bounding box of the geometry. In this case, the lower center point of its bounding box must be located on the origin of coordinates.
The door is aligned with the ZX plane
Fig1. The door is aligned with the XZ plane
The door insert point is taken from the Document Origin of coordinates
Fig 2. The door insert point is taken from the Document Origin of coordinates

Download the Grasshopper file used in this tutorial here.

Type Grasshopper in the Rhino Command line to launch Grasshopper.

The Grasshopper definition requires some Input parameters to define the features of the new object, and Output parameters to define the geometrical components of the final object. Some output parameters can be used to retrieve information from the object created.

  • Input parameters: These are the components that will define the features of the resulting door style. These are the different parameters we can find in this definition:
    • 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 for a linked property (floating point): Used to get the thickness of the host wall. By setting the name of the slider to %<this.host.thickness>% it will automatically get 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 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%.
    • Numeric value (integer): one slider that defines the number of pairs of objects.
    • Value list: Corresponds to two integers (0 and 1) and is used to specify the opening side of the door.
  • Output parameters: These are the components that will be read by VisualARQ once we create the style. VisualARQ only recognizes the output parameters that are ending components with their output nodes unconnected. In this example, we find the following output parameters:
    • Geometrical outputs: these are the ones that will be read as the different parts of an object 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.
    • Output parameters:  these are used to retrieve information from the object created. In this example, three Number Params tell us the guide length and the panel width and height:

It is important to name these components in Grasshopper to identify them easily when creating the new style:

The Grasshopper definition that generates the door.

2. Create the VisualARQ door style

The Grasshopper style will be created and managed from the Column Styles dialog.

2.1 Create the new style

Door styles dialog.
Door styles dialog.
  1. Assuming the Grasshopper definition (.gh file) is already done, open the column styles dialog: _vaColumnStyles command.
  2. Click on the New… button and select the Grasshopper column style option.

The Grasshopper Style wizard will appear. This wizard will guide you through the steps to define the beam 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

Open the Grasshopper definition for the new Door style
Grasshopper style wizard: open the Grasshopper definition

Click on the Browse button to select the .gh file or choose one of the recent files from the drop-down list.

2.3 Configuration

Grasshopper style wizard: configuration
Grasshopper style wizard: Configuration

Set the door Grasshopper style global values:

  • Style name: set the desired name.
  • Definition units: in this case, it has been prepared in millimeters.
  • Opening profile (linked properties): 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. In this case, it is necessary to select a curve because the bounding box of the output breps doesn’t correspond with the hole in the wall.

2.4 Geometry

Grasshopper style wizard: Geometry

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

You can choose the representation where each component is going to be used:

  • Model: the object representation in 3D.
  • Plan: the object representation in plan view. Only visible in top views when the Cut Plane of the level where the object is placed is enabled and intersects the object.
  • Preview *: the object representation while the object is being inserted (or moved afterward). This way, you can have a preview of the final object before ending the command.

*Note: It is highly recommended to use the Preview representation only for the necessary geometry to be displayed while inserting the object in the model. The fewer components checked for the preview, the faster will be the insertion or edition of these objects in the model, especially when they are made with complex Grasshopper definitions. Beware to leave at least one component with this representation checked.

in this case, there are two geometrical outputs that we want to show in the three different representations: model, plan, and preview. That means that the Plan representation will be taken from the horizontal section of the 3D object according to the level’s cut plane height.

2.5 Parameters

Door Grasshopper style wizard: parameters
Grasshopper style wizard: Parameters

This step shows the settings available for the list of input and output parameters defined in Grasshopper. The filter by option lets you view the parameters located inside named groups in the Grasshopper definition. There are two kinds of parameters:

  • Input parameters: these parameters define the door style.
  • Output parameters: these parameters retrieve information from the object created.

The settings are different for each of them:

  • Input parameters:
    • Name: it is the identifier of the parameter and can be modified if desired in this step.
    • Editable by (you can change this value for several parameters by selecting them while holding the Ctrl key.):
      • Definition: the parameter will be hidden and it will keep the value from the Grasshopper definition.
      • Style: the parameter can be edited only by style and the changes will apply to all objects in the model with that style.
      • Object: allows to set a different value for that parameter for each column in the model that has the same style. In case no value is provided “By object” the one defined by style will be used.
    • Default (value): shows the default value (the ones specified in the Grasshopper definition) for the input parameters 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 have automatically been set to Length. There is also a value list for the opening side which has been set to Integer since it needs to be 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 input parameter between 0 and 1 should have been set to get this conversion successfully.
Grasshopper style wizard. Editing the parameter type.
Grasshopper style wizard. Editing the parameter type.

  • Output parameters:
    • Name: it is the identifier of the parameter and can be modified if desired in this step.
    • Visibility: choose the option “Object” to display this parameter in the VisualARQ dialogs, or “None” to hide it.
    • Type: shows the type of value which has previously been defined in Grasshopper for this parameter.

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

3.1 Edit the door style

Door Grasshopper style parameters in the Door style dialog.
Door Grasshopper style parameters in the Door style dialog.

Once the Grasshopper style wizard is completed, the new style will appear in the door styles list. 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 input 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 in the same category.

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, as it works with any other VisualARQ object. Only those input parameters that were set as editable “by Object” in step 2.5 will be visible. You will see the output parameters in this part of the Properties panel as well.

Door parameters in the door Object Properties panel
Door parameters in the door Object Properties panel