From a1bc463e52cf459140435e584a9f4faef48b823e Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 30 Jun 2017 11:06:02 +0300 Subject: [PATCH] 0023451: EDF - Remove Extra edges --- src/BlockFix/BlockFix_UnionEdges.cxx | 2 +- src/BlockFix/BlockFix_UnionFaces.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BlockFix/BlockFix_UnionEdges.cxx b/src/BlockFix/BlockFix_UnionEdges.cxx index f0beb7039..a4d0c0c01 100644 --- a/src/BlockFix/BlockFix_UnionEdges.cxx +++ b/src/BlockFix/BlockFix_UnionEdges.cxx @@ -150,7 +150,7 @@ static Standard_Boolean IsToMerge // Check if they belong to the same faces. Standard_Boolean isSame = Standard_False; Standard_Boolean has1 = theMapEdgeFaces.Contains(theEdge1); - Standard_Boolean has2 = theMapEdgeFaces.Contains(theEdge1); + Standard_Boolean has2 = theMapEdgeFaces.Contains(theEdge2); if (has1 && has2) { const TopTools_ListOfShape &aLst1 = theMapEdgeFaces.FindFromKey(theEdge1); diff --git a/src/BlockFix/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx index 67ff07f69..02765bfb4 100644 --- a/src/BlockFix/BlockFix_UnionFaces.cxx +++ b/src/BlockFix/BlockFix_UnionFaces.cxx @@ -246,6 +246,9 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge, Standard_Boolean isValid = Standard_True; if (BRep_Tool::IsClosed(theEdge, theFace)) { + // Mantis issue 0023451, now code corresponds to the comment to this method + isValid = Standard_False; + // This is a seam edge. Check if there are another seam edges on the face. TopExp_Explorer anExp(theFace, TopAbs_EDGE); @@ -261,7 +264,9 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge, TopoDS_Edge anEdge = TopoDS::Edge(aShEdge); if (BRep_Tool::IsClosed(anEdge, theFace)) { - isValid = Standard_False; + // Mantis issue 0023451, now code corresponds to the comment to this method + //isValid = Standard_False; + isValid = Standard_True; break; } } -- 2.30.2