X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPARTITION%2FPartition_Inter2d.cxx;h=54a270e44fe49d42f91e8f3181bafbc3c5737f5a;hb=c26d1e41d391256ac8175fe3ca7f28409b6f6030;hp=54b25e6e99198d4ba6b7a3d5e80d8a589295b2aa;hpb=0e49ec355ed82035e3a8f370d0539a258aca21e2;p=modules%2Fgeom.git diff --git a/src/PARTITION/Partition_Inter2d.cxx b/src/PARTITION/Partition_Inter2d.cxx index 54b25e6e9..54a270e44 100644 --- a/src/PARTITION/Partition_Inter2d.cxx +++ b/src/PARTITION/Partition_Inter2d.cxx @@ -142,7 +142,7 @@ static Standard_Boolean findVOnE(const TopoDS_Vertex & theV, return Standard_False; #ifdef DEB - cout << "findVOnE: found MinDist = " << sqrt (MinDist2) << endl; + MESSAGE("findVOnE: found MinDist = " << sqrt (MinDist2)); #endif return Standard_True; @@ -241,11 +241,14 @@ TopoDS_Vertex Partition_Inter2d::AddVonE(const TopoDS_Vertex& theV, 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 );