From 3bfd1ba8f244293eac7c1d143c01034d59bd39f7 Mon Sep 17 00:00:00 2001 From: jgv Date: Tue, 16 Feb 2016 15:43:13 +0300 Subject: [PATCH] 0026985: Wrong section between two faces: it has a gap --- src/IntWalk/IntWalk_PWalking.cxx | 2 +- tests/bugs/modalg_6/bug26985 | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_6/bug26985 diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index 34c895cb89..aa0c4921d3 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2930,7 +2930,7 @@ IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIso Standard_Real LocalResol = 0.; if (RefDist > gp::Resolution()) LocalResol = pasuv[choixIso] * tolconf / RefDist; - if (pasuv[choixIso] <= LocalResol) + if (pasuv[choixIso] < 2*LocalResol) pasuv[choixIso] = pasInit[choixIso] = 2*LocalResol; } //////////////////////////////////////// diff --git a/tests/bugs/modalg_6/bug26985 b/tests/bugs/modalg_6/bug26985 new file mode 100644 index 0000000000..563864cfa3 --- /dev/null +++ b/tests/bugs/modalg_6/bug26985 @@ -0,0 +1,31 @@ +puts "============" +puts "OCC26985" +puts "============" +puts "" +####################################################################### +# Wrong section between two faces: it has a gap +####################################################################### + +smallview + +set expected_MaxTolerance 1.50777e-005 +set tol_abs_MaxTolerance 1.e-06 +set tol_rel_MaxTolerance 1.e-06 + +restore [locate_data_file bug26985_f1f2.brep] a +explode a + +bop a_1 a_2 +bopsection res +donly res +fit +donly a_1 a_2 res + +checknbshapes res -vertex 2 -edge 1 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 4 + +checkshape res + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance res] full MaxTolerance +checkreal "MaxTolerance" ${MaxTolerance} ${expected_MaxTolerance} ${tol_abs_MaxTolerance} ${tol_rel_MaxTolerance} + +checkprops res -l 0.00503456