-
-//==================================================================================================
-void FeaturesPlugin_BooleanCut::loadNamingDS(ResultBodyPtr theResultBody,
- const GeomShapePtr theBaseShape,
- const ListOfShape& theTools,
- const GeomShapePtr theResultShape,
- GeomAlgoAPI_MakeShape& theMakeShape,
- GeomAPI_DataMapOfShapeShape& theMapOfShapes,
- const bool theIsStoreAsGenerated)
-{
- //load result
- if(theBaseShape->isEqual(theResultShape)) {
- theResultBody->store(theResultShape, false);
- } else {
- theResultBody->storeModified(theBaseShape, theResultShape, SubsolidsTag);
-
- const std::string aModVName = "Modified_Vertex";
- const std::string aModEName = "Modified_Edge";
- const std::string aModFName = "Modified_Face";
-
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX,
- ModifyVTag, aModVName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::EDGE,
- ModifyETag, aModEName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, theBaseShape, GeomAPI_Shape::FACE,
- ModifyFTag, aModFName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
-
- for (ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++)
- {
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::VERTEX,
- ModifyVTag, aModVName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
-
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::EDGE,
- ModifyETag, aModEName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
-
- theResultBody->loadAndOrientModifiedShapes(&theMakeShape, *anIter, GeomAPI_Shape::FACE,
- ModifyFTag, aModFName, theMapOfShapes, false,
- theIsStoreAsGenerated, true);
- }
- }
-}
-
-//==================================================================================================
-void FeaturesPlugin_BooleanCut::storeDeletedShapes(
- std::vector<ResultBaseAlgo>& theResultBaseAlgoList,
- const ListOfShape& theTools,
- const GeomShapePtr theResultShapesCompound)
-{
- for (std::vector<ResultBaseAlgo>::iterator anIt = theResultBaseAlgoList.begin();
- anIt != theResultBaseAlgoList.end();
- ++anIt)
- {
- ResultBaseAlgo& aRCA = *anIt;
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- aRCA.baseShape,
- GeomAPI_Shape::VERTEX,
- DeletedTag,
- theResultShapesCompound);
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- aRCA.baseShape,
- GeomAPI_Shape::EDGE,
- DeletedTag,
- theResultShapesCompound);
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- aRCA.baseShape,
- GeomAPI_Shape::FACE,
- DeletedTag,
- theResultShapesCompound);
-
- for (ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++)
- {
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- *anIter,
- GeomAPI_Shape::VERTEX,
- DeletedTag,
- theResultShapesCompound);
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- *anIter,
- GeomAPI_Shape::EDGE,
- DeletedTag,
- theResultShapesCompound);
- aRCA.resultBody->loadDeletedShapes(aRCA.makeShape.get(),
- *anIter,
- GeomAPI_Shape::FACE,
- DeletedTag,
- theResultShapesCompound);
- }
- }
-}