Skip to content

pytha.stretch_element

fabian-flassig edited this page Jun 8, 2020 · 8 revisions

Stretches 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.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 stretching
options.v_axis {x,y,z} Local coordinate v-axis for the stretching
options.w_axis {x,y,z} Local coordinate w-axis for the stretching
options.orientation {...} Table giving the orientation of the resting point. The values can be "mid" (default), "low" or "high".

Additional information

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.orientation 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 stretch an element preserving the position of the center of its base.

See also:

pytha, Part Tools Functions, Element Handles, Axes and directions, zoom_element

Clone this wiki locally