-// GEOM PARTITION : partition algorithm
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R& D, LEG, PRINCIPIA R& D, BUREAU VERITAS
+// 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 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// GEOM PARTITION : partition algorithm
// File : Partition_Inter2d.cxx
// Author : Benedicte MARTIN
// Module : GEOM
// $Header$
-
-using namespace std;
+//
#include "Partition_Inter2d.ixx"
#include "utilities.h"
static Standard_Integer NbE2d = 0;
#endif
+using namespace std;
+
//=======================================================================
//function : getOtherShape
//purpose :
return Standard_False;
#ifdef DEB
- cout << "findVOnE: found MinDist = " << sqrt (MinDist2) << endl;
+ MESSAGE("findVOnE: found MinDist = " << sqrt (MinDist2));
#endif
return Standard_True;
if (!OnE1 && !OnE2 && !theF.IsNull())
{
- // analitically find vertices E1 and E2 must pass trough
+ // if 3 faces intersects each others, 3 new edges on them must pass
+ // through one vertex but real intersection points of each
+ // pair of edges are sometimes more far than a tolerance.
+ // Try to analitically find vertices that E1 and E2 must pass trough
TopoDS_Shape F1 = getOtherShape( theF, AsDes->Ascendant( E1 ));
TopoDS_Shape F2 = getOtherShape( theF, AsDes->Ascendant( E2 ));
- if (!F1.IsNull() && !F2.IsNull())
+ if (!F1.IsNull() && !F2.IsNull() && !F1.IsSame( F2 ))
{
OnE1 = findVOnE ( theV, E1, E2, F1, F2, AsDes, V1 );
OnE2 = findVOnE ( theV, E2, E1, F1, F2, AsDes, V2 );