Fixes runtime check for expected IfcPolynomialCurve coefficients and adds fallback check to IfcObjectPlacement (#3936)

* Adds support for IfcLinearPlacement

* Instantiates IfcHierarchyHelper template for ADD2

* Implements Eigen shortcut

Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>

* Implements Eigen shortcut

Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>

* Implements Eigen shortcut

Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>

* Implements Eigen shortcut

Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>

* Removed assert, added Logger::Warning and Logger::Error. Made treatment of unexpected data more permissive

* Fixes runtime check for polynomial curve

* Adds test of fallback placement for IfcLinearPlacement and reduces number of tests for placement type.

Changed to if-else if so inst isn't tested to be every placement type, every time.

---------

Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
This commit is contained in:
Richard Brice
2023-10-25 00:42:39 -07:00
committed by GitHub
parent e9c70f8d83
commit ba4ff68597
2 changed files with 27 additions and 8 deletions
+1
View File
@@ -461,6 +461,7 @@ public:
auto coeffX = p->CoefficientsX().get_value_or(std::vector<double>());
auto coeffY = p->CoefficientsY().get_value_or(std::vector<double>());
auto coeffZ = p->CoefficientsZ().get_value_or(std::vector<double>());
if (!coeffZ.empty())
Logger::Warning("Expected IfcPolynomialCurve.CoefficientsZ to be undefined for alignment geometry", p);
auto transformation_matrix = taxonomy::cast<taxonomy::matrix4>(mapping_->map(p->Position()))->ccomponents();