uses axis direction from curve evaluation when Axis is not provided

This commit is contained in:
Richard Brice
2026-05-29 15:11:07 -07:00
parent 3f680f5c21
commit 0ec895f1a3
@@ -60,12 +60,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear* inst)
} else if (!hasAxis && hasRef) {
taxonomy::direction3::ptr r = taxonomy::cast<taxonomy::direction3>(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<taxonomy::direction3>(map(inst->Axis()));
axis = *a->components_;