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_33 and bug25292_34 of "bugs modalg_5" testgrid. |
17 | set GoodNbCurv 1 |
18 | |
02effd35 |
19 | restore [locate_data_file bug25292_f1.brep] f1 |
20 | restore [locate_data_file bug25292_f2.brep] f2 |
21 | |
22 | mksurface s1 f1 |
23 | mksurface s2 f2 |
24 | |
25 | ################# |
e8feb725 |
26 | intersect res s1 s2 |
02effd35 |
27 | ################# |
28 | |
e8feb725 |
29 | set che [whatis res] |
30 | set ind [string first "3d curve" $che] |
31 | if {${ind} >= 0} { |
32 | #Only variable "res" exists |
e2e0498b |
33 | renamevar res res_1 |
34 | } |
35 | |
261b7d9e |
36 | set ic 1 |
37 | set AllowRepeate 1 |
e2e0498b |
38 | while { $AllowRepeate != 0 } { |
39 | set che [whatis res_$ic] |
40 | set ind [string first "3d curve" $che] |
41 | if {${ind} < 0} { |
42 | set AllowRepeate 0 |
261b7d9e |
43 | } else { |
44 | display res_$ic |
45 | |
46 | bounds res_$ic U1 U2 |
47 | |
48 | dval U1 |
49 | dval U2 |
50 | |
51 | if {[dval U2-U1] < 1.0e-20} { |
52 | puts "Error: Wrong curve's range!" |
53 | } |
54 | |
55 | xdistcs res_$ic s1 U1 U2 10 1.0e-7 |
56 | xdistcs res_$ic s2 U1 U2 10 1.0e-7 |
57 | |
58 | incr ic |
e8feb725 |
59 | } |
02effd35 |
60 | } |
261b7d9e |
61 | |
e2e0498b |
62 | if {[expr {$ic - 1}] == $GoodNbCurv} { |
261b7d9e |
63 | puts "OK: Curve Number is good!" |
e2e0498b |
64 | } else { |
261b7d9e |
65 | puts "Error: Curve Number is bad!" |
66 | } |