Skip to content

Commit cac272b

Browse files
committed
fix(StructuralModelInspection): Update of the exe with the new inspection functions developed.
1 parent 6529da7 commit cac272b

File tree

1 file changed

+80
-2
lines changed

1 file changed

+80
-2
lines changed

src/bin/geode-inspector-structural-model.cpp

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ ABSL_FLAG( bool,
6363
blocks,
6464
true,
6565
"Toggle inspection of block topology through unique vertices" );
66+
ABSL_FLAG( bool, adjacency, true, "Toggle adjacency criterion for components" );
67+
ABSL_FLAG(
68+
bool, colocation, true, "Toggle colocation criterion for components" );
69+
ABSL_FLAG(
70+
bool, degeneration, true, "Toggle degeneration criterion for components" );
71+
ABSL_FLAG( bool, manifold, true, "Toggle manifold criterion for components" );
6672
ABSL_FLAG( bool,
6773
verbose,
6874
false,
@@ -73,7 +79,7 @@ void inspect_model( const geode::StructuralModel& model )
7379
{
7480
const auto verbose = absl::GetFlag( FLAGS_verbose );
7581
const geode::BRepInspector model_inspector{ model, verbose };
76-
absl::InlinedVector< async::task< void >, 20 > tasks;
82+
absl::InlinedVector< async::task< void >, 29 > tasks;
7783
if( absl::GetFlag( FLAGS_component_linking ) )
7884
{
7985
tasks.emplace_back( async::spawn( [&model_inspector] {
@@ -103,6 +109,13 @@ void inspect_model( const geode::StructuralModel& model )
103109
geode::Logger::info(
104110
nb_blocks, " blocks meshed but not linked to a unique vertex" );
105111
} ) );
112+
tasks.emplace_back( async::spawn( [&model_inspector] {
113+
const auto nb_unlinked_uv =
114+
model_inspector
115+
.nb_unique_vertices_not_linked_to_a_component_vertex();
116+
geode::Logger::info( nb_unlinked_uv,
117+
" unique vertices not linked to a component mesh vertex" );
118+
} ) );
106119
}
107120
if( absl::GetFlag( FLAGS_unique_vertices_colocation ) )
108121
{
@@ -221,7 +234,9 @@ void inspect_model( const geode::StructuralModel& model )
221234
.part_of_line_and_not_on_surface_border_unique_vertices()
222235
.size();
223236
geode::Logger::info( nb,
224-
" unique vertices part of line and not on surface border." );
237+
" unique vertices part of a line and a surface but for "
238+
"which one of the associated vertex on the surface mesh is not "
239+
"on the mesh border." );
225240
} ) );
226241
}
227242
if( absl::GetFlag( FLAGS_blocks ) )
@@ -233,6 +248,69 @@ void inspect_model( const geode::StructuralModel& model )
233248
nb, " unique vertices part of blocks with invalid topology." );
234249
} ) );
235250
}
251+
if( absl::GetFlag( FLAGS_adjacency ) )
252+
{
253+
tasks.emplace_back( async::spawn( [&model_inspector] {
254+
const auto nb =
255+
model_inspector.surfaces_nb_edges_with_wrong_adjacencies()
256+
.size();
257+
geode::Logger::info(
258+
nb, " surfaces with adjacency problems in their mesh." );
259+
} ) );
260+
tasks.emplace_back( async::spawn( [&model_inspector] {
261+
const auto nb =
262+
model_inspector.blocks_nb_facets_with_wrong_adjacencies()
263+
.size();
264+
geode::Logger::info(
265+
nb, " blocks with adjacency problems in their mesh." );
266+
} ) );
267+
}
268+
if( absl::GetFlag( FLAGS_colocation ) )
269+
{
270+
tasks.emplace_back( async::spawn( [&model_inspector] {
271+
const auto nb =
272+
model_inspector.components_nb_colocated_points().size();
273+
geode::Logger::info(
274+
nb, " components with colocated points in their mesh." );
275+
} ) );
276+
}
277+
if( absl::GetFlag( FLAGS_degeneration ) )
278+
{
279+
tasks.emplace_back( async::spawn( [&model_inspector] {
280+
const auto nb =
281+
model_inspector.components_with_degenerated_edges().size();
282+
geode::Logger::info(
283+
nb, " components with degenerated edges in their mesh." );
284+
} ) );
285+
}
286+
if( absl::GetFlag( FLAGS_manifold ) )
287+
{
288+
tasks.emplace_back( async::spawn( [&model_inspector] {
289+
const auto nb =
290+
model_inspector.component_meshes_nb_non_manifold_vertices()
291+
.size();
292+
geode::Logger::info(
293+
nb, " components with non manifold vertices in their mesh." );
294+
} ) );
295+
tasks.emplace_back( async::spawn( [&model_inspector] {
296+
const auto nb =
297+
model_inspector.component_meshes_non_manifold_edges().size();
298+
geode::Logger::info(
299+
nb, " components with non manifold edges in their mesh." );
300+
} ) );
301+
tasks.emplace_back( async::spawn( [&model_inspector] {
302+
const auto nb =
303+
model_inspector.component_meshes_nb_non_manifold_facets()
304+
.size();
305+
geode::Logger::info(
306+
nb, " components with non manifold facets in their mesh." );
307+
} ) );
308+
tasks.emplace_back( async::spawn( [&model_inspector] {
309+
const auto nb = model_inspector.model_non_manifold_edges().size();
310+
geode::Logger::info(
311+
nb, " components with non manifold model edges." );
312+
} ) );
313+
}
236314
async::when_all( tasks.begin(), tasks.end() ).wait();
237315
}
238316

0 commit comments

Comments
 (0)