Verification
As-built rigid relationship preserves pose
A pre-positioned child keeps its authored pose when a rigid as-built relationship is recorded
What this verifies
Base and Marker keep their already authored occurrence poses while SolidCraft records a native rigid as-built relationship between them.
scpf source
Complete primary source from the site branch; built revision below.
"""Qualification: as-built attachment preserves an existing child pose."""
class Base:
WIDTH = 40.0
DEPTH = 30.0
HEIGHT = 10.0
def build(self):
return Box(self.WIDTH, self.DEPTH, self.HEIGHT)
class Marker:
LENGTH = 30.0
WIDTH = 10.0
HEIGHT = 8.0
def build(self):
return Box(self.LENGTH, self.WIDTH, self.HEIGHT)
class AsBuiltAttach:
def build(self):
base = Base()
marker = Marker(
placement=Placement(
x=50,
y=20,
z=15,
rotation=((0, 0, 1), 90),
)
).attach(base, as_built=True)
return base + marker
AsBuiltAttach()
Engineering explanation
As-built rigid relationship preserves pose
Documentation provenance: historical Qualification case text from commit
6472c7ca02090d83a0fedc8ca18f947a3d3d56ca; lowering wording updated during #559 for replay-bound occurrence IDs restored by change 0013 / #191.
Legacy group: components
Saved-design required: false
Goal
Verify that attach(as_built=True) records a rigid native assembly relationship without re-positioning or re-orienting a child occurrence that already has an authored pose.
Forge API
Marker(placement=Placement(x=50, y=20, z=15, rotation=(Z,90))).attach(base, as_built=True)
Forge model
One Base and one non-square Marker occurrence. The Marker already owns a translation and rotation before the Attachment is added; the as-built relationship carries no parent/child anchor, offset, gap or angle.
How Forge builds it in SolidCraft
Forge binds the real Base and Marker occurrence IDs returned by native component creation, applies the complete Marker pose through replay-bound occurrence.move, then emits joint.as_built(type=‘rigid’) using those bound IDs. No predicted Component:N occurrence name and no anchor-origin solve is used.
SolidCraft result
The Base remains centred at Z=0: [-20,-15,-5]..[20,15,5]. The 30x10 Marker remains quarter-turned to a 10x30 footprint at [45,5,11]..[55,35,19] after the native as-built joint is created.
Saved-design test
Not required: an as-built relationship intentionally captures the current relative pose rather than defining a parameter-driven placement rule.
Geometry evidence
Geometry-rationale provenance: X/Y placement restored from
qualification/expectations.pyat commit6472c7ca02090d83a0fedc8ca18f947a3d3d56ca; Z bounds updated for the currentBox(..., anchor=Anchor.CENTER)contract introduced by change 0022.
Bounds sufficient: true
The two disjoint rectangular body envelopes fully describe the baseline pose; command-contract verification separately proves that the native relationship is an as-built rigid joint rather than a repositioning attachment.
Reference notes
- SolidCraft — The native as-built rigid relationship constrains two already-positioned occurrences without solving a new mating position.
- PythonSCAD — Independent geometry preserves the translated and rotated Marker pose without using Forge.
- pyBOSL2 — Independent bottom-anchored geometry verifies the same world-space Marker envelope.
- CadQuery — Assembly Location independently represents the authored occurrence pose.
- build123d — Independent placed and rotated box geometry verifies the same visible baseline.
Generated command sequence — scpf (9)
component.create{ "bind": { "$base": "occurrence" }, "command": "component.create", "params": { "grounded": true, "name": "Base" } }solid.box{ "command": "solid.box", "params": { "body_name": "Base", "center": [ 0, 0, 0 ], "height": 10.0, "length": 40.0, "width": 30.0 } }component.activate{ "command": "component.activate", "params": { "component": "root" } }component.create{ "bind": { "$marker": "occurrence" }, "command": "component.create", "params": { "grounded": false, "name": "Marker" } }solid.box{ "command": "solid.box", "params": { "body_name": "Marker", "center": [ 0, 0, 0 ], "height": 8.0, "length": 30.0, "width": 10.0 } }component.activate{ "command": "component.activate", "params": { "component": "root" } }occurrence.move{ "command": "occurrence.move", "params": { "angle": "90 deg", "axis": [ 0.0, 0.0, 1.0 ], "occurrence": "$marker", "translate": [ 50, 20, 15 ] } }joint.as_built{ "command": "joint.as_built", "params": { "a": "$base", "b": "$marker", "name": "Attach Marker to Base", "type": "rigid" } }browser.visibility{ "command": "browser.visibility", "params": { "folder": "joints", "visible": false } }
Reference code
cadquery source · pass
"""CadQuery assembly reference preserving an already authored marker pose.
The Assembly Location expresses the occurrence pose independently of any
constraint. Forge additionally qualifies the persisted SolidCraft as-built
relationship.
"""
import cadquery as cq
base = cq.Solid.makeBox(40, 30, 10, cq.Vector(-20, -15, -5))
marker = cq.Solid.makeBox(30, 10, 8, cq.Vector(-15, -5, -4))
marker_pose = (
cq.Location((50, 20, 15))
* cq.Location(cq.Vector(0, 0, 0), cq.Vector(0, 0, 1), 90)
)
model = cq.Assembly()
model.add(base, name="base")
model.add(marker, name="marker", loc=marker_pose)
build123d source · pass
"""build123d reference: preserve an already positioned and rotated marker."""
from build123d import Align, Box, BuildPart, Locations, Rot
center = (Align.CENTER, Align.CENTER, Align.CENTER)
with BuildPart() as model:
Box(40, 30, 10, align=center)
with Locations((50, 20, 15)):
with Locations(Rot(0, 0, 90)):
Box(30, 10, 8, align=center)
pythonscad source · pass
"""PythonSCAD geometry reference for preserving an already positioned marker.
Both boxes use their centre datum, matching the current Forge Box default from
change 0022. Forge additionally records a native SolidCraft as-built
relationship without re-solving this visible pose.
"""
from pythonscad import *
base = cube([40, 30, 10], center=True)
marker = (
cube([30, 10, 8], center=True)
.rotate([0, 0, 90])
.translate([50, 20, 15])
)
model = base | marker
pybosl2 source · pass
"""pyBOSL2 geometry reference for an already positioned marker.
Both boxes use their centre datum, matching the current Forge Box default.
Forge's as_built=True additionally records a native SolidCraft relationship
without re-solving this visible pose.
"""
from pybosl2 import cuboid
base = cuboid([40, 30, 10])
marker = (
cuboid([30, 10, 8])
.rotate(90, [0, 0, 1])
.translate([50, 20, 15])
)
model = base | marker
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 | 55 × 35 × 19 | 55 × 35 × 19 | pass |
| Bounds / min | -20 × -15 × -5 | -20 × -15 × -5 | pass |
| Volume / mm3 | 14400 | 14400 | pass |
| Watertight | true | true | pass |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Body envelopes / count | 2 | 2 | pass |
| Body 1 / min [mm] | -20 × -15 × -5 | -20 × -15 × -5 | — |
| Body 1 / max [mm] | 20 × 15 × 5 | 20 × 15 × 5 | — |
| Body 2 / min [mm] | 45 × 5 × 11 | 45 × 5 × 11 | — |
| Body 2 / max [mm] | 55 × 35 × 19 | 55 × 35 × 19 | — |
cadquery — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 55 × 35 × 19 | 55 × 35 × 19 | pass |
| Bounds / min | -20 × -15 × -5 | -20 × -15 × -5 | pass |
| Volume / mm3 | 14400 | 14400 | pass |
| Watertight | true | true | pass |
build123d — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 55 × 35 × 19 | 55 × 35 × 19 | pass |
| Bounds / min | -20 × -15 × -5 | -20 × -15 × -5 | pass |
| Volume / mm3 | 14400 | 14400 | pass |
| Watertight | true | true | pass |
pythonscad — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 55 × 35 × 19 | 55 × 35 × 19 | pass |
| Bounds / min | -20 × -15 × -5 | -20 × -15 × -5 | pass |
| Volume / mm3 | 14400 | 14400 | pass |
| Watertight | true | true | pass |
pybosl2 — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 55 × 35 × 19 | 55 × 35 × 19 | pass |
| Bounds / min | -20 × -15 × -5 | -20 × -15 × -5 | pass |
| Volume / mm3 | 14400 | 14400 | pass |
| Watertight | true | true | pass |
Model stages
- Create reusable Base and Marker components
- Move Marker to its authored translated and rotated pose
- Record a rigid as-built relationship without re-solving the pose
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": [
55.0,
35.0,
19.0
],
"actual_min": [
-20.0,
-15.0,
-5.0
],
"expected_max": [
55.0,
35.0,
19.0
],
"expected_min": [
-20.0,
-15.0,
-5.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
},
"volume": {
"actual_mm3": 14400.0,
"delta_mm3": 0.0,
"expected_mm3": 14400.0,
"pass": true,
"tolerance_mm3": 2.0
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/scpf/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach-scpf-geometry"
}native — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "b85d519b7d49a9e6400794be37d5c80d14dbb013fc39fd90ce623d88b8761544",
"size": 2173
}
],
"error": null,
"evidence": {
"body_envelopes": {
"actual_count": 2,
"expected_count": 2,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "Base",
"max": [
20.0,
15.0,
5.0
],
"min": [
-20.0,
-15.0,
-5.0
]
},
"expected": {
"label": null,
"max": [
20.0,
15.0,
5.0
],
"min": [
-20.0,
-15.0,
-5.0
]
},
"max_delta": 0.0
},
{
"actual": {
"label": "Marker",
"max": [
55.0,
35.0,
19.0
],
"min": [
45.0,
5.0,
11.0
]
},
"expected": {
"label": null,
"max": [
55.0,
35.0,
19.0
],
"min": [
45.0,
5.0,
11.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 0.001,
"unmatched_actual": [],
"unmatched_expected": []
}
},
"id": "baseline",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach"
}visual — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "visual/front/camera.json",
"sha256": "6d73d408dedf8fb1eaa3ec8f4ede2d83d7926184098569db23dacfff86d155f9",
"size": 131
},
{
"kind": "file",
"path": "visual/front/actual.png",
"sha256": "1adc7381364c76fbbb8afd7efb8371538d097d0c06ad102cbddc683cba123ff3",
"size": 10136
},
{
"kind": "file",
"path": "visual/front/goal.png",
"sha256": "02df0199f0df0287a1a426c8a1c8d20977e0f4ea356d504aaf5cdd8a199542bf",
"size": 2010
},
{
"kind": "file",
"path": "visual/front/overlay.png",
"sha256": "f059513c4c0868c17b8a29b796796027a49d6f0b2749a71de555c225070cd337",
"size": 3306
},
{
"kind": "file",
"path": "visual/front/diff.png",
"sha256": "db0a72dd32a6238267ddf604847edd4beb0204b07b1676ecb99cace86a9f736b",
"size": 867
}
],
"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.010706,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.384404,
"pass": true
},
"regression_required": true,
"view": "front"
},
"id": "front",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/right/camera.json",
"sha256": "7aca932bc18ba677a3d3f366247a15b4d0367b6fbb5949b59178ec2c7efe9cf8",
"size": 147
},
{
"kind": "file",
"path": "visual/right/actual.png",
"sha256": "4a90cca13dada80e06964a479603c1b21942d5058581be87760f017edd83e918",
"size": 10016
},
{
"kind": "file",
"path": "visual/right/goal.png",
"sha256": "c68eab05e556f49e474c80d00e967a3b7ff6284898da4bf813080ded860cd7e4",
"size": 2004
},
{
"kind": "file",
"path": "visual/right/overlay.png",
"sha256": "4b430fb5e87b1e8d24bafadb236c90f68b8bdfabfa94057cf4f80c32b6adf429",
"size": 3095
},
{
"kind": "file",
"path": "visual/right/diff.png",
"sha256": "9b48d5798dfcbe0318f43b0690cc24544635869e892d1144bbc74fb481e64375",
"size": 839
}
],
"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.013166,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.467882,
"pass": true
},
"regression_required": true,
"view": "right"
},
"id": "right",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/iso/camera.json",
"sha256": "6460095ab6e06d7c3f3f5f8ace0bd121242fa0d1ef79eaf5b40ca31845d1f96c",
"size": 162
},
{
"kind": "file",
"path": "visual/iso/actual.png",
"sha256": "a81c9ade1ac1a3f859496f168a795675d17b22b312f16426befc122b3ac4fb18",
"size": 29488
},
{
"kind": "file",
"path": "visual/iso/goal.png",
"sha256": "a08d4a9ac6d462eee225e08c1e62daa17acd7b8681f7b4e1ad78338232ea21df",
"size": 3765
},
{
"kind": "file",
"path": "visual/iso/overlay.png",
"sha256": "1fe4366b1ffd4a977ce46f848f0dcebaabadbfd87d4852ef0192470747fb58bf",
"size": 18197
},
{
"kind": "file",
"path": "visual/iso/diff.png",
"sha256": "ed1e98088d631164b1a95b8fce055eb260b7ff9aa9bfd6a561d37e57ee0734a8",
"size": 3701
}
],
"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.026765,
"changed_pixel_threshold": 12,
"max_changed_fraction": 0.08,
"max_mean_difference": 6.0,
"mean_absolute_difference": 0.857639,
"pass": true
},
"regression_required": true,
"view": "iso"
},
"id": "iso",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/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": "7e33ce930e6cef68e0cfaf8f77af265e00a07890",
"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": "as-built-attach-scpf-visual"
}cadquery
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
55.0,
35.0,
19.0
],
"actual_min": [
-20.0,
-15.0,
-5.0
],
"expected_max": [
55.0,
35.0,
19.0
],
"expected_min": [
-20.0,
-15.0,
-5.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
},
"volume": {
"actual_mm3": 14400.0,
"delta_mm3": 0.0,
"expected_mm3": 14400.0,
"pass": true,
"tolerance_mm3": 2.0
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/cadquery/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach-cadquery-geometry"
}build123d
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
55.0,
35.0,
19.0
],
"actual_min": [
-20.0,
-15.0,
-5.0
],
"expected_max": [
55.0,
35.0,
19.0
],
"expected_min": [
-20.0,
-15.0,
-5.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
},
"volume": {
"actual_mm3": 14400.0,
"delta_mm3": 0.0,
"expected_mm3": 14400.0,
"pass": true,
"tolerance_mm3": 2.0
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/build123d/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach-build123d-geometry"
}pythonscad
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
55.0,
35.0,
19.0
],
"actual_min": [
-20.0,
-15.0,
-5.0
],
"expected_max": [
55.0,
35.0,
19.0
],
"expected_min": [
-20.0,
-15.0,
-5.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
},
"volume": {
"actual_mm3": 14400.0,
"delta_mm3": 0.0,
"expected_mm3": 14400.0,
"pass": true,
"tolerance_mm3": 2.0
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/pythonscad/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach-pythonscad-geometry"
}pybosl2
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
55.0,
35.0,
19.0
],
"actual_min": [
-20.0,
-15.0,
-5.0
],
"expected_max": [
55.0,
35.0,
19.0
],
"expected_min": [
-20.0,
-15.0,
-5.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
},
"volume": {
"actual_mm3": 14400.0,
"delta_mm3": 0.0,
"expected_mm3": 14400.0,
"pass": true,
"tolerance_mm3": 2.0
},
"watertight": {
"actual": true,
"expected": true,
"pass": true
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/as-built-attach/pybosl2/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "as-built-attach-pybosl2-geometry"
}










