From: mpa Date: Fri, 20 Mar 2015 08:47:34 +0000 (+0300) Subject: INT PAL 0052636: Make solid from compound of shells works incorrectly X-Git-Tag: V7_6_0a1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76ecb7ccefe84cc334fb4cf6e7b71f6182965371;p=modules%2Fgeom.git INT PAL 0052636: Make solid from compound of shells works incorrectly --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 97073227a..8913213ce 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -426,9 +426,18 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const } if (aShapeShell.ShapeType() == TopAbs_COMPOUND) { TopoDS_Iterator It (aShapeShell, Standard_True, Standard_True); - if (It.More()) aShapeShell = It.Value(); + for (; It.More(); It.Next()) { + TopoDS_Shape aSubShape = It.Value(); + if (aSubShape.ShapeType() == TopAbs_SHELL) { + aMkSolid.Add(TopoDS::Shell(aSubShape)); + ish++; + } + else + Standard_TypeMismatch::Raise + ("Shape for solid construction is neither a shell nor a compound of shells"); + } } - if (aShapeShell.ShapeType() == TopAbs_SHELL) { + else if (aShapeShell.ShapeType() == TopAbs_SHELL) { aMkSolid.Add(TopoDS::Shell(aShapeShell)); ish++; }