Scripting Guide 3.1.4
  • Welcome to Karamba3D Scripting Guide
  • 1. Introduction
    • 1.1: Scripting with Karamba3D
    • 1.2: Basics
  • 2. Scripting with Karamba3D inside Grasshopper
    • 2.1: Hello Karamba3D
    • 2.2: Data Retrieval from Models
    • 2.3: How to Create Structural Models
    • 2.4: How to Modify Structural Models
      • 2.4.1: Cross section Optimization
      • 2.4.2: Activation and Deactivation of Elements
    • 2.5: Data Export from Karamba3D
    • 2.6: The VB Script Component
    • 2.7: The IronPython Component
      • 2.7.1: Results Retrieval on Shells
      • 2.7.2: A Simplified ESO-Procedure on Shells
    • 2.8: The Python 3 Component
      • 2.8.1: Hello Karamba3D
      • 2.8.2: Data Retrieval from Models
      • 2.8.3: How to Create Structural Models
      • 2.8.4: How to Modify Structural Models
        • 2.8.4.1: Cross section Optimization
        • 2.8.4.2: Activation and Deactivation of Elements
  • 3. How to create your own Karamba3D Grasshopper-component
    • 3.1: Setting up a Visual Studio Project for GH Plug-ins
    • 3.2: Basic Component Setup
    • 3.3: How to Reference Karamba3D Assemblies
    • 3.4: Input- and Output-Plugs
    • 3.5: Adding Functionality to a GH Component
  • Bibliography
Powered by GitBook
On this page
  • Citing Karamba3D
  • Disclaimer

Welcome to Karamba3D Scripting Guide

The official scripting guide using Karamba3D 3.1.4

Next1.1: Scripting with Karamba3D

Last updated 5 months ago

Using Karamba3D in C# Scripts

This manual provides guidance on utilizing Karamba3D within C# scripts. As C# is part of the .NET ecosystem, the information presented here also applies to other .NET-based scripting languages, such as IronPython, F#, Visual Basic, or any language built on the Common Language Infrastructure (CLI).

Python Support in Karamba3D

  • IronPython Examples: includes example scripts written in IronPython. While IronPython is compatible with the .NET framework, its utility is limited due to a smaller selection of available libraries.

  • CPython in Rhino 8: With Rhino 8, it is now possible to embed CPython scripts in Grasshopper definitions. CPython supports a comprehensive set of libraries, making it significantly more versatile than IronPython. Examples leveraging Grasshopper's new "Python 3 Component" are provided in .

Scope of the Manual

This manual does not serve as an introduction to C# or Python. For beginners, refer to resources such as or . For advanced topics, which are not essential for understanding this manual but may be beneficial, see the highly regarded “C# in Depth” .

Examples detailed in this guide can be found in the ""-collection.

Citing Karamba3D

In case you use Karamba3D for your scientific work, please cite the following paper:

Preisinger, C. (2013), Linking Structure and Parametric Geometry. Architectural Design, 83: 110-113 DOI: 10.1002/ad.1564.

Disclaimer

Although being tested thoroughly Karamba3D probably contains errors – therefore no guarantee can be given that Karamba3D computes correct results. Use of Karamba3D is entirely at your own risk. Please read the that comes with Karamba3D in case of further questions.

This manual is written by Clemens Preisinger. Editing by Georg Lobe.

Section 2.7
Section 2.8
[1]
[3]
[4]
Karamba3D Scripting Examples Github
license agreement