cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Parametric design
About Rhino & Grasshopper and PARAM-O.

Coding the Form: From Grasshopper to GDL

RhinoX
Booster

Grasshopper and GDL are two powerful tools that bridge the gap between design and BIM. However, learning resources are still quite limited, and often fragmented. In this thread, I will share some of my approaches and workflows so that newcomers can more easily get started.

 

I use some designs from leading studios as remodeled examples, simply because these projects are too beautiful not to showcase.

 

1. GRADIENT PANEL

 

RhinoX_0-1756594436117.png

(Designed by Enzyme APD)

 

This is a stadium designed with triangular panels that shift color in a gradient. The approach can be achieved by creating the panels and gradient in Grasshopper, then bringing them into Archicad as a GDL Object.

 

RhinoX_0-1756808162353.png

 

RhinoX_1-1756594436119.png

 

The corner anchor points are decomposed into x, y, z coordinates, and the RGB colors are separated into r, g, b values before being passed into GDL as arrays.

 

RhinoX_2-1756594436121.png

 

 

RhinoX_3-1756594436121.png

 

RhinoX_4-1756594436122.png

 

RhinoX_0-1756594654836.png

 

Use GDL to group the decomposed values, apply DEFINE MATERIAL for materials, and PLANE for geometry generation. Thickness can be added (if needed) by generating the six plane surfaces of the panel.

 

RhinoX_0-1756595047670.png

 

Materials and colors can be quickly changed.

 

RhinoX_0-1756806972014.png

 

RhinoX_1-1756807003943.png

 

You can use this method for mesh models: after running the physics simulation with Kangaroo in Grasshopper, you can simulate the Membrane Structure in Archicad.

 

Operating system used: Windows

7 REPLIES 7
RhinoX
Booster

2. THE XFORM

 

RhinoX_0-1756807252202.png

 

RhinoX_1-1756807277542.png

 

The building façade was designed by Archiradar, featuring panels that can rotate to open at different angles as the sun moves during the day.

The challenging part of this project is that the panels are placed on a curved and twisted surface. This makes it a very interesting project.

 

 

RhinoX_2-1756807330794.png

 

 

RhinoX_3-1756807348258.png

 

First, create the curved surface using control points, then divide it into panels with UV.

Since the panel corners are not coplanar, you need to optimize them to be coplanar, making it easier to model in GDL.

 

RhinoX_4-1756807385179.png

 

Since most shape-creating commands in GDL are built on the XY plane, we need to align the panel planes with the XY plane in GDL. XFORM will help us do that.

You just need to deconstruct each panel’s plane in Grasshopper, then send it into GDL for XFORM to process.

The coordinates of the panels in the Global system are also converted into the Local system for each individual panel.

 

RhinoX_5-1756807427965.png

 

RhinoX_6-1756807490814.png

 

RhinoX_7-1756807515479.png

 

RhinoX_8-1756807533797.png

 

Once the coordinate system is standardized and you have the 4 corner points, you can easily create the geometry in GDL.

Since some panels are trapezoidal, the best way is to use the PRISM command with the converted corner point coordinates.

XFORM is a great command and the key point for smoothly converting models from Grasshopper to Archicad through GDL.

RhinoX
Booster

3. PUT AND GET

 

RhinoX_0-1756810970329.png

 

RhinoX_1-1756810994566.png

 

This is a case I posted in another topic, but I’m gathering it here and giving a bit of explanation.

You can use PUT and GET to transfer ARRAY values from Grasshopper, which means you can send the entire geometry from Grasshopper into GDL.

Standardize the plane with XFORM, then use PRISM or EXTRUDE to generate the shape.

 

RhinoX_2-1756811046550.png

 

RhinoX_3-1756811061051.png

 

RhinoX_4-1756811131347.png

 

RhinoX_5-1756811144347.png

 

Use Python to process Grasshopper data so it matches GDL’s format — for example, adding values like 15, -1, or hole parameters such as 900, 4000....

After Python processes the values, send them to GDL, then use a LOOP in GDL with PUT, and combine it with GET to generate the desired geometry.

 

RhinoX_6-1756811193551.png

 

RhinoX_7-1756811205781.png

 

You can customize different hole shapes of the panels according to the geometry created in Grasshopper.

Nurbs
Advocate

Hi RhinoX,

Great work.....just for learning purposes it would be helpful to set the Display in GH to "Draw Full Names". It's easier for Learners to find the used nodes.

AC16 - AC aktuelll , WIN 10

Yes, I will remember. Sometimes I forget to display the full name. But please note: this guide is intended for Grasshopper users who are already familiar with GH. Newbies may find it a bit difficult. The main purpose is to show how to approach GDL from Grasshopper.

RhinoX
Booster

4. THE TUBE COMMAND

 

The TUBE command in GDL is very useful when creating shapes similar to Sweep One Rail, or when generating parametric piping via Grasshopper. The exam project is shown below.

0.png

 

The Sousse and Bardo Memorial designed by George King Architects.

 

1.png

 

2.png

First, create the geometry and form in Grasshopper. This form is generated using Interpolate Curves and the Pipe component in GH.

 

3.png

 

4.png

 

4.1.png

 

Next, the method is to simply transfer the curve from GH to GDL in order to create the pipe using the TUBE command. For clarity, I isolated one simple example: the path points are taken by dividing the curve. The higher the number of divisions, the more accurate and smooth the result will be.

 

5.png

 

6.png

 

The GH scripts and GDL script use the transform plane method (XForm) that I mentioned earlier.

 

7.png

 

The Python script is used to add the status code and to loop the first three points for the TUBE command. Since TUBE requires two dummy points, we need to replace them.

 

8.png

 

9.png

 

10.png

 

Here we go. We can create the entire pipeline in Archicad using the DataTree from GH, where each pipe is generated as a separate GDL object

 

11.png

Elevation/ Section View.

RhinoX
Booster

5.  PROFILES

 

1.png

 

2.png

 

Just sharing a few of my ways to handle profiles in GDL — nothing special, but they help reduce manual work.

 

3.png

 

4.1.png

 

You can transfer any profile curve from Rhino to GDL using a Python script in Grasshopper, as long as the profile consists of lines and arcs only. The script formats the data into GDL code, making it easy to copy directly into your GDL object. The profile curve must be drawn in the XY plane at the Origin point.
si is a status code integer controlling the visual; assign its value before the code, e.g. si = 15.

 

5.png

 

6.png

 

7.png

 

The rail path curve was drawn manually in Rhino, then processed with a Python script in Grasshopper to divide it and send the planes to GDL via the Live Connection. All components are created within one Stair object.

The rail shape is controlled directly by the curve in Rhino; just move the curve’s control points to change the form.

 

8.png

Python script for generating baluster planes.

 

 9.png

 

10.png

  Stair GDL Script: Balusters

Setup info provided by author