render_drawing
Converts an SVG file to a PNG image for inline display, allowing the LLM to view the drawing directly.
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 |
|---|---|---|---|
| width | No | ||
| save_to | No | ||
| svg_path | Yes |