+ return GetAlgo( aMesh.GetSubMesh( aShape ), assignedTo );
+}
+
+//=============================================================================
+/*!
+ * Finds algo to mesh a sub-mesh. Optionally returns a shape the found algo is bound to
+ */
+//=============================================================================
+
+SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_subMesh * aSubMesh,
+ TopoDS_Shape* assignedTo)
+{
+ if ( !aSubMesh ) return 0;
+
+ const TopoDS_Shape & aShape = aSubMesh->GetSubShape();
+ SMESH_Mesh& aMesh = *aSubMesh->GetFather();
+