From: jgv Date: Thu, 12 Mar 2015 09:35:33 +0000 (+0300) Subject: 0025887: Invalid pipe construction X-Git-Tag: V6_9_0_beta~50 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=0f9f1f4ea0887b967231dbb88124dcd0c89290ac 0025887: Invalid pipe construction Test-case for issue #25887 --- diff --git a/src/GeomFill/GeomFill_Sweep.cxx b/src/GeomFill/GeomFill_Sweep.cxx index 3589a231ec..7c4bed32d6 100644 --- a/src/GeomFill/GeomFill_Sweep.cxx +++ b/src/GeomFill/GeomFill_Sweep.cxx @@ -648,6 +648,8 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) // (1.1.b) Cas Cylindrique if ( (SectionType == GeomAbs_Circle) && IsTrsf) { + const Standard_Real TolProd = 1.e-6; + gp_Circ C = AC.Circle(); C.Transform(Tf2); @@ -655,7 +657,7 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw) DS.Normalize(); levier = Abs(DS.CrossMagnitude(DP)) * C.Radius(); SError = levier * Abs(Last - First); - if (SError <= Tol) { + if (SError <= TolProd) { Ok = Standard_True; gp_Ax3 axe (C.Location(), DP, C.Position().XDirection()); S = new (Geom_CylindricalSurface) diff --git a/tests/bugs/modalg_5/bug25887 b/tests/bugs/modalg_5/bug25887 new file mode 100644 index 0000000000..4bf9adcb5f --- /dev/null +++ b/tests/bugs/modalg_5/bug25887 @@ -0,0 +1,25 @@ +puts "========" +puts "OCC25887" +puts "========" +puts "" +############################# +# Invalid pipe construction +############################# + +restore [locate_data_file OCC25887_shape.brep] a + +smallview + +explode a + +pipe res a_1 a_2 1 + +donly res +fit + +set bug_info [checkshape res] +if {[string compare $bug_info "This shape seems to be valid"] != 0} { + puts "ERROR: OCC25887 is reproduced." +} + +set only_screen_axo 1