mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Consider case of only RefDirection in sectioned shapes #7251
This commit is contained in:
@@ -81,7 +81,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSolidHorizontal* in
|
|||||||
rot = taxonomy::matrix4(
|
rot = taxonomy::matrix4(
|
||||||
Eigen::Vector3d(0, 0, 0),
|
Eigen::Vector3d(0, 0, 0),
|
||||||
taxonomy::cast<taxonomy::direction3>(map(csp->Axis()))->ccomponents()).ccomponents().block<3, 3>(0, 0);
|
taxonomy::cast<taxonomy::direction3>(map(csp->Axis()))->ccomponents()).ccomponents().block<3, 3>(0, 0);
|
||||||
}
|
} else if (csp->RefDirection()) {
|
||||||
|
rot = taxonomy::matrix4(
|
||||||
|
Eigen::Vector3d(0, 0, 0),
|
||||||
|
Eigen::Vector3d(0, 0, 1),
|
||||||
|
taxonomy::cast<taxonomy::direction3>(map(csp->RefDirection()))->ccomponents()
|
||||||
|
).ccomponents().block<3, 3>(0, 0);
|
||||||
|
}
|
||||||
profile_rotations.push_back(rot);
|
profile_rotations.push_back(rot);
|
||||||
}
|
}
|
||||||
if (faces.size() != profile_offsets.size()) {
|
if (faces.size() != profile_offsets.size()) {
|
||||||
|
|||||||
@@ -82,7 +82,14 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSurface* inst) {
|
|||||||
rot = taxonomy::matrix4(
|
rot = taxonomy::matrix4(
|
||||||
Eigen::Vector3d(0, 0, 0),
|
Eigen::Vector3d(0, 0, 0),
|
||||||
taxonomy::cast<taxonomy::direction3>(map(csp->Axis()))->ccomponents()).ccomponents().block<3, 3>(0, 0);
|
taxonomy::cast<taxonomy::direction3>(map(csp->Axis()))->ccomponents()).ccomponents().block<3, 3>(0, 0);
|
||||||
}
|
} else if (csp->RefDirection()) {
|
||||||
|
rot = taxonomy::matrix4(
|
||||||
|
Eigen::Vector3d(0, 0, 0),
|
||||||
|
Eigen::Vector3d(0, 0, 1),
|
||||||
|
taxonomy::cast<taxonomy::direction3>(map(csp->RefDirection()))->ccomponents())
|
||||||
|
.ccomponents()
|
||||||
|
.block<3, 3>(0, 0);
|
||||||
|
}
|
||||||
profile_rotations.push_back(rot);
|
profile_rotations.push_back(rot);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user