Salome HOME
[bos #38046] [EDF] (2023-T3) allow compilation in windows. cce/38046 6/head
authorCesar CONOPOIMA <cesar.conopoima@opencascade.com>
Mon, 8 Jan 2024 16:04:31 +0000 (16:04 +0000)
committerCesar CONOPOIMA <cesar.conopoima@opencascade.com>
Thu, 18 Jan 2024 11:15:46 +0000 (11:15 +0000)
Fixing small problem after rebase with master.

src/GMSHPlugin/GMSHPlugin_GMSH_3D_Remote.cxx
src/GMSHPlugin/GMSHPlugin_Hypothesis_i.cxx
src/GMSHPlugin/GMSHPlugin_Mesher.cxx

index 7635a9d64dba036216d3609c5a1b7257445634f4..9a5e749a8f67c9fd558c8627189e97dca076a4f5 100644 (file)
 #include <QString>
 #include <QProcess>
 
-#ifdef WIN32
-#include <filesystem>
-namespace fs = std::filesystem;
-#else
 #include <boost/filesystem.hpp>
 namespace fs = boost::filesystem;
-#endif
 
 //=============================================================================
 /*!
@@ -180,11 +175,12 @@ void GMSHPlugin_GMSH_3D_Remote::exportElementOrientation(SMESH_Mesh& aMesh,
     std::ofstream df(output_file, ios::out|ios::binary);
     int size = elemOrientation.size();
     df.write((char*)&size, sizeof(int));
-    for(auto const& [id, orient]:elemOrientation)
+    for(std::map<vtkIdType,bool>::iterator iter = elemOrientation.begin(); iter != elemOrientation.end(); ++iter)
     {
-      df.write((char*)&id, sizeof(vtkIdType));
-      df.write((char*)&orient, sizeof(bool));
+      df.write((char*)&(iter->first), sizeof(vtkIdType));
+      df.write((char*)&(iter->second), sizeof(bool));
     }
+    
     df.close();
   }
 }
index bf6eef959cbfb9c495b99b2a178d87dcbad868ce..fef0b7c5c9c25d9bd2d5161eb42084cc8bf00294 100644 (file)
@@ -269,6 +269,8 @@ void GMSHPlugin_Hypothesis_i::SetVerbosityLevel (CORBA::Long theValue)
 CORBA::Long GMSHPlugin_Hypothesis_i::GetVerbosityLevel()
 {
   return this->GetImpl()->GetVerbosityLevel();
+}
+
 CORBA::Boolean GMSHPlugin_Hypothesis_i::GetIs2d()
 {
   return this->GetImpl()->GetIs2d();
index 8753e41ae8865064641575c19519df20e3a79f33..743317401cc1b8cf94fa9c3c0bcc1ecc7e7eab70 100644 (file)
@@ -286,10 +286,11 @@ std::map<int,std::vector<std::tuple<smIdType,bool,std::vector<gp_XY>>>> GMSHPlug
   // Index by face id
   // Index vector with element smIdType, [ gp_XY_0, gp_XY_1, gp_XY_2 ]
   std::map<int,std::vector<std::tuple<smIdType,bool,std::vector<gp_XY>>>> elementToFaceMap;
-  SMESHDS_Mesh* meshDS = _mesh->GetMeshDS();
-  SMDS_ElemIteratorPtr iteratorElem = meshDS->elementsIterator(SMDSAbs_Face);
-  for ( auto const& [elem, IsReverse] : listElements ) // loop on elements on a geom face
-  {  
+
+  for(std::map<const SMDS_MeshElement*, bool>::iterator iter = listElements.begin(); iter != listElements.end(); ++iter)
+  { 
+    const SMDS_MeshElement* elem = iter->first;
+    bool IsReverse = iter->second;
     int nbN = elem->NbCornerNodes();
     std::vector<gp_XY> uvValues(nbN);
     if ( nbN > 4 /*this restriction might be eliminated. Have to adapt FillGeomMapMeshUsing2DMeshIterator function too */)
@@ -421,11 +422,10 @@ void GMSHPlugin_Mesher::FillGeomMapMeshUsing2DMeshIterator( std::map<const SMDS_
   const int invalid_ID = -1;
   std::vector<int> aTrinagle( 3, 0 );
   
-  // Playing around with SMESHDS_Mesh structure
-  SMESHDS_Mesh* meshDS = _mesh->GetMeshDS();
-
-  for ( auto const& [elem, IsReverse] : listElements ) // loop on elements on a geom face
-  {
+  for(std::map<const SMDS_MeshElement*, bool>::iterator iter = listElements.begin(); iter != listElements.end(); ++iter)
+  { 
+    const SMDS_MeshElement* elem = iter->first;
+    bool IsReverse = iter->second;
     if ( elem->NbCornerNodes() != 3 )
       return;