← All use casesCreative

Generate buildable Lego CAD models from a text prompt

Over several months a Hacker News poster taught GPT and Claude agents to write LDraw, the text format for Lego CAD where each line places one part. The open-source toolset lets an agent plan a model, render it from several angles, inspect the renders, run collision checks using real connector data, and fix its own mistakes; it ships as a Docker web app with a sample gallery. Common categories like houses come out well, with rotation sign-flips the usual error the validation loop catches. A Technic mechanism costs roughly $5 in tokens. There's no physics or stability check yet.

Tools used

  • GPT
  • Claude
  • LDraw

Sources (3)