Mechanical: Add View
mech_view_addAdds another view of an existing mechanical part to an AutoCAD drawing, laid out on its projection axis and reusing stored model XDATA. Validates section planes, detail radii, and scales.
Instructions
Another view of a part already on the drawing, laid out on its projection axis.
The part model comes back out of the drawing's ACADMCP_MECH XDATA, so the
caller never re-describes it, and the placement follows the projection angle
recorded when the part was drawn (first angle by default: the view from the
right goes to the left).
Refused by name: a section without a plane, or with a plane of zero length,
a plane that misses the part, or one that grazes an outline vertex so its
crossings cannot be paired; a half or offset section on the wrong kind of
plane (the message names the style that does apply); a detail without a
radius or with a scale of zero; an unknown part_id, and part_id=None on a
drawing that holds more than one part.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gap | No | Gap between this view and its parent (mm) | |
| kind | No | front | side | top | section | detail | section |
| side | No | Which end an end view looks from: right | left | right |
| plane | No | Cutting plane {p1:[x,y], p2:[x,y], label, direction:[dx,dy], via:[[x,y]]} - required for a section | |
| scale | No | Must be 1.0: views are drawn full size (a detail takes its scale in detail.scale; a sheet scale is the viewport's) | |
| style | No | Section style: full | half | offset | revolved | full |
| detail | No | Detail region {center:[x,y], radius, scale, label, of:'front'} - required for a detail | |
| part_id | No | Anchor handle from mech_part_draw; omit if the drawing holds one part |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||