3bea4c16 |
1 | puts "============" |
2 | puts "OCC22864" |
3 | puts "============" |
4 | puts "" |
5 | ############################################################################################## |
6 | # The algorithm BiTgte_Blend obtains instable results |
7 | ############################################################################################## |
8 | |
9 | set BugNumber OCC22864 |
10 | |
11 | restore [locate_data_file bug22864_face1.brep] f1 |
12 | restore [locate_data_file bug22864_face2.brep] f2 |
13 | |
14 | shape aShape C |
15 | add f1 aShape |
16 | add f2 aShape |
17 | |
18 | # |
19 | set status 0 |
20 | # |
e8feb725 |
21 | set nb_v_good 2 |
22 | set nb_e_good 3 |
23 | set nb_w_good 1 |
24 | set nb_f_good 1 |
3bea4c16 |
25 | set nb_sh_good 0 |
26 | set nb_sol_good 0 |
27 | set nb_compsol_good 0 |
28 | set nb_compound_good 1 |
e8feb725 |
29 | set nb_shape_good 8 |
3bea4c16 |
30 | # |
31 | set Numbers 11 |
32 | # |
33 | for {set i 0} {$i < ${Numbers}} {incr i} { |
34 | puts "i=$i" |
35 | rollingball result aShape 15 @ f1 f2 |
36 | |
37 | set nb_info [nbshapes result] |
38 | regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v |
39 | regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e |
40 | regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w |
41 | regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f |
42 | regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh |
43 | regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol |
44 | regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol |
45 | regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound |
46 | regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape |
47 | |
48 | if {$nb_v != $nb_v_good || $nb_e != $nb_e_good || |
49 | $nb_w != $nb_w_good || $nb_f != $nb_f_good || |
50 | $nb_sh != $nb_sh_good || $nb_sol != $nb_sol_good || |
51 | $nb_compsol != $nb_compsol_good || $nb_compound != $nb_compound_good || |
52 | $nb_shape != $nb_shape_good } { |
53 | set status 1 |
54 | } |
55 | |
56 | set aFile $imagedir/${test_image}.brep |
57 | puts "aFile=${aFile}" |
58 | file delete ${aFile} |
59 | if { [file exists ${aFile}] } { |
60 | puts "There is old ${aFile} file; Error" |
61 | set status 1 |
62 | } |
63 | # |
64 | save result ${aFile} |
65 | catch {exec chmod 777 ${aFile}} |
66 | if { ![file exists ${aFile}] } { |
67 | puts "There is not ${aFile} file; save command: Error" |
68 | set status 1 |
69 | } |
70 | |
71 | set fp [open ${aFile} "r"] |
72 | set Log [read -nonewline ${fp}] |
73 | close ${fp} |
74 | # |
75 | if {$i == 0} { |
76 | set StandardLog ${Log} |
77 | } else { |
78 | set info_result [string compare ${Log} ${StandardLog}] |
79 | if {${info_result} == 0} { |
80 | # Log == StandardLog |
81 | puts "Log == StandardLog" |
82 | } else { |
83 | # Log != StandardLog |
84 | set status 1 |
85 | puts "Log != StandardLog" |
86 | } |
87 | } |
88 | } |
89 | |
90 | # Resume |
91 | puts "" |
92 | if {${status} == 0} { |
93 | puts "OK ${BugNumber}" |
94 | } else { |
95 | puts "Faulty ${BugNumber}" |
96 | } |
97 | |
e8feb725 |
98 | set square 6606.88 |
3bea4c16 |
99 | set 2dviewer 0 |
100 | |
101 | |