]> OCCT Git - occt.git/commitdiff
0028150: Exception is raised during Boolean operation
authornbv <nbv@opencascade.com>
Mon, 18 Sep 2017 14:23:44 +0000 (17:23 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 22 Sep 2017 08:52:05 +0000 (11:52 +0300)
ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d - Using the correct number of points (computed in GCPnts_QuasiUniformAbscissa class) for creation of the initial curve.

src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx
tests/bugs/modalg_7/bug28150_1 [new file with mode: 0644]
tests/bugs/modalg_7/bug28150_2 [new file with mode: 0644]

index 16e1255320b0b687aa4b65be0ca37be95a485042..82f567cac83187031020fb70d18fd10fd28edfe7 100644 (file)
@@ -885,6 +885,7 @@ Handle(Adaptor2d_HCurve2d)
 
   Standard_Integer NbOfPnts = 61; 
   GCPnts_QuasiUniformAbscissa QUA(Curve->GetCurve(),NbOfPnts);
+  NbOfPnts = QUA.NbPoints();
   TColgp_Array1OfPnt Pts(1,NbOfPnts);
   TColStd_Array1OfReal Param(1,NbOfPnts);
   Standard_Integer i, j;
diff --git a/tests/bugs/modalg_7/bug28150_1 b/tests/bugs/modalg_7/bug28150_1
new file mode 100644 (file)
index 0000000..bee5949
--- /dev/null
@@ -0,0 +1,24 @@
+puts "========"
+puts "OCC28150"
+puts "========"
+puts ""
+#####################################################
+# Exception is raised during Boolean operation
+#####################################################
+
+restore [locate_data_file bug28150_shapes.brep] b
+explode b
+bclearobjects
+bcleartools
+baddobjects b_1
+baddtools b_2
+bfillds
+# Before fix: error
+bbop result 0
+
+checkshape result
+
+checknbshapes result -wire 5 -face 2
+checkprops result -s 14.5302
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_7/bug28150_2 b/tests/bugs/modalg_7/bug28150_2
new file mode 100644 (file)
index 0000000..8a44335
--- /dev/null
@@ -0,0 +1,21 @@
+puts "========"
+puts "OCC28150"
+puts "========"
+puts ""
+#####################################################
+# Exception is raised during Boolean operation
+#####################################################
+
+restore [locate_data_file bug28150_ef.brep] b
+explode b
+mkcurve c b_1
+mksurface s b_2
+project c2d c s
+
+checklength c2d -l  2.6097941390190726e-006
+
+v2d
+display c2d
+2dfit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png