From a34da81ac5d4207b2b977d83f432e7ea498f0f29 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:09:46 -0700 Subject: [PATCH] Fixes tilt slope for cant --- src/ifcgeom/mapping/IfcCurveSegment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/mapping/IfcCurveSegment.cpp b/src/ifcgeom/mapping/IfcCurveSegment.cpp index 7949cbd7b2..c4b2e769cf 100644 --- a/src/ifcgeom/mapping/IfcCurveSegment.cpp +++ b/src/ifcgeom/mapping/IfcCurveSegment.cpp @@ -272,7 +272,7 @@ class cant_adjuster : public GEOMETRY_ADJUSTER { // compute h is greater than PI/2 and the tangent of that angle is negative. // For this reason, use fabs(h) so tilt is between 0 and PI double cant = parent_curve_point.col(3)(1); - auto tilt = atan2(fabs(h), cant); + auto tilt = -atan2(fabs(h), cant); // Create a transformation matrix Eigen::Matrix4d m = Eigen::Matrix4d::Identity();