-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "SMESH_Gen.hxx"
#include "SMESH_Group.hxx"
#include "SMESH_Mesh.hxx"
+#include "SMESH_MeshAlgos.hxx"
#include "SMESH_MesherHelper.hxx"
#include "SMESH_ProxyMesh.hxx"
#include "SMESH_subMesh.hxx"
{
_ignoreShapeIds.insert( faceInd );
ignoreFaces.push_back( exp.Current() );
- if ( SMESH_Algo::IsReversedSubMesh( TopoDS::Face( exp.Current() ), getMeshDS()))
+ if ( helper.IsReversedSubMesh( TopoDS::Face( exp.Current() )))
_sdVec[i]._reversedFaceIds.insert( faceInd );
}
}
// Limit inflation step size by geometry size found by itersecting
// normals of _LayerEdge's with mesh faces
double geomSize = Precision::Infinite(), intersecDist;
- SMESH_MeshEditor editor( _mesh );
auto_ptr<SMESH_ElementSearcher> searcher
- ( editor.GetElementSearcher( data._proxyMesh->GetFaces( data._solid )) );
+ ( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(),
+ data._proxyMesh->GetFaces( data._solid )) );
for ( unsigned i = 0; i < data._edges.size(); ++i )
{
if ( data._edges[i]->IsOnEdge() ) continue;
data._edges[i]->FindIntersection( *searcher, intersecDist, data._epsilon );
- if ( geomSize > intersecDist )
+ if ( geomSize > intersecDist && intersecDist > 0 )
geomSize = intersecDist;
}
if ( data._stepSize > 0.3 * geomSize )
// Check if the last segments of _LayerEdge intersects 2D elements;
// checked elements are either temporary faces or faces on surfaces w/o the layers
- SMESH_MeshEditor editor( _mesh );
auto_ptr<SMESH_ElementSearcher> searcher
- ( editor.GetElementSearcher( data._proxyMesh->GetFaces( data._solid )) );
+ ( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(),
+ data._proxyMesh->GetFaces( data._solid )) );
distToIntersection = Precision::Infinite();
double dist;
// 1) to find and fix intersection
// 2) to check that no new intersection appears as result of 1)
- SMESH_MeshEditor editor( _mesh );
SMDS_ElemIteratorPtr fIt( new SMDS_ElementVectorIterator( tmpFaces.begin(),
tmpFaces.end()));
- auto_ptr<SMESH_ElementSearcher> searcher ( editor.GetElementSearcher( fIt ));
+ auto_ptr<SMESH_ElementSearcher> searcher
+ ( SMESH_MeshAlgos::GetElementSearcher( *getMeshDS(), fIt ));
// 1) Find intersections
double dist;
const SMDS_MeshNode* n1 = badTrias[iTia]->GetNode( iSide );
const SMDS_MeshNode* n2 = badTrias[iTia]->GetNode(( iSide+1 ) % 3 );
trias [iSide].first = badTrias[iTia];
- trias [iSide].second = SMESH_MeshEditor::FindFaceInSet( n1, n2, emptySet, involvedFaces,
- & i1, & i2 );
+ trias [iSide].second = SMESH_MeshAlgos::FindFaceInSet( n1, n2, emptySet, involvedFaces,
+ & i1, & i2 );
if ( ! trias[iSide].second || trias[iSide].second->NbCornerNodes() != 3 )
continue;
reverse = ( helper.GetSubShapeOri( F, E ) == TopAbs_REVERSED );
if ( helper.GetSubShapeOri( data._solid, F ) == TopAbs_REVERSED )
reverse = !reverse, F.Reverse();
- if ( SMESH_Algo::IsReversedSubMesh( TopoDS::Face(F), getMeshDS() ))
+ if ( helper.IsReversedSubMesh( TopoDS::Face(F) ))
reverse = !reverse;
}
else