Skip to content

Commit 6d3cfcc

Browse files
committed
PR review
1 parent 1da8dfe commit 6d3cfcc

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

src/geode/mesh/builder/solid_mesh_builder.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -426,19 +426,19 @@ namespace geode
426426
"[SolidMeshBuilder::replace_vertices] "
427427
"Invalid mapping" );
428428
const auto new_vertex_id = old2news[0];
429-
if( old_vertex_id != new_vertex_id )
429+
if( old_vertex_id == new_vertex_id )
430430
{
431-
disassociate_polyhedron_vertex_to_vertex( old_vertex_id );
432-
reset_polyhedra_around_vertex( old_vertex_id );
433-
if( solid_mesh_.are_edges_enabled()
434-
|| solid_mesh_.are_facets_enabled() )
435-
{
436-
update_edge_and_facet( solid_mesh_, *this,
437-
polyhedron_vertex, new_vertex_id );
438-
}
439-
update_polyhedron_vertex(
440-
polyhedron_vertex, new_vertex_id );
431+
continue;
432+
}
433+
disassociate_polyhedron_vertex_to_vertex( old_vertex_id );
434+
reset_polyhedra_around_vertex( old_vertex_id );
435+
if( solid_mesh_.are_edges_enabled()
436+
|| solid_mesh_.are_facets_enabled() )
437+
{
438+
update_edge_and_facet(
439+
solid_mesh_, *this, polyhedron_vertex, new_vertex_id );
441440
}
441+
update_polyhedron_vertex( polyhedron_vertex, new_vertex_id );
442442
}
443443
}
444444
}

src/geode/mesh/builder/surface_mesh_builder.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -438,17 +438,18 @@ namespace geode
438438
"[SurfaceMeshBuilder::replace_vertices] "
439439
"Invalid mapping" );
440440
const auto new_vertex_id = old2news[0];
441-
if( old_vertex_id != new_vertex_id )
441+
if( old_vertex_id == new_vertex_id )
442442
{
443-
disassociate_polygon_vertex_to_vertex( old_vertex_id );
444-
reset_polygons_around_vertex( old_vertex_id );
445-
if( surface_mesh_.are_edges_enabled() )
446-
{
447-
update_edge( surface_mesh_, *this, polygon_vertex,
448-
old_vertex_id, new_vertex_id );
449-
}
450-
update_polygon_vertex( polygon_vertex, new_vertex_id );
443+
continue;
444+
}
445+
disassociate_polygon_vertex_to_vertex( old_vertex_id );
446+
reset_polygons_around_vertex( old_vertex_id );
447+
if( surface_mesh_.are_edges_enabled() )
448+
{
449+
update_edge( surface_mesh_, *this, polygon_vertex,
450+
old_vertex_id, new_vertex_id );
451451
}
452+
update_polygon_vertex( polygon_vertex, new_vertex_id );
452453
}
453454
}
454455
}

0 commit comments

Comments
 (0)