Adds warning that the BaseCurve of IfcGradientCurve is expected to be IfcCompositeCurve

This commit is contained in:
Richard Brice
2023-10-25 06:47:05 -07:00
committed by Thomas Krijnen
parent b83f2de5c4
commit f448339fce
+4 -1
View File
@@ -24,7 +24,10 @@ using namespace ifcopenshell::geometry;
#ifdef SCHEMA_HAS_IfcGradientCurve
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve* inst) {
auto horizontal = taxonomy::cast<taxonomy::piecewise_function>(map(inst->BaseCurve()));
if (!inst->BaseCurve()->as<IfcSchema::IfcCompositeCurve>())
Logger::Warning("Expected IfcGradientCurve.BaseCurve to be IfcCompositeCurve", inst); // CT 4.1.7.1.1.2
auto horizontal = taxonomy::cast<taxonomy::piecewise_function>(map(inst->BaseCurve()));
auto vertical = taxonomy::make<taxonomy::piecewise_function>();
auto segments = inst->Segments();