Fem View
fem_viewGenerate a PNG and GLB view of FEM static results, colored by a selected field and optionally deformed, to inspect stress or displacement without rerunning the solver.
Instructions
A fem_static result as a PNG picture (isometric view, colour bar with field, unit, min and max, size in mm, a ring on the largest value; returned in the reply too, inline_image: hand it over first) and a GLB for 3D viewers: the mesh surface (6-node facets as 4 triangles) coloured by the nodal field of CalculiX, optionally deformed. Give result_dir (the fem_static job directory; manifest sha256s are checked) or mesh_file + results_file. field: von_mises, displacement, ux uy uz, s_xx s_yy s_zz s_xy s_yz s_zx, principal_max, principal_min. colormap auto (sequential for magnitudes, diverging blue-grey-red for signed fields, light grey = 0, ranges symmetric about zero). GLB is metres, +Y up; COLOR_0 linear RGB, _FIELD holds the values. Also writes legend.svg and view.json. Returns triangle_count, field_max, field_min, deformation_factor. Capped at 1,000,000 triangles. Surface only; nodal stresses are extrapolated, averaged, and unbounded at point loads and sharp corners. No solver run.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fem_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Node name in the GLB and title of the legend, 1 to 64 printable characters | fem_view |
| field | No | von_mises (default), displacement, ux, uy, uz, s_xx, s_yy, s_zz, s_xy, s_yz, s_zx, principal_max or principal_min | von_mises |
| range | No | 'auto' or 'lo, hi' with units, e.g. '0 MPa, 250 MPa'; diverging ranges expand symmetrically about zero (light grey) | auto |
| preview | No | 'png' (default; 'iso' is the same): also write fem_view.png, a picture with colour bar, unit and range; 'none': GLB only | png |
| colormap | No | 'auto' (sequential for von_mises/displacement, diverging otherwise), 'sequential' or 'diverging' | auto |
| mesh_file | No | Without result_dir: the mesh.msh a fem_static run wrote | |
| mesh_edges | No | Draw the element edges of the surface as a line primitive | |
| result_dir | No | Job directory of a fem_static run (holds manifest.json); or leave empty and give mesh_file + results_file | |
| max_seconds | No | Wall-clock budget in seconds, 1 to 600; default 120 | |
| output_unit | No | Unit of the values and labels: a stress unit (default MPa) or a length unit (default mm) | auto |
| inline_image | No | true (default): the PNG also comes back as an image block in the reply when it is <= 600 kB; false: path only. | |
| results_file | No | Without result_dir: the results.csv of the same fem_static run | |
| deformation_scale | No | '0' undeformed, 'auto' (largest displacement = 5 % of the diagonal) or a factor up to 1e4, e.g. '200' | 0 |
| show_undeformed_edges | No | When deformed, draw the undeformed feature edges as a grey line primitive |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |