Skip to content

Commit 1c8fc43

Browse files
fix(ErrorMessage): add component name in log message
1 parent d724d46 commit 1c8fc43

21 files changed

+81
-68
lines changed

include/geode/inspector/information.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ namespace geode
7272
{
7373
if( issues_.empty() )
7474
{
75-
return absl::StrCat( description_, " -> No Issues :) \n" );
75+
return absl::StrCat( "No issues with ", description_, "\n" );
7676
}
7777
auto message = absl::StrCat( description_ );
7878
for( const auto& issue : messages_ )
@@ -137,7 +137,7 @@ namespace geode
137137
{
138138
if( issues_map_.empty() )
139139
{
140-
return absl::StrCat( description_, " -> No Issues :) \n" );
140+
return absl::StrCat( "No issues with ", description_, "\n" );
141141
}
142142
auto message = absl::StrCat( description_ );
143143
for( const auto& issues : issues_map_ )

src/geode/inspector/criterion/adjacency/brep_meshes_adjacency.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace geode
6262
{
6363
return message;
6464
}
65-
return "No adjacency issues in model component meshes \n";
65+
return "No adjacency issues in model \n";
6666
}
6767

6868
std::string BRepMeshesAdjacencyInspectionResult::inspection_type() const
@@ -89,8 +89,9 @@ namespace geode
8989
auto wrong_adjacencies =
9090
inspector.polyhedron_facets_with_wrong_adjacency();
9191
wrong_adjacencies.set_description(
92-
absl::StrCat( "Block with uuid ", block.id().string(),
93-
" polyhedron facets adjacencies issues" ) );
92+
absl::StrCat( "Block ", block.name(),
93+
" polyhedron facets adjacencies issues - uuid ",
94+
block.id().string() ) );
9495
const auto& mesh = block.mesh();
9596
for( const auto polyhedron_id : Range{ mesh.nb_polyhedra() } )
9697
{

src/geode/inspector/criterion/adjacency/section_meshes_adjacency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ namespace geode
5353
{
5454
return surfaces_edges_with_wrong_adjacencies.string();
5555
}
56-
return "No adjacency issues in model component meshes \n";
56+
return "No adjacency issues in model \n";
5757
}
5858

5959
std::string SectionMeshesAdjacencyInspectionResult::inspection_type() const

src/geode/inspector/criterion/colocation/component_meshes_colocation.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ namespace
112112
if( !colocated_pts.empty() )
113113
{
114114
geode::InspectionIssues< std::vector< geode::index_t > >
115-
line_issues{ absl::StrCat( "Line with uuid ",
116-
line.id().string(), " colocated vertices" ) };
115+
line_issues{ absl::StrCat( "Line ", line.name(),
116+
" colocated vertices - uuid ", line.id().string() ) };
117117
const auto& line_mesh = line.mesh();
118118
for( const auto& colocated_points_group : colocated_pts )
119119
{
@@ -124,12 +124,12 @@ namespace
124124
&point_group_string, " ", point_index );
125125
}
126126
line_issues.add_issue( colocated_points_group,
127-
absl::StrCat( "Line with uuid ", line.id().string(),
127+
absl::StrCat( "Line ", line.name(),
128128
" has vertices with indices", point_group_string,
129129
" which are colocated at position [",
130130
line_mesh.point( colocated_points_group[0] )
131131
.string(),
132-
"]." ) );
132+
"] - uuid ", line.id().string() ) );
133133
}
134134
components_colocated_points.add_issues_to_map(
135135
line.id(), std::move( line_issues ) );
@@ -147,8 +147,9 @@ namespace
147147
if( !colocated_pts.empty() )
148148
{
149149
geode::InspectionIssues< std::vector< geode::index_t > >
150-
surface_issues{ absl::StrCat( "Surface with uuid ",
151-
surface.id().string(), " colocated vertices" ) };
150+
surface_issues{ absl::StrCat( "Surface ", surface.name(),
151+
" colocated vertices - uuid ",
152+
surface.id().string() ) };
152153
const auto& surface_mesh = surface.mesh();
153154
for( const auto& colocated_points_group : colocated_pts )
154155
{
@@ -159,13 +160,12 @@ namespace
159160
&point_group_string, " ", point_index );
160161
}
161162
surface_issues.add_issue( colocated_points_group,
162-
absl::StrCat( "Surface with uuid ",
163-
surface.id().string(), " has vertices with indices",
164-
point_group_string,
163+
absl::StrCat( "Surface ", surface.name(),
164+
" has vertices with indices", point_group_string,
165165
" which are colocated at position [",
166166
surface_mesh.point( colocated_points_group[0] )
167167
.string(),
168-
"]." ) );
168+
"] - uuid ", surface.id().string() ) );
169169
}
170170
components_colocated_points.add_issues_to_map(
171171
surface.id(), std::move( surface_issues ) );
@@ -198,8 +198,8 @@ namespace
198198
if( !colocated_pts.empty() )
199199
{
200200
geode::InspectionIssues< std::vector< geode::index_t > >
201-
block_issues{ absl::StrCat( "Block with uuid ",
202-
block.id().string(), " colocated vertices" ) };
201+
block_issues{ absl::StrCat( "Block ", block.name(),
202+
" colocated vertices - uuid ", block.id().string() ) };
203203
const auto& block_mesh = block.mesh();
204204
for( const auto& colocated_points_group : colocated_pts )
205205
{
@@ -210,12 +210,12 @@ namespace
210210
&point_group_string, " ", point_index );
211211
}
212212
block_issues.add_issue( colocated_points_group,
213-
absl::StrCat( "Block with uuid ", block.id().string(),
213+
absl::StrCat( "Block ", block.name(),
214214
" has vertices with indices", point_group_string,
215215
" which are colocated at position [",
216216
block_mesh.point( colocated_points_group[0] )
217217
.string(),
218-
"]." ) );
218+
"] - uuid ", block.id().string() ) );
219219
}
220220
components_colocated_points.add_issues_to_map(
221221
block.id(), std::move( block_issues ) );
@@ -238,7 +238,7 @@ namespace geode
238238
{
239239
return colocated_points_groups.string();
240240
}
241-
return "No issues of colocation in model component meshes \n";
241+
return "No issues of colocation in model \n";
242242
}
243243

244244
std::string MeshesColocationInspectionResult::inspection_type() const

src/geode/inspector/criterion/degeneration/brep_meshes_degeneration.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace geode
5959
}
6060
if( message.empty() )
6161
{
62-
return "No degeneration issues in model component meshes \n";
62+
return "No degeneration issues in model \n";
6363
}
6464
return message;
6565
}
@@ -101,14 +101,16 @@ namespace geode
101101
}
102102
const geode::SolidMeshDegeneration3D inspector{ mesh };
103103
auto small_edges = inspector.small_edges( threshold );
104-
small_edges.set_description( absl::StrCat(
105-
"Block ", block.id().string(), " small edges" ) );
104+
small_edges.set_description(
105+
absl::StrCat( "Block ", block.name(),
106+
" small edges - uuid ", block.id().string() ) );
106107
small_edges_map.add_issues_to_map(
107108
block.id(), std::move( small_edges ) );
108109
auto small_polyhedra =
109110
inspector.small_height_polyhedra( threshold );
110111
small_polyhedra.set_description( absl::StrCat( "Block ",
111-
block.id().string(), " small height polyhedra" ) );
112+
block.name(), " small height polyhedra - uuid ",
113+
block.id().string() ) );
112114
small_polyhedra_map.add_issues_to_map(
113115
block.id(), std::move( small_polyhedra ) );
114116
}

src/geode/inspector/criterion/degeneration/edgedcurve_degeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace geode
5454
InspectionIssues< index_t > small_edges( double threshold ) const
5555
{
5656
InspectionIssues< index_t > degenerated_edges_index{
57-
"Degenerated Edges of EdgeCurve " + mesh_.id().string() + "."
57+
"Degenerated Edges."
5858
};
5959
for( const auto edge_id : Range{ mesh_.nb_edges() } )
6060
{

src/geode/inspector/criterion/degeneration/section_meshes_degeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace geode
5252
{
5353
return message;
5454
}
55-
return "No degeneration issues in model component meshes \n";
55+
return "No degeneration issues in model \n";
5656
}
5757

5858
std::string

src/geode/inspector/criterion/degeneration/solid_degeneration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ namespace geode
7878
{
7979
wrong_polyhedra.add_issue( polyhedron_id,
8080
absl::StrCat( "Polyhedron ", polyhedron_id,
81-
" of Solid ", this->mesh().id().string(),
8281
" is degenerated." ) );
8382
}
8483
}

src/geode/inspector/criterion/degeneration/surface_degeneration.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ namespace geode
7474
if( this->mesh().polygon_minimum_height( polygon_id )
7575
<= threshold )
7676
{
77-
wrong_polygons.add_issue( polygon_id,
78-
absl::StrCat( "Polygon ", polygon_id, " of Surface ",
79-
this->mesh().id().string(), " is degenerated." ) );
77+
wrong_polygons.add_issue(
78+
polygon_id, absl::StrCat( "Polygon ", polygon_id,
79+
" is degenerated." ) );
8080
}
8181
}
8282
return wrong_polygons;

src/geode/inspector/criterion/internal/component_meshes_adjacency.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ namespace geode
7979
surface.mesh()
8080
};
8181
auto issues = inspector.polygon_edges_with_wrong_adjacency();
82-
issues.set_description(
83-
absl::StrCat( "Surface ", surface.id().string(),
84-
" polygon edges adjacency issues." ) );
82+
issues.set_description( absl::StrCat( "Surface ",
83+
surface.name(), " polygon edges adjacency issues - uuid ",
84+
surface.id().string() ) );
8585
const auto& mesh = surface.mesh();
8686
for( const auto polygon_id : Range{ mesh.nb_polygons() } )
8787
{

0 commit comments

Comments
 (0)