● SG-Lib 5.5.5 (2025) · MATLAB Toolbox

Design CAD, mechanisms and robots with natural language and generative AI

SG-Lib is a MATLAB toolbox for solid-geometry modelling, FE-based optimization and multi-body simulation — enabling automated design of robots, mechanisms and 3D-printable geometry from a simple conversation.

Developed since 2010 at the Technical University of Munich, Germany.

236 MB incl. full HTML docsTested in English & GermanOn MATLAB Central & GitHub
Please note

SG-Lib 5.6 is coming — release September 2026, adding the Claude interface and the batch-pool automation shown below. The version you can download today, SG-Lib 5.5, works with the ChatGPT / MATLAB interface only — there is no Claude interface yet, and it does not offer the full capabilities of 5.6.

SG-Lib is a free, non-commercial toolbox for research and teaching. We say this openly so our community and students know what to expect and are not disappointed.

ChatCAD in action

From a single prompt to a printable part

With SG-Lib 5.5 and the OpenAI / MATLAB interface, 3D-printable geometries, mechanisms and robots can be created through natural-language conversation. Click a demo to watch the video.

Single-prompt coffee mug

Single-prompt coffee mug

One sentence to a printable mug geometry.

⇩ download video
Heat-sink from blueprint

Heat-sink from blueprint

Parametric heat-sink generated by conversation.

⇩ download video
Spur gear

Spur gear

Correct gear design driven by an LLM.

⇩ download video

What is the Solid Geometry Library Toolbox?

SG-Lib is a toolbox for MathWorks MATLAB (some tasks require additional MATLAB toolboxes). Its goal is to automate the design process for building robots — rigid bodies, joints and kinematics, gear design and shape optimization via computer-aided optimization (CAO) or topology optimization (TO) for small and large displacements.

It also includes components for simulating multi-body systems, automatically generating control code for Arduino-family µCs and for 2D/3D area cameras, plus a port for processing medical CT/MRI image data. The library has grown since 2010 and is expected to be developed further until at least 2035.

Prof. Tim C. Lueth · Technical University of Munich, Germany

% Verify licence and draw a circle
>> VLFLlicense, PLcircle(10)

% Generate a printable solid
>> sg = VLFLtransA(...)
>> SGwriteSTL(sg, 'part.stl')

% ...or just describe it in plain English
>> SGofCPLcommand('c 4,h 5')
How it fits together

Architecture

SG-Lib is a MATLAB toolbox built on MATLAB and Python and using the Manifold library for watertight boolean geometry. Since version 5.6 the toolbox can be driven by a generative AI — such as ChatGPT, and preferably Claude — through functions like executepool4claude.

SG-Lib system architecture: generative AI drives the SG-Lib MATLAB toolbox, which runs on MATLAB and Python and uses the Manifold boolean library
Why generative AI in robot design

Faster, more efficient, more adaptable designs

Design innovation

Explores a wide space of possibilities and produces designs engineers might not have conceived.

Optimization

Accounts for materials, weight distribution and energy efficiency to outperform traditional designs.

Faster prototyping

Rapidly generates and iterates designs, accelerating research and development.

Complex structures

Creates intricate geometries that are difficult or impossible to build by hand.

Scalability

AI-generated designs scale up cleanly for mass production across industries.

Medical & devices

From manipulators and mechanisms to medical robots and CT/MRI data processing.

Get SG-Lib 5.5.5 (2025)

The newest release is compiled for MATLAB 2024b and ships with complete HTML documentation. Free for educational, non-profit use.