X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_GlueDriver.cxx;h=7ba7a22700e212221ab4bd44eb1dcf5df79be4cd;hb=3059f9d5521dd7c91c35c50afbd6beb18b8826fd;hp=ec18620ffdb16e1d45b213e626408cfc37312d28;hpb=239f8109c64fa0c5a2e1d87a420bad5529b57f48;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx index ec18620ff..7ba7a2270 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -1,21 +1,23 @@ -// Copyright (C) 2005 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. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// 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 +// 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include @@ -43,6 +45,8 @@ #include #include +#include + #include #include @@ -145,6 +149,13 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesWithWarnings (const TopoDS_Shape& the 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); @@ -264,9 +275,9 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, //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; @@ -345,15 +356,15 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const 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); } @@ -388,10 +399,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_() 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; }