]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
PAL12520: Impossible to add a Sketcher Result in a Wire.
authorjfa <jfa@opencascade.com>
Wed, 14 Jun 2006 09:42:29 +0000 (09:42 +0000)
committerjfa <jfa@opencascade.com>
Wed, 14 Jun 2006 09:42:29 +0000 (09:42 +0000)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index 5177a5081ec1655f7c8ac4b2bf3686e7a1f55b24..99696375048d3ca9bc9ed82d9af0fffdcaef2c79 100644 (file)
@@ -114,18 +114,26 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
       if (aShape_i.ShapeType() == TopAbs_EDGE) {
         B.Add(aWire, TopoDS::Edge(aShape_i));
         MW.Add(TopoDS::Edge(aShape_i));
+        if (!MW.IsDone()) {
+          // check status after each edge/wire addition, because the final status
+          // can be OK even in case, when some edges/wires was not accepted.
+          isMWDone = false;
+        }
       } else if (aShape_i.ShapeType() == TopAbs_WIRE) {
-        B.Add(aWire, TopoDS::Wire(aShape_i));
-        MW.Add(TopoDS::Wire(aShape_i));
+        TopExp_Explorer exp (aShape_i, TopAbs_EDGE);
+        for (; exp.More(); exp.Next()) {
+          B.Add(aWire, TopoDS::Edge(exp.Current()));
+          MW.Add(TopoDS::Edge(exp.Current()));
+          if (!MW.IsDone()) {
+            // check status after each edge/wire addition, because the final status
+            // can be OK even in case, when some edges/wires was not accepted.
+            isMWDone = false;
+          }
+        }
       } else {
         Standard_TypeMismatch::Raise
           ("Shape for wire construction is neither an edge nor a wire");
       }
-      if (!MW.IsDone()) {
-        // check status after each edge/wire addition, because the final status
-        // can be OK even in case, when some edges/wires was not accepted.
-        isMWDone = false;
-      }
     }
 
     if (isMWDone) {