Skip to main content

FastBuild123

Turn any build123d model into a live, interactive parametric web UI. Annotate your part function's parameters with a FastAPI-style @app.part() decorator and get auto-generated sliders in the browser with instant 3D preview — the type-annotated signature is the UI definition.

Quick start

Run a bundled example without installing anything:

uvx fastbuild123 demo enclosure

Or install it into your own project:

uv add fastbuild123      # or: pip install fastbuild123
fastbuild view my_model.py

A browser page opens with parameter controls on the left and a live 3D view on the right. Drag a slider or save the file — the model updates in place, keeping your camera pose, tree state, and clipping planes. A model that raises keeps the last-good geometry on screen with an error banner; fix the file and it recovers.

Defining parts

from typing import Annotated, Literal
from build123d import Part, Box
from fastbuild import App, Group, Range

app = App()

@app.part()
def enclosure(
    width:  Annotated[float, Range(20, 200, step=1, unit="mm")] = 80,
    wall:   Annotated[float, Range(0.8, 5, step=0.1, unit="mm")] = 2,
    ribs:   Annotated[int, Range(0, 8), Group("Ribs")] = 4,
    vented: bool = False,
    style:  Literal["rounded", "chamfered"] = "rounded",
) -> Part:
    ...

Widget mapping: float/int + Range → slider, bare numbers → number input, bool → checkbox, Literal/Enum → dropdown. Every parameter needs a default — defaults are the initial build. Multiple @app.part() functions in one file get a part selector. Add Group("Label") to a parameter's annotation to place it under a named collapsible section in the panel; ungrouped parameters render first.

Headless export

fastbuild export my_model.py enclosure --param width=120 -o enclosure.step

Values are validated against each parameter's Range; output format follows the extension (.step/.stp/.stl).

Requirements

Python 3.10–3.13 on macOS (Apple Silicon or Intel), Linux (glibc 2.31+, x86-64 or aarch64), or 64-bit Windows — wherever cadquery-ocp publishes wheels. Expect a ~500 MB install; the OpenCASCADE kernel is most of it. Alpine/musl is not supported.

Development

uv sync
uv run pytest
uv run fastbuild demo enclosure

Examples live in fastbuild/examples/ so they ship with the package and stay runnable via fastbuild demo. Specs live in specs/. The 3D component is a vendored, pinned build of three-cad-viewer (fastbuild/static/vendor/, see VERSION there) fed by ocp-tessellate output over a versioned websocket protocol.

License

MIT — see LICENSE. Bundles three-cad-viewer (MIT), whose license is included at fastbuild/static/vendor/LICENSE-three-cad-viewer.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastbuild123-0.1.0.tar.gz (628.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastbuild123-0.1.0-py3-none-any.whl (488.5 kB view details)

Uploaded Python 3

File details

Details for the file fastbuild123-0.1.0.tar.gz.

File metadata

  • Download URL: fastbuild123-0.1.0.tar.gz
  • Upload date:
  • Size: 628.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for fastbuild123-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dff4f64418e7ab17234f7ce003fda0d2e79d2d19b32dd84a713b0318a3f7cc11
MD5 8fdd8e8e7bb20cc6bfb0732c344481b1
BLAKE2b-256 9a7c37129958adcc365b64a32695fbd6b84514fbfe49caeeff3c26a6b0db2594

See more details on using hashes here.

File details

Details for the file fastbuild123-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastbuild123-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4ba913212a31b135c6b17f4b23cd1af8ad17a9b417b9b22edc1708c7fc1234
MD5 ff92bab60890b64d422f9ac7480e1bae
BLAKE2b-256 bbbb243c4ba9a29106bd97170e980dce2a3f6f2fccab9ca1b04cca7b32102a3a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page