mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Fixes problem evaluating gradient and segmented reference curves with start locations offset from start of base curve.
This commit is contained in:
@@ -101,9 +101,7 @@ struct gradient_fn_evaluator : public fn_evaluator {
|
|||||||
double end() const override { return fn_->end(); }
|
double end() const override { return fn_->end(); }
|
||||||
|
|
||||||
Eigen::Matrix4d evaluate(double u) const override {
|
Eigen::Matrix4d evaluate(double u) const override {
|
||||||
// u is distance from start of vertical.
|
auto xy = horizontal_evaluator_.evaluate(u);
|
||||||
// add vertical->start() to u to get distance from start of horizontal
|
|
||||||
auto xy = horizontal_evaluator_.evaluate(u + start_);
|
|
||||||
auto uz = vertical_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
|
// 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(); }
|
double end() const override { return fn_->end(); }
|
||||||
|
|
||||||
Eigen::Matrix4d evaluate(double u) const override {
|
Eigen::Matrix4d evaluate(double u) const override {
|
||||||
// u is distance from start of cant curve
|
auto g = gradient_evaluator_.evaluate(u);
|
||||||
// add cant->start() to u to get the distance from start of gradient curve
|
|
||||||
auto g = gradient_evaluator_.evaluate(u + start_);
|
|
||||||
auto c = cant_evaluator_.evaluate(u);
|
auto c = cant_evaluator_.evaluate(u);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user