Verification
Reuse one component definition in two placements
Two touching occurrences share one reusable Block definition
What this verifies
One Block component definition is instantiated twice with a simple translated copy and no attachment relationship.
scpf source
Complete primary source from the site branch; built revision below.
class Block:
length = 40.0
width = 30.0
height = 10.0
def build(self):
return Box(self.length, self.width, self.height, anchor=Anchor.BOTTOM)
class TwoBlocks:
def build(self):
left = Block()
right = left.copy(
placement=Placement(x=Block.length),
)
# Drawing intent belongs to the finished design, not Block's reusable
# definition. SolidCraft creates the sheet and standard views natively.
return (left + right).with_drawing(
left,
name="Block drawing",
)
TwoBlocks()
Engineering explanation
Reuse one component definition in two placements
Documentation provenance: the engineering text below is copied verbatim from the last canonical
qualification/cases.pysource before its removal, commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Legacy group: components
Goal
Verify that one reusable component definition can have two occurrences with ordinary Placement and no attachment relationship.
Forge API
left = Block(); right = left.copy(placement=Placement(x=Block.length))
Forge model
Two ModelInstance occurrences share one ModelDefinition. The second occurrence carries only Placement metadata; neither occurrence carries an Attachment.
How Forge builds it in SolidCraft
Forge creates one Block component definition and one occurrence.copy with translate=[40,0,0]. No joint.create and no later occurrence.move are needed.
SolidCraft result
Two identical blocks touch face-to-face at X=20 while retaining one shared editable component definition.
Saved-design test
No mutation in this base case; parameter-driven Placement is qualified separately.
Geometry evidence
Geometry-rationale provenance: copied verbatim from
qualification/geometry_contracts.pyat commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Bounds sufficient: true
The two body sizes and positions describe the visible result. The saved SolidCraft model is checked separately to confirm that both occurrences reuse one component definition.
Reference notes
- SolidCraft — One component definition may be placed more than once; this case qualifies that basic component/occurrence structure without introducing a joint.
Generated command sequence — scpf (12)
component.create{ "bind": { "$block_occurrence_1": "occurrence", "$component_1": "component" }, "command": "component.create", "params": { "grounded": true, "name": "Block" } }solid.box{ "command": "solid.box", "params": { "body_name": "Block", "corner": [ -20.0, -15.0, 0 ], "height": 10.0, "length": 40.0, "width": 30.0 } }component.activate{ "command": "component.activate", "params": { "component": "root" } }occurrence.copy{ "bind": { "$block_occurrence_2": "occurrence" }, "command": "occurrence.copy", "params": { "component": "Block", "translate": [ 40.0, 0.0, 0.0 ] } }drawing.create{ "bind": { "$drawing_1": "id", "$drawing_1_sheet": { "field": "sheets", "select": "id", "where": { "name": "Sheet 1" } }, "$drawing_1_source": { "field": "sources", "select": "id", "where": { "path": null } } }, "command": "drawing.create", "params": { "first_sheet_name": "Sheet 1", "name": "Block drawing", "template": "iso-a4-part" } }drawing.sheet.set{ "command": "drawing.sheet.set", "params": { "documents": { "component": "$component_1", "source": "$drawing_1_source" }, "orientation": "landscape", "sheet": "$drawing_1_sheet" } }drawing.inspect{ "bind": { "$drawing_1_orientation": { "field": "sheets", "select": "orientation", "where": { "name": "Sheet 1" } } }, "command": "drawing.inspect", "params": {} }drawing.view.standard{ "bind": { "$drawing_1_front": "view", "$drawing_1_iso": "iso", "$drawing_1_right": "right", "$drawing_1_top": "top" }, "command": "drawing.view.standard", "params": { "gap_mm": 20.0, "iso": true, "sheet": "$drawing_1_sheet" } }drawing.view.edit{ "command": "drawing.view.edit", "params": { "set": { "source": { "occurrences": [ [ "$block_occurrence_1" ] ] } }, "view": "$drawing_1_front" } }drawing.view.edit{ "command": "drawing.view.edit", "params": { "set": { "source": { "occurrences": [ [ "$block_occurrence_1" ] ] } }, "view": "$drawing_1_iso" } }drawing.inspect{ "command": "drawing.inspect", "params": {} }drawing.close{ "command": "drawing.close", "params": {} }
Drawing sheet
Native SolidCraft drawing evidence from the durable build scope. The page loads only the static sheet preview; the vector PDF opens only when you ask for it.
Block drawing

Reference code
cadquery source · pass
"""CadQuery reference for two occurrences of one reusable block."""
import cadquery as cq
block = cq.Solid.makeBox(
40,
30,
10,
cq.Vector(-20, -15, 0),
)
model = cq.Assembly()
model.add(block, name="left", loc=cq.Location((0, 0, 0)))
model.add(block, name="right", loc=cq.Location((40, 0, 0)))
build123d source · pass
"""build123d reference: two positions of one block geometry."""
from build123d import Align, Box, BuildPart, Locations
bottom = (Align.CENTER, Align.CENTER, Align.MIN)
with BuildPart() as model:
with Locations((0, 0, 0), (40, 0, 0)):
Box(40, 30, 10, align=bottom)
pythonscad source · pass
"""PythonSCAD geometry reference for two side-by-side reusable blocks."""
from pythonscad import *
left = cube([40, 30, 10], center=True).up(5)
right = cube([40, 30, 10], center=True).up(5).right(40)
model = left | right
pybosl2 source · pass
"""pyBOSL2 reference using face anchors instead of copied X coordinates."""
from pybosl2 import Anchor, cuboid
left = cuboid([40, 30, 10]).up(5)
right = cuboid([40, 30, 10]).up(5)
model = left.attach(Anchor.RIGHT, right, child_anchor=Anchor.LEFT).realize()
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 | 60 × 15 × 10 | 60 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
cadquery — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 60 × 15 × 10 | 60 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
build123d — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 60 × 15 × 10 | 60 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
pythonscad — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 60 × 15 × 10 | 60 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
pybosl2 — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 60 × 15 × 10 | 60 × 15 × 10 | pass |
| Bounds / min | -20 × -15 × 0 | -20 × -15 × 0 | pass |
Model stages
- Create one reusable Block component
- Copy the same definition with a 40 mm X placement
- Return both occurrences as one assembly
- Add a native A3 technical drawing documenting the left Block component
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": [
60.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
60.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/scpf/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components-scpf-geometry"
}native — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "2cf21e8f32626c501a7db18de61e6dc2728024f97f2040f9e6426cb36891c9ef",
"size": 1975
}
],
"error": null,
"evidence": {
"body_groups": [
{
"body_envelopes": {
"actual_count": 2,
"expected_count": 2,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "Block",
"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
},
{
"actual": {
"label": "Block (Block:2)",
"max": [
60.0,
15.0,
10.0
],
"min": [
20.0,
-15.0,
0.0
]
},
"expected": {
"label": null,
"max": [
60.0,
15.0,
10.0
],
"min": [
20.0,
-15.0,
0.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 0.001,
"unmatched_actual": [],
"unmatched_expected": []
},
"count": {
"actual": 2,
"expected": 2,
"label": "Block body group count",
"pass": true
},
"matched_names": [
"Block",
"Block (Block:2)"
],
"name_prefix": "Block"
}
]
},
"id": "baseline",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components"
}visual — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "visual/front/camera.json",
"sha256": "12ba0c82f6db7f2d1132c5813f989656102fc535d62c956a518850fafdb94c92",
"size": 129
},
{
"kind": "file",
"path": "visual/front/actual.png",
"sha256": "9c9b827875598198c52eda7d74007bcb5211e54220bd43bf2e82093ace1df85c",
"size": 10294
},
{
"kind": "file",
"path": "visual/front/goal.png",
"sha256": "fd3ca131df2a276c2ed12a570dc33705ad28c0ebe76af907b0b64c7bd1c91dea",
"size": 1991
},
{
"kind": "file",
"path": "visual/front/overlay.png",
"sha256": "403d8e0c577f671d9b42739d59c04976234e772503aaf87facbcb0dcf08ecb1c",
"size": 3218
},
{
"kind": "file",
"path": "visual/front/diff.png",
"sha256": "854163557279f78af698e79a1350704a0fddca63072a68b663b780d32a9c81e7",
"size": 548
}
],
"error": null,
"evidence": {
"actual_image": "visual/front/actual.png",
"baseline": "baselines/front.json",
"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.0,
"pass": true
},
"regression_required": true,
"view": "front"
},
"id": "front",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/right/camera.json",
"sha256": "a60c99cf32e88565f81d426778318e10eafca16251eeaeb022a72c61cc64aac8",
"size": 145
},
{
"kind": "file",
"path": "visual/right/actual.png",
"sha256": "846507b4e514b1a80fc0d44c8aeb99ce1fc885cdad2b83cd6e04fc11f6b64815",
"size": 9451
},
{
"kind": "file",
"path": "visual/right/goal.png",
"sha256": "0cbe596f101c91b456b5f1772dbf0758bdbef1fea17a348c60d2a5bf46e0df2b",
"size": 1986
},
{
"kind": "file",
"path": "visual/right/overlay.png",
"sha256": "e26dd5966cbaef12c42042ee04c8607a79df64eff12a05f5d8d876f5dfd05581",
"size": 2603
},
{
"kind": "file",
"path": "visual/right/diff.png",
"sha256": "e3fcb645886d4d1d66347578483c3a3a9836a897cfa4c5a58799b8ad414965ca",
"size": 462
}
],
"error": null,
"evidence": {
"actual_image": "visual/right/actual.png",
"baseline": "baselines/right.json",
"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": "3e8047871a106ad0233b8bdd378271a406dcd1995f96c5fdc7ae02e9c26fc1a4",
"size": 160
},
{
"kind": "file",
"path": "visual/iso/actual.png",
"sha256": "a0aaa2e805e7dae5ee39b66001ea3f9d16e5fafcafd05f151780afddc19ceab3",
"size": 30157
},
{
"kind": "file",
"path": "visual/iso/goal.png",
"sha256": "0597043f07e286410fc52398db8f0b08aa50a5a044c6fcbf666336884c3ca465",
"size": 4003
},
{
"kind": "file",
"path": "visual/iso/overlay.png",
"sha256": "4e44a63e918b0de3a7972f3ce9df0b4e37c5bfb410e334a876120699f15276a9",
"size": 18533
},
{
"kind": "file",
"path": "visual/iso/diff.png",
"sha256": "f951dc26d3af1778d5413c02e825dab75d7479f455b47b09829f1d066d2c64ae",
"size": 2465
}
],
"error": null,
"evidence": {
"actual_image": "visual/iso/actual.png",
"baseline": "baselines/iso.json",
"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.001013,
"pass": true
},
"regression_required": true,
"view": "iso"
},
"id": "iso",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/scpf/model.sc",
"metadata": {
"baseline_provenance": {
"approval": "approved",
"historical_manifest_solidcraft_version": "0.30.1",
"migrated_from": "qualification/visual_baselines.json",
"migrated_without_reencoding": true,
"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": "components-scpf-visual"
}cadquery
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
60.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
60.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/cadquery/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components-cadquery-geometry"
}build123d
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
60.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
60.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/build123d/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components-build123d-geometry"
}pythonscad
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
60.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
60.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/pythonscad/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components-pythonscad-geometry"
}pybosl2
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
60.0,
15.0,
10.0
],
"actual_min": [
-20.0,
-15.0,
0.0
],
"expected_max": [
60.0,
15.0,
10.0
],
"expected_min": [
-20.0,
-15.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/components/pybosl2/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "components-pybosl2-geometry"
}










