mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-18 19:30:25 +00:00
Handle missing placement location gracefully #5528
This commit is contained in:
@@ -24,10 +24,12 @@
|
||||
using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement2D* inst) {
|
||||
Eigen::Vector3d P, axis(0, 0, 1), V(1, 0, 0);
|
||||
{
|
||||
Eigen::Vector3d P(0, 0, 0), axis(0, 0, 1), V(1, 0, 0);
|
||||
try {
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst->Location()));
|
||||
P = *v->components_;
|
||||
} catch (const std::runtime_error&) {
|
||||
Logger::Warning("Placement with invalid Location:", inst);
|
||||
}
|
||||
const bool hasRef = !!inst->RefDirection();
|
||||
if (hasRef) {
|
||||
|
||||
Reference in New Issue
Block a user