0022388: [CEA 977] Invalide shape after UnionFaces

This commit is contained in:
skv 2013-11-01 12:15:32 +00:00
parent f2ca59c2a9
commit e79ab5b809

View File

@ -302,7 +302,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
Standard_Integer i; Standard_Integer i;
for (i = 1; i <= edges.Length(); i++) { for (i = 1; i <= edges.Length(); i++) {
TopoDS_Edge edge = TopoDS::Edge(edges(i)); TopoDS_Edge edge = TopoDS::Edge(edges(i));
if (BRep_Tool::Degenerated(edge)) if (BRep_Tool::Degenerated(edge) || BRep_Tool::IsClosed(edge, aFace))
continue; continue;
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
@ -315,6 +315,11 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
if (aProcessed.Contains(anCheckedFace)) if (aProcessed.Contains(anCheckedFace))
continue; continue;
if (BRep_Tool::IsClosed(edge, anCheckedFace)) {
// Skip seam edge.
continue;
}
// Check if faces belong to same solids. // Check if faces belong to same solids.
if (!IsFacesOfSameSolids(aFace, anCheckedFace, aMapFaceSolids)) { if (!IsFacesOfSameSolids(aFace, anCheckedFace, aMapFaceSolids)) {
continue; continue;