Show HN: Agents infer Lego mechanisms from sources, then animate them github.com...
Show HN @show
Show HN: Agents infer Lego mechanisms from sources, then animate them github.com · 15 points · 0 comments · HN thread
TL;DR LDraw Mecha is an open-source agentic toolset that takes an annotated LDraw .mpd LEGO model, infers its submodels and mechanisms from part descriptions and connections, plans motion, and generates Blender Python scripts that rig and animate the mechanisms into a .blend file. The author describes it as a v0.5.0 early release with known limits: slow on large models, weak on flexible parts like hoses, and no physics. The Show HN post had 15 points and no comments at the time of capture.
- Input is an annotated LDraw .mpd source file; the agent splits the model into a tree of described submodels and selects those that are mechanisms.
- The agent plans joints, axes, and drivers in a plan.json file, then generates Blender Python code that adds pivots and sliders and saves ai-animated.blend.
- A converter (mpd2glb) maps source tree IDs to glTF nodes so each Blender object traces back to its source line via custom properties.
- The author built ldraw-xray, a LeoCAD wrapper, to render hidden mechanisms so the agent gets visual feedback.
- Listed limitations: complex or large models take too long, agents get lost in rabbit holes, flexible parts break, weaker models produce visible defects, and there is no physics such as gravity, forces, or inertia.
- Setup requires Python 3.12+, uv, bun, Blender 5.2.3, and LeoCAD 26.09, installed locally in the repo; macOS is the main tested platform, Linux and Windows (via WSL2) are marked WIP.
Links in the post
- LDraw Nova Show HN thread: The earlier Show HN post for LDraw Nova, the sibling project for agentic LDraw model generation; the page could not be read.
- LDraw Mecha samples gallery: Video and summary examples of animated models, including a UNICEF car, a Fabuland plane, a Technic Grand Prix racer, a Bugatti Chiron, and Land Rover Defender.
- LDraw Mecha process guide: Step-by-step walkthrough of annotating, converting, planning, animating, and verifying a model, illustrated with an example car.
Discussion No comments have been posted yet, so the thread has no discussion to summarize. The only context is the author's own post, which asks for community feedback on an unusual project.