Class: SpurGear
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
Instance Method Summary collapse
-
#initialize(height, *args) ⇒ SpurGear
constructor
A new instance of SpurGear.
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(height, *args) ⇒ SpurGear
Returns a new instance of SpurGear.
103 104 105 106 107 |
# File 'lib/rcad/gears.rb', line 103 def initialize(height, *args) @height = height @profile = GearProfile.new(*args) @shape = profile.extrude(height) end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
101 102 103 |
# File 'lib/rcad/gears.rb', line 101 def height @height end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
101 102 103 |
# File 'lib/rcad/gears.rb', line 101 def profile @profile end |