diff --git a/Geo/GEdge.h b/Geo/GEdge.h index a3ce996bca8d9a57fb71066c0ca9e3971dde81bd..ee7e6b7302fdc2ead75bdfeac227c616d995acbb 100644 --- a/Geo/GEdge.h +++ b/Geo/GEdge.h @@ -53,6 +53,7 @@ class GEdge : public GEntity { virtual std::list<GFace*> faces() const { return l_faces; } // get the parameter location for a point in space on the edge + // (returns std::numeric_limits<double>::max() if failed) virtual double parFromPoint(const SPoint3 &) const = 0; // get the point for the given parameter location diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index 8d8dd92d5550951c92e6d0c4ca4a06703585437d..2fead0504044df430f2df11b3bfcf9f4b3b3da02 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -3,6 +3,7 @@ // See the LICENSE.txt file for license information. Please report all // bugs and problems to <gmsh@geuz.org>. +#include <limits> #include "GModel.h" #include "Message.h" #include "OCCEdge.h" @@ -130,7 +131,7 @@ SVector3 OCCEdge::firstDer(double par) const double OCCEdge::parFromPoint(const SPoint3 &pt) const { Msg::Error("parFromPoint not implemented for OCCEdge"); - return 0.; + return std::numeric_limits<double>::max(); } GEntity::GeomType OCCEdge::geomType() const