47980104 |
1 | puts "========================" |
2 | puts "OCC24174" |
3 | puts "========================" |
4 | puts "" |
5 | ####################################################################### |
6 | # [regression] BRepBuilderAPI_Sewing returns result with very high tolerance |
7 | ####################################################################### |
8 | |
9 | pload XSDRAW |
10 | |
11 | restore [locate_data_file bug24174_Comp1.brep] a |
12 | |
13 | explode a |
14 | sewing result 0.1 a_1 a_2 |
15 | |
16 | # 0 |
17 | set log_1 [tolmax a_1] |
18 | regexp {max tol = ([-0-9.+eE]+)} ${log_1} full MaxTolerance_a_1 |
19 | set log_2 [tolmax a_2] |
20 | regexp {max tol = ([-0-9.+eE]+)} ${log_2} full MaxTolerance_a_2 |
21 | set CMP_TOL ${MaxTolerance_a_1} |
22 | if { ${MaxTolerance_a_2} > ${CMP_TOL} } { |
23 | set CMP_TOL ${MaxTolerance_a_2} |
24 | } |
25 | |
26 | # 1 |
27 | checkshape result |
28 | |
29 | # 2 |
30 | set log_3 [tolmax result] |
31 | regexp {max tol = ([-0-9.+eE]+)} ${log_3} full MaxTolerance_result |
32 | if { ${MaxTolerance_result} > ${CMP_TOL} } { |
33 | puts "Error: invalid tolerance" |
34 | } |
35 | |
36 | # 3 |
37 | freebounds ${result} 0 |
38 | set s [explode result_c e] |
39 | |
40 | set Number [ llength ${s} ] |
41 | puts "Number of free edges is ${Number}" |
42 | set Number_Free_Edges 12 |
43 | if { ${Number} != ${Number_Free_Edges} } { |
44 | puts "Error : Number of free edges is ${Number}" |
45 | } |
46 | |
47 | set 2dviewer 1 |