From 3389667b4cd99b7fe11c16e65332ad36cb163ebf Mon Sep 17 00:00:00 2001 From: emv Date: Fri, 15 Feb 2013 16:48:17 +0400 Subject: [PATCH] 0023751: Test case bugs modalg bug6334 does not work with new Boolean Operation Algorithm. Fix for the bug. Added simple condition: If the map myShapes (map of the parts of the tool that should be in result shape) is not filled then boolean operation of the given type will be performed. Modified test case bugs/modalg_4/bug6334. Small correction test cases --- src/BRepFeat/BRepFeat_Builder.cdl | 3 ++ src/BRepFeat/BRepFeat_Builder.cxx | 61 ++++++++++++++++--------------- tests/bugs/modalg_4/bug6272_6 | 2 +- tests/bugs/modalg_4/bug6334 | 8 ++-- tests/bugs/moddata_1/bug152_1 | 2 +- 5 files changed, 40 insertions(+), 36 deletions(-) diff --git a/src/BRepFeat/BRepFeat_Builder.cdl b/src/BRepFeat/BRepFeat_Builder.cdl index a79d786f8e..c0c96582f5 100755 --- a/src/BRepFeat/BRepFeat_Builder.cdl +++ b/src/BRepFeat/BRepFeat_Builder.cdl @@ -26,6 +26,9 @@ class Builder from BRepFeat -- kept parts of the tool. -- Input data: a) DS; -- b) The kept parts of the tool; + -- If the map of the kept parts of the tool + -- is not filled boolean operation of the + -- given type will be performed; -- c) Operation required. -- Steps: a) Fill myShapes, myRemoved maps; -- b) Rebuild edges and faces; diff --git a/src/BRepFeat/BRepFeat_Builder.cxx b/src/BRepFeat/BRepFeat_Builder.cxx index 4a7c9f29fe..c1254751f1 100755 --- a/src/BRepFeat/BRepFeat_Builder.cxx +++ b/src/BRepFeat/BRepFeat_Builder.cxx @@ -231,35 +231,38 @@ { myOperation = myFuse ? BOPAlgo_FUSE : BOPAlgo_CUT; // - Prepare(); - // - RebuildFaces(); - // - FillImagesContainers(TopAbs_SHELL); - if (myErrorStatus) { - return; - } - // - FillImagesSolids(); - if (myErrorStatus) { - return; - } - // - CheckSolidImages(); - // - BuildResult(TopAbs_SOLID); - if (myErrorStatus) { - return; - } - // - FillImagesCompounds(); - if (myErrorStatus) { - return; - } - // - BuildResult(TopAbs_COMPOUND); - if (myErrorStatus) { - return; + if (!myShapes.IsEmpty()) { + // + Prepare(); + // + RebuildFaces(); + // + FillImagesContainers(TopAbs_SHELL); + if (myErrorStatus) { + return; + } + // + FillImagesSolids(); + if (myErrorStatus) { + return; + } + // + CheckSolidImages(); + // + BuildResult(TopAbs_SOLID); + if (myErrorStatus) { + return; + } + // + FillImagesCompounds(); + if (myErrorStatus) { + return; + } + // + BuildResult(TopAbs_COMPOUND); + if (myErrorStatus) { + return; + } } // BuildShape(); diff --git a/tests/bugs/modalg_4/bug6272_6 b/tests/bugs/modalg_4/bug6272_6 index 625b1e9e32..4bc54718e4 100755 --- a/tests/bugs/modalg_4/bug6272_6 +++ b/tests/bugs/modalg_4/bug6272_6 @@ -1,5 +1,5 @@ puts "TODO OCC11111 ALL: Error : The square of result shape is" -puts "TODO OCC11111 ALL: Error : Result shape is WRONG" +puts "TODO ?OCC11111 ALL: Error : Result shape is WRONG" puts "============" puts "OCC6272" diff --git a/tests/bugs/modalg_4/bug6334 b/tests/bugs/modalg_4/bug6334 index b90cd69b7e..079031c4a3 100755 --- a/tests/bugs/modalg_4/bug6334 +++ b/tests/bugs/modalg_4/bug6334 @@ -1,5 +1,3 @@ -puts "TODO OCC11111 ALL: Error : Result shape is WRONG" - puts "============" puts "OCC6334" puts "============" @@ -42,15 +40,15 @@ renamevar h result set square 117509 -set nb_v_good 32 -set nb_e_good 53 +set nb_v_good 30 +set nb_e_good 51 set nb_w_good 27 set nb_f_good 24 set nb_sh_good 1 set nb_sol_good 1 set nb_compsol_good 0 set nb_compound_good 1 -set nb_shape_good 139 +set nb_shape_good 135 # 4. Check thickness of box and hole diff --git a/tests/bugs/moddata_1/bug152_1 b/tests/bugs/moddata_1/bug152_1 index 377ed05f78..8558b3c3a5 100755 --- a/tests/bugs/moddata_1/bug152_1 +++ b/tests/bugs/moddata_1/bug152_1 @@ -1,6 +1,6 @@ # by apn master-master 03.12.2012 puts "TODO OCC12345 ALL: Error : The square of result shape is" -puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO ?OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" #puts "TODO OCC12345 ALL: An exception was caught" #puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*" #puts "TODO OCC12345 ALL: TEST INCOMPLETE"