From 54dd0b54484ef4bda4aa31e0c0de92e7ba6f229a Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Mon, 25 May 2026 10:28:40 -0700 Subject: [PATCH] Fixes bug computing cross slope --- src/ifcgeom/mapping/IfcCurveSegment.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/mapping/IfcCurveSegment.cpp b/src/ifcgeom/mapping/IfcCurveSegment.cpp index 1efbed2fe1..6dfd831e6d 100644 --- a/src/ifcgeom/mapping/IfcCurveSegment.cpp +++ b/src/ifcgeom/mapping/IfcCurveSegment.cpp @@ -491,11 +491,10 @@ class curve_segment_evaluator { // tilt angle in the plane of the cross section auto cant = Cant(u); auto tilt_angle = start_angle + delta_angle * (cant - start_cant) / delta_cant; - Eigen::Vector4d z(0.0, cos(tilt_angle), sin(tilt_angle), 0.0); + Eigen::Vector4d axis(0.0, cos(tilt_angle), sin(tilt_angle), 0.0); - // compute axis direction - Eigen::Vector4d y = z.cross3(ref_dir); - Eigen::Vector4d axis = ref_dir.cross3(y); + // compute cross slope direction + Eigen::Vector4d y = axis.cross3(ref_dir); Eigen::Matrix4d m = Eigen::Matrix4d::Identity(); m.col(0) = ref_dir;