Salome HOME
Adjust unit tests for Boolean Fill
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.h
index 956eeeb0069ae108010c8acf3374dcdec5ba3f7c..f983ec3270015565d858b96836e67beecd008c14 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ConstructionPlugin_Point.h
-// Created:     3 Apr 2014
-// Author:      Mikhail PONIKAROV
+// Copyright (C) 2014-2017  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<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef ConstructionPlugin_Point_H_
 #define ConstructionPlugin_Point_H_
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Result.h>
 
+#include <math.h>
+
+class GeomAPI_Vertex;
+
 /// \class ConstructionPlugin_Point
 /// \ingroup Plugins
 /// \brief Feature for creation of the new part in PartSet.
@@ -42,7 +60,7 @@ public:
     static const std::string MY_CREATION_METHOD_ID("by_xyz");
     return MY_CREATION_METHOD_ID;
   }
-
+  /*
   /// Attribute name for creation method.
   inline static const std::string& CREATION_METHOD_BY_DISTANCE_ON_EDGE()
   {
@@ -50,6 +68,27 @@ public:
     return MY_CREATION_METHOD_ID;
   }
 
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD_BY_PROJECTION()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_projection");
+    return MY_CREATION_METHOD_ID;
+  }
+
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD_BY_LINES_INTERSECTION()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_lines_intersection");
+    return MY_CREATION_METHOD_ID;
+  }
+  */
+  /// Attribute name for creation method.
+  inline static const std::string& CREATION_METHOD_BY_LINE_AND_PLANE_INTERSECTION()
+  {
+    static const std::string MY_CREATION_METHOD_ID("by_line_and_plane_intersection");
+    return MY_CREATION_METHOD_ID;
+  }
+
   /// Attribute name for X coordinate.
   inline static const std::string& X()
   {
@@ -71,7 +110,7 @@ public:
     return POINT_ATTR_Z;
   }
 
-  /// Attribute name for seleted edge.
+  /*/// Attribute name for selected edge.
   inline static const std::string& EDGE()
   {
     static const std::string ATTR_ID("edge");
@@ -99,6 +138,70 @@ public:
     return ATTR_ID;
   }
 
+  /// Attribute name for point.
+  inline static const std::string& POINT()
+  {
+    static const std::string ATTR_ID("point");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for plane.
+  inline static const std::string& PLANE()
+  {
+    static const std::string ATTR_ID("plane");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for selected first line.
+  inline static const std::string& FIRST_LINE()
+  {
+    static const std::string ATTR_ID("first_line");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for selected second line.
+  inline static const std::string& SECOND_LINE()
+  {
+    static const std::string ATTR_ID("second_line");
+    return ATTR_ID;
+  }
+  */
+
+  /// Attribute name for selected intersection line.
+  inline static const std::string& INTERSECTION_LINE()
+  {
+    static const std::string ATTR_ID("intersection_line");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for selected intersection plane.
+  inline static const std::string& INTERSECTION_PLANE()
+  {
+    static const std::string ATTR_ID("intersection_plane");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for use offset for the intersection plane.
+  inline static const std::string& USE_OFFSET()
+  {
+    static const std::string ATTR_ID("use_offset");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for offset for the intersection plane.
+  inline static const std::string& OFFSET()
+  {
+    static const std::string ATTR_ID("offset");
+    return ATTR_ID;
+  }
+
+  /// Attribute name for reverse offset for the intersection plane.
+  inline static const std::string& REVERSE_OFFSET()
+  {
+    static const std::string ATTR_ID("reverse_offset");
+    return ATTR_ID;
+  }
+
   /// Creates a new part document if needed.
   CONSTRUCTIONPLUGIN_EXPORT virtual void execute();
 
@@ -116,8 +219,11 @@ public:
                                      std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs);
 
 private:
-  std::shared_ptr<GeomAPI_Shape> createByXYZ();
-  std::shared_ptr<GeomAPI_Shape> createByDistanceOnEdge();
+  std::shared_ptr<GeomAPI_Vertex> createByXYZ();
+  /*std::shared_ptr<GeomAPI_Vertex> createByDistanceOnEdge();
+  std::shared_ptr<GeomAPI_Vertex> createByProjection();
+  std::shared_ptr<GeomAPI_Vertex> createByLinesIntersection();*/
+  std::list<std::shared_ptr<GeomAPI_Vertex> > createByLineAndPlaneIntersection();
 
 };