From dfca9eed3085eef93c5fac5ef8be49208a5da369 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 12 Oct 2021 13:26:43 +0300 Subject: [PATCH] bos #26436 [CEA] CopyMesh and mg-hexa --- src/HexoticPlugin/HexoticPlugin_Hexotic.cxx | 5 ++++- src/HexoticPlugin/MG_Hexotic_API.cxx | 3 --- src/HexoticPlugin/MG_Hexotic_API.hxx | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index 2e87506..8833303 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -350,7 +350,8 @@ static void writeInput(MG_Hexotic_API* theHexaInput, const SMESHDS_Mesh* theMeshDS) { int meshID = theHexaInput->GmfOpenMesh( theFile, GmfWrite, GMFVERSION, GMFDIMENSION); - + theHexaInput->SetIsInputMesh( true ); // it's a mesh file + // nodes int iN = 0; smIdType nbNodes = theMeshDS->NbNodes(); @@ -953,6 +954,8 @@ std::vector HexoticPlugin_Hexotic::writeSizeMapFile( MG_Hexotic_API mgInput->GmfOpenMesh( myVerticesFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION ); int solFileID = mgInput->GmfOpenMesh( mySolFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION ); + + mgInput->SetIsInputMesh( false ); // they are not mesh files int pointsNumber = points.size(); diff --git a/src/HexoticPlugin/MG_Hexotic_API.cxx b/src/HexoticPlugin/MG_Hexotic_API.cxx index 5f88f1c..155f9db 100644 --- a/src/HexoticPlugin/MG_Hexotic_API.cxx +++ b/src/HexoticPlugin/MG_Hexotic_API.cxx @@ -1268,9 +1268,6 @@ void MG_Hexotic_API::GmfSetLin(int iMesh, GmfKwdCod what, int node1, int node2, void MG_Hexotic_API::GmfCloseMesh( int iMesh ) { - if ( iMesh == 1 ) - _isMesh = false; - if ( _useLib ) { #ifdef USE_MG_LIBS return; diff --git a/src/HexoticPlugin/MG_Hexotic_API.hxx b/src/HexoticPlugin/MG_Hexotic_API.hxx index e3d2cf4..093f728 100644 --- a/src/HexoticPlugin/MG_Hexotic_API.hxx +++ b/src/HexoticPlugin/MG_Hexotic_API.hxx @@ -42,6 +42,7 @@ public: bool IsExecutable() { return !IsLibrary(); } void SetUseExecutable(); void SetInputFile( const std::string mesh2DFile ); + void SetIsInputMesh(bool isMeshIn) { _isMesh = isMeshIn; } // IN to MESHGEMS int GmfOpenMesh(const char* theFile, int rdOrWr, int ver, int dim); -- 2.39.2