]> OCCT Git - occt-copy.git/commitdiff
0028718: Section result has a break
authornbv <nbv@opencascade.com>
Thu, 18 May 2017 12:31:13 +0000 (15:31 +0300)
committernbv <nbv@opencascade.com>
Fri, 19 May 2017 12:00:15 +0000 (15:00 +0300)
Fix of the problem.

src/IntTools/IntTools_FaceFace.cxx
tests/bugs/modalg_6/bug28718 [new file with mode: 0644]

index b3a1ba5134ab69b48cf80cb6cc4244589676f2ef..d99c0c1792e8384d2bebc1f7dea86635a0158018 100644 (file)
@@ -1025,12 +1025,15 @@ Standard_Real IntTools_FaceFace::ComputeTolerance()
     }
   }// if ((aType1==GeomAbs_Plane && aType2==GeomAbs_Torus) ||
   //
+  else if ((aType1 == GeomAbs_Plane && aType2 == GeomAbs_SurfaceOfExtrusion) ||
+           (aType2 == GeomAbs_Plane && aType1 == GeomAbs_SurfaceOfExtrusion))
+  {
+    myTolReached3d = ComputeTolerance();
+  }
   else if ((aType1==GeomAbs_SurfaceOfRevolution && aType2==GeomAbs_Cylinder) ||
            (aType2==GeomAbs_SurfaceOfRevolution && aType1==GeomAbs_Cylinder) ||
            (aType1==GeomAbs_Plane && aType2==GeomAbs_Sphere) ||
            (aType2==GeomAbs_Plane && aType1==GeomAbs_Sphere) ||
-           (aType1==GeomAbs_Plane && aType2==GeomAbs_SurfaceOfExtrusion) ||
-           (aType2==GeomAbs_Plane && aType1==GeomAbs_SurfaceOfExtrusion) ||
            (aType1==GeomAbs_Plane && aType2==GeomAbs_BSplineSurface) ||
            (aType2==GeomAbs_Plane && aType1==GeomAbs_BSplineSurface) ||
            (aType1==GeomAbs_Cylinder && aType2==GeomAbs_BSplineSurface) ||
diff --git a/tests/bugs/modalg_6/bug28718 b/tests/bugs/modalg_6/bug28718
new file mode 100644 (file)
index 0000000..22727f3
--- /dev/null
@@ -0,0 +1,30 @@
+puts "========"
+puts "OCC28718"
+puts "========"
+puts ""
+#################################################
+# Section result has a break
+#################################################
+
+set ExpTol 1.0665733242938802e-008
+
+restore [locate_data_file bug28718_bulk_1.brep] b1
+restore [locate_data_file bug28718_hull.brep] b2
+
+####
+
+explode b1 f
+explode b2 f
+axo
+don b2_61
+fit
+
+set log [bopcurves b1_1 b2_61 -2d]
+
+regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
+checkreal TolReached $Toler $ExpTol 0.0 0.1
+
+bsection result b1 b2
+
+set length 19.1199
+set 2dviewer 1
\ No newline at end of file