From: jgv Date: Thu, 29 May 2014 11:11:00 +0000 (+0400) Subject: 0024920: Invalid result of Pipe construction X-Git-Tag: V6_8_0_beta~294 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=d92035598fcc8d413a35db679f4fa71e37ee4d46;hp=ab58a62baab177adb5f8ca6509af18f5dcd563dd 0024920: Invalid result of Pipe construction Added test case bugs/modalg_5/bug24920 --- diff --git a/src/BRepFill/BRepFill_ShapeLaw.cxx b/src/BRepFill/BRepFill_ShapeLaw.cxx index d97efc9d80..71a9d0b0dd 100644 --- a/src/BRepFill/BRepFill_ShapeLaw.cxx +++ b/src/BRepFill/BRepFill_ShapeLaw.cxx @@ -161,6 +161,9 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build) IsReallyClosed = V1.IsSame(V2); } } + if (IsReallyClosed && + Abs(C->FirstParameter() - First) > Precision::PConfusion()) + IsReallyClosed = Standard_False; //trimmed curve differs if ((ii>1) || !IsReallyClosed ) { // Trim C Handle(Geom_TrimmedCurve) TC = new Geom_TrimmedCurve(C,First, Last); diff --git a/tests/bugs/modalg_5/bug24920 b/tests/bugs/modalg_5/bug24920 new file mode 100644 index 0000000000..b1dcc74645 --- /dev/null +++ b/tests/bugs/modalg_5/bug24920 @@ -0,0 +1,15 @@ +puts "==========" +puts "OCC24920" +puts "==========" +puts "" +######################################### +# Invalid result of Pipe construction +######################################### + +restore [locate_data_file bug24920_Comp.brep] c + +explode c +pipe result c_1 c_2 +checkshape result + +set 2dviewer 1