-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.extend_element
Extends a single element or a table of elements to a given size.
Similar to the Part tools -> Extend function in the PYTHA user interface.
pytha.extend_element(element, displacement [,options]) | Parameter | Type | Description |
|---|---|---|
element |
element_handle or {...}
|
A single element handle or a table of element handles |
displacement |
{l_u,l_v,l_w} |
Table giving the displacement in each direction |
options |
{...} |
Optional: a table that may contain the following options: |
options.u_axis |
{x,y,z} |
Local coordinate u-axis for the extension |
options.v_axis |
{x,y,z} |
Local coordinate v-axis for the extension |
options.w_axis |
{x,y,z} |
Local coordinate w-axis for the extension |
options.pivot |
{...} |
Table giving the orientation of the pivot point. The values can be "mid" (default), "low" or "high". |
options.u_divisions |
{...} |
A single value or a table of values giving the division coordinates in the u-direction |
options.v_divisions |
{...} |
A single value or a table of values giving the division coordinates in the v-direction |
options.w_divisions |
{...} |
A single value or a table of values giving the division coordinates in the w-direction |
If element contains element handles to groups, all members of these group will be extended as well.
By specifying options.pivot the resting point of the stretching operation can be defined relative to the bounding box of the object. Hereby, "low" refers to the minimum coordinate value, "high" to the maximum and "mid" to the center.
For example, orientation={"mid","mid","low"} will extend an element preserving the position of the center of its base.
options.u_divisions, options.v_divisions and options.w_divisions specify the corresponding absolute coordinates at which the elements are extended. If multiple coordinates are given, the displacement will be equally distributed.
If an element point coincides with a division coordinate, it will be half way displaced.
pytha, Part Tools Functions, Element Handles, Axes and directions, stretch_element, zoom_element