Verification
Editable local offset at an attachment
Attachment-plane offset keeps its local coordinate meaning
What this verifies
A Marker is corner-attached to a Base with a symbolic local planar offset that remains editable in the saved SolidCraft relationship.
scpf source
Complete primary source from the site branch; built revision below.
class Base:
def build(self):
return Box(40, 30, 20, anchor=Anchor.BOTTOM)
class Marker:
def build(self):
return Box(10, 10, 10, anchor=Anchor.BOTTOM)
class ParametricOffset:
shift = 5.0
def build(self):
base = Base()
marker = Marker().attach(
base,
parent=Anchor.FRONT_TOP_RIGHT,
child=Anchor.BACK_TOP_RIGHT,
offset=(0, -self.shift),
)
return base + marker
ParametricOffset()
Engineering explanation
Editable local offset at an attachment
Documentation provenance: the engineering text below is copied verbatim from the last canonical
qualification/cases.pysource before its removal, commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Legacy group: associativity
Saved-design required: true
Goal
Verify the existing local (u,v) attachment-plane offset and make its coordinate semantics explicit.
Forge API
attach(…, offset=(u, v))
Forge model
Attachment stores two symbolic local planar values; these are not world X/Y/Z coordinates.
How Forge builds it in SolidCraft
The computed child seed pose retains the symbolic local offset, then the actual relationship is joint.create(type=‘planar’, values=[u,v,angle]). The seed move is not an additional joint.
SolidCraft result
The marker moves within the selected corner anchor’s local attachment plane.
Saved-design test
Change shift from 5 to 10 mm in the saved design; the marker must follow the same local axis by another 5 mm.
Geometry evidence
Geometry-rationale provenance: copied verbatim from
qualification/geometry_contracts.pyat commitbe40b09e7454a90e87d83768a9e7453c52ba5d76.
Bounds sufficient: true
The base and marker sizes and positions show the local offset. The saved SolidCraft model is then changed to confirm that the planar joint updates correctly.
Reference notes
- BOSL2 — Important reference: attach() operates in the local coordinate system at the parent anchor, not blindly in world coordinates.
- OpenSCAD — A raw translate([x,y,z]) is world/object transform syntax and therefore is not equivalent to this local joint offset.
Generated command sequence — scpf (10)
component.create{ "bind": { "$base": "occurrence" }, "command": "component.create", "params": { "grounded": true, "name": "Base" } }solid.box{ "command": "solid.box", "params": { "body_name": "Base", "corner": [ -20.0, -15.0, 0 ], "height": 20, "length": 40, "width": 30 } }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", "corner": [ -5.0, -5.0, 0 ], "height": 10, "length": 10, "width": 10 } }component.activate{ "command": "component.activate", "params": { "component": "root" } }occurrence.move{ "command": "occurrence.move", "params": { "occurrence": "$marker", "translate": [ 15.0, -20.0, 10 ] } }parameters.add{ "command": "parameters.add", "params": { "expression": "5 mm", "name": "shift" } }joint.create{ "command": "joint.create", "params": { "a": { "corner": [ 20.0, -15.0, 20.0 ], "edge": [ 20.0, -15.0, 10.0 ], "occurrence": "$base", "on": [ 0.0, -15.0, 10.0 ] }, "b": { "occurrence": "$marker", "point": [ 20.0, -15.0, 20.0 ], "x": [ -1.0, 0.0, 0.0 ], "z": [ 0.0, 1.0, 0.0 ] }, "name": "Attach Marker to Base", "type": "planar", "values": [ 0, "-(shift)", 0.0 ] } }browser.visibility{ "command": "browser.visibility", "params": { "folder": "joints", "visible": false } }
Reference code
cadquery source · pass
"""CadQuery geometry reference for a corner marker with a planar shift.
The final Location compares the visible local-offset result. Forge separately
qualifies persisted local joint-frame mutation in SolidCraft.
"""
import cadquery as cq
shift = 5.0
base = cq.Solid.makeBox(40, 30, 20, cq.Vector(-20, -15, 0))
marker = cq.Solid.makeBox(10, 10, 10, cq.Vector(-5, -5, -5))
model = cq.Assembly()
model.add(base, name="base")
model.add(marker, name="marker", loc=cq.Location((15, -20, 20)))
build123d source · pass
"""build123d reference: a marker shifted relative to a top/front corner."""
from build123d import Align, Box, BuildPart, Locations
shift = 5.0
bottom = (Align.CENTER, Align.CENTER, Align.MIN)
with BuildPart() as model:
Box(40, 30, 20, align=bottom)
with Locations((15, -15 - shift, 20)):
Box(10, 10, 10)
pythonscad source · pass
"""PythonSCAD geometry reference for a corner marker with local planar shift.
Forge additionally qualifies that the saved SolidCraft joint follows a changed
shift parameter without rerunning Python.
"""
from pythonscad import *
shift = 5.0
base = cube([40, 30, 20], center=True).up(10)
marker = cube([10, 10, 10], center=True).translate([15, -20, 20])
model = base | marker
pybosl2 source · pass
"""pyBOSL2 geometry reference for the parametric-offset case.
This keeps the visible placement explicit. Forge's qualification additionally
checks a persisted local joint-frame offset after native parameter mutation.
"""
from pybosl2 import cuboid
shift = 5.0
base = cuboid([40, 30, 20]).up(10)
marker = cuboid([10, 10, 10]).translate([15, -20, 20])
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 | 20 × 15 × 25 | 20 × 15 × 25 | pass |
| Bounds / min | -20 × -25 × 0 | -20 × -25 × 0 | pass |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Body envelopes / count | 2 | 2 | pass |
| Body 1 / min [mm] | -20 × -15 × 0 | -20 × -15 × 0 | — |
| Body 1 / max [mm] | 20 × 15 × 20 | 20 × 15 × 20 | — |
| Body 2 / min [mm] | 10 × -25 × 15 | 10 × -25 × 15 | — |
| Body 2 / max [mm] | 20 × -15 × 25 | 20 × -15 × 25 | — |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Body envelopes / count | 2 | 2 | pass |
| Body 1 / min [mm] | -20 × -15 × 0 | -20 × -15 × 0 | — |
| Body 1 / max [mm] | 20 × 15 × 20 | 20 × 15 × 20 | — |
| Body 2 / min [mm] | 10 × -25 × 20 | 10 × -25 × 20 | — |
| Body 2 / max [mm] | 20 × -15 × 30 | 20 × -15 × 30 | — |
cadquery — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 25 | 20 × 15 × 25 | pass |
| Bounds / min | -20 × -25 × 0 | -20 × -25 × 0 | pass |
build123d — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 25 | 20 × 15 × 25 | pass |
| Bounds / min | -20 × -25 × 0 | -20 × -25 × 0 | pass |
pythonscad — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 25 | 20 × 15 × 25 | pass |
| Bounds / min | -20 × -25 × 0 | -20 × -25 × 0 | pass |
pybosl2 — pass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| Bounds / max | 20 × 15 × 25 | 20 × 15 × 25 | pass |
| Bounds / min | -20 × -25 × 0 | -20 × -25 × 0 | pass |
Model stages
- Create the Base and Marker components
- Attach matching corner references
- Apply the symbolic local attachment-plane offset
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,
25.0
],
"actual_min": [
-20.0,
-25.0,
0.0
],
"expected_max": [
20.0,
15.0,
25.0
],
"expected_min": [
-20.0,
-25.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/scpf/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset-scpf-geometry"
}native — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "5a4dc34f22e4890a36af2c011eeaf5ac11cf3749d8a418ec91f61108eaec8d8b",
"size": 2337
}
],
"error": null,
"evidence": {
"body_envelopes": {
"actual_count": 2,
"expected_count": 2,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "Base",
"max": [
20.0,
15.0,
20.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"expected": {
"label": null,
"max": [
20.0,
15.0,
20.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"max_delta": 0.0
},
{
"actual": {
"label": "Marker",
"max": [
20.0,
-15.0,
25.0
],
"min": [
10.0,
-25.0,
15.0
]
},
"expected": {
"label": null,
"max": [
20.0,
-15.0,
25.0
],
"min": [
10.0,
-25.0,
15.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 0.001,
"unmatched_actual": [],
"unmatched_expected": []
},
"named_bodies": [
{
"body_name": "Marker",
"bounds": {
"actual_max": [
20.0,
-15.0,
25.0
],
"actual_min": [
10.0,
-25.0,
15.0
],
"deltas": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"expected_max": [
20.0,
-15.0,
25.0
],
"expected_min": [
10.0,
-25.0,
15.0
],
"kind": "bounds",
"label": "Marker bounds",
"max_delta": 0.0,
"pass": true,
"tolerance": 0.001
},
"name_prefix": "Marker"
}
]
},
"id": "baseline",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/shift_10/model.sc",
"sha256": "4a72985b29c6fbe1f3c986fed0ba81ef5f9508da1ffc52b9ff5ec049331cfecb",
"size": 6358
},
{
"kind": "file",
"path": "saved_designs/shift_10/measurements.json",
"sha256": "fab66764dd97aa6514e4680812424fc8b1e99ade33385e6609de408654c994c2",
"size": 2339
}
],
"error": null,
"evidence": {
"body_envelopes": {
"actual_count": 2,
"expected_count": 2,
"kind": "body_envelopes",
"matched_pairs": [
{
"actual": {
"label": "Base",
"max": [
20.0,
15.0,
20.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"expected": {
"label": null,
"max": [
20.0,
15.0,
20.0
],
"min": [
-20.0,
-15.0,
0.0
]
},
"max_delta": 0.0
},
{
"actual": {
"label": "Marker",
"max": [
20.0,
-15.0,
30.0
],
"min": [
10.0,
-25.0,
20.0
]
},
"expected": {
"label": null,
"max": [
20.0,
-15.0,
30.0
],
"min": [
10.0,
-25.0,
20.0
]
},
"max_delta": 0.0
}
],
"pass": true,
"tolerance": 0.001,
"unmatched_actual": [],
"unmatched_expected": []
},
"named_bodies": [
{
"body_name": "Marker",
"bounds": {
"actual_max": [
20.0,
-15.0,
30.0
],
"actual_min": [
10.0,
-25.0,
20.0
],
"deltas": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"expected_max": [
20.0,
-15.0,
30.0
],
"expected_min": [
10.0,
-25.0,
20.0
],
"kind": "bounds",
"label": "Marker bounds",
"max_delta": 0.0,
"pass": true,
"tolerance": 0.001
},
"name_prefix": "Marker"
}
]
},
"id": "saved_design_shift_10",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset"
}visual — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "visual/front/camera.json",
"sha256": "ad991a74e284b79dafd9ec35ff4086083eb908761a6ecb9659564e86d069f72e",
"size": 129
},
{
"kind": "file",
"path": "visual/front/actual.png",
"sha256": "0f7636e009740c3990af3700e48c1cc139beffc1fb2bbaf654889e9521ccf628",
"size": 10676
},
{
"kind": "file",
"path": "visual/front/goal.png",
"sha256": "2efd5e84a2b6853f974cd4f5e2b30ad9cf22a0f9e067d7931ef836f1d64d2171",
"size": 2013
},
{
"kind": "file",
"path": "visual/front/overlay.png",
"sha256": "efd9656103af7257cad38f35ee9de6861ea2b1ebe76fa7d69459bde8e5ba08e6",
"size": 3687
},
{
"kind": "file",
"path": "visual/front/diff.png",
"sha256": "0c4bde892951b0ab1a4fd854963f2147d9abb44800919ef4715095960767f95d",
"size": 849
}
],
"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.021557,
"pass": true
},
"regression_required": true,
"view": "front"
},
"id": "front",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/right/camera.json",
"sha256": "6411bccb48df75b86dc4455163bd500e00311d435e1861d17d349fa55b77d525",
"size": 145
},
{
"kind": "file",
"path": "visual/right/actual.png",
"sha256": "2a7981b946cfdb547dda077a36c22d66aa87734970bd57ea8c511bd40f1f1329",
"size": 10242
},
{
"kind": "file",
"path": "visual/right/goal.png",
"sha256": "7bd431ec6c7a9d08d72c30efc7e4a3e6b69f586eb4fb9e56e0668fa167b9aa2e",
"size": 2008
},
{
"kind": "file",
"path": "visual/right/overlay.png",
"sha256": "d8d2796b4966aca02ed304513ef512ebbc99d4f2be6b4e7b1d4c4f8cc8eb5443",
"size": 3396
},
{
"kind": "file",
"path": "visual/right/diff.png",
"sha256": "19ccf527c8d18b49859ce18a0421f9f7f2c636764d4d3631e37678433ddf5fe0",
"size": 919
}
],
"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.018084,
"pass": true
},
"regression_required": true,
"view": "right"
},
"id": "right",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "visual/iso/camera.json",
"sha256": "36c94ec5245b6c96f6c38de7959d47e3bf96958e28518a31b5ad55b93213434d",
"size": 160
},
{
"kind": "file",
"path": "visual/iso/actual.png",
"sha256": "5f5624bbd6c24326bceb5f302c04f5d636405035f272d34f19e1f5703075da5d",
"size": 39224
},
{
"kind": "file",
"path": "visual/iso/goal.png",
"sha256": "74093f8bae54b4d01efa1bdd1736c22c1a65198de681b211ef2143e8e13e3a71",
"size": 4914
},
{
"kind": "file",
"path": "visual/iso/overlay.png",
"sha256": "0d49c34c0374eb92ecc255eaf9cb26889ffa782870a742be3034298d5df53b32",
"size": 25986
},
{
"kind": "file",
"path": "visual/iso/diff.png",
"sha256": "6b0d2038c34160159263bdc2738ae5996998da2c313cdc9c42861c4b403a885f",
"size": 3591
}
],
"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.020255,
"pass": true
},
"regression_required": true,
"view": "iso"
},
"id": "iso",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/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": "eebfda2980d453c6b878bb570423e8a755311c1c",
"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": "parametric-offset-scpf-visual"
}cadquery
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
25.0
],
"actual_min": [
-20.0,
-25.0,
0.0
],
"expected_max": [
20.0,
15.0,
25.0
],
"expected_min": [
-20.0,
-25.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/cadquery/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset-cadquery-geometry"
}build123d
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
25.0
],
"actual_min": [
-20.0,
-25.0,
0.0
],
"expected_max": [
20.0,
15.0,
25.0
],
"expected_min": [
-20.0,
-25.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/build123d/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset-build123d-geometry"
}pythonscad
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
25.0
],
"actual_min": [
-20.0,
-25.0,
0.0
],
"expected_max": [
20.0,
15.0,
25.0
],
"expected_min": [
-20.0,
-25.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/pythonscad/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset-pythonscad-geometry"
}pybosl2
geometry — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [],
"error": null,
"evidence": {
"bounds": {
"actual_max": [
20.0,
15.0,
25.0
],
"actual_min": [
-20.0,
-25.0,
0.0
],
"expected_max": [
20.0,
15.0,
25.0
],
"expected_min": [
-20.0,
-25.0,
0.0
],
"max_delta_mm": 0.0,
"pass": true,
"tolerance_mm": 0.5
}
},
"id": "geometry",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/parametric-offset/pybosl2/model.stl",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "parametric-offset-pybosl2-geometry"
}










