SG-Lib: Solid Geometry Library Toolbox

The SG-Lib ist a tool for the use of generative AI during the automatic design of robots. The library has been developed since 2010 at the TU Munich, Germany.

Since SG-Lib 2025 (SG-Lib 5.5) there is a complete html documentation available for download and integration into Matlab's documentation

By using SG-Lib 5.5 and the openAI/Matlab interface of SGLib, it has become possible to create 3D printable object geometries, mechanisms and robots using natural language conversation (LLM). This has been tested in english and german. See what is under development.



Pasted Graphic Bildschirmfoto 2025-09-23 um 15.06.13 Bildschirmfoto 2025-09-23 um 15.06.56 Bildschirmfoto 2025-09-23 um 15.09.36
Click on the pictures to download the videos


Generative AI in the construction of robots offers several advantages that can revolutionize the field of robotics:
  • Design Innovation: Generative AI can produce unique robot designs that human engineers might not have conceived. It explores a wide range of possibilities, resulting in more efficient and effective robots.
  • Optimization: Generative AI can optimize robot designs for specific tasks or environments. By considering factors such as materials, weight distribution, and energy efficiency, it can create robots that outperform traditional designs.
  • Faster prototyping: Generative AI reduces prototyping time by rapidly generating and iterating robot designs. This enables the faster development and testing of new robotic systems, thereby accelerating the overall research and development process.
  • Cost reduction: Generative AI can identify cost-effective design solutions by minimizing the use of expensive materials and components. It can also reduce the need for extensive physical prototyping, saving time and money.
  • Adaptability: Robots designed using generative AI can more easily adapt to changing tasks and environments. They can quickly adjust their structure or behavior to meet new requirements, making them versatile in dynamic situations.
  • Performance Enhancement: Generative AI can fine-tune robot designs for specific performance metrics, resulting in robots that are more accurate, faster, and better suited to their intended tasks.
  • Resource efficiency: These AI-generated designs often result in robots that are more resource-efficient. This is particularly important in applications where energy efficiency and sustainability are key considerations.
  • Complex Structures: Generative AI can design intricate and complex robot structures that would be difficult or impossible to create manually. These robots can have enhanced capabilities, such as improved mobility or dexterity.
  • Customization: Robots can be designed with specific user requirements in mind. Whether for industrial automation, healthcare, or personal assistance, generative AI enables the creation of bespoke designs that cater to individual needs.
  • Rapid Evolution: As generative AI algorithms improve and learn, robot designs can also evolve and adapt over time. This means robots can continually improve their performance without extensive manual redesign.
  • Reduced human bias: Generative AI can reduce human bias in robot design. Relying on data and algorithms allows generative AI to generate designs that are more objective and free from preconceived notions.
  • Scalability: AI-generated robot designs can easily be scaled up for mass production, making it feasible to deploy robots in various industries and applications.
In summary, generative AI offers numerous advantages in robot construction, including innovation, optimization, cost reduction, adaptability, and resource efficiency. These advantages can result in the development of more capable, cost-effective, and versatile robotic systems capable of addressing a wide range of real-world challenges.

What kind of tool is the Solid Geometry Library Toolbox?


The SG-Lib is a toolbox for the MathWorks MATLAB math program. In some cases, other MATLAB toolboxes are needed.
The goal is to automate the design process for constructing robots. This includes the design of rigid bodies, joints, and kinematics, as well as gear design and shape optimization using computer-aided optimization (CAO) or topology optimization (TO) for small and large displacements. Additionally, SG-Lib includes a component dedicated to simulating multibody systems and automatically generating control codes for µCs of the Arduino family, as well as for 2D and 3D area cameras. There is also a port for processing medical image data from CT/MRI scanners.
Tim Lueth, Professor at Technical University of Munich, Germany

The Toolbox can be downloaded at
Matlab Central (set of all SG-Lib versions) at GitHub (dedicates SG-Lib versions) for educational non-profit purpose. The Toolbox license always expires after about one year. Until then there is always a new version. The Toolbox will certainly be further developed until 2035.

The library grows with discussions and also by code of other researchers:

The pictures show some examples of mechanisms designed with the SG-Lib. The work is typically presented at the IEEE Conferences ICRA, IROS and ROBIO and many more:

Pasted GraphicPasted Graphic 1
Most recent SG-Lib (5.5.5 - 2025)

Last Change Oct 6th 2025 for SG-Lib 5.5.5 (2025) 236 MB