0033017: Implement an algorithm to find a proximity between a pair of shapes
[occt.git] / tests / lowalgos / proximity / A3
1 puts "============"
2 puts "0033017: Implement an algorithm to find a proximity between a pair of shapes"
3 puts "==========="
4 puts ""
5
6 circle c1 0 -1 0 1 0 0 1
7 trim c1 c1 -pi 0
8 mkedge e1 c1
9 incmesh e1 1.e-3
10
11 circle c2 0 1 0 1 0 0 1
12 trim c2 c2 0 pi
13 mkedge e2 c2
14 incmesh e2 1.e-3
15
16 set log [proximity e1 e2 -value -profile]
17 regexp {Proximity value: ([0-9+-.eE]*)} $log full val;
18
19 set tol 1.e-3
20 set expected [expr {sqrt(5.0) - 1.}]
21
22 regexp {Status of ProxPnt1 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2
23 set status1 ${val2}
24 set expected_status1 Middle
25
26 regexp {Status of ProxPnt2 on ([A-Za-z0-9._-]*) : ([A-Za-z]*)} $log full val1 val2
27 set status2 ${val2}
28 set expected_status2 Border