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,
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 INSTANCE METHODS ----------