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