mesh.Mesh.reflect_x#
- Mesh.reflect_x(pos=0.0, reverse=True)#
Reflect the coordinates in the X direction.
This applies the
reflect()in the X direction.Parameters#
- pos: float
Offset of the mirror plane from origin (default 0.0)
- reverse: bool, optional
If True (default), the
reverse()method is called after the reflection to undo the element reversal caused by the reflection of its coordinates. This has in most cases the desired effect. If not, the user can set this to False to skip the element reversal.
Examples#
>>> coords = Coords([[0.0, 0.0, 0.0], ... [1.0, 1.0, 0.0], ... [1.0, 1.0, 1.0]]) >>> M = Mesh(coords,[[0,1,2]],eltype='tri3') >>> M1 = M.reflect_x() >>> print(M1.coords) [[ 0. 0. 0.] [-1. 1. 0.] [-1. 1. 1.]]