Class: HerringboneGear
Instance Attribute Summary collapse
-
#helical_gear ⇒ Object
readonly
Returns the value of attribute helical_gear.
Instance Method Summary collapse
-
#initialize(pitch_dia, height, helix_angle = Math::PI / 3.0) ⇒ HerringboneGear
constructor
A new instance of HerringboneGear.
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(pitch_dia, height, helix_angle = Math::PI / 3.0) ⇒ HerringboneGear
Returns a new instance of HerringboneGear.
134 135 136 137 138 139 140 141 142 143 |
# File 'lib/rcad/gears.rb', line 134 def initialize(pitch_dia, height, helix_angle=Math::PI / 3.0) @helical_gear = HelicalGear.new(pitch_dia, height / 2.0, helix_angle) @shape = add do ~helical_gear ~helical_gear .mirror_z .move_z(height) end end |
Instance Attribute Details
#helical_gear ⇒ Object (readonly)
Returns the value of attribute helical_gear.
132 133 134 |
# File 'lib/rcad/gears.rb', line 132 def helical_gear @helical_gear end |