  ϽԲִ

                   λϵ

        
1 ģ:                mn=5
2 :                z1=25
                       z2=65
3 :helix=9.5
4 
        ν:                        an=20
        ݶϵ:                    ha_m=1.0
        ϶ϵ:                  c_m=0.25
        ݸԲǰ뾶ϵ:              p_m=0.38

5 λϵ:        x1=0.3
                   x2=0.1
6 ȵȼ:        pgrade=7
7 ݿ:                gw1=105.0
                       gw2=100.0

8 ݿ:        
               lisp:gw_work=(MIN gw1 gw2)

9 :        zv1=z1/(cos(helix)^3)
                   zv2=z2/(cos(helix)^3)

        Ҫβ
1 ֶ(׼)ľ:a_bz=(z1+z2)*mn/2/cos(helix)
2 λϵ:xsum=x1+x2
3 ν:at=atan(tang(an)/cos(helix))
4 Ͻ: 
;at1=ainv[2*xsum*tang(an)/(z1+z2)+inv(at)]
lisp:invat=(inv at)  
invat1=2*xsum*tang(an)/(z1+z2)+invat                                       
lisp:at1=(ainv invat1)

5 ľ䶯ϵ:
          y=(z1+z2)/2/cos(helix)*(cos(at)-cos(at1))/cos(at1)
6 λϵ:                deta_y=xsum-y
7 ľ:                a_work=a_bz+mn*y

8 ֶԲֱ:                d1=mn*z1/cos(helix)
                                d2=mn*z2/cos(helix)
9 ():        u=z2/z1
10 Բֱ:                d_node1=2*a_work/(u+1)
                                d_node2=2*a_work*u/(u+1)
11 ݶԲֱ:                da1=d1+2*(ha_m+x1-deta_y)*mn
                                da2=d2+2*(ha_m+x2-deta_y)*mn
12 ݸԲֱ:                df1=d1-2*(ha_m+c_m-x1)*mn
                                df2=d2-2*(ha_m+c_m-x2)*mn
13 ݸ:                        h1=(da1-df1)/2
                                h2=(da2-df2)/2
14 ֶԲݺ:        sn1=(pi/2+2*x1*tang(an))*mn
                                sn2=(pi/2+2*x2*tang(an))*mn
15 Բֱ:                db1=d1*cos(at)
                                db2=d2*cos(at)
16 Բ:                Bb=asin(sin(helix)*cos(an))

        ݺߴ
1 ̶ҳݺ:                s_c1=mn*(pi/2*cos(an)^2+x1*sin(2*an))
                             s_c2=mn*(pi/2*cos(an)^2+x2*sin(2*an))
2 ̶ҳݸ:                h_c1=0.5*(da1-d1-s_c1*tang(an))
                             h_c2=0.5*(da2-d2-s_c2*tang(an))

3 ֶԲҳݺ:      
                                ;deta1=tod[pi/2/z1+2*x1*tang(an)/z1]*[cos(helix)^3]= 3.600000
deta1=(pi/2/z1+2*x1*tang(an)/z1)*(cos(helix)^3)
deta1=deta1*180.0/pi ;תΪǶ
                                ;deta2=tod[pi/2/z2+2*x2*tang(an)/z2]*[cos(helix)^3]= 1.384615
deta2=(pi/2/z2+2*x2*tang(an)/z2)*(cos(helix)^3)
deta2=deta2*180.0/pi ;תΪǶ
        
ݺ:                   
s_1=mn*z1*sin(deta1)/(cos(helix)^3)
s_2=mn*z2*sin(deta2)/(cos(helix)^3)

4 ֶԲҳݸ:     
;ha_1=0.5*{da1-[cos(deta1)-sin(helix)^2]/[cos(helix)^2]*d1}= 5.123329
ha1=0.5*(da1-(cos(deta1)-sin(helix)^2)/(cos(helix)^2)*d1)
                
;ha_2=0.5*{da2-[cos(deta2)-sin(helix)^2]/[cos(helix)^2]*d2}= 5.047448
ha2=0.5*(da2-(cos(deta2)-sin(helix)^2)/(cos(helix)^2)*d2)

5 :

lisp:invat=(inv at)
lisp:invan=(inv an)
                                z11=z1*invat/invan
                                z22=z2*invat/invan
                
k1=trunc(z11/180*acos(z11*cos(an)/(z11+2*x1))+0.5)
k2=trunc(z22/180*acos(z22*cos(an)/(z22+2*x2))+0.5)
                                
6 ߳:                             
;w1=mn*cos(an)*[pi*(k1-0.5)+z1*inv(at)+2*x1*tang(an)]= 38.652335
;w2=mn*cos(an)*[pi*(k2-0.5)+z2*inv(at)+2*x2*tang(an)]= 115.256729 
                       
w1=mn*cos(an)*(pi*(k1-0.5)+z1*invat+2*x1*tang(an))
w2=mn*cos(an)*(pi*(k2-0.5)+z2*invat+2*x2*tang(an))

6 ()Mֵ:
        ֱ:  dp=trunc(1.728*mn)
        ;Զֱ:dp=9.0
        Բϵѹ:
                              
;ad1=ainv{dp/[z1*mn*cos(an)]+inv(at)-pi/2/z1+2*x1*tang(an)/z1}= 23.789482                                
;ad2=ainv{dp/[z2*mn*cos(an)]+inv(at)-pi/2/z2+2*x2*tang(an)/z2}= 21.633624

lisp:invat=(inv at)

a1=dp/(z1*mn*cos(an))+invat-pi/2/z1+2*x1*tang(an)/z1
a2=dp/(z2*mn*cos(an))+invat-pi/2/z2+2*x2*tang(an)/z2

lisp:ad1=(ainv a1)
lisp:ad2=(ainv a2) 
                              
;M1=among[ceil(z1/2) eq z1/2 ,d1*cos(at)/cos(ad1)+dp,d1*cos(at)/cos(ad1)*cos(90/z1)+dp]= 136.755271                                
;M2=among[ceil(z2/2) eq z2/2 ,d2*cos(at)/cos(ad2)+dp,d2*cos(at)/cos(ad2)*cos(90/z2)+dp]= 337.086614

;M1=d1*cos(at)/cos(ad1)+dp  ;z1Ϊż
M1=d1*cos(at)/cos(ad1)*cos(90/z1)+dp  ;z1Ϊ

;M2=d2*cos(at)/cos(ad2)+dp  ;z2Ϊż 
M2=d2*cos(at)/cos(ad2)*cos(90/z2)+dp  ;z2Ϊ


                ָ

1 ݶѹ: 
               
aa1=acos(db1/da1)
aa2=acos(db2/da2)

2 غ϶:                

ea=0.5/pi*(z1*tang(aa1)+z2*tang(aa2)-(z1+z2)*tang(at1))

3 бֳݶ:        

Ba1=atan(da1/d1*tang(helix))
Ba2=atan(da2/d2*tang(helix))

4 ݶ:              ;san1=da1*{[0.5*pi+2*x1*tan(an)]/z1+inv(at)-inv(aa1)}*cos(Ba1)= 3.599097                                     
;san2=da2*{[0.5*pi+2*x2*tan(an)]/z2+inv(at)-inv(aa2)}*cos(Ba2)= 3.948438

lisp : invat=(inv at)
lisp : invaa1=(inv aa1)
lisp : invaa2=(inv aa2)

san1=da1*((0.5*pi+2*x1*tang(an))/z1+invat-invaa1)*cos(Ba1)
san2=da2*((0.5*pi+2*x2*tang(an))/z2+invat-invaa2)*cos(Ba2)

5 :
                                        
1=(1+u)*(tang(aa2)-tang(at1))/(tang(at1)-u*(tang(aa2)-tang(at1)))                                         
2=(1+u)*(tang(aa1)-tang(at1))/(u*tang(at1)-(tang(aa1)-tang(at1)))                                                                                      


;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ߳ȿԲ𣿽ΪTrue(),ʾԲ;ΪFalse(),ʾܲ,Ҫٿټ:
                                CanMeasure1=among[helix>0,w1 < gw1/sin(Bb),True]= True
                                CanMeasure2=among[helix>0,w2 < gw2/sin(Bb),True]= True
        ı,㹫:
                                k1_change=among[k1>2,k1-1,k1]= 2
                                k2_change=among[k2>2,k2-1,k2]= 7
                                w1_change=mn*cos(an)*[pi*(k1_change-0.5)+z1*inv(at)+2*x1*tan(an)]= 23.891678
                                w2_change=mn*cos(an)*[pi*(k2_change-0.5)+z2*inv(at)+2*x2*tan(an)]= 100.496072
        ߳ȿԲ𣿽ΪTrue(),ʾԲ;ΪFalse(),ʾܲ:
                                CanMeasure1=among[helix>0,w1_change < gw1/sin(Bb),True]= True
                                CanMeasure2=among[helix>0,w2_change < gw2/sin(Bb),True]= True
6 ()Mֵ:
        ֱ:  dp=1.728*mn= 8.64
        Զֱ:dp=dp= 8.64
        Բϵѹ:
                                
ad1=ainv{dp/[z1*mn*cos(an)]+inv(at)-pi/2/z1+2*x1*tan(an)/z1}= 23.789482                                
ad2=ainv{dp/[z2*mn*cos(an)]+inv(at)-pi/2/z2+2*x2*tan(an)/z2}= 21.633624
                                
M1=among[ceil(z1/2) eq z1/2 ,d1*cos(at)/cos(ad1)+dp,d1*cos(at)/cos(ad1)*cos(90/z1)+dp]= 136.755271                                
M2=among[ceil(z2/2) eq z2/2 ,d2*cos(at)/cos(ad2)+dp,d2*cos(at)/cos(ad2)*cos(90/z2)+dp]= 337.086614

7 бݾ:        px=among[helix > 0 , pi*mn/sin(helix),0]= 0
8 бֵ:                pz1=among[helix > 0 ,z1*px,0]= 0
                                pz2=among[helix > 0 ,z2*px,0]= 0

                ָ
1 ݶѹ:                aa1=acos(db1/da1)= 29.531393
                                aa2=acos(db2/da2)= 24.266728
2 غ϶:                ea=0.5*/pi*[ z1*tan(aa1)+z2*tan(aa2)-(z1+z2)*tan(at1)]= 1.704276
3 бغ϶:        eB=among[helix > 0 ,gw_work/px,0]= 0
4 غ϶:                er=ea+eB= 1.704276
5 бֳݶ:        Ba1=atan[da1/d1*tan(helix)]= 0
                           Ba2=atan[da2/d2*tan(helix)]= 0
6 ݶ:                        san1=da1*{[0.5*pi+2*x1*tan(an)]/z1+inv(at)-inv(aa1)}*cos(Ba1)= 3.599097
                                        san2=da2*{[0.5*pi+2*x2*tan(an)]/z2+inv(at)-inv(aa2)}*cos(Ba2)= 3.948438
        жϳݶǷ㹻?
        (Ӳ):        Tooth_face="Ӳ"
                                        Thickness1_OK=among[Tooth_face  eq  "Ӳ",san1 >= 0.25*mn, san1 > 0.4*mn]= True
                                        Thickness2_OK=among[Tooth_face  eq  "Ӳ",san2 >= 0.25*mn, san2 > 0.4*mn]= True
7 :
                                        1=(1+u)*[tan(aa2)-tan(at1)]/[tan(at1)-u*(tan(aa2)-tan(at1))]= 2.262898
                                        2=(1+u)*[tan(aa1)-tan(at1)]/[u*tan(at1)-(tan(aa1)-tan(at1))]= 0.980233
        ȵľֵǷСڵ3?
                                        1_Ok=abs(1) <= 3= True
                                        2_Ok=abs(2) <= 3= True
        
                ־ݼ(GB/T10095-2001):
1 ݾۻܹFp:        Fp1=table[GB10095_2001_Fp,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.039
                                Fp2=table[GB10095_2001_Fp,ֶԲ1<d2,ֶԲ2 >= d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.066
2 ȦFr:        Fr1=table[GB10095_2001_Fr,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.031
                                Fr2=table[GB10095_2001_Fr,ֶԲ1<d2,ֶԲ2 >= d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.053
3 ݾ༫ƫfpt:        fpt1=table[GB10095_2001_fpt,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.013
                                        fpt2=table[GB10095_2001_fpt,ֶԲ1<d2,ֶԲ2 >= d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.016
4 ܹFa:                Fa1=table[GB10095_2001_Fa,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.019
                                Fa2=table[GB10095_2001_Fa,ֶԲ1<d2,ֶԲ2 >= d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.024
5 ״ffa:                ffa1=table[GB10095_2001_ffa,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.015
                                        ffa2=table[GB10095_2001_ffa,ֶԲ1<d2,ֶԲ2 >=  d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.018
6 бƫfHa:        fHa1=table[GB10095_2001_fHa,ֶԲ1<d1,ֶԲ2 >= d1,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.012
                                        fHa2=table[GB10095_2001_fHa,ֶԲ1<d2,ֶԲ2 >= d2,ģ1<mn,ģ2 >= mn,ȵȼ eq pgrade,ֵ]/1000= 0.015
7 ܹFB:                FB1=table[GB10095_2001_FB,ֶԲ1<d1,ֶԲ2 >= d1,ݿ1<gw1,ݿ2>= gw1,ȵȼ eq pgrade,ֵ]/1000= 0.024
                                        FB2=table[GB10095_2001_FB,ֶԲ1<d2,ֶԲ2 >= d2,ݿ1<gw2,ݿ2>= gw2,ȵȼ eq pgrade,ֵ]/1000= 0.026
8 ״ffB:        ffB1=table[GB10095_2001_ffB,ֶԲ1<d1,ֶԲ1<d1,ֶԲ2 >= d1,ݿ1<gw1,ݿ2>= gw1,ȵȼ eq pgrade,ֵ]/1000= 0.017
                                ffB2=table[GB10095_2001_ffB,ֶԲ1<d2,ֶԲ2 >= d2,ݿ1<gw2,ݿ2 >= gw2,ȵȼ eq pgrade,ֵ]/1000= 0.018
9 бƫfHB:        fHB1=table[GB10095_2001_fHB,ֶԲ1<d1,ֶԲ2 >= d1,ݿ1<gw1,ݿ2 >= gw1,ȵȼ eq pgrade,ֵ]/1000= 0.017
                                                fHB2=table[GB10095_2001_fHB,ֶԲ1<d2,ֶԲ2 >= d2,ݿ1<gw2,ݿ2 >= gw2,ȵȼ eq pgrade,ֵ]/1000= 0.018

(vl-string-right-trim  " " "  There are too many spaces here      ")
(princ "4 ݶ:              ;san1=da1*{[0.5*pi+2*x1*tan(an)]/z1+inv(at)-inv(aa1)}*cos(Ba1)= 3.599097")