analyze_model
Analyze OpenSCAD models to extract key geometric data: bounding box, dimensions, center point, and triangle count. Get precise measurements from your code directly.
Instructions
Extract geometric information from an OpenSCAD model.
Exports the model to a temporary STL file, then parses vertex data to compute bounding box, dimensions, center point, and triangle count. The temporary STL is cleaned up after parsing.
Args: scad_content: OpenSCAD code to analyze (mutually exclusive with scad_file) scad_file: Path to OpenSCAD file to analyze (mutually exclusive with scad_content) variables: Variables to pass to OpenSCAD via -D flags include_paths: Additional include paths for OpenSCAD via the OPENSCADPATH environment variable ctx: MCP context for logging
Returns: Dict with success status, bounding_box (min/max xyz), dimensions (width/height/depth), center point, and triangle_count
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scad_file | No | ||
| variables | No | ||
| scad_content | No | ||
| include_paths | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||