solid
One parametric solid model of a part or an assembly, built from a model script by SolidCraft's headless CLI (pinned release 0.45.0, B-rep kernel solidcore). The script names parameters (numbers or expressions; `parameters` overrides them), parts made of features (box, cylinder, extruded polygon, hole, fillet, chamfer; each in mode add, cut or intersect) with a density each, and an assembly of instances placed by rotations about world axes then a translation. Readings per instance (`parts.<name>`: volume, mass, centre of mass, bounding box, area), per part summed over its instances (`by_part.<part>`), and for the assembly (mass, centre of mass, bounding box). Files: model.step (AP242, one named body per instance, read back and checked), scene.glb (one mesh per instance, named as it, mm), parts.csv; with drawing_data, drawing.json for the `drawing` instrument (each part in its own frame: exact faces with planes and cylinders, edges, bounding box, mass, and projected views front, top, right, iso and one auxiliary view per slanted hole axis, hidden edges dashed; the assembly's views). Lengths in mm, densities in g/cm3.
- Field
- Mechanics, CAD and finite elements
- Version
- 0.2.0
- Runs as
- Compiled (Rust)
- Typical run
- 3 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001box 40 x 20 x 10 mm, 2.70 g/cm3: V = 8000 mm3, A = 2800 mm2, centroid (20, 10, 5), mass 21.6 gpassed
parts.block.volume_mm3{"value": 8000, "rel_tol": 1e-09}parts.block.area_mm2{"value": 2800, "rel_tol": 1e-09}parts.block.mass_g{"value": 21.6, "rel_tol": 1e-09}parts.block.com_mm.0{"value": 20, "rel_tol": 1e-09}parts.block.com_mm.1{"value": 10, "rel_tol": 1e-09}parts.block.com_mm.2{"value": 5, "rel_tol": 1e-09}parts.block.size_mm.0{"value": 40, "rel_tol": 1e-09}parts.block.size_mm.1{"value": 20, "rel_tol": 1e-09}parts.block.size_mm.2{"value": 10, "rel_tol": 1e-09}step_ok= truetruelockedexact matchscene_meshes= 11lockedexact matchr0002cylinder r 5, h 20 mm on Z: V = pi r^2 h = 500 pi, A = 2 pi r h + 2 pi r^2 = 250 pi, centroid (0, 0, h/2)passed
parts.rod.volume_mm3{"value": 1570.7963267948965, "rel_tol": 1e-09}parts.rod.area_mm2{"value": 785.3981633974482, "rel_tol": 1e-09}parts.rod.mass_g{"value": 12.330751165339937, "rel_tol": 1e-09}parts.rod.com_mm.0{"value": 0, "abs_tol": 1e-09}parts.rod.com_mm.1{"value": 0, "abs_tol": 1e-09}parts.rod.com_mm.2{"value": 10, "rel_tol": 1e-09}parts.rod.size_mm.0{"value": 10, "rel_tol": 1e-09}parts.rod.size_mm.2{"value": 20, "rel_tol": 1e-09}r0003box 40 x 20 x 10 with a 6 mm through hole at x 10, y 10: V = 8000 - 90 pi, A = 2800 + 42 pi, centroid x = (8000 x 20 - 90 pi x 10) / Vpassed
parts.plate.volume_mm3{"value": 7717.256661176919, "rel_tol": 1e-09}parts.plate.area_mm2{"value": 2931.9468914507715, "rel_tol": 1e-09}parts.plate.com_mm.0{"value": 20.36637804240135, "rel_tol": 1e-09}parts.plate.com_mm.1{"value": 10, "rel_tol": 1e-09}parts.plate.com_mm.2{"value": 5, "rel_tol": 1e-09}r0004assembly: steel cube 10 mm (7.85 g/cm3) at the origin and an aluminium pin r 5 x 10 (2.70 g/cm3), both built at the origin, the pin turned 90 deg about Y and moved to (100, 20, 0): combined centre sum(m c) / sum(m) with the cube at (5, 5, 5) and the pin at (105, 20, 0)passed
total_mass_g9.97058 ± 1e-089.97058lockedunder 0.01 % of the tolerance usedparts.pin.com_mm.0{"value": 105, "rel_tol": 1e-09}parts.pin.com_mm.1{"value": 20, "rel_tol": 1e-09}parts.pin.com_mm.2{"value": 0, "abs_tol": 1e-09}parts.pin.size_mm.0{"value": 10, "rel_tol": 1e-09}parts.pin.size_mm.2{"value": 10, "rel_tol": 1e-09}com_mm.0{"value": 26.268332392226892, "rel_tol": 1e-09}com_mm.1{"value": 8.190249858834035, "rel_tol": 1e-09}com_mm.2{"value": 3.936583380388656, "rel_tol": 1e-09}size_mm.0{"value": 110, "rel_tol": 1e-09}size_mm.1{"value": 25, "rel_tol": 1e-09}size_mm.2{"value": 15, "rel_tol": 1e-09}scene_meshes= 22lockedexact matchstep_bodies= 22lockedexact matchr0005trapezoid (0,0) (30,0) (30,10) (0,20) extruded 5 mm: V = 5 x 450, polygon centroid (shoelace), A = 2 x 450 + perimeter x 5passed
parts.wedge.volume_mm3{"value": 2250.0, "rel_tol": 1e-09}parts.wedge.area_mm2{"value": 1358.113883008419, "rel_tol": 1e-09}parts.wedge.com_mm.0{"value": 13.333333333333334, "rel_tol": 1e-09}parts.wedge.com_mm.1{"value": 7.777777777777778, "rel_tol": 1e-09}parts.wedge.com_mm.2{"value": 2.5, "rel_tol": 1e-09}r0006parameter override L = 30 on a box L x 20 x 20 (L declared 20), one long edge filleted r 2: V = 20 x 20 x L - (4 - pi) r^2 / 4 x Lpassed
parameters.L{"value": 30, "rel_tol": 1e-09}parts.bar.volume_mm3{"value": 11974.247779607695, "rel_tol": 1e-09}parts.bar.size_mm.0{"value": 30, "rel_tol": 1e-09}r0007half cylinder R 4 x 12 (a cylinder with a box cut away): V = pi R^2 L / 2, centroid 4R / 3 pi off the flat face, A = pi R^2 + pi R L + 2 R Lpassed
parts.half.volume_mm3{"value": 301.59289474462014, "rel_tol": 1e-09}parts.half.com_mm.1{"value": 1.6976527263135504, "rel_tol": 1e-09}parts.half.com_mm.0{"value": 0, "abs_tol": 1e-09}parts.half.com_mm.2{"value": 6.0, "rel_tol": 1e-09}parts.half.area_mm2{"value": 297.06192982974676, "rel_tol": 1e-09}parts.half.mass_g{"value": 3.015928947446201, "rel_tol": 1e-09}r0008box 30 x 20 x 10 less a r 2 cylinder cut along Y (80 pi), less a right triangle 10 x 10 extruded through from a sketch at z -1 (500), less a 1 mm chamfer on a 30 mm edge (15): V = 6000 - 80 pi - 515passed
parts.block.volume_mm3{"value": 5233.6725877128165, "rel_tol": 1e-09}parts.block.size_mm.0{"value": 30, "rel_tol": 1e-09}step_ok= truetruelockedexact matchr0009drawing data: a box 40 x 20 x 10 with a 6 mm through hole at (10, 10), and an L profile (30 x 20, legs 5 wide) extruded 8: edges a person counts in each view (box: top 4 lines + 1 circle, front and side 4 lines and the hole's 2 hidden lines; L: top 6, front 4 with 1 hidden, side 5), the part rebuilt in its own frame with its instance's volumepassed
drawing_ok= truetruelockedexact matchdrawing.parts.plate.views.top.n_visible= 5misseddiffersdrawing.parts.plate.views.top.n_hidden= 0misseddiffersdrawing.parts.plate.views.front.n_visible= 4misseddiffersdrawing.parts.plate.views.front.n_hidden= 2misseddiffersdrawing.parts.plate.views.right.n_visible= 4misseddiffersdrawing.parts.plate.views.right.n_hidden= 2misseddiffersdrawing.parts.ell.views.top.n_visible= 6misseddiffersdrawing.parts.ell.views.front.n_visible= 4misseddiffersdrawing.parts.ell.views.front.n_hidden= 1misseddiffersdrawing.parts.ell.views.right.n_visible= 5misseddiffersdrawing.parts.ell.views.right.n_hidden= 0misseddiffersdrawing.parts.plate.mass_g{"value": 20.836592985177685, "rel_tol": 1e-09}drawing.volume_max_rel_diff{"max": 1e-09}
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
model | {"name": "plate with a hole", "parameters": {"L": 40, "W": 20, "T": 10, "D": 6}, "parts": {"plate": {"material": "aluminium 6061", "density_g_cm3": 2.7, "features": [{"op": "box", "size": ["L", "W", "T"]}, {"op": "hole", "at": ["L / 4", "W / 2", "T"], "diameter": "D"}]}}} | The model script: {name, parameters: {name: number or expression}, parts: {name: {material, density_g_cm3, color?: [r,g,b], finish?: [metallic, roughness], features: [...]}}, assembly?: [{name, part, rotate?: [{axis: X|Y|Z|[x,y,z], deg}], position?: [x,y,z]}]} (no assembly: each part once, where it is built). Features: {op: box, size: [x,y,z], corner? | center?}, {op: cylinder, radius | diameter, height, base?, axis?: X|Y|Z|[x,y,z]}, {op: extrude, profile: [[x,y]...], distance, origin?, x_dir?, y_dir?, direction?: positive|negative|symmetric}, each with mode?: add|cut|intersect; {op: hole, at: [x,y,z] on a face, diameter, direction?, depth? (default through)}; {op: fillet, edges: [[x,y,z] on an edge], radius}; {op: chamfer, edges, distance}. Any number may be an expression over the parameters ("L / 2", sin/cos/tan in degrees). Names: a-z, 0-9, _. | |
model_file | The model script as a JSON file instead of `model`. | ||
parameters | {} | Overrides of the model's parameters by name, e.g. {"T": 12}. | |
quality | standard | How closely the scene's meshes follow curved faces (picture only; every reading is exact). | |
drawing_data | false | Also write drawing.json for the `drawing` instrument: each part built again in its own frame (its volume must equal its placed instances', rel 1e-9), measured on the B-rep (faces with their plane normals and cylinder axes and radii, edges, bounding box, mass) and projected by SolidCraft (file.export_view_dxf: front, top, right, iso, and an auxiliary view along each slanted hole axis; hidden edges kept dashed, hidden pieces lying under visible edges dropped), plus the assembly's views. Readings drawing.parts.<part>.views.<view>.{n_visible, n_hidden} count the edges a person would count. |
Readings
| Name | Unit | Meaning |
|---|---|---|
parts | per instance: part, material, density_g_cm3, volume_mm3, mass_g, mass_kg, com_mm [x,y,z], com_x_mm.., bbox_min_mm, bbox_max_mm, size_mm, area_mm2, faces | |
by_part | per part, summed over its instances: count, volume_mm3, mass_g, mass_kg, area_mm2 | |
assembly | count, mass_g, mass_kg, volume_mm3, area_mm2 (sum of the parts'), com_mm, bbox_min_mm, bbox_max_mm, size_mm | |
total_mass_kg | kg | |
total_mass_g | g | |
com_mm | mm | |
size_mm | mm | |
step_ok | model.step read back: same number of bodies, volumes within 1e-6 | |
model.step | ||
scene.glb | ||
parts.csv | ||
drawing.json | with drawing_data: the facts and views the drawing instrument draws from | |
drawing | with drawing_data: ok, parts.<part>.{mass_g, volume_rel_diff, views.<view>.{n_visible, n_hidden}}, assembly_views, volume_max_rel_diff |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.