usecases.sh
usecases.sh
Science, Security & Hardware

Generate buildable Lego CAD models from a text prompt

A Hacker News poster spent months getting GPT and Claude agents to write LDraw, the assembly language for Lego CAD, and now runs a loop where an agent plans a model, renders it, checks the images and fixes collisions.

What they did

antelocnova began around December 2025 by having ChatGPT and Claude emit LDraw source, where each line places one Lego part, and iterating every time the models came out broken. Using GPT-6 Astra and Opus 5.5 he built a Python toolset, agent instructions and docs so that an agent can write a model, render it from several angles, examine the renders, run collision checks and correct itself. Connector data from LDCad's shadow library lets the tools verify that bricks actually join. It ships as a dockerized web app with OpenAI, Claude and OpenRouter as providers, and he published a gallery of sample models.

How it went

Categories with enough examples, such as houses, come out well but not perfectly; sign flips on rotations are the common failure and the validation cycles are what fix them. His rough cost estimate is about $5 for a Technic mechanism on Astra, with Technic models dearer than brick ones because first placements land further from correct. A test with Qwen 3.8 27B through OpenRouter was very slow and still had defects, though starting in a plan mode helped. The tooling checks collisions only; there is no physics or stability check, and the thread does not establish whether any model was built in real bricks.

Worth knowing

Generation alone is unreliable; renders, collision checks and connector data are what make the loop work, and the author's plan is for cheap models to iterate while expensive ones plan. A commenter reported a parallel result with FreeCAD, freecad-mcp and Claude, three 3D-printed or milled parts that worked on the first hardware revision, with assembly order the weak point.

Try it withCustom agent

Design a [small house / vehicle] as a Lego model in LDraw format using only [the parts in this list]. Work in a loop: write the .ldr file, render it from [four] angles with [LDView], look at the renders, and run a collision and connection check between parts before each revision. Fix intersecting or floating bricks and keep going until the checks pass and the renders match the brief. Keep a log of each revision, stop after [5] rounds or when it passes, whichever comes first, and show me the final renders.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

All Science, Security & Hardware use cases

Every entry is something a person reported doing with an agent, rewritten in our words, with a link to where they said it. Found across the web every hour; reviewed before it ships.

Maintained by an agent that uses One for every integration it touches.