From: eap Date: Thu, 16 May 2013 16:30:18 +0000 (+0000) Subject: 0022100: EDF 2413 SMESH: Take into account TRIA7 X-Git-Tag: V7_3_0a1~468 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6cc3a49ea9e498fb49523fa265ab5197e92875bf;p=modules%2Fsmesh.git 0022100: EDF 2413 SMESH: Take into account TRIA7 --- diff --git a/src/SMESHDS/SMESHDS_Command.cxx b/src/SMESHDS/SMESHDS_Command.cxx index cd779a8d6..b6077f900 100644 --- a/src/SMESHDS/SMESHDS_Command.cxx +++ b/src/SMESHDS/SMESHDS_Command.cxx @@ -502,6 +502,29 @@ void SMESHDS_Command::AddFace(int NewFaceID, myNumber++; } +//======================================================================= +//function : AddFace +//purpose : +//======================================================================= +void SMESHDS_Command::AddFace(int NewFaceID, + int n1, int n2, int n3, + int n12, int n23, int n31, int nCenter) +{ + if (!myType == SMESHDS_AddBiQuadTriangle) { + MESSAGE("SMESHDS_Command::AddFace : Bad Type"); + return; + } + myIntegers.push_back(NewFaceID); + myIntegers.push_back(n1); + myIntegers.push_back(n2); + myIntegers.push_back(n3); + myIntegers.push_back(n12); + myIntegers.push_back(n23); + myIntegers.push_back(n31); + myIntegers.push_back(nCenter); + myNumber++; +} + //======================================================================= //function : AddFace //purpose : diff --git a/src/SMESHDS/SMESHDS_Command.hxx b/src/SMESHDS/SMESHDS_Command.hxx index 1ef1d75fb..71340f0b6 100644 --- a/src/SMESHDS/SMESHDS_Command.hxx +++ b/src/SMESHDS/SMESHDS_Command.hxx @@ -65,6 +65,8 @@ class SMESHDS_EXPORT SMESHDS_Command void AddEdge(int NewEdgeID, int n1, int n2, int n12); void AddFace(int NewFaceID, int n1, int n2, int n3, int n12, int n23, int n31); + void AddFace(int NewFaceID, int n1, int n2, int n3, + int n12, int n23, int n31, int nCenter); void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, int n12, int n23, int n34, int n41); void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, diff --git a/src/SMESHDS/SMESHDS_CommandType.hxx b/src/SMESHDS/SMESHDS_CommandType.hxx index b5f1d682b..1bceb33da 100644 --- a/src/SMESHDS/SMESHDS_CommandType.hxx +++ b/src/SMESHDS/SMESHDS_CommandType.hxx @@ -45,7 +45,7 @@ enum SMESHDS_CommandType { SMESHDS_ChangePolyhedronNodes, SMESHDS_Renumber, SMESHDS_ClearAll, - // special types for quadratic elements + // quadratic elements SMESHDS_AddQuadEdge, SMESHDS_AddQuadTriangle, SMESHDS_AddQuadQuadrangle, @@ -55,6 +55,7 @@ enum SMESHDS_CommandType { SMESHDS_AddQuadHexahedron, // SMESHDS_Add0DElement, + SMESHDS_AddBiQuadTriangle, SMESHDS_AddBiQuadQuadrangle, SMESHDS_AddTriQuadHexa, SMESHDS_AddHexagonalPrism, diff --git a/src/SMESHDS/SMESHDS_Script.cxx b/src/SMESHDS/SMESHDS_Script.cxx index 186bab1e8..d715a20b4 100644 --- a/src/SMESHDS/SMESHDS_Script.cxx +++ b/src/SMESHDS/SMESHDS_Script.cxx @@ -435,6 +435,21 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, n12, n23, n31); } +//======================================================================= +//function : AddFace +//purpose : +//======================================================================= +void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, + int n12, int n23, int n31, int nCenter) +{ + if(myIsEmbeddedMode){ + myIsModified = true; + return; + } + getCommand(SMESHDS_AddBiQuadTriangle)->AddFace(NewFaceID, n1, n2, n3, + n12, n23, n31, nCenter); +} + //======================================================================= //function : AddFace //purpose : diff --git a/src/SMESHDS/SMESHDS_Script.hxx b/src/SMESHDS/SMESHDS_Script.hxx index c801fc7c6..f7c2a9b18 100644 --- a/src/SMESHDS/SMESHDS_Script.hxx +++ b/src/SMESHDS/SMESHDS_Script.hxx @@ -73,6 +73,8 @@ class SMESHDS_EXPORT SMESHDS_Script void AddEdge(int NewEdgeID, int n1, int n2, int n12); void AddFace(int NewFaceID, int n1, int n2, int n3, int n12, int n23, int n31); + void AddFace(int NewFaceID, int n1, int n2, int n3, + int n12, int n23, int n31, int nCenter); void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, int n12, int n23, int n34, int n41); void AddFace(int NewFaceID, int n1, int n2, int n3, int n4,