pytha.zoom_element - pytha-3d-cad/pytha-lua-api GitHub Wiki

Scales a single element or a table of elements uniformly by a given factor.

Similar to the Part tools -> Zoom function in the PYTHA user interface.

pytha.zoom_element(element, factor [,options]) 
Parameter Type Description
element element_handle or {...} A single element handle or a table of element handles
factor {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.

Additional information

If element contains element handles to groups, all members of these group will be zoomed as well.

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, pivot={0,0,"low"} will zoom an element around 0,0,w_min.

See also:

pytha, Part Tools Functions, Element Handles, Axes and directions, stretch_element, extend_element