render_drawing
Rasterizes SVG files to PNG images for inline viewing, enabling visualization of drawings created outside the sandbox without opening files separately.
Instructions
Rasterise an existing SVG file to PNG via resvg-py.
Complements render_view (which takes build123d shapes from the live
session) by accepting an SVG written outside the sandbox — typically by
a short Python script that does the ExportSVG call directly. The PNG is
returned inline so the LLM can see the drawing without you having to
open the file in another tool.
Args:
svg_path: path to an SVG file on disk.
width: output pixel width (default 1200); height set by SVG aspect ratio.
save_to: optional path to write the PNG. If empty, PNG bytes are
delivered inline only.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg_path | Yes | ||
| width | No | ||
| save_to | No |