From f448339fce6a808ada4405617a4450df6a9f3dde Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Wed, 25 Oct 2023 06:47:05 -0700 Subject: [PATCH] Adds warning that the BaseCurve of IfcGradientCurve is expected to be IfcCompositeCurve --- src/ifcgeom/mapping/IfcGradientCurve.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/mapping/IfcGradientCurve.cpp b/src/ifcgeom/mapping/IfcGradientCurve.cpp index 85fa6f10af..a01d42f488 100644 --- a/src/ifcgeom/mapping/IfcGradientCurve.cpp +++ b/src/ifcgeom/mapping/IfcGradientCurve.cpp @@ -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(map(inst->BaseCurve())); + if (!inst->BaseCurve()->as()) + Logger::Warning("Expected IfcGradientCurve.BaseCurve to be IfcCompositeCurve", inst); // CT 4.1.7.1.1.2 + + auto horizontal = taxonomy::cast(map(inst->BaseCurve())); auto vertical = taxonomy::make(); auto segments = inst->Segments();