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 × 20 × 10 mm, 2.70 g/cm3: V = 8000 mm3, A = 2800 mm2, centroid (20, 10, 5), mass 21.6 gpassed
parts.block.volume_mm3= 8000, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.area_mm2= 2800, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.mass_g= 21.6, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.com_mm.0= 20, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.com_mm.1= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.com_mm.2= 5, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.size_mm.0= 40, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.size_mm.1= 20, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.size_mm.2= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagestep_ok= truetruelockedexact matchscene_meshes= 11lockedexact matchr0002cylinder r 5, h 20 mm on Z: V = π r² h = 500 π, A = 2 π r h + 2 π r² = 250 π, centroid (0, 0, h/2)passed
parts.rod.volume_mm3= 1570.796327, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.rod.area_mm2= 785.398163, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.rod.mass_g= 12.330751, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.rod.com_mm.0= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageparts.rod.com_mm.1= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageparts.rod.com_mm.2= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.rod.size_mm.0= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.rod.size_mm.2= 20, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0003box 40 × 20 × 10 with a 6 mm through hole at x 10, y 10: V = 8000 - 90 π, A = 2800 + 42 π, centroid x = (8000 × 20 - 90 π x 10) / Vpassed
parts.plate.volume_mm3= 7717.256661, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.plate.area_mm2= 2931.946891, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.plate.com_mm.0= 20.366378, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.plate.com_mm.1= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.plate.com_mm.2= 5, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0004assembly: steel cube 10 mm (7.85 g/cm3) at the origin and an aluminium pin r 5 × 10 (2.70 g/cm3), both built at the origin, the pin turned 90° 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 ± 10⁻⁸9.97058lockedunder 0.01 % of the tolerance usedparts.pin.com_mm.0= 105, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.pin.com_mm.1= 20, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.pin.com_mm.2= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageparts.pin.size_mm.0= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.pin.size_mm.2= 10, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagecom_mm.0= 26.268332, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagecom_mm.1= 8.19025, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagecom_mm.2= 3.936583, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesize_mm.0= 110, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesize_mm.1= 25, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagesize_mm.2= 15, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagescene_meshes= 22lockedexact matchstep_bodies= 22lockedexact matchr0005trapezoid (0,0) (30,0) (30,10) (0,20) extruded 5 mm: V = 5 × 450, polygon centroid (shoelace), A = 2 × 450 + perimeter x 5passed
parts.wedge.volume_mm3= 2250, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.wedge.area_mm2= 1358.113883, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.wedge.com_mm.0= 13.333333, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.wedge.com_mm.1= 7.777778, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.wedge.com_mm.2= 2.5, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0006parameter override L = 30 on a box L x 20 × 20 (L declared 20), one long edge filleted r 2: V = 20 × 20 x L - (4 - π) r² / 4 x Lpassed
parameters.L= 30, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.bar.volume_mm3= 11974.24778, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.bar.size_mm.0= 30, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0007half cylinder R 4 × 12 (a cylinder with a box cut away): V = π R² L / 2, centroid 4R / 3 π off the flat face, A = π R² + π R L + 2 R Lpassed
parts.half.volume_mm3= 301.592895, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.half.com_mm.1= 1.697653, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.half.com_mm.0= 0, within 1.000000 × 10⁻⁹reading not recorded on this pageparts.half.com_mm.2= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.half.area_mm2= 297.06193, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.half.mass_g= 3.015929, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0008box 30 × 20 × 10 less a r 2 cylinder cut along Y (80 π), less a right triangle 10 × 10 extruded through from a sketch at z -1 (500), less a 1 mm chamfer on a 30 mm edge (15): V = 6000 - 80 π - 515passed
parts.block.volume_mm3= 5233.672588, within 1.000000 × 10⁻⁹ relativereading not recorded on this pageparts.block.size_mm.0= 30, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagestep_ok= truetruelockedexact matchr0009drawing data: a box 40 × 20 × 10 with a 6 mm through hole at (10, 10), and an L profile (30 × 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= 20.836593, within 1.000000 × 10⁻⁹ relativereading not recorded on this pagedrawing.volume_max_rel_diffat most 1.000000 × 10⁻⁹reading not recorded on this page
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 10⁻⁹), 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 10⁻⁶ | |
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.