mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user