Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IFGraph / IFGraph_Cycles.cxx
diff --git a/src/IFGraph/IFGraph_Cycles.cxx b/src/IFGraph/IFGraph_Cycles.cxx
new file mode 100755 (executable)
index 0000000..93d4807
--- /dev/null
@@ -0,0 +1,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());
+  }
+}