Download README.md from HelloSun/WFreeCAD: direct link, hf CLI and curl.
- Browser
- Download file 2.04 kB
-
https://huggingface.co/spaces/HelloSun/WFreeCAD/resolve/main/README.md
- Command line
-
hf download hf://spaces/HelloSun/WFreeCAD/README.md
-
curl -L -o README.md https://huggingface.co/spaces/HelloSun/WFreeCAD/resolve/main/README.md
title: WFreeCAD
emoji: ⚙️
colorFrom: yellow
colorTo: red
sdk: static
pinned: false
short_description: A tiny in-browser FreeCAD Part studio
WFreeCAD
A tiny, static, in-browser FreeCAD Python playground. Pick a Part macro, orbit the result, edit the code, and run it again.
- Four instant examples: a spur gear, a desktop computer, a rocket, and a mug.
- Upload any
.pymacro that uses the supportedFreeCAD/Partsubset. - Live execution happens locally in a Pyodide Web Worker; nothing is sent to a server.
- Results are rendered with Three.js and
three-bvh-csg, with soft shadows and an optional edge overlay.
How it works
Example scenes are precomputed with cadshim.py under CPython and stored as scenes/*.json, so the examples render immediately without downloading Python. Uploaded macros are executed by Pyodide in worker.js, serialized into the same scene JSON format, and displayed by viewer.js.
The shim supports a practical subset of FreeCAD's Part API:
FreeCAD.Vector,Rotation,Placement, andActiveDocumentPart.makeBox,makeCylinder,makeSphere,makeCone,makeTorus,makePolygonPart.Face,Shape.extrude,Shape.cut,Shape.fuse,Shape.commonPart.show,ViewObject.ShapeColor, andViewObject.Transparency
It is intentionally not a full FreeCAD distribution. Unsupported API calls return a clear error in the preview panel.
Local development
cd wfreecad
python3 -m http.server 8123
Open http://127.0.0.1:8123/.
Examples are generated by:
python3 tools/build_scenes.py
Thumbnails are rendered from tools/thumb.html through the same Three.js viewer, so their materials and lighting match the main preview.
Stack
- Three.js + three-bvh-csg
- Pyodide
- CodeMirror 5
- Custom FreeCAD Part shim and static scene format
No backend, database, or build step is required at runtime.