From: eap Date: Wed, 15 Sep 2021 18:09:50 +0000 (+0300) Subject: bos #24596 [CEA] New MeshGems license X-Git-Tag: V9_8_0a1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Focc%2Fnew_mg_licnese;p=plugins%2Fhybridplugin.git bos #24596 [CEA] New MeshGems license --- diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx index 31bdd19..e2f8e4d 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx @@ -945,26 +945,27 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedMesh(SMESH_Mesh& theMesh, SMESH::Elemen bool HYBRIDPlugin_Hypothesis::SetEnforcedGroup(const SMESHDS_Mesh* theMeshDS, SMESH::smIdType_array_var theIDs, SMESH::ElementType elementType, std::string name, std::string entry, std::string groupName) { TIDSortedElemSet theElemSet; - if ( theIDs->length() == 0 ){MESSAGE("The source group is empty");} - for ( SMESH::smIdType i = 0; i < theIDs->length(); i++) { - SMESH::smIdType ind = theIDs[i]; - if (elementType == SMESH::NODE) - { - const SMDS_MeshNode * node = theMeshDS->FindNode(ind); - if (node) - theElemSet.insert( node ); - } - else - { - const SMDS_MeshElement * elem = theMeshDS->FindElement(ind); - if (elem) - theElemSet.insert( elem ); - } + if ( theIDs->length() == 0 ){MESSAGE("The source group is empty");} + for ( CORBA::ULong i = 0; i < theIDs->length(); i++) + { + SMESH::smIdType ind = theIDs[i]; + if (elementType == SMESH::NODE) + { + const SMDS_MeshNode * node = theMeshDS->FindNode(ind); + if (node) + theElemSet.insert( node ); } + else + { + const SMDS_MeshElement * elem = theMeshDS->FindElement(ind); + if (elem) + theElemSet.insert( elem ); + } + } -// SMDS_ElemIteratorPtr it = theGroup->GetGroupDS()->GetElements(); -// while ( it->more() ) -// theElemSet.insert( it->next() ); + // SMDS_ElemIteratorPtr it = theGroup->GetGroupDS()->GetElements(); + // while ( it->more() ) + // theElemSet.insert( it->next() ); bool added = SetEnforcedElements( theElemSet, elementType, groupName); if (added) { @@ -973,7 +974,7 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedGroup(const SMESHDS_Mesh* theMeshDS, SM newEnfMesh->entry = entry; newEnfMesh->elementType = elementType; newEnfMesh->groupName = groupName; - + THYBRIDEnforcedMeshList::iterator it = _enfMeshList.find(newEnfMesh); if (it == _enfMeshList.end()) { _entryEnfMeshMap[entry].insert(newEnfMesh); diff --git a/src/HYBRIDPlugin/MG_HYBRID_API.cxx b/src/HYBRIDPlugin/MG_HYBRID_API.cxx index b0f2f9d..c656b34 100644 --- a/src/HYBRIDPlugin/MG_HYBRID_API.cxx +++ b/src/HYBRIDPlugin/MG_HYBRID_API.cxx @@ -1176,9 +1176,10 @@ void MG_HYBRID_API::GmfSetKwd(int iMesh, GmfKwdCod what, int nb ) if ( iMesh == 1 ) { switch ( what ) { - case GmfVertices: _nbNodes = nb; break; - case GmfEdges: _nbEdges = nb; break; - case GmfTriangles: _nbFaces = nb; break; + case GmfVertices: _nbNodes = nb; break; + case GmfEdges: _nbEdges = nb; break; + case GmfTriangles: _nbFaces += nb; break; + case GmfQuadrilaterals: _nbFaces += nb; break; default:; } }