1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0029938: Visualization - SelectMgr_ViewerSelector::PickedPoint() should return point lying on an object

Extended SelectBasics_PickResult structure by myObjPickedPnt field, which contained the value of the 3d point on the selected object.
Changed all Overlaps methods. Parameter theDepth replaced on object of the structure SelectBasics_PickResult. This approach will be able to add new fields to SelectBasics_PickResult structure without big changes in modules which contained Overlaps method.
This commit is contained in:
mnv
2018-07-23 15:08:01 +03:00
committed by bugmaster
parent c348746059
commit 170175554f
39 changed files with 365 additions and 309 deletions

50
tests/bugs/vis/bug29938 Normal file
View File

@@ -0,0 +1,50 @@
puts "============"
puts "0029938: Visualization - SelectMgr_ViewerSelector::PickedPoint() should return point lying on an object"
puts "============"
puts ""
pload MODELING VISUALIZATION
box b 1 2 3
vcaps -core
vclear
vinit View1
vaxo
vdisplay -dispMode 1 -mutable b
vfit
vrotate 0.2 0.0 0.0
vselmode 0 off
#Check Vertex selection mode case
vselmode 1 on
vmoveto 337 45
set pnt "1 2 3"
set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
set match [regexp -all -inline $exp [vstate -entities]]
foreach {_ x y z} $match {
if {$pnt != "$x $y $z"} {
puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
}
#Check Wire selection mode case
vselmode 1 off
vselmode 2 on
vmoveto 295 317
set pnt "1 2 0"
set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
set match [regexp -all -inline $exp [vstate -entities]]
foreach {_ x y z} $match {
if {$pnt != "$x $y $z"} {
puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
}
#Check Face selection mode case
vselmode 2 off
vselmode 4 on
vmoveto 284 324
set pnt "1 1.8383 0"
set exp {Point: ([-0-9.+eE]+) ([-0-9.+eE]+) ([-0-9.+eE]+)}
set match [regexp -all -inline $exp [vstate -entities]]
foreach {_ x y z} $match {
if {$pnt != "$x $y $z"} {
puts "Error: Calculate point ($x $y $z) is not equal to target ($pnt)" }
}