From e8b482055ba1a4d89e604d9a27e250565095491b Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 10 Jan 2012 14:36:48 +0000 Subject: [PATCH] 0021457: [CEA] import check_mesh stability in Transform(), reverse elements only if needed --- src/SMESH/SMESH_MeshEditor.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index caeb8a295..75fbb54bf 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -24,16 +24,13 @@ // 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 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& i = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() ); + while ( iForw.size() < nbNodes ) iForw.push_back( iForw.size() ); + const std::vector& iRev = SMDS_MeshCell::reverseSmdsOrder( elem->GetEntityType() ); + const std::vector& i = needReverse ? iRev : iForw; // find transformed nodes vector nodes(nbNodes); -- 2.39.2