02effd35 |
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 | |
e8feb725 |
9 | puts "##############################" |
10 | puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!" |
11 | puts "##############################" |
12 | puts "" |
13 | |
02effd35 |
14 | # intersect command |
15 | |
e8feb725 |
16 | #This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid. |
17 | set GoodNbCurv 2 |
18 | |
02effd35 |
19 | restore [locate_data_file bug25292_Input_3.brep] b1 |
20 | restore [locate_data_file bug25292_Input_11.brep] b2 |
21 | |
22 | explode b1 f |
23 | copy b1_1 f1 |
24 | explode b2 f |
25 | copy b2_1 f2 |
26 | |
27 | mksurface s1 f1 |
28 | mksurface s2 f2 |
29 | |
30 | ################# |
e8feb725 |
31 | intersect res s2 s1 |
02effd35 |
32 | ################# |
33 | |
e8feb725 |
34 | set che [whatis res] |
35 | set ind [string first "3d curve" $che] |
36 | if {${ind} >= 0} { |
37 | #Only variable "res" exists |
261b7d9e |
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 |
e8feb725 |
48 | } else { |
261b7d9e |
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 |
e8feb725 |
64 | } |
261b7d9e |
65 | } |
e8feb725 |
66 | |
261b7d9e |
67 | if {[expr {$ic - 1}] == $GoodNbCurv} { |
68 | puts "OK: Curve Number is good!" |
02effd35 |
69 | } else { |
261b7d9e |
70 | puts "Error: Curve Number is bad!" |
02effd35 |
71 | } |