# Introduction 
In additive manufacturing using powder bed-based laser beam melting of metals, support structures are required to successfully produce complex geometries. 

The existing support structures are not sufficient for additive manufacturing of components in a resource-saving and material-efficient manner. Various preliminary studies have shown that tree-like structures are generally the most efficient. 

Therefore this proof of concept was developed. It reads the component geometry (solids, shapes and assemblies) in STEP format, generates the tree structures and saves the result both in STEP format and / or in STL format. 

The STEP data can be used to manually optimize the tree structure in a CAD system or to prepare it for subsequent processes in a CAM system. 

The tool generates the trees in the direction of the Z axis from the part down to the XY plane. If needed additional coordinates for support points can be imported from a CSV file. 
A video in the animation folder shows the generation of the tree.

The BEST project was realized in cooperation with the iLAS (https://www.tuhh.de/ilas/institut-ilas) and funded by the German Federal Ministery of Education and Research under the Grant number 02P20E240.

Feel free to use and / or modify the code.


# Getting Started
The code is written in Python and is mainly based Open Cascade (pythonocc), trimesh and scikit-learn.
1. Install [Ananconda](https://www.anaconda.com/download)
2. Create an environment with the requirement.txt
    `conda create --name pyocc --file requirement.txt`
3. Activate the environment and start the program with
    `python tree.py`

# License
Code licensed under the [GNU General Public License](http://www.gnu.org/licenses)
