From: eap Date: Tue, 20 Dec 2005 14:09:17 +0000 (+0000) Subject: PAL10974: use SMESH_Algo::IsReversedSubMesh() to know orientation X-Git-Tag: V2_2_7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b9d1b4a4f92f61daa92d734cef93d4d44b683a3e;p=plugins%2Fnetgenplugin.git PAL10974: use SMESH_Algo::IsReversedSubMesh() to know orientation --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 90e0742..3e25994 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -19,6 +19,9 @@ using namespace std; #include "SMDS_MeshNode.hxx" #include +#include +#include +#include #include #include "utilities.h" @@ -155,13 +158,12 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, for (TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next()) { - TopoDS_Shape aShapeFace = exp.Current(); - int faceID = meshDS->ShapeToIndex( aShapeFace ); - TopoDS_Shape aMeshedFace = meshDS->IndexToShape( faceID ); - const SMESHDS_SubMesh * aSubMeshDSFace = meshDS->MeshElements( faceID ); + const TopoDS_Shape& aShapeFace = exp.Current(); + const SMESHDS_SubMesh * aSubMeshDSFace = meshDS->MeshElements( aShapeFace ); if ( aSubMeshDSFace ) { - bool isRev = ( aShapeFace.Orientation() != aMeshedFace.Orientation() ); + bool isRev = SMESH_Algo::IsReversedSubMesh( TopoDS::Face(aShapeFace), meshDS ); + SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements(); while ( iteratorElem->more() ) // loop on elements on a face {