0000570: App::Document::_RecomputeFeature(): Unknown exception in Feature "Fusion" thrown
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5400 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
parent
604088221d
commit
db3e0cad43
|
@ -24,6 +24,7 @@
|
|||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <BRepAlgoAPI_Fuse.hxx>
|
||||
# include <Standard_Failure.hxx>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -81,18 +82,24 @@ App::DocumentObjectExecReturn *MultiFuse::execute(void)
|
|||
}
|
||||
|
||||
if (s.size() >= 2) {
|
||||
TopoDS_Shape res = s.front();
|
||||
for (std::vector<TopoDS_Shape>::iterator it = s.begin()+1; it != s.end(); ++it) {
|
||||
// Let's call algorithm computing a fuse operation:
|
||||
BRepAlgoAPI_Fuse mkFuse(res, *it);
|
||||
// Let's check if the fusion has been successful
|
||||
if (!mkFuse.IsDone())
|
||||
throw Base::Exception("Fusion failed");
|
||||
res = mkFuse.Shape();
|
||||
try {
|
||||
TopoDS_Shape res = s.front();
|
||||
for (std::vector<TopoDS_Shape>::iterator it = s.begin()+1; it != s.end(); ++it) {
|
||||
// Let's call algorithm computing a fuse operation:
|
||||
BRepAlgoAPI_Fuse mkFuse(res, *it);
|
||||
// Let's check if the fusion has been successful
|
||||
if (!mkFuse.IsDone())
|
||||
throw Base::Exception("Fusion failed");
|
||||
res = mkFuse.Shape();
|
||||
}
|
||||
if (res.IsNull())
|
||||
throw Base::Exception("Resulting shape is invalid");
|
||||
this->Shape.setValue(res);
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
Handle_Standard_Failure e = Standard_Failure::Caught();
|
||||
return new App::DocumentObjectExecReturn(e->GetMessageString());
|
||||
}
|
||||
if (res.IsNull())
|
||||
throw Base::Exception("Resulting shape is invalid");
|
||||
this->Shape.setValue(res);
|
||||
}
|
||||
else {
|
||||
throw Base::Exception("Not enough shape objects linked");
|
||||
|
|
Loading…
Reference in New Issue
Block a user