pdc_convert
Convert SVG icons to Pebble Draw Command (.pdc) files, validating constraints first to return actionable violations instead of broken output.
Instructions
Convert an SVG icon/vector to a Pebble Draw Command (.pdc) file.
Validates PDC's known constraints before attempting conversion, so a bad SVG comes back as a structured violation list -- never a broken or silently-wrong .pdc. Supported SVG elements: g, layer, path (straight-line commands M/L/H/V/Z only -- flatten curves first), rect, polyline, polygon, line, circle. Not supported: gradients, masks, clip paths, filters, embedded text/images, and any transform other than translate(x, y).
On success, returns the .pdc file as base64 (pdc_base64) plus
size_bytes, image width/height, num_commands, and
any non-fatal warnings (e.g. odd coordinates -- PDC recommends
an even-integer coordinate grid for crisp rendering). On failure,
valid is false, pdc_base64 is absent, and violations
lists exactly what to fix, one entry per offending element/attribute.
Next move on failure: fix the listed elements/attributes in the SVG (flatten curves to polylines, remove gradients/masks, replace text with outlined paths) and call again -- this tool never guesses at a lossy conversion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg_text | Yes |