Grasshopper API link - bulk calculation of steel joints (06)

Tento článek je dostupný také v dalších jazycích:
In this tutorial, you will learn how to use a parametric template for a bulk calculation of steel joints with the same geometry.

If you work with IDEA StatiCa version up to 24.1.3, see this tutorial.

Grasshopper - Instalace pluginu

Zkušební verzi programů Rhino3d a Grasshopper můžete získat na webových stránkách Rhino3d. Spusťte program RhinoCeros a vyberte šablonu s velikostí měřítka v Metrech:

inline image in article

Do příkazového řádku zadejte "Package Manager":

inline image in article

Zobrazí se nové okno; vyberte IDEAStatiCa a klikněte na tlačítko Install. Zásuvný modul se stáhne a nainstaluje. Aby se stal aktivním, je nutné restartovat systém Rhinoceros.

inline image in article

Chcete-li spustit program Grasshopper se zásuvným modulem IDEA StatiCa, vyberte na kartě Rhihoceros položku Tools / Grasshopper.

inline image in article

Jak vidíte, zásuvný modul je již začleněn.

inline image in article

Informace o komponentách a příkazech modulu IDEA StatiCa pro Grasshopper najdete v článku Popis komponent modulu Grasshopper.

HUMAN plugin

In this example, we need to select part of the structure, and for this purpose, you have to install another plugin - HUMAN, which you will use in this tutorial.

inline image in article

IDEA StatiCa Checkbot – import of a structure, design of a joint

Open the attached folder with a structure imported from 3rd party software. Internal forces are included.

inline image in article

Please select one of the middle joints in the upper belt (e.g., C11) and open it in the IDEA StatiCa Connection.

You can design it correctly according to your needs or use our fully prepared joint here.

inline image in article

Go to the Developer tab, set the parameters, and link them to the appropriate operation according to the following pictures:

inline image in article
inline image in article

Finaly, store the whole joint as a template *.contemp, used later in Grasshopper.

inline image in article

Grasshopper - import XML file, apply the template

Create a new document, select the tab Params in the upper ribbon, and place the component File Path on the Canvas. 

inline image in article

Right-click on the component and select the file import.xml, found in the Checkbot folder. This file contains all the data from the imported structure.

Since version 24.1.4, IDEA StatiCa came with a new API, described here.

To run Grasshopper scripts, you must add a component called Connection Service Runner to every file. This component can be found in  IDEA StatiCa / App Common.

inline image in article

When running this component, you should see the following window appear.

inline image in article

Now, you add the following components to the canvas and connect them as shown in the picture.

Import File and Display structure, including a description of joints in Rhino:

IDEA StatiCa / Open Model / Import IOM File
IDEA StatiCa / Open Model / Deconstruct Open Model
IDEA StatiCa / Open Model / Deconstruct Open Model Object
IDEA StatiCa / Open Model Create / Deconstruct Member 1D

Params / Geometry / Curve
Params / Geometry / Point
Display / Dimensions / Text Tag

inline image in article

Now you can see the structure in Rhino:

inline image in article

Import the template and apply it to the selected joints: 

IDEA StatiCa / App Common / Create Connection from IOM
IDEA StatiCa / App Common / Deconstruct Object
IDEA StatiCa / Connection / Import Template file
IDEA StatiCa / Connection / Full template Assign
IDEA StatiCa / Connection / Apply Template

Human / Misc / Item Selector
Sets / Sets / Member Index
Sets / Lists / List item

Params / Primitive / File path (import the template)
Params / Input / Boolean Toggle (3x)

inline image in article

Now you can see the structure with selected joints where the template was applied:

inline image in article

Grasshopper - modify parameters and run the calculation

Modify parameters:

IDEA StatiCa / Connection / Get Parameters
IDEA StatiCa / Connection / Update Parameters
IDEA StatiCa / Connection / Get Settings
IDEA StatiCa / Connection / Update Settings

IDEA StatiCa / App Common / Modify Object (2x) 


IDEA StatiCa / Connection / Modify Code Setup (to simplify output table)
IDEA StatiCa / Connection / Modify Parameters

Params / Input / Panel (2x) 
Params / Input / Boolean Toggle (5x)
Params / Input / Number Slider )2x)

Params / Sets / List Item (2x)
Params / Sets / Tree / Merge

inline image in article

Calculate joints:

IDEA StatiCa / Connection / Calculate Project
IDEA StatiCa / Connection / Deconstruct Result Item  (passing data to components for the visualization)
IDEA StatiCa / Connection / Export IOM

IDEA StatiCa / Open Model / Connection Open Model (passing data to components for the visualization)

Params / Input / Boolean Toggle (2x)

inline image in article

Visualization of results:

Grasshopper allows you to enhance your results with graphic visualization. The components shown in the next picture allow you to see computed joints in green; the ones that do not pass the checks are then in red.

inline image in article
inline image in article

Here is the whole picture of the Grasshopper file to see the links between the components:

inline image in article

More complex examples can be found in the folder

“%appdata%\McNeel\Rhinoceros\packages\8.0\IDEAStatiCa\0.2.0\Examples0.2.0.zip”

Přiložené soubory ke stažení

Související články