X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MesherHelper.cxx;h=13d072bbb5a376bc35a75453d680c75e31b536d0;hp=35973eb99f8a336ef77d6f1f1cfa402d6bd6976d;hb=5504d02a2237b17b8459bcd3b1fb2a89468598cd;hpb=65c1beab50fcec33a4e988c10b3fedb081543164 diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 35973eb99..13d072bbb 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -31,8 +31,10 @@ #include "SMDS_FacePosition.hxx" #include "SMDS_IteratorOnIterators.hxx" #include "SMDS_VolumeTool.hxx" +#include "SMESHDS_Mesh.hxx" #include "SMESH_Block.hxx" #include "SMESH_HypoFilter.hxx" +#include "SMESH_Mesh.hxx" #include "SMESH_MeshAlgos.hxx" #include "SMESH_ProxyMesh.hxx" #include "SMESH_subMesh.hxx" @@ -113,6 +115,28 @@ SMESH_MesherHelper::~SMESH_MesherHelper() } } +//================================================================================ +/*! + * \brief Return SMESH_Gen + */ +//================================================================================ + +SMESH_Gen* SMESH_MesherHelper::GetGen() const +{ + return GetMesh()->GetGen(); +} + +//================================================================================ +/*! + * \brief Return mesh DS + */ +//================================================================================ + +SMESHDS_Mesh* SMESH_MesherHelper::GetMeshDS() const +{ + return GetMesh()->GetMeshDS(); +} + //======================================================================= //function : IsQuadraticSubMesh //purpose : Check submesh for given shape: if all elements on this shape @@ -347,6 +371,16 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh) } } +//======================================================================= +//function : ShapeToIndex +//purpose : Convert a shape to its index in the SMESHDS_Mesh +//======================================================================= + +int SMESH_MesherHelper::ShapeToIndex( const TopoDS_Shape& S ) const +{ + return GetMeshDS()->ShapeToIndex( S ); +} + //======================================================================= //function : GetNodeUVneedInFaceNode //purpose : Check if inFaceNode argument is necessary for call GetNodeUV(F,..) @@ -4776,7 +4810,8 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, } // fix nodes on geom faces #ifdef _DEBUG_ - int nbfaces = faces.Extent(); /*avoid "unused varianbles": */ nbfaces++, nbfaces--; + int nbfaces = nbSolids; + nbfaces = faces.Extent(); /*avoid "unused varianbles": */ nbfaces++, nbfaces--; #endif for ( TopTools_MapIteratorOfMapOfShape fIt( faces ); fIt.More(); fIt.Next() ) { MSG("FIX FACE " << nbfaces-- << " #" << GetMeshDS()->ShapeToIndex(fIt.Key())); @@ -5117,6 +5152,7 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, "uv2: "<Move( move, /*sum=*/false, /*is2dFixed=*/true ); @@ -5135,7 +5171,6 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, // ------------- TIDSortedElemSet biQuadQuas, biQuadTris, triQuadHexa; - const SMDS_MeshElement *biQuadQua, *triQuadHex; const bool toFixCentralNodes = ( myMesh->NbBiQuadQuadrangles() + myMesh->NbBiQuadTriangles() + myMesh->NbTriQuadraticHexas() ); @@ -5166,7 +5201,6 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, // collect bi-quadratic elements if ( toFixCentralNodes ) { - biQuadQua = triQuadHex = 0; SMDS_ElemIteratorPtr eIt = pLink->_mediumNode->GetInverseElementIterator(); while ( eIt->more() ) { @@ -5325,6 +5359,10 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError, nCenterCoords.X(), nCenterCoords.Y(), nCenterCoords.Z()); } } +#ifdef _DEBUG_ + // avoid warning: defined but not used operator<<() + SMESH_Comment() << *links.begin() << *faces.begin(); +#endif } //================================================================================