From f0c8a5c35af08d222a20c2df92cde41abc9b6879 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 16 May 2013 16:29:56 +0000 Subject: [PATCH] 0022100: EDF 2413 SMESH: Take into account TRIA7 + inline void AddBiQuadTriasWithID(SMDS_Mesh* theMesh, + SMESH::log_array_var theSeq, + CORBA::Long theId) --- src/SMESHClient/SMESH_Client.cxx | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) 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 = "<