Quick Thoughts

3D models + LLM is a new world

Published on in 3D printing , GenAI

Using LLMs and AI to generate new, complex, but reusable models via OpenSCAD and scripting is truly amazing. My journey in 3D modelling is still early, but I started with free FOSS tools like FreeCAD, spending time learning the various tools, settings, and modes of the software. While learning new things is great, the time spent interacting complex GUIs and having to read docs and watch tutorials was burdensome. It took energy away from my actual goal — modelling and 3D printing new items like custom adapters and reducers, soap containers, and car parts that actually useful.

TL;DR

Tried a bunch of CAD tools, hit roadblocks, then discoveredscripting 3D models with OpenSCAD and LLMs which makes creating custom parts is way easier.


Early Attempts: FreeCAD and TinkerCAD

After plenty of trial and error with FreeCAD, and gaining some familiarity with its quirks, I took a break from modeling. A month or two passed by when I wanted to try modelling again, and I forgot everything I learned. Instead of retrying with FreeCAD, I decided to go with something simpler: a web-based platform called TinkerCAD. It’s geared toward a younger audience, meaning it was easy to get started. However, the simplified UI meant it was also quite basic. Designing intricate shapes with millimetre precision was impossible; likewise, so were features like tapers and precise curves. It also didn’t help that it didn’t really have versioning/layers. Suffice to say, TinkerCAD wasn’t what I was looking for.

Hitting a Wall with Fusion 360

Eventually I tried installing Fusion 360, a commercial-grade proprietary CAD software that many use for all sort of modeling and beyond. I initially skipped the software since it comes with restrictive licences for the free version, and paid software isn’t generally my jam, but the afermentioned attempts before lead me to trying something different. I’d at least give it a shake with the personal licence option (which means I wouldn’t technically be able to use it to sell models if I make over $1,000 USD).

But my attempt to use it was short-lived. After creating an account and going through the labyrinth of screens, I couldn’t actually download the software. I tried different browsers, using VPNs, and new accounts, but nothing would actually trigger the download. I also realized it doesn’t natively support Linux OSes, which would likely have meant it wasn’t going to work well for me regardless (I’d have tried using Wine if it did download, just to see, but I doubt that’s as simple as it sounds).

Scripting Models: The OpenSCAD Revelation

My journey across CAD software led me to a new realization — I can script models into existence. It’s really obvious (there are a lot of different ways to do it), but it only came to me because of a search trying to find new FOSS CAD software again. All of which is a little ironic given my software development background.

I downloaded OpenSCAD and immediately used ChatGPT to generate a script that produced the exact model I needed in two prompts — a reducer that joins two different sized pipes. I read no documentation, watched no videos, didn’t search Reddit or open a book… but it worked. Granted the model is relatively simple but still, the value of LLMs + scripting was immediate and provided the motivation for me to continue my learning of all things CAD. Plus the power scripting is obvious - the scripts can be commented and versioned which makes it painless to pick back up. Scripts also are reusable (e.g. functions, custom shapes, etc can be modified with less effort with exact percision). Granted I’m still learning and am only starting how to really get into complex models, but again, the joy of vibe coding a thing into the phsyical world is really quite cool.

Said differently, I could’ve spun up FreeCAD again and tried making it from scratch, but that required overcoming the lack of motivation I had to click around and spend a couple hours doing something that should be simple but ultimately isn’t.

Here’s the first OpenSCAD code I generated, the purpose of which is so I can use my shop vac directly connected to my table saw, so I can vacuum up sawdust as I make it:

$fn = 100; // Smooth curved surfaces

// Units
inch = 25.4;

// Dimensions
wall_thickness = 3; // in mm
diameter_big = 2 * inch;     // 2 inch = 50.8 mm
diameter_small = 1.5 * inch; // 1.5 inch = 38.1 mm
height = 60; // Pipe height in mm

module tapered_pipe(outer_top_dia, outer_bottom_dia, height, wall) {
    difference() {
        // Outer shell (tapered)
        cylinder(h=height, r1=outer_top_dia/2, r2=outer_bottom_dia/2);

        // Inner hollow, full height (no vertical offset!)
        cylinder(h=height,
                 r1=(outer_top_dia - wall*2)/2,
                 r2=(outer_bottom_dia - wall*2)/2);
    }
}

tapered_pipe(diameter_big, diameter_small, height, wall_thickness);