From: jfa Date: Mon, 10 Dec 2007 13:51:11 +0000 (+0000) Subject: NPAL18205: MakePipe problem on Debian Etch 32bits. X-Git-Tag: V3_2_9~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aacfac41afdc812a0049f7d7f7ed1f70c6060924;p=modules%2Fgeom.git NPAL18205: MakePipe problem on Debian Etch 32bits. --- diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index 7bca5db26..f11f6e33a 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -29,10 +29,14 @@ #include #include +#include + #include #include #include #include +#include +#include #include #include @@ -87,10 +91,6 @@ #include "utilities.h" -//#include "BRepTools.hxx" -//#include "GeomTools.hxx" -#include - //======================================================================= //function : GetID @@ -2295,19 +2295,28 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const aShape = CreatePipeShellsWithoutPath(aCI); } + if (aCI) delete aCI; + if (aShape.IsNull()) return 0; BRepCheck_Analyzer ana (aShape, Standard_False); if (!ana.IsValid()) { - if(aCI) delete aCI; - Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result"); + ShapeFix_ShapeTolerance aSFT; + aSFT.LimitTolerance(aShape,Precision::Confusion(),Precision::Confusion()); + Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape); + aSfs->SetPrecision(Precision::Confusion()); + aSfs->Perform(); + aShape = aSfs->Shape(); + + ana.Init(aShape, Standard_False); + if (!ana.IsValid()) + Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result"); } TopoDS_Shape aRes = GEOMImpl_IShapesOperations::CompsolidToCompound(aShape); aFunction->SetValue(aRes); log.SetTouched(Label()); - if(aCI) delete aCI; return 1; }