X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FSelect3D%2FSelect3D_SensitiveCircle.cxx;h=3048abc41a5ccc6ee794d7346ab705c83914e4d2;hb=170175554f5aa01b790e66d00b637f44dc562cd6;hpb=c348746059c30939abd0b60c2f061c9ed8dcef2d diff --git a/src/Select3D/Select3D_SensitiveCircle.cxx b/src/Select3D/Select3D_SensitiveCircle.cxx index 06829501cc..3048abc41a 100644 --- a/src/Select3D/Select3D_SensitiveCircle.cxx +++ b/src/Select3D/Select3D_SensitiveCircle.cxx @@ -238,14 +238,10 @@ void Select3D_SensitiveCircle::BVH() Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) { - Standard_Real aDepth = RealLast(); - Standard_Real aDistToCOG = RealLast(); - if (mySensType == Select3D_TOS_BOUNDARY) { if (!Select3D_SensitivePoly::Matches (theMgr, thePickResult)) { - thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG); return Standard_False; } } @@ -255,24 +251,21 @@ Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolume Points3D (anArrayOfPnt); if (!theMgr.IsOverlapAllowed()) { - thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG); for (Standard_Integer aPntIdx = anArrayOfPnt->Lower(); aPntIdx <= anArrayOfPnt->Upper(); ++aPntIdx) { - if (!theMgr.Overlaps (anArrayOfPnt->Value (aPntIdx))) + if (!theMgr.Overlaps (anArrayOfPnt->Value(aPntIdx))) + { return Standard_False; + } } return Standard_True; } - if (!theMgr.Overlaps (anArrayOfPnt, Select3D_TOS_INTERIOR, aDepth)) + if (!theMgr.Overlaps (anArrayOfPnt, Select3D_TOS_INTERIOR, thePickResult)) { - thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG); return Standard_False; } - else - { - thePickResult = SelectBasics_PickResult (aDepth, theMgr.DistToGeometryCenter (myCenter3D)); - } + thePickResult.SetDistToGeomCenter(distanceToCOG(theMgr)); } return Standard_True;