Salome HOME
Update copyrights
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Translation.h
index 2e3cf314b0c0e2201a3ee469d0c8aa7edcc92909..257c681e09ca47bb78a14d0643e0f57f4c8056f9 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-2019  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_
@@ -49,6 +60,13 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
     return MY_CREATION_METHOD_ID;
   }
 
+  /// Attribute name for creation method "ByTwoPoints".
+  inline static const std::string& CREATION_METHOD_BY_TWO_POINTS()
+  {
+    static const std::string MY_CREATION_METHOD_ID("ByTwoPoints");
+    return MY_CREATION_METHOD_ID;
+  }
+
   /// Attribute name of referenced objects.
   inline static const std::string& OBJECTS_LIST_ID()
   {
@@ -91,6 +109,20 @@ class FeaturesPlugin_Translation : public ModelAPI_Feature
     return MY_DZ_ID;
   }
 
+  /// Attribute name of start point.
+  inline static const std::string& START_POINT_ID()
+  {
+    static const std::string MY_START_POINT_ID("start_point");
+    return MY_START_POINT_ID;
+  }
+
+  /// Attribute name of end point.
+  inline static const std::string& END_POINT_ID()
+  {
+    static const std::string MY_END_POINT_ID("end_point");
+    return MY_END_POINT_ID;
+  }
+
   /// \return the kind of a feature.
   FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
   {
@@ -114,9 +146,8 @@ private:
   ///Perform the translation using three dimensions X, Y and Z
   void performTranslationByDimensions();
 
-  void loadNamingDS(GeomAlgoAPI_Translation& theTranslationAlgo,
-                    std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                    std::shared_ptr<GeomAPI_Shape> theBaseShape);
+  ///Perform the translation usind two points
+  void performTranslationByTwoPoints();
 };
 
 #endif