From: mpa Date: Fri, 20 Mar 2015 09:22:55 +0000 (+0300) Subject: 0052637: Make Solid from connected face does not work on compound of faces X-Git-Tag: V7_6_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=909440ce50a852761c2ec1c354202798c33b38d7;p=modules%2Fgeom.git 0052637: Make Solid from connected face does not work on compound of faces --- diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 8913213ce..d98b007ac 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -500,6 +500,18 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const if (aShape_i.IsNull()) { Standard_NullObject::Raise("Shape for solid construction is null"); } + if (aShape_i.ShapeType() == TopAbs_COMPOUND) { + TopoDS_Iterator It (aShape_i, Standard_True, Standard_True); + for (; It.More(); It.Next()) { + TopoDS_Shape aSubShape = It.Value(); + if (aSubShape.ShapeType() == TopAbs_FACE || aSubShape.ShapeType() == TopAbs_SHELL) + aLS.Append(aSubShape); + else + Standard_TypeMismatch::Raise + ("Shape for solid construction is neither a list of faces and/or shells " + "nor a compound of faces and/or shells"); + } + } aLS.Append(aShape_i); }