0026985: Wrong section between two faces: it has a gap
authorjgv <jgv@opencascade.com>
Tue, 16 Feb 2016 12:43:13 +0000 (15:43 +0300)
committerabv <abv@opencascade.com>
Sat, 20 Feb 2016 10:04:34 +0000 (13:04 +0300)
src/IntWalk/IntWalk_PWalking.cxx
tests/bugs/modalg_6/bug26985 [new file with mode: 0644]

index 34c895c..aa0c492 100644 (file)
@@ -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 (file)
index 0000000..563864c
--- /dev/null
@@ -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