Class: BaseBoltPart
Instance Attribute Summary collapse
-
#bolt_dia ⇒ Object
Returns the value of attribute bolt_dia.
Instance Method Summary collapse
-
#initialize(bolt_dia) ⇒ BaseBoltPart
constructor
A new instance of BaseBoltPart.
- #nut_dia_across_corners ⇒ Object
- #nut_dia_across_flats ⇒ Object
- #nut_height ⇒ 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(bolt_dia) ⇒ BaseBoltPart
Returns a new instance of BaseBoltPart.
9 10 11 |
# File 'lib/rcad/nuts.rb', line 9 def initialize(bolt_dia) @bolt_dia = bolt_dia end |
Instance Attribute Details
#bolt_dia ⇒ Object
Returns the value of attribute bolt_dia.
7 8 9 |
# File 'lib/rcad/nuts.rb', line 7 def bolt_dia @bolt_dia end |
Instance Method Details
#nut_dia_across_corners ⇒ Object
21 22 23 |
# File 'lib/rcad/nuts.rb', line 21 def nut_dia_across_corners nut_dia_across_flats / Math::cos(30.deg_to_rad) end |
#nut_dia_across_flats ⇒ Object
17 18 19 |
# File 'lib/rcad/nuts.rb', line 17 def nut_dia_across_flats 1.8 * bolt_dia end |
#nut_height ⇒ Object
13 14 15 |
# File 'lib/rcad/nuts.rb', line 13 def nut_height 0.8 * bolt_dia end |