[TD]fix error from BSpline.asCircle

This commit is contained in:
wandererfan
2023-03-09 08:29:48 -05:00
committed by WandererFan
parent 45e3d0be96
commit 0adc473d53

View File

@@ -1776,12 +1776,11 @@ TopoDS_Edge GeometryUtils::asCircle(TopoDS_Edge occEdge, bool& arc)
}
}
catch (const Standard_Failure& e) {
Base::Console().Error("asCircle - OCC error - %s - while approx spline as circle\n",
e.GetMessageString());
throw Base::RuntimeError("Failed to make circle from bspline");
// return null shape to indicate that we could not make a circle from this bspline
return TopoDS_Edge();
}
catch (...) {
Base::Console().Error("asCircle - unknown error occurred while approx spline as circle\n");
return TopoDS_Edge();
}
return result;
}