File: bug6278

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 (61 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download | duplicates (6)
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
puts "============"
puts "OCC6278"
puts "============"
puts ""
######################################################
# Fuse operation produces incorrect result
######################################################

set BugNumber OCC6278

restore [locate_data_file OCC6278-A.brep] a 
restore [locate_data_file OCC6278-B.brep] b 

bfuse result a b
explode result v

set nb_v_good 4

set DumpList [dump result_2]
if {[llength ${DumpList}] < 40} {
    puts "Faulty ${BugNumber}: bad format of dump"
} else {
    regexp { *- *Point *3D *: *([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} ${DumpList} full x y z
    puts $x
    puts $y
    puts $z
    
    set percent_max 0.1
    
    set x [lindex ${DumpList} 37]
    set y [lindex ${DumpList} 38]
    set z [lindex ${DumpList} 39]

    set x [string range ${x} 0 end-1]
    set y [string range ${y} 0 end-1]

    set good_x -32.3042674857046
    set good_y 20.0000000000001
    set good_z 0.

    set Percent_x [expr abs(${x} - ${good_x}) / abs(${good_x}) * 100.]
    set Percent_y [expr abs(${y} - ${good_y}) / abs(${good_y}) * 100.]
    if {${z} == 0.} {
        set Percent_z 0.
    } else {
        set Percent_z [expr abs(${good_z} - ${z}) / abs(${z}) * 100.]
    }

    if {${Percent_x} > ${percent_max}} {
        puts "Faulty ${BugNumber}: bad value of x = ${x}"
    }
    if {${Percent_y} > ${percent_max}} {
	puts "Faulty ${BugNumber}: bad value of y = ${y}"
    }
    if {${Percent_z} > ${percent_max}} {
        puts "Faulty ${BugNumber}: bad value of z = ${z}"
    }
}

set length 278.725
set 3dviewer 2