Verification
Parameterized Box
Three editable dimensions driving one native box
What this verifies
A minimal Forge model that exposes length, width and height as editable SolidCraft parameters and lowers directly to one native Box feature.
scpf source
Complete primary source from the site branch; built revision below.
"""Smallest SCPF regression example: one parameterized, editable Box."""
class SimpleBox:
length = 40.0
width = 30.0
height = 10.0
def build(self):
return Box(
self.length,
self.width,
self.height,
anchor=Anchor.BOTTOM,
)
SimpleBox()
Engineering explanation
Parameterized Box
Documentation provenance: the engineering text below is copied verbatim from the last canonical
qualification/cases.pysource before its removal, commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Legacy group: fundamentals
Saved-design required: true
Goal
Establish the smallest model/parameter contract: three public Python fields create one editable native box.
Forge API
class fields -> Parameter; Box(length, width, height); build()
Forge model
One root Shape with symbolic length, width and height; no occurrence or assembly layer.
How Forge builds it in SolidCraft
parameters.add for the public dimensions, followed directly by native solid.box; no sketch is synthesized.
SolidCraft result
One rectangular solid with the requested 40 x 30 x 10 mm dimensions and an error-free timeline.
Saved-design test
Required because this case explicitly claims an editable native Box. Change length from 40 to 50 mm in the saved .sc design; the Box must rebuild to 50 x 30 x 10 mm without rerunning Python.
Geometry evidence
Geometry-rationale provenance: copied verbatim from
qualification/geometry_contracts.pyat commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Bounds sufficient: true
This case is one rectangular solid. Its body size fully describes the visible geometry. The saved SolidCraft model is checked separately to confirm that the dimensions remain editable parameters.
Reference notes
- OpenSCAD — cube([40,30,10]) is the constructive-geometry baseline; Forge differs by preserving editable SolidCraft history.
Generated command sequence — scpf (4)
parameters.add{ "command": "parameters.add", "params": { "expression": "40", "name": "length", "unit": "mm" } }parameters.add{ "command": "parameters.add", "params": { "expression": "30", "name": "width", "unit": "mm" } }parameters.add{ "command": "parameters.add", "params": { "expression": "10", "name": "height", "unit": "mm" } }solid.box{ "command": "solid.box", "params": { "body_name": "SimpleBox", "corner": [ "-length / 2", "-width / 2", 0 ], "height": "height", "length": "length", "width": "width" } }
Reference code
cadquery source · pass
"""CadQuery reference for the parameterized Box qualification baseline."""
import cadquery as cq
length = 40.0
width = 30.0
height = 10.0
box = cq.Solid.makeBox(
length,
width,
height,
cq.Vector(-length / 2, -width / 2, 0),
)
model = cq.Assembly()
model.add(box, name="box")
build123d source · pass
"""build123d reference for the original bottom-based SimpleBox intent."""
from build123d import Align, Box, BuildPart
length, width, height = 40.0, 30.0, 10.0
with BuildPart() as model:
Box(
length,
width,
height,
align=(Align.CENTER, Align.CENTER, Align.MIN),
)
pythonscad source · pass
"""PythonSCAD reference for the SimpleBox qualification intent.
PythonSCAD can express the same origin convention directly in cube(): the
three-character center code maps to X/Y/Z. PythonSCAD uses "-" for the side
that extends from the datum toward the positive axis, so "00-" means centered
on X and Y and extending from Z=0 to +Z. That matches Forge/SolidCraft Box
without an extra translation.
"""
from pythonscad import *
length = 40.0
width = 30.0
height = 10.0
model = cube([length, width, height], center="00-")
pybosl2 source · pass
"""pyBOSL2 reference for the SimpleBox qualification intent.
pyBOSL2 cuboid() is centered by default, but its native Anchor.BOTTOM places
the bottom-face centre at Z=0. That expresses the same origin intent as
Forge/SolidCraft Box directly; no corrective translation is needed.
"""
from pybosl2 import Anchor, cuboid
length = 40.0
width = 30.0
height = 10.0
model = cuboid(
[length, width, height],
anchor=Anchor.BOTTOM,
)
Current visual verification — scpf
Each model-owned view is evaluated independently. Actual is the current native result; Goal is the declared expected profile; Overlay combines both; Diff compares the approved regression baseline.
front
passRegression: pass · expected shape: pass
right
passRegression: pass · expected shape: pass
iso
passRegression: pass · expected shape: pass
Image overview





Only images present in the published build are displayed. Presentation previews are not visual verification results.
Verification checks
scpf — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 10 | 20 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
| Watertight | true | true | pass |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 1 | 1 | pass |
| Body envelopes / count | 1 | 1 | pass |
| Body 1 / min [mm] | -20 × -15 × 0 | -20 × -15 × 0 | — |
| Body 1 / max [mm] | 20 × 15 × 10 | 20 × 15 × 10 | — |
| SolidCraft parameters / height | 10 | 10 | pass |
| SolidCraft parameters / length | 40 | 40 | pass |
| SolidCraft parameters / width | 30 | 30 | pass |
| SolidCraft timeline | [{"error": null, "type": "BoxFeature", "warning": null}] | [{"error": null, "type": "BoxFeature", "warning": null}] | pass |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 1 | 1 | pass |
| Body envelopes / count | 1 | 1 | pass |
| Body 1 / min [mm] | -25 × -15 × 0 | -25 × -15 × 0 | — |
| Body 1 / max [mm] | 25 × 15 × 10 | 25 × 15 × 10 | — |
| SolidCraft parameters / height | 10 | 10 | pass |
| SolidCraft parameters / length | 50 | 50 | pass |
| SolidCraft parameters / width | 30 | 30 | pass |
cadquery — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 10 | 20 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
| Watertight | true | true | pass |
build123d — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 10 | 20 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
| Watertight | true | true | pass |
pythonscad — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 10 | 20 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
| Watertight | true | true | pass |
pybosl2 — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 10 | 20 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
| Watertight | true | true | pass |
Model stages
- Define editable length, width and height
- Create one bottom-anchored Box
- Lower directly to a native SolidCraft Box feature
Build and verification
- Primary implementation:
scpf - Build source:
1dead221b9ea2c31901da9a19a8c205d25272ec3 - Durable scope:
main
Implementations
- build123d — builder-build123d: build=pass, verification=pass · STL · Preview · verification · result
geometry: status=pass, adapter=mesh-geometry, runtime=ghcr.io/brainboxemb/cad-reference:v0.3.6 · verification
- cadquery — builder-cadquery: build=pass, verification=pass · STL · Preview · verification · result
geometry: status=pass, adapter=mesh-geometry, runtime=ghcr.io/brainboxemb/cad-reference:v0.3.6 · verification
- pybosl2 — builder-pybosl2: build=pass, verification=pass · STL · Preview · verification · result
geometry: status=pass, adapter=mesh-geometry, runtime=ghcr.io/brainboxemb/cad-reference:v0.3.6 · verification
- pythonscad — builder-pythonscad: build=pass, verification=pass · STL · Preview · verification · result
geometry: status=pass, adapter=mesh-geometry, runtime=ghcr.io/brainboxemb/cad-reference:v0.3.6 · verification
- scpf — builder-scpf: build=pass, verification=pass · STL · SC · Preview · commands · verification · result
geometry: status=pass, adapter=mesh-geometry, runtime=ghcr.io/brainboxemb/cad-reference:v0.3.6 · verificationnative: status=pass, adapter=solidcraft-model, runtime=ghcr.io/brainboxemb/cad-solidcraft:v0.3.6 · verificationvisual: status=pass, adapter=solidcraft-visual, runtime=ghcr.io/brainboxemb/cad-solidcraft:v0.3.6 · verification
scpf
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
20.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.25
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/scpf/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-scpf-geometry"
}native — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "ba67353e1060c65e1f1264af82b53816f60147141afbb4eb9f752057c5f23aab",
"size": 1765
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 1,
"expected": 1,
"label": "SolidCraft body count",
"pass": true
},
"body_envelopes": {
"actual_count": 1,
"expected_count": 1,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "SimpleBox",
"max": [
20.0,
15.0,
10.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"expected": {
"label": null,
"max": [
20.0,
15.0,
10.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 1e-06,
"unmatched_actual": [],
"unmatched_expected": []
},
"parameters": {
"actual": {
"height": 10.0,
"length": 40.0,
"width": 30.0
},
"expected": {
"height": 10.0,
"length": 40.0,
"width": 30.0
},
"label": "SolidCraft parameters",
"pass": true
},
"timeline": {
"actual": [
{
"error": null,
"type": "BoxFeature",
"warning": null
}
],
"expected": [
{
"error": null,
"type": "BoxFeature",
"warning": null
}
],
"label": "SolidCraft timeline",
"pass": true
}
},
"id": "baseline",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/length_50/model.sc",
"sha256": "ce9ee13a996371bd947705729d9951b1764382b9be1d7912631c33ff25e72bad",
"size": 4079
},
{
"kind": "file",
"path": "saved_designs/length_50/measurements.json",
"sha256": "e6ae6bbd530929508c366f5f4677b65c687f525b8306a0e836c87cfcaf1e6ed0",
"size": 1717
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 1,
"expected": 1,
"label": "SolidCraft body count",
"pass": true
},
"body_envelopes": {
"actual_count": 1,
"expected_count": 1,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "SimpleBox",
"max": [
25.0,
15.0,
10.0
],
"min": [
-25.0,
-15.0,
0.0
]
},
"expected": {
"label": null,
"max": [
25.0,
15.0,
10.0
],
"min": [
-25.0,
-15.0,
0.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 1e-06,
"unmatched_actual": [],
"unmatched_expected": []
},
"parameters": {
"actual": {
"height": 10.0,
"length": 50.0,
"width": 30.0
},
"expected": {
"height": 10.0,
"length": 50.0,
"width": 30.0
},
"label": "SolidCraft parameters",
"pass": true
}
},
"id": "saved_design_length_50",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box"
}visual — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "visual/front/camera.json",
"sha256": "838fae9449d4d29d611f62412bea8553d837a3ed896b3db3efbe74615e3de20e",
"size": 127
},
{
"kind": "file",
"path": "visual/front/actual.png",
"sha256": "4150d5d4da92597ac3c5b1b9731c1006b783d2a49fc9313ba1aaf5e0b0647677",
"size": 9769
},
{
"kind": "file",
"path": "visual/front/goal.png",
"sha256": "515d7fa11467bd5cefb2cbdd2bc49fb8f1d7e22102ad92a4043cb7d1c09e7d58",
"size": 1986
},
{
"kind": "file",
"path": "visual/front/overlay.png",
"sha256": "c71e07dc5f04702f13f688f9b2dbd3138978fad7c27c6b83df578c604b416cc9",
"size": 2799
},
{
"kind": "file",
"path": "visual/front/diff.png",
"sha256": "8a9224b3ddee2d6dd9bcb08ec333cf79d46b2a80fcbd1e2af649642152dde7cc",
"size": 470
}
],
"error": null,
"evidence": {
"actual_image": "visual/front/actual.png",
"baseline": "baselines/front.png",
"baseline_status": "pass",
"camera": "visual/front/camera.json",
"diff_image": "visual/front/diff.png",
"expected_shape_required": true,
"expected_shape_status": "pass",
"goal_image": "visual/front/goal.png",
"overlay_image": "visual/front/overlay.png",
"regression": {
"changed_pixel_fraction": 0.0,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.000289,
"pass": true
},
"regression_required": true,
"view": "front"
},
"id": "front",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/right/camera.json",
"sha256": "b898f9c370239f04f6d076289df69ccb1f328c8f3bb60cd364cb85947ab6f709",
"size": 143
},
{
"kind": "file",
"path": "visual/right/actual.png",
"sha256": "f0bce7728130ead8a35771e2365eb903da69fa4bc76653827427ec8ba0361513",
"size": 9741
},
{
"kind": "file",
"path": "visual/right/goal.png",
"sha256": "94a15936bdb1a5afa3d9018321210403da9eb3b0a8fb33efbf3c3605674c7b7d",
"size": 1984
},
{
"kind": "file",
"path": "visual/right/overlay.png",
"sha256": "9557b0d8628521c760f8e6e53aca76e6ad592da02afc64e1b79e9d9f17363157",
"size": 2810
},
{
"kind": "file",
"path": "visual/right/diff.png",
"sha256": "c6d86801ff7a31a180af9b674f8a2f211de1c96fb3e1660a28bb444f61377e80",
"size": 453
}
],
"error": null,
"evidence": {
"actual_image": "visual/right/actual.png",
"baseline": "baselines/right.png",
"baseline_status": "pass",
"camera": "visual/right/camera.json",
"diff_image": "visual/right/diff.png",
"expected_shape_required": true,
"expected_shape_status": "pass",
"goal_image": "visual/right/goal.png",
"overlay_image": "visual/right/overlay.png",
"regression": {
"changed_pixel_fraction": 0.0,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.0,
"pass": true
},
"regression_required": true,
"view": "right"
},
"id": "right",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/iso/camera.json",
"sha256": "4b0d48ccf6a4a2ff1508b5edc691a2e54a29a4cb3e65f1336b20a54aadde8edb",
"size": 158
},
{
"kind": "file",
"path": "visual/iso/actual.png",
"sha256": "88f4b1d0c6bc12eef4096ca75b662abb7e78b0484738e53b9d080d1693c69646",
"size": 33601
},
{
"kind": "file",
"path": "visual/iso/goal.png",
"sha256": "88582c256fd922989ee3c3f626e07e969a7c0c202cbf7dc0e741bec90da6062d",
"size": 4092
},
{
"kind": "file",
"path": "visual/iso/overlay.png",
"sha256": "91d8620c5437b22553bc9d17fe1d4822013336503831c0e4d9937f6e2a257929",
"size": 20752
},
{
"kind": "file",
"path": "visual/iso/diff.png",
"sha256": "5b59039596b82c572da7cc512d47bef54518b8a9d9716275fd02bbb278301bbb",
"size": 2874
}
],
"error": null,
"evidence": {
"actual_image": "visual/iso/actual.png",
"baseline": "baselines/iso.png",
"baseline_status": "pass",
"camera": "visual/iso/camera.json",
"diff_image": "visual/iso/diff.png",
"expected_shape_required": true,
"expected_shape_status": "pass",
"goal_image": "visual/iso/goal.png",
"overlay_image": "visual/iso/overlay.png",
"regression": {
"changed_pixel_fraction": 0.0,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.001881,
"pass": true
},
"regression_required": true,
"view": "iso"
},
"id": "iso",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/scpf/model.sc",
"metadata": {
"baseline_provenance": {
"approval": "approved",
"historical_manifest_solidcraft_version": "0.30.1",
"review_source_commit": "5a8c5253db8c75200af286078f59e9699a85d142",
"source_commit": "8acad149cdaaef729c2cd6f6929b9c73bf785ec8",
"verified_during_solidcraft_0_42_0_qualification": true
},
"kind": "solidcraft-visual",
"measurements": "measurements.json",
"visual_report": "visual.json"
},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-scpf-visual"
}cadquery
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
20.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.25
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/cadquery/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-cadquery-geometry"
}build123d
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
20.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.25
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/build123d/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-build123d-geometry"
}pythonscad
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
20.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.25
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/pythonscad/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-pythonscad-geometry"
}pybosl2
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
20.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.25
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/simple-box/pybosl2/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "simple-box-pybosl2-geometry"
}










