render_sketch
Render an Onshape sketch to a 2D PNG with geometry and constraint badges for visual verification, complementing structured text output.
Instructions
Render a BTMSketch-151 to a 2D PNG (sketch-local mm, looking down the sketch normal). Onshape's /shadedviews shows solids but not sketch geometry — this plots each line / arc / circle / point directly and overlays constraint badges: FIX = red square, LENGTH / DIAMETER / RADIUS / DISTANCE = green label, HORIZONTAL / VERTICAL = H/V tag.
Complements inspect_sketch (structured text). Same entity ids are labeled on the drawing. Returns an image_id that crop_image can zoom into.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| elementId | Yes | Part Studio element ID | |
| documentId | Yes | ||
| showLabels | No | Label each entity with its id on the drawing. | |
| sketchName | No | Sketch name. Used when sketchFeatureId is not given. | |
| workspaceId | Yes | ||
| showConstraints | No | Overlay FIX / dimension / H / V badges. | |
| sketchFeatureId | No | featureId of the target BTMSketch-151 (preferred). |