From cdddd079cc1ab5594cfdbcb8fd8c15ad27ed20c3 Mon Sep 17 00:00:00 2001 From: ifv Date: Sat, 15 Aug 2020 18:28:00 +0300 Subject: [PATCH] 0026088: Modeling Algorithms - Exception in pipe algorithm GeomFill_Sweep.cxx: treatment KPart for sphere is improved bug26088: test case is corrected - TODO is removed --- src/GeomFill/GeomFill_Sweep.cxx | 9 +++++++++ tests/pipe/bugs/bug26088 | 11 ++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/GeomFill/GeomFill_Sweep.cxx b/src/GeomFill/GeomFill_Sweep.cxx index b47d6ab0e6..af96a3d6ea 100644 --- a/src/GeomFill/GeomFill_Sweep.cxx +++ b/src/GeomFill/GeomFill_Sweep.cxx @@ -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; diff --git a/tests/pipe/bugs/bug26088 b/tests/pipe/bugs/bug26088 index 20dffdf22f..3550592973 100755 --- a/tests/pipe/bugs/bug26088 +++ b/tests/pipe/bugs/bug26088 @@ -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