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

complain if curve.IsNull in closestPoint()

parent 4a82cdae
No related branches found
No related tags found
No related merge requests found
......@@ -110,13 +110,19 @@ SPoint2 OCCEdge::reparamOnFace(const GFace *face, double epar, int dir) const
}
}
GPoint OCCEdge::closestPoint(const SPoint3 &qp, double &param) const
{
if(curve.IsNull()){
Msg::Error("OCC curve is null in closestPoint");
return GPoint(0, 0);
}
gp_Pnt pnt(qp.x(), qp.y(), qp.z());
GeomAPI_ProjectPointOnCurve proj(pnt, curve, s0, s1);
if(!proj.NbPoints()){
Msg::Error("OCC Project Point on Curve FAIL");
Msg::Error("OCC ProjectPointOnCurve failed");
return GPoint(0, 0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment