// shared pointers
%shared_ptr(BuildAPI_Edge)
+%shared_ptr(BuildAPI_Face)
%shared_ptr(BuildAPI_Vertex)
%shared_ptr(BuildAPI_Wire)
// all supported interfaces
%include "BuildAPI_Edge.h"
+%include "BuildAPI_Face.h"
%include "BuildAPI_Vertex.h"
%include "BuildAPI_Wire.h"
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+// File: BuildAPI_Face.cpp
+// Created: 09 June 2016
+// Author: Dmitry Bobylev
+
+#include "BuildAPI_Face.h"
+
+#include <ModelHighAPI_Tools.h>
+
+//==================================================================================================
+BuildAPI_Face::BuildAPI_Face(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+//==================================================================================================
+BuildAPI_Face::BuildAPI_Face(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects)
+: ModelHighAPI_Interface(theFeature)
+{
+ if(initialize()) {
+ setBase(theBaseObjects);
+ }
+}
+
+//==================================================================================================
+BuildAPI_Face::~BuildAPI_Face()
+{
+
+}
+
+//==================================================================================================
+void BuildAPI_Face::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
+{
+ fillAttribute(theBaseObjects, mybaseObjects);
+
+ execute();
+}
+
+// TODO(spo): make add* as static functions of the class
+//==================================================================================================
+FacePtr addFace(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(BuildAPI_Face::ID());
+ return FacePtr(new BuildAPI_Face(aFeature, theBaseObjects));
+}
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+// File: BuildAPI_Face.h
+// Created: 09 June 2016
+// Author: Dmitry Bobylev
+
+#ifndef BuildAPI_Face_H_
+#define BuildAPI_Face_H_
+
+#include "BuildAPI.h"
+
+#include <BuildPlugin_Face.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Selection;
+
+/// \class BuildAPI_Face
+/// \ingroup CPPHighAPI
+/// \brief Interface for Face feature.
+class BuildAPI_Face: public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values.
+ BUILDAPI_EXPORT
+ explicit BuildAPI_Face(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ BUILDAPI_EXPORT
+ explicit BuildAPI_Face(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects);
+
+ /// Destructor.
+ BUILDAPI_EXPORT
+ virtual ~BuildAPI_Face();
+
+ INTERFACE_1(BuildPlugin_Face::ID(),
+ baseObjects, BuildPlugin_Face::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */)
+
+ /// Modify base attribute of the feature.
+ BUILDAPI_EXPORT
+ void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
+};
+
+/// Pointer on Face object.
+typedef std::shared_ptr<BuildAPI_Face> FacePtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create Face feature.
+BUILDAPI_EXPORT
+FacePtr addFace(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects);
+
+#endif // BuildAPI_Face_H_
#include <ModelHighAPI_swig.h>
#include "BuildAPI_Edge.h"
+ #include "BuildAPI_Face.h"
#include "BuildAPI_Vertex.h"
#include "BuildAPI_Wire.h"
SET(PROJECT_HEADERS
BuildAPI.h
BuildAPI_Edge.h
+ BuildAPI_Face.h
BuildAPI_Vertex.h
BuildAPI_Wire.h
)
SET(PROJECT_SOURCES
BuildAPI_Edge.cpp
+ BuildAPI_Face.cpp
BuildAPI_Vertex.cpp
BuildAPI_Wire.cpp
)