0025624: Visualization - selection is incorrect in perspective mode in a specific...
[occt.git] / tests / bugs / modalg_5 / bug24390_2
1 puts "========================"
2 puts "OCC24390"
3 puts "========================" 
4 puts ""
5 #######################################################################
6 # Sewing produces the result with huge tolerance
7 #######################################################################
8
9 pload XSDRAW
10
11 restore [locate_data_file bug24390_face1.brep] f1
12 restore [locate_data_file bug24390_face2.brep] f2
13
14 sewing result f1 f2
15
16 checkshape result
17
18 set tolmax_f [tolmax f1]
19 regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL
20
21 set face_list {f2}
22 foreach f ${face_list} {
23    set tolmax_f [tolmax ${f}]
24    regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full FaceMaxTolerance
25    if { ${FaceMaxTolerance} > ${CMP_TOL} } {
26       set CMP_TOL ${FaceMaxTolerance}
27    }
28 }
29
30 set CMP_TOL [expr 5. * ${CMP_TOL}]
31 puts "CMP_TOL=${CMP_TOL}"
32
33 set tolmaxres [tolmax result]
34 regexp {max tol = ([-0-9.+eE]+)} ${tolmaxres} full MaxTolerance
35 puts "MaxTolerance=${MaxTolerance}"
36 if { ${MaxTolerance} > ${CMP_TOL} } {
37    puts "Error: invalid tolerance"
38 }
39
40 set 2dviewer 1