mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0027530: Visualization - AIS_InteractiveContext::HilightNextDetected() doesn't work in Neutral Point
- added implementation of mentioned methods for neutral point; - sequence of detected objects was replaced by sequence of detected owner's indexes in AIS_InteractiveContext; - commands vselnext and vselprev were corrected to update viewer properly; - test case for issue #27530.
This commit is contained in:
@@ -4,16 +4,63 @@ puts "Test case check work of the new commands vselnext and vselprev"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
proc check_highlighting { theEdgeIdx theCoords } {
|
||||
set aNext [expr ($theEdgeIdx + 1) % 3]
|
||||
set aNextNext [expr ($theEdgeIdx + 2) % 3]
|
||||
set hiColor [vreadpixel [lindex $theCoords [expr $theEdgeIdx * 2] ] [lindex $theCoords [expr $theEdgeIdx * 2 + 1] ] name]
|
||||
set nextColor [vreadpixel [lindex $theCoords [expr $aNext * 2] ] [lindex $theCoords [expr $aNext * 2 + 1] ] name]
|
||||
set nextNextColor [vreadpixel [lindex $theCoords [expr $aNextNext * 2] ] [lindex $theCoords [expr $aNextNext * 2 + 1] ] name]
|
||||
|
||||
if {$hiColor == "CYAN1 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
set coords { }
|
||||
# e10_x, e10_y
|
||||
lappend coords 94
|
||||
lappend coords 140
|
||||
# e2_x, e2_y
|
||||
lappend coords 103
|
||||
lappend coords 60
|
||||
# e1_x, e1_y
|
||||
lappend coords 29
|
||||
lappend coords 208
|
||||
|
||||
box b 10 10 10
|
||||
vdisplay b
|
||||
vfit
|
||||
vselmode 2 1
|
||||
vmoveto 30 101
|
||||
|
||||
if { ![check_highlighting 0 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 10"
|
||||
}
|
||||
|
||||
vselnext
|
||||
if { ![check_highlighting 1 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 2 after vselnext call"
|
||||
}
|
||||
vselnext
|
||||
if { ![check_highlighting 2 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 1 after vselnext call"
|
||||
}
|
||||
vselnext
|
||||
if { ![check_highlighting 0 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 10 after vselnext call"
|
||||
}
|
||||
|
||||
vselprev
|
||||
if { ![check_highlighting 2 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 1 after vselprev call"
|
||||
}
|
||||
vselprev
|
||||
if { ![check_highlighting 1 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 2 after vselprev call"
|
||||
}
|
||||
vselprev
|
||||
if { ![check_highlighting 0 $coords] } {
|
||||
puts "ERROR: incorrect highlighting of edge 10 after vselprev call"
|
||||
}
|
||||
|
Reference in New Issue
Block a user