vcad-render / README.md
campedersen's picture
Initial deploy - SVG rendering with WASM kernel
2b3c4a6 verified
metadata
title: vcad Render API
emoji: 🔧
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: false

vcad Render API

HTTP API that renders Compact IR to PNG images using the vcad kernel.

Endpoints

POST /render

Renders Compact IR to a PNG image.

Request:

{
  "ir": "C 50 30 10\nY 5 20\nT 1 25 15 0\nD 0 2"
}

Response: PNG image (image/png)

GET /health

Health check endpoint.

Response:

{"status": "ok"}

Compact IR Syntax

  • C w h d - Box (cuboid)
  • Y r h - Cylinder
  • S r - Sphere
  • T idx x y z - Translate node at index
  • U a b - Union of nodes a and b
  • D a b - Difference (a minus b)

Related