Merge from BR_V5_DEV 17Feb09

This commit is contained in:
vsr 2009-02-17 06:55:16 +00:00
parent 0635c9fc80
commit 18711ecd04
2 changed files with 26 additions and 0 deletions

View File

@ -1149,6 +1149,25 @@ bool SMESH_MesherHelper::LoadNodeColumns(TParam2ColumnMap & theParam2ColumnMap,
return true; return true;
} }
//=======================================================================
/*!
* \brief Return number of unique ancestors of the shape
*/
//=======================================================================
int SMESH_MesherHelper::NbAncestors(const TopoDS_Shape& shape,
const SMESH_Mesh& mesh,
TopAbs_ShapeEnum ancestorType/*=TopAbs_SHAPE*/)
{
TopTools_MapOfShape ancestors;
TopTools_ListIteratorOfListOfShape ansIt( mesh.GetAncestors(shape) );
for ( ; ansIt.More(); ansIt.Next() ) {
if ( ancestorType == TopAbs_SHAPE || ansIt.Value().ShapeType() == ancestorType )
ancestors.Add( ansIt.Value() );
}
return ancestors.Extent();
}
//======================================================================= //=======================================================================
/** /**
* Check mesh without geometry for: if all elements on this shape are quadratic, * Check mesh without geometry for: if all elements on this shape are quadratic,

View File

@ -106,6 +106,13 @@ public:
return ind; return ind;
} }
/*!
* \brief Return number of unique ancestors of the shape
*/
static int NbAncestors(const TopoDS_Shape& shape,
const SMESH_Mesh& mesh,
TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE);
public: public:
// ---------- PUBLIC INSTANCE METHODS ---------- // ---------- PUBLIC INSTANCE METHODS ----------