From e4625bd71ece0b237bb75f35031def8a1590ad92 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Sun, 5 May 2024 11:40:02 -0700 Subject: [PATCH] Fixes parabolic curves in IfcAlignment examples and helper functions --- src/examples/IfcAlignment.cpp | 2 +- src/ifcparse/IfcAlignmentHelper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/examples/IfcAlignment.cpp b/src/examples/IfcAlignment.cpp index a80ca10c97..6571585cc9 100644 --- a/src/examples/IfcAlignment.cpp +++ b/src/examples/IfcAlignment.cpp @@ -151,7 +151,7 @@ std::pair create_vcurve(typename Schema::IfcCartesianPoint* p, double start_slope, double end_slope, double length) { // geometry - double A = 0.0; + double A = p->Coordinates()[1]; double B = start_slope; double C = (end_slope - start_slope) / (2 * length); diff --git a/src/ifcparse/IfcAlignmentHelper.cpp b/src/ifcparse/IfcAlignmentHelper.cpp index 08e17043b3..e16ddbc39e 100644 --- a/src/ifcparse/IfcAlignmentHelper.cpp +++ b/src/ifcparse/IfcAlignmentHelper.cpp @@ -696,7 +696,7 @@ std::pair mapAlign result.first = curve_segment; } else if (type == Ifc4x3_add2::IfcAlignmentVerticalSegmentTypeEnum::IfcAlignmentVerticalSegmentType_PARABOLICARC) { - double A = 0.0; + double A = start_height; double B = start_gradient; double C = (end_gradient - start_gradient) / (2 * horizontal_length);