-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-#include <Standard_Stream.hxx>
-
#include <GEOMImpl_HealingDriver.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOMImpl_IHealing.hxx>
#include <TNaming_CopyShape.hxx>
-#include <ShapeFix_ShapeTolerance.hxx>
-#include <ShapeFix_Shape.hxx>
-
#include <BRep_Builder.hxx>
#include <BRepAdaptor_Curve.hxx>
-#include <BRepCheck_Analyzer.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TopExp.hxx>
TopoDS_Shape& theOutShape) const
{
Standard_Real aTol = theHI->GetTolerance();
+ TopAbs_ShapeEnum aType = theHI->GetType();
+
if (aTol < Precision::Confusion())
aTol = Precision::Confusion();
TNaming_CopyShape::CopyTool(theOriginalShape, aMapTShapes, aShapeCopy);
// 2. Limit tolerance.
- ShapeFix_ShapeTolerance aSFT;
- aSFT.LimitTolerance(aShapeCopy, aTol, aTol, TopAbs_SHAPE);
-
- // 3. Fix obtained shape.
- Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape (aShapeCopy);
- aSfs->Perform();
- theOutShape = aSfs->Shape();
-
- BRepCheck_Analyzer ana (theOutShape, Standard_True);
- if (!ana.IsValid())
+ if (!GEOMUtils::FixShapeTolerance(aShapeCopy, aType, aTol))
StdFail_NotDone::Raise("Non valid shape result");
+
+ theOutShape = aShapeCopy;
}
//=======================================================================
}
theOutShape = aFinalWire;
- BRepCheck_Analyzer ana (theOutShape, Standard_True);
- if (!ana.IsValid())
+ if (!GEOMUtils::CheckShape(theOutShape, true))
StdFail_NotDone::Raise("Non valid shape result");
}
theOperationName = "LIMIT_TOLERANCE";
AddParam( theParams, "Selected shape", aCI.GetOriginal() );
AddParam( theParams, "Tolerance", aCI.GetTolerance() );
+ AddParam( theParams, "Type", aCI.GetType() );
break;
case FUSE_COLLINEAR_EDGES:
theOperationName = "FUSE_EDGES";
AddParam( theParams, "Wire", aCI.GetOriginal() );
AddParam( theParams, "Vertexes", aCI.GetShapes() );
break;
+ case REMOVE_INTERNAL_FACES:
+ theOperationName = "REMOVE_WEBS";
+ AddParam( theParams, "Selected shape", aCI.GetOriginal() );
+ break;
default:
return false;
}