From 4590b5516c6c833d212f333f12022f5b9b2da87b Mon Sep 17 00:00:00 2001 From: jgv Date: Fri, 21 Nov 2014 13:55:11 +0300 Subject: [PATCH] 0025451: BRepFilletAPI_MakeFillet fails on customer's shape when small radius of fillet is given Test-case for issue #25451 Update of test-cases --- src/Approx/Approx_SameParameter.cxx | 8 ++++++++ src/ChFi3d/ChFi3d_Builder_1.cxx | 4 +++- tests/bugs/modalg_5/bug25451 | 30 +++++++++++++++++++++++++++++ tests/draft/angle/J9 | 2 +- tests/heal/data/advanced/V3 | 2 +- tests/sewing/tol_100/I5 | 1 + tests/sewing/tol_100/I9 | 2 +- tests/sewing/tol_100/J3 | 2 +- tests/sewing/tol_100/J4 | 1 + 9 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 tests/bugs/modalg_5/bug25451 diff --git a/src/Approx/Approx_SameParameter.cxx b/src/Approx/Approx_SameParameter.cxx index ce623f099c..93ce3ac1bb 100644 --- a/src/Approx/Approx_SameParameter.cxx +++ b/src/Approx/Approx_SameParameter.cxx @@ -269,6 +269,14 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots, Standard_Real firstborne= 3.*pc3d(1) - 2.*pc3d(nbp); Standard_Real lastborne = 3.*pc3d(nbp) - 2.*pc3d(1); // Modified by skv - Wed Jun 2 11:50:03 2004 OCC5898 End + //jgv + Standard_Real FirstPar = cons.FirstParameter(); + Standard_Real LastPar = cons.LastParameter(); + if (firstborne < FirstPar) + firstborne = FirstPar; + if (lastborne > LastPar) + lastborne = LastPar; + ///// for(i = 0; i <= nn; i++){ Standard_Real t = unsurnn*i; Standard_Real tc3d = pc3d(1)*(1.-t) + pc3d(nbp)*t; diff --git a/src/ChFi3d/ChFi3d_Builder_1.cxx b/src/ChFi3d/ChFi3d_Builder_1.cxx index d1a95eb5b5..376b1390a0 100644 --- a/src/ChFi3d/ChFi3d_Builder_1.cxx +++ b/src/ChFi3d/ChFi3d_Builder_1.cxx @@ -80,6 +80,8 @@ Standard_Boolean isTangentFaces(const TopoDS_Edge &theEdge, if (BRep_Tool::Continuity( theEdge, theFace1, theFace2 ) != GeomAbs_C0) return Standard_True; + Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge)); + Standard_Real aFirst; Standard_Real aLast; @@ -120,7 +122,7 @@ Standard_Boolean isTangentFaces(const TopoDS_Edge &theEdge, LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar, aSurf1, aSurf2, GeomAbs_G1, - 0.001, 0.001, 0.1, 0.1, 0.1); + 0.001, TolC0, 0.1, 0.1, 0.1); if (!aCont.IsDone()) { nbNotDone++; diff --git a/tests/bugs/modalg_5/bug25451 b/tests/bugs/modalg_5/bug25451 new file mode 100644 index 0000000000..fb149447c4 --- /dev/null +++ b/tests/bugs/modalg_5/bug25451 @@ -0,0 +1,30 @@ +puts "========" +puts "OCC25451" +puts "========" +puts "" +########################################################################################### +# BRepFilletAPI_MakeFillet fails on customer's shape when small radius of fillet is given +########################################################################################### + +smallview + +restore [locate_data_file DoubleVoluteTest.brep] d + +explode d + +donly d_1 d_2 +fit + +blend r1 d_1 0.1 d_2 +fixshape res1 r1 + +blend r2 d_1 0.2 d_2 +fixshape res2 r2 + +blend r3 d_1 0.9 d_2 +fixshape res3 r3 + +blend r4 d_1 1. d_2 +fixshape res4 r4 + +set only_screen_axo 1 diff --git a/tests/draft/angle/J9 b/tests/draft/angle/J9 index 4d745dfa26..65a6927123 100644 --- a/tests/draft/angle/J9 +++ b/tests/draft/angle/J9 @@ -1,5 +1,5 @@ #B5---------------------------------------------- -puts "TODO OCC22803 All:Faulty shapes in variables faulty_1 to faulty_2" +puts "TODO OCC22803 All:Faulty shapes in variables faulty_" plane p 0 0 0 1 0 0 pcone p p 15 14 20 diff --git a/tests/heal/data/advanced/V3 b/tests/heal/data/advanced/V3 index 40568d1282..753730fb54 100644 --- a/tests/heal/data/advanced/V3 +++ b/tests/heal/data/advanced/V3 @@ -1,5 +1,5 @@ if {[string compare $command "SplitAngle"] == 0 } { - puts "TODO ?OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_61" + puts "TODO ?OCC23127 ALL: Faulty shapes in variables faulty_" } restore [locate_data_file BLENDE9699.brep] a diff --git a/tests/sewing/tol_100/I5 b/tests/sewing/tol_100/I5 index a49532f817..6bd9527c56 100644 --- a/tests/sewing/tol_100/I5 +++ b/tests/sewing/tol_100/I5 @@ -1 +1,2 @@ restore [locate_data_file CIN901_intcqhmi.rle] a +set nb_f 6 diff --git a/tests/sewing/tol_100/I9 b/tests/sewing/tol_100/I9 index 4d94412fa6..ba4709726b 100644 --- a/tests/sewing/tol_100/I9 +++ b/tests/sewing/tol_100/I9 @@ -1,3 +1,3 @@ restore [locate_data_file CIN902_intcqhmm.rle] a set nb_f "" -set nbFreeEdges 10 \ No newline at end of file +set nbFreeEdges 28 \ No newline at end of file diff --git a/tests/sewing/tol_100/J3 b/tests/sewing/tol_100/J3 index 3a703f8ee0..ba649fa4bf 100644 --- a/tests/sewing/tol_100/J3 +++ b/tests/sewing/tol_100/J3 @@ -1,3 +1,3 @@ restore [locate_data_file CIN902_intcqhmp.rle] a -set nb_f 4 +set nb_f 7 set nbFreeEdges 19 \ No newline at end of file diff --git a/tests/sewing/tol_100/J4 b/tests/sewing/tol_100/J4 index 7b20873b3a..eae835272d 100644 --- a/tests/sewing/tol_100/J4 +++ b/tests/sewing/tol_100/J4 @@ -1 +1,2 @@ restore [locate_data_file CIN902_intcqhmq.rle] a +puts "TODO ?#23150 ALL: Error : Number of faults is"