0031407: [Regression to 7.3.0] Extrema does not process parallel circles correctly
[occt.git] / tests / bugs / modalg_7 / bug23942
1 puts "TODO OCC21413 ALL: bad accuracy of approximation"
2
3 puts "========"
4 puts "OCC23942"
5 puts "========"
6 puts ""
7 #########################################################
8 # Pipe algorithms unrobust to number rounding
9 #########################################################
10
11 #
12 ### 1
13 #
14 interpol c [locate_data_file bug23942_points.txt]
15 set log [tuyau r_1 c 5]
16
17 regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy
18
19 if { ${accuracy} > 0.0001} {
20    puts "Error: bad accuracy of approximation"
21 }
22
23 decho off
24 dlog reset
25 dlog on
26
27 dump r_1
28
29 set info_1 [dlog get]
30 dlog reset
31 dlog off
32 decho on
33
34 regexp {Degrees :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full X Degrees_1
35 regexp {NbPoles :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full X NbPoles_1
36 regexp {NbKnots :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_1} full UKnots_1 VKnots_1
37 puts "Degrees_1 = ${Degrees_1}"
38 puts "NbPoles_1 = ${NbPoles_1}"
39 puts "UKnots_1 = ${UKnots_1}"
40 puts "VKnots_1 = ${VKnots_1}"
41
42 #
43 ### 2
44 #
45 save c ${imagedir}/cc
46 restore ${imagedir}/cc
47 set log [tuyau r_2 cc 5]
48
49 regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy
50
51 if { ${accuracy} > 0.0001} {
52    puts "Error: bad accuracy of approximation"
53 }
54
55 decho off
56 dlog reset
57 dlog on
58
59 dump r_2
60
61 set info_2 [dlog get]
62 dlog reset
63 dlog off
64 decho on
65
66 regexp {Degrees :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full X Degrees_2
67 regexp {NbPoles :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full X NbPoles_2
68 regexp {NbKnots :+([-0-9.+eE]+) +([-0-9.+eE]+)} ${info_2} full UKnots_2 VKnots_2
69 puts "Degrees_2 = ${Degrees_2}"
70 puts "NbPoles_2 = ${NbPoles_2}"
71 puts "UKnots_2 = ${UKnots_2}"
72 puts "VKnots_2 = ${VKnots_2}"
73
74 #
75 ### 3
76 #
77 if {${Degrees_1} != ${Degrees_2}} {
78    puts "Error : Degrees_1 is not equal Degrees_2"
79 } else {
80    puts "OK : Degrees_1 is equal Degrees_2"
81 }
82 if {${NbPoles_1} != ${NbPoles_2}} {
83    puts "Error : NbPoles_1 is not equal NbPoles_2"
84 } else {
85    puts "OK : NbPoles_1 is equal NbPoles_2"
86 }
87 if {${UKnots_1} != ${UKnots_2}} {
88    puts "Error : UKnots_1 is not equal UKnots_2"
89 } else {
90    puts "OK : UKnots_1 is equal UKnots_2"
91 }
92 if {${VKnots_1} != ${VKnots_2}} {
93    puts "Error : VKnots_1 is not equal VKnots_2"
94 } else {
95    puts "OK : VKnots_1 is equal VKnots_2"
96 }
97
98 checkview -display r_1 -2d -path ${imagedir}/${test_image}_1.png
99 checkview -display r_2 -2d -path ${imagedir}/${test_image}_2.png