Salome HOME
General approach of versioning the feature. Update Boolean operations according.
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Union.cpp
index 5663d69188ca8d3ee1d7991ba93cff9154e7c355..0a3107b76e53358230c38cc835e6045f1ab9f1a6 100644 (file)
@@ -42,7 +42,7 @@ FeaturesPlugin_Union::FeaturesPlugin_Union()
 void FeaturesPlugin_Union::initAttributes()
 {
   data()->addAttribute(BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList::typeId());
-  initVersion(THE_VERSION_1, selectionList(BASE_OBJECTS_ID()));
+  initVersion(BOP_VERSION_9_4(), selectionList(BASE_OBJECTS_ID()));
 }
 
 //=================================================================================================
@@ -65,7 +65,6 @@ void FeaturesPlugin_Union::execute()
   std::vector<FeaturesPlugin_Tools::ResultBaseAlgo> aResultBaseAlgoList;
   ListOfShape aResultShapesList;
 
-  int aUnionVersion = version();
   GeomShapePtr aResultCompound = GeomAlgoAPI_CompoundBuilder::compound(ListOfShape());
 
   // Fuse objects.
@@ -102,7 +101,7 @@ void FeaturesPlugin_Union::execute()
 
   GeomShapePtr aShape;
   GeomAPI_ShapeIterator aCIt(aResultCompound);
-  if (aUnionVersion < THE_VERSION_1) {
+  if (data()->version().empty()) {
     // if the compound consists of a single sub-shape, take it,
     // otherwise, take the full compound
     aShape = aCIt.current();