Method: SolidRuby::ScrewThreads::ScrewThread#orientation_swap_to
- Defined in:
- lib/solidruby/screw_thread.rb
#orientation_swap_to(coords, rotation) ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/solidruby/screw_thread.rb', line 56 def orientation_swap_to(coords, rotation) return [coords[0], coords[2], -coords[1]] if rotation[:x].to_i == -90 return [coords[0], -coords[2], coords[1]] if rotation[:x].to_i == 90 return [coords[2], coords[1], coords[0]] if rotation[:y].to_i == -90 return [-coords[2], coords[1], -coords[0]] if rotation[:y].to_i == 90 coords end |