From b571501559fc3b4d5af174349a9654a48fb41cd2 Mon Sep 17 00:00:00 2001 From: copycd Date: Wed, 3 Jan 2024 13:57:49 +0900 Subject: [PATCH] @ error Cause a TypeError when arg is UNSET --- code/AssetLib/IFC/IFCReaderGen1_2x3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/AssetLib/IFC/IFCReaderGen1_2x3.cpp b/code/AssetLib/IFC/IFCReaderGen1_2x3.cpp index 73e3c91d8..c625f1daf 100644 --- a/code/AssetLib/IFC/IFCReaderGen1_2x3.cpp +++ b/code/AssetLib/IFC/IFCReaderGen1_2x3.cpp @@ -2725,6 +2725,10 @@ template <> size_t GenericFill(const DB& db, const L do { // convert the 'CompositionType' argument std::shared_ptr arg = params[base++]; if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[1]=true; break; } + if (dynamic_cast(&*arg)) { + // Consider assigning the default value as in->CompositionType = "ELEMENT". + break; + } try { GenericConvert( in->CompositionType, arg, db ); break; } catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 8 to IfcSpatialStructureElement to be a `IfcElementCompositionEnum`")); } } while (false);