]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0021457: [CEA] import check_mesh stability
authoreap <eap@opencascade.com>
Tue, 10 Jan 2012 14:36:48 +0000 (14:36 +0000)
committereap <eap@opencascade.com>
Tue, 10 Jan 2012 14:36:48 +0000 (14:36 +0000)
    in Transform(), reverse elements only if needed

src/SMESH/SMESH_MeshEditor.cxx

index caeb8a29517d9e033e732a849eb409d5d4501b53..75fbb54bf6621b31ebe87bd24c812a8ac8daa234 100644 (file)
 // Created   : Mon Apr 12 16:10:22 2004
 // Author    : Edward AGAPOV (eap)
 
-#define CHRONODEF
 #include "SMESH_MeshEditor.hxx"
 
 #include "SMDS_FaceOfNodes.hxx"
 #include "SMDS_VolumeTool.hxx"
 #include "SMDS_EdgePosition.hxx"
-#include "SMDS_PolyhedralVolumeOfNodes.hxx"
 #include "SMDS_FacePosition.hxx"
 #include "SMDS_SpacePosition.hxx"
-//#include "SMDS_QuadraticFaceOfNodes.hxx"
 #include "SMDS_MeshGroup.hxx"
 #include "SMDS_LinearEdge.hxx"
 #include "SMDS_Downward.hxx"
@@ -5599,6 +5596,7 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
 
   // Replicate or reverse elements
 
+  std::vector<int> iForw;
   for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
   {
     const SMDS_MeshElement* elem = *itElem;
@@ -5700,7 +5698,9 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
 
     // Regular elements
 
-    const std::vector<int>& i = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() );
+    while ( iForw.size() < nbNodes ) iForw.push_back( iForw.size() );
+    const std::vector<int>& iRev = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() );
+    const std::vector<int>& i = needReverse ? iRev : iForw;
 
     // find transformed nodes
     vector<const SMDS_MeshNode*> nodes(nbNodes);