Class: Torus
Instance Attribute Summary collapse
-
#angle ⇒ Object
Returns the value of attribute angle.
-
#inner_dia ⇒ Object
Returns the value of attribute inner_dia.
-
#outer_dia ⇒ Object
Returns the value of attribute outer_dia.
Instance Method Summary collapse
-
#initialize(inner_dia, outer_dia, angle = nil) ⇒ Torus
constructor
A new instance of Torus.
- #inner_radius ⇒ Object
- #outer_radius ⇒ Object
Methods inherited from Shape
#*, #+, #-, #bbox, #extrude, #max_x, #max_y, #max_z, #min_x, #min_y, #min_z, #mirror_x, #mirror_y, #mirror_z, #move_x, #move_y, #move_z, #render, #revolve, #rot_x, #rot_y, #rot_z, #scale_x, #scale_y, #scale_z, #x_size, #y_size, #z_size, #~@
Constructor Details
#initialize(inner_dia, outer_dia, angle = nil) ⇒ Torus
Returns a new instance of Torus.
330 331 332 333 334 |
# File 'lib/rcad.rb', line 330 def initialize(inner_dia, outer_dia, angle=nil) @inner_dia = inner_dia @outer_dia = outer_dia @angle = angle end |
Instance Attribute Details
#angle ⇒ Object
Returns the value of attribute angle.
328 329 330 |
# File 'lib/rcad.rb', line 328 def angle @angle end |
#inner_dia ⇒ Object
Returns the value of attribute inner_dia.
328 329 330 |
# File 'lib/rcad.rb', line 328 def inner_dia @inner_dia end |
#outer_dia ⇒ Object
Returns the value of attribute outer_dia.
328 329 330 |
# File 'lib/rcad.rb', line 328 def outer_dia @outer_dia end |
Instance Method Details
#inner_radius ⇒ Object
336 337 338 |
# File 'lib/rcad.rb', line 336 def inner_radius inner_dia / 2.0 end |
#outer_radius ⇒ Object
340 341 342 |
# File 'lib/rcad.rb', line 340 def outer_radius outer_dia / 2.0 end |