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