diff --git a/src/geode/inspector/criterion/adjacency/brep_meshes_adjacency.cpp b/src/geode/inspector/criterion/adjacency/brep_meshes_adjacency.cpp index 0f413f2..266bad5 100644 --- a/src/geode/inspector/criterion/adjacency/brep_meshes_adjacency.cpp +++ b/src/geode/inspector/criterion/adjacency/brep_meshes_adjacency.cpp @@ -27,6 +27,7 @@ #include #include +#include #include @@ -89,7 +90,8 @@ namespace geode auto wrong_adjacencies = inspector.polyhedron_facets_with_wrong_adjacency(); wrong_adjacencies.set_description( absl::StrCat( "Block ", - block.name(), " (", block.id().string(), + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") polyhedron facets adjacencies issues" ) ); const auto& mesh = block.mesh(); for( const auto polyhedron_id : Range{ mesh.nb_polyhedra() } ) diff --git a/src/geode/inspector/criterion/adjacency/solid_adjacency.cpp b/src/geode/inspector/criterion/adjacency/solid_adjacency.cpp index 48441cf..7873f4b 100644 --- a/src/geode/inspector/criterion/adjacency/solid_adjacency.cpp +++ b/src/geode/inspector/criterion/adjacency/solid_adjacency.cpp @@ -61,7 +61,8 @@ namespace geode polyhedron_facets_with_wrong_adjacency() const { InspectionIssues< PolyhedronFacet > wrong_adjacency_facets{ - absl::StrCat( "Solid ", mesh_.name(), + absl::StrCat( "Solid ", + mesh_.name().value_or( mesh_.id().string() ), " polyhedron facets adjacencies issues" ) }; for( const auto polyhedron_id : Range{ mesh_.nb_polyhedra() } ) diff --git a/src/geode/inspector/criterion/adjacency/surface_adjacency.cpp b/src/geode/inspector/criterion/adjacency/surface_adjacency.cpp index 8561afc..bf5aa08 100644 --- a/src/geode/inspector/criterion/adjacency/surface_adjacency.cpp +++ b/src/geode/inspector/criterion/adjacency/surface_adjacency.cpp @@ -59,7 +59,7 @@ namespace geode polygon_edges_with_wrong_adjacency() const { InspectionIssues< PolygonEdge > wrong_adjacency_edges{ absl::StrCat( - "Surface ", mesh_.name(), + "Surface ", mesh_.name().value_or( mesh_.id().string() ), " polygon edges adjacencies issues" ) }; for( const auto polygon_id : Range{ mesh_.nb_polygons() } ) { diff --git a/src/geode/inspector/criterion/colocation/component_meshes_colocation.cpp b/src/geode/inspector/criterion/colocation/component_meshes_colocation.cpp index d0db5e2..72e79d0 100644 --- a/src/geode/inspector/criterion/colocation/component_meshes_colocation.cpp +++ b/src/geode/inspector/criterion/colocation/component_meshes_colocation.cpp @@ -112,7 +112,8 @@ namespace if( !colocated_pts.empty() ) { geode::InspectionIssues< std::vector< geode::index_t > > - line_issues{ absl::StrCat( "Line ", line.name(), " (", + line_issues{ absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") colocated vertices" ) }; const auto& line_mesh = line.mesh(); for( const auto& colocated_points_group : colocated_pts ) @@ -124,7 +125,8 @@ namespace &point_group_string, " ", point_index ); } line_issues.add_issue( colocated_points_group, - absl::StrCat( "Line ", line.name(), " (", + absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") has vertices ", point_group_string, " colocated at position [", line_mesh.point( colocated_points_group[0] ) @@ -147,8 +149,9 @@ namespace if( !colocated_pts.empty() ) { geode::InspectionIssues< std::vector< geode::index_t > > - surface_issues{ absl::StrCat( "Surface ", surface.name(), - " (", surface.id().string(), ") colocated vertices" ) }; + surface_issues{ absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") colocated vertices" ) }; const auto& surface_mesh = surface.mesh(); for( const auto& colocated_points_group : colocated_pts ) { @@ -159,8 +162,9 @@ namespace &point_group_string, " ", point_index ); } surface_issues.add_issue( colocated_points_group, - absl::StrCat( "Surface ", surface.name(), " (", - surface.id().string(), ") has vertices ", + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), + " (", surface.id().string(), ") has vertices ", point_group_string, " colocated at position [", surface_mesh.point( colocated_points_group[0] ) .string(), @@ -197,7 +201,8 @@ namespace if( !colocated_pts.empty() ) { geode::InspectionIssues< std::vector< geode::index_t > > - block_issues{ absl::StrCat( "Block ", block.name(), " (", + block_issues{ absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", block.id().string(), ") colocated vertices" ) }; const auto& block_mesh = block.mesh(); for( const auto& colocated_points_group : colocated_pts ) @@ -209,7 +214,8 @@ namespace &point_group_string, " ", point_index ); } block_issues.add_issue( colocated_points_group, - absl::StrCat( "Block ", block.name(), " (", + absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", block.id().string(), ") has vertices ", point_group_string, " colocated at position [", block_mesh.point( colocated_points_group[0] ) diff --git a/src/geode/inspector/criterion/degeneration/brep_meshes_degeneration.cpp b/src/geode/inspector/criterion/degeneration/brep_meshes_degeneration.cpp index a479548..7d668ba 100644 --- a/src/geode/inspector/criterion/degeneration/brep_meshes_degeneration.cpp +++ b/src/geode/inspector/criterion/degeneration/brep_meshes_degeneration.cpp @@ -101,16 +101,16 @@ namespace geode } const geode::SolidMeshDegeneration3D inspector{ mesh }; auto small_edges = inspector.small_edges( threshold ); - small_edges.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") small edges polyhedra" ) ); + small_edges.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") small edges polyhedra" ) ); small_edges_map.add_issues_to_map( block.id(), std::move( small_edges ) ); auto small_polyhedra = inspector.small_height_polyhedra( threshold ); - small_polyhedra.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") small height polyhedra" ) ); + small_polyhedra.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") small height polyhedra" ) ); small_polyhedra_map.add_issues_to_map( block.id(), std::move( small_polyhedra ) ); } diff --git a/src/geode/inspector/criterion/internal/component_meshes_adjacency.cpp b/src/geode/inspector/criterion/internal/component_meshes_adjacency.cpp index e8b605c..4c72c67 100644 --- a/src/geode/inspector/criterion/internal/component_meshes_adjacency.cpp +++ b/src/geode/inspector/criterion/internal/component_meshes_adjacency.cpp @@ -80,7 +80,8 @@ namespace geode }; auto issues = inspector.polygon_edges_with_wrong_adjacency(); issues.set_description( absl::StrCat( "Surface ", - surface.name(), " (", surface.id().string(), + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") polygon edges adjacency issues" ) ); const auto& mesh = surface.mesh(); for( const auto polygon_id : Range{ mesh.nb_polygons() } ) diff --git a/src/geode/inspector/criterion/internal/component_meshes_degeneration.cpp b/src/geode/inspector/criterion/internal/component_meshes_degeneration.cpp index 6ba2c60..fc7ec89 100644 --- a/src/geode/inspector/criterion/internal/component_meshes_degeneration.cpp +++ b/src/geode/inspector/criterion/internal/component_meshes_degeneration.cpp @@ -72,8 +72,9 @@ namespace geode line.mesh() }; auto issues = inspector.small_edges( threshold ); - issues.set_description( absl::StrCat( "Line ", line.name(), - " (", line.id().string(), ") small edges" ) ); + issues.set_description( absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", + line.id().string(), ") small edges" ) ); return std::make_pair( line.id(), std::move( issues ) ); } ) ); } @@ -103,7 +104,8 @@ namespace geode inspector{ surface.mesh() }; auto issues = inspector.small_edges( threshold ); issues.set_description( absl::StrCat( "Surface ", - surface.name(), " (", surface.id().string(), + surface.name().value_or( surface.id().string() ), + " (", surface.id().string(), ") small facet edges" ) ); return std::make_pair( surface.id(), std::move( issues ) ); @@ -142,8 +144,8 @@ namespace geode inspector{ surface.mesh() }; auto issues = inspector.small_height_polygons( threshold ); issues.set_description( absl::StrCat( "Surface ", - surface.name(), " (", surface.id().string(), - ") small height polygons" ) ); + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") small height polygons" ) ); return std::make_pair( surface.id(), std::move( issues ) ); } ) ); } diff --git a/src/geode/inspector/criterion/internal/component_meshes_manifold.cpp b/src/geode/inspector/criterion/internal/component_meshes_manifold.cpp index 6ff0bc3..efb8ee1 100644 --- a/src/geode/inspector/criterion/internal/component_meshes_manifold.cpp +++ b/src/geode/inspector/criterion/internal/component_meshes_manifold.cpp @@ -57,9 +57,9 @@ namespace geode surface.mesh() }; auto issues = inspector.non_manifold_vertices(); - issues.set_description( - absl::StrCat( "Surface ", surface.name(), " (", - surface.id().string(), ") non manifold vertices" ) ); + issues.set_description( absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") non manifold vertices" ) ); surfaces_non_manifold_vertices.add_issues_to_map( surface.id(), std::move( issues ) ); } @@ -78,9 +78,9 @@ namespace geode surface.mesh() }; auto issues = inspector.non_manifold_edges(); - issues.set_description( - absl::StrCat( "Surface ", surface.name(), " (", - surface.id().string(), ") non manifold edges" ) ); + issues.set_description( absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") non manifold edges" ) ); surfaces_non_manifold_edges.add_issues_to_map( surface.id(), std::move( issues ) ); } diff --git a/src/geode/inspector/criterion/intersections/model_intersections.cpp b/src/geode/inspector/criterion/intersections/model_intersections.cpp index 83ffcee..8d3db0e 100644 --- a/src/geode/inspector/criterion/intersections/model_intersections.cpp +++ b/src/geode/inspector/criterion/intersections/model_intersections.cpp @@ -521,10 +521,12 @@ namespace geode const auto& surface2 = model_.surface( polygon_pair.second.component_id.id() ); intersection_issues.add_issue( polygon_pair, - absl::StrCat( "Surfaces ", surface1.name(), " (", - polygon_pair.first.component_id.id().string(), ") and ", - surface2.name(), " (", - polygon_pair.second.component_id.id().string(), + absl::StrCat( "Surfaces ", + surface1.name().value_or( surface1.id().string() ), + " (", polygon_pair.first.component_id.id().string(), + ") and ", + surface2.name().value_or( surface2.id().string() ), + " (", polygon_pair.second.component_id.id().string(), ") intersect on polygons ", polygon_pair.first.element_id, " and ", polygon_pair.second.element_id ) ); @@ -542,7 +544,8 @@ namespace geode const auto& surface = model_.surface( polygon_pair.first.component_id.id() ); intersection_issues.add_issue( polygon_pair, - absl::StrCat( "Surface ", surface.name(), " (", + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", polygon_pair.first.component_id.id().string(), ") has a self intersection on polygons ", polygon_pair.first.element_id, "and ", diff --git a/src/geode/inspector/criterion/manifold/brep_meshes_manifold.cpp b/src/geode/inspector/criterion/manifold/brep_meshes_manifold.cpp index d149c6c..9a19260 100644 --- a/src/geode/inspector/criterion/manifold/brep_meshes_manifold.cpp +++ b/src/geode/inspector/criterion/manifold/brep_meshes_manifold.cpp @@ -109,9 +109,9 @@ namespace geode { const SolidMeshVertexManifold3D inspector{ block.mesh() }; auto non_manifold_vertices = inspector.non_manifold_vertices(); - non_manifold_vertices.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") non manifold vertices" ) ); + non_manifold_vertices.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") non manifold vertices" ) ); components_non_manifold_vertices.add_issues_to_map( block.id(), std::move( non_manifold_vertices ) ); } @@ -128,9 +128,9 @@ namespace geode { const SolidMeshEdgeManifold3D inspector{ block.mesh() }; auto non_manifold_edges = inspector.non_manifold_edges(); - non_manifold_edges.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") non manifold edges" ) ); + non_manifold_edges.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") non manifold edges" ) ); components_non_manifold_edges.add_issues_to_map( block.id(), non_manifold_edges ); } @@ -144,9 +144,9 @@ namespace geode { const SolidMeshFacetManifold3D inspector{ block.mesh() }; auto non_manifold_facets = inspector.non_manifold_facets(); - non_manifold_facets.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") non manifold facets" ) ); + non_manifold_facets.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") non manifold facets" ) ); components_non_manifold_facets.add_issues_to_map( block.id(), non_manifold_facets ); } @@ -201,8 +201,11 @@ namespace geode for( const auto surface_uuid : edge.second ) { absl::StrAppend( &message, - model().surface( surface_uuid ).name(), " (", - surface_uuid.string(), "), " ); + model() + .surface( surface_uuid ) + .name() + .value_or( surface_uuid.string() ), + " (", surface_uuid.string(), "), " ); } absl::StrAppend( &message, "but not on their border" ); issues.add_issue( @@ -232,8 +235,8 @@ namespace geode "Model edge between unique vertices ", edge_unique_vertices[0], " and ", edge_unique_vertices[1], " is not manifold: it belongs to internal Line ", - line.name(), " (", line.id().string(), - ") with only one edge" ); + line.name().value_or( line.id().string() ), " (", + line.id().string(), ") with only one edge" ); issues.add_issue( BRepNonManifoldEdge{ edge_unique_vertices, { line.id() } }, message ); @@ -264,8 +267,8 @@ namespace geode } absl::StrAppend( &message, " is not manifold: it belongs to internal Surface ", - surface.name(), " (", surface.id().string(), - ") with only one facet" ); + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") with only one facet" ); issues.add_issue( BRepNonManifoldFacet{ facet_vertices, { surface.id() } }, message ); diff --git a/src/geode/inspector/criterion/negative_elements/brep_meshes_negative_elements.cpp b/src/geode/inspector/criterion/negative_elements/brep_meshes_negative_elements.cpp index 587f962..54de6d5 100644 --- a/src/geode/inspector/criterion/negative_elements/brep_meshes_negative_elements.cpp +++ b/src/geode/inspector/criterion/negative_elements/brep_meshes_negative_elements.cpp @@ -68,9 +68,9 @@ namespace geode block.mesh() }; auto negative_elements = inspector.negative_polyhedra(); - negative_elements.set_description( - absl::StrCat( "Block ", block.name(), " (", - block.id().string(), ") negative polyhedra" ) ); + negative_elements.set_description( absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") negative polyhedra" ) ); result.negative_polyhedra.add_issues_to_map( block.id(), std::move( negative_elements ) ); } diff --git a/src/geode/inspector/criterion/negative_elements/section_meshes_negative_elements.cpp b/src/geode/inspector/criterion/negative_elements/section_meshes_negative_elements.cpp index 91dec7f..9e021d5 100644 --- a/src/geode/inspector/criterion/negative_elements/section_meshes_negative_elements.cpp +++ b/src/geode/inspector/criterion/negative_elements/section_meshes_negative_elements.cpp @@ -70,9 +70,9 @@ namespace geode surface.mesh() }; auto negative_elements = inspector.negative_polygons(); - negative_elements.set_description( - absl::StrCat( "Surface ", surface.name(), " (", - surface.id().string(), ") negative polygons" ) ); + negative_elements.set_description( absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ") negative polygons" ) ); result.negative_polygons.add_issues_to_map( surface.id(), std::move( negative_elements ) ); } diff --git a/src/geode/inspector/topology/brep_blocks_topology.cpp b/src/geode/inspector/topology/brep_blocks_topology.cpp index ff9189a..d07070d 100644 --- a/src/geode/inspector/topology/brep_blocks_topology.cpp +++ b/src/geode/inspector/topology/brep_blocks_topology.cpp @@ -591,8 +591,10 @@ namespace geode { return absl::StrCat( "unique vertex with index ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + brep_.surface( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which should not be boundary of any Block." ); } if( brep_.nb_embeddings( cmv.component_id.id() ) >= 1 @@ -603,8 +605,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + brep_.surface( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which should not be embedded in any Block." ); } if( brep_.nb_incidences( cmv.component_id.id() ) < 1 @@ -614,8 +618,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + brep_.surface( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which is not internal to " "a Block while it should be." ); } @@ -676,12 +682,16 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of only one Surface", - brep_.surface( surface_id ).name(), " (", - surface_id.string(), + brep_.surface( surface_id ) + .name() + .value_or( surface_id.string() ), + " (", surface_id.string(), ") which is not embedded, but not boundary " "either of Block ", - brep_.block( block_id ).name(), " (", block_id.string(), - "), in which the vertex is." ); + brep_.block( block_id ) + .name() + .value_or( block_id.string() ), + " (", block_id.string(), "), in which the vertex is." ); } } } @@ -741,7 +751,8 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of multiple Surfaces and multiple " "Lines, but Line ", - brep_.line( line_id ).name(), " (", line_id.string(), + brep_.line( line_id ).name().value_or( line_id.string() ), + " (", line_id.string(), ") is neither internal, nor a boundary of at " "least two Surfaces or one embedding " "Surface." ); @@ -777,7 +788,10 @@ namespace geode for( const auto& block_id : blocks_not_meshed ) { result.some_blocks_not_meshed.add_issue( block_id, - absl::StrCat( "Block ", brep_.block( block_id ).name(), + absl::StrCat( "Block ", + brep_.block( block_id ) + .name() + .value_or( block_id.string() ), " (", block_id.string(), ") is not meshed." ) ); } } @@ -790,8 +804,10 @@ namespace geode if( block_result.nb_issues() != 0 ) { block_result.set_description( absl::StrCat( "Block ", - brep_.block( meshed_block_id ).name(), " (", - meshed_block_id.string(), ")" ) ); + brep_.block( meshed_block_id ) + .name() + .value_or( meshed_block_id.string() ), + " (", meshed_block_id.string(), ")" ) ); result.blocks_not_linked_to_a_unique_vertex.add_issues_to_map( block.id(), std::move( block_result ) ); } @@ -799,7 +815,8 @@ namespace geode { result.blocks_with_not_closed_boundary_surfaces.add_issue( block.id(), - absl::StrCat( "Block ", block.name(), " (", + absl::StrCat( "Block ", + block.name().value_or( block.id().string() ), " (", block.id().string(), ") boundaries are valid." ) ); } } @@ -864,10 +881,12 @@ namespace geode surface, brep_, block ) ) { result.wrong_block_boundary_surface.add_issue( surface.id(), - absl::StrCat( "Surface ", surface.name(), " (", - surface.id().string(), - ") should not be boundary of Block ", block.name(), - " (", block.id().string(), + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), + " (", surface.id().string(), + ") should not be boundary of Block ", + block.name().value_or( block.id().string() ), " (", + block.id().string(), ") : it has a boundary Line not incident to any " "other Block boundary Surface." ) ); } diff --git a/src/geode/inspector/topology/brep_corners_topology.cpp b/src/geode/inspector/topology/brep_corners_topology.cpp index 520e85b..173105c 100644 --- a/src/geode/inspector/topology/brep_corners_topology.cpp +++ b/src/geode/inspector/topology/brep_corners_topology.cpp @@ -181,8 +181,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner ", - brep_.corner( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + brep_.corner( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which is neither internal nor boundary." ); } } @@ -232,10 +234,15 @@ namespace geode { return absl::StrCat( "unique vertex with index ", unique_vertex_index, " is associated with Corner ", - brep_.corner( corner_uuid ).name(), " (", - corner_uuid.string(), + brep_.corner( corner_uuid ) + .name() + .value_or( corner_uuid.string() ), + " (", corner_uuid.string(), "), which is internal to Line ", - brep_.line( cmv_line.component_id.id() ).name(), + brep_.line( cmv_line.component_id.id() ) + .name() + .value_or( + cmv_line.component_id.id().string() ), " (", cmv_line.component_id.id().string(), "), so Line should be closed and have two " "different vertices on unique vertex, but has ", @@ -245,10 +252,14 @@ namespace geode } return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated with Corner ", - brep_.corner( corner_uuid ).name(), " (", - corner_uuid.string() + "), part of line ", - brep_.line( cmv_line.component_id.id() ).name(), " (", - cmv_line.component_id.id().string(), + brep_.corner( corner_uuid ) + .name() + .value_or( corner_uuid.string() ), + " (", corner_uuid.string() + "), part of line ", + brep_.line( cmv_line.component_id.id() ) + .name() + .value_or( cmv_line.component_id.id().string() ), + " (", cmv_line.component_id.id().string(), "), but is neither boundary nor internal of it." ); } } @@ -264,7 +275,8 @@ namespace geode if( !corner_is_meshed( brep_.corner( corner.id() ) ) ) { result.corners_not_meshed.add_issue( corner.id(), - absl::StrCat( "Corner ", corner.name(), " (", + absl::StrCat( "Corner ", + corner.name().value_or( corner.id().string() ), " (", corner.id().string(), ") is not meshed." ) ); continue; } @@ -274,7 +286,8 @@ namespace geode if( corner_result.nb_issues() != 0 ) { corner_result.set_description( absl::StrCat( "Corner ", - corner.name(), " (", corner.id().string(), ")" ) ); + corner.name().value_or( corner.id().string() ), " (", + corner.id().string(), ")" ) ); result.corners_not_linked_to_a_unique_vertex.add_issues_to_map( corner.id(), std::move( corner_result ) ); } diff --git a/src/geode/inspector/topology/brep_lines_topology.cpp b/src/geode/inspector/topology/brep_lines_topology.cpp index 9cc2779..6c466a8 100644 --- a/src/geode/inspector/topology/brep_lines_topology.cpp +++ b/src/geode/inspector/topology/brep_lines_topology.cpp @@ -184,12 +184,15 @@ namespace geode line_id, embedding.id() ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of line ", line.name(), " (", + " is part of line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), which is both boundary and embedded in " "Surface ", - brep_.surface( embedding.id() ).name(), " (", - embedding.id().string() + ")." ); + brep_.surface( embedding.id() ) + .name() + .value_or( embedding.id().string() ), + " (", embedding.id().string() + ")." ); } if( embedding.type() == Block3D::component_type_static() && !internal::brep_blocks_are_meshed( brep_ ) ) @@ -203,10 +206,13 @@ namespace geode } ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Line ", line.name(), " (", + " is part of Line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), which is embedded in Surface ", - brep_.surface( embedding.id() ).name(), " (", - embedding.id().string(), + brep_.surface( embedding.id() ) + .name() + .value_or( embedding.id().string() ), + " (", embedding.id().string(), "), but the unique vertex is not linked to the " "Surface mesh vertices." ); } @@ -248,10 +254,13 @@ namespace geode line_id, surface_uuids[0] ) ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of only one Line ", line.name(), " (", + " is part of only one Line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), and only one Surface ", - brep_.surface( surface_uuids[0] ).name(), " (", - surface_uuids[0].string(), + brep_.surface( surface_uuids[0] ) + .name() + .value_or( surface_uuids[0].string() ), + " (", surface_uuids[0].string(), "), but the Line is neither embedded in the " "Surface, nor boundary of the Surface while the " "Surface is embedded in a Block." ); @@ -266,14 +275,16 @@ namespace geode if( block_uuids.size() != 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of only one Line ", line.name(), " (", + " is part of only one Line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), no Surfaces, but is part of ", block_uuids.size(), " Blocks, instead of one." ); } if( !brep_.Relationships::is_internal( line_id, block_uuids[0] ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of only one Line ", line.name(), " (", + " is part of only one Line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), no Surfaces, one Block, but the Line is not " "internal to the Block." ); @@ -288,12 +299,13 @@ namespace geode && !brep_.is_internal( line, surface ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of only one Line ", line.name(), " (", + " is part of only one Line ", + line.name().value_or( line_id.string() ), " (", line_id.string(), "), and multiple Surfaces, but the Line is " "neither internal nor boundary of Surface ", - surface.name(), " (", surface_id.string(), - "), in which the vertex is." ); + surface.name().value_or( surface_id.string() ), " (", + surface_id.string(), "), in which the vertex is." ); } } } @@ -326,20 +338,24 @@ namespace geode if( !cme.surface_edges.contains( incident_surface.id() ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Line ", line.name(), " (", + " is part of Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), "), which should be boundary of Surface ", - incident_surface.name(), " (", - incident_surface.id().string(), ")" ); + incident_surface.name().value_or( + incident_surface.id().string() ), + " (", incident_surface.id().string(), ")" ); } if( cme.surface_edges.at( incident_surface.id() ).size() != 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Line ", line.name(), " (", + " is part of Line ", + line.name().value_or( line.id().string() ), " (", cmv.component_id.id().string(), "), which should not be boundary of Surface ", - incident_surface.name(), " (", - incident_surface.id().string(), ")" ); + incident_surface.name().value_or( + incident_surface.id().string() ), + " (", incident_surface.id().string(), ")" ); } } for( const auto& embedding_surface : @@ -352,20 +368,24 @@ namespace geode if( !cme.surface_edges.contains( embedding_surface.id() ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Line ", line.name(), " (", + " is part of Line ", + line.name().value_or( line.id().string() ), " (", cmv.component_id.id().string(), "', which should be embedded in Surface ", - embedding_surface.name(), " (", - embedding_surface.id().string(), "'" ); + embedding_surface.name().value_or( + embedding_surface.id().string() ), + " (", embedding_surface.id().string(), "'" ); } if( cme.surface_edges.at( embedding_surface.id() ).size() <= 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Line ", line.name(), " (", + " is part of Line ", + line.name().value_or( line.id().string() ), " (", cmv.component_id.id().string(), "), which is embedded in Surface ", - embedding_surface.name(), " (", - embedding_surface.id().string(), + embedding_surface.name().value_or( + embedding_surface.id().string() ), + " (", embedding_surface.id().string(), ") but doesn't cut it" ); } } @@ -378,11 +398,14 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - line.name(), " (", cmv.component_id.id().string(), + line.name().value_or( line.id().string() ), " (", + cmv.component_id.id().string(), "), which should be internal or boundary to " "Surface ", - brep_.surface( surface_id ).name(), " (", - surface_id.string(), ")" ); + brep_.surface( surface_id ) + .name() + .value_or( surface_id.string() ), + " (", surface_id.string(), ")" ); } } } @@ -433,10 +456,12 @@ namespace geode { if( surface_edges.size() != 1 ) { - return absl::StrCat( "Line ", line.name(), " (", + return absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") is boundary of Surface ", - surface.name(), " (", surface_id.string(), - "), but has ", surface_edges.size(), + surface.name().value_or( surface_id.string() ), " (", + surface_id.string(), "), but has ", + surface_edges.size(), " edges of this Surface around it, it should be 1." ); } continue; @@ -446,7 +471,8 @@ namespace geode if( surface_edges.size() != 2 ) { return absl::StrCat( "Line with uuid '", line.id().string(), - "' is internal to Surface ", surface.name(), " (", + "' is internal to Surface ", + surface.name().value_or( surface_id.string() ), " (", surface_id.string(), "), but has ", surface_edges.size(), " edges of this surface around it, it should be 2." ); @@ -455,7 +481,8 @@ namespace geode } return absl::StrCat( "Line with uuid '", line.id().string(), "' has edge with id ", edge_index, " in common with Surface ", - surface.name(), " (", surface_id.string(), + surface.name().value_or( surface_id.string() ), " (", + surface_id.string(), "), but is neither boundary of nor internal to it." ); } for( const auto& embedding_surface : brep_.embedding_surfaces( line ) ) @@ -466,11 +493,13 @@ namespace geode } if( !cme.surface_edges.contains( embedding_surface.id() ) ) { - return absl::StrCat( "Line ", line.name(), " (", + return absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") is embedded in Surface ", - embedding_surface.name(), " (", - embedding_surface.id().string(), ") but edge ", edge_index, - " has no common edge with the surface" ); + embedding_surface.name().value_or( + embedding_surface.id().string() ), + " (", embedding_surface.id().string(), ") but edge ", + edge_index, " has no common edge with the surface" ); } } for( const auto& incident_surface : brep_.incidences( line ) ) @@ -481,11 +510,13 @@ namespace geode } if( !cme.surface_edges.contains( incident_surface.id() ) ) { - return absl::StrCat( "Line ", line.name(), " (", + return absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") is incident to Surface ", - incident_surface.name(), " (", - incident_surface.id().string(), ") but edge ", edge_index, - " has no common edge with the surface" ); + incident_surface.name().value_or( + incident_surface.id().string() ), + " (", incident_surface.id().string(), ") but edge ", + edge_index, " has no common edge with the surface" ); } } for( const auto& [block_id, block_edges] : cme.block_edges ) @@ -495,10 +526,11 @@ namespace geode { if( block_edges.size() != 1 ) { - return absl::StrCat( "Line ", line.name(), " (", + return absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") is internal to Block ", - block.name(), " (", block_id.string(), "), but has ", - block_edges.size(), + block.name().value_or( block_id.string() ), " (", + block_id.string(), "), but has ", block_edges.size(), " edges of this Block around it, it should be 1." ); } continue; @@ -513,11 +545,13 @@ namespace geode } if( !cme.block_edges.contains( embedding_block.id() ) ) { - return absl::StrCat( "Line ", line.name(), " (", + return absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", line.id().string(), ") is embedded in Block ", - embedding_block.name(), " (", embedding_block.id().string(), - ") but edge ", edge_index, - " has no common edge with the block" ); + embedding_block.name().value_or( + embedding_block.id().string() ), + " (", embedding_block.id().string(), ") but edge ", + edge_index, " has no common edge with the block" ); } } return std::nullopt; @@ -531,17 +565,19 @@ namespace geode { if( !line_is_meshed( brep_.line( line.id() ) ) ) { - result.lines_not_meshed.add_issue( - line.id(), absl::StrCat( "Line ", line.name(), " (", - line.id().string(), ") is not meshed" ) ); + result.lines_not_meshed.add_issue( line.id(), + absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", + line.id().string(), ") is not meshed" ) ); } auto line_result = internal:: model_component_vertices_not_associated_to_unique_vertices( brep_, line.component_id(), line.mesh() ); if( line_result.nb_issues() != 0 ) { - line_result.set_description( absl::StrCat( - "Line ", line.name(), " (", line.id().string(), ")" ) ); + line_result.set_description( absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", + line.id().string(), ")" ) ); result.lines_not_linked_to_a_unique_vertex.add_issues_to_map( line.id(), std::move( line_result ) ); /// Next test may result in SegFaults if component vertices are @@ -549,7 +585,8 @@ namespace geode continue; } InspectionIssues< index_t > line_edges_with_wrong_cme{ absl::StrCat( - "Line ", line.name(), " (", line.id().string(), ")" ) }; + "Line ", line.name().value_or( line.id().string() ), " (", + line.id().string(), ")" ) }; for( const auto edge_id : Range{ line.mesh().nb_edges() } ) { if( const auto problem_message = diff --git a/src/geode/inspector/topology/brep_surfaces_topology.cpp b/src/geode/inspector/topology/brep_surfaces_topology.cpp index f0166fd..72224fe 100644 --- a/src/geode/inspector/topology/brep_surfaces_topology.cpp +++ b/src/geode/inspector/topology/brep_surfaces_topology.cpp @@ -178,10 +178,12 @@ namespace geode surface_id, embedding.id() ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Surface ", surface.name(), " (", + " is part of Surface ", + surface.name().value_or( surface.id().string() ), " (", surface_id.string(), "), which is both internal and boundary of ", "Block ", - block.name(), " (", embedding.id().string(), ")" ); + block.name().value_or( block.id().string() ), " (", + embedding.id().string(), ")" ); } if( internal::brep_blocks_are_meshed( brep_ ) && !absl::c_any_of( @@ -191,9 +193,12 @@ namespace geode } ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of Surface ", surface.name(), " (", - surface_id.string(), "), which is embedded in Block ", - block.name(), " (", embedding.id().string(), + " is part of Surface ", + surface.name().value_or( surface.id().string() ), " (", + surface_id.string(), " (", surface_id.string(), + "), which is embedded in Block ", + block.name().value_or( block.id().string() ), " (", + embedding.id().string(), " (", embedding.id().string(), "), but the unique vertex is not linked to any " "of the Block vertices." ); } @@ -241,9 +246,11 @@ namespace geode corner.mesh().point( cmv.vertex ).string(), "] is part of multiple active Surfaces, and not " "part of any Line, but is part of Corner ", - corner.name(), " (", corner.id().string(), + corner.name().value_or( corner.id().string() ), + " (", corner.id().string(), "), which is not internal to active Surface ", - surface.name(), " (", surface_id.string(), ")." ); + surface.name().value_or( surface_id.string() ), + " (", surface_id.string(), ")." ); } } has_corner_internal_to_all_surfaces = true; @@ -344,8 +351,9 @@ namespace geode || brep_.is_internal( line, surface ) ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of a Line and of Surface ", surface.name(), - " (", cmv.component_id.id().string(), + " is part of a Line and of Surface ", + surface.name().value_or( surface.id().string() ), " (", + cmv.component_id.id().string(), ") but the associated vertex in the " "Surface mesh is not on the mesh border." ); } @@ -370,10 +378,11 @@ namespace geode { if( block_facets.size() != 1 ) { - return absl::StrCat( "Surface ", surface.name(), " (", + return absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") is boundary of block ", - block.name(), " (", block_id.string(), "), but has ", - block_facets.size(), + block.name().value_or( block.id().string() ), " (", + block_id.string(), "), but has ", block_facets.size(), " facets of this Block around it, it should be 1." ); } continue; @@ -382,17 +391,21 @@ namespace geode { if( block_facets.size() != 2 ) { - return absl::StrCat( "Surface ", surface.name(), " (", + return absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") is internal to block ", - block.name(), " (", block_id.string(), "), but has ", - block_facets.size(), + block.name().value_or( block.id().string() ), " (", + block_id.string(), "), but has ", block_facets.size(), " facets of this Block around it, it should be 2." ); } continue; } - return absl::StrCat( "Surface ", surface.name(), " (", + return absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") has facet with id ", facet_index, - " in common with Block", block.name(), " (", block_id.string(), + " in common with Block", + block.name().value_or( block.id().string() ), " (", + block_id.string(), "), but is neither boundary of nor internal to it." ); } return std::nullopt; @@ -408,7 +421,8 @@ namespace geode if( !surface_is_meshed( brep_.surface( surface.id() ) ) ) { result.surfaces_not_meshed.add_issue( surface.id(), - absl::StrCat( "Surface ", surface.name(), " (", + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") is not meshed" ) ); } @@ -418,7 +432,8 @@ namespace geode if( surface_result.nb_issues() != 0 ) { surface_result.set_description( absl::StrCat( "Surface ", - surface.name(), " (", surface.id().string(), ")" ) ); + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ")" ) ); result.surfaces_not_linked_to_a_unique_vertex.add_issues_to_map( surface.id(), std::move( surface_result ) ); /// Next test may result in SegFaults if component vertices are @@ -430,7 +445,8 @@ namespace geode continue; } InspectionIssues< index_t > surface_facets_with_wrong_cme{ - absl::StrCat( "Surface ", surface.name(), " (", + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ")" ) }; for( const auto facet_id : Range{ surface.mesh().nb_polygons() } ) diff --git a/src/geode/inspector/topology/internal/expected_nb_cmvs.cpp b/src/geode/inspector/topology/internal/expected_nb_cmvs.cpp index 0d90727..c50cfbe 100644 --- a/src/geode/inspector/topology/internal/expected_nb_cmvs.cpp +++ b/src/geode/inspector/topology/internal/expected_nb_cmvs.cpp @@ -210,7 +210,8 @@ namespace .mesh() .point( unique_vertex_cmvs.block_cmvs[0].vertex ) .string(), - "] is part of Block ", block.name(), " (", + "] is part of Block ", + block.name().value_or( block.id().string() ), " (", block_uuid.string(), "), and has ", unique_vertex_cmvs.corner_cmvs.size(), " cmvs of corners, ", nb_internal_surface_cmvs, diff --git a/src/geode/inspector/topology/section_corners_topology.cpp b/src/geode/inspector/topology/section_corners_topology.cpp index 380645d..1ef4903 100644 --- a/src/geode/inspector/topology/section_corners_topology.cpp +++ b/src/geode/inspector/topology/section_corners_topology.cpp @@ -201,8 +201,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner", - section_.corner( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + section_.corner( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which has several embeddings." ); } } @@ -223,8 +225,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner ", - section_.corner( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + section_.corner( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which is neither internal nor boundary." ); } } @@ -257,10 +261,14 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated with Corner ", - section_.corner( corner_uuid ).name(), " (", - corner_uuid.string(), "), part of Line ", - section_.line( line.component_id.id() ).name(), " (", - line.component_id.id().string(), + section_.corner( corner_uuid ) + .name() + .value_or( corner_uuid.string() ), + " (", corner_uuid.string(), "), part of Line ", + section_.line( line.component_id.id() ) + .name() + .value_or( line.component_id.id().string() ), + " (", line.component_id.id().string(), "), but is not a boundary of the Line." ); } } @@ -277,7 +285,8 @@ namespace geode if( !corner_is_meshed( section_.corner( corner.id() ) ) ) { result.corners_not_meshed.add_issue( corner.id(), - absl::StrCat( "Corner ", corner.name(), " (", + absl::StrCat( "Corner ", + corner.name().value_or( corner.id().string() ), " (", corner.id().string(), ") is not meshed" ) ); continue; } @@ -287,7 +296,8 @@ namespace geode if( corner_result.nb_issues() != 0 ) { corner_result.set_description( absl::StrCat( "Corner ", - corner.name(), " (", corner.id().string(), ")" ) ); + corner.name().value_or( corner.id().string() ), " (", + corner.id().string(), ")" ) ); result.corners_not_linked_to_a_unique_vertex.add_issues_to_map( corner.id(), std::move( corner_result ) ); } diff --git a/src/geode/inspector/topology/section_lines_topology.cpp b/src/geode/inspector/topology/section_lines_topology.cpp index 965cca8..9cf039e 100644 --- a/src/geode/inspector/topology/section_lines_topology.cpp +++ b/src/geode/inspector/topology/section_lines_topology.cpp @@ -169,8 +169,10 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - section_.line( cmv.component_id.id() ).name(), " (", - cmv.component_id.id().string(), + section_.line( cmv.component_id.id() ) + .name() + .value_or( cmv.component_id.id().string() ), + " (", cmv.component_id.id().string(), "), which is neither embedded nor incident." ); } } @@ -197,16 +199,20 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of line ", - section_.line( line_cmv.component_id.id() ).name(), " (", - line_cmv.component_id.id().string(), + section_.line( line_cmv.component_id.id() ) + .name() + .value_or( line_cmv.component_id.id().string() ), + " (", line_cmv.component_id.id().string(), "), which has multiple embeddings." ); } if( section_.nb_incidences( line_cmv.component_id.id() ) > 0 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - section_.line( line_cmv.component_id.id() ).name(), " (", - line_cmv.component_id.id().string(), + section_.line( line_cmv.component_id.id() ) + .name() + .value_or( line_cmv.component_id.id().string() ), + " (", line_cmv.component_id.id().string(), "), which has both an embedding and incidence(s)." ); } for( const auto& embedding : @@ -225,11 +231,15 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - section_.line( line_cmv.component_id.id() ).name(), + section_.line( line_cmv.component_id.id() ) + .name() + .value_or( line_cmv.component_id.id().string() ), " (", line_cmv.component_id.string(), "), which is embedded in surface ", - section_.surface( embedding.id() ).name(), " (", - embedding.id().string(), + section_.surface( embedding.id() ) + .name() + .value_or( embedding.id().string() ), + " (", embedding.id().string(), "), but the unique vertex is not linked to the " "Surface mesh vertices." ); } @@ -255,7 +265,8 @@ namespace geode if( surface_uuids.size() > 2 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, - " is part of only one Line ", section_.line( line_id ).name(), + " is part of only one Line ", + section_.line( line_id ).name().value_or( line_id.string() ), " (", line_id.string(), "), but part of more than two Surfaces" ); } @@ -268,7 +279,9 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of only one Line ", - section_.line( line_id ).name(), " (", line_id.string(), + section_.line( line_id ).name().value_or( + line_id.string() ), + " (", line_id.string(), "), which has embeddings, but there are more than " "one meshed Surface associated to the vertex, or " "the Line is not internal to the meshed Surface " @@ -284,11 +297,15 @@ namespace geode { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of only one Line ", - section_.line( line_id ).name(), " (", line_id.string(), + section_.line( line_id ).name().value_or( + line_id.string() ), + " (", line_id.string(), "), and mutiple Surfaces, but the Line is not " "boundary of associated Surface ", - section_.surface( surface_id ).name(), " (", - surface_id.string(), ")" ); + section_.surface( surface_id ) + .name() + .value_or( surface_id.string() ), + " (", surface_id.string(), ")" ); } } } @@ -331,17 +348,19 @@ namespace geode { if( !line_is_meshed( section_.line( line.id() ) ) ) { - result.lines_not_meshed.add_issue( - line.id(), absl::StrCat( "Line ", line.name(), " (", - line.id().string(), ") is not meshed" ) ); + result.lines_not_meshed.add_issue( line.id(), + absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", + line.id().string(), ") is not meshed" ) ); } auto line_result = internal:: model_component_vertices_not_associated_to_unique_vertices( section_, line.component_id(), line.mesh() ); if( line_result.nb_issues() != 0 ) { - line_result.set_description( absl::StrCat( - "Line ", line.name(), " (", line.id().string(), ")" ) ); + line_result.set_description( absl::StrCat( "Line ", + line.name().value_or( line.id().string() ), " (", + line.id().string(), ")" ) ); result.lines_not_linked_to_a_unique_vertex.add_issues_to_map( line.id(), std::move( line_result ) ); } diff --git a/src/geode/inspector/topology/section_surfaces_topology.cpp b/src/geode/inspector/topology/section_surfaces_topology.cpp index 9f044c2..c6dbc1d 100644 --- a/src/geode/inspector/topology/section_surfaces_topology.cpp +++ b/src/geode/inspector/topology/section_surfaces_topology.cpp @@ -198,7 +198,8 @@ namespace geode return absl::StrCat( "Unique vertex ", unique_vertex_index, " is part of a Line and of Surface ", section_.surface( surface_cmv.component_id.id() ) - .name(), + .name() + .value_or( surface_cmv.component_id.id().string() ), " (", surface_cmv.component_id.id().string(), ") but the associated vertex in the Surface " "mesh is not on the mesh border." ); @@ -217,7 +218,8 @@ namespace geode if( !surface_is_meshed( section_.surface( surface.id() ) ) ) { result.surfaces_not_meshed.add_issue( surface.id(), - absl::StrCat( "Surface ", surface.name(), " (", + absl::StrCat( "Surface ", + surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") is not meshed" ) ); } @@ -227,7 +229,8 @@ namespace geode if( surface_result.nb_issues() != 0 ) { surface_result.set_description( absl::StrCat( "Surface ", - surface.name(), " (", surface.id().string(), ")" ) ); + surface.name().value_or( surface.id().string() ), " (", + surface.id().string(), ")" ) ); result.surfaces_not_linked_to_a_unique_vertex.add_issues_to_map( surface.id(), std::move( surface_result ) ); }