Less useless logging

This commit is contained in:
Thomas Krijnen
2026-04-10 09:54:28 +02:00
parent 1840e3d1a8
commit 4621fc9269
2 changed files with 13 additions and 4 deletions
+8 -4
View File
@@ -149,8 +149,10 @@ namespace {
template <>
struct dispatch_conversion<ifcopenshell::geometry::taxonomy::type_by_kind::max> {
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<ifcopenshell::geometry::taxonomy::upgrades::max> {
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;
}
};
+5
View File
@@ -554,6 +554,11 @@ IfcSchema::IfcStyledItem mapping::find_style(const IfcSchema::IfcRepresentationI
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMaterial& material) {
std::vector<IfcSchema::IfcMaterialDefinitionRepresentation> defs = material.HasRepresentation();
if (defs.size() == 0) {
failed_on_purpose_.insert(material);
}
for (auto jt = defs.begin(); jt != defs.end(); ++jt) {
std::vector<IfcSchema::IfcRepresentation> reps = (*jt).Representations();
std::vector<IfcSchema::IfcStyledItem> styles;