diff --git a/src/Mod/Part/App/FeaturePartFuse.cpp b/src/Mod/Part/App/FeaturePartFuse.cpp index bd276a5f98..389f2849b7 100644 --- a/src/Mod/Part/App/FeaturePartFuse.cpp +++ b/src/Mod/Part/App/FeaturePartFuse.cpp @@ -136,24 +136,30 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void) #else BRepAlgoAPI_Fuse mkFuse; TopTools_ListOfShape shapeArguments,shapeTools; - shapeArguments.Append(s.front()); + const TopoDS_Shape& shape = s.front(); + if (shape.IsNull()) + throw Base::RuntimeError("Input shape is null"); + shapeArguments.Append(shape); + for (std::vector::iterator it = s.begin()+1; it != s.end(); ++it) { if (it->IsNull()) - throw Base::Exception("Input shape is null"); + throw Base::RuntimeError("Input shape is null"); shapeTools.Append(*it); } + mkFuse.SetArguments(shapeArguments); mkFuse.SetTools(shapeTools); mkFuse.Build(); if (!mkFuse.IsDone()) - throw Base::Exception("MultiFusion failed"); + throw Base::RuntimeError("MultiFusion failed"); + TopoDS_Shape resShape = mkFuse.Shape(); for (std::vector::iterator it = s.begin(); it != s.end(); ++it) { history.push_back(buildHistory(mkFuse, TopAbs_FACE, resShape, *it)); } #endif if (resShape.IsNull()) - throw Base::Exception("Resulting shape is null"); + throw Base::RuntimeError("Resulting shape is null"); Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean");