Salome HOME
fixed bos#37786: SMESH_MGAdaptTests_without_session random failures
[modules/smesh.git] / src / SMESH / SMESH_DriverShape.cxx
index c9db8372e1578abd01517c5ec3cb35a2c1e613e5..d0ebc096df5cf1b00fc17f31b83670283534fe68 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -24,7 +24,6 @@
 //  Author : Yoann AUDOUIN, EDF
 //  Module : SMESH
 //
-
 #include <utilities.h>
 #include <Utils_SALOME_Exception.hxx>
 #include "SMESH_DriverShape.hxx"
 //Occ include
 #include <TopoDS.hxx>
 
+#ifndef WIN32
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 namespace fs = boost::filesystem;
+#endif
 
 /**
  * @brief Import the content of a shape file (STEP) into a TopDS_Shape object
@@ -146,7 +147,8 @@ int exportBREPShape(const std::string shape_file, const TopoDS_Shape& aShape){
  *
  * @return error code
  */
-int importShape(const std::string shape_file, TopoDS_Shape& aShape){
+int SMESH_DriverShape::importShape(const std::string shape_file, TopoDS_Shape& aShape){
+#ifndef WIN32
   std::string type = fs::path(shape_file).extension().string();
   boost::algorithm::to_lower(type);
   if (type == ".brep"){
@@ -156,6 +158,9 @@ int importShape(const std::string shape_file, TopoDS_Shape& aShape){
   } else {
     throw SALOME_Exception("Unknow format for importShape: " + type);
   }
+#else
+  return 0;
+#endif
 }
 
 /**
@@ -166,7 +171,8 @@ int importShape(const std::string shape_file, TopoDS_Shape& aShape){
  *
  * @return error code
  */
-int exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
+int SMESH_DriverShape::exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
+#ifndef WIN32
   std::string type = fs::path(shape_file).extension().string();
   boost::algorithm::to_lower(type);
   if (type == ".brep"){
@@ -176,4 +182,7 @@ int exportShape(const std::string shape_file, const TopoDS_Shape& aShape){
   } else {
     throw SALOME_Exception("Unknow format for exportShape: " + type);
   }
+#else
+  return 0;
+#endif
 }