0024910: Offset of solid is not created
[occt.git] / tests / bugs / modalg_5 / bug24612
1 puts "========="\r
2 puts "OCC24612"\r
3 puts "========="\r
4 puts ""\r
5 ###########################################################\r
6 # Wrong pcurve of the section curve\r
7 ###########################################################\r
8 \r
9 set MaxTol 5.0e-7\r
10 set NbCurv_OK 1\r
11 restore [locate_data_file bug24612_b1.brep] b1\r
12 restore [locate_data_file bug24612_b2.brep] b2\r
13 \r
14 mksurface s1 b1\r
15 bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp\r
16 \r
17 dval U1f_exp\r
18 dval U1l_exp\r
19 dval V1f_exp\r
20 dval V1l_exp\r
21 \r
22 set log [bopcurves b1 b2 -2d]\r
23 \r
24 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv\r
25 \r
26 if {${NbCurv} != ${NbCurv_OK}} {\r
27   puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found."\r
28 }\r
29 \r
30 if {${Toler} > ${MaxTol}} {\r
31   puts "Error: Tolerance is too big!"\r
32 }\r
33 \r
34 #Theoretically, c2d1_1 must cover V-diapason of surface s1 fully.\r
35 \r
36 set log [dump c2d1_1]\r
37 \r
38 regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles\r
39 puts "Degree=${Degree}"\r
40 puts "Poles=${Poles}"\r
41 puts "KnotsPoles=${KnotsPoles}"\r
42 puts ""\r
43 \r
44 set Pole 1\r
45 set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"\r
46 regexp ${exp_string} ${log} full U_begin V_begin\r
47 \r
48 puts "Pole=${Pole}"\r
49 puts "U_begin=${U_begin}"\r
50 puts "V_begin=${V_begin}"\r
51 dset V_begin ${V_begin}\r
52 puts ""\r
53 \r
54 set Pole ${Poles}\r
55 set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"\r
56 regexp ${exp_string} ${log} full U_end V_end\r
57 \r
58 puts "Pole=${Pole}"\r
59 puts "U_end=${U_end}"\r
60 puts "V_end=${V_end}"\r
61 dset V_end ${V_end}\r
62 puts ""\r
63 \r
64 set delta_f [dval V1l_exp-V_begin]\r
65 \r
66 #ATTENTION!!! V_begin must be strictly equal V1l_exp (without any tolerance)\r
67 if {${delta_f} != 0} {\r
68   puts "Error: Bad value. V_begin = [dval V_begin], Vlast = [dval V1l_exp]."\r
69 } else {\r
70   puts "OK: Good value. V_begin matches with Vlast of surface."\r
71 }\r
72 \r
73 puts ""\r
74 \r
75 set delta_l [dval V1f_exp-V_end]\r
76 \r
77 #ATTENTION!!! V_end must be strictly equal V1f_exp (without any tolerance)\r
78 if {${delta_l} != 0} {\r
79   puts "Error: Bad value. V_end = [dval V_end], Vfirst = [dval V1f_exp]."\r
80 } else {\r
81   puts "OK: Good value. V_end matches with Vfirst of surface."\r
82 }\r