Skip to main content

Installation

CadFlow currently ships as a source-built Python package. Install the matching OpenCascade runtime first so CMake can discover the OCCT 7.9.3 headers and shared libraries during the package build.

Requirements

The full build is tested with:

  • Linux x86-64
  • Python 3.10 through 3.13
  • CMake 3.16 or newer
  • A C++17 compiler
  • Python development headers
  • OpenCascade 7.9.3, supplied by cadquery-ocp==7.9.3.1
Platform scope

Current CMake discovery targets Linux .so libraries. Windows and macOS need platform-specific discovery support and are not part of the tested full-build matrix yet.

Install system tools

On Ubuntu or Debian:

sudo apt update
sudo apt install build-essential cmake python3-dev

Confirm that Python is in the supported range:

python3 --version
cmake --version

Build in a virtual environment

git clone https://github.com/yhz5613813/CadFlow.git
cd CadFlow

python3 -m venv .venv
source .venv/bin/activate

python -m pip install --upgrade pip setuptools wheel
python -m pip install "cadquery-ocp==7.9.3.1"
python -m pip install --no-build-isolation .

Installing cadquery-ocp before CadFlow makes the matching OCCT files visible inside the active environment. --no-build-isolation lets the source build discover those files instead of compiling in an isolated environment that cannot see them.

Verify the backend

Run a geometry operation and check its measured volume:

python - <<'PY'
import cadflow

with cadflow.Model() as model:
box = model.box(2, 3, 4)
print("CadFlow", cadflow.__version__)
print("kind:", box.kind)
print("volume:", box.volume)
print("topology:", box.topology)
PY

The version should be 0.1.0 and the volume should be 24.0.

Optional features

Install only the extras required by your workflow:

# PNG rendering and image inspection
python -m pip install vtk pillow

# Collision checks
python -m pip install "python-fcl>=0.7.0.11"

# Inspection plots
python -m pip install "matplotlib>=3.7.0"

The core package already includes NumPy, Rich, JSON Schema support, the sketch solver, and the Gordon-surface helper.

Next step

Continue to the Quickstart to build a mounting plate and export STEP and GLB artifacts.