-
Notifications
You must be signed in to change notification settings - Fork 18
pytha.mirror_element
fabian-flassig edited this page May 7, 2020
·
6 revisions
Mirrors a single element or a table of elements.
Similar to the Part tools -> Mirror function in the PYTHA user interface.
pytha.mirror_element(element, origin, plane) | Parameter | Type | Description |
|---|---|---|
element |
element_handle or {...}
|
A single element handle or a table of element handles |
origin |
{x,y,z} |
Coordinates of the center of rotation |
plane |
{...} |
A table defining the orientation of the mirror plane that may contain the following options: |
plane.u_axis |
{x,y,z} |
u-axis of the mirror plane |
plane.v_axis |
{x,y,z} |
v-axis of the mirror plane |
plane.w_axis |
{x,y,z} |
Normal vector of the mirror plane |
If element contains element handles to groups, all members of these group will be rotated as well.
Pytha will mirror at the plane defined by the plane.u_axis and plane.v_axis. Alternatively, the plane.w_axis axis can be speecified, giving the normal direction on this plane which will be inverted with respect to the origin. So {u_axis = 'y', v_axis = 'z'} is equivalent to {w_axis = 'x'}, both defining the 'yz'-plane as the mirror plane.
To perform a mirror copy, copy first with zero displacement and then mirror the returned table of elements.
pytha, element handles, Axes and directions, move_element, copy_element, Groups