Updates alignment api

Fixes mapping of vertical alignment parabola business logic to geometry. Adds creation function of h and v alignment. Adds stationing referent at start of alignment. Fixes utility functions
This commit is contained in:
Richard Brice
2025-02-22 16:16:59 -08:00
parent 12f8a1f769
commit 8c16f394c1
4 changed files with 525 additions and 30 deletions
+8
View File
@@ -1,8 +1,16 @@
#include "function_item_evaluator.h"
#include "profile_helper.h"
#include <boost/math/quadrature/trapezoidal.hpp>
using namespace ifcopenshell::geometry;
double ifcopenshell::geometry::polynomial_length(double A, double B, double C, double horizontal_length) {
auto fn = [A, B, C](double x) -> double { return sqrt(pow(B + 2 * C * x, 2.0) + 1.0); };
auto l = boost::math::quadrature::trapezoidal(fn, 0.0, horizontal_length);
return l;
}
struct functor_fn_evaluator : public fn_evaluator {
functor_fn_evaluator(taxonomy::functor_item::const_ptr fn, const ifcopenshell::geometry::Settings& settings) : fn_evaluator(settings),