Forge Documentation
Getting Started
Install ForgeCAD and build your first parametric model in under 10 minutes.
Python package
The fastest way to get started. Requires Python 3.10+.
pip install forgecadVerify the installation:
python -c "import forgecad; print(forgecad.__version__)"Your first model
Create a simple parametric box and export it as STEP:
import forgecad as fc
# Create a new document
doc = fc.Document()
# Add a box: width=50mm, depth=30mm, height=20mm
box = doc.add_box(width=50, depth=30, height=20)
# Apply a fillet to all edges
box.fillet(radius=2.0)
# Export
doc.export("my_first_model.step")
print("Exported:", doc.mass_properties().volume, "mm³")
The Document object is the root of every ForgeCAD model. You add features to it, and it manages the parametric history tree.
Parametric driven by variables
The real power is driving geometry from named parameters:
import forgecad as fc
doc = fc.Document()
# Define parameters
doc.set_param("wall_thickness", 3.0) # mm
doc.set_param("outer_diameter", 40.0)
doc.set_param("height", 60.0)
# Build from parameters
outer = doc.add_cylinder(
radius=doc.param("outer_diameter") / 2,
height=doc.param("height")
)
inner = doc.add_cylinder(
radius=(doc.param("outer_diameter") - 2 * doc.param("wall_thickness")) / 2,
height=doc.param("height")
)
# Boolean subtraction
tube = outer - inner
doc.export("tube.sfc") # Native .SFC format preserves parameters
Changing wall_thickness and re-running rebuilds the geometry automatically. The .sfc format preserves the full parameter table and history tree.
Desktop app
The desktop GUI runs on macOS, Linux, and Windows. Download from the portal:
After installing, the app can open .sfc files you create with the Python API. Changes you make in the GUI are reflected in the file's parameter table and can be read back in Python.
The GUI requires a Studio or Pro licence. The Python API (headless) is free under the Community tier.
Docker
Run ForgeCAD as a headless server — useful for CI/CD pipelines, batch geometry processing, or self-hosted deployments.
# Pull the image
docker pull skyfire/forgecad
# Run interactively
docker run -it --rm -v $(pwd):/workspace skyfire/forgecad python
# Or run a script directly
docker run --rm -v $(pwd):/workspace skyfire/forgecad python /workspace/my_script.py
For server deployments that expose the WebSocket API, use docker-compose:
# docker-compose.yml
services:
forgecad:
image: skyfire/forgecad
ports:
- "8765:8765" # WebSocket API
volumes:
- ./data:/data
environment:
FORGE_API_KEY: your_api_key_here
The WebSocket API listens on port 8765 by default. See the API reference for available methods.
Supported file formats
| Format | Import | Export | Notes |
|---|---|---|---|
.sfc | ✓ | ✓ | Native — preserves parameters and history |
| STEP AP203/AP214/AP242 | ✓ | ✓ | Recommended for external exchange |
| IGES 5.3 | ✓ | ✓ | Legacy interop |
| DXF | ✓ | ✓ | 2D drawing exchange |
| IDF 2.0 / 3.0 | ✓ | ✓ | PCB layout exchange (ForgeSchematics) |
| — | ✓ | 2D drawing output | |
| SVG | — | ✓ | 2D drawing output |
Next steps
- Python API reference — full method index
- Geometry API methods — extrude, revolve, boolean, fillet, shell, and more
- Integration guides — connect to ForgeMachine, ForgeOps, and more
- Workflow guides — end-to-end examples