Salome HOME
Porting to OCCT development version: Standard_PI -> M_PI
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_Gluer2_3.cxx
index b6ab53be94dacf05beaf2ce9aa4559389c2fad61..d39bb4f9017e57f126c17866858da5a768d534fb 100644 (file)
@@ -22,8 +22,7 @@
 // File:       GEOMAlgo_Gluer2_3.cxx
 // Created:    
 // Author:     Peter KURNEV
-//             <peter@PREFEX>
-//
+
 #include <GEOMAlgo_Gluer2.hxx>
 
 #include <TopAbs_ShapeEnum.hxx>
@@ -332,16 +331,41 @@ void MapShapes1(const TopoDS_Shape& aS,
               const TopAbs_ShapeEnum aType,
               TopTools_IndexedMapOfShape& aM)
 {
-  TopExp_Explorer aEx (aS, aType);
-  while (aEx.More()) {
-    const TopoDS_Shape aSx=aEx.Current();
+  TopExp_Explorer aExp;
+  
+  aExp.Init (aS, aType);
+  for ( ;aExp.More(); aExp.Next()) {
+    const TopoDS_Shape aSx=aExp.Current();
+    if (aType==TopAbs_EDGE) {
+      const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
+      if (BRep_Tool::Degenerated(aEx)) {
+       continue;
+      }
+    }
+    aM.Add(aSx);
+  }
+}
+/*
+//=======================================================================
+//function : MapShapes1
+//purpose  : 
+//=======================================================================
+void MapShapes1(const TopoDS_Shape& aS,
+              const TopAbs_ShapeEnum aType,
+              TopTools_IndexedMapOfShape& aM)
+{
+  TopExp_Explorer aExp (aS, aType);
+  while (aExp.More()) {
+    const TopoDS_Shape aSx=aExp.Current();
     if (aType==TopAbs_EDGE) {
       const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx);
       if (BRep_Tool::Degenerated(aEx)) {
+       aExp.Next();
        continue;
       }
     }
     aM.Add(aSx);
-    aEx.Next();
+    aExp.Next();
   }
 }
+*/