]> OCCT Git - occt.git/commitdiff
0026088: Modeling Algorithms - Exception in pipe algorithm
authorifv <ifv@opencascade.com>
Sat, 15 Aug 2020 15:28:00 +0000 (18:28 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 2 Sep 2020 16:37:14 +0000 (19:37 +0300)
GeomFill_Sweep.cxx: treatment KPart for sphere is improved
bug26088: test case is corrected - TODO is removed

src/GeomFill/GeomFill_Sweep.cxx
tests/pipe/bugs/bug26088

index b47d6ab0e6cc6417ea0eeaddab2b826f34b87205..af96a3d6ea905b4d6e0919bdc9e8d6dabd81153e 100644 (file)
@@ -870,6 +870,15 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
              isUReversed = Standard_True;
            }
 
+            if (Abs(l - f) <= Precision::PConfusion() ||
+                Abs(UlastOnSec - UfirstOnSec) > M_PI_2)
+            {
+              // l == f - "degenerated" surface
+              // UlastOnSec - UfirstOnSec > M_PI_2 - "twisted" surface,
+              // it is impossible to represent with help of trimmed sphere
+              return Ok;
+            }
+
            if ( (f >= -M_PI/2) && (l <= M_PI/2)) {
              Ok = Standard_True;
              myExchUV = Standard_True;
index 20dffdf22f938acbeae6cb506baacd328c619654..3550592973c994320cfc4d1c514db3217719a872 100755 (executable)
@@ -1,6 +1,3 @@
-puts "TODO OCC26088 ALL: An exception was caught"
-puts "TODO OCC26088 ALL: TEST INCOMPLETE"
-
 puts "========"
 puts "0026088: E x c e p t i o n in pipe algorithm"
 puts "========"
@@ -9,4 +6,12 @@ puts ""
 restore [locate_data_file bug26088_path0.brep] p
 restore [locate_data_file bug26088_profile0.brep] pr
 
+# result is invalid shape (twisted surface) because of placement 
+# path and profile
 pipe result p pr
+
+smallview
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
+
+puts "TEST COMPLETED"
\ No newline at end of file