X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_OffsetDriver.cxx;h=818ce4eceb562b29641552d5cc56d01e764c0b57;hb=58803ba33ee53a5944d565373782e5f0868c5461;hp=fe5bb0580489bc72fdd2d47750271e77cc389b10;hpb=4e4b3762fc1215eb520840fe65eaeeea0854eff8;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx index fe5bb0580..818ce4ece 100644 --- a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -26,29 +26,16 @@ #include #include #include +#include #include -#include -#include #include -#include #include -#include - #include - #include -#include - -#include -#include -#include - #include #include -#include "utilities.h" - //======================================================================= //function : GetID //purpose : @@ -59,7 +46,6 @@ const Standard_GUID& GEOMImpl_OffsetDriver::GetID() return aOffsetDriver; } - //======================================================================= //function : GEOMImpl_OffsetDriver //purpose : @@ -100,20 +86,8 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const aTol); if (MO.IsDone()) { aShape = MO.Shape(); - // 23.04.2010 skl for bug 21699 from Mantis - BRepCheck_Analyzer ana (aShape, Standard_True); - ana.Init(aShape); - if (!ana.IsValid()) { - ShapeFix_ShapeTolerance aSFT; - aSFT.LimitTolerance(aShape, Precision::Confusion(), - Precision::Confusion(), TopAbs_SHAPE); - Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aShape); - aSfs->Perform(); - aShape = aSfs->Shape(); - ana.Init(aShape); - if (!ana.IsValid()) - Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); - } + if ( !GEOMUtils::CheckShape(aShape, true) && !GEOMUtils::FixShapeTolerance(aShape) ) + Standard_ConstructionError::Raise("Boolean operation aborted : non valid shape result"); } else { StdFail_NotDone::Raise("Offset construction failed");