1 puts "========================"
3 puts "========================"
5 #######################################################################
6 # Sewing produces the result with huge tolerance
7 #######################################################################
11 restore [locate_data_file bug24390_face_0.brep] f1
12 restore [locate_data_file bug24390_face_1.brep] f2
13 restore [locate_data_file bug24390_face_2.brep] f3
14 restore [locate_data_file bug24390_face_3.brep] f4
15 restore [locate_data_file bug24390_face_4.brep] f5
16 restore [locate_data_file bug24390_face_5.brep] f6
18 sewing result f1 f2 f3 f4 f5 f6
22 set tolmax_f [tolmax f1]
23 regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full CMP_TOL
25 set face_list {f2 f3 f4 f5 f6}
26 foreach f ${face_list} {
27 set tolmax_f [tolmax ${f}]
28 regexp {max tol = ([-0-9.+eE]+)} ${tolmax_f} full FaceMaxTolerance
29 if { ${FaceMaxTolerance} > ${CMP_TOL} } {
30 set CMP_TOL ${FaceMaxTolerance}
34 set CMP_TOL [expr 5. * ${CMP_TOL}]
35 puts "CMP_TOL=${CMP_TOL}"
37 set tolmaxres [tolmax result]
38 regexp {max tol = ([-0-9.+eE]+)} ${tolmaxres} full MaxTolerance
39 puts "MaxTolerance=${MaxTolerance}"
40 if { ${MaxTolerance} > ${CMP_TOL} } {
41 puts "Error: invalid tolerance"