0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / modalg_5 / bug25292_16
1 puts "================"
2 puts "OCC25292"
3 puts "================"
4 puts ""
5 #######################################################################
6 # Face/Face intersection algorithm gives different results for different order of the arguments
7 #######################################################################
8
9 puts "##############################"
10 puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
11 puts "##############################"
12 puts ""
13
14 # intersect command
15
16 #This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid. 
17 set GoodNbCurv 4
18
19 restore [locate_data_file bug25292_Input_0.brep] b1
20 restore [locate_data_file bug25292_Input_1.brep] b2
21
22 explode b1 f
23 copy b1_2 f1
24 explode b2 f
25 copy b2_2 f2
26
27 mksurface s1 f1
28 mksurface s2 f2
29
30 #################
31 intersect res s2 s1
32 #################
33
34 set che [whatis res]
35 set ind [string first "3d curve" $che]
36 if {${ind} >= 0} {
37   #Only variable "res" exists
38   renamevar res res_1
39 }
40
41 set ic 1
42 set AllowRepeate 1
43 while { $AllowRepeate != 0 } {
44   set che [whatis res_$ic]
45   set ind [string first "3d curve" $che]
46   if {${ind} < 0} {
47     set AllowRepeate 0
48   } else {
49     display res_$ic
50     
51     bounds res_$ic U1 U2
52     
53     dval U1
54     dval U2
55     
56     if {[dval U2-U1] < 1.0e-20} {
57       puts "Error: Wrong curve's range!"
58     }
59     
60     xdistcs res_$ic s1 U1 U2 10 1.0e-7
61     xdistcs res_$ic s2 U1 U2 10 1.0e-7
62     
63     incr ic
64   }
65 }
66
67 if {[expr {$ic - 1}] == $GoodNbCurv} {
68   puts "OK: Curve Number is good!"
69 } else {
70   puts "Error: Curve Number is bad!"
71 }