File Exchange

image thumbnail


version 4.9.1 (180 MB) by Tim Lueth
Solid Geometry Library Toolbox: Create Surface Models, Export for 3D Printing, Import from CAD-Systems, Robotics, Mechanisms


Updated 31 Aug 2020

From GitHub

View Version History

View license on GitHub

The SG-Lib is a Matlab toolbox for generating surface models for components, mechanisms and robots. There is a programmable interface to Simscape Multibody and to the PDE toolbox for Shape optimization (CAO) and Topology optimization (SKO). There is also a small programming language SG Coding Language for the fast generation of surface models. The surface models can be exported as STL files.
Release 4.9.1 has been adapted for R2020a and is strongly recommended as the latest version. In version 2020a the programming interface of SimScape is modified ("File Solid" instead of "Solid" or changed "Default Names" of the "Connectors" of "Subsystems" etc.). Also callback functions of the user interface seem to react differently. SG-Lib 4.9.1 is valid for 400 days.
The function “loadweb" now links to the changed directory of the WEB-Server of the TU München. Release 4.9.1 does not have mat files included. Please use the laodweb function. Visit for any additional information

Cite As

Tim Lueth (2021). SG-Lib-Matlab-Toolbox (, GitHub. Retrieved .

Comments and Ratings (26)

Markus Huber


I'm able to import STL files and view them. Is there a way to convert them to solid?

Thank you in advance.

Clemens Senft


lara bahlag


Deniz Özkir

Yuqing Liu

Julian Kulozik

Max Hübner

Yanpeng Li

Yilun Sun

Yi Wang

Kazunori Yoshida

Maximilian Fischer

Yixing Tan

Lucas Artmann

Lionel Juillen AF

Angela Faragasso

Alexandra Mercader

Simon Schiele

Michael Kruttschnitt

Andreas Schröffer

Yannick Krieger

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!