Salome HOME
Merge remote-tracking branch 'remotes/origin/HigherLevelObjectsHistory'
[modules/shaper.git] / src / BuildPlugin / BuildPlugin_Face.h
index fafd51dca78837c1da27a275618f31d875f81d0c..1545de1a9b936e0834c99ee303f70ded4edd14f1 100644 (file)
@@ -1,20 +1,36 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        BuildPlugin_Face.h
-// Created:     14 April 2016
-// 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
+//
 
 #ifndef BuildPlugin_Face_H_
 #define BuildPlugin_Face_H_
 
 #include "BuildPlugin.h"
+#include "BuildPlugin_Shape.h"
 
-#include <ModelAPI_Feature.h>
+class GeomAPI_Dir;
+class GeomAPI_Shape;
+class GeomAlgoAPI_MakeShape;
 
 /// \class BuildPlugin_Face
 /// \ingroup Plugins
 /// \brief Feature for creation of face from sketch edges or existing wires.
-class BuildPlugin_Face: public ModelAPI_Feature
+class BuildPlugin_Face: public BuildPlugin_Shape
 {
 public:
   /// Use plugin manager for features creation
@@ -46,6 +62,13 @@ public:
 
   /// Creates a new part document if needed.
   BUILDPLUGIN_EXPORT virtual void execute();
+
+private:
+  /// Create faces basing on the list of edges
+  void buildFacesByEdges(const std::list< std::shared_ptr<GeomAPI_Shape> >& theEdges,
+                         const std::list< std::shared_ptr<GeomAPI_Dir> >& theNormals,
+                         std::list< std::shared_ptr<GeomAPI_Shape> >& theFaces,
+                         std::shared_ptr<GeomAlgoAPI_MakeShape>& theBuilderAlgo) const;
 };
 
 #endif