0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger()
[occt.git] / tests / bugs / vis / bug29938
1 puts "============"
2 puts "0029938: Visualization - SelectMgr_ViewerSelector::PickedPoint() should return point lying on an object"
3 puts "============"
4 puts ""
5
6 pload MODELING VISUALIZATION
7 box b 1 2 3
8 vcaps -core
9 vclear
10 vinit View1
11 vaxo
12 vdisplay -dispMode 1 -mutable b
13 vfit
14 vrotate 0.2 0.0 0.0
15 vselmode 0 off
16
17 #Check Vertex selection mode case
18 vselmode 1 on
19 vmoveto 337 45
20 set pnt "1 2 3"
21 set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
22 set match [regexp -all -inline $exp [vstate -entities]]
23 foreach {_ x y z} $match {
24   if {$pnt != "$x $y $z"} {
25     puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
26 }
27
28 #Check Wire selection mode case
29 vselmode 1 off
30 vselmode 2 on
31 vmoveto 295 317
32 set pnt "1 2 0"
33 set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
34 set match [regexp -all -inline $exp [vstate -entities]]
35 foreach {_ x y z} $match {
36   if {$pnt != "$x $y $z"} {
37     puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
38 }
39
40 #Check Face selection mode case
41 vselmode 2 off
42 vselmode 4 on
43 vmoveto 284 324
44 set pnt "1 1.8383 0"
45 set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
46 set match [regexp -all -inline $exp [vstate -entities]]
47 foreach {_ x y z} $match {
48   if {$pnt != "$x $y $z"} {
49     puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
50 }