From: Nicolas Rechatin Date: Thu, 7 Apr 2022 12:52:54 +0000 (+0200) Subject: Lot2 : Shared Faces integration review fixes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=debab249cab0ea7751ebb82a470b4af3190a0caa;p=modules%2Fshaper.git Lot2 : Shared Faces integration review fixes --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.cpp index 354452e23..e361a3b95 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.cpp @@ -69,8 +69,6 @@ void FeaturesPlugin_CommonSharedFaces::updateFaces() ListOfShape::const_iterator anIt = aFaces.cbegin(); for(; anIt != aFaces.cend(); ++anIt) { GeomShapePtr aFacePtr = *anIt; - if (!aFacePtr.get()) - setError("GetSharedFaces : An invalid face found " + anError); aFacesListAttr->append( aCompSolidAttr->context(), aFacePtr); } std::stringstream aLabel; diff --git a/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.h b/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.h index dead172f8..2f134aad2 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.h +++ b/src/FeaturesPlugin/FeaturesPlugin_CommonSharedFaces.h @@ -26,10 +26,6 @@ #include #include -#include -#include - - /// \class FeaturesPlugin_CommonSharedFaces /// \ingroup Plugins /// \brief Feature to check the shared faces of solid diff --git a/src/FeaturesPlugin/FeaturesPlugin_GroupSharedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_GroupSharedFaces.cpp index 258085a59..033512130 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_GroupSharedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_GroupSharedFaces.cpp @@ -31,11 +31,6 @@ #include #include -#include - -#include -#include - #include //================================================================================================= diff --git a/src/FeaturesPlugin/FeaturesPlugin_SharedFaces.cpp b/src/FeaturesPlugin/FeaturesPlugin_SharedFaces.cpp index fa9f441ab..78952756b 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_SharedFaces.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_SharedFaces.cpp @@ -33,12 +33,6 @@ #include #include -#include - -#include -#include -#include - //================================================================================================= FeaturesPlugin_SharedFaces::FeaturesPlugin_SharedFaces() { diff --git a/src/FeaturesPlugin/plugin-Features.xml b/src/FeaturesPlugin/plugin-Features.xml index 32d26c443..12fdc52ae 100644 --- a/src/FeaturesPlugin/plugin-Features.xml +++ b/src/FeaturesPlugin/plugin-Features.xml @@ -134,7 +134,7 @@ + icon="icons/Features/fusion_faces.png" auto_preview="true" helpfile="fusionFacesFeature.html"> - diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.cpp index 2792421df..073c542d3 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.cpp @@ -69,8 +69,7 @@ bool GetSharedFaces(const ListOfShape& theShapes, #ifdef _DEBUG std::cout << "GetSharedFaces " << std::endl; #endif - int aLen = theShapes.size(); - if (aLen < 1) return NULL; + if (theShapes.empty()) return false; TopAbs_ShapeEnum aShapeType = TopAbs_FACE; diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.h b/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.h index 5c3ba1fdc..4ae19191d 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SharedFaces.h @@ -23,9 +23,7 @@ #include #include -#include - -/// get the boundin box of theshape. +/// get the object shared faces /// \param theShape the shape /// \param theTolerance precise TRUE for precise computation; FALSE for fast one. /// \param theFaces the faces shared