From 4621fc92699ff5ce49a00f31da975cc1bc61ea07 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 10 Apr 2026 09:54:28 +0200 Subject: [PATCH] Less useless logging --- src/ifcgeom/AbstractKernel.h | 12 ++++++++---- src/ifcgeom/mapping/mapping.cpp | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/AbstractKernel.h b/src/ifcgeom/AbstractKernel.h index 95b869e29b..e950f665e3 100644 --- a/src/ifcgeom/AbstractKernel.h +++ b/src/ifcgeom/AbstractKernel.h @@ -149,8 +149,10 @@ namespace { template <> struct dispatch_conversion { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, ifcopenshell::geometry::taxonomy::kinds, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { - logger::error("No conversion for " + std::to_string(item->kind())); + 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())); + } return false; } }; @@ -169,8 +171,10 @@ namespace { template <> struct dispatch_with_upgrade { - static bool dispatch(ifcopenshell::geometry::kernels::AbstractKernel*, const ifcopenshell::geometry::taxonomy::ptr& item, IfcGeom::ConversionResults&) { - logger::error("No conversion with upgrade for " + std::to_string(item->kind())); + 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())); + } return false; } }; diff --git a/src/ifcgeom/mapping/mapping.cpp b/src/ifcgeom/mapping/mapping.cpp index 9e24b59ef9..7b6449bf81 100644 --- a/src/ifcgeom/mapping/mapping.cpp +++ b/src/ifcgeom/mapping/mapping.cpp @@ -554,6 +554,11 @@ IfcSchema::IfcStyledItem mapping::find_style(const IfcSchema::IfcRepresentationI taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMaterial& material) { std::vector defs = material.HasRepresentation(); + + if (defs.size() == 0) { + failed_on_purpose_.insert(material); + } + for (auto jt = defs.begin(); jt != defs.end(); ++jt) { std::vector reps = (*jt).Representations(); std::vector styles;