Skip to content

Commit c8ba21c

Browse files
further refactoring
1 parent fec0ac4 commit c8ba21c

25 files changed

+111
-118
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace geode
8989
auto wrong_adjacencies =
9090
inspector.polyhedron_facets_with_wrong_adjacency();
9191
wrong_adjacencies.set_description(
92-
absl::StrCat( "Block ", block.name(),
92+
absl::StrCat( "block ", block.name(),
9393
" polyhedron facets adjacencies issues - uuid ",
9494
block.id().string() ) );
9595
const auto& mesh = block.mesh();
@@ -112,10 +112,10 @@ namespace geode
112112
&& !is_on_surface.value() )
113113
{
114114
wrong_adjacencies.add_issue( polyhedron_facet,
115-
absl::StrCat( "Local facet ", facet_id,
115+
absl::StrCat( "facet ", facet_id,
116116
" of polyhedron ", polyhedron_id,
117117
" has no adjacencies but is not part of a "
118-
"model Surface." ) );
118+
"model surface." ) );
119119
}
120120
}
121121
}

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ namespace geode
6161
polyhedron_facets_with_wrong_adjacency() const
6262
{
6363
InspectionIssues< PolyhedronFacet > wrong_adjacency_facets{
64-
absl::StrCat( "Polyhedron facets with wrong adjacencies." )
64+
absl::StrCat( "Solid ", mesh_.name(),
65+
" polyhedron facets adjacencies issues - uuid ",
66+
mesh_.id().string() )
6567
};
6668
for( const auto polyhedron_id : Range{ mesh_.nb_polyhedra() } )
6769
{
@@ -75,9 +77,8 @@ namespace geode
7577
polyhedron_facet ) )
7678
{
7779
wrong_adjacency_facets.add_issue( polyhedron_facet,
78-
absl::StrCat( "Local facet ", facet_id,
79-
" of polyhedron ", polyhedron_id,
80-
" has wrong adjacencies." ) );
80+
absl::StrCat( "facet ", facet_id, " of polyhedron ",
81+
polyhedron_id ) );
8182
}
8283
}
8384
}

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ namespace geode
5959
polygon_edges_with_wrong_adjacency() const
6060
{
6161
InspectionIssues< PolygonEdge > wrong_adjacency_edges{ absl::StrCat(
62-
"Polygon edges with wrong adjacencies." ) };
62+
"Surface ", mesh_.name(),
63+
" Polygon edges adjacencies issues - uuid ",
64+
mesh_.id().string() ) };
6365
for( const auto polygon_id : Range{ mesh_.nb_polygons() } )
6466
{
6567
for( const auto edge_id :
@@ -71,9 +73,8 @@ namespace geode
7173
polygon_edge ) )
7274
{
7375
wrong_adjacency_edges.add_issue(
74-
polygon_edge, absl::StrCat( "Local edge ", edge_id,
75-
" of polygon ", polygon_id,
76-
" has wrong adjacencies." ) );
76+
polygon_edge, absl::StrCat( "edge ", edge_id,
77+
" of polygon ", polygon_id ) );
7778
}
7879
}
7980
}

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ namespace
112112
if( !colocated_pts.empty() )
113113
{
114114
geode::InspectionIssues< std::vector< geode::index_t > >
115-
line_issues{ absl::StrCat( "Line ", line.name(),
115+
line_issues{ absl::StrCat( "line ", line.name(),
116116
" colocated vertices - uuid ", line.id().string() ) };
117117
const auto& line_mesh = line.mesh();
118118
for( const auto& colocated_points_group : colocated_pts )
@@ -124,12 +124,11 @@ namespace
124124
&point_group_string, " ", point_index );
125125
}
126126
line_issues.add_issue( colocated_points_group,
127-
absl::StrCat( "Line ", line.name(),
128-
" has vertices with indices", point_group_string,
129-
" which are colocated at position [",
127+
absl::StrCat( point_group_string,
128+
" are colocated at position [",
130129
line_mesh.point( colocated_points_group[0] )
131130
.string(),
132-
"] - uuid ", line.id().string() ) );
131+
"]" ) );
133132
}
134133
components_colocated_points.add_issues_to_map(
135134
line.id(), std::move( line_issues ) );
@@ -160,12 +159,11 @@ namespace
160159
&point_group_string, " ", point_index );
161160
}
162161
surface_issues.add_issue( colocated_points_group,
163-
absl::StrCat( "Surface ", surface.name(),
164-
" has vertices with indices", point_group_string,
165-
" which are colocated at position [",
162+
absl::StrCat( point_group_string,
163+
" are colocated at position [",
166164
surface_mesh.point( colocated_points_group[0] )
167165
.string(),
168-
"] - uuid ", surface.id().string() ) );
166+
"]" ) );
169167
}
170168
components_colocated_points.add_issues_to_map(
171169
surface.id(), std::move( surface_issues ) );
@@ -210,12 +208,11 @@ namespace
210208
&point_group_string, " ", point_index );
211209
}
212210
block_issues.add_issue( colocated_points_group,
213-
absl::StrCat( "Block ", block.name(),
214-
" has vertices with indices", point_group_string,
215-
" which are colocated at position [",
211+
absl::StrCat( point_group_string,
212+
" are colocated at position [",
216213
block_mesh.point( colocated_points_group[0] )
217214
.string(),
218-
"] - uuid ", block.id().string() ) );
215+
"]" ) );
219216
}
220217
components_colocated_points.add_issues_to_map(
221218
block.id(), std::move( block_issues ) );

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ namespace
5656
== geode::Line< Model::dim >::component_type_static() )
5757
{
5858
return point.inexact_equal( model.line( cmv.component_id.id() )
59-
.mesh()
60-
.point( cmv.vertex ) );
59+
.mesh()
60+
.point( cmv.vertex ) );
6161
}
6262
else if( cmv.component_id.type()
6363
== geode::Surface< Model::dim >::component_type_static() )
6464
{
6565
return point.inexact_equal( model.surface( cmv.component_id.id() )
66-
.mesh()
67-
.point( cmv.vertex ) );
66+
.mesh()
67+
.point( cmv.vertex ) );
6868
}
6969
return point.inexact_equal(
7070
model.corner( cmv.component_id.id() ).mesh().point( cmv.vertex ) );
@@ -85,8 +85,8 @@ namespace
8585
if( cmv.component_id.type() == geode::Block3D::component_type_static() )
8686
{
8787
return point.inexact_equal( model.block( cmv.component_id.id() )
88-
.mesh()
89-
.point( cmv.vertex ) );
88+
.mesh()
89+
.point( cmv.vertex ) );
9090
}
9191
return model_cmv_is_colocated_on_point_base< geode::BRep >(
9292
model, cmv, point );
@@ -161,7 +161,7 @@ namespace geode
161161

162162
std::string UniqueVerticesInspectionResult::inspection_type() const
163163
{
164-
return "Unique vertices colocation inspection";
164+
return "Unique vertices colocalization inspection";
165165
}
166166

167167
template < typename Model >
@@ -225,10 +225,8 @@ namespace geode
225225
unique_vertices_->point( unique_vertex_id ) ) )
226226
{
227227
vertices_issues.add_issue( unique_vertex_id,
228-
absl::StrCat( "Unique vertex with index ",
229-
unique_vertex_id,
230-
" has component mesh vertices which are not "
231-
"on the same position." ) );
228+
absl::StrCat( "Unique vertex ", unique_vertex_id,
229+
" is linked to several location." ) );
232230
}
233231
}
234232
}
@@ -260,11 +258,11 @@ namespace geode
260258
if( !fixed_point_group.empty() )
261259
{
262260
vertices_issues.add_issue( fixed_point_group,
263-
absl::StrCat( "Unique vertices with indices",
264-
point_group_string, " are colocated at position [",
261+
absl::StrCat( "Unique vertices ", point_group_string,
262+
" are colocated at the position [",
265263
unique_vertices_->point( fixed_point_group[0] )
266264
.string(),
267-
"]." ) );
265+
"]" ) );
268266
}
269267
}
270268
}

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

Lines changed: 4 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 \n";
62+
return "No degeneration issues in model\n";
6363
}
6464
return message;
6565
}
@@ -101,9 +101,9 @@ namespace geode
101101
}
102102
const geode::SolidMeshDegeneration3D inspector{ mesh };
103103
auto small_edges = inspector.small_edges( threshold );
104-
small_edges.set_description(
105-
absl::StrCat( "Block ", block.name(),
106-
" small edges - uuid ", block.id().string() ) );
104+
small_edges.set_description( absl::StrCat( "Block ",
105+
block.name(), " small edges polyhedra - uuid ",
106+
block.id().string() ) );
107107
small_edges_map.add_issues_to_map(
108108
block.id(), std::move( small_edges ) );
109109
auto small_polyhedra =

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ namespace geode
6060
{
6161
if( mesh_.edge_length( edge_id ) <= threshold )
6262
{
63-
degenerated_edges_index.add_issue(
64-
edge_id, absl::StrCat( "Edge with index ", edge_id,
65-
", at position [",
66-
mesh_.edge_barycenter( edge_id ).string(),
67-
"], is degenerated." ) );
63+
degenerated_edges_index.add_issue( edge_id,
64+
absl::StrCat( "Edge ", edge_id, ", at position [",
65+
mesh_.edge_barycenter( edge_id ).string(), "]" ) );
6866
}
6967
}
7068
return degenerated_edges_index;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ namespace geode
7777
<= threshold )
7878
{
7979
wrong_polyhedra.add_issue( polyhedron_id,
80-
absl::StrCat( "Polyhedron ", polyhedron_id,
81-
" is degenerated." ) );
80+
absl::StrCat( "Polyhedron ", polyhedron_id ) );
8281
}
8382
}
8483
return wrong_polyhedra;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ namespace geode
7575
<= threshold )
7676
{
7777
wrong_polygons.add_issue(
78-
polygon_id, absl::StrCat( "Polygon ", polygon_id,
79-
" is degenerated." ) );
78+
polygon_id, absl::StrCat( "Polygon ", polygon_id ) );
8079
}
8180
}
8281
return wrong_polygons;

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ namespace
7474
colocated_points_groups_end, colocated_points_indices.end() );
7575

7676
geode::InspectionIssues< std::vector< geode::index_t > >
77-
groups_of_colocated_points{ "Groups of colocated points." };
77+
groups_of_colocated_points{ "Groups of colocated points" };
7878
for( const auto& colocated_points_group : colocated_points_indices )
7979
{
8080
std::string point_group_string;
@@ -83,13 +83,13 @@ namespace
8383
absl::StrAppend( &point_group_string, " ", point_index );
8484
}
8585
groups_of_colocated_points.add_issue( colocated_points_group,
86-
absl::StrCat( "Vertices with indices", point_group_string,
87-
" are colocated at position [",
86+
absl::StrCat( "Vertices ", point_group_string,
87+
" are colocated at the position [",
8888
mesh_colocation_info
89-
.unique_points[mesh_colocation_info
90-
.colocated_mapping[colocated_points_group[0]]]
89+
.unique_points[mesh_colocation_info.colocated_mapping
90+
[colocated_points_group[0]]]
9191
.string(),
92-
"]." ) );
92+
"]" ) );
9393
}
9494
return groups_of_colocated_points;
9595
}

0 commit comments

Comments
 (0)