X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFiltersPlugin%2FFiltersPlugin_ExternalFaces.cpp;h=51e7f1edd7dfe8dce6ae20f60f114c65e25b34fd;hb=04e2497fc973f0afc95d0a4a6f95e37fb27f45e8;hp=1ad322537f1817e6f6d3a84f7f6130f90b96fa6c;hpb=a47af7109078eea1a585d1f10a176f16ab838b87;p=modules%2Fshaper.git diff --git a/src/FiltersPlugin/FiltersPlugin_ExternalFaces.cpp b/src/FiltersPlugin/FiltersPlugin_ExternalFaces.cpp index 1ad322537..51e7f1edd 100644 --- a/src/FiltersPlugin/FiltersPlugin_ExternalFaces.cpp +++ b/src/FiltersPlugin/FiltersPlugin_ExternalFaces.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -31,11 +31,17 @@ bool FiltersPlugin_ExternalFaces::isSupported(GeomAPI_Shape::ShapeType theType) bool FiltersPlugin_ExternalFaces::isOk(const GeomShapePtr& theShape, const ResultPtr& theResult, - const ModelAPI_FiltersArgs& theArgs) const + const ModelAPI_FiltersArgs& /*theArgs*/) const { if (!theShape->isFace()) return false; + // verify INTERNAL flag + TopoDS_Shape aShape = theShape->impl(); + if (aShape.Orientation() == TopAbs_INTERNAL) + return false; + + // check number of solids containing the face ResultBodyPtr anOwner = ModelAPI_Tools::bodyOwner(theResult, true); if (!anOwner) { anOwner = std::dynamic_pointer_cast(theResult); @@ -47,6 +53,6 @@ bool FiltersPlugin_ExternalFaces::isOk(const GeomShapePtr& theShape, TopTools_IndexedDataMapOfShapeListOfShape aMapFS; TopExp::MapShapesAndUniqueAncestors(anOwnerShape->impl(), TopAbs_FACE, TopAbs_SOLID, aMapFS); - const TopTools_ListOfShape& aSolids = aMapFS.FindFromKey(theShape->impl()); + const TopTools_ListOfShape& aSolids = aMapFS.FindFromKey(aShape); return aSolids.Extent() <= 1; }