0027252: Implicit-implicit intersection (Cylinder-Plane) loses intersection curve
[occt.git] / tests / bugs / modalg_5 / bug25292_36
CommitLineData
02effd35 1puts "================"
2puts "OCC25292"
3puts "================"
4puts ""
5#######################################################################
6# Face/Face intersection algorithm gives different results for different order of the arguments
7#######################################################################
8
e8feb725 9puts "##############################"
10puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
11puts "##############################"
12puts ""
13puts ""
14
02effd35 15# intersect command for trimmed surfaces
16
e8feb725 17#This value must be equal to the analogical value in bug25292_35 and bug25292_36 of "bugs modalg_5" testgrid.
18set GoodNbCurv 2
19
02effd35 20restore [locate_data_file bug25292_f1.brep] f1
21restore [locate_data_file bug25292_f2.brep] f2
22
23mksurface s1 f1
24mksurface s2 f2
25
26# trim s1 in accordance with the UV-bounds of f1:
27trimv s1t s1 19.1600000005 19.6600000005
28
29# trim s2 in accordance with the UV-bounds of f2:
30trim s2t s2 0. 1.570796326795 -275 275
31
32###################
e8feb725 33intersect res s2t s1t
02effd35 34###################
35
e8feb725 36set che [whatis res]
37set ind [string first "3d curve" $che]
38if {${ind} >= 0} {
39 #Only variable "res" exists
40
f542b7bb 41 copy res res_1
42}
e8feb725 43
f542b7bb 44set ic 1
45set AllowRepeate 1
46while { $AllowRepeate != 0 } {
47 set che [whatis res_$ic]
48 set ind [string first "3d curve" $che]
49 if {${ind} < 0} {
50 set AllowRepeate 0
51 } else {
52 bounds res_$ic U1 U2
53
54 if {[dval U2-U1] < 1.0e-9} {
55 puts "Error: Wrong curve's range!"
e8feb725 56 }
f542b7bb 57
58 xdistcs res_$ic s1 U1 U2 10 1e-7
59 xdistcs res_$ic s2 U1 U2 10 1e-7
60
61 incr ic
e8feb725 62 }
f542b7bb 63}
e8feb725 64
f542b7bb 65if {[expr {$ic - 1}] == $GoodNbCurv} {
66 puts "OK: Curve Number is good!"
67} else {
68 puts "Error: Curve Number is bad!"
02effd35 69}