Skip to content

Commit a9c18d9

Browse files
authored
Merge pull request #161 from Geode-solutions/fix/wrong_output_of_block_topology_issues
fix(BlockTopology): Wrong check leading to wrong output of issues
2 parents cfef191 + 5e767a3 commit a9c18d9

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

src/geode/inspector/topology/brep_blocks_topology.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,7 @@ namespace geode
436436
.string(),
437437
"\n" );
438438
}
439-
if( unique_vertices_linked_to_a_single_and_invalid_surface.nb_issues()
440-
!= 0 )
439+
if( unique_vertices_with_incorrect_block_cmvs_count.nb_issues() != 0 )
441440
{
442441
absl::StrAppend( &message,
443442
unique_vertices_with_incorrect_block_cmvs_count.string(),

src/geode/inspector/topology/internal/expected_nb_cmvs.cpp

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
#include <geode/inspector/topology/internal/expected_nb_cmvs.hpp>
2525

26-
// #include <geode/mesh/core/point_set.hpp>
27-
// #include <geode/mesh/core/solid_mesh.hpp>
28-
// #include <geode/mesh/core/surface_mesh.hpp>
26+
#include <geode/geometry/point.hpp>
27+
28+
#include <geode/mesh/core/solid_mesh.hpp>
2929

3030
#include <geode/model/mixin/core/block.hpp>
3131
#include <geode/model/mixin/core/corner.hpp>
@@ -107,7 +107,14 @@ namespace
107107
nb_block_cmvs == 1
108108
? std::nullopt
109109
: std::make_optional( absl::StrCat( "unique vertex ",
110-
unique_vertex_id, " is part of Block ",
110+
unique_vertex_id, " at position [",
111+
brep.block( unique_vertex_cmvs.block_cmvs[0]
112+
.component_id.id() )
113+
.mesh()
114+
.point(
115+
unique_vertex_cmvs.block_cmvs[0].vertex )
116+
.string(),
117+
"]", " is part of Block ",
111118
brep.block( block_uuid ).name(), " (",
112119
block_uuid.string(),
113120
") and exactly one Corner and one Line but has ",
@@ -122,10 +129,16 @@ namespace
122129
nb_block_cmvs == predicted_nb_block_cmvs
123130
? std::nullopt
124131
: std::make_optional( absl::StrCat( "unique vertex ",
125-
unique_vertex_id, " is part of the Block ",
132+
unique_vertex_id, " at position [",
133+
brep.block( unique_vertex_cmvs.block_cmvs[0]
134+
.component_id.id() )
135+
.mesh()
136+
.point( unique_vertex_cmvs.block_cmvs[0].vertex )
137+
.string(),
138+
"]", " is part of Block ",
126139
brep.block( block_uuid ).name(), " (",
127140
block_uuid.string(),
128-
") and of a Corner, and of no internal Line, ",
141+
") and of a Corner, and of no internal Surface, ",
129142
"and of ", nb_boundary_surface_cmvs,
130143
" boundary Surface(s), and of ",
131144
nb_boundary_line_cmvs,
@@ -141,7 +154,13 @@ namespace
141154
nb_block_cmvs == predicted_nb_block_cmvs
142155
? std::nullopt
143156
: std::make_optional( absl::StrCat( "unique vertex ",
144-
unique_vertex_id, " is part of the Block ",
157+
unique_vertex_id, " at position [",
158+
brep.block( unique_vertex_cmvs.block_cmvs[0]
159+
.component_id.id() )
160+
.mesh()
161+
.point( unique_vertex_cmvs.block_cmvs[0].vertex )
162+
.string(),
163+
"]", " is part of the Block ",
145164
brep.block( block_uuid ).name(), " (",
146165
block_uuid.string(),
147166
") and none of its internal Surfaces but has ",
@@ -172,7 +191,7 @@ namespace
172191
nb_block_cmvs == predicted_nb_block_cmvs
173192
? std::nullopt
174193
: std::make_optional( absl::StrCat( "unique vertex ",
175-
unique_vertex_id, " is part of the Block ",
194+
unique_vertex_id, " is part of Block ",
176195
brep.block( block_uuid ).name(), " (",
177196
block_uuid.string(), "), has ", nb_internal_surface_cmvs,
178197
" internal Surface(s) mesh vertices (CMVs), "

0 commit comments

Comments
 (0)