From: kgv Date: Mon, 12 Aug 2019 14:47:28 +0000 (+0300) Subject: 0026978: VIS - Interactive selection is insensitive to swept shell X-Git-Tag: V7_4_0_beta~53 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=2546fd477f15c53b39d9c551f8a9aa1214e5618c 0026978: VIS - Interactive selection is insensitive to swept shell IVtkOCC_SelectableObject::BoundingBox(), AIS_Shape::BoundingBox() now don't use BRepBndLib::AddClose() on arbitrary shapes. --- diff --git a/src/AIS/AIS_Shape.cxx b/src/AIS/AIS_Shape.cxx index 35202da2d9..adfd5cc43e 100644 --- a/src/AIS/AIS_Shape.cxx +++ b/src/AIS/AIS_Shape.cxx @@ -793,7 +793,7 @@ const Bnd_Box& AIS_Shape::BoundingBox() } if(myCompBB) { - BRepBndLib::AddClose(myshape, myBB); + BRepBndLib::Add (myshape, myBB, false); myCompBB = Standard_False; } return myBB; diff --git a/src/IVtkOCC/IVtkOCC_SelectableObject.cxx b/src/IVtkOCC/IVtkOCC_SelectableObject.cxx index 6d13ab6edd..99cef26e93 100644 --- a/src/IVtkOCC/IVtkOCC_SelectableObject.cxx +++ b/src/IVtkOCC/IVtkOCC_SelectableObject.cxx @@ -166,8 +166,7 @@ const Bnd_Box& IVtkOCC_SelectableObject::BoundingBox() if (myBndBox.IsVoid()) { - // Add only edges and vertices, in case of troubles this should work anyway - BRepBndLib::AddClose (anOcctShape, myBndBox); + BRepBndLib::Add (anOcctShape, myBndBox, true); } return myBndBox; diff --git a/tests/v3d/ivtk/bug26978 b/tests/v3d/ivtk/bug26978 index 5788bef296..bfcb36c873 100644 --- a/tests/v3d/ivtk/bug26978 +++ b/tests/v3d/ivtk/bug26978 @@ -1,10 +1,7 @@ puts "========" -puts "OCC26978" +puts "0026978: VIS - Interactive selection is insensitive to swept shell" puts "========" puts "" -###################################################### -# Interactive selection is insensitive to swept shell -####################################################### restore [locate_data_file bug26978_evol3.brep] s @@ -16,14 +13,10 @@ set anImg1 ${imagedir}/${test_image}_1.png set anImg2 ${imagedir}/${test_image}_2.png set anImgDiff ${imagedir}/${test_image}_diff.png -set x 75 -set y 200 -ivtkselect $x $y +ivtkselect 75 200 ivtkdump ${anImg1} -set x 150 -set y 150 -ivtkselect $x $y +ivtkselect 150 150 ivtkdump ${anImg2} -diffimage ${anImg2} ${anImg1} 0.0 0 0 ${anImgDiff} +if { [diffimage ${anImg2} ${anImg1} 0.0 0 0 ${anImgDiff}] != 0 } { puts "Error: selection failed" }