0e94a94e |
1 | puts "========================" |
2 | puts " OCC329 " |
3 | puts "========================" |
4 | puts "" |
5 | ########################################################### |
6 | ##fixshape command does not fix incorrect tolerance order. |
7 | ########################################################### |
8 | |
9 | restore [locate_data_file OCC329.brep] a |
10 | |
352ffd73 |
11 | checkshape a |
0e94a94e |
12 | set tol1 [maxtolerance a] |
13 | regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol1 full face1 |
14 | regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol1 full edge1 |
15 | regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol1 full vert1 |
16 | |
17 | fixshape result a 1.e-7 0.1 |
18 | |
352ffd73 |
19 | checkshape result |
0e94a94e |
20 | set tol2 [ maxtolerance result] |
21 | regexp { +Face +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol2 full face2 |
22 | regexp { +Edge +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol2 full edge2 |
23 | regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} $tol2 full vert2 |
24 | |
25 | if { ${face2} > ${face1} || ${edge2} > ${edge1} || ${vert2} > ${vert1} } { |
26 | puts "Error : Tolerance invalid. Function FixShape works WRONGLY" |
27 | } else { |
28 | puts "Tolerance valed. Function FixShape works CORRECTLY" |
29 | } |
30 | |
5747059b |
31 | checkview -display result -2d -path ${imagedir}/${test_image}.png |
0e94a94e |
32 | |
33 | |