File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ namespace
7979 {
8080 const auto adj =
8181 mesh_.polygon_adjacent_edge ( { cur_polygon, e } );
82- if ( !adj || visited[adj-> polygon_id ] )
82+ if ( !adj )
8383 {
8484 continue ;
8585 }
@@ -89,6 +89,20 @@ namespace
8989 const auto same_orientation =
9090 ( vertices[e] == adj_vertices[1 ]
9191 && vertices[e_next] == adj_vertices[0 ] );
92+ if ( visited[adj->polygon_id ] )
93+ {
94+ const auto is_valid =
95+ same_orientation
96+ ? cur_polygon_reorient
97+ == reorient_polygon_[adj->polygon_id ]
98+ : cur_polygon_reorient
99+ != reorient_polygon_[adj->polygon_id ];
100+ OPENGEODE_DATA_EXCEPTION ( is_valid,
101+ " [RepairPolygonOrientations] Mobius "
102+ " strip detected, polygons orientations "
103+ " can not be repaired" );
104+ continue ;
105+ }
92106 const auto adj_polygon = adj->polygon_id ;
93107 visited[adj_polygon] = true ;
94108 reorient_polygon_[adj_polygon] =
You can’t perform that action at this time.
0 commit comments