Development version.
Forge is under active development and testing. APIs, behaviour, coverage and
verification results may be incomplete or change without notice; published
PASS results are not a support guarantee or production-readiness claim.
Verification
Size rows + Installed rule
Small/Medium/Large remains one row axis while Installed is an independent native checkbox
What this verifies
Two reusable flexible-fit child occurrences share one published fit diameter. Small, Medium and Large control the parent span while an enabled Installed configuration rule independently drives the shared child fit. Disabling the rule restores the active row's Free manufacturing value without rerunning Forge Python.
scpf source
Complete primary source from the site branch; built revision below.
scpf/model.py
"""Qualification: one size table plus an independent Installed rule."""
@component(include=("tube_d", "fit_diameter"))
class FlexibleSleeve:
tube_d = 20.0
fit_diameter = 20.4
wall = 2.0
HEIGHT = 20.0
RELIEF_WIDTH = 2.0
def build(self):
outer = Cylinder(d=self.tube_d + 2 * self.wall, h=self.HEIGHT)
bore = Cylinder(d=self.fit_diameter, h=self.HEIGHT + 2)
relief = Box(12, self.RELIEF_WIDTH, self.HEIGHT + 2).move(x=6)
return outer - bore - relief
class FlexibleFitState:
frame_width = 80.0
tube_d = 20.0
fit_diameter = 20.4
def build(self):
left = FlexibleSleeve(
tube_d=self.tube_d,
fit_diameter=self.fit_diameter,
name="left_sleeve",
placement=Placement(x=-self.frame_width / 4),
)
right = left.copy(
name="right_sleeve",
placement=Placement(x=self.frame_width / 4),
)
return Configure(
left + right,
active="Medium",
columns=(
Param(self.frame_width),
Param(self.fit_diameter),
),
rows={
"Small": ("60 mm", "20.4 mm"),
"Medium": ("80 mm", "20.4 mm"),
"Large": ("100 mm", "20.4 mm"),
},
rules=(
ConfigRule(
"installed",
"Installed",
enabled=True,
condition=Always(),
effect=DriveParameter(self.fit_diameter, self.tube_d),
),
),
)
FlexibleFitState()
Generated command sequence — scpf (19)
parameters.add{ "command": "parameters.add", "params": { "expression": "20", "name": "tube_d", "unit": "mm" } }parameters.add{ "command": "parameters.add", "params": { "expression": "20.4", "name": "fit_diameter", "unit": "mm" } }component.create{ "bind": { "$left_sleeve": "occurrence" }, "command": "component.create", "params": { "grounded": false, "name": "FlexibleSleeve" } }solid.cylinder{ "command": "solid.cylinder", "params": { "axis": "Z", "base": [ 0, 0, -10.0 ], "body_name": "FlexibleSleeve", "diameter": "tube_d + 4 mm", "height": 20.0, "operation": "new" } }solid.cylinder{ "command": "solid.cylinder", "params": { "axis": "Z", "base": [ 0, 0, -11.0 ], "diameter": "fit_diameter", "height": 22.0, "operation": "cut", "targets": [ "FlexibleSleeve" ] } }solid.box{ "command": "solid.box", "params": { "center": [ 6.0, 0.0, 0.0 ], "height": 22.0, "length": 12, "operation": "cut", "targets": [ "FlexibleSleeve" ], "width": 2.0 } }component.activate{ "command": "component.activate", "params": { "component": "root" } }occurrence.copy{ "bind": { "$right_sleeve": "occurrence" }, "command": "occurrence.copy", "params": { "component": "FlexibleSleeve" } }parameters.add{ "command": "parameters.add", "params": { "expression": "80 mm", "name": "frame_width" } }occurrence.move{ "command": "occurrence.move", "params": { "occurrence": "$left_sleeve", "translate": [ "(-(frame_width)) / 4", 0, 0 ] } }occurrence.move{ "command": "occurrence.move", "params": { "occurrence": "$right_sleeve", "translate": [ "frame_width / 4", 0, 0 ] } }config.configure{ "command": "config.configure", "params": { "params": [ "frame_width", "fit_diameter" ] } }config.row{ "bind": { "$config_row_5263293fc202": { "field": "rows", "select": "id", "where": { "name": "Small" } } }, "command": "config.row", "params": { "name": "Default", "rename": "Small" } }config.row{ "command": "config.row", "params": { "name": "Small", "values": { "param:fit_diameter": "20.4 mm", "param:frame_width": "60 mm" } } }config.row{ "bind": { "$config_row_8e588cd18774": { "field": "rows", "select": "id", "where": { "name": "Medium" } } }, "command": "config.row", "params": { "name": "Medium", "values": { "param:fit_diameter": "20.4 mm", "param:frame_width": "80 mm" } } }config.row{ "bind": { "$config_row_ab80540d98d2": { "field": "rows", "select": "id", "where": { "name": "Large" } } }, "command": "config.row", "params": { "name": "Large", "values": { "param:fit_diameter": "20.4 mm", "param:frame_width": "100 mm" } } }config.rule{ "command": "config.rule", "params": { "rule": { "condition": { "type": "always" }, "effect": { "expression": "tube_d", "parameter": "fit_diameter", "type": "drive_parameter" }, "enabled": true, "id": "installed", "name": "Installed" } } }config.activate{ "command": "config.activate", "params": { "row": "$config_row_8e588cd18774" } }config.table{ "command": "config.table", "params": {} }
Reference code
No independent implementation is declared.
Image overview
Only images present in the published build are displayed. Presentation previews are not visual verification results.
Verification checks
scpf — pass
native / baselinepass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 2 | 2 | pass |
| SolidCraft parameters / fit_diameter | 20 | 20 | pass |
| SolidCraft parameters / frame_width | 80 | 80 | pass |
| SolidCraft parameters / tube_d | 20 | 20 | pass |
native / saved_design_freepass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 2 | 2 | pass |
| SolidCraft parameters / fit_diameter | 20.4 | 20.4 | pass |
| SolidCraft parameters / frame_width | 80 | 80 | pass |
| SolidCraft parameters / tube_d | 20 | 20 | pass |
native / saved_design_large-installedpass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 2 | 2 | pass |
| SolidCraft parameters / fit_diameter | 20 | 20 | pass |
| SolidCraft parameters / frame_width | 100 | 100 | pass |
| SolidCraft parameters / tube_d | 20 | 20 | pass |
native / saved_design_large-freepass
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 2 | 2 | pass |
| SolidCraft parameters / fit_diameter | 20.4 | 20.4 | pass |
| SolidCraft parameters / frame_width | 100 | 100 | pass |
| SolidCraft parameters / tube_d | 20 | 20 | pass |
native / inspection_tablepass
Model stages
- Build one reusable flexible-fit child and copy it as two occurrences
- Publish one shared fit diameter to the parent Assembly
- Author Small, Medium and Large rows with the Free fit value
- Add one independent Installed rule that drives the same configured parameter
- Reopen the saved design and verify row switching with Installed enabled or disabled
Build and verification
- Primary implementation:
scpf - Build source:
1dead221b9ea2c31901da9a19a8c205d25272ec3 - Durable scope:
main
Implementations
- scpf — builder-scpf: build=pass, verification=pass · STL · SC · Preview · commands · verification · result
native: status=pass, adapter=solidcraft-model, runtime=ghcr.io/brainboxemb/cad-solidcraft:v0.3.6 · verification
scpf
native — expected versus measured evidence
Open published verification report
verification.json
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "5977ab0e22f257eb2a844521d715956742fa1d3d570e0611609a1d975bd0d5e3",
"size": 3213
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 2,
"expected": 2,
"label": "SolidCraft body count",
"pass": true
},
"parameters": {
"actual": {
"fit_diameter": 20.0,
"frame_width": 80.0,
"tube_d": 20.0
},
"expected": {
"fit_diameter": 20.0,
"frame_width": 80.0,
"tube_d": 20.0
},
"label": "SolidCraft parameters",
"pass": true
}
},
"id": "baseline",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/free/model.sc",
"sha256": "3fda7a9c78b74eca524c111cf107158489a5421ad4589ed8bb432f395e22a1c4",
"size": 12090
},
{
"kind": "file",
"path": "saved_designs/free/measurements.json",
"sha256": "9a0957b8c3b7cc3ecdd4e39d8707d2917d256cfdc6ff836ef1d3b734e5e3ea6e",
"size": 3267
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 2,
"expected": 2,
"label": "SolidCraft body count",
"pass": true
},
"changes": [
{
"comparison": {
"actual": {
"absolute_delta": 245.8275564980272,
"baseline": 2684.4900006028656,
"mutated": 2438.6624441048384
},
"expected": {
"absolute_delta_gt": 1.0
},
"label": "SolidCraft saved design change physical-geometry",
"pass": true
},
"id": "physical-geometry",
"path": [
"bodies",
0,
"volume_mm3"
]
}
],
"parameters": {
"actual": {
"fit_diameter": 20.4,
"frame_width": 80.0,
"tube_d": 20.0
},
"expected": {
"fit_diameter": 20.4,
"frame_width": 80.0,
"tube_d": 20.0
},
"label": "SolidCraft parameters",
"pass": true
}
},
"id": "saved_design_free",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/large-installed/model.sc",
"sha256": "62e44dcab098d89508994c4a3d350e52fb5587904de7103005da8eed814e8f98",
"size": 12061
},
{
"kind": "file",
"path": "saved_designs/large-installed/measurements.json",
"sha256": "eba42fecc0e31474d247f7a9a7f8312a18bd68b821111bc35a42b1ce80b01a7e",
"size": 3215
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 2,
"expected": 2,
"label": "SolidCraft body count",
"pass": true
},
"parameters": {
"actual": {
"fit_diameter": 20.0,
"frame_width": 100.0,
"tube_d": 20.0
},
"expected": {
"fit_diameter": 20.0,
"frame_width": 100.0,
"tube_d": 20.0
},
"label": "SolidCraft parameters",
"pass": true
}
},
"id": "saved_design_large-installed",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/large-free/model.sc",
"sha256": "9e26e613850f8cbed497b3b0f5b86454274f36024aaec291b0c9438b9c7a2300",
"size": 12085
},
{
"kind": "file",
"path": "saved_designs/large-free/measurements.json",
"sha256": "a93b71609ad2180bc7306f14dc213ec53f4f8085479d8d7f68affa0e709a2d12",
"size": 3274
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 2,
"expected": 2,
"label": "SolidCraft body count",
"pass": true
},
"changes": [
{
"comparison": {
"actual": {
"absolute_delta": 245.82755649802675,
"baseline": 2684.4900006028656,
"mutated": 2438.662444104839
},
"expected": {
"absolute_delta_gt": 1.0
},
"label": "SolidCraft saved design change physical-geometry",
"pass": true
},
"id": "physical-geometry",
"path": [
"bodies",
0,
"volume_mm3"
]
}
],
"parameters": {
"actual": {
"fit_diameter": 20.4,
"frame_width": 100.0,
"tube_d": 20.0
},
"expected": {
"fit_diameter": 20.4,
"frame_width": 100.0,
"tube_d": 20.0
},
"label": "SolidCraft parameters",
"pass": true
}
},
"id": "saved_design_large-free",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "inspections/table/results.json",
"sha256": "1e83210f6a1527dcd68d5efd6062d314ad09eb5bba21a2fcd4ac504d05b19d40",
"size": 1400
}
],
"error": null,
"evidence": {
"checks": [
{
"comparison": {
"actual": 3,
"expected": 3,
"label": "SolidCraft inspection check rows",
"pass": true
},
"id": "rows",
"path": [
0,
"rows"
]
},
{
"comparison": {
"actual": 1,
"expected": 1,
"label": "SolidCraft inspection check rules",
"pass": true
},
"id": "rules",
"path": [
0,
"rules"
]
},
{
"comparison": {
"actual": "Medium",
"expected": "Medium",
"label": "SolidCraft inspection check active",
"pass": true
},
"id": "active",
"path": [
0,
"active"
]
},
{
"comparison": {
"actual": true,
"expected": true,
"label": "SolidCraft inspection check matches",
"pass": true
},
"id": "matches",
"path": [
0,
"matches"
]
},
{
"comparison": {
"actual": "20.4 mm",
"expected": "20.4 mm",
"label": "SolidCraft inspection check medium-free-cell",
"pass": true
},
"id": "medium-free-cell",
"path": [
0,
"rows",
{
"select": {
"field": "name",
"value": "Medium"
}
},
"values",
"param:fit_diameter"
]
},
{
"comparison": {
"actual": true,
"expected": true,
"label": "SolidCraft inspection check installed-enabled",
"pass": true
},
"id": "installed-enabled",
"path": [
0,
"rules",
{
"select": {
"field": "id",
"value": "installed"
}
},
"enabled"
]
},
{
"comparison": {
"actual": "Installed",
"expected": "Installed",
"label": "SolidCraft inspection check installed-name",
"pass": true
},
"id": "installed-name",
"path": [
0,
"rules",
{
"select": {
"field": "id",
"value": "installed"
}
},
"name"
]
},
{
"comparison": {
"actual": "fit_diameter",
"expected": "fit_diameter",
"label": "SolidCraft inspection check installed-target",
"pass": true
},
"id": "installed-target",
"path": [
0,
"rules",
{
"select": {
"field": "id",
"value": "installed"
}
},
"effect",
"parameter"
]
},
{
"comparison": {
"actual": "tube_d",
"expected": "tube_d",
"label": "SolidCraft inspection check installed-expression",
"pass": true
},
"id": "installed-expression",
"path": [
0,
"rules",
{
"select": {
"field": "id",
"value": "installed"
}
},
"effect",
"expression"
]
}
]
},
"id": "inspection_table",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/configuration-installed-state/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "configuration-installed-state"
}