File: bug23942

package info (click to toggle)
opencascade 7.9.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 301,924 kB
  • sloc: cpp: 1,523,264; tcl: 10,159; cs: 5,173; java: 1,554; sh: 1,342; ansic: 827; xml: 699; makefile: 30; javascript: 22
file content (99 lines) | stat: -rw-r--r-- 2,335 bytes parent folder | download | duplicates (4)
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
puts "TODO OCC21413 ALL: bad accuracy of approximation"

puts "========"
puts "OCC23942"
puts "========"
puts ""
#########################################################
# Pipe algorithms unrobust to number rounding
#########################################################

#
### 1
#
interpol c [locate_data_file bug23942_points.txt]
set log [tuyau r_1 c 5]

regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy

if { ${accuracy} > 0.0001} {
   puts "Error: bad accuracy of approximation"
}

decho off
dlog reset
dlog on

dump r_1

set info_1 [dlog get]
dlog reset
dlog off
decho on

regexp {Degrees :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full X Degrees_1
regexp {NbPoles :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full X NbPoles_1
regexp {NbKnots :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full UKnots_1 VKnots_1
puts "Degrees_1 = ${Degrees_1}"
puts "NbPoles_1 = ${NbPoles_1}"
puts "UKnots_1 = ${UKnots_1}"
puts "VKnots_1 = ${VKnots_1}"

#
### 2
#
save c ${imagedir}/cc
restore ${imagedir}/cc
set log [tuyau r_2 cc 5]

regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy

if { ${accuracy} > 0.0001} {
   puts "Error: bad accuracy of approximation"
}

decho off
dlog reset
dlog on

dump r_2

set info_2 [dlog get]
dlog reset
dlog off
decho on

regexp {Degrees :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full X Degrees_2
regexp {NbPoles :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full X NbPoles_2
regexp {NbKnots :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full UKnots_2 VKnots_2
puts "Degrees_2 = ${Degrees_2}"
puts "NbPoles_2 = ${NbPoles_2}"
puts "UKnots_2 = ${UKnots_2}"
puts "VKnots_2 = ${VKnots_2}"

#
### 3
#
if {${Degrees_1} != ${Degrees_2}} {
   puts "Error : Degrees_1 is not equal Degrees_2"
} else {
   puts "OK : Degrees_1 is equal Degrees_2"
}
if {${NbPoles_1} != ${NbPoles_2}} {
   puts "Error : NbPoles_1 is not equal NbPoles_2"
} else {
   puts "OK : NbPoles_1 is equal NbPoles_2"
}
if {${UKnots_1} != ${UKnots_2}} {
   puts "Error : UKnots_1 is not equal UKnots_2"
} else {
   puts "OK : UKnots_1 is equal UKnots_2"
}
if {${VKnots_1} != ${VKnots_2}} {
   puts "Error : VKnots_1 is not equal VKnots_2"
} else {
   puts "OK : VKnots_1 is equal VKnots_2"
}

checkview -display r_1 -2d -path ${imagedir}/${test_image}_1.png
checkview -display r_2 -2d -path ${imagedir}/${test_image}_2.png