[Home]History of Oword

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

Revision 60 . . February 9, 2018 1:11 pm by Joseph.Peitz
Revision 59 . . January 14, 2018 7:09 am by Admin
Revision 58 . . (edit) January 11, 2018 5:34 am by Admin
Revision 57 . . October 26, 2017 4:51 pm by KimK [Updated link.]
Revision 56 . . June 2, 2015 6:37 am by Herbivore102 [*added email address to sample 7]
  

Difference (from prior major revision) (no other diffs)

Added: 508a509
(2018 Feb 9 added hub support)

Changed: 517c518,599
(subroutine: draws one whole gear tooth with no gap)
o621 sub
(draw pie shape quadrants over the gear leaving "spokes" in between)
(makes pointy pieces or round ended pieces)
(compensation to be made by adjusting spokelength and/or thick)
(the third parameter controls spoke length)
(parms: xloc,yloc,baseradius,scutdiam,numspokes,spokethick,spoketaper,extrahub,ginc)
#<xloc> = #1
#<yloc> = #2
#<sradius>=#3
#<scutdiam>=#4
#<numspokes> = #5 (2 < numspokes < 17 w thickness below, if you need more spokes,they'll have to be thinner)
#<spokethick> = [#6 +#<scutdiam>/2]
#<spoketaper>=#7
#<extrahub>=#8 (this one is +,-, or zero)
#<sginc>=#9
#<spassesneeded>=#10
#<scuttingfeed>= #11
#<scuttingdepth>= #12
(#<spokethick> is half of the thickness passed in)
#<innie> = 0 (fillet position???)
o622 if [#<extrahub> lt 0]
#<innie>= 1
#<extrahub> = [-#<extrahub>]
o622 endif
(this routine compensates spoke length, might need to change it)
#<spokelength> =[SQRT[ [[#<sradius>-#<scutdiam>/2]-#<spokethick>]**2 +[#<spokethick>]**2]] (relative to gear center)
#<quadrantsize> = [360/#<numspokes>]
#<firstorigin> = [#<quadrantsize>/2]
#<originlength> = [SQRT[[#<spokethick>+#<spoketaper>]**2+[[#<spokethick>+#<spoketaper>]/tan[#<firstorigin>]]**2]] (relative to gear center)
#<currentquadrant> = #<quadrantsize>
#<firstcut>= [atan[#<spokethick>]/[#<spokelength>]]
o612 if [#<extrahub> ne 0]
#<originlength> = [SQRT[[#<spokethick>+#<spoketaper>+#<extrahub>]**2+[#<spokethick>+#<extrahub>]**2]] (relative to gear center)
#<spokelength> = [#<spokelength> - #<extrahub>]
#<firstorigin> = [atan [#<spokethick>+#<spoketaper>]/[#<originlength>]]
#<secondorigin> = [#<currentquadrant> - #<firstorigin>]
#<hereiamx>= [#<xloc>+cos[#<firstorigin>]*[#<originlength>]]
#<hereiamy>= [#<yloc>+sin[#<firstorigin>]*[#<originlength>]]
#<hereiamchord>= [SQRT[[[#<xloc>+cos[#<secondorigin>]*[#<originlength>]]-#<hereiamx>]**2 +[[#<yloc>+sin[#<secondorigin>]*[#<originlength>]]-#<hereiamy>]**2]]
#<hereiamangle>=[[+#<secondorigin>-#<firstorigin>]/2]
#<ray>= [#<hereiamchord>/[2*tan[#<hereiamangle>]]]
#<chordangle>= atan[#<yloc>+[sin[#<secondorigin>]]*#<originlength>-#<hereiamy>]/[#<xloc>+[cos[#<secondorigin>]]*#<originlength>-#<hereiamx>]
#<sideangle>= atan[#<yloc>+[sin[#<firstcut>]]*#<spokelength>-#<hereiamy>]/[#<xloc>+[cos[#<firstcut>]]*#<spokelength>-#<hereiamx>]
o613 if [#<sideangle> gt 360]
#<sideangle> = [#<sideangle>- 360]
o613 endif
#<sideangle>= [#<sideangle> + 90]
#<chordangle> = [[#<chordangle> - #<sideangle>]]
#<ray>= [#<ray> + [#<hereiamchord>/2]*[tan[#<chordangle>]]]
o612 else
#<secondorigin> = #<firstorigin>
o612 endif
#<secondcut>= [#<currentquadrant>-#<firstcut>]
(begin drawing pie pieces here)
o610 while [#<currentquadrant> lt [360+#<quadrantsize>]]
g0 f100 x[#<xloc>+cos[#<firstorigin>+#<sginc>]*[#<originlength>]] y[#<yloc>+sin[#<firstorigin>+#<sginc>]*[#<originlength>]]
#302 = 0
o405 while [#302 lt #<spassesneeded>]
#302 = [#302 + 1]
g1 f#<scuttingfeed> z[0.0 - #302*#<scuttingdepth>] (plunge)
g1 x[#<xloc>+cos[#<firstcut>+#<sginc>]*#<spokelength>] y[#<yloc>+sin[#<firstcut>+#<sginc>]*#<spokelength>]
g3 x[#<xloc>+cos[#<secondcut>+#<sginc>]*#<spokelength>] y[#<yloc>+sin[#<secondcut>+#<sginc>]*#<spokelength>] i [#<xloc>] j [#<yloc>]
g1 x[#<xloc>+cos[#<secondorigin>+#<sginc>]*[#<originlength>]] y[#<yloc>+sin[#<secondorigin>+#<sginc>]*[#<originlength>]]
o611 if [#<extrahub> ne 0]
#<hereiamx>= [#<xloc>+cos[#<firstorigin>+#<sginc>]*[#<originlength>]]
#<hereiamy>= [#<yloc>+sin[#<firstorigin>+#<sginc>]*[#<originlength>]]
o623 if [#<innie> eq 1]
g3 x[#<hereiamx>] y[#<hereiamy>] i [#<xloc>+#<ray>*[cos[#<hereiamangle>+#<firstorigin>+#<sginc>]]] j [#<yloc>+#<ray>*[sin[#<hereiamangle>+#<firstorigin>+#<sginc>]]]
o623 else
g2 x[#<hereiamx>] y[#<hereiamy>] i [#<xloc>] j [#<yloc>]
o623 endif
o611 endif
o405 endwhile
g0 f100 z0.25
#<currentquadrant> = [#<currentquadrant> + #<quadrantsize>]
#<firstorigin> = [#<firstorigin> + #<quadrantsize>]
#<secondorigin> = [#<secondorigin> + #<quadrantsize>]
#<firstcut>= [#<firstcut> + #<quadrantsize>]
#<secondcut>= [#<secondcut> + #<quadrantsize>]
o610 endwhile (end making pie shapes spokes)
o621 endsub


Changed: 521c603,604
#10 = 0.018 (This should be zero, its an approximation)
(this routine cuts teeth and the gully between teeth)
#10 = [1*#<_precision>] (This should be zero, its an approximation)

Added: 545a629
#<native> = #10 (native has the last value of inva before we flip)

Removed: 547,552d630
#<native> = [atan/]
o511 if[#<native> gt [[360/[2.0*#6]]]]
o512 if [#<_incangle> eq 0]
(DEBUGprogram error,can't fit full teeth:bad pressure angle?)
o512 endif
o511 endif

Added: 553a632
#10 = [#10 - #<_precision>]

Added: 554a634,639
#22 = [#<native> - #<_precision>]
#80 = [/57.2957779] (degrees and radians!!!)
#12 = [#3*[cos + #80*sin]](involute equations)
#13 = [#3*[sin - #80*cos]]
#<native> = [[atan/]]
#<_endangle> = [[360.0/[2.0*#6]]+2.0*#<native>+#<_fudgewccw>]

Added: 555a641
#<_endangle> = [[360.0/[2.0*#6]]+2.0*#<inva>+#<_fudgewccw>]

Changed: 564c650
o2003 while [#10 gt 0.018] (a small flat spot)
o2003 while [#10 ge [1*#<_precision>]] (a small flat spot)

Changed: 574,577c660,662
#14 = [#3*cos[+#4+#<_incangle>] + #1]
#15 = [#3*sin[+#4+#<_incangle>] + #2]
g1 x#14 y#15
#<_endangle> = [#<_incangle>]
;#14 = [#3*cos[+#4+#<_incangle>] + #1]
;#15 = [#3*sin[+#4+#<_incangle>] + #2]
;g1 x#14 y#15

Changed: 586c671
;(DEBUG, base angle=#25degrees,pitch angle=#26degrees,base-thickness=#22",pitch-thick=#21",addendum=#<_raddendum>",tooth above baseradius=#23",diametral pitch=#24,#<_gsamples>samples )
(DEBUG, base angle=#25degrees,pitch angle=#26degrees,base-thickness=#22",pitch-thick=#21",addendum=#<_raddendum>",tooth above baseradius=#23",diametral pitch=#24,#<_gsamples>samples )

Added: 589a675,685

(cut gully here)
#<segangle> = [360.0/] (wholesegment)
#32 = [#4+#<segangle>+#<_fudgewc>]
#33 = [#32-[[#<segangle>-#<_endangle>+#<_fudgewc>]/2.0]]
;#22 = [#3/[cos[[#32-#33]/2]]](theoretical but next line works better)
#22 = [#3 - 4.0* #3*[sin[#<segangle>/8]]**2]
;(DEBUG, endangle is #<_endangle>, #<compass_point>,#32,#33,#99)
g2 x[#1+[#3*cos]] y[#2+[#3*sin]] i [#1 +[#22 *cos]] j[#2 +[#22*sin]]
;g2 i [#1 +[#22 *cos]] j[#2 +[#22*sin]]
;g1 x[#1 +[#3*cos]] y[#2+[#3*sin]]

Changed: 621,622c717,718
#<ginc> = +03.0 (degree of rotation of both gears, change this to )
o800 while [#<ginc> lt 4]
#<ginc> = +6.0 (degree of rotation of both gears, change this to )
o800 while [#<ginc> lt +7]

Changed: 625,626c721,726
#<baseradius> = 1.10000
#<numberteeth> = 24 (this must be a even number, sorry)
#<baseradius> = 1.10000 (3.50 works with 60t 5/64 cutter & .002 fudges)
;#<baseradius> = 2.45000 (2.45 works with 4/64 cutter with new fix & .002 fudges)
;#<baseradius> = 2.60000 (2.6 works with 4/64 cutter with new fix)
;#<baseradius> = 3.30000 (1.9 is smallest with 60 teeth and 14.5 and 5/64)
(3.3 with fudgeh of .025 with 60 teeth and 5/64th mill precision .6)
#<numberteeth> = 30 (this must be a even number, sorry)

Changed: 628c728
#<_fudgeh> = +0.000 (adjust top, must be less than addendum inches)
#<_fudgeh> = -0.025 (adjust top, must be less than addendum inches)

Changed: 640c740
#<_precision> = 0.100 (adjust accuracy,.01 and .001 take long)
#<_precision> = 0.1 (adjust accuracy,.01 and .001 take long)

Changed: 647c747
#<cuttingfeed> = 01.0 (5/64 endmills last much longer with this)
;#<cuttingfeed> = 01.0 (5/64 endmills last much longer with this)

Changed: 663,691c763
(compensation to be made by adjusting spokelength and/or thick)
#<numspokes> = 7 (2 < numspokes < 17 w thickness below, if you need more spokes,they'll have to be thinner)
#<spokethick> = [[#<baseradius>+#<cutterdiam>/2] / 18] (half of the thichness)
#<spokelength> =[SQRT[ [[#<baseradius>-#<cutterdiam>/2]-2*#<spokethick>]**2 +[#<spokethick>]**2]] (relative to gear center)
#<quadrantsize> = [360/#<numspokes>]
#<firstorigin> = [360/[2*#<numspokes>]]
#<originlength> = [SQRT[[#<spokethick>]**2+[#<spokethick>/tan[#<firstorigin>]]**2]] (relative to gear center)
#<currentquadrant> = #<quadrantsize>
#<firstcut>= [atan[#<spokethick>]/[#<spokelength>]]
#<secondcut>= [#<currentquadrant>-#<firstcut>]
#<spoketaper> = [3.0*#<cutterdiam>] (adds thickness at the center)
o610 while [#<currentquadrant> lt [360+#<quadrantsize>]]
g0 f100 x[#<gearcenterx>+cos[#<firstorigin>+#<ginc>]*[#<originlength>+#<spoketaper>]] y[#<gearcentery>+sin[#<firstorigin>+#<ginc>]*[#<originlength>+#<spoketaper>]]
#302 = 0
o405 while [#302 lt #<passesneeded>]
#302 = [#302 + 1]
g1 f#<cuttingfeed> z[0.0 - #302*#<cuttingdepth>] (plunge)
g1 x[#<gearcenterx>+cos[#<firstcut>+#<ginc>]*#<spokelength>] y[#<gearcentery>+sin[#<firstcut>+#<ginc>]*#<spokelength>]
g3 x[#<gearcenterx>+cos[#<secondcut>+#<ginc>]*#<spokelength>] y[#<gearcentery>+sin[#<secondcut>+#<ginc>]*#<spokelength>] i [#<gearcenterx>] j [#<gearcentery>]
g1 x[#<gearcenterx>+cos[#<firstorigin>+#<ginc>]*[#<originlength>+#<spoketaper>]] y[#<gearcentery>+sin[#<firstorigin>+#<ginc>]*[#<originlength>+#<spoketaper>]]
;g3 x[#<gearcenterx>+cos[#<secondcut>+#<ginc>]*[#<originlength>+#<cutterdiam>]] y[#<gearcentery>+sin[#<secondcut>+#<ginc>]*[#<originlength>+#<cutterdiam>]] i [#<gearcenterx>] j [#<gearcentery>]
o405 endwhile
g0 f100 z0.25
#<currentquadrant> = [#<currentquadrant> + #<quadrantsize>]
#<firstorigin> = [#<firstorigin> + #<quadrantsize>]
#<firstcut>= [#<firstcut> + #<quadrantsize>]
#<secondcut>= [#<secondcut> + #<quadrantsize>]
o610 endwhile (end making pie shapes spokes)

o621 call [#<gearcenterx>][#<gearcentery>][#<baseradius>+#<cutterdiam>][#<cutterdiam>][6][[#<baseradius>+#<cutterdiam>]/16][0.5*#<cutterdiam>][-1/6*#<baseradius>][#<ginc>][#<passesneeded>][#<cuttingfeed>][#<cuttingdepth>]

Changed: 700c772,773
o3001 while [#<compass_point> lt [360.0 +#<ginc>]]
#<endturn> = [#<compass_point> + 360]
o3001 while [#<compass_point> lt [360.0 +#<endturn>]]

Changed: 704,710c777
(cut gullet here)
#<segangle> = [360.0/[#<numberteeth>]] (wholesegment)
#32 = [#<compass_point>+#<segangle>+#<_fudgewc>]
#33 = [#32-[#<segangle>-#<_endangle>+#<_fudgewc>]/2.0]
#22 = [#<baseradius> - 2*#<baseradius>*[sin[#<segangle>/8]]**2] (new gullet center)
g2 x[#<gearcenterx>+[#<baseradius>*cos]] y[#<gearcentery>+[#<baseradius>*sin]] i [#<gearcenterx> +[#22 *cos]] j[#<gearcentery> +[#22*sin]]
#<compass_point> = [#<compass_point>+[360.0/[#<numberteeth>]]]
#<compass_point> = [#<compass_point>+360.0/#<numberteeth>]

Changed: 714c781
(DEBUG, 1st gullet radius is: #21)
;(DEBUG, 1st gullet radius is: #21)

Removed: 717d783
g0 x0 y0

Changed: 727c793
(DEBUG, naddendum is #<naddendum>)
;(DEBUG, naddendum is #<naddendum>)

Changed: 730,731c796
;#<gearcenterx> = [#<gearcenterx>+[#<pitchradius>/#<ratio>]+#<pitchradius>+[#<_raddendum>-#<naddendum>]+ 0.0*#<cutterdiam>] (comp offset)
#<gearcenterx> = [#<gearcenterx>+[#<pitchradius>/#<ratio>]+#<pitchradius>+[#<daddendum>]+ 0.0*#<cutterdiam>] (comp offset)
#<gearcenterx> = [#<gearcenterx>+[#<pitchradius>/#<ratio>]+#<pitchradius>+[#<daddendum>/2]+ 0.0*#<cutterdiam>] (comp offset)

Changed: 733c798
#<_fudgewc> = [+atan[.001]/[#<baseradius>]]
#<_fudgewc> = [+atan[.003]/[#<baseradius>]]

Changed: 735c800
#<_fudgeh> = #<cutterdiam>
#<_fudgeh> = 0

Added: 756a822,823
(draw pie shape quadrants over the 2nd gear leaving "spokes" in between)
o621 call [#<gearcenterx>][#<gearcentery>][#<baseradius>+#<cutterdiam>][#<cutterdiam>][3][[#<baseradius>+#<cutterdiam>]/6][0*#<cutterdiam>][+1/9*#<baseradius>][-#<ginc>][#<passesneeded>][#<cuttingfeed>][#<cuttingdepth>]

Added: 767a835
#<endturn> = [#<compass_point> + 360]

Changed: 769c837
o4001 while [#<compass_point> lt [540.0-360/#<numberteeth>]]
o4001 while [#<compass_point> lt #<endturn>]

Removed: 771,775d838
#<segangle> = [360.0/[#<numberteeth>]] (wholesegment)
#32 = [#<compass_point>+#<segangle>+#<_fudgewc>]
#33 = [#32-[#<segangle>-#<_endangle>+#<_fudgewc>]/2.0]
#22 = [#<baseradius> - 2*#<baseradius>*[sin[#<segangle>/8]]**2] (new gullet center)
g2 x[#<gearcenterx>+[#<baseradius>*cos]] y[#<gearcentery>+[#<baseradius>*sin]] i [#<gearcenterx> +[#22 *cos]] j[#<gearcentery> +[#22*sin]]

Changed: 780c843
(DEBUG, 2nd gullet radius is: #21)
;(DEBUG, 2nd gullet radius is: #21)

Added: 791a855


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
Search:
Published under a Creative Commons License