]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMImpl/GEOMImpl_GlueDriver.cxx
Salome HOME
Backward compatibility OCCT < 6.8.0
[modules/geom.git] / src / GEOMImpl / GEOMImpl_GlueDriver.cxx
index 3f4aa435203c78df0ce9b6772fc94b8f935553fc..1f03275c5a6da57af76f42aaa621f16523b4a4f3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -436,35 +436,10 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape
   aGA.Detect();
 
   //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
-#if OCC_VERSION_LARGE > 0x06050200
   Standard_Integer iWrnDetect = aGA.WarningStatus();
   if (iWrnDetect == 2) {
-    /*
-    TopTools_ListIteratorOfListOfShape aItLS;
-
-    // Sticked shapes are detected
-    const TopTools_IndexedDataMapOfShapeListOfShape& aIDMSS = pGluer2->StickedShapes();
-
-    Standard_Integer i, aNb = aIDMSS.Extent();
-    for (i = 1; i <= aNb; ++i) {
-      // ancestor aSa (edge, wire face,..)  
-      const TopoDS_Shape& aSa = aIDMSS.FindKey(i); 
-
-      // successors aSs (vertex, edge, ...)
-      // of the ancestor that are sticked 
-      // for given value of the tolerance
-      const TopTools_ListOfShape& aLSS = aIDMSS.FindFromIndex(i);
-      aItLS.Initialize(aLSS);
-      for (; aItLS.More(); aItLS.Next()) {
-        const TopoDS_Shape& aSs = aItLS.Value();
-      }
-    }
-    */
     Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
-    //Standard_Failure::Raise("Sticked shapes are detected. The tolerance value is too big.");
-    //theWarning = "Sticked shapes are detected. The tolerance value is too big.";
   }
-#endif
   //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
 
   Standard_Integer iErr = aGA.ErrorStatus();
@@ -617,6 +592,35 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueByList (const TopoDS_Shape& theShape,
 
   // 2. Detect interferred shapes
   aGA.Detect();
+
+  //modified by NIZNHY-PKV Tue Mar 13 14:07:12 2012f
+  Standard_Integer iWrnDetect = aGA.WarningStatus();
+  if (iWrnDetect == 2) {
+    /*
+    TopTools_ListIteratorOfListOfShape aItLS;
+
+    // Sticked shapes are detected
+    const TopTools_IndexedDataMapOfShapeListOfShape& aIDMSS = pGluer2->StickedShapes();
+
+    Standard_Integer i, aNb = aIDMSS.Extent();
+    for (i = 1; i <= aNb; ++i) {
+      // ancestor aSa (edge, wire face,..)  
+      const TopoDS_Shape& aSa = aIDMSS.FindKey(i); 
+
+      // successors aSs (vertex, edge, ...)
+      // of the ancestor that are sticked 
+      // for given value of the tolerance
+      const TopTools_ListOfShape& aLSS = aIDMSS.FindFromIndex(i);
+      aItLS.Initialize(aLSS);
+      for (; aItLS.More(); aItLS.Next()) {
+        const TopoDS_Shape& aSs = aItLS.Value();
+      }
+    }
+    */
+    Standard_Failure::Raise("GLUE_ERROR_STICKED_SHAPES");
+  }
+  //modified by NIZNHY-PKV Tue Mar 13 14:07:14 2012t
+
   Standard_Integer iErr = aGA.ErrorStatus();
   if (iErr) {
     switch (iErr) {