0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true...
authormsv <msv@opencascade.com>
Tue, 30 Jan 2018 13:03:06 +0000 (16:03 +0300)
committerapn <apn@opencascade.com>
Wed, 31 Jan 2018 14:22:16 +0000 (17:22 +0300)
Correct the method BRepBndLib::Add so that to enlarge the bounding box on the tolerance of edges which curves participate in calculation of the box.

src/BRepBndLib/BRepBndLib.cxx
tests/lowalgos/bnd/bug29463 [new file with mode: 0644]
tests/lowalgos/grids.list

index f89d559..b739683 100644 (file)
@@ -115,8 +115,9 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria
           }
           else {
             for (;ex2.More();ex2.Next()) {
-              BC.Initialize(TopoDS::Edge(ex2.Current()));
-              BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(F), B);
+              const TopoDS_Edge& anEdge = TopoDS::Edge(ex2.Current());
+              BC.Initialize(anEdge);
+              BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(anEdge), B);
             }
             B.Enlarge(BRep_Tool::Tolerance(F));
           }
diff --git a/tests/lowalgos/bnd/bug29463 b/tests/lowalgos/bnd/bug29463
new file mode 100644 (file)
index 0000000..5df0b05
--- /dev/null
@@ -0,0 +1,16 @@
+puts "========"
+puts "OCC29463"
+puts "========"
+puts ""
+#################################################
+# Method BndBox::IsOut() returns true for point lying on the planar face
+#################################################
+
+restore [locate_data_file bug29463_face13_691.brep] f
+
+vertex v 165.16888924444618 16.119975403493935 6.6799998283386177
+set res [isbbinterf f v]
+
+if [regexp "The shapes are NOT interfered by AABB" $res] {
+  puts "Error: bounding box works incorrect"
+}
index 8b614e1..6a82606 100644 (file)
@@ -1 +1,2 @@
 001 2dinter
+002 bnd