From 76ecb7ccefe84cc334fb4cf6e7b71f6182965371 Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 20 Mar 2015 11:47:34 +0300 Subject: [PATCH] INT PAL 0052636: Make solid from compound of shells works incorrectly --- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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++; } -- 2.39.2