Skip to content
Snippets Groups Projects
Commit fbb12a0f authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

return curvature = eps if curve is degenerate (to avoid OCC crash)

parent 22e8e8bd
No related branches found
No related tags found
No related merge requests found
...@@ -330,6 +330,8 @@ double OCCEdge::curvature(double par) const ...@@ -330,6 +330,8 @@ double OCCEdge::curvature(double par) const
{ {
const double eps = 1.e-15; const double eps = 1.e-15;
if(degenerate(0)) return eps;
Standard_Real Crv; Standard_Real Crv;
if(_curve.IsNull()) { if(_curve.IsNull()) {
Geom2dLProp_CLProps2d aCLProps(_curve2d, 2, eps); Geom2dLProp_CLProps2d aCLProps(_curve2d, 2, eps);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment