From: msv Date: Tue, 30 Jan 2018 13:03:06 +0000 (+0300) Subject: 0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=b1ee6d0e4b0f57780124c94e3641350c2fdd8345;p=occt-copy.git 0029463: Regression relation to 691 version: Method BndBox::IsOut() returns true for point lying on the planar face 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. --- diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index f89d559254..b7396836b2 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -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/begin b/tests/lowalgos/begin new file mode 100644 index 0000000000..b752ad2bbc --- /dev/null +++ b/tests/lowalgos/begin @@ -0,0 +1,14 @@ +if { [array get Draw_Groups "TOPOLOGY Check commands"] == "" } { + pload TOPTEST + pload AISV +} +# To prevent loops limit to 1 minutes +cpulimit 60 + +if { [info exists imagedir] == 0 } { + set imagedir . +} + +if { [info exists test_image ] == 0 } { + set test_image photo +} diff --git a/tests/lowalgos/bnd/bug29463 b/tests/lowalgos/bnd/bug29463 new file mode 100644 index 0000000000..35a8fad817 --- /dev/null +++ b/tests/lowalgos/bnd/bug29463 @@ -0,0 +1,21 @@ +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 + +set x 165.16888924444618 +set y 16.119975403493935 +set z 6.6799998283386177 + +# check that vertex with coordinates (x, y, z) is inside the bounding box of f + +boundingstr f xmin ymin zmin xmax ymax zmax + +if {$x < [dval xmin] || $x > [dval xmax] || $y < [dval ymin] || $y > [dval ymax] || $z < [dval zmin] || $z > [dval zmax]} { + puts "Error: bounding box works incorrect" +} diff --git a/tests/lowalgos/end b/tests/lowalgos/end new file mode 100644 index 0000000000..57901e2abe --- /dev/null +++ b/tests/lowalgos/end @@ -0,0 +1,2 @@ +# to end a test script +puts "TEST COMPLETED" diff --git a/tests/lowalgos/grids.list b/tests/lowalgos/grids.list new file mode 100644 index 0000000000..6a82606186 --- /dev/null +++ b/tests/lowalgos/grids.list @@ -0,0 +1,2 @@ +001 2dinter +002 bnd diff --git a/tests/lowalgos/parse.rules b/tests/lowalgos/parse.rules new file mode 100644 index 0000000000..610d206403 --- /dev/null +++ b/tests/lowalgos/parse.rules @@ -0,0 +1 @@ +FAILED /\bFaulty\b/ bad shape