mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
uses axis direction from curve evaluation when Axis is not provided
This commit is contained in:
@@ -60,12 +60,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear* inst)
|
|||||||
} else if (!hasAxis && hasRef) {
|
} else if (!hasAxis && hasRef) {
|
||||||
taxonomy::direction3::ptr r = taxonomy::cast<taxonomy::direction3>(map(inst->RefDirection()));
|
taxonomy::direction3::ptr r = taxonomy::cast<taxonomy::direction3>(map(inst->RefDirection()));
|
||||||
refDirection = *r->components_;
|
refDirection = *r->components_;
|
||||||
Eigen::Vector3d up(0, 0, 1);
|
axis = m->components().col(2).head<3>(); // Axis is the curve normal when omitted
|
||||||
axis = refDirection.cross(up.cross(refDirection));
|
|
||||||
} else if (!hasAxis && !hasRef) {
|
} else if (!hasAxis && !hasRef) {
|
||||||
refDirection = m->components().col(0).head<3>(); // RefDirection is the curve tangent when omitted
|
refDirection = m->components().col(0).head<3>(); // RefDirection is the curve tangent when omitted
|
||||||
Eigen::Vector3d up(0, 0, 1);
|
axis = m->components().col(2).head<3>(); // Axis is the curve normal when omitted
|
||||||
axis = refDirection.cross(up.cross(refDirection));
|
|
||||||
} else {
|
} else {
|
||||||
taxonomy::direction3::ptr a = taxonomy::cast<taxonomy::direction3>(map(inst->Axis()));
|
taxonomy::direction3::ptr a = taxonomy::cast<taxonomy::direction3>(map(inst->Axis()));
|
||||||
axis = *a->components_;
|
axis = *a->components_;
|
||||||
|
|||||||
Reference in New Issue
Block a user