0022240: Bad triangulation of transformed shapes
[occt.git] / tests / bugs / modalg_2 / bug22864
CommitLineData
3bea4c16 1puts "============"
2puts "OCC22864"
3puts "============"
4puts ""
5##############################################################################################
6# The algorithm BiTgte_Blend obtains instable results
7##############################################################################################
8
9set BugNumber OCC22864
10
11restore [locate_data_file bug22864_face1.brep] f1
12restore [locate_data_file bug22864_face2.brep] f2
13
14shape aShape C
15add f1 aShape
16add f2 aShape
17
18#
19set status 0
20#
21set nb_v_good 2
22set nb_e_good 3
23set nb_w_good 1
24set nb_f_good 1
25set nb_sh_good 0
26set nb_sol_good 0
27set nb_compsol_good 0
28set nb_compound_good 1
29set nb_shape_good 8
30#
31set Numbers 11
32#
33for {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
91puts ""
92if {${status} == 0} {
93 puts "OK ${BugNumber}"
94} else {
95 puts "Faulty ${BugNumber}"
96}
97
98set square 6935.38
99set 2dviewer 0
100
101