diff --git a/src/ifcgeom/AbstractKernel.h b/src/ifcgeom/AbstractKernel.h index eeb8614351..54bf1f6abf 100644 --- a/src/ifcgeom/AbstractKernel.h +++ b/src/ifcgeom/AbstractKernel.h @@ -157,10 +157,14 @@ namespace { template <> struct dispatch_conversion { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* k, ifcopenshell::geometry::taxonomy::kinds, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { - if (k->partial_success_is_success) { - logger::error("No conversion for " + std::to_string(item->kind())); - } + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, ifcopenshell::geometry::taxonomy::kinds, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { + if (kernel->partial_success_is_success) { + std::string created_from; + if (item->instance) { + created_from = " (created from " + item->instance->declaration().name() + ")"; + } + logger::error("No support for " + ifcopenshell::geometry::taxonomy::kind_to_string(item->kind()) + created_from + " in kernel " + kernel->geometry_library()); + } return false; } }; @@ -179,10 +183,14 @@ namespace { template <> struct dispatch_with_upgrade { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* k, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { - if (k->partial_success_is_success) { - logger::error("No conversion with upgrade for " + std::to_string(item->kind())); - } + static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel* kernel, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { + if (kernel->partial_success_is_success) { + std::string created_from; + if (item->instance) { + created_from = " (created from " + item->instance->declaration().name() + ")"; + } + logger::error("No support (after considering item upgrade) for " + ifcopenshell::geometry::taxonomy::kind_to_string(item->kind()) + created_from + " in kernel " + kernel->geometry_library()); + } return false; } };