Method: RADMesh::STL#mirror!
- Defined in:
- lib/radmesh/stl.rb
permalink #mirror!(*args) ⇒ STL
Note:
There is also the same method without ! working as expected. It is not in this reference guide, because it is automatically generated.
Mirror the mesh about the specified plane.
Mirroring involves reversing the sign of all of the coordinates in a particular axis. For example, to mirror a mesh about the XY plane, the signs of all of the Z coordinates in the mesh are reversed.
519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/radmesh/stl.rb', line 519 def mirror!(*args) args = args[0] if args.size == 1 raise ArgumentError, "wrong number of arguments (#{args.size} for 2)" if args.size != 2 args.sort! begin send("mirror_#{args[0]}#{args[1]}!") rescue raise ArgumentError, "invalid axis pair #{args[0]}#{args[1]}" end end |