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 | puts "" |
14 | |
02effd35 |
15 | # bopcurves command |
16 | |
17 | restore [locate_data_file bug25292_Input_0.brep] b1 |
18 | restore [locate_data_file bug25292_Input_1.brep] b2 |
19 | |
20 | explode b1 f |
21 | copy b1_2 f1 |
22 | explode b2 f |
23 | copy b2_2 f2 |
24 | |
25 | ############################# |
26 | set log [bopcurves f1 f2 -2d] |
27 | ############################# |
28 | |
29 | regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv |
e8feb725 |
30 | |
31 | #This value must be equal to the analogical value in bug25292_11 and bug25292_12 of "bugs modalg_5" testgrid. |
02effd35 |
32 | set MaxTol 1.e-7 |
e8feb725 |
33 | |
34 | #This value must be equal to the analogical value in bug25292_11, bug25292_12, bug25292_15 and bug25292_16 of "bugs modalg_5" testgrid. |
35 | set GoodNbCurv 4 |
36 | |
02effd35 |
37 | if {${Toler} > ${MaxTol}} { |
38 | puts "Error: Tolerance is too big!" |
39 | } |
e8feb725 |
40 | |
02effd35 |
41 | if {${NbCurv} != ${GoodNbCurv}} { |
42 | puts "Error: Curve Number is bad!" |
43 | } |
44 | |
45 | #------------- |
46 | |
47 | # 1 |
48 | puts "" |
02effd35 |
49 | |
50 | mksurface s1 f1 |
51 | mksurface s2 f2 |
52 | |
e8feb725 |
53 | for {set i 1} {$i <= ${NbCurv}} {incr i} { |
54 | set log [dump c_$i] |
55 | |
56 | regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles |
57 | puts "Degree=${Degree}" |
58 | puts "Poles=${Poles}" |
59 | puts "KnotsPoles=${KnotsPoles}" |
60 | puts "" |
61 | |
62 | set Knot 1 |
63 | set exp_string "Knots :\n\n +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)" |
64 | regexp ${exp_string} ${log} full U1 Mult1 |
65 | |
66 | set Knot ${KnotsPoles} |
67 | set exp_string " +${Knot} : +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)" |
68 | regexp ${exp_string} ${log} full U2 Mult2 |
69 | |
70 | puts "U1=${U1}" |
71 | puts "U2=${U2}" |
72 | |
73 | if {[expr {$U2 - $U1}] < 1.0e-20} { |
74 | puts "Error: Wrong curve's range!" |
75 | } |
76 | |
77 | dlog reset |
78 | dlog on |
79 | xdistcs c_$i s1 ${U1} ${U2} 10 |
80 | set Log2 [dlog get] |
81 | set List2 [split ${Log2} {TD= \t\n}] |
82 | set Tolerance 1.0e-7 |
83 | set Limit_Tol 1.0e-7 |
84 | set D_good 0. |
85 | checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} |
86 | |
87 | dlog reset |
88 | dlog on |
89 | xdistcs c_$i s2 ${U1} ${U2} 10 |
90 | set Log2 [dlog get] |
91 | set List2 [split ${Log2} {TD= \t\n}] |
92 | set Tolerance 1.0e-7 |
93 | set Limit_Tol 1.0e-7 |
94 | set D_good 0. |
95 | checkList ${List2} ${Tolerance} ${D_good} ${Limit_Tol} |
96 | } |
02effd35 |
97 | |
98 | v2d |
99 | 2dfit |
100 | set only_screen_axo 1 |