Skip to content
Snippets Groups Projects
Commit 133742d6 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Generate the spline in case it is not already generated in the evaluate() function.

parent 974d4f74
No related branches found
No related tags found
1 merge request!2Solved a bug when creating a new geometry object: the sale factor is...
......@@ -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)
......
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