0030927: Modeling Algorithms - UnifySameDom looses the Closed flag for wires IR-2019-08-30
authorjgv <jgv@opencascade.com>
Thu, 29 Aug 2019 16:02:25 +0000 (19:02 +0300)
committerapn <apn@opencascade.com>
Fri, 30 Aug 2019 15:07:53 +0000 (18:07 +0300)
Add setting the Closed flag for a new wire

src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
tests/bugs/modalg_7/bug30927 [new file with mode: 0644]

index 991d194..010386c 100644 (file)
@@ -2567,6 +2567,7 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
             RemoveEdgeFromMap(CurEdge, VEmap);
           }
         } //for (;;)
+        aNewWire.Closed(Standard_True);
         UsedEdges.Add(StartEdge);
         
         //Remove used edges from sequence
diff --git a/tests/bugs/modalg_7/bug30927 b/tests/bugs/modalg_7/bug30927
new file mode 100644 (file)
index 0000000..898fa96
--- /dev/null
@@ -0,0 +1,15 @@
+puts "============================================================================"
+puts "0030927: Modeling Algorithms - UnifySameDom looses the Closed flag for wires"
+puts "============================================================================"
+puts ""
+
+box b1 10 10 10
+box b2 5 0 -5 10 10 20
+bfuse s b1 b2
+unifysamedom result s
+
+foreach w [explode result w] {
+  if {![regexp "Closed" [whatis $w]]} {
+    puts "Error: Wire $w is not closed"
+  }
+}