X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Sewing.cpp;h=24fc81624b9355d7731cbc1a18da1af01c54a269;hb=2cb4458b35ae6c9561a35b3b18dbdb673d0c12c9;hp=24ed0ad6586f5a2628f21f307eda5a078cb8a1b1;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp index 24ed0ad65..24fc81624 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Sewing.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 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 @@ -12,9 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "GeomAlgoAPI_Sewing.h" @@ -79,6 +79,8 @@ void GeomAlgoAPI_Sewing::build(const ListOfShape& theShapes) } //================================================================================================== +#include + void GeomAlgoAPI_Sewing::modified(const std::shared_ptr theShape, ListOfShape& theHistory) { @@ -100,4 +102,21 @@ void GeomAlgoAPI_Sewing::modified(const std::shared_ptr theShape, aGeomShape->setImpl(new TopoDS_Shape(anExp.Current())); theHistory.push_back(aGeomShape); } + + if (theShape->shapeType() < GeomAPI_Shape::FACE) { + ListOfShape aNewShapes; + // collect faces and parent shapes, if it is not done yet + if (!isNewShapesCollected(theShape, GeomAPI_Shape::FACE)) + collectNewShapes(theShape, GeomAPI_Shape::FACE); + + for (GeomAPI_ShapeIterator anIt(shape()); anIt.more(); anIt.next()) { + GeomShapePtr anOldShapesCompound = + oldShapesForNew(theShape, anIt.current(), GeomAPI_Shape::FACE); + if (!anOldShapesCompound->isNull()) + aNewShapes.push_back(anIt.current()); + } + + if (!aNewShapes.empty()) + theHistory = aNewShapes; + } }