From: jfa Date: Wed, 14 Jun 2006 09:42:29 +0000 (+0000) Subject: PAL12520: Impossible to add a Sketcher Result in a Wire. X-Git-Tag: T3_2_1_pre~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1d900ae5ce5ffbad88686cad45cc9f4a42d6ee65;p=modules%2Fgeom.git PAL12520: Impossible to add a Sketcher Result in a Wire. --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 5177a5081..996963750 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -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) {