mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
#5684 Ignore singular object placement
This commit is contained in:
@@ -96,6 +96,12 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement* inst) {
|
||||
|
||||
result->components() = offset_and_rotation_ * result->ccomponents();
|
||||
|
||||
auto abs_det = std::abs(result->ccomponents().determinant());
|
||||
if (abs_det < 1.e-7) {
|
||||
Logger::Warning("Ignoring singular matrix:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user