]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesAPI/FeaturesAPI_Translation.cpp
Salome HOME
Revert "Add a new method for translation : translation by two points."
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Translation.cpp
index ec05c3cefb2951bc2e311bb1eb53fcec334166d6..bfcd5bdfc61524bbfc848111331f032ea5d00413 100644 (file)
@@ -46,20 +46,6 @@ FeaturesAPI_Translation::FeaturesAPI_Translation(
   }
 }
 
-//==================================================================================================
-FeaturesAPI_Translation::FeaturesAPI_Translation(
-  const std::shared_ptr<ModelAPI_Feature>& theFeature,
-  const std::list<ModelHighAPI_Selection>& theMainObjects,
-  const ModelHighAPI_Selection& theStartPoint,
-  const ModelHighAPI_Selection& theEndPoint)
-: ModelHighAPI_Interface(theFeature)
-{
-  if(initialize()) {
-    fillAttribute(theMainObjects, mymainObjects);
-    setPoints(theStartPoint, theEndPoint);
-  }
-}
-
 //==================================================================================================
 FeaturesAPI_Translation::~FeaturesAPI_Translation()
 {
@@ -99,17 +85,6 @@ void FeaturesAPI_Translation::setDimensions(const ModelHighAPI_Double& theDx,
   execute();
 }
 
-//==================================================================================================
-void FeaturesAPI_Translation::setPoints(const ModelHighAPI_Selection& theStartPoint,
-                                        const ModelHighAPI_Selection& theEndPoint)
-{
-  fillAttribute(FeaturesPlugin_Translation::CREATION_METHOD_BY_TWO_POINTS(), mycreationMethod);
-  fillAttribute(theStartPoint, mystartPoint);
-  fillAttribute(theEndPoint, myendPoint);
-
-  execute();
-}
-
 //==================================================================================================
 void FeaturesAPI_Translation::dump(ModelHighAPI_Dumper& theDumper) const
 {
@@ -134,12 +109,6 @@ void FeaturesAPI_Translation::dump(ModelHighAPI_Dumper& theDumper) const
     AttributeDoublePtr anAttrDy = aBase->real(FeaturesPlugin_Translation::DY_ID());
     AttributeDoublePtr anAttrDz = aBase->real(FeaturesPlugin_Translation::DZ_ID());
     theDumper << ", " << anAttrDx << ", " << anAttrDy << ", " << anAttrDz;
-  } else if (aCreationMethod == FeaturesPlugin_Translation::CREATION_METHOD_BY_TWO_POINTS()) {
-    AttributeSelectionPtr anAttrStartPoint =
-      aBase->selection(FeaturesPlugin_Translation::START_POINT_ID());
-    AttributeSelectionPtr anAttrEndPoint =
-      aBase->selection(FeaturesPlugin_Translation::END_POINT_ID());
-    theDumper << ", " << anAttrStartPoint << ", " << anAttrEndPoint;
   }
 
    theDumper << ")" << std::endl;
@@ -166,14 +135,3 @@ TranslationPtr addTranslation(const std::shared_ptr<ModelAPI_Document>& thePart,
   std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Translation::ID());
   return TranslationPtr(new FeaturesAPI_Translation(aFeature, theMainObjects, theDx, theDy, theDz));
 }
-
-//==================================================================================================
-TranslationPtr addTranslation(const std::shared_ptr<ModelAPI_Document>& thePart,
-                              const std::list<ModelHighAPI_Selection>& theMainObjects,
-                              const ModelHighAPI_Selection& theStartPoint,
-                              const ModelHighAPI_Selection& theEndPoint)
-{
-  std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Translation::ID());
-  return TranslationPtr(new FeaturesAPI_Translation(aFeature, theMainObjects,
-                                                    theStartPoint, theEndPoint));
-}