render_single
Render a single 3D view from OpenSCAD code or file, producing a PNG image with customizable camera, view, and quality settings.
Instructions
Render a single view from OpenSCAD code or file.
Args: scad_content: OpenSCAD code to render (mutually exclusive with scad_file) scad_file: Path to OpenSCAD file (mutually exclusive with scad_content) view: Predefined view name ("front", "back", "left", "right", "top", "bottom", "isometric", "dimetric") camera_position: Camera position - accepts [x,y,z] list, JSON string "[x,y,z]", or dict {"x":x,"y":y,"z":z} (default: [70, 70, 70]) camera_target: Camera look-at point - accepts [x,y,z] list, JSON string, or dict (default: [0, 0, 0]) camera_up: Camera up vector - accepts [x,y,z] list, JSON string, or dict (default: [0, 0, 1]) image_size: Image dimensions - accepts [width, height] list, JSON string "[width, height]", "widthxheight", or tuple (default: [800, 600]) color_scheme: OpenSCAD color scheme (default: "Cornfield") variables: Variables to pass to OpenSCAD auto_center: Auto-center the model quality: Quality preset - "draft" (fast, low detail), "normal" (OpenSCAD defaults), or "high" (slow, high detail). User-provided variables override quality preset values. include_paths: Additional include paths for OpenSCAD via the OPENSCADPATH environment variable, enabling multi-file project support ctx: MCP context for logging
Returns: List containing the rendered PNG image and metadata
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | ||
| quality | No | ||
| camera_up | No | ||
| scad_file | No | ||
| variables | No | ||
| image_size | No | ||
| auto_center | No | ||
| color_scheme | No | Cornfield | |
| scad_content | No | ||
| camera_target | No | ||
| include_paths | No | ||
| camera_position | No |