-
Notifications
You must be signed in to change notification settings - Fork 0
/
Aal_HypocycloidCam.rb
72 lines (62 loc) · 2.51 KB
/
Aal_HypocycloidCam.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Aal_HypocycloidCam.rb
# ---------------------------------------------------------------------------
#
# Hypocycloid Cam Profile Generator
#
# Generate 2D profiles of hypocycloid cams for cycloid drives.
#
# ---------------------------------------------------------------------------
# Credits :
#
# Copyright 2013, Daniel A. Rathbun
# Translated & Modified from the original Python on/about 2013-04-26.
#
# Original Python ( http://www.zincland.com/hypocycloid ) by:
# Copyright 2009, Alex Lait
# ---------------------------------------------------------------------------
# License : GPL ( http://www.gnu.org/licenses/gpl-2.0.html )
#
# WARNING! IF you edit and create your OWN edition from this code ...
# CHANGE THE TOPLEVEL MODULE NAME ! "Aal" belongs to Dan Rathbun!
#
# ---------------------------------------------------------------------------
# Disclaimer :
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# ---------------------------------------------------------------------------
# References:
#
# Formulas to describe a hypocycloid cam:
# http://gears.ru/transmis/zaprogramata/2.139.pdf
#
# Insperational thread on CNCzone
# http://www.cnczone.com/forums/showthread.php?t=72261
#
# Formulas for calculating the pressure angle and finding the limit circles
# http://imtuoradea.ro/auo.fmte/files-2007/MECATRONICA_files/Anamaria_Dascalescu_1.pdf
#
# ---------------------------------------------------------------------------
# Notes:
#
# Does not currently do ANY checking for sane input values and it
# is possible to create un-machinable cams, use at your own risk
#
# Suggestions:
# * Eccentricity should not be more than the pin radius.
# * Has not been tested with negative values, may have interesting results!
#
# ---------------------------------------------------------------------------
require('sketchup.rb')
require('extensions.rb')
module Aal # <---<< Dan Rathbun's proprietary toplevel namespace.
module HypocycloidCam
@@plugin = SketchupExtension.new('Hypocycloid Cam','Aal_HypocycloidCam/HypocycloidCam.rb')
@@plugin.version = '1.0.1'
@@plugin.creator = 'Daniel A. Rathbun'
@@plugin.copyright = '2013, released under the GPL'
@@plugin.description= 'Generate 2D profiles of hypocycloid cams for cycloid drives.'
Sketchup.register_extension(@@plugin,true)
end # module Hypocycloid
end # outer module