Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Pin OpenCascade below 8 for CAD Viewer and text-to-cad

vinkente10bc52a93b2
diff --git a/store/agents/text-to-cad/toolchain/setup.sh b/store/agents/text-to-cad/toolchain/setup.sh
index bd95504f5..778aa9b51 100755
--- a/store/agents/text-to-cad/toolchain/setup.sh
+++ b/store/agents/text-to-cad/toolchain/setup.sh
@@ -13,7 +13,9 @@ cd "$(dirname "$0")/.."
CADGEN_VERSION="$(cat CADGEN_VERSION)"
harness_venv .venv 3.12 3.11 3.15 || exit 1
echo " installing cadgen $CADGEN_VERSION and the skills' extras (OpenCascade comes with it; minutes the first time)"
-harness_pip .venv "cadgen[snapshot]==${CADGEN_VERSION}" trimesh numpy scipy rtree networkx lxml
+# cadgen names cadquery-ocp and build123d without versions, and cadquery-ocp 8 drops TDF_LabelSequence,
+# which cadgen's STEP loader imports: pinned to the pair Autonomous Workshop builds with.
+harness_pip .venv "cadgen[snapshot]==${CADGEN_VERSION}" "cadquery-ocp==7.9.3.1.1" "build123d==0.11.1" trimesh numpy scipy rtree networkx lxml
echo "ok cadgen $CADGEN_VERSION"
node_version="$(toolchain/node.sh --version 2>&1)" || { echo "$node_version"; exit 1; }
echo "ok node $node_version (STL, 3MF and GLB exports)"
diff --git a/store/agents/text-to-cad/toolchain/test_scripts.py b/store/agents/text-to-cad/toolchain/test_scripts.py
index f1a3f1e0e..c6f7a7f01 100644
--- a/store/agents/text-to-cad/toolchain/test_scripts.py
+++ b/store/agents/text-to-cad/toolchain/test_scripts.py
@@ -132,7 +132,7 @@ class Scripts(unittest.TestCase):
])
calls = self.calls()
self.assertIn("uv venv --quiet --seed --python 3.12 --python-preference only-managed .venv", calls)
- self.assertIn(f"uv pip install --quiet --python .venv/bin/python cadgen[snapshot]=={CADGEN_VERSION} trimesh numpy scipy rtree networkx lxml", calls)
+ self.assertIn(f"uv pip install --quiet --python .venv/bin/python cadgen[snapshot]=={CADGEN_VERSION} cadquery-ocp==7.9.3.1.1 build123d==0.11.1 trimesh numpy scipy rtree networkx lxml", calls)
self.assertEqual(calls[-2:], ["venv-python -m playwright install --only-shell chromium", f"PLAYWRIGHT_BROWSERS_PATH={self.root}/.playwright"])
self.assertTrue((self.root / ".venv" / "bin" / "python").exists())
diff --git a/store/viewers/cad-viewer/setup.sh b/store/viewers/cad-viewer/setup.sh
index e81739bb9..4bbb7aff4 100755
--- a/store/viewers/cad-viewer/setup.sh
+++ b/store/viewers/cad-viewer/setup.sh
@@ -11,7 +11,9 @@ cd "$(dirname "$0")"
CADGEN_VERSION="$(cat CADGEN_VERSION)"
harness_venv .venv 3.12 3.11 3.15 || exit 1
echo " installing cadgen $CADGEN_VERSION (this pulls OpenCascade; a few minutes the first time)"
-harness_pip .venv "cadgen==${CADGEN_VERSION}"
+# cadgen names cadquery-ocp and build123d without versions, and cadquery-ocp 8 drops TDF_LabelSequence,
+# which cadgen's STEP loader imports: pinned to the pair Autonomous Workshop builds with.
+harness_pip .venv "cadgen==${CADGEN_VERSION}" "cadquery-ocp==7.9.3.1.1" "build123d==0.11.1"
echo "ok $(.venv/bin/cadgen --version 2>/dev/null || echo "cadgen $CADGEN_VERSION")"
# The doctor's check, once here: the first load of a fresh OpenCascade is slow on macOS (every new
# library is scanned once, minutes on a busy machine), and setup has the time a doctor or a pane has not.
diff --git a/store/viewers/cad-viewer/test/test_scripts.py b/store/viewers/cad-viewer/test/test_scripts.py
index 91163bd69..7023ba9d0 100644
--- a/store/viewers/cad-viewer/test/test_scripts.py
+++ b/store/viewers/cad-viewer/test/test_scripts.py
@@ -147,7 +147,7 @@ class SetupTest(ScriptTest):
])
self.assertEqual([c for c in self.calls() if c.startswith("uv ")], [
"uv venv --quiet --seed --python 3.12 --python-preference only-managed .venv",
- "uv pip install --quiet --python .venv/bin/python cadgen==0.5.1",
+ "uv pip install --quiet --python .venv/bin/python cadgen==0.5.1 cadquery-ocp==7.9.3.1.1 build123d==0.11.1",
])
self.assertTrue((self.pkg / ".pane-client-0.5.1" / ".harness-pane").is_file())