Documentation on Python bindings for SAMSON APIΒΆ

Python bindings for SAMSON API are part of the Python Scripting Element. They provide you with an access to most of the SAMSON SDK allowing you to access most of SAMSON’s functionality through python scripting. The Python Scripting Element also comes with an integrated Jupyter Qt Console.

Python bindings for the SAMSON API are done in the same structure as the SAMSON SDK. The Software Development Kit (SDK) of SAMSON is composed of a set of libraries gathered in several library groups (pagesdkorganization). This documentation has links to the SAMSON SDK Developers guide which you also can check out for more information.

Note

This version of Python bindings is for SAMSON SDK 0.12.0.

Python bindings are done thanks to pybind11 (pybind11 license).

Importing python bindings

Python bindings for the SAMSON API are imported in the embedded Jupyter Qt console in the following way:

import samson as sam
from samson.Facade import SAMSON        # SAMSON Facade - main interface of SAMSON
from samson.DataModel import Quantity   # Quantities: length, mass, time, etc
from samson.DataModel import Type       # Types: position3, etc
from samson.Modeling.StructuralModel import Atom