forked from 1b-agent/fieldcraft-upstream
Meshing test corpus built with SolidCraft; assembly placement in open_design (#11)
* geometry: build designs from SolidCraft command scripts (feature scripts) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * geometry: place component bodies through their occurrences when opening a design An assembly's instances were missing and moved components sat at their own origin. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * Meshing test corpus: 16 SolidCraft recipes, analytic shapes, loader and runner modelcraft-testkit holds the corpus (tests/corpus/<name>/recipe.json run through SolidCraft's engine, then opened as a design) and the runner binary behind cargo xtask corpus. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * docs: corpus results, test corpus architecture and the scripts feature; licences Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * corpus: measure each body once, check stage widths, simpler loader and runner Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm --------- Co-authored-by: jyviko <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
49 files changed
+1770
-84
No files matched your search
@@ -0,0 +1 @@
|
||||
A 10 mm tube with a 1 mm wall, bent through R30: a thin-walled sweep along a line-arc-line path.
|
||||
@@ -0,0 +1,9 @@
|
||||
{"corpus": {"categories": ["sweepable", "thin-wall", "genus"], "volume_mm3": 4159.829982},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Path"}},
|
||||
{"command": "sketch.line", "params": {"points": [[0, 0], [50, 0]], "ids": ["l1"]}},
|
||||
{"command": "sketch.arc.center_point", "params": {"center": [50, 30], "start": "l1.end", "sweep": 90, "id": "a1"}},
|
||||
{"command": "sketch.line", "params": {"points": ["a1.end", [80, 80]], "ids": ["l2"]}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.pipe", "params": {"path_sketch": "Path", "path": ["l1", "a1", "l2"], "diameter": 10, "wall": 1, "body_name": "Tube"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A base plate with a clamp block component placed twice, once turned 90 degrees: bodies placed by component transforms.
|
||||
@@ -0,0 +1,11 @@
|
||||
{"corpus": {"categories": ["assembly", "blocky"], "volume_mm3": 32998.93807},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 100, "width": 60, "height": 5, "body_name": "Base"}},
|
||||
{"command": "component.create", "params": {"name": "Clamp"}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 20, "width": 10, "height": 8, "body_name": "Clamp body"}},
|
||||
{"command": "solid.hole", "params": {"position": [10, 5, 8], "diameter": 4}},
|
||||
{"command": "component.activate", "params": {"component": "root"}},
|
||||
{"command": "occurrence.move", "params": {"occurrence": "Clamp:1", "translate": [10, 10, 5]}},
|
||||
{"command": "occurrence.copy", "params": {"component": "Clamp", "translate": [50, 0, 0]}},
|
||||
{"command": "occurrence.move", "params": {"occurrence": "Clamp:2", "axis": [0, 0, 1], "angle": "90 deg", "origin": [70, 15, 5]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
Two orthogonal R10 cylinders joined: equal radii, so the intersection curves cross at two singular points.
|
||||
@@ -0,0 +1,5 @@
|
||||
{"corpus": {"categories": ["boolean", "sharp"], "volume_mm3": 32365.77851},
|
||||
"commands": [
|
||||
{"command": "solid.cylinder", "params": {"base": [-30, 0, 0], "axis": "X", "radius": 10, "height": 60, "body_name": "Cross"}},
|
||||
{"command": "solid.cylinder", "params": {"base": [0, -30, 0], "axis": "Y", "radius": 10, "height": 60, "operation": "join", "targets": ["Cross"]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
An 8 mm L-bracket with an R6 inside fillet and a hole through each leg: a blend beside holes.
|
||||
@@ -0,0 +1,10 @@
|
||||
{"corpus": {"categories": ["fillet", "genus", "sweepable"], "volume_mm3": 32144.778925},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Profile"}},
|
||||
{"command": "sketch.line", "params": {"points": [[0, 0], [60, 0], [60, 8], [8, 8], [8, 50], [0, 50]], "closed": true}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.extrude", "params": {"distance": 40, "body_name": "Bracket"}},
|
||||
{"command": "solid.fillet", "params": {"edges": [[8, 8, 20]], "radius": 6}},
|
||||
{"command": "solid.hole", "params": {"position": [40, 8, 20], "diameter": 8}},
|
||||
{"command": "solid.hole", "params": {"position": [8, 32, 20], "diameter": 8}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 200 mm I-beam with 3 mm flanges and a 2 mm web: a long sweepable prism with thin walls.
|
||||
@@ -0,0 +1,7 @@
|
||||
{"corpus": {"categories": ["sweepable", "thin-wall"], "volume_mm3": 61600},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Section"}},
|
||||
{"command": "sketch.line", "params": {"points": [[-20, 0], [20, 0], [20, 3], [1, 3], [1, 37], [20, 37], [20, 40], [-20, 40], [-20, 37], [-1, 37], [-1, 3], [-20, 3]], "closed": true}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.extrude", "params": {"distance": 200, "body_name": "Beam"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 40 mm square lofted to an R15 circle 50 mm above: a ruled free-form surface between unlike sections.
|
||||
@@ -0,0 +1,11 @@
|
||||
{"corpus": {"categories": ["organic"]},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Bottom"}},
|
||||
{"command": "sketch.rectangle.center", "params": {"center": [0, 0], "corner": [20, 20]}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "construct.plane.offset", "params": {"base": "XY", "offset": "50 mm", "name": "TopPlane"}},
|
||||
{"command": "sketch.create", "params": {"plane": "TopPlane", "name": "Top"}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [0, 0], "radius": 15}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.loft", "params": {"sections": [{"sketch": "Bottom"}, {"sketch": "Top"}], "body_name": "Transition"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 3 mm plate perforated by a 6 x 4 grid of 6 mm holes: genus 24 in a thin sheet.
|
||||
@@ -0,0 +1,31 @@
|
||||
{"corpus": {"categories": ["genus", "thin-wall", "sweepable"], "volume_mm3": 26764.24796},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 120, "width": 80, "height": 3, "body_name": "Plate"}},
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Perforation"}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [15, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [15, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [15, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [15, 67], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [33, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [33, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [33, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [33, 67], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [51, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [51, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [51, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [51, 67], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [69, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [69, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [69, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [69, 67], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [87, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [87, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [87, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [87, 67], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [105, 13], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [105, 31], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [105, 49], "diameter": 6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [105, 67], "diameter": 6}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.extrude", "params": {"distance": 3, "operation": "cut"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 50 mm block drilled through by sixteen 0.6 mm pinholes: features 80 times smaller than the part, genus 16.
|
||||
@@ -0,0 +1,23 @@
|
||||
{"corpus": {"categories": ["small-feature", "genus"], "volume_mm3": 49909.522132},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 50, "width": 50, "height": 20, "body_name": "Block"}},
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Pinholes"}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [10, 10], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [10, 20], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [10, 30], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [10, 40], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [20, 10], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [20, 20], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [20, 30], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [20, 40], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [30, 10], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [30, 20], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [30, 30], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [30, 40], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [40, 10], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [40, 20], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [40, 30], "diameter": 0.6}},
|
||||
{"command": "sketch.circle.center", "params": {"center": [40, 40], "diameter": 0.6}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.extrude", "params": {"distance": 20, "operation": "cut"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 40 x 30 x 20 box with every edge rounded R3: cylinder and sphere blends meeting at the corners.
|
||||
@@ -0,0 +1,5 @@
|
||||
{"corpus": {"categories": ["fillet"], "volume_mm3": 23340.849375},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 40, "width": 30, "height": 20, "body_name": "Box"}},
|
||||
{"command": "solid.fillet", "params": {"edges": [[0, 0, 10.0], [0, 30, 10.0], [40, 0, 10.0], [40, 30, 10.0], [0, 15.0, 0], [0, 15.0, 20], [40, 15.0, 0], [40, 15.0, 20], [20.0, 0, 0], [20.0, 0, 20], [20.0, 30, 0], [20.0, 30, 20]], "radius": 3}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A block with a 0.5 mm deep groove cut by an R30 cylinder: groove walls 10 degrees off the top face.
|
||||
@@ -0,0 +1,5 @@
|
||||
{"corpus": {"categories": ["near-tangent", "boolean"], "volume_mm3": 47781.459517},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 60, "width": 40, "height": 20, "body_name": "Block"}},
|
||||
{"command": "solid.cylinder", "params": {"base": [0, 20, 49.5], "axis": "X", "radius": 30, "height": 60, "operation": "cut", "targets": ["Block"]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A wedge whose faces meet at under 3 degrees: a sharp edge with a needle-thin cross-section.
|
||||
@@ -0,0 +1,7 @@
|
||||
{"corpus": {"categories": ["sharp", "thin-wall", "sweepable"], "volume_mm3": 3200.0},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XY", "name": "Profile"}},
|
||||
{"command": "sketch.line", "params": {"points": [[0, 0], [80, 0], [80, 4]], "closed": true}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.extrude", "params": {"distance": 20, "body_name": "Wedge"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A sphere sunk 0.1 mm into a plate: the faces meet at under 6 degrees around a 2 mm circle.
|
||||
@@ -0,0 +1,5 @@
|
||||
{"corpus": {"categories": ["near-tangent", "boolean"], "volume_mm3": 69509.694367},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [-30, -30, -10], "length": 60, "width": 60, "height": 10, "body_name": "Plate"}},
|
||||
{"command": "solid.sphere", "params": {"center": [0, 0, 19.9], "radius": 20, "operation": "join", "targets": ["Plate"]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A vase revolved from a spline profile: doubly curved faces of varying curvature around a closed axis.
|
||||
@@ -0,0 +1,9 @@
|
||||
{"corpus": {"categories": ["organic"]},
|
||||
"commands": [
|
||||
{"command": "sketch.create", "params": {"plane": "XZ", "name": "Profile"}},
|
||||
{"command": "sketch.line", "params": {"points": [[0, 0], [20, 0]], "ids": ["base"]}},
|
||||
{"command": "sketch.spline.fit_point", "params": {"points": ["base.end", [28, 20], [14, 45], [18, 70]]}},
|
||||
{"command": "sketch.line", "params": {"points": [[18, 70], [0, 70], [0, 0]]}},
|
||||
{"command": "sketch.finish", "params": {}},
|
||||
{"command": "solid.revolve", "params": {"axis": "Z", "body_name": "Vase"}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
Three stacked blocks with a slot cut through the base: axis-aligned steps for polycube and octree meshers.
|
||||
@@ -0,0 +1,7 @@
|
||||
{"corpus": {"categories": ["blocky", "sharp"], "volume_mm3": 47000},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 60, "width": 40, "height": 10, "body_name": "Steps"}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 10], "length": 40, "width": 40, "height": 10, "operation": "join", "targets": ["Steps"]}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 20], "length": 20, "width": 40, "height": 10, "operation": "join", "targets": ["Steps"]}},
|
||||
{"command": "solid.box", "params": {"corner": [45, 15, 0], "length": 10, "width": 10, "height": 10, "operation": "cut", "targets": ["Steps"]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
A 4 mm plate carrying five 0.8 mm ribs 20 mm tall: thin walls standing on a thicker base.
|
||||
@@ -0,0 +1,9 @@
|
||||
{"corpus": {"categories": ["thin-wall", "blocky"], "volume_mm3": 32000.0},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 100, "width": 60, "height": 4, "body_name": "Plate"}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 9.6, 4], "length": 100, "width": 0.8, "height": 20, "operation": "join", "targets": ["Plate"]}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 19.6, 4], "length": 100, "width": 0.8, "height": 20, "operation": "join", "targets": ["Plate"]}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 29.6, 4], "length": 100, "width": 0.8, "height": 20, "operation": "join", "targets": ["Plate"]}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 39.6, 4], "length": 100, "width": 0.8, "height": 20, "operation": "join", "targets": ["Plate"]}},
|
||||
{"command": "solid.box", "params": {"corner": [0, 49.6, 4], "length": 100, "width": 0.8, "height": 20, "operation": "join", "targets": ["Plate"]}}
|
||||
]}
|
||||
@@ -0,0 +1 @@
|
||||
An 80 x 60 x 40 box shelled to 1 mm walls, open on top: thin walls over a large span.
|
||||
@@ -0,0 +1,5 @@
|
||||
{"corpus": {"categories": ["thin-wall", "blocky"], "volume_mm3": 15564},
|
||||
"commands": [
|
||||
{"command": "solid.box", "params": {"corner": [0, 0, 0], "length": 80, "width": 60, "height": 40, "body_name": "Enclosure"}},
|
||||
{"command": "solid.shell", "params": {"faces": [[40, 30, 40]], "thickness": 1}}
|
||||
]}
|
||||
Reference in new issue
Block a user