-// Name : ModelHighAPI_Services.h
-// Purpose:
+// 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>
//
-// History:
-// 17/06/16 - Sergey POKHODENKO - Creation of the file
#ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_
#define SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_
#include <string>
//--------------------------------------------------------------------------------------
class GeomAPI_Ax3;
+class GeomAPI_Dir;
+class GeomAPI_Pnt;
class ModelAPI_Document;
+class ModelAPI_Result;
//--------------------------------------------------------------------------------------
/// Return the main document (the Partset) created or open from the Modeler.
MODELHIGHAPI_EXPORT
MODELHIGHAPI_EXPORT
std::shared_ptr<GeomAPI_Ax3> defaultPlane(const std::string & theName);
+/// Return name of coordinate plane ("XOY", "XOZ" or "YOZ") or empty string for other planes.
+MODELHIGHAPI_EXPORT
+std::string defaultPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
+ const std::shared_ptr<GeomAPI_Dir>& theNormal,
+ const std::shared_ptr<GeomAPI_Dir>& theDirX);
+
+/** Return one of the three standard results defined in PartSet document.
+ *
+ * These planes are respectively referred to by name "XOY" (Z=0), "XOZ" (Y=0) or "YOZ" (X=0).
+ */
+MODELHIGHAPI_EXPORT
+std::shared_ptr<ModelAPI_Result> standardPlane(const std::string & theName);
+
/** Start a data structure transaction.
*
* Make a control point for being able to discard or undo
MODELHIGHAPI_EXPORT
void apply();
+/** Executes features, created or updated before.
+ *
+ * This method flushes creation and update events in order to make all
+ * features up to date.
+ */
+MODELHIGHAPI_EXPORT
+void updateFeatures();
+
/// Roll-back the data structure to the previous control point.
MODELHIGHAPI_EXPORT
void undo();