0030230: An optimal bounding box of a face is too large
authorifv <ifv@opencascade.com>
Thu, 11 Oct 2018 12:52:48 +0000 (15:52 +0300)
committerapn <apn@opencascade.com>
Thu, 18 Oct 2018 16:06:09 +0000 (19:06 +0300)
Bug fixing
Test case added

src/BRepBndLib/BRepBndLib.cxx
tests/bugs/modalg_7/bug30230 [new file with mode: 0644]

index b739683..0c873ac 100644 (file)
@@ -671,7 +671,7 @@ Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
       //
       gp_Pnt2d aP2d(uextr, vextr);
       TopAbs_State aSt = theFClass.Perform(aP2d);
-      if(aSt == TopAbs_OUT)
+      if(aSt != TopAbs_IN)
       {
         return Standard_True;
       }
diff --git a/tests/bugs/modalg_7/bug30230 b/tests/bugs/modalg_7/bug30230
new file mode 100644 (file)
index 0000000..00f6178
--- /dev/null
@@ -0,0 +1,14 @@
+puts "========"
+puts "0030230: An optimal bounding box of a face is too large"
+puts "========"
+puts ""
+
+restore [locate_data_file bug30230.brep] f
+bounding f -optimal -save xmin ymin zmin xmax ymax zmax
+
+checkreal xmin [dval xmin] -12659.707180220001 1.e-7 0
+checkreal ymin [dval ymin]  3389.8415241848311 1.e-7 0
+checkreal zmin [dval zmin] -100.01220790140377 1.e-7 0
+checkreal xmax [dval xmax] -12027.91640874722  1.e-7 0
+checkreal ymax [dval ymax]  3901.8916275309998 1.e-7 0
+checkreal zmax [dval zmax]  1.0003384222321339e-007 1.e-7 0