Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_GlueAnalyser.cxx
index b2d4e75834c584ed865133ec03b2b418545bf2f2..8a7124c3196b52d812008e9c66f1abb456f12bf6 100644 (file)
@@ -1,9 +1,29 @@
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 // File:       GEOMAlgo_GlueDetector.cxx
 // Created:    Wed Dec 15 11:08:09 2004
 // Author:     Peter KURNEV
 //             <pkv@irinox>
-
-
+//
 #include <GEOMAlgo_GlueAnalyser.ixx>
 
 #include <TopoDS.hxx>
@@ -22,8 +42,8 @@
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
 
-#include <GEOMAlgo_PassKey.hxx>
-#include <GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx>
+#include <GEOMAlgo_PassKeyShape.hxx>
+#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
 #include <GEOMAlgo_Tools.hxx>
 #include <GEOMAlgo_CoupleOfShapes.hxx>
 
   TopoDS_Shape aNewShape;
   TopTools_IndexedMapOfShape aMF;
   TopTools_ListIteratorOfListOfShape aItS;
-  GEOMAlgo_PassKey aPKF;
-  GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLF;
+  GEOMAlgo_PassKeyShape aPKF;
+  GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
   //
   TopExp::MapShapes(myShape, aType, aMF);
   //
   for (i=1; i<=aNbF; ++i) {
     const TopoDS_Shape& aS=aMF(i);
     // 
-    aPKF.Clear();
+    //aPKF.Clear();//qft
     if (aType==TopAbs_FACE) {
       const TopoDS_Face& aF=TopoDS::Face(aS);
       FacePassKey(aF, aPKF);
   TopTools_IndexedDataMapOfShapeListOfShape aMFS;
   TopTools_IndexedMapOfShape aMx, aMS;
   TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm;
-  GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLS;
-  GEOMAlgo_PassKey aPKSx;
   GEOMAlgo_CoupleOfShapes aCS;
   //
+  GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS;
+  GEOMAlgo_PassKeyShape aPKSx;
+  //
   aBB.MakeCompound(aCmp);
   //
   TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
       continue;
     }
     //
-    aPKSx.Clear();
-    aPKSx.SetIds(aSx[0], aSx[1]);
+    //aPKSx.Clear();//qft
+    //qf
+    //aPKSx.SetIds(aSx[0], aSx[1]);
+    aPKSx.SetShapes(aSx[0], aSx[1]);
+    //qt
     //
     if (!aMPKLS.Contains(aPKSx)) {
       TopTools_ListOfShape aLSx;