Rhino+Grasshopper: Repetition based on input data

In some cases of using Rhino+Grasshopper, it would be necessary to repeat the same process.

If that repeated process is limited to less than 10 times, it would be done in manual clicking with Grasshopper, but over 20 times or each process would take longer than 10 minutes, repetition based on input data would much easier.

This is guide of how to setup repetition based on input data.

In this repetition process, addon “Anemone” is necessary.

https://www.food4rhino.com/app/anemone

Since Grasshopper opens a door of add-on without limitation of authorization by McNeel group, one of the most important thing about using Grasshopper is using add-ons.

Summerizing addon “Anomone” could be in single word: “LOOP”

Anemone tab as Grasshoppper

Basically, Anemone setups loop between certain areas (start to end), and that looped cycle would repeat until fit to required condition/limitation.

Let’s see a single simple example of the Repetition work process in Grasshopper.
This simple example is creating Facade geometry based on floor drawing in separated Rhino files.

In view of the concept of the ideal “BIM” condition, the 3D models would be created prior, and based on that 3D model, the 2D drawings should be created. But in the case of practical work, it is often to the request to create a 3D model based on a 2D drawing (Floor Plan, Elevation).

Target Input: Elevation Drawing
Target Input: Floor Plan
Floor Plan: boundary saved in separate Rhino file, inside each file, height information included.
Example of Anemone loop cycle

Even though Grasshopper is visual-coding, it would be hard to understanding without description. Adding some scribble would be more comprehensible like the following example ;

Scribbled version; Example of Anemone loop cycle

As you see, INPUT DATA part is inserting data that need to be repeated.

Just below that part, COUNT QUANTITY OF INPUT DATA is counting how many data that need to be repeated, and minor modification based on that quantity.

COUNT QUANTITY OF INPUT DATA; with minor modification

Subtraction of Length is a necessary part of Grasshopper because in Grasshopper logic, all lists start with “0” not “1”.

grasshopper list numbering; starts with “0” not “1”

So, in this Example Anemone sequence,
1. READING INPUT DATA,
2. COUNTING HOW MANY REPEATING SEQUENCE based on INPUT DATA
3. Setting START OF LOOP condition, END OF LOOP, and COUNTING PARAMETER.
4. LOOP PROCESS repeats until that COUNTING PARAMETER number fits the last COUNTING number

LOOP PROCESS part of Example of Anemone loop cycle

In this LOOP PROCESS, only INPUT DATA changes. So it is like you insert file#1, then next with file#2, goes with final file#5.

Goal Output: Facade base geometry
Facade Base Geometry: saved in the separated file by plan

Some people would think that instead of this LOOP PROCESS, input them in the same code and run them all at single-click in Grasshopper could be done with the same result. But some Grasshopper work like exporting data with different sizes, data structure couldn’t be easily done parallelly done by single work of Grasshopper.

For that reason, “Repetition” is needed. Repeating the same logic/code, but result in seperated data.

Of course, This “Repetition” could be diverse to the “Evolutional” method if you control this Anemone carefully. That would be the topic of the next post.

Munchel Kim

Participant in Facade project using Grasshopper. Interested in using BIM applications (Rhino+Grasshopper, Revit+Dynamo, 3DX) and expand with other application(VBA, python) in practical cases, that could result in semi-automatic or automatic Parametric Design.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment