pyplot.insert_detail - pytha-3d-cad/pytha-lua-api GitHub Wiki
Inserts one or more plot details on one or more sheets.
pyplot.insert_detail(sheet, options [, elements])
| Parameter | Type | Description |
|---|---|---|
sheet |
element_handle or { element_handle* } |
Element handle to one or more plot sheets |
options |
table |
Options controlling view, placement, clipping, scale and appearance |
elements |
element_handle or { element_handle* } (optional) |
Optional selection of parts and groups to include in the detail |
Return value
| Type | Description |
|---|---|
{ element_handle* } |
A table containing the created detail handles |
options table
| Property | Type | Description |
|---|---|---|
view |
string |
View direction: "xy", "xz", "yz", "-xy", "-xz", "-yz", "axo" or "persp" |
position |
{number, number} |
Detail center on the sheet |
size |
{number, number} |
Detail size on the sheet |
angle |
number |
Rotation angle of the detail on the sheet |
scale |
number |
Explicit detail scale |
view_min |
{number, number} |
Optional lower clipping corner in model view coordinates |
view_max |
{number, number} |
Optional upper clipping corner in model view coordinates |
tilt |
number |
Only in axo view: Axonometric tilt angle |
rotation |
number |
Only in axo view: Axonometric rotation angle |
center |
{number, number, number} |
Only in axo and persp view: Optional center point for axonometric or perspective views |
eyepoint |
{number, number, number} |
Only in persp view: Camera position for perspective views |
clip_near |
number |
Only in persp view: Near clipping distance for perspective views |
aspect_ratio |
number |
Only in persp view: Perspective width-to-height ratio |
aperture |
number |
Only in persp view: Perspective aperture angle |
layer_visible |
table |
Table mapping layer numbers to true or false |
graphic_flags |
{ string* } |
Display flags, see below |
Supported graphic_flags
| Value | Description |
|---|---|
"edges" |
Show edges |
"solid" |
Show solid representation |
"hidden_edges" |
Show hidden edges |
"hatching" |
Show hatching |
"hatching_islands" |
Show hatching islands |
"shaded" |
Show shaded representation |
"material" |
Show materials |
"shadow" |
Show shadow plane |
Example:
local details = pyplot.insert_detail(sheet, {
view = "axo",
position = {100, 80},
size = {120, 90},
tilt = 35,
rotation = 45,
graphic_flags = {"edges", "shaded"}
})
Remarks:
The function creates one detail on each specified plot sheet.
If elements is omitted, the full model is used. If a selection is provided, only the selected parts and groups are shown.
If scale is omitted but both view_min and view_max are given, the scale is derived from the clipping rectangle and the requested size.
If no explicit graphic_flags are given, a default combination of edges, shaded and solid display is used.
The function returns a table of created detail handles.
Version Support:
Minimum PYTHA Version: V26