0024025: The method Modified2() in BRepAlgoAPI_BooleanOperation should be removed.
authoremv <emv@opencascade.com>
Thu, 20 Jun 2013 11:48:11 +0000 (15:48 +0400)
committeremv <emv@opencascade.com>
Thu, 20 Jun 2013 11:48:11 +0000 (15:48 +0400)
Removed method BRepAlgoAPI_BooleanOperation::Modified2(const TopoDS_Shape& aS) as it is no longer relevant (in the previous version of BOP it had used History collector to find modified shapes, but there is no such collector in current version of BOP). The replacement for this method is BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_Shape& aS).
Small correction of test case

src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cdl
src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx
src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx
src/QANewBRepNaming/QANewBRepNaming_Loader.cxx
src/QANewModTopOpe/QANewModTopOpe_Limitation.cdl
src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx
tests/caf/nam/A8 [changed mode: 0644->0755]

index 1b9ffec..2e7f906 100755 (executable)
@@ -136,15 +136,6 @@ is
        ---Purpose: Returns true if the shape S has been deleted. The
        -- result shape of the operation does not contain the shape S.
         
        ---Purpose: Returns true if the shape S has been deleted. The
        -- result shape of the operation does not contain the shape S.
         
-    Modified2 (me: in out;  
-               aS : Shape from TopoDS) 
-       returns ListOfShape from TopTools
-       is virtual;
-       ---Purpose: Returns the list  of shapes modified from the shape <S>.
-       ---         For use in BRepNaming.
-       ---C++: return const & 
-       ---Level: Public
-
     Generated (me: in out; S : Shape from TopoDS)
        returns ListOfShape from TopTools
        is redefined virtual;
     Generated (me: in out; S : Shape from TopoDS)
        returns ListOfShape from TopTools
        is redefined virtual;
index 0033847..262cef1 100755 (executable)
@@ -350,42 +350,6 @@ const  TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::SectionEdges()
   return myGenerated;
 }
 
   return myGenerated;
 }
 
-// ================================================================================================
-// function: Modified2
-// purpose:
-// ================================================================================================
-const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified2(const TopoDS_Shape& aS) 
-{
-  if (myBuilder==NULL) {
-    myGenerated.Clear();
-    return myGenerated;
-  }
-  //
-  BOPCol_ListOfShape aLS;
-  BOPCol_ListIteratorOfListOfShape aIt;
-  myGenerated.Clear();
-  //
-  const BOPCol_DataMapOfShapeListOfShape& aImages = myBuilder->Images();
-  if (aImages.IsBound(aS)) {
-    aLS = aImages.Find(aS);
-  } else {
-    myGenerated.Append(aS);
-  }
-  //
-  aIt.Initialize(aLS);
-  for (;aIt.More(); aIt.Next()) {
-    myGenerated.Append(aIt.Value());
-  }
-  //
-  if (myFuseEdges) {
-    TopTools_ListOfShape theLS;
-    theLS.Assign(myGenerated);
-    //
-    RefinedList(theLS);
-  }
-  return myGenerated;
-}
-
 // ================================================================================================
 // function: Generated
 // purpose:
 // ================================================================================================
 // function: Generated
 // purpose:
index 3e707d5..b2fd994 100755 (executable)
@@ -523,7 +523,7 @@ void QANewBRepNaming_BooleanOperationFeat::LoadModified11 (BRepAlgoAPI_BooleanOp
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
-    const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if(Shapes.Extent() == 1) {found = Standard_True; break;}
   }
     
     if(Shapes.Extent() == 1) {found = Standard_True; break;}
   }
     
@@ -534,7 +534,7 @@ void QANewBRepNaming_BooleanOperationFeat::LoadModified11 (BRepAlgoAPI_BooleanOp
     for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
       const TopoDS_Shape& Root = ShapeExplorer.Current ();
       if (!View.Add(Root)) continue;
     for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
       const TopoDS_Shape& Root = ShapeExplorer.Current ();
       if (!View.Add(Root)) continue;
-      const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+      const TopTools_ListOfShape& Shapes = MS.Modified (Root);
       if(Shapes.Extent() > 1) continue;
       TopTools_ListIteratorOfListOfShape ShapesIterator (Shapes);
       for (;ShapesIterator.More (); ShapesIterator.Next ()) {
       if(Shapes.Extent() > 1) continue;
       TopTools_ListIteratorOfListOfShape ShapesIterator (Shapes);
       for (;ShapesIterator.More (); ShapesIterator.Next ()) {
@@ -690,7 +690,7 @@ void QANewBRepNaming_BooleanOperationFeat::Load1nFaces(BRepAlgoAPI_BooleanOperat
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
-    const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if(Shapes.Extent() < 2) continue; 
     aListR.Append(Root);
   }
     if(Shapes.Extent() < 2) continue; 
     aListR.Append(Root);
   }
@@ -700,7 +700,7 @@ void QANewBRepNaming_BooleanOperationFeat::Load1nFaces(BRepAlgoAPI_BooleanOperat
   TopTools_ListIteratorOfListOfShape Itr(aListR);
   for(;Itr.More();Itr.Next()) {
     const TopoDS_Shape& Root = Itr.Value();
   TopTools_ListIteratorOfListOfShape Itr(aListR);
   for(;Itr.More();Itr.Next()) {
     const TopoDS_Shape& Root = Itr.Value();
-    const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     TopTools_ListOfShape aList;
     gp_Ax1 anAx = ComputeAxis(MS.Shape2());    
     if(Shapes.Extent() == 2)
     TopTools_ListOfShape aList;
     gp_Ax1 anAx = ComputeAxis(MS.Shape2());    
     if(Shapes.Extent() == 2)
@@ -733,7 +733,7 @@ void QANewBRepNaming_BooleanOperationFeat::LoadModified1n (BRepAlgoAPI_BooleanOp
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
-    const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if(Shapes.Extent() >= 2) aNum += Shapes.Extent();
   }
   
     if(Shapes.Extent() >= 2) aNum += Shapes.Extent();
   }
   
@@ -743,7 +743,7 @@ void QANewBRepNaming_BooleanOperationFeat::LoadModified1n (BRepAlgoAPI_BooleanOp
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
   for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
     const TopoDS_Shape& Root = ShapeExplorer.Current ();
     if (!View.Add(Root)) continue;
-    const TopTools_ListOfShape& Shapes = MS.Modified2 (Root);
+    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if(Shapes.Extent() >= 2) aNum += Shapes.Extent();
   }
 
     if(Shapes.Extent() >= 2) aNum += Shapes.Extent();
   }
 
index f1d66e8..14f9ea2 100755 (executable)
@@ -128,7 +128,7 @@ void QANewBRepNaming_Loader::LoadModifiedShapes (BRepBuilderAPI_MakeShape&    MS
     if (!View.Add(Root)) continue;
 //    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if (theBool) 
     if (!View.Add(Root)) continue;
 //    const TopTools_ListOfShape& Shapes = MS.Modified (Root);
     if (theBool) 
-      Shapes = pMS->Modified2 (Root);
+      Shapes = pMS->Modified (Root);
     else
       Shapes = MS.Modified (Root);
     TopTools_ListIteratorOfListOfShape ShapesIterator (Shapes);
     else
       Shapes = MS.Modified (Root);
     TopTools_ListIteratorOfListOfShape ShapesIterator (Shapes);
index d239660..e8bcafe 100755 (executable)
@@ -68,14 +68,6 @@ is
         ---Level: Public
     returns ListOfShape from TopTools
     is redefined;
         ---Level: Public
     returns ListOfShape from TopTools
     is redefined;
-    Modified2 (me: in out;  
-               aS : Shape from TopoDS) 
-       returns ListOfShape from TopTools;
-    ---Purpose: Returns the list  of shapes modified from the shape <S>.
-    ---         For use in BRepNaming.
-    ---C++: return const & 
-    ---Level: Public
 
     Generated (me: in out; S : Shape from TopoDS)
        returns ListOfShape from TopTools
 
     Generated (me: in out; S : Shape from TopoDS)
        returns ListOfShape from TopTools
index 694ffe2..4794e69 100755 (executable)
@@ -197,38 +197,6 @@ const TopTools_ListOfShape& QANewModTopOpe_Limitation::Modified(const TopoDS_Sha
   return myGenerated;
 }
 
   return myGenerated;
 }
 
-// ================================================================================================
-// function: Modified2
-// purpose:
-// ================================================================================================
-const TopTools_ListOfShape& QANewModTopOpe_Limitation::Modified2(const TopoDS_Shape& aS) 
-{
-  Check();
-  myGenerated.Clear();
-  if(myMode == QANewModTopOpe_Forward) {
-    myGenerated = myCut->Modified2(aS);
-  }
-  else if(myMode == QANewModTopOpe_Reversed) {
-    myGenerated = myCommon->Modified2(aS);
-  }
-  else {
-    myGenerated = myCut->Modified2(aS);
-
-    TopTools_MapOfShape aMap; // to check if shape can be added in list more then one time
-    TopTools_ListIteratorOfListOfShape It(myGenerated);
-    for(;It.More();It.Next()) {
-      aMap.Add(It.Value());
-    }
-    
-    It.Initialize(myCommon->Modified2(aS));
-    for(;It.More();It.Next()) {
-      if(aMap.Add(It.Value())) myGenerated.Append(It.Value());
-    }
-  }
-
-  return myGenerated;
-}
-
 // ================================================================================================
 // function: Generated
 // purpose:
 // ================================================================================================
 // function: Generated
 // purpose:
old mode 100644 (file)
new mode 100755 (executable)
index 516a429..4da1343
@@ -1,6 +1,6 @@
-puts "TODO OCC12345 ALL: An exception was caught"
-puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
-puts "TODO OCC12345 ALL: TEST INCOMPLETE"
+puts "TODO OCC24025 ALL: Two opened shells intersection"
+puts "TODO OCC24025 ALL: Two shells intersection \\(one opened\\)"
+puts "TODO OCC24025 ALL: ERROR OCCURS DURING TEST - FAULTY"
 
 set Test "Boolean operations naming test"
 set IsDone 1
 
 set Test "Boolean operations naming test"
 set IsDone 1