diff --git a/src/g2_spline.cpp b/src/g2_spline.cpp index f79b3b6e73e50268924ca0797f3ca878ce335c3c..f3cdbd9e857e5072815f787d6531ec401260e63d 100644 --- a/src/g2_spline.cpp +++ b/src/g2_spline.cpp @@ -865,6 +865,8 @@ void CG2Spline::generate(double &resolution,double n1,double n2, double n3, doub bool CG2Spline::evaluate(double length, TPoint& point) { + if(!this->generated) + this->generate(DEFAULT_RESOLUTION); if (length < -this->resolution || length > (this->length[this->num_points-1]+this->resolution)) return false; else if(length<0.0)