Skip to content

Commit

Permalink
[TD]fix error from BSpline.asCircle
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Mar 9, 2023
1 parent 45e3d0b commit 0adc473
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Mod/TechDraw/App/Geometry.cpp
Expand Up @@ -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;
}

0 comments on commit 0adc473

Please sign in to comment.