drawing_overlay
Overlay a CATIA sketch on a vector PDF drawing and export a PNG to visually verify profiles before pad or shaft operations. Ensures sketch lines follow the drawing geometry.
Instructions
Draw a CATIA sketch (in part mm) on top of the PDF drawing and return the PNG path: the coloured sketch must follow the black drawing lines everywhere. Do this for every non-trivial profile BEFORE pad/shaft, then LOOK at the image. sketch takes the same arguments as the sketch tools: a catia_sketch_profile object {start, segments}, an entity {type: line|circle|arc|rectangle, ...}, or a list of them. hv maps the sketch (h, v) axes to the view (X right, Y up): 'h,v', '-h,v', 'v,h', ...
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hv | No | h,v | |
| dpi | No | ||
| page | No | Page index, 0-based. | |
| scale | No | Drawing scale '1:2' (1 mm on paper = 2 mm on the part). If omitted the title block text is used when readable, else 1:1. The title block scale is sometimes WRONG: cross-check with a known dimension. | |
| origin | No | [x, y] PAPER mm point that becomes the model origin (0, 0), typically an axis/centre found in a first call without origin. Model X is right, Y up. | |
| region | No | [x0, y0, x1, y1] in PAPER mm from the sheet's top-left corner (y down). Omit for the whole sheet. | |
| sketch | No | Sketch entities in mm (see description). Or use sketch_file. | |
| out_png | No | Output PNG path (default: temp folder). | |
| pdf_path | Yes | Path to a VECTOR PDF drawing (not a scan). | |
| sketch_file | No | Path to a JSON file holding the sketch. |