diff --git a/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx b/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx index f1d33768f3..71278d1d76 100644 --- a/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx +++ b/src/IntPatch/IntPatch_ImpImpIntersection_2.gxx @@ -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 index 0000000000..a868d72197 --- /dev/null +++ b/tests/bugs/modalg_7/bug31201_1 @@ -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 index 0000000000..5701fef6b2 --- /dev/null +++ b/tests/bugs/modalg_7/bug31201_2 @@ -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 index 0000000000..c4535dbdbc --- /dev/null +++ b/tests/bugs/modalg_7/bug31201_3 @@ -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