X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Services.h;h=85d9fb704e5e7a75ac0e65c015ccb374023f5563;hb=9d8267a424a809d0f96593b13f8472666553ce2e;hp=4d0578382469dcabd6218c6c5e7ee429e795f573;hpb=81bbd3b944cc814c4e5e2080fb52369b0e098a22;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Services.h b/src/ModelHighAPI/ModelHighAPI_Services.h index 4d0578382..85d9fb704 100644 --- a/src/ModelHighAPI/ModelHighAPI_Services.h +++ b/src/ModelHighAPI/ModelHighAPI_Services.h @@ -1,8 +1,22 @@ -// 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 // -// History: -// 17/06/16 - Sergey POKHODENKO - Creation of the file #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_ #define SRC_MODELHIGHAPI_MODELHIGHAPI_SERVICES_H_ @@ -14,7 +28,10 @@ #include //-------------------------------------------------------------------------------------- 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 @@ -35,6 +52,19 @@ std::shared_ptr activeDocument(); MODELHIGHAPI_EXPORT std::shared_ptr 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& theOrigin, + const std::shared_ptr& theNormal, + const std::shared_ptr& 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 standardPlane(const std::string & theName); + /** Start a data structure transaction. * * Make a control point for being able to discard or undo @@ -58,6 +88,14 @@ void end(); 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();