0030629: Modeling Algorithms - Invalid result of fuse operation
authoremv <emv@opencascade.com>
Thu, 4 Apr 2019 06:59:24 +0000 (09:59 +0300)
committerapn <apn@opencascade.com>
Mon, 8 Apr 2019 13:03:41 +0000 (16:03 +0300)
Plane/Torus intersection: take into account the Plane-Torus distance sign to compute the correct location of the section curve.

Test case for the issue.

src/IntAna/IntAna_QuadQuadGeo.cxx
tests/bugs/modalg_7/bug30629 [new file with mode: 0644]

index 79a3ed2..93e64b5 100644 (file)
@@ -2077,7 +2077,7 @@ void IntAna_QuadQuadGeo::Perform(const gp_Pln& Pln,
     }
     //
     if (Abs(aDR) < aTolNum) {
-      aDist=aRMin;
+      aDist = (aDist < 0) ? -aRMin : aRMin;
     }
     //
     typeres = IntAna_Circle;
diff --git a/tests/bugs/modalg_7/bug30629 b/tests/bugs/modalg_7/bug30629
new file mode 100644 (file)
index 0000000..5ff601a
--- /dev/null
@@ -0,0 +1,22 @@
+puts "========"
+puts "0030629: Modeling Algorithms - Invalid result of fuse operation"
+puts "========"
+puts ""
+
+restore [locate_data_file bug30629.brep] s
+
+explode s so
+
+bclearobjects
+bcleartools
+baddobjects s_1
+baddtools s_2 s_3 s_4
+bfillds
+
+bbop result 1
+
+checkshape result
+checknbshapes result -wire 11 -face 11 -shell 3 -solid 3
+checkprops result -s 725537 -v 1.33469e+07
+
+checkview -display result -2d -path ${imagedir}/${test_image}.png