handle exception thrown by BRepBuilderAPI_RefineModel

This commit is contained in:
wmayer
2017-07-23 15:46:57 +02:00
parent 7c1e689217
commit 488c1a1fdf
6 changed files with 57 additions and 27 deletions

View File

@@ -140,12 +140,17 @@ App::DocumentObjectExecReturn *MultiCommon::execute(void)
}
}
if (hGrp->GetBool("RefineModel", false)) {
TopoDS_Shape oldShape = resShape;
BRepBuilderAPI_RefineModel mkRefine(oldShape);
resShape = mkRefine.Shape();
ShapeHistory hist = buildHistory(mkRefine, TopAbs_FACE, resShape, oldShape);
for (std::vector<ShapeHistory>::iterator jt = history.begin(); jt != history.end(); ++jt)
*jt = joinHistory(*jt, hist);
try {
TopoDS_Shape oldShape = resShape;
BRepBuilderAPI_RefineModel mkRefine(oldShape);
resShape = mkRefine.Shape();
ShapeHistory hist = buildHistory(mkRefine, TopAbs_FACE, resShape, oldShape);
for (std::vector<ShapeHistory>::iterator jt = history.begin(); jt != history.end(); ++jt)
*jt = joinHistory(*jt, hist);
}
catch (Standard_Failure) {
// do nothing
}
}
this->Shape.setValue(resShape);