X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Services.cpp;h=db14a4601929044d5ca650fa5af690784a91ef5f;hb=f3fe84b84646ce3ece6e0fd1511cacdae29c7765;hp=c1c6e64b3a1d1f5f4df34ccf2f12bf2f40c0a0ee;hpb=8bb6d0093e663565a2144ca82f082effa766b12b;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Services.cpp b/src/ModelHighAPI/ModelHighAPI_Services.cpp index c1c6e64b3..db14a4601 100644 --- a/src/ModelHighAPI/ModelHighAPI_Services.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Services.cpp @@ -1,5 +1,6 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D // Name : ModelHighAPI_Services.cpp -// Purpose: +// Purpose: // // History: // 17/06/16 - Sergey POKHODENKO - Creation of the file @@ -12,6 +13,7 @@ #include #include #include +#include #include @@ -56,7 +58,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) @@ -65,8 +67,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(); @@ -84,9 +88,12 @@ void begin() { ModelAPI_Session::get()->startOperation(); } + void end() { ModelAPI_Session::get()->finishOperation(); + // to update data tree in the end of dumped script execution + ModelAPI_EventCreator::get()->sendReordered(FeaturePtr()); } void apply() {