opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

OpenCascade CAD in the browser, with an AI assistant sharing the same undo stack
GitHub RepoViews8

Project Description

View on GitHub

CAD in Your Browser, With an AI That Shares Your Undo Stack

You've probably seen browser-based CAD demos that look impressive until you try to actually model something. The geometry gets sluggish, the feature tree is a toy, or the AI assistant is a chat sidebar that can't touch your actual document. Chili3D is an attempt to fix all three at once—it's an open-source 3D CAD application that runs OpenCascade in the browser, and its AI assistant operates on the same document, viewport, and undo stack as everything else.

What It Does

Chili3D is a browser-based 3D CAD tool for parametric and direct modeling, written in TypeScript. It compiles OpenCascade (OCCT) to WebAssembly for the geometry kernel and renders through Three.js, aiming for near-native modeling performance without installing anything. You get a real feature tree, a properties panel, and a 3D viewport—the kind of interface you'd recognize from Onshape or Fusion.

The interesting part is how the AI fits in. The built-in assistant runs entirely in the browser and calls your chosen LLM endpoint directly with your own API key—there's no relay server in the middle. It reads and writes the same document, selection, and feature tree as the regular commands, and every change it makes lands in the same undo stack. A shape you build by hand can be edited by the assistant, and an AI-built body is still a feature tree you can go back and change.

Why It's Cool

The shared undo stack is the whole pitch. Most AI-assisted design tools treat the assistant as a separate layer that generates geometry and hands it over. Here, the assistant is just another client of the same commands. That means the boundary between "I made this" and "the AI made this" effectively disappears—you can undo an AI edit the same way you'd undo your own.

It's document-aware, not just prompt-aware. The assistant reads the document tree, the geometry, and your current selection, and it can capture viewport screenshots. So "make this flange thicker" resolves against the right nodes instead of guessing. It can also measure lengths, areas, and volumes, query face and curve types, set materials, manage document variables, and export results—all through chat.

Two modeling paths, deliberately separated. run_program applies modeling operations and produces geometry (one call equals one undo step). run_parametric builds a parametric feature tree you can keep editing afterward. That distinction matters: sometimes you want a quick result, sometimes you want something maintainable.

The prompt stays small on purpose. Guidance for the app, the modeling API, shape queries, recipes, error recovery, and parametric modeling are loaded only when the model asks for them—on-demand skills rather than one giant system prompt. Conversations are saved locally with automatic context budgeting that compacts old turns into a condensed journal instead of dropping the thread.

You can bring your own model. It supports the Anthropic API, OpenAI Completions, and OpenAI Responses, with configurable base URL, model, reasoning effort, and context window. Your API key is kept only for the session and can be handed to the browser's password manager.

There's an escape hatch for external agents. Passing ?bridge=<port> connects the page to a local process over an outbound WebSocket (default port 17373). That process—the separate chili3d-mcp server—calls the same tool registry the chat panel uses, so an external agent can read and edit the open document. Without the parameter, none of it loads.

How to Try It

The fastest route is the hosted version—no build step required:

  1. Head to chili3d.com, or use the Cloudflare mirror as a backup.
  2. Configure your LLM provider (Anthropic or OpenAI) and supply your own API key in the assistant settings.
  3. Start modeling—or describe a part and watch the assistant build it.

If you'd rather run it yourself or dig into the source, the code lives at github.com/xiangechen/chili3d. It's TypeScript, so if you're comfortable with a Node toolchain you'll feel at home. The README also shows a nice example of the assistant in action: given one sentence, it builds a wrought-iron table, diagnoses a failed sweep call on its own, corrects it, and retextures the top.

Final Thoughts

Chili3D is best suited to developers and tinkerers who want to understand how AI-assisted CAD could actually work—people who care that the assistant shares state with the rest of the app rather than sitting beside it. It's also a solid reference if you're building anything with OCCT in WebAssembly. If you just need production CAD today, you'll want to evaluate it against your own workflows first. But as a demonstration of AI and direct manipulation coexisting in one document, it's the most coherent design I've seen in this space—and it's open source, so you can read exactly how it's done.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: chili3dLast updated: November 26, 2026 at 02:47 AM