CMASS=MP_MASS("")


CINDEX=REL_MODEL_NAME
cmat=material_param("cmaterial")
ORITEXT = "_"
IF SEARCH(CINDEX,ORITEXT)>1 
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP+"." +  EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(CINDEX)\
-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1 
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "." +  EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1 
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "."+  EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1 
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "." +  EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF

CNAME=PTC_COMMON_NAME

/*形位精度查询(GB/1184-1996)

/*同轴度、对称度、圆跳动、全跳动公差值<=500MM（GB/T1184)

IF LD<=1 

IF TZD==1
TOLTZD=0.4/1000
ENDIF
IF TZD==2
TOLTZD=0.6/1000
ENDIF
IF TZD==3
TOLTZD=1.0/1000
ENDIF
IF TZD==4
TOLTZD=1.5/1000
ENDIF
IF TZD==5
TOLTZD=2.5/1000
ENDIF
IF TZD==6
TOLTZD=4/1000
ENDIF
IF TZD==7
TOLTZD=6/1000
ENDIF
IF TZD==8
TOLTZD=10/1000
ENDIF
IF TZD==9
TOLTZD=15/1000
ENDIF
IF TZD==10
TOLTZD=25/1000
ENDIF
IF TZD==11
TOLTZD=40/1000
ENDIF
IF TZD==12
TOLTZD=60/1000
ENDIF
ENDIF

IF LD>1&LD<=3 
IF TZD==1
TOLTZD=0.4/1000
ENDIF
IF TZD==2
TOLTZD=0.6/1000
ENDIF
IF TZD==3
TOLTZD=1.0/1000
ENDIF
IF TZD==4
TOLTZD=1.5/1000
ENDIF
IF TZD==5
TOLTZD=2.5/1000
ENDIF
IF TZD==6
TOLTZD=4/1000
ENDIF
IF TZD==7
TOLTZD=6/1000
ENDIF
IF TZD==8
TOLTZD=10/1000
ENDIF
IF TZD==9
TOLTZD=20/1000
ENDIF
IF TZD==10
TOLTZD=40/1000
ENDIF
IF TZD==11
TOLTZD=60/1000
ENDIF
IF TZD==12
TOLTZD=120/1000
ENDIF
ENDIF

IF LD>3&LD<=6
IF TZD==1
TOLTZD=0.5/1000
ENDIF
IF TZD==2
TOLTZD=0.8/1000
ENDIF
IF TZD==3
TOLTZD=1.2/1000
ENDIF
IF TZD==4
TOLTZD=2/1000
ENDIF
IF TZD==5
TOLTZD=3/1000
ENDIF
IF TZD==6
TOLTZD=5/1000
ENDIF
IF TZD==7
TOLTZD=8/1000
ENDIF
IF TZD==8
TOLTZD=12/1000
ENDIF
IF TZD==9
TOLTZD=25/1000
ENDIF
IF TZD==10
TOLTZD=50/1000
ENDIF
IF TZD==11
TOLTZD=80/1000
ENDIF
IF TZD==12
TOLTZD=150/1000
ENDIF
ENDIF

IF LD>6&LD<=10 
IF TZD==1
TOLTZD=0.6/1000
ENDIF
IF TZD==2
TOLTZD=1/1000
ENDIF
IF TZD==3
TOLTZD=1.5/1000
ENDIF
IF TZD==4
TOLTZD=2.5/1000
ENDIF
IF TZD==5
TOLTZD=4/1000
ENDIF
IF TZD==6
TOLTZD=6/1000
ENDIF
IF TZD==7
TOLTZD=10/1000
ENDIF
IF TZD==8
TOLTZD=15/1000
ENDIF
IF TZD==9
TOLTZD=30/1000
ENDIF
IF TZD==10
TOLTZD=60/1000
ENDIF
IF TZD==11 
TOLTZD=100/1000
ENDIF
IF TZD==12
TOLTZD=200/1000
ENDIF
ENDIF

IF LD>10&LD<=18  
IF TZD==1 
TOLTZD=0.8/1000
ENDIF
IF TZD==2
TOLTZD=1.2/1000
ENDIF
IF TZD==3
TOLTZD=2/1000
ENDIF
IF TZD==4
TOLTZD=3/1000
ENDIF
IF TZD==5
TOLTZD=5/1000
ENDIF
IF TZD==6
TOLTZD=8/1000
ENDIF
IF TZD==7  
TOLTZD=12/1000
ENDIF
IF TZD==8   
TOLTZD=20/1000
ENDIF
IF TZD==9 
TOLTZD=40/1000
ENDIF
IF TZD==10 
TOLTZD=80/1000
ENDIF
IF TZD==11
TOLTZD=120/1000
ENDIF
IF TZD==12
TOLTZD=250/1000
ENDIF
ENDIF

IF LD>18&LD<=30
IF TZD==1
TOLTZD=1/1000
ENDIF
IF TZD==2
TOLTZD=1.5/1000
ENDIF
IF TZD==3
TOLTZD=2.5/1000
ENDIF
IF TZD==4
TOLTZD=4/1000
ENDIF
IF TZD==5
TOLTZD=6/1000
ENDIF
IF TZD==6
TOLTZD=10/1000
ENDIF
IF TZD==7
TOLTZD=15/1000
ENDIF
IF TZD==8
TOLTZD=25/1000
ENDIF
IF TZD==9
TOLTZD=50/1000
ENDIF
IF TZD==10
TOLTZD=100/1000
ENDIF
IF TZD==11
TOLTZD=150/1000
ENDIF
IF TZD==12
TOLTZD=300/1000
ENDIF
ENDIF

IF LD>30&LD<=50
IF TZD==1
TOLTZD=1.2/1000
ENDIF
IF TZD==2
TOLTZD=2/1000
ENDIF
IF TZD==3
TOLTZD=3/1000
ENDIF
IF TZD==4
TOLTZD=5/1000
ENDIF
IF TZD==5
TOLTZD=8/1000
ENDIF
IF TZD==6
TOLTZD=12/1000
ENDIF
IF TZD==7
TOLTZD=20/1000
ENDIF
IF TZD==8
TOLTZD=30/1000
ENDIF
IF TZD==9
TOLTZD=60/1000
ENDIF
IF TZD==10
TOLTZD=120/1000
ENDIF
IF TZD==11
TOLTZD=200/1000
ENDIF
IF TZD==12
TOLTZD=400/1000
ENDIF
ENDIF

IF LD>50&LD<=120
IF TZD==1
TOLTZD=1.5/1000
ENDIF
IF TZD==2
TOLTZD=2.5/1000
ENDIF
IF TZD==3
TOLTZD=4/1000
ENDIF
IF TZD==4
TOLTZD=6/1000
ENDIF
IF TZD==5
TOLTZD=10/1000
ENDIF
IF TZD==6
TOLTZD=15/1000
ENDIF
IF TZD==7
TOLTZD=25/1000
ENDIF
IF TZD==8
TOLTZD=40/1000
ENDIF
IF TZD==9
TOLTZD=80/1000
ENDIF
IF TZD==10
TOLTZD=150/1000
ENDIF
IF TZD==11
TOLTZD=250/1000
ENDIF
IF TZD==12
TOLTZD=500/1000
ENDIF
ENDIF


IF LD>120&LD<=250
IF TZD==1
TOLTZD=2/1000
ENDIF
IF TZD==2
TOLTZD=3/1000
ENDIF
IF TZD==3
TOLTZD=5/1000
ENDIF
IF TZD==4
TOLTZD=8/1000
ENDIF
IF TZD==5
TOLTZD=12/1000
ENDIF
IF TZD==6
TOLTZD=20/1000
ENDIF
IF TZD==7
TOLTZD=30/1000
ENDIF
IF TZD==8
TOLTZD=50/1000
ENDIF
IF TZD==9
TOLTZD=100/1000
ENDIF
IF TZD==10
TOLTZD=200/1000
ENDIF
IF TZD==11
TOLTZD=300/1000
ENDIF
IF TZD==12
TOLTZD=600/1000
ENDIF
ENDIF

IF LD>250&LD<=500
IF TZD==1
TOLTZD=2.5/1000
ENDIF
IF TZD==2
TOLTZD=4/1000
ENDIF
IF TZD==3
TOLTZD=6/1000
ENDIF
IF TZD==4
TOLTZD=10/1000
ENDIF
IF TZD==5
TOLTZD=15/1000
ENDIF
IF TZD==6
TOLTZD=25/1000
ENDIF
IF TZD==7
TOLTZD=40/1000
ENDIF
IF TZD==8
TOLTZD=60/1000
ENDIF
IF TZD==9
TOLTZD=120/1000
ENDIF
IF TZD==10
TOLTZD=250/1000
ENDIF
IF TZD==11
TOLTZD=400/1000
ENDIF
IF TZD==12
TOLTZD=800/1000
ENDIF
ENDIF

/*直线度、平面度未注公差值
IF WZGCDG=="H"
IF LD<=10
WZGCLP=0.02
ENDIF
IF LD>10&LD<=30
WZGCLP=0.05
ENDIF
IF LD>30&LD<=100
WZGCLP=0.1
ENDIF
IF LD>100&LD<=300
WZGCLP=0.2
ENDIF
IF LD>300&LD<=1000
WZGCLP=0.3
ENDIF
IF LD>1000&LD<=3000
WZGCLP=0.4
ENDIF
ENDIF

IF WZGCDG=="K"
IF LD<=10
WZGCLP=0.05
ENDIF
IF LD>10&LD<=30
WZGCLP=0.1
ENDIF
IF LD>30&LD<=100
WZGCLP=0.2
ENDIF
IF LD>100&LD<=300
WZGCLP=0.4
ENDIF
IF LD>300&LD<=1000
WZGCLP=0.6
ENDIF
IF LD>1000&LD<=3000
WZGCLP=0.8
ENDIF
ENDIF

IF WZGCDG=="L"
IF LD<=10
WZGCLP=0.1
ENDIF
IF LD>10&LD<=30
WZGCLP=0.2
ENDIF
IF LD>30&LD<=100
WZGCLP=0.4
ENDIF
IF LD>100&LD<=300
WZGCLP=0.8
ENDIF
IF LD>300&LD<=1000
WZGCLP=1.2
ENDIF
IF LD>1000&LD<=3000
WZGCLP=1.6
ENDIF
ENDIF

/*垂直度未注公差值
IF WZGCDG=="H"
IF LD<=100
WZGCCZ=0.2
ENDIF
IF LD>100&LD<=300
WZGCCZ=0.3
ENDIF
IF LD>300&LD<=1000
WZGCCZ=0.4
ENDIF
IF LD>1000&LD<=3000
WZGCLP=0.5
ENDIF
ENDIF

IF WZGCDG=="K"
IF LD<=100
WZGCCZ=0.4
ENDIF
IF LD>100&LD<=300
WZGCCZ=0.6
ENDIF
IF LD>300&LD<=1000
WZGCCZ=0.8
ENDIF
IF LD>1000&LD<=3000
WZGCCZ=1
ENDIF
ENDIF
IF WZGCDG=="L"
IF LD<=100
WZGCCZ=0.6
ENDIF
IF LD>100&LD<=300
WZGCCZ=1
ENDIF
IF LD>300&LD<=1000
WZGCCZ=1.5
ENDIF
IF LD>1000&LD<=3000
WZGCCZ=2
ENDIF
ENDIF

/*对称度未注公差值
IF WZGCDG=="H"
IF LD<=3000
WZGCDC=0.5
ENDIF
ENDIF

IF WZGCDG=="K"
IF LD<=300
WZGCDC=0.6
ENDIF
IF LD>300&LD<=1000
WZGCDC=0.8
ENDIF
IF LD>1000&LD<=3000
WZGCDC=1
ENDIF
ENDIF

IF WZGCDG=="L"
IF LD<=100
WZGCDC=0.6
ENDIF
IF LD>100&LD<=300
WZGCDC=1
ENDIF
IF LD>300&LD>=1000
WZGCDC=1.5
ENDIF
IF LD>1000 &LD<=3000
WZGCDC=2
ENDIF
ENDIF

/*圆跳动未注公差值
IF WZGCDG=="H"
WZGCYTD=0.1
ENDIF
IF WZGCDG=="K"
WZGCYTD=0.2
ENDIF
IF WZGCDG=="L"
WZGCYTD=0.5
ENDIF

/*直线度、平面度公差值
IF LD<=10
IF TZD==1
TOLLP=0.2/1000
ENDIF
IF TZD==2
TOLLP=0.4/1000
ENDIF
IF TZD==3
TOLLP=0.8/1000
ENDIF
IF TZD==4
TOLLP=1.2/1000
ENDIF
IF TZD==5
TOLLP=2.0/1000
ENDIF
IF TZD==6
TOLLP=3/1000
ENDIF
IF TZD==7
TOLLP=5/1000
ENDIF
IF TZD==8
TOLLP=8/1000
ENDIF
IF TZD==9
TOLLP=12/1000
ENDIF
IF TZD==10
TOLLP=20/1000
ENDIF
IF TZD==11
TOLLP=30/1000
ENDIF
IF TZD==12
TOLLP=60/1000
ENDIF
ENDIF

IF LD>10&LD<=16
IF TZD==1
TOLLP=0.25/1000
ENDIF
IF TZD==2
TOLLP=0.5/1000
ENDIF
IF TZD==3
TOLLP=1/1000
ENDIF
IF TZD==4
TOLLP=1.5/1000
ENDIF
IF TZD==5
TOLLP=2.5/1000
ENDIF
IF TZD==6
TOLLP=4/1000
ENDIF
IF TZD==7
TOLLP=6/1000
ENDIF
IF TZD==8
TOLLP=10/1000
ENDIF
IF TZD==9
TOLLP=15/1000
ENDIF
IF TZD==10
TOLLP=25/1000
ENDIF
IF TZD==11
TOLLP=40/1000
ENDIF
IF TZD==12
TOLLP=80/1000
ENDIF
ENDIF

IF LD>16&LD<=25
IF TZD==1
TOLLP=0.3/1000
ENDIF
IF TZD==2
TOLLP=0.6/1000
ENDIF
IF TZD==3
TOLLP=1.2/1000
ENDIF
IF TZD==4
TOLLP=2/1000
ENDIF
IF TZD==5
TOLLP=3/1000
ENDIF
IF TZD==6
TOLLP=5/1000
ENDIF
IF TZD==7
TOLLP=8/1000
ENDIF
IF TZD==8
TOLLP=12/1000
ENDIF
IF TZD==9
TOLLP=20/1000
ENDIF
IF TZD==10
TOLLP=30/1000
ENDIF
IF TZD==11
TOLLP=50/1000
ENDIF
IF TZD==12
TOLLP=100/1000
ENDIF
ENDIF

IF LD>25&LD<=40
IF TZD==1
TOLLP=0.4/1000
ENDIF
IF TZD==2
TOLLP=0.8/1000
ENDIF
IF TZD==3
TOLLP=1.5/1000
ENDIF
IF TZD==4
TOLLP=2.5/1000
ENDIF
IF TZD==5
TOLLP=4/1000
ENDIF
IF TZD==6
TOLLP=6/1000
ENDIF
IF TZD==7
TOLLP=10/1000
ENDIF
IF TZD==8
TOLLP=15/1000
ENDIF
IF TZD==9
TOLLP=25/1000
ENDIF
IF TZD==10
TOLLP=40/1000
ENDIF
IF TZD==11
TOLLP=60/1000
ENDIF
IF TZD==12
TOLLP=120/1000
ENDIF
ENDIF

IF LD>40&LD<=63
IF TZD==1
TOLLP=0.5/1000
ENDIF
IF TZD==2
TOLLP=1/1000
ENDIF
IF TZD==3
TOLLP=2/1000
ENDIF
IF TZD==4
TOLLP=3/1000
ENDIF
IF TZD==5
TOLLP=4/1000
ENDIF
IF TZD==6
TOLLP=8/1000
ENDIF
IF TZD==7
TOLLP=12/1000
ENDIF
IF TZD==8
TOLLP=20/1000
ENDIF
IF TZD==9
TOLLP=30/1000
ENDIF
IF TZD==10
TOLLP=50/1000
ENDIF
IF TZD==11
TOLLP=80/1000
ENDIF
IF TZD==12
TOLLP=150/1000
ENDIF
ENDIF

IF LD>630&LD<=100
IF TZD==1
TOLLP=0.6/1000
ENDIF
IF TZD==2
TOLLP=1.2/1000
ENDIF
IF TZD==3
TOLLP=2.5/1000
ENDIF
IF TZD==4
TOLLP=4/1000
ENDIF
IF TZD==5
TOLLP=6/1000
ENDIF
IF TZD==6
TOLLP=10/1000
ENDIF
IF TZD==7
TOLLP=15/1000
ENDIF
IF TZD==8
TOLLP=25/1000
ENDIF
IF TZD==9
TOLLP=40/1000
ENDIF
IF TZD==10
TOLLP=60/1000
ENDIF
IF TZD==11
TOLLP=100/1000
ENDIF
IF TZD==12
TOLLP=200/1000
ENDIF
ENDIF

IF LD>100&LD<=160
IF TZD==1
TOLLP=0.8/1000
ENDIF
IF TZD==2
TOLLP=1.5/1000
ENDIF
IF TZD==3
TOLLP=3/1000
ENDIF
IF TZD==4
TOLLP=5/1000
ENDIF
IF TZD==5
TOLLP=8/1000
ENDIF
IF TZD==6
TOLLP=12/1000
ENDIF
IF TZD==7
TOLLP=20/1000
ENDIF
IF TZD==8
TOLLP=30/1000
ENDIF
IF TZD==9
TOLLP=50/1000
ENDIF
IF TZD==10
TOLLP=80/1000
ENDIF
IF TZD==11
TOLLP=120/1000
ENDIF
IF TZD==12
TOLLP=250/1000
ENDIF
ENDIF

IF LD>160&LD<=250
IF TZD==1
TOLLP=1/1000
ENDIF
IF TZD==2
TOLLP=2/1000
ENDIF
IF TZD==3
TOLLP=4/1000
ENDIF
IF TZD==4
TOLLP=6/1000
ENDIF
IF TZD==5
TOLLP=10/1000
ENDIF
IF TZD==6
TOLLP=15/1000
ENDIF
IF TZD==7
TOLLP=25/1000
ENDIF
IF TZD==8
TOLLP=40/1000
ENDIF
IF TZD==9
TOLLP=60/1000
ENDIF
IF TZD==10
TOLLP=100/1000
ENDIF
IF TZD==11
TOLLP=150/1000
ENDIF
IF TZD==12
TOLLP=300/1000
ENDIF
ENDIF

IF LD>250&LD<=400
IF TZD==1
TOLLP=1.2/1000
ENDIF
IF TZD==2
TOLLP=2.5/1000
ENDIF
IF TZD==3
TOLLP=5/1000
ENDIF
IF TZD==4
TOLLP=8/1000
ENDIF
IF TZD==5
TOLLP=12/1000
ENDIF
IF TZD==6
TOLLP=20/1000
ENDIF
IF TZD==7
TOLLP=30/1000
ENDIF
IF TZD==8
TOLLP=50/1000
ENDIF
IF TZD==9
TOLLP=80/1000
ENDIF
IF TZD==10
TOLLP=120/1000
ENDIF
IF TZD==11
TOLLP=200/1000
ENDIF
IF TZD==12
TOLLP=400/1000
ENDIF
ENDIF

IF LD>400&LD<=630
IF TZD==1
TOLLP=1.5/1000
ENDIF
IF TZD==2
TOLLP=3/1000
ENDIF
IF TZD==3
TOLLP=6/1000
ENDIF
IF TZD==4
TOLLP=10/1000
ENDIF
IF TZD==5
TOLLP=15/1000
ENDIF
IF TZD==6
TOLLP=25/1000
ENDIF
IF TZD==7
TOLLP=40/1000
ENDIF
IF TZD==8
TOLLP=60/1000
ENDIF
IF TZD==9
TOLLP=100/1000
ENDIF
IF TZD==10
TOLLP=150/1000
ENDIF
IF TZD==11
TOLLP=250/1000
ENDIF
IF TZD==12
TOLLP=500/1000
ENDIF
ENDIF

/*圆度、圆柱度公差值

IF LD<=3
IF TZD==0
TOLYY=0.1/1000
ENDIF
IF TZD==1
TOLYY=0.2/1000
ENDIF
IF TZD==2
TOLYY=0.3/1000
ENDIF
IF TZD==3
TOLYY=0.5/1000
ENDIF
IF TZD==4
TOLYY=0.8/1000
ENDIF
IF TZD==5
TOLYY=1.2/1000
ENDIF
IF TZD==6
TOLYY=2/1000
ENDIF
IF TZD==7
TOLYY=3/1000
ENDIF
IF TZD==8
TOLYY=4/1000
ENDIF
IF TZD==9
TOLYY=6/1000
ENDIF
IF TZD==10
TOLYY=10/1000
ENDIF
IF TZD==11
TOLYY=14/1000
ENDIF
IF TZD==12
TOLYY=25/1000
ENDIF
ENDIF

IF LD>3&LD<=6
IF TZD==0
TOLYY=0.1/1000
ENDIF
IF TZD==1
TOLYY=0.2/1000
ENDIF
IF TZD==2
TOLYY=0.4/1000
ENDIF
IF TZD==3
TOLYY=0.6/1000
ENDIF
IF TZD==4
TOLYY=1/1000
ENDIF
IF TZD==5
TOLYY=1.5/1000
ENDIF
IF TZD==6
TOLYY=2.5/1000
ENDIF
IF TZD==7
TOLYY=4/1000
ENDIF
IF TZD==8
TOLYY=5/1000
ENDIF
IF TZD==9
TOLYY=8/1000
ENDIF
IF TZD==10
TOLYY=12/1000
ENDIF
IF TZD==11
TOLYY=18/1000
ENDIF
IF TZD==12
TOLYY=30/1000
ENDIF
ENDIF

IF LD>6&LD<=10
IF TZD==0
TOLYY=0.12/1000
ENDIF
IF TZD==1
TOLYY=0.25/1000
ENDIF
IF TZD==2
TOLYY=0.4/1000
ENDIF
IF TZD==3
TOLYY=0.6/1000
ENDIF
IF TZD==4
TOLYY=1/1000
ENDIF
IF TZD==5
TOLYY=1.5/1000
ENDIF
IF TZD==6
TOLYY=2.5/1000
ENDIF
IF TZD==7
TOLYY=4/1000
ENDIF
IF TZD==8
TOLYY=6/1000
ENDIF
IF TZD==9
TOLYY=9/1000
ENDIF
IF TZD==10
TOLYY=15/1000
ENDIF
IF TZD==11
TOLYY=22/1000
ENDIF
IF TZD==12
TOLYY=36/1000
ENDIF
ENDIF

IF LD>10&LD<=18
IF TZD==0
TOLYY=0.15/1000
ENDIF
IF TZD==1
TOLYY=0.25/1000
ENDIF
IF TZD==2
TOLYY=0.5/1000
ENDIF
IF TZD==3
TOLYY=0.8/1000
ENDIF
IF TZD==4
TOLYY=1.2/1000
ENDIF
IF TZD==5
TOLYY=2/1000
ENDIF
IF TZD==6
TOLYY=3/1000
ENDIF
IF TZD==7
TOLYY=5/1000
ENDIF
IF TZD==8
TOLYY=8/1000
ENDIF
IF TZD==9
TOLYY=11/1000
ENDIF
IF TZD==10
TOLYY=18/1000
ENDIF
IF TZD==11
TOLYY=27/1000
ENDIF
IF TZD==12
TOLYY=43/1000
ENDIF
ENDIF

IF LD>18&LD<=30
IF TZD==0
TOLYY=0.2/1000
ENDIF
IF TZD==1
TOLYY=0.3/1000
ENDIF
IF TZD==2
TOLYY=0.6/1000
ENDIF
IF TZD==3
TOLYY=1/1000
ENDIF
IF TZD==4
TOLYY=1.5/1000
ENDIF
IF TZD==5
TOLYY=2.5/1000
ENDIF
IF TZD==6
TOLYY=4/1000
ENDIF
IF TZD==7
TOLYY=6/1000
ENDIF
IF TZD==8
TOLYY=9/1000
ENDIF
IF TZD==9
TOLYY=13/1000
ENDIF
IF TZD==10
TOLYY=21/1000
ENDIF
IF TZD==11
TOLYY=33/1000
ENDIF
IF TZD==12
TOLYY=52/1000
ENDIF
ENDIF

IF LD>30&LD<=50
IF TZD==0
TOLYY=0.25/1000
ENDIF
IF TZD==1
TOLYY=0.4/1000
ENDIF
IF TZD==2
TOLYY=0.6/1000
ENDIF
IF TZD==3
TOLYY=1/1000
ENDIF
IF TZD==4
TOLYY=1.5/1000
ENDIF
IF TZD==5
TOLYY=2.5/1000
ENDIF
IF TZD==6
TOLYY=4/1000
ENDIF
IF TZD==7
TOLYY=7/1000
ENDIF
IF TZD==8
TOLYY=11/1000
ENDIF
IF TZD==9
TOLYY=16/1000
ENDIF
IF TZD==10
TOLYY=25/1000
ENDIF
IF TZD==11
TOLYY=39/1000
ENDIF
IF TZD==12
TOLYY=62/1000
ENDIF
ENDIF

IF LD>50&LD<=80
IF TZD==0
TOLYY=0.3/1000
ENDIF
IF TZD==1
TOLYY=0.5/1000
ENDIF
IF TZD==2
TOLYY=0.8/1000
ENDIF
IF TZD==3
TOLYY=1.2/1000
ENDIF
IF TZD==4
TOLYY=2/1000
ENDIF
IF TZD==5
TOLYY=3/1000
ENDIF
IF TZD==6
TOLYY=5/1000
ENDIF
IF TZD==7
TOLYY=8/1000
ENDIF
IF TZD==8
TOLYY=13/1000
ENDIF
IF TZD==9
TOLYY=19/1000
ENDIF
IF TZD==10
TOLYY=30/1000
ENDIF
IF TZD==11
TOLYY=46/1000
ENDIF
IF TZD==12
TOLYY=74/1000
ENDIF
ENDIF

IF LD>80&LD<=120
IF TZD==0
TOLYY=0.4/1000
ENDIF
IF TZD==1
TOLYY=0.6/1000
ENDIF
IF TZD==2
TOLYY=1/1000
ENDIF
IF TZD==3
TOLYY=1.5/1000
ENDIF
IF TZD==4
TOLYY=2.5/1000
ENDIF
IF TZD==5
TOLYY=4/1000
ENDIF
IF TZD==6
TOLYY=6/1000
ENDIF
IF TZD==7
TOLYY=10/1000
ENDIF
IF TZD==8
TOLYY=15/1000
ENDIF
IF TZD==9
TOLYY=22/1000
ENDIF
IF TZD==10
TOLYY=35/1000
ENDIF
IF TZD==11
TOLYY=54/1000
ENDIF
IF TZD==12
TOLYY=87/1000
ENDIF
ENDIF

IF LD>120&LD<=180
IF TZD==0
TOLYY=0.6/1000
ENDIF
IF TZD==1
TOLYY=1/1000
ENDIF
IF TZD==2
TOLYY=1.2/1000
ENDIF
IF TZD==3
TOLYY=2/1000
ENDIF
IF TZD==4
TOLYY=3.5/1000
ENDIF
IF TZD==5
TOLYY=5/1000
ENDIF
IF TZD==6
TOLYY=8/1000
ENDIF
IF TZD==7
TOLYY=12/1000
ENDIF
IF TZD==8
TOLYY=18/1000
ENDIF
IF TZD==9
TOLYY=25/1000
ENDIF
IF TZD==10
TOLYY=40/1000
ENDIF
IF TZD==11
TOLYY=63/1000
ENDIF
IF TZD==12
TOLYY=100/1000
ENDIF
ENDIF

IF LD>180&LD<=250
IF TZD==0
TOLYY=0.8/1000
ENDIF
IF TZD==1
TOLYY=1.2/1000
ENDIF
IF TZD==2
TOLYY=2/1000
ENDIF
IF TZD==3
TOLYY=3/1000
ENDIF
IF TZD==4
TOLYY=4.5/1000
ENDIF
IF TZD==5
TOLYY=7/1000
ENDIF
IF TZD==6
TOLYY=10/1000
ENDIF
IF TZD==7
TOLYY=14/1000
ENDIF
IF TZD==8
TOLYY=20/1000
ENDIF
IF TZD==9
TOLYY=29/1000
ENDIF
IF TZD==10
TOLYY=46/1000
ENDIF
IF TZD==11
TOLYY=72/1000
ENDIF
IF TZD==12
TOLYY=115/1000
ENDIF
ENDIF

IF LD>250&LD<=315
IF TZD==0
TOLYY=1/1000
ENDIF
IF TZD==1
TOLYY=1.6/1000
ENDIF
IF TZD==2
TOLYY=2.5/1000
ENDIF
IF TZD==3
TOLYY=4/1000
ENDIF
IF TZD==4
TOLYY=6/1000
ENDIF
IF TZD==5
TOLYY=8/1000
ENDIF
IF TZD==6
TOLYY=12/1000
ENDIF
IF TZD==7
TOLYY=16/1000
ENDIF
IF TZD==8
TOLYY=23/1000
ENDIF
IF TZD==9
TOLYY=32/1000
ENDIF
IF TZD==10
TOLYY=52/1000
ENDIF
IF TZD==11
TOLYY=81/1000
ENDIF
IF TZD==12
TOLYY=130/1000
ENDIF
ENDIF

IF LD>315&LD<=400
IF TZD==0
TOLYY=1.2/1000
ENDIF
IF TZD==1
TOLYY=2/1000
ENDIF
IF TZD==2
TOLYY=3/1000
ENDIF
IF TZD==3
TOLYY=5/1000
ENDIF
IF TZD==4
TOLYY=7/1000
ENDIF
IF TZD==5
TOLYY=9/1000
ENDIF
IF TZD==6
TOLYY=13/1000
ENDIF
IF TZD==7
TOLYY=18/1000
ENDIF
IF TZD==8
TOLYY=25/1000
ENDIF
IF TZD==9
TOLYY=36/1000
ENDIF
IF TZD==10
TOLYY=57/1000
ENDIF
IF TZD==11
TOLYY=89/1000
ENDIF
IF TZD==12
TOLYY=140/1000
ENDIF
ENDIF

IF LD>400&LD<=500
IF TZD==0
TOLYY=1.5/1000
ENDIF
IF TZD==1
TOLYY=2.5/1000
ENDIF
IF TZD==2
TOLYY=4/1000
ENDIF
IF TZD==3
TOLYY=6/1000
ENDIF
IF TZD==4
TOLYY=8/1000
ENDIF
IF TZD==5
TOLYY=10/1000
ENDIF
IF TZD==6
TOLYY=15/1000
ENDIF
IF TZD==7
TOLYY=20/1000
ENDIF
IF TZD==8
TOLYY=27/1000
ENDIF
IF TZD==9
TOLYY=40/1000
ENDIF
IF TZD==10
TOLYY=63/1000
ENDIF
IF TZD==11
TOLYY=97/1000
ENDIF
IF TZD==12
TOLYY=155/1000
ENDIF
ENDIF

/*平行度、垂直度、倾斜度公差值

IF LD<=10
IF TZD==1
TOLPZQ=0.4/1000
ENDIF
IF TZD==2
TOLPZQ=0.8/1000
ENDIF
IF TZD==3
TOLPZQ=1.5/1000
ENDIF
IF TZD==4
TOLPZQ=3/1000
ENDIF
IF TZD==5
TOLPZQ=5/1000
ENDIF
IF TZD==6
TOLPZQ=8/1000
ENDIF
IF TZD==7
TOLPZQ=12/1000
ENDIF
IF TZD==8
TOLPZQ=20/1000
ENDIF
IF TZD==9
TOLPZQ=30/1000
ENDIF
IF TZD==10
TOLPZQ=50/1000
ENDIF
IF TZD==11
TOLPZQ=80/1000
ENDIF
IF TZD==12
TOLPZQ=120/1000
ENDIF
ENDIF

IF LD>10&LD<=16
IF TZD==1
TOLPZQ=0.5/1000
ENDIF
IF TZD==2
TOLPZQ=1/1000
ENDIF
IF TZD==3
TOLPZQ=2/1000
ENDIF
IF TZD==4
TOLPZQ=4/1000
ENDIF
IF TZD==5
TOLPZQ=6/1000
ENDIF
IF TZD==6
TOLPZQ=10/1000
ENDIF
IF TZD==7
TOLPZQ=15/1000
ENDIF
IF TZD==8
TOLPZQ=25/1000
ENDIF
IF TZD==9
TOLPZQ=40/1000
ENDIF
IF TZD==10
TOLPZQ=60/1000
ENDIF
IF TZD==11
TOLPZQ=100/1000
ENDIF
IF TZD==12
TOLPZQ=150/1000
ENDIF
ENDIF

IF LD>16&LD<=25
IF TZD==1
TOLPZQ=0.6/1000
ENDIF
IF TZD==2
TOLPZQ=1.2/1000
ENDIF
IF TZD==3
TOLPZQ=2.5/1000
ENDIF
IF TZD==4
TOLPZQ=5/1000
ENDIF
IF TZD==5
TOLPZQ=8/1000
ENDIF
IF TZD==6
TOLPZQ=12/1000
ENDIF
IF TZD==7
TOLPZQ=20/1000
ENDIF
IF TZD==8
TOLPZQ=30/1000
ENDIF
IF TZD==9
TOLPZQ=50/1000
ENDIF
IF TZD==10
TOLPZQ=80/1000
ENDIF
IF TZD==11
TOLPZQ=120/1000
ENDIF
IF TZD==12
TOLPZQ=200/1000
ENDIF
ENDIF

IF LD>25&LD<=40
IF TZD==1
TOLPZQ=0.8/1000
ENDIF
IF TZD==2
TOLPZQ=1.5/1000
ENDIF
IF TZD==3
TOLPZQ=3/1000
ENDIF
IF TZD==4
TOLPZQ=6/1000
ENDIF
IF TZD==5
TOLPZQ=10/1000
ENDIF
IF TZD==6
TOLPZQ=15/1000
ENDIF
IF TZD==7
TOLPZQ=25/1000
ENDIF
IF TZD==8
TOLPZQ=40/1000
ENDIF
IF TZD==9
TOLPZQ=60/1000
ENDIF
IF TZD==10
TOLPZQ=100/1000
ENDIF
IF TZD==11
TOLPZQ=150/1000
ENDIF
IF TZD==12
TOLPZQ=250/1000
ENDIF
ENDIF

IF LD>40&LD<=63
IF TZD==1
TOLPZQ=1/1000
ENDIF
IF TZD==2
TOLPZQ=2/1000
ENDIF
IF TZD==3
TOLPZQ=4/1000
ENDIF
IF TZD==4
TOLPZQ=8/1000
ENDIF
IF TZD==5
TOLPZQ=12/1000
ENDIF
IF TZD==6
TOLPZQ=20/1000
ENDIF
IF TZD==7
TOLPZQ=30/1000
ENDIF
IF TZD==8
TOLPZQ=50/1000
ENDIF
IF TZD==9
TOLPZQ=80/1000
ENDIF
IF TZD==10
TOLPZQ=120/1000
ENDIF
IF TZD==11
TOLPZQ=200/1000
ENDIF
IF TZD==12
TOLPZQ=300/1000
ENDIF
ENDIF

IF LD>63&LD<=100
IF TZD==1
TOLPZQ=1.2/1000
ENDIF
IF TZD==2
TOLPZQ=2.5/1000
ENDIF
IF TZD==3
TOLPZQ=5/1000
ENDIF
IF TZD==4
TOLPZQ=10/1000
ENDIF
IF TZD==5
TOLPZQ=15/1000
ENDIF
IF TZD==6
TOLPZQ=25/1000
ENDIF
IF TZD==7
TOLPZQ=40/1000
ENDIF
IF TZD==8
TOLPZQ=60/1000
ENDIF
IF TZD==9
TOLPZQ=100/1000
ENDIF
IF TZD==10
TOLPZQ=150/1000
ENDIF
IF TZD==11
TOLPZQ=250/1000
ENDIF
IF TZD==12
TOLPZQ=400/1000
ENDIF
ENDIF

IF LD>100&LD<=160
IF TZD==1
TOLPZQ=1.5/1000
ENDIF
IF TZD==2
TOLPZQ=3/1000
ENDIF
IF TZD==3
TOLPZQ=6/1000
ENDIF
IF TZD==4
TOLPZQ=12/1000
ENDIF
IF TZD==5
TOLPZQ=20/1000
ENDIF
IF TZD==6
TOLPZQ=30/1000
ENDIF
IF TZD==7
TOLPZQ=50/1000
ENDIF
IF TZD==8
TOLPZQ=80/1000
ENDIF
IF TZD==9
TOLPZQ=120/1000
ENDIF
IF TZD==10
TOLPZQ=200/1000
ENDIF
IF TZD==11
TOLPZQ=300/1000
ENDIF
IF TZD==12
TOLPZQ=500/1000
ENDIF
ENDIF

IF LD>160&LD<=250
IF TZD==1
TOLPZQ=2/1000
ENDIF
IF TZD==2
TOLPZQ=4/1000
ENDIF
IF TZD==3
TOLPZQ=8/1000
ENDIF
IF TZD==4
TOLPZQ=15/1000
ENDIF
IF TZD==5
TOLPZQ=25/1000
ENDIF
IF TZD==6
TOLPZQ=40/1000
ENDIF
IF TZD==7
TOLPZQ=60/1000
ENDIF
IF TZD==8
TOLPZQ=100/1000
ENDIF
IF TZD==9
TOLPZQ=150/1000
ENDIF
IF TZD==10
TOLPZQ=250/1000
ENDIF
IF TZD==11
TOLPZQ=400/1000
ENDIF
IF TZD==12
TOLPZQ=600/1000
ENDIF
ENDIF



IF LD>250&LD<=400
IF TZD==1
TOLPZQ=2.5/1000
ENDIF
IF TZD==2
TOLPZQ=5/1000
ENDIF
IF TZD==3
TOLPZQ=10/1000
ENDIF
IF TZD==4
TOLPZQ=20/1000
ENDIF
IF TZD==5
TOLPZQ=30/1000
ENDIF
IF TZD==6
TOLPZQ=50/1000
ENDIF
IF TZD==7
TOLPZQ=80/1000
ENDIF
IF TZD==8
TOLPZQ=120/1000
ENDIF
IF TZD==9
TOLPZQ=200/1000
ENDIF
IF TZD==10
TOLPZQ=300/1000
ENDIF
IF TZD==11
TOLPZQ=500/1000
ENDIF
IF TZD==12
TOLPZQ=800/1000
ENDIF
ENDIF


IF LD>400&LD<=630
IF TZD==1
TOLPZQ=3/1000
ENDIF
IF TZD==2
TOLPZQ=6/1000
ENDIF
IF TZD==3
TOLPZQ=12/1000
ENDIF
IF TZD==4
TOLPZQ=25/1000
ENDIF
IF TZD==5
TOLPZQ=40/1000
ENDIF
IF TZD==6
TOLPZQ=60/1000
ENDIF
IF TZD==7
TOLPZQ=100/1000
ENDIF
IF TZD==8
TOLPZQ=150/1000
ENDIF
IF TZD==9
TOLPZQ=250/1000
ENDIF
IF TZD==10
TOLPZQ=400/1000
ENDIF
IF TZD==11
TOLPZQ=600/1000
ENDIF
IF TZD==12
TOLPZQ=1000/1000
ENDIF
ENDIF
