Railing Grasshopper Styles Tutorial

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

In this tutorial a parametric railing style from a Grasshopper definition will be created.

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

  1. Grasshopper definition setup
  2. Create the VisualARQ railing style
  3. Insert and edit a VisualARQ railing 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.

  1. Input parameters components:

    They define the values of the resulting railing style. Railings require a Curve input parameter as their path curve. In this example we can find the following kind of input parameters:

    • Brep parameter: used for the baluster geometry of the railing.
    • Curve parameter: used for the path curve of the railing.
    • Numeric value (floating point): used to specify the distance of the free space between the balusters.
  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 railing style. In this case all geometry is collected by a single Brep Param component.

The complete Grasshopper definition is shown in the image below:

The railing Grasshopper style definition. On the left the various input parameters and on the right the brep component as output.

The Grasshopper definition that generates the railing.

2. Create the VisualARQ railing style

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

2.1: Create the new style

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

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

The railing 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 railing 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 Railing Grasshopper Style Wizard. In this step the Grasshopper file is selected.

2.3: Configuration

Set the Railing Grasshopper style global values:

  • Style name
  • Definition units: in this case it has been prepared in millimeters.
  • Path Curve: a Curve or Geometry parameter component representing the path should be selected. The name displayed in the list is the one assigned to that component in the Grasshopper file.
Second step of the Railing Grasshopper Style Wizard. In this step the name, the units and the Path Curve from the Grasshopper file are selected.

2.4: Geometry

Specify which of the geometry blocks to import into VisualARQ. The identifiers of these Geometry blocks 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 object.

In this case there is only one geometry output which is the Model representation, that means that 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 Railing 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 railing style. In this case the possibility to “Filter by” is not relevant since in the Grasshopper definition there were no named groups for the input parameters. The settings 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 once by selecting them while holding the Ctrl key.

Default (value): shows the default values for the parameters, (those specified in the Grasshopper definition), including geometry entities and lets you set different ones. In this case there is one Brep parameter assigned to the baluster geometry. It is recommendable to “internalize data” on that component in the gh file before saving it, in order to have a solid already assigned. In case there was no internalized geometry the value field would appear as “Unknown” in red, indicating an unreferenced geometry and you would be requested to pick a Brep from the model to continue. (For this particular example, the solid selected must be placed in the 0,0,0 coordinates and oriented perpendicular to the XY plane, in order to be aligned properly with the railing path. This can be avoided if the gh file places the referenced solid in the (0,0,0) coordinates).

Fourth step of the Railing Grasshopper Style Wizard. In this step one of the settings is the "Default", which in case of brep requires to pick one from the model. Fourth step of the Railing Grasshopper Style Wizard. To continue an instance of a closed solid polysurface or closed extrusion should have been selected from the model.

Type: shows the different types of values available for each kind of parameter. In this case we have a geometry parameter which is automatically set to Brep and a numerical one which has been automatically set to Length because in the Grasshopper definition it was a floating point value input.

3. Insert and edit a VisualARQ railing created from the Grasshopper Railing Style

3.1 Edit the railing style

Once the Grasshopper style wizard is completed, the new style will appear in the railing 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 parameters are available under the tab “Parameters” and 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.

The Railing styles dialog with the new railing 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 railing style is created, you will be able to insert an instance in the document and change the values of its parameters from the Properties panel VisualARQ section, as any other regular VisualARQ object. However only those input parameters editable “by Object” will appear.

This railing can be also inserted using the Railing From Curves command.

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