From afb8375e70507f00416ec2d11de1e149e3900bb3 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Fri, 17 Nov 2023 08:03:03 -0800 Subject: [PATCH] Fixes problem with vertical curve slopes --- src/ifcgeom/mapping/IfcCurveSegment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/mapping/IfcCurveSegment.cpp b/src/ifcgeom/mapping/IfcCurveSegment.cpp index 69279bb61b..ba9df7aadd 100644 --- a/src/ifcgeom/mapping/IfcCurveSegment.cpp +++ b/src/ifcgeom/mapping/IfcCurveSegment.cpp @@ -821,9 +821,9 @@ class curve_segment_evaluator { m.col(3) = Eigen::Vector4d(x, y, 0.0, 1.0); } else if (segment_type == ST_VERTICAL) { // rotate about the Y-axis (slope along u is dx, slope vertically is dy, vertical position is y) - m.col(0) = Eigen::Vector4d(dx, 0, -dy, 0); + m.col(0) = Eigen::Vector4d(dx, 0, dy, 0); m.col(1) = Eigen::Vector4d(0, 1, 0, 0); - m.col(2) = Eigen::Vector4d(dy, 0, dx, 0); + m.col(2) = Eigen::Vector4d(-dy, 0, dx, 0); m.col(3) = Eigen::Vector4d(0, 0, y, 1.0); // y is an elevation so store it as z } else if (segment_type == ST_CANT) { Logger::Warning(std::runtime_error("Use of IfcPolynomialCurve for cant is not supported"));