1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
#include <IFGraph_StrongComponants.ixx>
//#include <IFGraph_SortedStrongs.hxx>
#include <Interface_Graph.hxx>
#include <Interface_GraphContent.hxx>
//#define PRINTDEB
#define pbgraphtool
IFGraph_StrongComponants::IFGraph_StrongComponants
(const Interface_Graph& agraph, const Standard_Boolean whole)
: IFGraph_SubPartsIterator (agraph, whole) { }
void IFGraph_StrongComponants::Evaluate ()
{
Interface_GraphContent iter = Loaded();
Interface_Graph G(thegraph); G.GetFromIter(iter,0);
#ifdef pbgraphtool
Standard_Integer nb = G.Size();
for (Standard_Integer i = 1; i <= nb; i ++) {
if (!G.IsPresent(i)) continue;
AddPart();
GetFromEntity (G.Entity(i),Standard_False);
}
#else
#ifdef PRINTDEB
cout<<"StrongComponants :"<<endl;
#endif
for (IFGraph_SortedStrongs res(G); res.More(); res.Next()) {
Standard_Integer nb = res.NbVertices();
#ifdef PRINTDEB
cout<<" Iteration, Vertices:"<<nb<<" :";
#endif
if (nb == 0) continue;
AddPart();
for (Standard_Integer i = 1; i <= nb; i ++)
#ifdef PRINTDEB
{
Handle(Standard_Transient) oneres = res.Value(i);
cout<<" "<<G.EntityNumber(oneres);
GetFromEntity(oneres,Standard_False);
}
cout<<endl;
#else
GetFromEntity(res.Value(i),Standard_False);
#endif
}
#endif
}