-// Copyright (C) 2014-2017 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
//
// 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<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "ModelAPI_ResultBody.h"
updateSubs(theToShape);
}
+void ModelAPI_ResultBody::storeGenerated(
+ const std::list<GeomShapePtr>& theFromShapes, const GeomShapePtr& theToShape,
+ const std::shared_ptr<GeomAlgoAPI_MakeShape> 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)
updateSubs(theNewShape);
}
-GeomShapePtr ModelAPI_ResultBody::shape()
+void ModelAPI_ResultBody::storeModified(
+ const std::list<GeomShapePtr>& theOldShapes, const GeomShapePtr& theNewShape,
+ const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape)
{
- return myBuilder->shape();
+ 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);
}
-bool ModelAPI_ResultBody::generated(const GeomShapePtr& theNewShape,
- const std::string& theName, const bool theCheckIsInResult)
+GeomShapePtr ModelAPI_ResultBody::shape()
{
- return myBuilder->generated(theNewShape, theName, theCheckIsInResult);
+ return myBuilder->shape();
}
void ModelAPI_ResultBody::generated(const GeomShapePtr& theOldShape,
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);
-}
-
+// LCOV_EXCL_START
bool ModelAPI_ResultBody::isConnectedTopology()
{
if (myConnect == ConnectionNotComputed) {
for (int i = 0; i < numberOfSubs(); i++)
subResult(i)->setDisplayed(theDisplay);
}
+// LCOV_EXCL_STOP