Fem Mesh
fem_meshGenerates a second-order tetrahedral finite element mesh from one STEP/IGES/BREP solid at a specified element size, returning quality statistics, volume comparison, warnings, and an .msh artifact.
Instructions
Tetrahedral finite element mesh (second-order, 10-node) of one solid in a CAD file (.step .stp .iges .igs .brep, read in millimetres, same loader as geometry_measure), made with Gmsh. Give the target element size with a unit, e.g. '5 mm'. Returns node and element counts, element quality statistics (mean ratio: 1 regular, 0 flat), the meshed volume against the exact B-rep volume, and warnings for slivers and coarse meshes; the mesh is an artifact (.msh, ASCII format 2). The work is capped before meshing: elements are estimated as 4volume/size^3 + 1.7area/size^2 (fitted to real Gmsh counts, within about 1.25x) and a size that needs more than 60000 elements, or is below 1/1000 of the part's diagonal, is refused as input.too_large. One solid only. The caller never supplies a Gmsh script. Needs the optional cad engine (uv sync --extra cad) and Gmsh installed by you (set ENG_TOOLKIT_GMSH or put gmsh on PATH; run toolkit_doctor to see).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_path": "<model_path>",
"element_size": "<element_size>"
},
"name": "fem_mesh"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_path | Yes | Path to a solid model: .step .stp .iges .igs or .brep | |
| output_unit | No | Length unit of the volumes in the result, e.g. 'mm' (default), 'm', 'inch' | mm |
| element_size | Yes | Target element edge length with unit, e.g. '5 mm' or '0.2 inch' |
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 |