-
-//=================================================================================================
-void FeaturesPlugin_Intersection::loadNamingDS(ResultBodyPtr theResultBody,
- const ListOfShape& theObjects,
- const GeomMakeShapePtr& theMakeShape)
-{
- std::shared_ptr<GeomAPI_Shape> aResultShape = theMakeShape->shape();
-
- if(theObjects.front()->isEqual(aResultShape)) {
- theResultBody->store(aResultShape, false);
- return;
- }
-
- theResultBody->storeModified(theObjects, aResultShape, theMakeShape);
-
- const int aShapeTypesNb = 3;
- const GeomAPI_Shape::ShapeType aShapeTypes[aShapeTypesNb] = {GeomAPI_Shape::VERTEX,
- GeomAPI_Shape::EDGE,
- GeomAPI_Shape::FACE };
- for (ListOfShape::const_iterator anIt = theObjects.cbegin(); anIt != theObjects.cend(); ++anIt) {
- const GeomShapePtr aShape = *anIt;
- for(int anIndex = 0; anIndex < aShapeTypesNb; ++anIndex) {
- theResultBody->loadModifiedShapes(theMakeShape, aShape, aShapeTypes[anIndex]);
- theResultBody->loadGeneratedShapes(theMakeShape, aShape, aShapeTypes[anIndex]);
- }
- }
-}