]> OCCT Git - occt-copy.git/commitdiff
0024440: Regressions in products test group sat/doc_1
authorszv <szv@opencascade.com>
Thu, 12 Dec 2013 08:32:51 +0000 (12:32 +0400)
committerabv <abv@opencascade.com>
Thu, 12 Dec 2013 15:42:47 +0000 (19:42 +0400)
Check for closed shell is corrected

src/ShapeFix/ShapeFix_Shell.cxx
tests/de/step_4/C9
tests/de/step_4/D1

index e8d98bb154464d63c39f09b8f93e8874201212c3..e6cd54fb71de6013315ad9314b6ccb955a2d21e7 100755 (executable)
@@ -873,14 +873,17 @@ Standard_Boolean ShapeFix_Shell::FixFaceOrientation(const TopoDS_Shell& shell,co
   TopTools_MapOfShape aMapMultiConnectEdges;
   Standard_Boolean isFreeBoundaries = Standard_False;
   for(Standard_Integer k = 1; k <= aMapEdgeFaces.Extent(); k++) {
-    Standard_Integer aFaceCount = aMapEdgeFaces.FindFromIndex(k).Extent();
+    const Standard_Integer aFaceCount = aMapEdgeFaces.FindFromIndex(k).Extent();
+    if (!isFreeBoundaries && aFaceCount == 1) {
+      TopoDS_Edge E = TopoDS::Edge(aMapEdgeFaces.FindKey(k));
+      if (!BRep_Tool::Degenerated(E))
+        isFreeBoundaries = Standard_True;
+    }
     //Finds multishared edges
-    if (isAccountMultiConex && aFaceCount > 2)
+    else if (isAccountMultiConex && aFaceCount > 2)
       aMapMultiConnectEdges.Add(aMapEdgeFaces.FindKey(k));
-    if (aFaceCount == 1)
-      isFreeBoundaries = Standard_True; 
   }
-  if (BRep_Tool::IsClosed (myShell) == isFreeBoundaries)
+  if (BRep_Tool::IsClosed(myShell)? isFreeBoundaries : !isFreeBoundaries)
   {
     myShell.Closed (!isFreeBoundaries);
     SendWarning (Message_Msg ("FixAdvShell.FixClosedFlag.MSG0"));//Shell has incorrect flag isClosed
index 2e9f31df4463bd7a7827af12c543710fdef92705..df1b00cd26172ffc88c6cebc8c8a0e9b84ead36b 100644 (file)
@@ -1,6 +1,4 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: TPSTAT : Faulty" 
-
 
 set filename db_exhaust-A.stp
 
index e0af3cb43911470fc1a7d7d58ef7efdd8bb31292..2a233170e229a195862733a24baa4e649e518cac 100644 (file)
@@ -1,6 +1,4 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: TPSTAT : Faulty" 
-
 
 set filename db_exhaust-B.stp