From f0b5e93737f7d636b4fe0b5ae0f2d28722f1b0ea Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Mon, 31 Mar 2025 16:16:47 -0700 Subject: [PATCH] Fixes problem evaluating gradient and segmented reference curves with start locations offset from start of base curve. --- src/ifcgeom/function_item_evaluator.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ifcgeom/function_item_evaluator.cpp b/src/ifcgeom/function_item_evaluator.cpp index b4dade6ab8..f924dae4a6 100644 --- a/src/ifcgeom/function_item_evaluator.cpp +++ b/src/ifcgeom/function_item_evaluator.cpp @@ -101,9 +101,7 @@ struct gradient_fn_evaluator : public fn_evaluator { double end() const override { return fn_->end(); } Eigen::Matrix4d evaluate(double u) const override { - // u is distance from start of vertical. - // add vertical->start() to u to get distance from start of horizontal - auto xy = horizontal_evaluator_.evaluate(u + start_); + auto xy = horizontal_evaluator_.evaluate(u); auto uz = vertical_evaluator_.evaluate(u); // curvature is stored in row 3 - capture it and remove it from the xy and uz matrices @@ -148,9 +146,7 @@ struct cant_fn_evaluator : public fn_evaluator { double end() const override { return fn_->end(); } Eigen::Matrix4d evaluate(double u) const override { - // u is distance from start of cant curve - // add cant->start() to u to get the distance from start of gradient curve - auto g = gradient_evaluator_.evaluate(u + start_); + auto g = gradient_evaluator_.evaluate(u); auto c = cant_evaluator_.evaluate(u);