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