X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Rotation.cpp;h=9ba830b83b603144021b4cbe62eee553cd8b3cc6;hb=8f060aedd5949990421a96e3b4086f43efa13d24;hp=1e0dd3c29a45ad8c5e1fd5deb3f20725b5a753ab;hpb=423c10234142d14d0d5de89383f2f96a4ec5930f;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp b/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp index 1e0dd3c29..9ba830b83 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp @@ -14,6 +14,8 @@ #include #include +#include + //================================================================================================= FeaturesPlugin_Rotation::FeaturesPlugin_Rotation() { @@ -126,27 +128,11 @@ void FeaturesPlugin_Rotation::loadNamingDS(GeomAlgoAPI_Rotation& theRotaionAlgo, // Store result. theResultBody->storeModified(theBaseShape, theRotaionAlgo.shape()); - std::shared_ptr aSubShapes = theRotaionAlgo.mapOfSubShapes(); - int aRotatedTag = 1; std::string aRotatedName = "Rotated"; + std::shared_ptr aSubShapes = theRotaionAlgo.mapOfSubShapes(); - switch(theBaseShape->shapeType()) { - case GeomAPI_Shape::COMPOUND: - case GeomAPI_Shape::COMPSOLID: - case GeomAPI_Shape::SOLID: - case GeomAPI_Shape::SHELL: - theResultBody->loadAndOrientModifiedShapes(&theRotaionAlgo, - theBaseShape, GeomAPI_Shape::FACE, - aRotatedTag, aRotatedName + "_Face", *aSubShapes.get()); - case GeomAPI_Shape::FACE: - case GeomAPI_Shape::WIRE: - theResultBody->loadAndOrientModifiedShapes(&theRotaionAlgo, - theBaseShape, GeomAPI_Shape::EDGE, - ++aRotatedTag, aRotatedName + "_Edge", *aSubShapes.get()); - case GeomAPI_Shape::EDGE: - theResultBody->loadAndOrientModifiedShapes(&theRotaionAlgo, - theBaseShape, GeomAPI_Shape::VERTEX, - ++aRotatedTag, aRotatedName + "_Vertex", *aSubShapes.get()); - } + FeaturesPlugin_Tools::storeModifiedShapes(theRotaionAlgo, theResultBody, + theBaseShape, aRotatedTag, aRotatedName, + *aSubShapes.get()); }