]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetValidated.cpp
Salome HOME
updated copyright message
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetValidated.cpp
index a02d2589e08de96e083933c1593be234176e2c9a..c9695948935874cd0a2828b200b479f90c1da630 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <ModelAPI_Tools.h>
 #include <ModelAPI_AttributeSelection.h>
 
-#include <BuildPlugin_Face.h>
-#include <BuildPlugin_Wire.h>
-#include <BuildPlugin_Solid.h>
-
 #include <SelectMgr_ListIteratorOfListOfFilter.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <StdSelect_BRepOwner.hxx>
@@ -484,59 +480,6 @@ QList<ModuleBase_ViewerPrsPtr> ModuleBase_WidgetValidated::getFilteredSelected()
 
   filterCompSolids(aSelected);
 
-  if (myFeatureId == BuildPlugin_Face::ID() || myFeatureId == BuildPlugin_Wire::ID() ||
-      myFeatureId == BuildPlugin_Solid::ID())
-  {
-    /// remove objects of sub-type if ojects of correct type is in List,  in some cases :
-    /// - Face builder: edges, faces and wires selected
-    ///                 --> remove edges and wires
-    /// Wire builder: wires and edges selected
-    ///               --> remove egdes
-    /// Solid builder: faces and shapes shells or solids seleted
-    ///                --> remove faces
-
-    std::set<GeomAPI_Shape::ShapeType> shapeTypes;
-    for (auto aSelection: aSelected){
-      auto aShape = aSelection->shape();
-      if (aShape)
-        shapeTypes.insert(aShape->shapeType());
-    }
-
-    std::vector<ModuleBase_ViewerPrsPtr> aRemove;
-
-    if (myFeatureId == BuildPlugin_Face::ID() && shapeTypes.find(GeomAPI_Shape::FACE) != shapeTypes.end())
-    {
-      for(auto aSelection: aSelected){
-        auto aType = aSelection->shape()->shapeType();
-        if (aType == GeomAPI_Shape::WIRE || aType == GeomAPI_Shape::EDGE)
-          aRemove.push_back(aSelection);
-      }
-    }
-    else if (myFeatureId == BuildPlugin_Wire::ID() && shapeTypes.find(GeomAPI_Shape::WIRE) != shapeTypes.end())
-    {
-      for(auto aSelection: aSelected){
-        auto aType = aSelection->shape()->shapeType();
-        if (aType == GeomAPI_Shape::EDGE)
-          aRemove.push_back(aSelection);
-      }
-    }
-    else if (myFeatureId == BuildPlugin_Solid::ID() &&
-             (shapeTypes.find(GeomAPI_Shape::SHAPE) != shapeTypes.end() ||
-              shapeTypes.find(GeomAPI_Shape::SOLID) != shapeTypes.end() ||
-              shapeTypes.find(GeomAPI_Shape::SHELL) != shapeTypes.end()) )
-    {
-      for(auto aSelection: aSelected){
-        auto aType = aSelection->shape()->shapeType();
-        if( aType == GeomAPI_Shape::FACE)
-          aRemove.push_back(aSelection);
-      }
-    }
-
-    for(auto aSelection: aRemove){
-      aSelected.removeOne(aSelection);
-    }
-  }
-
   return aSelected;
 }