Update test cases bugs/moddata_3/bug25892_04-bug25892_12 for issue 25892
[occt.git] / tests / bugs / moddata_3 / bug23863
1 puts "================"
2 puts "OCC23863"
3 puts "================"
4 puts ""
5 #######################################################################
6 # Wrong distance value between circle and cylinder
7 #######################################################################
8
9 pcylinder b1 10 10
10 explode b1 f
11 copy b1_1 b1
12 circle b2 0 10 10 1 0 0 5
13 mkedge b2 b2
14
15 distmini d b1 b2
16
17 regexp {([-0-9.+eE]+)$} [dump d_val] full dist
18 regexp { +Vertex +: +Min +[-0-9.+eE]+ +Max +([-0-9.+eE]+)} [ maxtolerance d ] full toler
19 set good_dist 0
20 if { [expr abs( ${dist} - ${good_dist} )] > ${toler} } {
21     puts "Faulty : the distanse is ${dist}. It is bad value"
22 }
23
24 regexp { +Point 3D : +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [ dump d ] full x y z
25 set good_x 0
26 set good_y 10
27 set good_z 5
28 if { [expr abs( ${x} - ${good_x} )] > ${toler} } {
29     puts "Faulty : the x coordinate of the point is ${x}. It is bad value"
30 }
31 if { [expr abs( ${y} - ${good_y} )] > ${toler} } {
32     puts "Faulty : the y coordinate of the point is ${y}. It is bad value"
33 }
34 if { [expr abs( ${z} - ${good_z} )] > ${toler} } {
35     puts "Faulty : the z coordinate of the point is ${z}. It is bad value"
36 }
37
38 set 2dviewer 1