]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
INT PAL 0052636: Make solid from compound of shells works incorrectly
authormpa <mpa@opencascade.com>
Fri, 20 Mar 2015 08:47:34 +0000 (11:47 +0300)
committermpa <mpa@opencascade.com>
Fri, 20 Mar 2015 08:47:34 +0000 (11:47 +0300)
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx

index 97073227a4013ff4b03c5c92af4f0a0a949b3083..8913213ce73e5739126566584097177f8e8fecfe 100644 (file)
@@ -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++;
       }