diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 377de37af4..910d17ad18 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -656,7 +656,7 @@ int main(int argc, char** argv) if (!context_iterator.initialize()) { /// @todo It would be nice to know and print separate error prints for a case where we found no entities /// and for a case we found no entities that satisfy our filtering criteria. - Logger::Error("No geometrical entities found"); + Logger::Notice("No geometrical elements found or none succesfully converted"); std::remove(output_temp_filename.c_str()); /**< @todo Windows Unicode support */ write_log(!quiet); return EXIT_FAILURE; diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 16691d49ed..8239a34012 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -177,7 +177,7 @@ namespace { std::pair unit_info = k->initializeUnits(project->UnitsInContext()); unit_magnitude = unit_info.second; } else { - Logger::Error("A single IfcProject is expected (encountered " + boost::lexical_cast(projects->size()) + "); unable to read unit information."); + Logger::Warning("A single IfcProject is expected (encountered " + boost::lexical_cast(projects->size()) + "); unable to read unit information."); } // Set precision from file @@ -451,7 +451,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l B.MakeCompound(C); B.Add(C, complete_shape); complete_shape = C; - Logger::Message(Logger::LOG_ERROR, "Multiple components in IfcConnectedFaceSet"); + Logger::Warning("Multiple components in IfcConnectedFaceSet"); } B.Add(complete_shape, result_shape); } @@ -466,7 +466,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l B.MakeCompound(C); B.Add(C, complete_shape); complete_shape = C; - Logger::Message(Logger::LOG_ERROR, "Loose faces in IfcConnectedFaceSet"); + Logger::Warning("Loose faces in IfcConnectedFaceSet"); } B.Add(complete_shape, loose_faces.Current()); } @@ -474,7 +474,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l shape = complete_shape; } else { - Logger::Message(Logger::LOG_WARNING, "Failed to sew faceset"); + Logger::Error("Failed to sew faceset"); } return valid_shell; @@ -651,7 +651,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons fix.Perform(); brep_cut_result = fix.Shape(); } catch (...) { - Logger::Message(Logger::LOG_WARNING, "Shape healing failed on opening subtraction result", entity); + Logger::Error("Shape healing failed on opening subtraction result", entity); } BRepCheck_Analyzer analyser(brep_cut_result); @@ -870,7 +870,7 @@ bool IfcGeom::Kernel::convert_wire_to_face(const TopoDS_Wire& w, TopoDS_Face& fa TopTools_ListOfShape results; if (wire_intersections(wire, results)) { - Logger::Error("Self-intersections with " + boost::lexical_cast(results.Extent()) + " cycles detected"); + Logger::Warning("Self-intersections with " + boost::lexical_cast(results.Extent()) + " cycles detected"); select_largest(results, wire); } @@ -951,7 +951,7 @@ bool IfcGeom::Kernel::profile_helper(int numVerts, double* verts, int numFillets if (fillet.IsDone()) { face = TopoDS::Face(fillet.Shape()); } else { - Logger::Message(Logger::LOG_WARNING, "Failed to process profile fillets"); + Logger::Error("Failed to process profile fillets"); } } @@ -1841,7 +1841,7 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn try { IfcEntityList::ptr units = unit_assignment->Units(); if (!units || !units->size()) { - Logger::Message(Logger::LOG_ERROR, "No unit information found"); + Logger::Warning("No unit information found"); } else { for (IfcEntityList::it it = units->begin(); it != units->end(); ++it) { IfcUtil::IfcBaseClass* base = *it; @@ -1884,11 +1884,11 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn } if (!length_unit_encountered) { - Logger::Error("No length unit encountered"); + Logger::Warning("No length unit encountered"); } if (!angle_unit_encountered) { - Logger::Error("No plane angle unit encountered"); + Logger::Warning("No plane angle unit encountered"); } return std::pair(unit_name, unit_magnitude); @@ -3590,7 +3590,7 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopoDS_Shap fix.Perform(); result = fix.Shape(); } catch (...) { - Logger::Message(Logger::LOG_WARNING, "Shape healing failed on boolean result"); + Logger::Error("Shape healing failed on boolean result"); } } else { @@ -3677,7 +3677,7 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li fix.Perform(); r = fix.Shape(); } catch (...) { - Logger::Message(Logger::LOG_WARNING, "Shape healing failed on boolean result"); + Logger::Error("Shape healing failed on boolean result"); } success = BRepCheck_Analyzer(r).IsValid() != 0; @@ -3841,6 +3841,6 @@ IfcGeom::Kernel::faceset_helper::faceset_helper(Kernel* kernel, const IfcSchema: } if (loops_removed || (non_manifold && l->declaration().is(IfcSchema::IfcClosedShell::Class()))) { - Logger::Error(boost::lexical_cast(loops_removed) + " loops removed and " + boost::lexical_cast(non_manifold) + " non-manifold edges for:", l); + Logger::Warning(boost::lexical_cast(loops_removed) + " loops removed and " + boost::lexical_cast(non_manifold) + " non-manifold edges for:", l); } } \ No newline at end of file diff --git a/src/ifcgeom/IfcGeomIteratorImplementation.h b/src/ifcgeom/IfcGeomIteratorImplementation.h index 98158c6475..b32668a5e8 100644 --- a/src/ifcgeom/IfcGeomIteratorImplementation.h +++ b/src/ifcgeom/IfcGeomIteratorImplementation.h @@ -149,7 +149,7 @@ namespace IfcGeom { unit_name = length_unit.first; unit_magnitude = length_unit.second; } else { - Logger::Error("A single IfcProject is expected (encountered " + boost::lexical_cast(projects->size()) + "); unable to read unit information."); + Logger::Warning("A single IfcProject is expected (encountered " + boost::lexical_cast(projects->size()) + "); unable to read unit information."); } } @@ -211,7 +211,7 @@ namespace IfcGeom { boost::to_lower(context_type); if (allowed_context_types.find(context_type) == allowed_context_types.end()) { - Logger::Message(Logger::LOG_ERROR, std::string("ContextType '") + context->ContextType() + "' not allowed:", context); + Logger::Warning(std::string("ContextType '") + context->ContextType() + "' not allowed:", context); } if (context_types.find(context_type) != context_types.end()) { filtered_contexts->push(context); @@ -270,12 +270,12 @@ namespace IfcGeom { } if (representations->size() == 0) { - Logger::Message(Logger::LOG_ERROR, "No representations encountered in relevant contexts, using all"); + Logger::Warning("No representations encountered in relevant contexts, using all"); representations = ifc_file->instances_by_type(); } if (representations->size() == 0) { - Logger::Message(Logger::LOG_ERROR, "No representations encountered, aborting"); + Logger::Warning("No representations encountered, aborting"); return false; } diff --git a/src/serializers/SvgSerializer.cpp b/src/serializers/SvgSerializer.cpp index fb99c2c69f..9710b5338c 100644 --- a/src/serializers/SvgSerializer.cpp +++ b/src/serializers/SvgSerializer.cpp @@ -523,6 +523,6 @@ void SvgSerializer::setFile(IfcParse::IfcFile* f) { } } - Logger::Error("No building storeys encountered, output might be invalid or missing"); + Logger::Warning("No building storeys encountered, output might be invalid or missing"); } }