# Repository Briefing: wrong-nebula/forma
> Source: https://repoforai.com/repo/wrong-nebula/forma (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/wrong-nebula/forma
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Rust
- **License**: MIT
- **Engineering Health**: A+ (94/100 · Maintenance 35/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.4.4 (2026-12-03) — https://github.com/wrong-nebula/forma/releases
- **Review Snapshot**: 2026-12-03 (Note: v0.4.4 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: Docker, MCP, CLI, Local AI, GPU
- **Momentum**: 5,841 ★ total (+3,015 24h / +3,015 7d) · 470 forks
- **Topics**: `3d`, `3mf`, `ai-agents`, `cad`, `gltf`, `mcp`, `rust`, `step`
- **When to Use**: Best for: Agent-driven generation of dimensioned mesh parts, local batch conversion, and CPU-only previews, particularly when GLB, 3MF, STL, or faceted STEP is an acceptable handoff. Skip if: You need editable analytic CAD geometry, Blender's broader scene workflow, or native `.blend` export without a Blender dependency.

## Overview
```text
### Architecture & Core Mechanics
Forma is a Rust 2021 workspace that separates geometry (`forma-core`) and language evaluation (`forma-lang`) from the CLI, MCP, HTTP worker, and WASM packages. Forma-Pipe scripts describe operations as declarative pipelines and select edges or faces semantically. The kernel works on double-precision polyhedral meshes; transaction snapshots support iterative edits without having to reconstruct the whole interaction as a Blender `bpy` script.

The stdio MCP surface is deliberately small: `eval`, `inspect`, `tx`, and `export`, with a combined schema budget of 789 `o200k` tokens. Agents can also invoke the CLI or use the supplied GBNF grammar for constrained decoding. The `forma-3d` npm package exposes direct JS/TS calls such as `evalPipe`, `exportMesh`, and `renderPng`; the separate `forma-server` crate is an opt-in HTTP/1.1 worker, not an HTTP transport for the MCP server.

### Key Capabilities & Differentiators
The kernel uses BVH-localized constructive solid geometry with automatic chunking and fallback for multi-hole booleans. It also provides beveling, shelling, subdivision, lofts, sweeps, and linear and radial patterns. For imported GLB, OBJ, and STL meshes, topology-preserving QEM decimation provides a way to reduce mesh density before export.

The same workflow can emit a PBR GLB, a 3MF or STL for print workflows, or a faceted STEP solid for interchange. The CPU renderer produces front, right, top, and isometric PNG views; `forma draw` outputs a dimensioned 1200×900 SVG. In the reported 12-task, 144-trial suite, Forma-Pipe had a median of 115 code tokens versus 644 for `bpy`, and mean volumetric IoU was 0.9814 versus 0.8421. Those results characterize the tested parts, not arbitrary 3D workloads.

### Trade-offs & Limitations
Forma narrows the problem compared with headless Blender: a compact DSL and CPU previews reduce startup and scripting overhead for repeatable mesh jobs, at the cost of Blender's broader scene and scripting capabilities. The supplied cold-start evaluation plus GLB export measurement is 16.9 ms for Forma versus 1,306.8 ms for Blender 5.3, but it is a workload-specific result. Use your own meshes and boolean sequences when sizing a service.

The principal compatibility limit is the geometry representation. STEP export carries planar faces, not analytic cylinders or NURBS; a file that opens in CAD is not necessarily suitable for downstream editing as an analytic solid. Strict manifold checking is useful as an export gate, but does not establish dimensional correctness or printability. Native `.blend` export also requires the optional Blender bridge. Forma itself is MIT-licensed.

### Hardware & Deployment Guide
For local evaluation and export, use the native Rust build (`cargo build --release`) or the `forma-3d` npm package on Node.js 18 or newer. An MCP client can launch `forma-mcp` directly or run `npx -y -p forma-3d forma-3d-mcp`. Neither geometry evaluation nor preview needs a GPU or a hosted inference API. The measured native peak RSS was about 6–14 MB; size workers on representative inputs and concurrency rather than treating that range as a memory cap.

The Dockerfile builds and strips static `forma-server` and `forma` binaries with `rust:1.83-alpine`, then copies them into `scratch`. It starts `/forma-server` at `0.0.0.0:8080`; keep the listener private or put it behind appropriate access controls. v0.4.1 makes manifold verification strict by default across CLI, MCP, and npm/WASM (`--no-strict` or `strict: false` to opt out). It also defaults pattern operations to `union=true`, adds radial `axis=x|y|z`, and raises `max_statements` to 4096 and the `segs` ceiling to 128.
```

## Key Capabilities
```text
- Agent interface: Four stdio MCP tools (`eval`, `inspect`, `tx`, `export`) with a measured schema budget of 789 `o200k` tokens.
- Geometry kernel: Double-precision polyhedral meshes with BVH-localized booleans, automatic batching for multi-hole cuts, and topology-preserving QEM decimation.
- Validation: v0.4.1 enables strict manifold checks by default across CLI, MCP, and npm/WASM, with an explicit opt-out.
- Visual feedback: CPU-rendered four-view PNG previews and dimensioned 1200×900 SVG blueprints.
- Interchange: Imports GLB, OBJ, and STL; exports PBR GLB, 3MF, STL, OBJ, and faceted STEP. `.blend` export requires the optional Blender bridge.
- Self-hosting: The multi-stage Docker build strips static server and CLI binaries into a `scratch` image that starts `/forma-server` on port 8080.
```

## Quick Start / Clone
```bash
npx -y forma-3d eval --strict --out flange.glb --render flange.png --draw flange.svg <<'EOF'
flange = box(4, 2, 0.4)
  | mat("brushed_steel", color=(0.55, 0.68, 0.85), metallic=0.9, roughness=0.25)
  | cut(cyl(0.5, 1))
  | cut(cyl(0.25, 1), at=[(-1.4,-0.5,0), (-1.4,0.5,0), (1.4,-0.5,0), (1.4,0.5,0)])
section(flange, 0.0)
EOF
```
