0031201: Modeling Algorithms - Result of a section operation is incomplete
authoremv <emv@opencascade.com>
Thu, 28 Nov 2019 07:56:55 +0000 (10:56 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 29 Nov 2019 06:59:01 +0000 (09:59 +0300)
Fixing misprint - use the boundaries of the cylinder for Plane/Cylinder intersection.
Test cases for the issue.

src/IntPatch/IntPatch_ImpImpIntersection_2.gxx
tests/bugs/modalg_7/bug31201_1 [new file with mode: 0644]
tests/bugs/modalg_7/bug31201_2 [new file with mode: 0644]
tests/bugs/modalg_7/bug31201_3 [new file with mode: 0644]

index f1d33768f39f47d355d3a71767b7736db71be493..71278d1d763d23b2cfffa0c2a24a1dec70a1072f 100644 (file)
@@ -109,7 +109,7 @@ void IntPatch_ImpImpIntersection::Perform(const Handle(Adaptor3d_HSurface)&  S1,
     case 21: { // Plane/Cylinder
       Standard_Real VMin, VMax, H;
       //
-      const Handle(Adaptor3d_HSurface)& aSCyl = bReverse ? S2 : S1;
+      const Handle(Adaptor3d_HSurface)& aSCyl = bReverse ? S1 : S2;
       VMin = aSCyl->FirstVParameter();
       VMax = aSCyl->LastVParameter();
       H = (Precision::IsNegativeInfinite(VMin) || 
diff --git a/tests/bugs/modalg_7/bug31201_1 b/tests/bugs/modalg_7/bug31201_1
new file mode 100644 (file)
index 0000000..a868d72
--- /dev/null
@@ -0,0 +1,27 @@
+puts "======================================================="
+puts "OCC31201: Modeling Algorithms - Result of a section operation is incomplete"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug31201_obj1.brep] s1
+restore [locate_data_file bug31201_tool.brep] s2
+bclearobjects
+bcleartools
+baddobjects s1
+baddtools s2
+bfillds
+
+bsplit rsp
+
+checkshape rsp
+checknbshapes rsp -face 22 -wire 22
+
+bbop result 4
+
+checkshape result
+checkprops result -l 36.032
+checknbshapes result -vertex 11 -edge 11
+
+checksection result -r 0
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_7/bug31201_2 b/tests/bugs/modalg_7/bug31201_2
new file mode 100644 (file)
index 0000000..5701fef
--- /dev/null
@@ -0,0 +1,27 @@
+puts "======================================================="
+puts "OCC31201: Modeling Algorithms - Result of a section operation is incomplete"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug31201_obj2.brep] s1
+restore [locate_data_file bug31201_tool.brep] s2
+bclearobjects
+bcleartools
+baddobjects s1
+baddtools s2
+bfillds
+
+bsplit rsp
+
+checkshape rsp
+checknbshapes rsp -face 62 -wire 62
+
+bbop result 4
+
+checkshape result
+checkprops result -l 38.475
+checknbshapes result -vertex 31 -edge 31
+
+checksection result -r 0
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_7/bug31201_3 b/tests/bugs/modalg_7/bug31201_3
new file mode 100644 (file)
index 0000000..c4535db
--- /dev/null
@@ -0,0 +1,27 @@
+puts "======================================================="
+puts "OCC31201: Modeling Algorithms - Result of a section operation is incomplete"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug31201_obj3.brep] s1
+restore [locate_data_file bug31201_tool.brep] s2
+bclearobjects
+bcleartools
+baddobjects s1
+baddtools s2
+bfillds
+
+bsplit rsp
+
+checkshape rsp
+checknbshapes rsp -face 62 -wire 62
+
+bbop result 4
+
+checkshape result
+checkprops result -l 62.6295
+checknbshapes result -vertex 31 -edge 31
+
+checksection result -r 0
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png