0031221: Visualization - selection filter in context
[occt.git] / tests / bugs / vis / bug27477
CommitLineData
7d46a9ed 1puts "============"
2puts "OCC27477"
3puts "============"
4puts ""
5####################################################################################
6# Visualization - Select3D_SensitiveCircle always return infinite depth value in boundary mode
7####################################################################################
8
9proc check_output {theInfo} {
10 set aSize [llength $theInfo]
11 for {set i 0} {$i < $aSize} {incr i} {
12 if {[string equal [lindex $theInfo $i] "Depth:"]} {
13 set aDepth [lindex $theInfo [expr $i + 1]]
949c9b7f 14 if {[string equal $aDepth "17.5691"]} {
7d46a9ed 15 return 1
16 } else {
17 return $aDepth
18 }
19 }
20 }
21
22 return 0
23}
24
25pload VISUALIZATION
26
27vinit View1
28vpoint radP1 0 0 0
29vpoint radP2 50 50 0
30vpoint radP3 100 0 0
31vcircle circle radP1 radP2 radP3 0
32vfit
33
34vmoveto 177 285
35set anOut [split [vstate -entities] "\n"]
36set anInfo [split [lindex $anOut 1] " "]
37set aResult [check_output $anInfo]
38if {$aResult == 1} {
39 puts "OK"
40 } else {
949c9b7f 41 puts "ERROR: the depth value is incorrect: should be 17.5691, but is equal to:"
7d46a9ed 42 puts $aResult
43 }
44
45set only_screen 1