From d2253c7be4db12dbf9b89a53abfacff87692d216 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 29 Apr 2022 15:37:44 +0200 Subject: [PATCH] Part: in TopoShape::transformGeometry convert OCC exception into Base exception The conversion is needed because TopoShape::transformGeometry reimplements ComplexGeoData::transformGeometry and is called in the core system --- src/Mod/Part/App/TopoShape.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 664c641bbc..b556326cc5 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -3173,10 +3173,15 @@ TopoDS_Shape TopoShape::makeThickSolid(const TopTools_ListOfShape& remFace, void TopoShape::transformGeometry(const Base::Matrix4D &rclMat) { - if (this->_Shape.IsNull()) - Standard_Failure::Raise("Cannot transform null shape"); + try { + if (this->_Shape.IsNull()) + Standard_Failure::Raise("Cannot transform null shape"); - *this = makeGTransform(rclMat); + *this = makeGTransform(rclMat); + } + catch (const Standard_Failure& e) { + throw Base::CADKernelError(e.GetMessageString()); + } } TopoDS_Shape TopoShape::transformGShape(const Base::Matrix4D& rclTrf, bool copy) const