]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix issues after porting the new Dump to the latest version
authorazv <azv@opencascade.com>
Thu, 23 Aug 2018 12:33:08 +0000 (15:33 +0300)
committerazv <azv@opencascade.com>
Thu, 30 Aug 2018 08:39:26 +0000 (11:39 +0300)
src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp
src/ModelHighAPI/ModelHighAPI_Tools.cpp

index 7921c27dfa787d71e4a09896546a8f633f07cdaa..5895daf8e2d14a9863ed2c09c8a058c063eaba2a 100644 (file)
@@ -26,7 +26,7 @@
 #include <ModelAPI_CompositeFeature.h>
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Result.h>
-#include <ModelAPI_ResultCompSolid.h>
+#include <ModelAPI_ResultBody.h>
 #include <ModelAPI_ResultConstruction.h>
 
 #include <GeomAPI_Circ.h>
@@ -171,8 +171,7 @@ namespace ModelGeomAlgo_Shape
       std::shared_ptr<GeomAPI_PlanarEdges> aSketchEdges =
           std::dynamic_pointer_cast<GeomAPI_PlanarEdges>(aCurShape);
       if (theShapeType != GeomAPI_Shape::COMPOUND || !aSketchEdges) {
-        ResultCompSolidPtr aCompSolid =
-            std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(*aResIt);
+        ResultBodyPtr aCompSolid = std::dynamic_pointer_cast<ModelAPI_ResultBody>(*aResIt);
         if (aCompSolid) {
           // process solids
           int aNbSolids = aCompSolid->numberOfSubs();
index 901ed0f6745b7c87f3c225b3cf6123cb3b0206c1..58e9748f120f8b762fd6269f02631f2a54db8530 100644 (file)
@@ -494,8 +494,8 @@ static bool checkDump(SessionPtr theSession,
   // execute the dumped
   PyGILState_STATE gstate = PyGILState_Ensure(); /* acquire python thread */
   static char aReadMode[] = "r";
-  PyObject* PyFileObject = PyFile_FromString(theFilename, aReadMode);
-  PyRun_SimpleFileEx(PyFile_AsFile(PyFileObject), theFilename, 1);
+  FILE* PyFileObject = _Py_fopen(theFilename, aReadMode);
+  PyRun_SimpleFileEx(PyFileObject, theFilename, 1);
   PyGILState_Release(gstate); /* release python thread */
 
   // compare with the stored data