Welcome to Karamba3D Scripting Guide

The official scripting guide using Karamba3D 3.1.4

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: Section 2.7 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 Section 2.8.

Scope of the Manual

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

Examples detailed in this guide can be found in the "Karamba3D Scripting Examples Github"-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 license agreement that comes with Karamba3D in case of further questions.

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

Last updated