]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp
Salome HOME
Bug #1748: Naming incorrect for edges after translation
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Rotation.cpp
index 1b8938544e2f927e467decd38a936e58dc347fab..f7768c40502400b3feb2a81d020cfd7942656c28 100755 (executable)
@@ -125,8 +125,23 @@ void FeaturesPlugin_Rotation::loadNamingDS(GeomAlgoAPI_Rotation& theRotaionAlgo,
 
   int aRotatedTag = 1;
   std::string aRotatedName = "Rotated";
-  theResultBody->loadAndOrientModifiedShapes(&theRotaionAlgo,
-                                             theBaseShape, GeomAPI_Shape::FACE,
-                                             aRotatedTag, aRotatedName, *aSubShapes.get());
 
+  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());
+  }
 }