From: Cesar CONOPOIMA Date: Mon, 8 Jan 2024 16:04:31 +0000 (+0000) Subject: [bos #38046] [EDF] (2023-T3) allow compilation in windows. X-Git-Tag: V9_13_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b7c66c3c0819b0b5395a8a96ec0b98897c4095a;p=plugins%2Fgmshplugin.git [bos #38046] [EDF] (2023-T3) allow compilation in windows. Fixing small problem after rebase with master. --- diff --git a/src/GMSHPlugin/GMSHPlugin_GMSH_3D_Remote.cxx b/src/GMSHPlugin/GMSHPlugin_GMSH_3D_Remote.cxx index 7635a9d..9a5e749 100644 --- a/src/GMSHPlugin/GMSHPlugin_GMSH_3D_Remote.cxx +++ b/src/GMSHPlugin/GMSHPlugin_GMSH_3D_Remote.cxx @@ -50,13 +50,8 @@ #include #include -#ifdef WIN32 -#include -namespace fs = std::filesystem; -#else #include 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::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(); } } diff --git a/src/GMSHPlugin/GMSHPlugin_Hypothesis_i.cxx b/src/GMSHPlugin/GMSHPlugin_Hypothesis_i.cxx index bf6eef9..fef0b7c 100644 --- a/src/GMSHPlugin/GMSHPlugin_Hypothesis_i.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Hypothesis_i.cxx @@ -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(); diff --git a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx index 8753e41..7433174 100644 --- a/src/GMSHPlugin/GMSHPlugin_Mesher.cxx +++ b/src/GMSHPlugin/GMSHPlugin_Mesher.cxx @@ -286,10 +286,11 @@ std::map>>> GMSHPlug // Index by face id // Index vector with element smIdType, [ gp_XY_0, gp_XY_1, gp_XY_2 ] std::map>>> 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::iterator iter = listElements.begin(); iter != listElements.end(); ++iter) + { + const SMDS_MeshElement* elem = iter->first; + bool IsReverse = iter->second; int nbN = elem->NbCornerNodes(); std::vector 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 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::iterator iter = listElements.begin(); iter != listElements.end(); ++iter) + { + const SMDS_MeshElement* elem = iter->first; + bool IsReverse = iter->second; if ( elem->NbCornerNodes() != 3 ) return;