From 5f05c0a3d8eb81ca970775137f9dc6663fa2c05c Mon Sep 17 00:00:00 2001 From: emv Date: Fri, 15 Feb 2013 16:49:54 +0400 Subject: [PATCH] 0023749: Tests cases boolean bsection M9 N4 work incorrect with new Boolean Operation Algorithm. Fix for the cases. Small correction test cases --- src/BOPAlgo/BOPAlgo_Builder.cxx | 2 +- src/BOPInt/BOPInt_ShrunkRange.cxx | 7 ++++--- tests/boolean/bsection/M9 | 6 +++--- tests/boolean/bsection/N4 | 2 +- tests/bugs/modalg_4/bug726_1 | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_Builder.cxx b/src/BOPAlgo/BOPAlgo_Builder.cxx index 4fd40e09eb..8c15237ce4 100644 --- a/src/BOPAlgo/BOPAlgo_Builder.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder.cxx @@ -369,6 +369,6 @@ void BOPAlgo_Builder::PostTreat() { //BRepLib::SameParameter(myShape, 1.e-7, Standard_True); - BOPTools_AlgoTools::CorrectTolerances(myShape, 0.01); + BOPTools_AlgoTools::CorrectTolerances(myShape, 0.05); BOPTools_AlgoTools::CorrectShapeTolerances(myShape); } diff --git a/src/BOPInt/BOPInt_ShrunkRange.cxx b/src/BOPInt/BOPInt_ShrunkRange.cxx index 74e45cbcce..05c765ebc4 100644 --- a/src/BOPInt/BOPInt_ShrunkRange.cxx +++ b/src/BOPInt/BOPInt_ShrunkRange.cxx @@ -121,7 +121,7 @@ void BOPInt_ShrunkRange::Perform() { Standard_Real aCF, aCL, aTolE, aTolV1, aTolV2, t1, t11, t1C, t2, t12, t2C; - Standard_Real aCoeff, dt1, dt2, aR; + Standard_Real aCoeff, dt1, dt2, aR, anEps; Standard_Integer pri; Standard_Boolean bInf1, bInf2, bAppr; GeomAbs_CurveType aCurveType; @@ -130,6 +130,7 @@ myErrorStatus=0; myTS1=-99; myTS2=myTS1; + anEps = 1.e-8; // aTolE =BRep_Tool::Tolerance(myEdge); aTolV1=BRep_Tool::Tolerance(myV1); @@ -159,7 +160,7 @@ } // bAppr = (fabs(t2 - t1) > 100) ? Standard_False : Standard_True; - if (fabs(t2 - t1) < Precision::PConfusion()) { + if (fabs(t2 - t1) < anEps) { myErrorStatus=7; return; } @@ -429,7 +430,7 @@ t2C=t1C+0.1*(t2-t1C); } // - if (t2C-t1C < Precision::PConfusion()) { + if (t2C-t1C < anEps) { myErrorStatus = 7; return; } diff --git a/tests/boolean/bsection/M9 b/tests/boolean/bsection/M9 index 84a9438742..0e08b60814 100644 --- a/tests/boolean/bsection/M9 +++ b/tests/boolean/bsection/M9 @@ -1,6 +1,6 @@ -puts "TODO #23749 ALL: Exception" -puts "TODO #23749 ALL: An exception was caught" -puts "TODO #23749 ALL: TEST INCOMPLETE" +#puts "TODO #23749 ALL: Exception" +#puts "TODO #23749 ALL: An exception was caught" +#puts "TODO #23749 ALL: TEST INCOMPLETE" restore [locate_data_file lh3d_px1.brep] a diff --git a/tests/boolean/bsection/N4 b/tests/boolean/bsection/N4 index 2f11b6f716..4db41bfa52 100644 --- a/tests/boolean/bsection/N4 +++ b/tests/boolean/bsection/N4 @@ -1,4 +1,4 @@ -puts "TODO #23749 ALL: Faulty shapes in variables faulty_1 to faulty_" +#puts "TODO #23749 ALL: Faulty shapes in variables faulty_1 to faulty_" cpulimit 2000 restore [locate_data_file lh3d_px2.brep] a diff --git a/tests/bugs/modalg_4/bug726_1 b/tests/bugs/modalg_4/bug726_1 index 74a941b321..5539e0de46 100755 --- a/tests/bugs/modalg_4/bug726_1 +++ b/tests/bugs/modalg_4/bug726_1 @@ -1,5 +1,5 @@ -puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_" -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: Error : The square of result shape is" puts "========" puts "OCC726" @@ -17,5 +17,5 @@ checkshape a_2 bcommon result a_1 a_2 -set square 0 +set square 73346.6 set 2dviewer 0