Salome HOME
updated copyright message
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.h
index 899a8e0f2af622d3ce8c13e5dbc9f10d5b74ff8d..bff3542b3a7b4251015e6be8a84f02541bfd3f09 100644 (file)
@@ -1,10 +1,21 @@
-// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
-
-// File:        FeaturesPlugin_Translation.h
-// Created:     8 June 2015
-// Author:      Dmitry Bobylev
+// Copyright (C) 2014-2023  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// Modified by Clarisse Genrault (CEA) : 17 Nov 2016
 
 #ifndef FeaturesPlugin_Translation_H_
 #define FeaturesPlugin_Translation_H_
@@ -13,7 +24,7 @@
 
 #include <ModelAPI_Feature.h>
 
-#include <GeomAlgoAPI_Translation.h>
+class GeomAPI_Trsf;
 
 /// \class FeaturesPlugin_Translation
 /// \ingroup Plugins
@@ -119,7 +130,7 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
     return MY_KIND;
   }
 
-  /// Creates a new part document if needed.
+  /// Performs the algorithm and stores results it in the data structure.
   FEATURESPLUGIN_EXPORT virtual void execute();
 
   /// Request for initialization of data model of the feature: adding all attributes.
@@ -129,18 +140,17 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
   FeaturesPlugin_Translation();
 
 private:
-  ///Perform the translation using an axis and a distance.
-  void performTranslationByAxisAndDistance();
+  /// Calculate the translation using an axis and a distance.
+  std::shared_ptr<GeomAPI_Trsf> translationByAxisAndDistance();
 
-  ///Perform the translation using three dimensions X, Y and Z
-  void performTranslationByDimensions();
+  /// Calculate the translation using three dimensions X, Y and Z
+  std::shared_ptr<GeomAPI_Trsf> translationByDimensions();
 
-  ///Perform the translation usind two points
-  void performTranslationByTwoPoints();
+  /// Calculate the translation usind two points
+  std::shared_ptr<GeomAPI_Trsf> translationByTwoPoints();
 
-  void loadNamingDS(GeomAlgoAPI_Translation& theTranslationAlgo,
-                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                    std::shared_ptr<GeomAPI_Shape> theBaseShape);
+  /// Perform the translation
+  void performTranslation(const std::shared_ptr<GeomAPI_Trsf>& theTrsf);
 };
 
 #endif