From 5549deff05371eab72879089875cf7001ae3b0c5 Mon Sep 17 00:00:00 2001 From: emv Date: Thu, 20 Jun 2013 15:48:11 +0400 Subject: [PATCH] 0024025: The method Modified2() in BRepAlgoAPI_BooleanOperation should be removed. 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 --- .../BRepAlgoAPI_BooleanOperation.cdl | 9 ----- .../BRepAlgoAPI_BooleanOperation.cxx | 36 ------------------- .../QANewBRepNaming_BooleanOperationFeat.cxx | 12 +++---- .../QANewBRepNaming_Loader.cxx | 2 +- .../QANewModTopOpe_Limitation.cdl | 8 ----- .../QANewModTopOpe_Limitation.cxx | 32 ----------------- tests/caf/nam/A8 | 6 ++-- 7 files changed, 10 insertions(+), 95 deletions(-) mode change 100644 => 100755 tests/caf/nam/A8 diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cdl b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cdl index 1b9ffecf3f..2e7f906050 100755 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cdl +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cdl @@ -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. - Modified2 (me: in out; - aS : Shape from TopoDS) - returns ListOfShape from TopTools - is virtual; - ---Purpose: Returns the list of shapes modified from the shape . - --- For use in BRepNaming. - ---C++: return const & - ---Level: Public - Generated (me: in out; S : Shape from TopoDS) returns ListOfShape from TopTools is redefined virtual; diff --git a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx index 003384761b..262cef166b 100755 --- a/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx +++ b/src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx @@ -350,42 +350,6 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::SectionEdges() 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: diff --git a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx index 3e707d5d2b..b2fd994bdf 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_BooleanOperationFeat.cxx @@ -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; - const TopTools_ListOfShape& Shapes = MS.Modified2 (Root); + const TopTools_ListOfShape& Shapes = MS.Modified (Root); 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; - 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 ()) { @@ -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; - const TopTools_ListOfShape& Shapes = MS.Modified2 (Root); + const TopTools_ListOfShape& Shapes = MS.Modified (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(); - 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) @@ -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; - const TopTools_ListOfShape& Shapes = MS.Modified2 (Root); + const TopTools_ListOfShape& Shapes = MS.Modified (Root); 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; - const TopTools_ListOfShape& Shapes = MS.Modified2 (Root); + const TopTools_ListOfShape& Shapes = MS.Modified (Root); if(Shapes.Extent() >= 2) aNum += Shapes.Extent(); } diff --git a/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx b/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx index f1d66e81b9..14f9ea20d3 100755 --- a/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx +++ b/src/QANewBRepNaming/QANewBRepNaming_Loader.cxx @@ -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) - Shapes = pMS->Modified2 (Root); + Shapes = pMS->Modified (Root); else Shapes = MS.Modified (Root); TopTools_ListIteratorOfListOfShape ShapesIterator (Shapes); diff --git a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cdl b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cdl index d239660d1c..e8bcafe2c8 100755 --- a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cdl +++ b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cdl @@ -68,14 +68,6 @@ is ---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 . - --- For use in BRepNaming. - ---C++: return const & - ---Level: Public Generated (me: in out; S : Shape from TopoDS) returns ListOfShape from TopTools diff --git a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx index 694ffe2b81..4794e690e4 100755 --- a/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx +++ b/src/QANewModTopOpe/QANewModTopOpe_Limitation.cxx @@ -197,38 +197,6 @@ const TopTools_ListOfShape& QANewModTopOpe_Limitation::Modified(const TopoDS_Sha 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: diff --git a/tests/caf/nam/A8 b/tests/caf/nam/A8 old mode 100644 new mode 100755 index 516a429090..4da1343321 --- a/tests/caf/nam/A8 +++ b/tests/caf/nam/A8 @@ -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