0031304: Configuration - TKACIS building failure due to duplicated symbol GeomFillFus...
[occt.git] / tests / bugs / modalg_6 / bug25613_2
1 puts "========="
2 puts "CR25613"
3 puts "========="
4 puts ""
5 ###############################
6 ## Wrong distance found by xdistef command for attached shapes
7 ###############################
8
9 set Tol 1.0e-14
10 set dist_good 0.002371098605239398
11
12 restore [locate_data_file bug22790_f.brep] f
13 nexplode f e
14 copy f_2 e
15 don f e
16
17 set log [xdistef e f]
18
19 regexp {Max Distance = +([-0-9.+eE]+); Parameter on curve = +([-0-9.+eE]+)} ${log} full dist param
20
21 if { [ expr ($dist - $dist_good) ] < -$Tol } {
22   puts "Error in xdistef command (cannot find maximal distance)"
23 }
24
25 if { $dist > $dist_good } {
26 #Check if distance found is correct
27
28   mkcurve c3d e
29   mk2dcurve c2d e f
30   mksurface ss f
31   
32   cvalue c3d $param xx yy zz
33   vertex v1 xx yy zz
34   
35   2dcvalue c2d $param uu vv 
36   svalue ss uu vv xx yy zz
37   vertex v2 xx yy zz
38   
39   distmini dm v1 v2
40   
41   if { [ expr abs([dval dm_val] - $dist) ] > $Tol } {
42     if { [dval dm_val] != $dist } {
43       puts "Error. xdistef has failed when computing (dist_V1V2 =[dval dm_val], FoundDist=$dist)"
44     } else {
45       puts "Error. xdistef command works better than on MASTER. Please set \"dist_good\" value to $dist."
46     }
47   } else {
48     puts "OK: xdistef algorithm works properly"
49   }
50 }