Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Register Log in

Involute gears & splines creation

Kaeliz

New member
Hi folks,


I need some serious help here. Is there a UG program or function which will create an accurate Involute gear tooth form and / or an involute spline tooth form?


I did a search and came up with no results.



Any help would be greatly appreciated.


Kay
 

mbrookey

New member
Not that I know of, you might be able to run across someone that has a grip program for it. But I don't know anyone who does..


Matt
 

hebertma

New member
$$$$$$$$$$$$$$$$$$$$$
$$
$$ PROGRAM NAME : GEAR.3D
$$
$$ AUTHOR(S) : RICARDO CHIN 3-OCT-85
$$
$$ McDONNELL DOUGLAS MANUFACTURING INDUSTRY SYSTEMS CO.
$$ P.O. Box 344, 25 Hanover Road
$$ Florham Park, NJ 07932& nbsp; (201) 822-3100
$$
$$ CLIENT : NONE
$$
$$ UNIGRAPHICS RELEASE : UGII V2.0
$$
$$ SUBROUTINES CALLED : NONE
$$
$$ FILES ACCESSED : NONE
$$
$$ DESCRIPTION : DRAWS AN INVOLUTE GEAR PROFILE,
$$&nbs p; THEN PRODUCES EITHER A SPUR,
$$&nbs p; HELICAL, OR BEVEL GEAR. THEN THE
$$&nbs p; OPTION IS GIVEN TO SURFACE TEETH
$$
$$$$$$$$$$$$$$$$$$$$$
$$
$$ DECLARATIONS & INITIALIZATIONS
$$
ENTITY/PT(10),SP,CP,CA,PTA,PTD,CD,SP2,LN,ACOORD
ENTITY/TR(5),E(10),SRF(4),COORD,COORD2
NUMBER/X(8),Y(8),MAT(12),MAT1(12),MAT2(12),CRP(3),CRP2(3)
STRING/COLORS(14,10)
DATA/PI,3.1415927
DATA/DIA,4,N,25,PHI,20,PSI,25,WID,1,PD,6.25
DATA/BCR,90,PTAN,45
DATA/COLORS,'BLUE','GREEN','CYAN','RED','MAGENTA','YELLOW',$
'WHITE','OLIVE','PINK','BROWN','ORANGE','PURPLE',$
'DARK RED','AQUAMARINE'


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ VARIABLE GLOSSARY
$$
$$ DIA - PITCH DIAMETER, REGISTER A
$$ N - # OF TEETH, REGISTER B
$$ PHI - PRESSURE ANGLE, REGISTER C
$$ PD - DIAMETRAL PITCH, REGISTER D
$$ PC - CIRCULAR PITCH
$$ RP - PITCH RADIUS
$$ RB - RADIUS OF BASE CIRCLE
$$ TP - TOOTH THICKNESS ON PITCH CIRCLE REGISTER H
$$ M - GEAR MODULE
$$ RD - RADIUS OF DEDENDUM CIRCLE
$$ NP - # OF TEETH OF MESHING PINION
$$ RADP - RADIUS OF PINION
$$ RA - ADDENDUM, REGISTER E
$$ THETA - ANGLE USED IN CONSTRUCTION OF INVOLUTE
$$ X(),Y() - COORDS OF POINTS ON INVOLUTE
$$ PT() - CONSTRUCTION POINTS
$$ SP - SPLINE THAT MAKES INVOLUTE
$$ CP - PITCH CIRCLE
$$ CA - ADDENDUM CIRCLE
$$ CD - DEDENDUM CIRCLE
$$ C - DISTANCE BETWEEN GEAR CENTERS
$$ WID - FACE WIDTH, REGISTER F
$$ PSI - HELIX ANGLE, REGISTER G
$$ CLR - ENTITY COLOR UPON ENTERING PROGRAM
$$ CLRE - EDGE COLOR
$$ CLRS - SURFACE COLOR
$$ COLORS - MENU COLORS 1 - 14
$$ CRP() - COORDS OF ANY REFERENCE POINT
$$ TR() - TRACE POINTS FOR WIDTH OF GEAR

$$ CHOOSE STATEMENT RESPONSES
$$ RES - ENTER METHOD
$$&nbs p; 1 > EXISTING CIRCLE
$$&nbs p; 2 DIAMETER, # OF TEETH
$$&nbs p; 3 PITCH, # OF TEETH
$$ RESP4 - MODEL TYPE
$$&nbs p; 1 PROFILE
$$&nbs p; 2 > 3-D
$$ RESP5 - 3-D GEAR TYPE
$$&nbs p; 1 > SPUR
$$&nbs p; 2 HELICAL
$$&nbs p; 3 BEVEL
$$ RESP6 - HELIX TYPE
$$&nbs p; 1 > LEFT
$$&nbs p; 2 RIGHT
$$ RESP9 - SURFACE TEETH
$$&nbs p; 1 YES
$$&nbs p; 2 > NO
$$ RESP14 - GEAR TYPE
$$&nbs p; 1 INTERNAL (RING)
$$&nbs p; 2 > EXTERNAL


$$--DETERMINE ALL PARAMETERS FOR GEAR CONSTRUCTION

$$--SAVE CURRENT WCS AND ENTITY COLOR
COORD = &WCS
COORD2 = &WCS
CLR = &ENTCLR
LB45: CHOOSE/'ENTER METHOD',$
'EXT CIRCL',$
'DIA,#TEETH',$
'PITCH,#TTH',DEFLT,1,RES
JUMP/HLT:,HLT:,,,LB55:,LB50:,,RES
$$--OPTION (METHOD) #3
PARAM/'GEAR PARAMETERS',$
'PITCH',PD,$
'# OF TEETH',INT,N,$
'PRES. ANG.',PHI,RESP
JUMP/LB45:,HLT:,,,,,,RESP
DIA = N/PD
JUMP/LB5:
$$--OPTION (METHOD) #2
LB50: PARAM/'GEAR PARAMETERS',$
'PITCH DIA',DIA,$
'# OF TEETH',INT,N,$
'PRES. ANG.',PHI,RESP1
JUMP/LB45:,HLT:,,,,,,RESP1
PD = N/DIA
JUMP/LB5:
$$--OPTION (METHOD) #1
LB55: MASK/5
IDENT/'SELECT CIRCLE',E,CNT,NMB,RESP10
JUMP/LB45:,HLT:,,,,,RESP10
MASK/ALL
IF/NMB==1,JUMP/LB3:
LB4: MESSG/'SELECT ONLY 1 ARC'
JUMP/LB55:
LB3: PARAM/'GEAR PARAMETERS',$
'# OF TEETH',INT,N,$
'PRES. ANG.',PHI,RESP11
JUMP/LB55:,HLT:,,,,,RESP11
DIA = 2 * &RADIUS(E(1))
PD = N/DIA
COORD2 = CSYS/E(1)
$$--MOVE WCS TO THAT OF ARC
&WCS = COORD2
$$--CALCULATE PARAMATERS FROM ENTERED INFO
LB5: PC = PI/PD
RP = DIA/2
RB = RP*COSF(PHI)
TP = PC/2
M = 1/PD
RDC = 1.25*M
NP = N
LB70: RA = M
$$--OBTAIN ADDENDUM
PARAM/'GEAR PARAMETERS',$
'ADDENDUM',RA,$
'DEDENDUM',RDC,RESP3
JUMP/LB45:,HLT:,,,,RESP3
LB10: RA = RP + RA
RD = RP - RDC
$$--SPECIFY MODEL PARAMETERS
LB80: CHOOSE/'GEAR MODEL',$
'PROFILE',$
'3-D',DEFLT,2,RESP4
JUMP/LB70:,HLT:,,,,,RESP4
RESP4 = RESP4 - 4
$$--DETERMINE IF A RING (INTERNAL) OR NOT
LB85: CHOOSE/'GEAR TYPE',$
'INTERNAL',$
'EXTERNAL',DEFLT,2,RES14
JUMP/LB80:,HLT:,,,,LB160:,RES14
$$--IF ONLY PROFILE, GO TO LB20:
LB160:IF/RESP4==1,JUMP/LB20:
$$--PARAMETERS FOR 3-D MODEL
LB90: CHOOSE/'GEAR TYPE',$
'SPUR',$
'HELICAL',$
'BEVEL',DEFLT,1,RESP5
JUMP/LB85:,HLT:,,,,,,,RESP5
RESP5 = RESP5 - 4
IF/RESP5==1,JUMP/LB30:
IF/RESP5==3,JUMP/LB32:
LB100:CHOOSE/'TYPE OF HELICAL',$
'LEFT',$
'RIGHT',DEFLT,1,RESP6
JUMP/LB90:,HLT:,,,,,RESP6
RESP6 = RESP6 - 4
LB110:pARAM/'HELIX ANGLE',$
'ANGLE',PSI,RESP7
JUMP/LB100:,HLT:,,,,,RESP7
JUMP/LB30:
LB32: PARAM/'BEVEL PARAMETERS',$
'BACK ANGLE',BCR,$
'PITCH ANG',PTAN,RESP20
JUMP/LB90:,HLT:,,,,,,,,,,,RESP20
RESP20 = RESP20 - 4
BCA = 90 - BCR/2
$$--DETERMINE HEIGHT OF SCALING POINT ABOVE PITCH CIRCLE
HT = 0
IF/PTAN<>0 AND PTAN<>90,HT = RP/(SINF(PTAN)/COSF(PTAN))
LB30: PARAM/'FACE WIDTH',$
'WIDTH',WID,RESP8
JUMP/LB90:,HLT:,,,,,RESP8
LB33: CHOOSE/'SURFACE TEETH',$
'YES',$
'NO',DEFLT,2,RESP9
JUMP/LB30:,HLT:,,,,,,RESP9
RESP9 = RESP9 - 4
IF/RESP9==2,JUMP/LB20:
CHOOSE/'SURFACE COLOR',$
COLORS,DEFLT,CLR,RESP10
JUMP/LB33:,HLT:,,,,,,,,,,,,,,,,,,RESP10
CLRS = RESP10 - 4
LB20: $$CONTINUE
CHOOSE/'EDGE COLOR',$
COLORS,DEFLT,CLR,RESP11
JUMP/LB33:,HLT:,,,,,,,,,,,,,,,,,,RESP11
CLRE = RESP11 - 4
IF/RES14==6,JUMP/LB34:
$$--IF A RING GEAR, SWITCH ADDENDUM AND DEDENDUM
RA = RP + RDC
RD = 2*RP - RA
LB34:
$$--CALCULATE MESH CORRECTION ANGLE. ANGLE CALCULATED
$$ FOR CASE WHEN ONE TOOTH DIRECTLY ON TOP OF ANOTHER
MANG = 360/(2*N)
$$--ASSIGN REGISTER VALUES
&REGA = DIA $$ DIAMETER
&REGB = N $$ # OF TEETH
&REGC = PHI $$ PRESSURE ANGLE
&REGD = PD $$ DIAMETRAL PITCH
&REGE = RA $$ RADIUS OF ADENDUM CIRCLE
&REGF = ABSF(WID) $$ FACE WIDTH
&REGG = PSI $$ HELIX ANGLE
&REGH = TP $$ TOOTH THICKNESS
&REGI = MANG $$ MESH CORRECTION ANGLE
THETA = 0
$$--THICKNESS IS CREATED IN THE -Z DIRECTION
WID = -WID


$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ GENERATE INVOLUTE

&ENTCLR = CLRE
MESSG/TEMP,'GENERATE INVOLUTE'
$$--CALCULATE COORDS OF POINTS ON INVOLUTE
DO/LP1:,I,3,8
THETAR = THETA*PI/180
X(I) = RB*(COSF(THETA) + THETAR*SINF(THETA))
Y(I) = RB*(SINF(THETA) - THETAR*COSF(THETA))
THETA = THETA + 15
LP1: $$ CONTINUE
X(1) = 0
Y(1) = 0
X(2) = RB/2
Y(2) = 0
$$--CREATE POINTS ON INVOLUE
DO/LP2:,I,1,8
PT(I) = POINT/X(I),Y(I),0
LP2: $$ CONTINUE
PT(9) = PT(8)
PT(10) = PT(8)
IF/RES==5,DELETE/E(1)
$$--CREATE INITIAL INVOLUTE
SP=SPLINE/PT(1),VECT,1,0,0,PT(2),VECT,1,0,0,PT(3),VECT,1,0,0 ,$
PT(4),PT(5),PT(6),PT(7),PT(8),PT(9),PT(10)
CP = CIRCLE/0,0,0,RP
&FONT(CP) = &DASHED
CA = CIRCLE/0,0,0,RA
CD = CIRCLE/0,0,0,RD
$$--DETERMINE LIMITS OF INVOLUTE
PTA = POINT/INTOF,SP,CA
PTD = POINT/INTOF,SP,CD
DELETE/PT,SP
J = 1
PT(J) = PTD
DO/LP3:,I,1,8
D = SQRTF(X(I)**2 + Y(I)**2)
$$--DETERMINE WHICH SPLINE POINTS ARE W/IN BOUNDS
IF/D<=RD,JUMP/LP3:
IF/D>=RA,JUMP/LP3:
J = J + 1
PT(J) = POINT/X(I),Y(I),0
LP3: $$ CONTINUE
DO/LP4:,I,J+1,10
PT(I) = PTA
LP4: $$ CONTINUE
$$--CREATE LIMITED INVOLUTE
SP = SPLINE/PT(1),VECT,1,0,0,PT(2),PT(3),PT(4),$
PT(5),PT(6),PT(7),PT(8),PT(9),PT(10)
DELETE/PT,PTA,PTD
$$--ROTATION ANGLE FOR TOOTH THICKNESS
ANG = -(TP/2)/RP*(180/PI)
MESSG/TEMP,'GENERATE TOOTH'
PT(3) = POINT/RP,0,0
PT(1) = POINT/PT(3),INTOF,CP,SP
PT(2) = POINT/0,0,0
ACOORD = CSYS/1
OBTAIN/PT(1),CRP
$$--CORRECTION ANGLE TO LINE UP TOOTH WITH X-AXIS
CANG = ATANF(CRP(2)/CRP(1))
ANG = ANG - ABSF(CANG)
LN = LINE/PT(3),PT(2)
DELETE/PT(1..3)
MAT = MATRIX/XYROT,ANG
$$--ROTATE INVOLUTE SO THAT CENTER OF TOOTH ON X-AXIS
TRANSF/MAT,SP,MOVE


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ TOOTH PROFILE

MAT = MATRIX/MIRROR,LN
SP2 = TRANSF/MAT,SP
DELETE/LN
PT(2) = POINT/RA,0,0
PT(1) = POINT/ENDOF,XLARGE,SP
PT(3) = POINT/ENDOF,XLARGE,SP2
TR(3) = POINT/ENDOF,XLARGE,SP
TR(2) = POINT/ENDOF,XLARGE,SP2
DELETE/CA
CA = CIRCLE/PT(1),PT(2),PT(3)
DELETE/PT(1..3)

IF/RESP5<>3,JUMP/LB165:
$$--ROTATE TOOTH UP ABOUT PITCH POINT FOR BEVEL GEARS
PT(1) = POINT/TR(3),INTOF,SP,CP
PT(2) = POINT/TR(2),INTOF,SP2,CP
E(1) = LINE/PT(2),PT(1)
&WCS = CSYS/TR(3),E(1)
MAT = MATRIX/XYROT,BCA
TRANSF/MAT,TR(3),TR(2),CA,SP,SP2,MOVE
&WCS = COORD2
DELETE/PT(1..2),E(1)
LB165:
$$--FOR GEARS TO BE MESHED
CHOOSE/'MESH OKAY',$
'YES',$
'NO',DEFLT,1,RESP50
JUMP/,HLT:,,,LB180:,,,RESP50
PARAM/'CORRECTION ANGLE',$
'ANGLE',MANG,RESP55
JUMP/LB165:,HLT:,,,,,,RESP55
MAT = MATRIX/XYROT,MANG
TRANSF/MAT,SP,SP2,TR(2),TR(3),CA,MOVE
JUMP/LB165:
LB180:


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ ROTATE TOOTH TO GET COMPLETE GEAR PROFILE

THETA = 360/N
MAT = MATRIX/XYROT,THETA
PT(1) = POINT/ENDOF,XSMALL,SP2
PT(2) = POINT/ENDOF,XSMALL,SP
PT(3) = TRANSF/MAT,PT(2)
$$--TRACE POINTS
TR(1) = POINT/ENDOF,XSMALL,SP2
TR(5) = TRANSF/MAT,PT(2)
TR(4) = POINT/ENDOF,XSMALL,SP
DELETE/CD
$$--DEDENDUM PROFILE
CD = CIRCLE/PT(1),PT(2),PT(3)
DELETE/PT(1..3)
MESSG/TEMP,'ROTATE PROFILE'
DO/LP5:,I,2,N
SP = TRANSF/MAT,SP
SP2 = TRANSF/MAT,SP2
CA = TRANSF/MAT,CA
CD = TRANSF/MAT,CD
LP5: $$ CONTINUE
$$--ROTATE TRACE POINTS BACK TO ACTIVE TOOTH
THETA = -THETA
MAT = MATRIX/XYROT,THETA
TRANSF/MAT,TR,MOVE
IF/RESP4==2,JUMP/LB120: $$ IF A 3-D MODEL
$$--ONLY PROFILE WAS REQUIRED
DELETE/TR
JUMP/LB45:


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ ADD WIDTH TO GEAR

LB120:MESSG/TEMP,'ADD THICKNESS'
IF/RESP5==2,JUMP/LB130:
IF/RESP5==3,JUMP/LB175:
$$--CREATE SPUR GEAR
DO/LP6:,I,1,5
PT(I) = POINT/TR(I),DELTA,0,0,WID
E(I) = LINE/TR(I),PT(I)
LP6: $$ CONTINUE
MAT = MATRIX/TRANSL,0,0,WID
$$--ADD 3RD DIMENSION TO ACTIVE TOOTH
E(6) = TRANSF/MAT,SP
E(7) = TRANSF/MAT,SP2
E(8) = TRANSF/MAT,CA
E(9) = TRANSF/MAT,CD
DELETE/PT(1..5),TR
JUMP/LB140:
LB130:HT = -WID*SINF(PSI)/COSF(PSI)
$$--CREATE HELICAL GEAR
$$--ROTATION ANGLE FOR HELIX
THETA = ASINF(HT/RP)
THETA = THETA/9
IF/RESP6==2,THETA = -THETA
D = WID/9
MAT1 = MATRIX/TRANSL,0,0,D
MAT2 = MATRIX/XYROT,THETA
$$--MATRIX WHICH CREATES HELIX
MAT = MATRIX/MAT1,MAT2
$$--CREATE POINTS ON HELIX
DO/LP8:,I,1,5
PT(1) = TR(I)
DO/LP9:,J,2,10
PT(J) = TRANSF/MAT,PT(J-1)
LP9: $$ CONTINUE
E(I) = SPLINE/PT


DELETE/PT
LP8: $$ CONTINUE
THETA = THETA*9
MAT1 = MATRIX/TRANSL,0,0,WID
MAT2 = MATRIX/XYROT,THETA
MAT = MATRIX/MAT1,MAT2
E(6) = TRANSF/MAT,SP
E(7) = TRANSF/MAT,SP2
E(8) = TRANSF/MAT,CA
E(9) = TRANSF/MAT,CD
JUMP/LB140:
$$--SCALING POINT
LB175:pT(1) = POINT/0,0,HT
&WCS = CSYS/COORD2,ORIGIN,PT(1)
DELETE/PT(1)
CRP = &POINT(TR(2))
$$--DETERMINE SCALING FACTOR FOR CORRECT FACE WIDTH
DIT = SQRTF(CRP(1)**2+CRP(2)**2+CRP(3)**2)
SCFAC = (DIT+WID)/DIT
MAT = MATRIX/SCALE,SCFAC
$$--IF PITCH ANGLE=0, TRANSLATE (EQUIVALENT TO SPUR)
IF/PTAN==0,MAT = MATRIX/TRANSL,0,0,-WID
DO/LP15:,I,1,5
PT(I) = TRANSF/MAT,TR(I)
E(I) = LINE/TR(I),PT(I)
LP15: $$ CONTINUE
E(6) = TRANSF/MAT,SP
E(7) = TRANSF/MAT,SP2
E(8) = TRANSF/MAT,CA
E(9) = TRANSF/MAT,CD
DELETE/PT(1..5),TR
LB140:$$ CONTINUE
THETA = 360/N
MAT = MATRIX/XYROT,THETA
WL = &WLAYER
$$--PUT SURFACES ON THE NEXT LAYER
WL2 = WL + 1
IF/WL2==257,WL2 = 255
IF/RESP9==2,JUMP/LB150:
$$--SURFACE TOOTH
MESSG/TEMP,'SURFACE TOOTH'
LAYER/WORK,WL2
&ENTCLR = CLRS
$$--CREATE SCULPTURED SURFACES
SRF(1) = SSURF/PRIMA,SP2,E(7),CROSS,E(1),E(2)
SRF(2) = SSURF/PRIMA,CA,E(8),CROSS,E(2),E(3)
SRF(3) = SSURF/PRIMA,SP,E(6),CROSS,E(3),E(4)
SRF(4) = SSURF/PRIMA,E(9),CD,CROSS,E(1),E(5)
MESSG/TEMP,'ROTATE SURFACES'
DO/LP12:,I,2,N
DO/LP13:,J,1,4
SRF(J) = TRANSF/MAT,SRF(J)
LP13: $$ CONTINUE
LP12: $$ CONTINUE
LB150:LAYER/WORK,WL
&ENTCLR = CLRE
MESSG/TEMP,'ROTATE TOOTH'
DO/LP10:,I,2,N
DO/LP11:,J,1,9
IF/J==5,JUMP/LP11:
E(J) = TRANSF/MAT,E(J)
LP11: $$ CONTINUE
LP10: $$ CONTINUE
&WCS = COORD
WID = ABSF(WID)
JUMP/LB45:
HLT: &WCS = COORD
&ENTCLR = CLR
HALT
 

Kaeliz

New member
Sending this program through my IT group, I found that it is a GRIP program. Once it's been created and compiled, you can run it in UG with the <control>G command and enter the program name.
 

Sponsor

Sponsor

X
Top