SMDS_ElemIteratorPtr SMDS_Mesh::elementGeomIterator(SMDSAbs_GeometryType type) const
{
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
return myCellFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::GeomFilter( type ),
- myInfo.NbElements( type ));
+ nbElems);
}
SMDS_ElemIteratorPtr SMDS_Mesh::elementEntityIterator(SMDSAbs_EntityType type) const
{
return myNodeFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::NonNullFilter );
}
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
return myCellFactory->GetIterator<SMDS_ElemIterator>( new SMDS_MeshElement::EntityFilter( type ),
- myInfo.NbElements( type ));
+ nbElems);
}
///////////////////////////////////////////////////////////////////////////////
return myNodeFactory->GetIterator< TIterator >( new SMDS_MeshElement::NonNullFilter );
default:
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( type ),
- myInfo.NbElements( type ));
+ nbElems);
}
return SMDS_ElemIteratorPtr();
}
SMDS_EdgeIteratorPtr SMDS_Mesh::edgesIterator() const
{
typedef SMDS_EdgeIterator TIterator;
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbEdges();
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Edge ),
- myInfo.NbEdges());
+ nbElems);
}
///////////////////////////////////////////////////////////////////////////////
SMDS_FaceIteratorPtr SMDS_Mesh::facesIterator() const
{
typedef SMDS_FaceIterator TIterator;
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbFaces();
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Face ),
- myInfo.NbFaces());
+ nbElems);
}
///////////////////////////////////////////////////////////////////////////////
SMDS_VolumeIteratorPtr SMDS_Mesh::volumesIterator() const
{
typedef SMDS_VolumeIterator TIterator;
+ int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbVolumes();
return
myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Volume ),
- myInfo.NbVolumes());
+ nbElems );
}
SMDS_NodeIteratorPtr SMDS_Mesh::shapeNodesIterator(int shapeID,
else
{
const double aTol = Precision::Confusion();
- auto_ptr< BRepClass3d_SolidClassifier> bsc3d;
- auto_ptr<_FaceClassifier> aFaceClassifier;
+ std::unique_ptr< BRepClass3d_SolidClassifier> bsc3d;
+ std::unique_ptr<_FaceClassifier> aFaceClassifier;
if ( theShape.ShapeType() == TopAbs_SOLID )
{
bsc3d.reset( new BRepClass3d_SolidClassifier(theShape));;
typedef TNodeOfNodeListMap::iterator TNodeOfNodeListMapItr;
typedef std::vector<TNodeOfNodeListMapItr> TVecOfNnlmiMap;
typedef std::map<const SMDS_MeshElement*, TVecOfNnlmiMap, TElemSort > TElemOfVecOfNnlmiMap;
- typedef std::auto_ptr< std::list<int> > PGroupIDs;
+ typedef std::unique_ptr< std::list< int > > PGroupIDs;
PGroupIDs RotationSweep (TIDSortedElemSet theElements[2],
const gp_Ax1& theAxis,
if ( !myElemSearcher )
myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
- SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
+ SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>( myElemSearcher );
SMESHUtils::Deleter<SMESH_ElementSearcher>
volSearcher( SMESH_MeshAlgos::GetElementSearcher( *meshDS ));
vector< const SMDS_MeshElement* > suspectFaces, foundVolumes;
gp_Pnt PC;
gp_Vec VNorm;
const SMDS_MeshElement* volumes[2];
- int what = Preparation(face, PN, VN, FNodes, PC, VNorm, volumes);
+ int what = Preparation( face, PN, VN, FNodes, PC, VNorm, volumes );
if ( what == NOT_QUAD )
continue;
if ( volumes[0] && volumes[1] )
if ( toFindVolumes && 0 ) // non-conformal mesh is not suitable for any mesher so far
{
- // there are volumes in the mesh, in a non-conformal mesh an neighbor
+ // there are volumes in the mesh, in a non-conformal mesh a neighbor
// volume can be not found yet
for ( int isRev = 0; isRev < 2; ++isRev )
{
gp_Pnt intP;
for ( int isRev = 0; isRev < 2; ++isRev )
{
- if( !volumes[isRev] && HasIntersection(farPnt[isRev], PC, intP, aContour) )
+ if( !volumes[isRev] && HasIntersection( farPnt[isRev], PC, intP, aContour ))
{
double d = PC.Distance( intP );
if ( d < dist2int[isRev] )
myHelper = new SMESH_MesherHelper( aMesh );
myHelper->IsQuadraticSubMesh( aShape );
// to delete helper at exit from Compute()
- std::auto_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
+ std::unique_ptr<SMESH_MesherHelper> helperDeleter( myHelper );
// get 2 shells
TopoDS_Solid solid = TopoDS::Solid( aShape );