]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
NPAL14978: EDF373: GEOM Script working on 3.2.1, not in 3.2.4, 3.2.5. Improved Partit...
authorjfa <jfa@opencascade.com>
Tue, 6 Mar 2007 10:44:59 +0000 (10:44 +0000)
committerjfa <jfa@opencascade.com>
Tue, 6 Mar 2007 10:44:59 +0000 (10:44 +0000)
src/NMTDS/NMTDS_ShapesDataStructure.cxx

index 229f3c5436ced0ecc40af286bcaae831f44b7018..c7355995b5c7ac561d89b35293cebb3c156af3d7 100644 (file)
 
 
 #include <NMTDS_ShapesDataStructure.ixx>
+
+#include <TColStd_MapOfInteger.hxx>
+
 #include <TopoDS_Iterator.hxx>
 #include <TopoDS_Shape.hxx>
+
+#include <BooleanOperations_ShapeAndInterferences.hxx>
 #include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
+#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
+
 #include <NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
 #include <NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <BooleanOperations_ShapeAndInterferences.hxx>
 #include <NMTDS_IndexRange.hxx>
-//
-#include <BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors.hxx>
-#include <BooleanOperations_AncestorsSeqAndSuccessorsSeq.hxx>
-#include <TColStd_MapOfInteger.hxx>
 
 //===========================================================================
 //function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure
   NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx;
   NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit;
   TopoDS_Iterator anIt;
-  // Modified  Thu Sep 14 14:35:18 2006 
-  // Contribution of Samtech www.samcef.com BEGIN
   BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMSA;
-  // Contribution of Samtech www.samcef.com END
   //
   anIt.Initialize(myCompositeShape);
-  for (i=0; anIt.More(); anIt.Next(), ++i) {
-    // Modified  Thu Sep 14 14:35:18 2006 
-    // Contribution of Samtech www.samcef.com BEGIN
+  for (; anIt.More(); anIt.Next()) {
     const TopoDS_Shape& aSx=anIt.Value(); 
     BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMS;
-    FillMap(aSx, aMSA, aMS);
-    aLx.Append(aMS);
-    // Contribution of Samtech www.samcef.com END
+    //modified by NIZNHY-PKV Tue Feb 27 17:05:47 2007f
+    //FillMap(aSx, aMSA, aMS);
+    //aLx.Append(aMS);
+    //
+    if (!aMSA.Contains(aSx)) {
+      FillMap(aSx, aMSA, aMS);
+      aLx.Append(aMS);
+    }
+    //modified by NIZNHY-PKV Tue Feb 27 17:06:03 2007t
   }
-  // Modified  Thu Sep 14 14:35:18 2006 
-  // Contribution of Samtech www.samcef.com BEGIN
+  //
   aNbS=aMSA.Extent(); 
-  // Contribution of Samtech www.samcef.com END
   //
   // Fill myRanges
+  //modified by NIZNHY-PKV Tue Feb 27 17:10:07 2007f
+  i=aLx.Extent();
+  //modified by NIZNHY-PKV Tue Feb 27 17:10:10 2007t
   myRanges.Resize(i);
   aLit.Initialize(aLx);
   for (i=1; aLit.More(); aLit.Next(), ++i) {
   // Contribution of Samtech www.samcef.com BEGIN
   //
   // Fill the table
-  //modified by NIZNHY-PKV Tue May 16 11:47:28 2006f
-  
   //aShift=0;
   //for (i=0; i<2; ++i) {
   //  if (i) {
   //    InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift);
   //  }
   //}
-  
+
   aShift=0;
   for (j=1; j<=aNbS; ++j) {
     const TopoDS_Shape& aSx=aMSA.FindKey(j);