X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Services.cpp;h=20e21e1b47af7ba811e9af87fef05d29f14981bc;hb=e675b9eb8df755fff9763560ddf36d5bfeb6fe35;hp=4b40b09e1d32f9ea251a93656d2c660137431d15;hpb=42cd47b33727c9b7f02b43960f8b2633001942ae;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Services.cpp b/src/ModelHighAPI/ModelHighAPI_Services.cpp index 4b40b09e1..20e21e1b4 100644 --- a/src/ModelHighAPI/ModelHighAPI_Services.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Services.cpp @@ -1,10 +1,23 @@ -// Name : ModelHighAPI_Services.cpp -// 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 -//-------------------------------------------------------------------------------------- #include "ModelHighAPI_Services.h" //-------------------------------------------------------------------------------------- #include @@ -57,7 +70,7 @@ std::string defaultPlane(const std::shared_ptr& theOrigin, return std::string(); // XOY or XOZ - if (fabs(theNormal->x()) < aTol && + if (fabs(theNormal->x()) < aTol && fabs(theDirX->x() - 1.0) < aTol && fabs(theDirX->y()) < aTol && fabs(theDirX->z()) < aTol) { // XOY if (fabs(theNormal->y()) < aTol && fabs(theNormal->z() - 1.0) < aTol) @@ -66,8 +79,10 @@ std::string defaultPlane(const std::shared_ptr& theOrigin, return std::string("XOZ"); } // YOZ - else if (fabs(theNormal->x() - 1.0) < aTol && fabs(theNormal->y()) < aTol && fabs(theNormal->z()) < aTol && - fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol && fabs(theDirX->z()) < aTol) + else if (fabs(theNormal->x() - 1.0) < aTol && + fabs(theNormal->y()) < aTol && fabs(theNormal->z()) < aTol && + fabs(theDirX->x()) < aTol && fabs(theDirX->y() - 1.0) < aTol && + fabs(theDirX->z()) < aTol) return std::string("YOZ"); return std::string(); @@ -99,6 +114,13 @@ void apply() aSession->startOperation(); } +void updateFeatures() +{ + Events_Loop* aLoop = Events_Loop::loop(); + aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED)); + aLoop->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); +} + //-------------------------------------------------------------------------------------- void undo() {