Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

Sandflow-ai/sand3d

Media & Design

Python library for building parametric, articulated 3D models as short programs, designed for LLMs to write and humans to read.

768
91
HTML
Apache-2.0
3 days old

What it does

sand3d is a Python library that describes 3D objects as short programs on top of Blender's bpy: profiles, solids, edits, frames, joints and assemblies. A program states how a shape is constructed, part by part, using named parts, edges and faces rather than hand-computed coordinates. The same program is claimed to build the same mesh deterministically.

The design targets LLM authorship: the whole s3d.<verb> API is documented in about 3,600 tokens, and a part reportedly takes 2 to 6x fewer tokens than equivalent Blender Python, CadQuery or FeatureScript code. Besides meshes, programs can declare joints and export articulated results. Output formats are GLB, URDF, USDA, OBJ and STL; exported lengths are in metres while modeling defaults to millimetres.

It suits people who want procedural, editable 3D assets from code, and teams wiring an LLM into a modeling loop.

Install and first model

Use Python 3.13 (recommended) or 3.11. Blender ships as the bpy module: 5.2 LTS on Python 3.13 and 4.5 LTS on Python 3.11. There is no bpy wheel for Python 3.12 or for Intel Macs from 5.2 onward, so those setups should use Python 3.11.

pip install sand3d

In a uv project, uv add sand3d works instead. A minimal model that exports a filleted, drilled bracket:

import sand3d as s3d

def bracket(w=80, d=40, t=6, hole_d=6.6, pitch=50):
    plate = s3d.extrude("plate", s3d.rect(w, d, r=4), t)
    s3d.hole(plate, hole_d, on=s3d.grid(2, 1, pitch, 0))
    s3d.fillet(plate, 1, edges="top")
    return plate

s3d.export(bracket(), "bracket.glb")

This writes bracket.glb in the current directory. More runnable examples are in the quickstart, the gallery of articulated objects and the examples directory.

Using it with an LLM

Put docs/api.md into the system prompt; it contains the vocabulary rules, every signature and worked examples. llms.txt points a model at that file. For multi-part objects, the published guidelines give eight rules for assembly programs: plan first, then details, then parts (guidelines).

Formats and constraints

One export call selects the format by file extension. GLB carries meshes, materials and joints at the current pose for web, viewers and game engines. URDF gives one link per moving part with joints and limits at rest plus OBJ meshes, for ROS, PyBullet, MuJoCo and Isaac. USDA carries the tree in OpenUSD (UsdGeom, UsdPhysics) for Omniverse and Isaac Sim. OBJ and STL contain meshes only, OBJ Y-up and binary STL Z-up, for general 3D tools and slicers. .usd, .usdc and .usdz must be derived from .usda with USD's own tools.

The library is Apache-2.0 licensed. It has no category verbs such as chair(); reusable shapes are written as sand3d programs. Prebuilt datasets of sand3d programs for Objaverse, CAD, Articraft, SimReady and AutoMate sources are published on Hugging Face under CC BY 4.0 and can be browsed in the explorer.

HotRepo's take

On the new-project list for 2026-11-05, sand3d recorded 28 stars in a one-hour growth window, taking it from 103 to 131 stars with 14 forks; it did not appear in the GitHub daily all-language best-rank records. That is a very short observation window, so it supports only the statement that the project drew notice quickly after publication, not any judgment about lasting traction. The technical case rests on the token-efficiency measurements published on the project's own site and on the unusually compact API surface designed to fit inside a model prompt.

Written by AI from the project's README, updated . The project's own docs are the source of truth.