0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / modalg_6 / bug26675
CommitLineData
4e14c88f 1puts "============"
2puts "OCC26675"
3puts "============"
4puts ""
5###############################
6## 0026675: Eliminate normalization of coordinates in ApproxInt package
7###############################
8
9set GoodNbCurv 1
10
11pload QAcommands
12OCC26675_1 ss
13
14intersect res ss_1 ss_2
15
16set che [whatis res]
17set ind [string first "3d curve" $che]
18if {${ind} >= 0} {
19 #Only variable "res" exists
20 renamevar res res_1
21}
22
23
24set ic 1
25set AllowRepeate 1
26while { $AllowRepeate != 0 } {
27 set che [whatis res_$ic]
28 set ind [string first "3d curve" $che]
29 if {${ind} < 0} {
30 set AllowRepeate 0
31 } else {
32 display res_$ic
33
34 bounds res_$ic U1 U2
35
36 dval U1
37 dval U2
38
39 if {[dval U2-U1] < 1.0e-20} {
40 puts "Error: Wrong curve's range!"
41 }
42
43 xdistcs res_$ic ss_1 U1 U2 10 4.6e-6
44 xdistcs res_$ic ss_2 U1 U2 10 4.3e-6
45
46 incr ic
47 }
48}
49
50if {[expr {$ic - 1}] == $GoodNbCurv} {
51 puts "OK: Curve Number is good!"
52} else {
53 puts "Error: Curve Number is bad!"
54}
55
56smallview
57fit
5747059b 58checkview -screenshot -2d -path ${imagedir}/${test_image}.png