File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,31 @@ namespace geode
161161 const auto & mesh = surface.mesh ();
162162 for ( const auto & pair : surface_pair.second )
163163 {
164- for ( auto & polygon_vertex :
165- mesh.polygons_from_edge_vertices ( pair ) )
164+ if ( auto edge = mesh.polygon_edge_from_vertices (
165+ pair[0 ], pair[1 ] ) )
166+
167+ {
168+ edges[surface.id ()].emplace_back (
169+ std::move ( edge.value () ) );
170+ if ( auto adj =
171+ mesh.polygon_adjacent_edge ( edge.value () ) )
172+ {
173+ edges[surface.id ()].emplace_back (
174+ std::move ( adj.value () ) );
175+ }
176+ continue ;
177+ }
178+ if ( auto edge = mesh.polygon_edge_from_vertices (
179+ pair[1 ], pair[0 ] ) )
166180 {
167181 edges[surface.id ()].emplace_back (
168- std::move ( polygon_vertex ) );
182+ std::move ( edge.value () ) );
183+ if ( auto adj =
184+ mesh.polygon_adjacent_edge ( edge.value () ) )
185+ {
186+ edges[surface.id ()].emplace_back (
187+ std::move ( adj.value () ) );
188+ }
169189 }
170190 }
171191 }
You can’t perform that action at this time.
0 commit comments