File: bug22864

package info (click to toggle)
oce 0.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 297,992 kB
  • ctags: 203,291
  • sloc: cpp: 1,176,369; ansic: 67,206; sh: 11,647; tcl: 6,890; cs: 5,221; python: 2,867; java: 1,522; makefile: 338; xml: 292; perl: 37
file content (101 lines) | stat: -rw-r--r-- 2,566 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
puts "============"
puts "OCC22864"
puts "============"
puts ""
##############################################################################################
# The algorithm BiTgte_Blend obtains instable results
##############################################################################################

set BugNumber OCC22864

restore [locate_data_file bug22864_face1.brep] f1 
restore [locate_data_file bug22864_face2.brep] f2 

shape aShape C
add f1 aShape
add f2 aShape

#
set status 0
#
set nb_v_good 8
set nb_e_good 12
set nb_w_good 4
set nb_f_good 4
set nb_sh_good 0
set nb_sol_good 0
set nb_compsol_good 0
set nb_compound_good 1
set nb_shape_good 29
#
set Numbers 11
#
for {set i 0} {$i < ${Numbers}} {incr i} {
    puts "i=$i"
    rollingball result aShape 15 @ f1 f2
    
    set nb_info [nbshapes result]
    regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v
    regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e
    regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w
    regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f
    regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh
    regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol
    regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol
    regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound
    regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape
    
    if {$nb_v != $nb_v_good || $nb_e != $nb_e_good ||
	$nb_w != $nb_w_good || $nb_f != $nb_f_good ||
	$nb_sh != $nb_sh_good || $nb_sol != $nb_sol_good || 
	$nb_compsol != $nb_compsol_good || $nb_compound != $nb_compound_good ||
	$nb_shape != $nb_shape_good } {
        set status 1
    }
     
    set aFile $imagedir/${test_image}.brep
    puts "aFile=${aFile}"
    file delete ${aFile}
    if { [file exists ${aFile}] } {
	puts "There is old ${aFile} file; Error"
	set status 1
    }
  #
    save result ${aFile}
    catch {exec chmod 777 ${aFile}}
    if { ![file exists ${aFile}] } {
	puts "There is not ${aFile} file; save command: Error"
	set status 1
    }

    set fp [open ${aFile} "r"]
    set Log [read -nonewline ${fp}]
    close ${fp}
  #
    if {$i == 0} {
	set StandardLog ${Log}
    } else {
	set info_result [string compare ${Log} ${StandardLog}]
	if {${info_result} == 0} {
    	    # Log == StandardLog
    	    puts "Log == StandardLog"
	} else {
    	    # Log != StandardLog
    	    set status 1
    	    puts "Log != StandardLog"
	}
    }
}

# Resume
puts ""
if {${status} == 0} {
    puts "OK ${BugNumber}"
} else {
    puts "Faulty ${BugNumber}"
}

set square 8444.76
set 2dviewer 0