From 0ec895f1a39322a92c006fe7b320944772e493bc Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Fri, 29 May 2026 15:11:07 -0700 Subject: [PATCH] uses axis direction from curve evaluation when Axis is not provided --- src/ifcgeom/mapping/IfcAxis2PlacementLinear.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/mapping/IfcAxis2PlacementLinear.cpp b/src/ifcgeom/mapping/IfcAxis2PlacementLinear.cpp index b11b61b46b..836a6391f8 100644 --- a/src/ifcgeom/mapping/IfcAxis2PlacementLinear.cpp +++ b/src/ifcgeom/mapping/IfcAxis2PlacementLinear.cpp @@ -60,12 +60,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear* inst) } else if (!hasAxis && hasRef) { taxonomy::direction3::ptr r = taxonomy::cast(map(inst->RefDirection())); refDirection = *r->components_; - Eigen::Vector3d up(0, 0, 1); - axis = refDirection.cross(up.cross(refDirection)); + axis = m->components().col(2).head<3>(); // Axis is the curve normal when omitted } else if (!hasAxis && !hasRef) { refDirection = m->components().col(0).head<3>(); // RefDirection is the curve tangent when omitted - Eigen::Vector3d up(0, 0, 1); - axis = refDirection.cross(up.cross(refDirection)); + axis = m->components().col(2).head<3>(); // Axis is the curve normal when omitted } else { taxonomy::direction3::ptr a = taxonomy::cast(map(inst->Axis())); axis = *a->components_;