-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <Standard_Stream.hxx>
#include <GEOMImpl_GlueDriver.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <ShapeFix_Shape.hxx>
+
#include <Standard_NullObject.hxx>
#include <Standard_Failure.hxx>
aRes = aGluer.Result();
+ // SKL 18.01.2010 - patch for 20662
+ Handle(ShapeFix_Shape) aSfs = new ShapeFix_Shape(aRes);
+ aSfs->SetPrecision(Precision::Confusion());
+ aSfs->Perform();
+ aRes = aSfs->Shape();
+
+
// Fill history to be used by GetInPlace functionality
TopTools_IndexedMapOfShape aResIndices;
TopExp::MapShapes(aRes, aResIndices);
//purpose :
//=======================================================================
TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape,
- const Standard_Real theTolerance,
+ const Standard_Real theTolerance,
const Standard_Boolean doKeepNonSolids,
- const TopTools_MapOfShape& aFaces)
+ const TopTools_MapOfShape& aFaces)
{
TopoDS_Shape aRes;
for( ; i <= SF->Length(); i++) {
Handle(Standard_Transient) anItem = SF->Value(i);
if(anItem.IsNull())
- continue;
+ continue;
Handle(GEOM_Function) aRefSh = Handle(GEOM_Function)::DownCast(anItem);
if(aRefSh.IsNull())
- continue;
+ continue;
TopoDS_Shape aFace = aRefSh->GetValue();
if(aFace.IsNull())
- continue;
+ continue;
if(!aFaces.Contains(aFace))
- aFaces.Add(aFace);
+ aFaces.Add(aFace);
}
aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces);
}
static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver",
- sizeof(GEOMImpl_GlueDriver),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
+ sizeof(GEOMImpl_GlueDriver),
+ 1,
+ (Standard_Address)_Ancestors,
+ (Standard_Address)NULL);
return _aType;
}