-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.stretch_element
Stretches a single element or a table of elements to a given size.
Similar to the Part tools -> Stretch function in the PYTHA user interface.
pytha.stretch_element(element, dimentsions [,options]) | Parameter | Type | Description |
|---|---|---|
element |
element_handle or {...}
|
A single element handle or a table of element handles |
dimensions |
{l_u,l_v,l_w} |
Table giving the new dimensions |
options |
{...} |
Optional: a table that may contain the following options: |
options.u_axis |
{x,y,z} |
Local coordinate u-axis for the zooming |
options.v_axis |
{x,y,z} |
Local coordinate v-axis for the zooming |
options.w_axis |
{x,y,z} |
Local coordinate w-axis for the zooming |
options.pivot |
{...} |
Table giving the orientation of the pivot point. The values can be "mid" (default), "low", "high" or absolute coordinates. |
If element contains element handles to groups, all members of these group will be zoomed as well.
Setting one value in dimensions to 0 will preserve the length of the object along this axis.
By specifying options.pivot the resting point of the scaling operation can be defined. For each axis this can be set individually either relative to the uvw-bounding box of the object: "low" refers to the minimum coordinate value, "high" to the maximum and "mid" to the center. Or it can be given numerically in absolute coordinates.
For example, orientation={0,0,"low"} will stretch an element around 0,0,w_min.
pytha, Part Tools Functions, Element Handles, Axes and directions, zoom_element, extend_element