Geometry View
geometry_viewWrites STEP/IGES/BREP CAD models as colored GLB files and generates PNG previews with multiple views and legends, including optional DFM or face-highlight coloring.
Instructions
Write a solid 3D CAD file (.step .stp .iges .igs .brep, mm) as a coloured GLB for 3D viewers and, by default, a PNG picture of the same colours (isometric plus front, top, right views, legend, size in mm), also an image in the reply: hand over the PNG first. GLB: one material per colour, each primitive's extras list its face ids (F, as in geometry_measure); B-rep edges as lines if show_edges. color_by: 'none' (grey), 'face_kind' (plane, cylinder, cone, sphere, torus, bspline, other), 'dfm' (worst geometry_check_dfm finding per face: error red, warn orange, info blue; process, tool_axis, limits as there) or 'highlight' (faces in highlight, 'F3,F7', or named groups with a colour each: 'bends: F5,F12; holes: F3-F4'). GLB is metres, +Y up. 'focus': close-up panel of faces; 'dfm' rings mark findings. Also writes view.json. Returns triangle_count, face_count, highlighted_face_count, finding_count. Shells, loose faces, .stl refused. Needs the optional cad engine (uv sync --extra cad).
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>"
},
"name": "geometry_view"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Stem of the GLB file and node name: 1 to 64 letters, digits, '_' or '-'. Empty = the input file's stem | view |
| focus | No | Close-up panel in the PNG on these faces: 'F3,F7' (F14-F19), a highlight group name, or a DFM finding 'D2'. Empty = none | |
| limits | No | color_by 'dfm' only: JSON limits as in geometry_check_dfm, e.g. {"min_wall": "1 mm"}. Empty = defaults | |
| preview | No | 'png' (default): also write a PNG picture, isometric + front, top, right views and legend; 'iso': isometric only; 'none' | png |
| process | No | color_by 'dfm' only: 'cnc_milling' or 'sheet_metal', as in geometry_check_dfm | cnc_milling |
| color_by | No | 'none', 'face_kind', 'dfm' or 'highlight'; anything else is refused | face_kind |
| highlight | No | color_by 'highlight' only: face ids 'F3,F7' (range F14-F19), or colour groups 'bends: F5,F12; holes: F3-F4' (up to 8) | |
| tool_axis | No | color_by 'dfm', cnc_milling: spindle axis, one of +x -x +y -y +z -z. Empty = +z, with a warning | |
| model_path | Yes | Path to the solid model: .step .stp .iges .igs or .brep | |
| show_edges | No | Add the B-rep edges as a line primitive (GL_LINES) to the GLB, and draw them in the PNG | |
| max_seconds | No | Wall-clock budget in seconds, 1 to 600; default 120. A running OpenCASCADE call cannot be interrupted | |
| 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. | |
| mesh_deflection | No | Chord error of the tessellation, 0.001 mm to 100 mm, e.g. '0.01 mm' | 0.01 mm |
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 |