-// 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);
}
-void ModelAPI_ResultBody::storeWithoutNaming(const GeomShapePtr& theShape)
+void ModelAPI_ResultBody::storeModified(
+ const std::list<GeomShapePtr>& theOldShapes, const GeomShapePtr& theNewShape,
+ const std::shared_ptr<GeomAlgoAPI_MakeShape> 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()
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)
}
-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,
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::loadAndOrientGeneratedShapes(GeomAlgoAPI_MakeShape* theMS,
- GeomShapePtr theShapeIn,
- const int theKindOfShape,
- const int theTag,
- const std::string& theName,
- GeomAPI_DataMapOfShapeShape& theSubShapes)
-{
- myBuilder->loadAndOrientGeneratedShapes(
- theMS, theShapeIn, theKindOfShape, theTag, theName, theSubShapes);
-}
-
-void ModelAPI_ResultBody::loadFirstLevel(GeomShapePtr theShape,
- const std::string& theName,
- int& theTag)
-{
- myBuilder->loadFirstLevel(theShape, theName, theTag);
-}
-
-void ModelAPI_ResultBody::loadDisconnectedEdges(GeomShapePtr theShape,
- const std::string& theName,
- int& theTag)
-{
- myBuilder->loadDisconnectedEdges(theShape, theName, theTag);
-}
-
-void ModelAPI_ResultBody::loadDisconnectedVertexes(GeomShapePtr theShape,
- const std::string& theName,
- int& theTag)
-{
- myBuilder->loadDisconnectedVertexes(theShape, theName, theTag);
-}
-
+// LCOV_EXCL_START
bool ModelAPI_ResultBody::isConnectedTopology()
{
if (myConnect == ConnectionNotComputed) {
for (int i = 0; i < numberOfSubs(); i++)
subResult(i)->setDisplayed(theDisplay);
}
+// LCOV_EXCL_STOP