From: eap Date: Thu, 16 May 2013 16:29:56 +0000 (+0000) Subject: 0022100: EDF 2413 SMESH: Take into account TRIA7 X-Git-Tag: V7_3_0a1~469 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0c8a5c35af08d222a20c2df92cde41abc9b6879;p=modules%2Fsmesh.git 0022100: EDF 2413 SMESH: Take into account TRIA7 + inline void AddBiQuadTriasWithID(SMDS_Mesh* theMesh, + SMESH::log_array_var theSeq, + CORBA::Long theId) --- diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 38ab0801e..86caddbc3 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -507,6 +507,31 @@ namespace } } + //======================================================================= + //function : AddBiQuadTriasWithID + //======================================================================= + inline void AddBiQuadTriasWithID(SMDS_Mesh* theMesh, + SMESH::log_array_var theSeq, + CORBA::Long theId) + { + const SMESH::long_array& anIndexes = theSeq[theId].indexes; + CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; + if(8*aNbElems != anIndexes.length()) + EXCEPTION(runtime_error,"AddBiQuadTriasWithID - 8*aNbElems != anIndexes.length()"); + for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=8){ + SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], + anIndexes[anIndexId+2], + anIndexes[anIndexId+3], + anIndexes[anIndexId+4], + anIndexes[anIndexId+5], + anIndexes[anIndexId+6], + anIndexes[anIndexId+7], + anIndexes[anIndexId]); + if(!anElem) + EXCEPTION(runtime_error,"AddBiQuadTriasWithID() - cannot AddFaceWithID for ID = "<