0024400: Wrong result obtained by Section
[occt.git] / tests / bugs / modalg_5 / bug24390_2
CommitLineData
0221b126 1puts "========================"
2puts "OCC24390"
3puts "========================"
4puts ""
5#######################################################################
6# Sewing produces the result with huge tolerance
7#######################################################################
8
9pload XSDRAW
10
11restore [locate_data_file bug24390_face1.brep] f1
12restore [locate_data_file bug24390_face2.brep] f2
13
14sewing result f1 f2
15
16checkshape result
17
18set tolmax_f [tolmax f1]
19regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL
20
21set face_list {f2}
22foreach 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
30set CMP_TOL [expr 5. * ${CMP_TOL}]
31puts "CMP_TOL=${CMP_TOL}"
32
33set tolmaxres [tolmax result]
34regexp {max tol = ([-0-9.+eE]+)} ${tolmaxres} full MaxTolerance
35puts "MaxTolerance=${MaxTolerance}"
36if { ${MaxTolerance} > ${CMP_TOL} } {
37 puts "Error: invalid tolerance"
38}
39
40set 2dviewer 1