c2c2f2b6 |
1 | puts "=========" |
2 | puts "OCC24585" |
3 | puts "=========" |
4 | puts "" |
5 | ########################################################### |
6 | # Wrong pcurve of the section curve |
7 | ########################################################### |
4e14c88f |
8 | |
714c3bfc |
9 | set ExpectedTol 5.6061116035240048e-005 |
c2c2f2b6 |
10 | set NbCurv_OK 1 |
11 | |
12 | restore [locate_data_file bug24585_b1.brep] b1 |
13 | restore [locate_data_file bug24585_b2.brep] b2 |
14 | |
15 | mksurface s1 b1 |
16 | bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp |
17 | |
18 | set log [bopcurves b1 b2 -2d] |
19 | |
20 | regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv |
21 | |
22 | if {${NbCurv} != ${NbCurv_OK}} { |
23 | puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found." |
24 | } |
25 | |
714c3bfc |
26 | set tol_abs 0.0 |
27 | set tol_rel 0.01 |
28 | checkreal "Tolerance Reached" ${Toler} ${ExpectedTol} ${tol_abs} ${tol_rel} |
c2c2f2b6 |
29 | |
631633a2 |
30 | bounds c2d1_1 U1 U2 |
31 | 2dcvalue c2d1_1 U1 U_begin V_begin |
32 | 2dcvalue c2d1_1 U2 U_end V_end |
c2c2f2b6 |
33 | |
631633a2 |
34 | #Theoretically, c2d1_1 must cover U-diapason of surface s1 fully. |
c2c2f2b6 |
35 | |
36 | set delta_f [dval U1f_exp-U_begin] |
37 | |
38 | #ATTENTION!!! U_begin must be strictly equal U1f_exp (without any tolerance) |
39 | if {${delta_f} != 0} { |
40 | puts "Error: Bad value. U_begin = [dval U_begin], Ufirst = [dval U1f_exp]." |
41 | } else { |
42 | puts "OK: Good value. U_begin matches with Ufirst of surface." |
43 | } |
44 | |
45 | puts "" |
46 | |
47 | set delta_l [dval U1l_exp-U_end] |
48 | |
49 | #ATTENTION!!! U_end must be strictly equal U1l_exp (without any tolerance) |
50 | if {${delta_l} != 0} { |
51 | puts "Error: Bad value. U_end = [dval U_end], Ulast = [dval U1l_exp]." |
52 | } else { |
53 | puts "OK: Good value. U_end matches with Ulast of surface." |
4e14c88f |
54 | } |
55 | |
56 | puts "" |
57 | puts "Check if tangents in first and last point of line have the same directions" |
58 | |
59 | #See bug#26752 |
60 | cvalue c_1 U1 xx yy zz dx1 dy1 dz1 |
61 | cvalue c_1 U2 xx yy zz dx2 dy2 dz2 |
62 | |
63 | set DP [dval dx1*dx2+dy1*dy2+dz1*dz2] |
64 | if {${DP} < 0} { |
65 | puts "Error: Tangents are reversed. Bug 26752 is reproduced." |
66 | } else { |
67 | puts "OK: Tangents are not reversed." |
68 | } |