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
#*, #+, #-, #align, #back, #bbox, #bottom, #center, #cx, #cy, #cz, #extrude, #front, #left, #maxx, #maxy, #maxz, #minx, #miny, #minz, #mirror, #mirror_x, #mirror_y, #mirror_z, #move, #move_x, #move_y, #move_z, #render, #revolve, #right, #rot_x, #rot_y, #rot_z, #rotate, #scale, #scale_x, #scale_y, #scale_z, #top, #transform, #xcenter, #xsize, #ycenter, #ysize, #zcenter, #zsize, #~@
Constructor Details
#initialize(inner_dia, outer_dia, angle = nil) ⇒ Torus
Returns a new instance of Torus.
542 543 544 545 546 |
# File 'lib/rcad.rb', line 542 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.
540 541 542 |
# File 'lib/rcad.rb', line 540 def angle @angle end |
#inner_dia ⇒ Object
Returns the value of attribute inner_dia.
540 541 542 |
# File 'lib/rcad.rb', line 540 def inner_dia @inner_dia end |
#outer_dia ⇒ Object
Returns the value of attribute outer_dia.
540 541 542 |
# File 'lib/rcad.rb', line 540 def outer_dia @outer_dia end |
Instance Method Details
#inner_radius ⇒ Object
548 549 550 |
# File 'lib/rcad.rb', line 548 def inner_radius inner_dia / 2.0 end |
#outer_radius ⇒ Object
552 553 554 |
# File 'lib/rcad.rb', line 552 def outer_radius outer_dia / 2.0 end |