Part: handle OCC exception inside TopoShape::makeGTransform

For more details about the problems an unhandled exception will cause see: https://forum.freecadweb.org/viewtopic.php?f=3&t=61000
This commit is contained in:
wmayer
2022-04-27 18:39:55 +02:00
parent 4f9eb9ebce
commit a96d356afb

View File

@@ -4372,9 +4372,14 @@ TopoShape &TopoShape::makeGTransform(const TopoShape &shape,
mat.SetValue(2,4,rclTrf[1][3]);
mat.SetValue(3,4,rclTrf[2][3]);
// geometric transformation
BRepBuilderAPI_GTransform mkTrf(shape.getShape(), mat, copy);
_Shape = mkTrf.Shape();
try {
// geometric transformation
BRepBuilderAPI_GTransform mkTrf(shape.getShape(), mat, copy);
_Shape = mkTrf.Shape();
}
catch (const Standard_Failure& e) {
Base::Console().Error("TopoShape::makeGTransform failed: %s\n", e.GetMessageString());
}
return *this;
}