Class: SpurGear

Inherits:
Shape show all
Defined in:
lib/rcad/gears.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heightObject (readonly)

Returns the value of attribute height.



101
102
103
# File 'lib/rcad/gears.rb', line 101

def height
  @height
end

#profileObject (readonly)

Returns the value of attribute profile.



101
102
103
# File 'lib/rcad/gears.rb', line 101

def profile
  @profile
end