Skip to content

Commit 8aea46c

Browse files
Merge pull request #128 from Geode-solutions/fix/non-manifold-edges-log
fix(Logger): add more details about non manifold edges
2 parents ff9b35b + 3c1a956 commit 8aea46c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/geode/inspector/criterion/manifold/surface_edge_manifold.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ namespace geode
8282
{
8383
for( const auto& edge : edge_to_polygons_around( mesh_ ) )
8484
{
85-
if( edge.second.second && edge.second.first != 1 )
85+
const auto [nb_incident_polygons, on_border] = edge.second;
86+
if( on_border && nb_incident_polygons != 1 )
8687
{
8788
return false;
8889
}
89-
if( !edge.second.second && edge.second.first != 2 )
90+
if( !on_border && nb_incident_polygons != 2 )
9091
{
9192
return false;
9293
}
@@ -101,19 +102,22 @@ namespace geode
101102
};
102103
for( const auto& edge : edge_to_polygons_around( mesh_ ) )
103104
{
104-
if( edge.second.second && edge.second.first != 1 )
105+
const auto [nb_incident_polygons, on_border] = edge.second;
106+
if( on_border && nb_incident_polygons != 1 )
105107
{
106108
non_manifold_edges.add_issue( edge.first.vertices(),
107109
absl::StrCat( "Edge between vertices with index ",
108110
edge.first.vertices()[0], " and index ",
109-
edge.first.vertices()[1], " is not manifold." ) );
111+
edge.first.vertices()[1],
112+
" is not manifold (detected as on border)." ) );
110113
}
111-
if( !edge.second.second && edge.second.first != 2 )
114+
if( !on_border && nb_incident_polygons != 2 )
112115
{
113116
non_manifold_edges.add_issue( edge.first.vertices(),
114117
absl::StrCat( "Edge between vertices with index ",
115118
edge.first.vertices()[0], " and index ",
116-
edge.first.vertices()[1], " is not manifold." ) );
119+
edge.first.vertices()[1],
120+
" is not manifold (detected as not on border)." ) );
117121
}
118122
}
119123
return non_manifold_edges;

0 commit comments

Comments
 (0)