Verification
Native sketch revolve
An editable radial profile creates a native revolved solid
What this verifies
A rectangular radial profile revolves around the world X axis. Saved-design mutation verifies the radius and sweep remain editable.
scpf source
Complete primary source from the site branch; built revision below.
"""Native profile-driven revolve qualification."""
class NativeRevolve:
length = 10.0
radius = 4.0
sweep = 360.0
def build(self):
with Sketch(name="RadialProfile", plane="XZ") as sketch:
Polygon2D(
[(0, 0), (0, self.radius),
(self.length, self.radius), (self.length, 0)],
plane="XZ",
)
return sketch.revolve(axis=Axis.X, angle=self.sweep)
NativeRevolve()
Engineering explanation
Native sketch revolve
Documentation provenance: authored for Forge issue #843 from the qualified SolidCraft 0.48.1
solid.revolvecommand contract and this fixture’s native replay evidence.
- Group:
fundamentals - Saved-design required:
true
Goal
Qualify a small public Forge API for native profile-driven revolve so downstream mechanical models such as the latch can create turned pins and rivets without approximating them with cylinders, extrusions or fused primitives.
Forge API
Sketch.revolve(axis=Axis.X, angle=..., sym=False) on one completed standalone
closed profile whose world axis lies in the Sketch plane.
Forge model
A 10 mm long radial rectangle with a 4 mm radius is authored on XZ and revolved 360 degrees around world X. Length, radius and sweep remain editable model parameters.
How Forge builds it in SolidCraft
Forge emits the native Sketch and profile commands followed by
solid.revolve. Root use creates a named body; Boolean use selects SolidCraft
join, cut or intersect directly on the Revolve feature. No temporary
body or primitive approximation is introduced.
SolidCraft result
One closed native revolved solid with one solved source Sketch and one native Revolve history feature. SolidCraft stores angle-valued parameters internally in radians while Forge authors and exposes their unit as degrees.
Saved-design test
The saved design changes radius from 4 mm to 5 mm and sweep from 360 degrees to 180 degrees. Native recompute must produce a half-cylinder with the expected analytic volume while preserving the Sketch/Revolve history.
Geometry evidence
Geometry-rationale provenance: authored for Forge issue #843 from the analytic volume of a revolved rectangular radial profile and native saved-design measurements.
Bounds sufficient: false
Bounds alone cannot distinguish a full revolved cylinder from another solid with the same envelope. Verification therefore requires body count, closed body state, analytic volume, parameter mutation and native timeline evidence.
Reference notes
- SolidCraft — SolidCraft 0.48.1 supplies the native
solid.revolvefeature and saved-design recompute used by this qualification. - Downstream latch — CAD issue #30 needs native turned rivets/pins; this fixture isolates only the reusable Revolve primitive required by that model.
Generated command sequence — scpf (7)
parameters.add{ "command": "parameters.add", "params": { "expression": "4", "name": "radius", "unit": "mm" } }parameters.add{ "command": "parameters.add", "params": { "expression": "10", "name": "length", "unit": "mm" } }parameters.add{ "command": "parameters.add", "params": { "expression": "360", "name": "sweep", "unit": "deg" } }sketch.create{ "command": "sketch.create", "params": { "name": "RadialProfile", "plane": "XZ" } }sketch.line{ "command": "sketch.line", "params": { "closed": true, "ids": [ "a", "b", "c", "d" ], "points": [ [ 0, 0 ], [ 0, "radius" ], [ "length", "radius" ], [ "length", 0 ] ] } }sketch.finish{ "command": "sketch.finish", "params": {} }solid.revolve{ "command": "solid.revolve", "params": { "angle": "sweep", "axis": "X", "body_name": "NativeRevolve", "sketch": "RadialProfile" } }
Reference code
No independent implementation is declared.
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 |
|---|---|---|---|
| SolidCraft body count | 1 | 1 | pass |
| Body envelopes / count | 1 | 1 | pass |
| Body 1 / min [mm] | 0 × -4 × -4 | 0 × -4 × -4 | — |
| Body 1 / max [mm] | 10 × 4 × 4 | 10 × 4 × 4 | — |
| SolidCraft parameters / length | 10 | 10 | pass |
| SolidCraft parameters / radius | 4 | 4 | pass |
| SolidCraft parameters / sweep | 6.28318530718 | 6.28318530718 | pass |
| SolidCraft sketch count | 1 | 1 | pass |
| SolidCraft timeline | [{"name": "RadialProfile", "type": "Sketch"}, {"type": "RevolveFeature"}] | [{"name": "RadialProfile", "type": "Sketch"}, {"type": "RevolveFeature"}] | pass |
| Measurement | Expected | Measured | Check |
|---|---|---|---|
| SolidCraft body count | 1 | 1 | pass |
| SolidCraft parameters / length | 10 | 10 | pass |
| SolidCraft parameters / radius | 5 | 5 | pass |
| SolidCraft parameters / sweep | 3.14159265359 | 3.14159265359 | pass |
| SolidCraft sketch count | 1 | 1 | pass |
Model stages
- Sketch the closed radial profile on XZ
- Revolve around X using native history
- Change radius and sweep in the saved design
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 · verificationvisual: status=pass, adapter=solidcraft-visual, runtime=ghcr.io/brainboxemb/cad-solidcraft:v0.3.6 · verification
scpf
native — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "baseline/measurements.json",
"sha256": "e2179b2b4eb309e3cf15635ddaf5aef74ca030a2a65a5f80d894b49c9f62da68",
"size": 2234
}
],
"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": "NativeRevolve",
"max": [
10.000000000000002,
4.0,
4.0
],
"min": [
0.0,
-4.0,
-4.0
]
},
"expected": {
"label": null,
"max": [
10.0,
4.0,
4.0
],
"min": [
0.0,
-4.0,
-4.0
]
},
"max_delta": 1.7763568394002505e-15
}
],
"pass": true,
"tolerance": 0.01,
"unmatched_actual": [],
"unmatched_expected": []
},
"named_bodies": [
{
"closed": {
"actual": true,
"expected": true,
"label": "sole body closed",
"pass": true
},
"selector": "sole",
"volume": {
"actual": 502.654824574367,
"delta": 1.1368683772161603e-13,
"expected": 502.6548245743669,
"kind": "scalar",
"label": "sole body volume",
"pass": true,
"tolerance": 0.5
}
}
],
"parameters": {
"actual": {
"length": 10.0,
"radius": 4.0,
"sweep": 6.283185307179586
},
"expected": {
"length": 10.0,
"radius": 4.0,
"sweep": 6.283185307179586
},
"label": "SolidCraft parameters",
"pass": true
},
"sketch_count": {
"actual": 1,
"expected": 1,
"label": "SolidCraft sketch count",
"pass": true
},
"timeline": {
"actual": [
{
"name": "RadialProfile",
"type": "Sketch"
},
{
"type": "RevolveFeature"
}
],
"expected": [
{
"name": "RadialProfile",
"type": "Sketch"
},
{
"type": "RevolveFeature"
}
],
"label": "SolidCraft timeline",
"pass": true
}
},
"id": "baseline",
"reason": null,
"status": "pass"
},
{
"artifacts": [
{
"kind": "file",
"path": "saved_designs/resize_revolved_solid/model.sc",
"sha256": "77f5cd0918581674fd66cd0bc89daa3d23c403699f2b21d79d6f7541f46f34c9",
"size": 5145
},
{
"kind": "file",
"path": "saved_designs/resize_revolved_solid/measurements.json",
"sha256": "707028369813138a7b7d3d9f3a45cb14335d93818040646a61c93067d7177122",
"size": 2234
}
],
"error": null,
"evidence": {
"body_count": {
"actual": 1,
"expected": 1,
"label": "SolidCraft body count",
"pass": true
},
"named_bodies": [
{
"closed": {
"actual": true,
"expected": true,
"label": "sole body closed",
"pass": true
},
"selector": "sole",
"volume": {
"actual": 392.69908169872417,
"delta": 0.0,
"expected": 392.69908169872417,
"kind": "scalar",
"label": "sole body volume",
"pass": true,
"tolerance": 0.5
}
}
],
"parameters": {
"actual": {
"length": 10.0,
"radius": 5.0,
"sweep": 3.141592653589793
},
"expected": {
"length": 10.0,
"radius": 5.0,
"sweep": 3.141592653589793
},
"label": "SolidCraft parameters",
"pass": true
},
"sketch_count": {
"actual": 1,
"expected": 1,
"label": "SolidCraft sketch count",
"pass": true
}
},
"id": "saved_design_resize_revolved_solid",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/native-revolve/scpf/model.sc",
"metadata": {},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "native-revolve"
}visual — expected versus measured evidence
Open published verification report
{
"checks": [
{
"artifacts": [
{
"kind": "file",
"path": "visual/front/camera.json",
"sha256": "876214aca89df8518d0e2ad7d97d166a1ebef725e0ca622a98ea906b0b2f53e5",
"size": 155
},
{
"kind": "file",
"path": "visual/front/actual.png",
"sha256": "7757e0f40aada82ed908ca0cee578694cd0f2061df442aa1b98cb64362c3321f",
"size": 12971
},
{
"kind": "file",
"path": "visual/front/goal.png",
"sha256": "535e3cbc2bf2e510a743f7ab5c66a43e54ade799b958c08d9feccfbd13b77682",
"size": 1985
},
{
"kind": "file",
"path": "visual/front/overlay.png",
"sha256": "18b6535236df256a94053a8c6d7772e620aecda64c6a8560253e62027de96566",
"size": 6357
},
{
"kind": "file",
"path": "visual/front/diff.png",
"sha256": "602296dd7957c1d922efb102f9489326ec6d608d0442613c03f34497538e2f82",
"size": 757
}
],
"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": "9bf67499ed8a555150c0300ac3843a93f6fdb825934cf7e545ea2ae1666e2d10",
"size": 171
},
{
"kind": "file",
"path": "visual/right/actual.png",
"sha256": "8228a9532412c55bdda779b7aaf398bd21b33f7c7e1b50a69b16a4f1ab336041",
"size": 22255
},
{
"kind": "file",
"path": "visual/right/goal.png",
"sha256": "e65cd26c6ddd39b8f9b738ca379be9b88b82aebebc51ee8b461cc5357778a611",
"size": 1987
},
{
"kind": "file",
"path": "visual/right/overlay.png",
"sha256": "50335bc40cb12d16b8090262041e58e2f82ceb6b37bf1ccdbac98a3bf98a3912",
"size": 13290
},
{
"kind": "file",
"path": "visual/right/diff.png",
"sha256": "8f216af383434bfd3fd6759695e9c8626eed998af909a6a61dd6940de340ac98",
"size": 1715
}
],
"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": "dce6dbe27e21ef720013c0606c78ce1576d9f03ad105839807f7140a0b932e60",
"size": 186
},
{
"kind": "file",
"path": "visual/iso/actual.png",
"sha256": "906581ee0a11445fa2e24b80abcea6e8bc8216d08886a292467e3d3933f429d0",
"size": 124453
},
{
"kind": "file",
"path": "visual/iso/goal.png",
"sha256": "ce8d160bea96176a14e9e929ae7091412c04d6c608e0b0777c592a9b60bfc02a",
"size": 4335
},
{
"kind": "file",
"path": "visual/iso/overlay.png",
"sha256": "eeaa5add584b89184868fb0da984e7b1fc9756f19cb537ccd0e7a83cbd24c892",
"size": 44153
},
{
"kind": "file",
"path": "visual/iso/diff.png",
"sha256": "9e1a5ac1431224e70fe353a0486fff2e89f28db9fabbb1d4aa36d4dc569a9397",
"size": 3675
}
],
"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.0,
"pass": true
},
"regression_required": true,
"view": "iso"
},
"id": "iso",
"reason": null,
"status": "pass"
}
],
"input": "/output/models/native-revolve/scpf/model.sc",
"metadata": {
"baseline_provenance": {
"approval": "approved",
"runtime": "ghcr.io/brainboxemb/cad-solidcraft:v0.3.6",
"solidcraft_version": "0.49.0",
"source_commit": "90b7eba19227032766dc1309ae8d851c4cb09553",
"workflow_run": 45873531238
},
"kind": "solidcraft-visual",
"measurements": "measurements.json",
"visual_report": "visual.json"
},
"schema": "cad-verification",
"schema_version": 1,
"status": "pass",
"verification_id": "native-revolve-scpf-visual"
}











