File: bug921

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 (72 lines) | stat: -rw-r--r-- 1,761 bytes parent folder | download | duplicates (10)
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
pload QAcommands

puts "======="
puts "OCC921"
puts "======="
puts ""
############################################################
## I have found that regresiion on file a054a.sat depends on changes in
## BRepTools::AddUVBounds. The method BRepTools::UVBounds(F, u1, u2, v1, v2)
## returns different values in C40 and in dev. It is because there are different
## strings of code. BRepTools.cxx line 213 (in dev version)
############################################################

set good_u1 -0.14353846357954067
set good_u2 4.8658600889104724
set good_v1 -1.386764846506505
set good_v2 7.6699722758333735

set percent_max 0.1

restore [locate_data_file OCC921.rle] a

set BoundsList [OCC921 a]

set u1 0
set u2 0
set v1 0
set v2 0

regexp {Bounds: *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+) *([-0-9.+eE]+)} $BoundsList full u1 u2 v1 v2

set u1_percent [expr abs(${u1} - ${good_u1}) / double(${good_u1}) * 100.]
set u2_percent [expr abs(${u2} - ${good_u2}) / double(${good_u2}) * 100.]
set v1_percent [expr abs(${v1} - ${good_v1}) / double(${good_v1}) * 100.]
set v2_percent [expr abs(${v2} - ${good_v2}) / double(${good_v2}) * 100.]

puts "u1 = ${u1}"
puts "u2 = ${u2}"
puts "v1 = ${v1}"
puts "v2 = ${v2}"

puts "u1_percent = ${u1_percent}"
puts "u2_percent = ${u2_percent}"
puts "v1_percent = ${v1_percent}"
puts "v2_percent = ${v2_percent}"

set status 0

if {${u1_percent} > ${percent_max}} {
  puts "OCC921: Error (case 1)"
  set status 1
}

if {${u2_percent} > ${percent_max}} {
  puts "OCC921: Error (case 2)"
  set status 1
}

if {${v1_percent} > ${percent_max}} {
  puts "OCC921: Error (case 3)"
  set status 1
}

if {${v2_percent} > ${percent_max}} {
  puts "OCC921: Error (case 4)"
  set status 1
}

if {${status} == 0} {
  puts "OCC921: OK"
}