Fixing misprint - use the boundaries of the cylinder for Plane/Cylinder intersection.
Test cases for the issue.
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) ||
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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