Skip to content

Commit e4625bd

Browse files
committed
Fixes parabolic curves in IfcAlignment examples and helper functions
1 parent 648ca4d commit e4625bd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/examples/IfcAlignment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ std::pair<typename Schema::IfcCurveSegment*, typename Schema::IfcAlignmentSegmen
151151
// creates geometry and business logic segments for vertical profile parabolic vertical curves
152152
std::pair<typename Schema::IfcCurveSegment*, typename Schema::IfcAlignmentSegment*> create_vcurve(typename Schema::IfcCartesianPoint* p, double start_slope, double end_slope, double length) {
153153
// geometry
154-
double A = 0.0;
154+
double A = p->Coordinates()[1];
155155
double B = start_slope;
156156
double C = (end_slope - start_slope) / (2 * length);
157157

src/ifcparse/IfcAlignmentHelper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ std::pair<Ifc4x3_add2::IfcCurveSegment*, Ifc4x3_add2::IfcCurveSegment*> mapAlign
696696
result.first = curve_segment;
697697

698698
} else if (type == Ifc4x3_add2::IfcAlignmentVerticalSegmentTypeEnum::IfcAlignmentVerticalSegmentType_PARABOLICARC) {
699-
double A = 0.0;
699+
double A = start_height;
700700
double B = start_gradient;
701701
double C = (end_gradient - start_gradient) / (2 * horizontal_length);
702702

0 commit comments

Comments
 (0)