X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Tools.cpp;h=67824fd334e2164555f31f22f34cb7a77136d9ef;hb=refs%2Fheads%2FV9_11_BR;hp=14ab9887894f1c487822341e04a9d81b46a10bc9;hpb=accd372f85e4c22be316348c94192ebb43fb4add;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index 14ab98878..67824fd33 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2021 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -29,6 +29,8 @@ #include #include //-------------------------------------------------------------------------------------- +#include +//-------------------------------------------------------------------------------------- #include //-------------------------------------------------------------------------------------- #include @@ -529,6 +531,8 @@ static bool dumpToPython(SessionPtr theSession, if (aDump.get()) { aDump->string("file_path")->setValue(theFilename); aDump->string("file_format")->setValue("py"); + std::string aTrek = GeomAlgoAPI_Tools::File_Tools::path(theFilename); + aDump->string("dump_dir")->setValue(aTrek); aDump->boolean("topological_naming")->setValue((theSelectionType & CHECK_NAMING) != 0); aDump->boolean("geometric_selection")->setValue((theSelectionType & CHECK_GEOMETRICAL) != 0); aDump->boolean("weak_naming")->setValue((theSelectionType & CHECK_WEAK) != 0); @@ -555,7 +559,7 @@ static bool checkDump(SessionPtr theSession, // execute the dumped PyGILState_STATE gstate = PyGILState_Ensure(); /* acquire python thread */ static char aReadMode[] = "r"; - FILE* PyFileObject = _Py_fopen(theFilename, aReadMode); + FILE* PyFileObject = fopen(theFilename, aReadMode); PyRun_SimpleFileEx(PyFileObject, theFilename, 1); PyGILState_Release(gstate); /* release python thread */