From: mzn Date: Tue, 31 Jul 2018 14:00:27 +0000 (+0300) Subject: Get rid of deprecated OCCT methods. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a974a18351ca052a2c63d8b19308cd3dcbad5f29;p=modules%2Fshaper.git Get rid of deprecated OCCT methods. --- diff --git a/src/GeomAPI/GeomAPI_Face.cpp b/src/GeomAPI/GeomAPI_Face.cpp index 1541f26bc..49e6db870 100644 --- a/src/GeomAPI/GeomAPI_Face.cpp +++ b/src/GeomAPI/GeomAPI_Face.cpp @@ -82,9 +82,9 @@ bool GeomAPI_Face::isEqual(std::shared_ptr theFace) const return false; Handle(IntTools_Context) aContext = new IntTools_Context(); - // Double check needed bacause BOPTools_AlgoTools::CheckSameGeom not very smart. - Standard_Boolean aRes = BOPTools_AlgoTools::CheckSameGeom(aMyFace, aInFace, aContext) - && BOPTools_AlgoTools::CheckSameGeom(aInFace, aMyFace, aContext); + // Double check needed because BOPTools_AlgoTools::AreFacesSameDomain not very smart. + Standard_Boolean aRes = BOPTools_AlgoTools::AreFacesSameDomain(aMyFace, aInFace, aContext) + && BOPTools_AlgoTools::AreFacesSameDomain(aInFace, aMyFace, aContext); return aRes == Standard_True; } diff --git a/src/ModuleBase/ModuleBase_ResultPrs.cpp b/src/ModuleBase/ModuleBase_ResultPrs.cpp index 1646edc0d..c02a3e767 100755 --- a/src/ModuleBase/ModuleBase_ResultPrs.cpp +++ b/src/ModuleBase/ModuleBase_ResultPrs.cpp @@ -371,9 +371,12 @@ void ModuleBase_ResultPrs::ComputeSelection(const Handle(SelectMgr_Selection)& a AIS_Shape::ComputeSelection(aSelection, theMode); if (myAdditionalSelectionPriority > 0) { - for (aSelection->Init(); aSelection->More(); aSelection->Next()) { - Handle(SelectBasics_EntityOwner) aBasicsOwner = - aSelection->Sensitive()->BaseSensitive()->OwnerId(); + NCollection_Vector anEntities = aSelection->Entities(); + for (NCollection_Vector::Iterator anIt(anEntities); + anIt.More(); + anIt.Next()) { + Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value(); + Handle(SelectBasics_EntityOwner) aBasicsOwner = anEntity->BaseSensitive()->OwnerId(); if (!aBasicsOwner.IsNull()) aBasicsOwner->Set(aBasicsOwner->Priority() + myAdditionalSelectionPriority); } @@ -397,12 +400,18 @@ bool ModuleBase_ResultPrs::appendVertexSelection(const Handle(SelectMgr_Selectio StdSelect_BRepSelectionTool::ComputeSensitive(aShape, aOwner, aSelection, aDeflection, myDrawer->HLRAngle(), 9, 500); - for (aSelection->Init(); aSelection->More(); aSelection->Next()) { + + NCollection_Vector anEntities = aSelection->Entities(); + for (NCollection_Vector::Iterator anIt(anEntities); + anIt.More(); + anIt.Next()) { + Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value(); Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner) - ::DownCast(aSelection->Sensitive()->BaseSensitive()->OwnerId()); + ::DownCast(anEntity->BaseSensitive()->OwnerId()); anOwner->Set(this); } + return true; } return false; diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index ed54a60a2..ed58a97da 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -374,11 +374,14 @@ void XGUI_Selection::entityOwners(const Handle(AIS_InteractiveObject)& theObject continue; Handle(SelectMgr_Selection) aSelection = theObject->Selection(aMode); - for (aSelection->Init(); aSelection->More(); aSelection->Next()) { - Handle(SelectMgr_SensitiveEntity) anEntity = aSelection->Sensitive(); + NCollection_Vector anEntities = aSelection->Entities(); + for (NCollection_Vector::Iterator anIt(anEntities); + anIt.More(); + anIt.Next()) { + Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value(); if (anEntity.IsNull()) continue; - Handle(SelectMgr_EntityOwner) anOwner = + Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast(anEntity->BaseSensitive()->OwnerId()); if (!anOwner.IsNull()) theOwners.Add(anOwner);