X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_ResultBody.cpp;h=0a291ae486bd13ed486ae86ba8558e60faeec8dd;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=806df516e21668514e1acb4ab1a4b0b9d1da20bb;hpb=86bc0800fb01a81cebe88ec6c0be1854e612207e;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_ResultBody.cpp b/src/ModelAPI/ModelAPI_ResultBody.cpp index 806df516e..0a291ae48 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.cpp +++ b/src/ModelAPI/ModelAPI_ResultBody.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,10 +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 "ModelAPI_ResultBody.h" @@ -67,6 +66,21 @@ void ModelAPI_ResultBody::storeGenerated(const GeomShapePtr& theFromShape, updateSubs(theToShape); } +void ModelAPI_ResultBody::storeGenerated( + const std::list& theFromShapes, const GeomShapePtr& theToShape, + const std::shared_ptr theMakeShape) +{ + myBuilder->storeGenerated(theFromShapes, theToShape, theMakeShape); + myConnect = ConnectionNotComputed; + + static Events_Loop* aLoop = Events_Loop::loop(); + static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY); + static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get(); + aECreator->sendUpdated(data()->owner(), aRedispEvent); + + updateSubs(theToShape, theFromShapes, theMakeShape, true); +} + void ModelAPI_ResultBody::storeModified(const GeomShapePtr& theOldShape, const GeomShapePtr& theNewShape, const bool theIsCleanStored) @@ -82,15 +96,19 @@ void ModelAPI_ResultBody::storeModified(const GeomShapePtr& theOldShape, updateSubs(theNewShape); } -void ModelAPI_ResultBody::storeWithoutNaming(const GeomShapePtr& theShape) +void ModelAPI_ResultBody::storeModified( + const std::list& theOldShapes, const GeomShapePtr& theNewShape, + const std::shared_ptr theMakeShape) { - myBuilder->storeWithoutNaming(theShape); + myBuilder->storeModified(theOldShapes, theNewShape, theMakeShape); myConnect = ConnectionNotComputed; static Events_Loop* aLoop = Events_Loop::loop(); static Events_ID aRedispEvent = aLoop->eventByName(EVENT_OBJECT_TO_REDISPLAY); static const ModelAPI_EventCreator* aECreator = ModelAPI_EventCreator::get(); aECreator->sendUpdated(data()->owner(), aRedispEvent); + + updateSubs(theNewShape, theOldShapes, theMakeShape, false); } GeomShapePtr ModelAPI_ResultBody::shape() @@ -98,12 +116,6 @@ GeomShapePtr ModelAPI_ResultBody::shape() return myBuilder->shape(); } -void ModelAPI_ResultBody::generated(const GeomShapePtr& theNewShape, - const std::string& theName) -{ - myBuilder->generated(theNewShape, theName); -} - void ModelAPI_ResultBody::generated(const GeomShapePtr& theOldShape, const GeomShapePtr& theNewShape, const std::string& theName) @@ -119,11 +131,6 @@ void ModelAPI_ResultBody::modified(const GeomShapePtr& theOldShape, } -void ModelAPI_ResultBody::deleted(const GeomShapePtr& theOldShape) -{ - myBuilder->deleted(theOldShape); -} - void ModelAPI_ResultBody::loadDeletedShapes(const GeomMakeShapePtr& theAlgo, const GeomShapePtr& theOldShape, const GeomAPI_Shape::ShapeType theShapeTypeToExplore, @@ -132,40 +139,7 @@ void ModelAPI_ResultBody::loadDeletedShapes(const GeomMakeShapePtr& theAlgo, myBuilder->loadDeletedShapes(theAlgo, theOldShape, theShapeTypeToExplore, theShapesToExclude); } -void ModelAPI_ResultBody::loadModifiedShapes(const GeomMakeShapePtr& theAlgo, - const GeomShapePtr& theOldShape, - const GeomAPI_Shape::ShapeType theShapeTypeToExplore, - const std::string& theName) -{ - myBuilder->loadModifiedShapes(theAlgo, theOldShape, theShapeTypeToExplore, theName); -} - -void ModelAPI_ResultBody::loadGeneratedShapes(const GeomMakeShapePtr& theAlgo, - const GeomShapePtr& theOldShape, - const GeomAPI_Shape::ShapeType theShapeTypeToExplore, - const std::string& theName) -{ - myBuilder->loadGeneratedShapes(theAlgo, theOldShape, theShapeTypeToExplore, theName); -} - -void ModelAPI_ResultBody::loadFirstLevel(GeomShapePtr theShape, - const std::string& theName) -{ - myBuilder->loadFirstLevel(theShape, theName); -} - -void ModelAPI_ResultBody::loadDisconnectedEdges(GeomShapePtr theShape, - const std::string& theName) -{ - myBuilder->loadDisconnectedEdges(theShape, theName); -} - -void ModelAPI_ResultBody::loadDisconnectedVertexes(GeomShapePtr theShape, - const std::string& theName) -{ - myBuilder->loadDisconnectedVertexes(theShape, theName); -} - +// LCOV_EXCL_START bool ModelAPI_ResultBody::isConnectedTopology() { if (myConnect == ConnectionNotComputed) { @@ -180,3 +154,4 @@ void ModelAPI_ResultBody::setDisplayed(const bool theDisplay) for (int i = 0; i < numberOfSubs(); i++) subResult(i)->setDisplayed(theDisplay); } +// LCOV_EXCL_STOP