render_single
Generate a single 3D model view from OpenSCAD code or files with customizable camera angles, image dimensions, and output formats.
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
output_format: Output format - "auto", "base64", "file_path", or "compressed" (default: "auto")
ctx: MCP context for logging
Returns: Dict with base64-encoded PNG image or file path
Input Schema
Name | Required | Description | Default |
---|---|---|---|
auto_center | No | ||
camera_position | No | ||
camera_target | No | ||
camera_up | No | ||
color_scheme | No | Cornfield | |
image_size | No | ||
output_format | No | auto | |
scad_content | No | ||
scad_file | No | ||
variables | No | ||
view | No |