FreeCAD model customizer
  • Rust 80.2%
  • Python 10.5%
  • CSS 6.6%
  • Dockerfile 1.2%
  • WGSL 1.1%
  • Other 0.4%
Find a file
2026-06-17 15:58:32 -06:00
assets fix initial (first load) Customizing... message 2026-06-17 12:12:55 -06:00
src clean up generate_3mf a little 2026-06-17 15:58:16 -06:00
.containerignore add stuff to run in a podman container 2026-06-17 15:58:32 -06:00
.gitignore handle multiple repos with multiple models 2026-05-15 17:18:02 -06:00
AGENTS.md AGENTS: turn off debug symbols to keep wasm-opt from crashing 2026-06-13 13:02:27 -06:00
build.rs build-time validation of the wgsl 2026-05-14 11:00:02 -06:00
Cargo.lock offer both 3mf and stl downloads 2026-06-16 09:28:22 -06:00
Cargo.toml disable some unused web-sys features 2026-06-17 10:37:30 -06:00
config.toml add support for non-customizable parts (printed-battery-holder) 2026-05-27 23:57:17 -06:00
Containerfile add stuff to run in a podman container 2026-06-17 15:58:32 -06:00
customize-freecad-model.py offer both 3mf and stl downloads 2026-06-16 09:28:22 -06:00
Dioxus.toml optimize wasm size & build in release mode 2026-06-16 21:03:01 -06:00
install-freecad-addon.py add stuff to run in a podman container 2026-06-17 15:58:32 -06:00
README.md optimize wasm size & build in release mode 2026-06-16 21:03:01 -06:00
run-container add stuff to run in a podman container 2026-06-17 15:58:32 -06:00

This is a web app to customize FreeCAD models and export as 3MF or STL.

The server clones git repos containing FreeCAD models, the web client lets the user customize the models in those repos.

Making compatible FreeCAD models

Compatible FreeCAD models have a VarSet object named "VarSet". The variables in this VarSet are exposed on the web form for customization.

Compatible repos have the following directory structure:

REPO/
├── README.md       Optional repo documentation.
├── MODEL0.FCStd    First model (filename is anything matching `*.FCStd`).
├── MODEL0.md       Optional documentation of the first model.
├── MODELn.FCStd    Any number of additional models.
└── MODELn.md       Each model may have optional documentation.

The models can have any number of VarSets, and any number of Spreadsheets. This project only exposes and customizes the variables in the primary/default VarSet, named "VarSet".

Developer info

This project uses Dioxus fullstack:

  • The backend runs the FreeCAD python console to read and write the model's variables, and to export the model's body objects as 3MF.

  • The frontend presents a form of all the variables, and uses WGPU/WASM to display the customized mesh in the browser.

Inspired by the Perplexing Labs Gridfinity Generator: https://gridfinity.perplexinglabs.com/

Install

apt install pkg-config libssl-dev
cargo install dioxus-cli

Serve

dx serve --platform web --debug-symbols false --release

The --debug-symbols false flag is required — without it wasm-opt crashes with SIGABRT on DWARF debug info. See https://github.com/DioxusLabs/dioxus/issues/5119

To serve in release mode on a specific address:

dx serve --addr ${ADDR} --platform web --release --debug-symbols false