INT PAL 0052636: Make solid from compound of shells works incorrectly

This commit is contained in:
mpa 2015-03-20 11:47:34 +03:00
parent b3d03ada99
commit 76ecb7ccef

View File

@ -426,9 +426,18 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
} }
if (aShapeShell.ShapeType() == TopAbs_COMPOUND) { if (aShapeShell.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Iterator It (aShapeShell, Standard_True, Standard_True); 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++;
} }
if (aShapeShell.ShapeType() == TopAbs_SHELL) { else
Standard_TypeMismatch::Raise
("Shape for solid construction is neither a shell nor a compound of shells");
}
}
else if (aShapeShell.ShapeType() == TopAbs_SHELL) {
aMkSolid.Add(TopoDS::Shell(aShapeShell)); aMkSolid.Add(TopoDS::Shell(aShapeShell));
ish++; ish++;
} }