0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / vselect / edge / A10
... / ...
CommitLineData
1puts "============"
2puts "CR25436"
3puts "Test case check work of the new commands vselnext and vselprev"
4puts "============"
5puts ""
6
7proc check_highlighting { theEdgeIdx theCoords } {
8 set aNext [expr ($theEdgeIdx + 1) % 3]
9 set aNextNext [expr ($theEdgeIdx + 2) % 3]
10 set hiColor [vreadpixel [lindex $theCoords [expr $theEdgeIdx * 2] ] [lindex $theCoords [expr $theEdgeIdx * 2 + 1] ] name]
11 set nextColor [vreadpixel [lindex $theCoords [expr $aNext * 2] ] [lindex $theCoords [expr $aNext * 2 + 1] ] name]
12 set nextNextColor [vreadpixel [lindex $theCoords [expr $aNextNext * 2] ] [lindex $theCoords [expr $aNextNext * 2 + 1] ] name]
13
14 if {$hiColor == "CYAN 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} {
15 return true
16 } else {
17 return false
18 }
19}
20
21set coords { }
22# e10_x, e10_y
23lappend coords 94
24lappend coords 140
25# e2_x, e2_y
26lappend coords 103
27lappend coords 60
28# e1_x, e1_y
29lappend coords 29
30lappend coords 208
31
32box b 10 10 10
33vdisplay b
34vfit
35vselmode 2 1
36vmoveto 30 101
37
38if { ![check_highlighting 0 $coords] } {
39 puts "ERROR: incorrect highlighting of edge 10"
40}
41
42vselnext
43if { ![check_highlighting 1 $coords] } {
44 puts "ERROR: incorrect highlighting of edge 2 after vselnext call"
45}
46vselnext
47if { ![check_highlighting 2 $coords] } {
48 puts "ERROR: incorrect highlighting of edge 1 after vselnext call"
49}
50vselnext
51if { ![check_highlighting 0 $coords] } {
52 puts "ERROR: incorrect highlighting of edge 10 after vselnext call"
53}
54
55vselprev
56if { ![check_highlighting 2 $coords] } {
57 puts "ERROR: incorrect highlighting of edge 1 after vselprev call"
58}
59vselprev
60if { ![check_highlighting 1 $coords] } {
61 puts "ERROR: incorrect highlighting of edge 2 after vselprev call"
62}
63vselprev
64if { ![check_highlighting 0 $coords] } {
65 puts "ERROR: incorrect highlighting of edge 10 after vselprev call"
66}