summaryrefslogtreecommitdiff
path: root/src/IFGraph/IFGraph_Cycles.cxx
blob: 93d480763cd6141cf3005fc8f1915c16d45a2b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <IFGraph_Cycles.ixx>
#include <Interface_GraphContent.hxx>
#include <IFGraph_StrongComponants.hxx>



//  Cycles utilise les services de StrongComponants :
//  Il retient les Strong Componants qui ne sont pas Single


    IFGraph_Cycles::IFGraph_Cycles
  (const Interface_Graph& agraph, const Standard_Boolean whole)
      :  IFGraph_SubPartsIterator (agraph,whole)    {  }

    IFGraph_Cycles::IFGraph_Cycles (IFGraph_StrongComponants& subparts)
      :  IFGraph_SubPartsIterator (subparts)    {  }


    void  IFGraph_Cycles::Evaluate ()
{
  IFGraph_StrongComponants complist(Model(),Standard_False);
  complist.GetFromIter(Loaded());
  for (complist.Start(); complist.More(); complist.Next()) {
    if (complist.IsSingle()) continue;
    AddPart();
    GetFromIter(complist.Entities());
  }
}