0031602: [Regression vs 7.0.0] Modeling Algorithms - Invalid result of boolean operation
authorifv <ifv@opencascade.com>
Wed, 10 Jun 2020 16:33:27 +0000 (19:33 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 18 Jun 2020 16:59:49 +0000 (19:59 +0300)
IntPatch/IntPatch_ImpImpIntersection_4.gxx : adding tolerance in comparison surface range and surface period
bug31602: test case added

src/IntPatch/IntPatch_ImpImpIntersection_4.gxx
tests/lowalgos/intss/bug31602 [new file with mode: 0644]

index 5f1977d..c8e4028 100644 (file)
@@ -1870,7 +1870,7 @@ static Standard_Boolean AddPointIntoWL( const IntSurf_Quadric& theQuad1,
     return Standard_False;
 
   if ((theLine->NbPoints() > 0) &&
-      ((theUlSurf1 - theUfSurf1) >= thePeriodOfSurf1) &&      
+      ((theUlSurf1 - theUfSurf1) >= (thePeriodOfSurf1 - theTol2D)) &&      
       (((aU1par + thePeriodOfSurf1 - theUlSurf1) <= theTol2D) ||
        ((aU1par - thePeriodOfSurf1 - theUfSurf1) >= theTol2D)))
   {
diff --git a/tests/lowalgos/intss/bug31602 b/tests/lowalgos/intss/bug31602
new file mode 100644 (file)
index 0000000..1225ba7
--- /dev/null
@@ -0,0 +1,33 @@
+puts "================"
+puts "OCC31602"
+puts "================"
+puts ""
+#######################################################################
+# 0031602: [Regression vs 7.0.0] Modeling Algorithms - Invalid result of boolean operation
+#######################################################################
+
+set MaxTol 2.5e-6
+set GoodNbCurv 1
+
+restore [locate_data_file bug31602.brep] f
+explode f f
+
+set log [bopcurves f_1 f_2 -2d]
+
+regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
+
+if {${Toler} > ${MaxTol}} {
+  puts "Error: Tolerance is too big!"
+}
+
+if {${NbCurv} != ${GoodNbCurv}} {
+  puts "Error: Curve Number is bad!"
+}
+checklength c_1 -l 1340.6982492258749
+checklength c2d1_1 -l 407.78567590999006
+checklength c2d2_1 -l 897.8658894846285
+
+smallview
+donly f* c_*
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png