Salome HOME
Task #3236: Generalization of extrusion
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_CompositeSketch.cpp
index 466cf712123db71370a4f78a1b405ecbbfa53f2c..bdda2db8ba05a3ad28124df70190086bb83c5533 100644 (file)
@@ -50,6 +50,7 @@ void FeaturesPlugin_CompositeSketch::initCompositeSketchAttribtues(const int the
   // Initialize selection list.
   if(theInitFlags & InitBaseObjectsList) {
     data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
+    myCurrentSelectionType = selectionList(BASE_OBJECTS_ID())->selectionType();
   }
 }
 
@@ -67,7 +68,7 @@ std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::addFeature(std
 }
 
 //=================================================================================================
-int FeaturesPlugin_CompositeSketch::numberOfSubs(bool forTree) const
+int FeaturesPlugin_CompositeSketch::numberOfSubs(bool /*forTree*/) const
 {
   ObjectPtr aObj = data()->reference(SKETCH_ID())->value();
   return aObj.get() ? 1 : 0;
@@ -75,7 +76,7 @@ int FeaturesPlugin_CompositeSketch::numberOfSubs(bool forTree) const
 
 //=================================================================================================
 std::shared_ptr<ModelAPI_Feature> FeaturesPlugin_CompositeSketch::subFeature(const int theIndex,
-                                                                             bool forTree)
+                                                                             bool /*forTree*/)
 {
   FeaturePtr aSubFeature;
   if(theIndex == 0) {
@@ -177,13 +178,10 @@ void FeaturesPlugin_CompositeSketch::storeGenerationHistory(ResultBodyPtr theRes
     case GeomAPI_Shape::COMPOUND: {
       aShapeTypeToExplode = GeomAPI_Shape::COMPOUND;
     }
+    default: // [to avoid compilation warnings]
+      break;
   }
 
-  int aLateralIndex = 1;
-  int aBaseEdgeIndex = 1;
-  int aVertexIndex = 1;
-  int aBaseVertexIndex = 1;
-
   if(aShapeTypeToExplode == GeomAPI_Shape::VERTEX ||
       aShapeTypeToExplode == GeomAPI_Shape::COMPOUND) {
     theResultBody->loadGeneratedShapes(theMakeShape, theBaseShape, GeomAPI_Shape::VERTEX);
@@ -252,6 +250,8 @@ void FeaturesPlugin_CompositeSketch::storeShapes(
       aShapeTypeToExplore = GeomAPI_Shape::COMPOUND;
       break;
     }
+    default: // [to avoid compilation warnings]
+      break;
   }
 
   // Store shapes.