Introduce unique error codes

This commit is contained in:
Thomas Krijnen
2026-06-10 09:14:22 +02:00
parent 251157f8d4
commit a751fb956d
86 changed files with 495 additions and 484 deletions
@@ -87,7 +87,7 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(ifcopenshell::geometr
try {
BRepMesh_IncrementalMesh(shape_, settings.get<settings::MesherLinearDeflection>().get(), false, settings.get<settings::MesherAngularDeflection>().get());
} catch (...) {
Logger::Message(Logger::LOG_ERROR, "Failed to triangulate shape");
Logger::Message(Logger::LOG_ERROR, "GEO", 183, "Failed to triangulate shape");
return;
}
}
@@ -113,7 +113,7 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(ifcopenshell::geometr
Handle_Poly_Triangulation tri = BRep_Tool::Triangulation(face, loc);
if (tri.IsNull()) {
Logger::Message(Logger::LOG_ERROR, "Triangulation missing for face");
Logger::Message(Logger::LOG_ERROR, "GEO", 184, "Triangulation missing for face");
} else {
// Keep track of the number of times an edge is used
// Manifold edges (i.e. edges used twice) are deemed invisible
@@ -174,7 +174,7 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(ifcopenshell::geometr
else triangles(i).Get(n1, n2, n3);
if (dict[n1] == dict[n2] || dict[n2] == dict[n3] || dict[n3] == dict[n1]) {
Logger::Warning("Mesher generated a degenerate triangle, ignoring");
Logger::Warning("GEO", 185, "Mesher generated a degenerate triangle, ignoring");
continue;
}
@@ -619,7 +619,7 @@ namespace {
try {
BRepMesh_IncrementalMesh(s, tol);
} catch (...) {
Logger::Message(Logger::LOG_ERROR, "Failed to triangulate shape");
Logger::Message(Logger::LOG_ERROR, "GEO", 186, "Failed to triangulate shape");
return;
}
meshed = true;