diff --git a/src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp b/src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp index 4e3d3faa..a16f6342 100644 --- a/src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp +++ b/src/geode/inspector/inspection/criterion/internal/component_meshes_adjacency.cpp @@ -112,7 +112,7 @@ namespace geode } catch( const OpenGeodeException& e ) { - Logger::warn( e.what() ); + Logger::warning( e.what() ); issues.add_issue( polygon_edge, absl::StrCat( "edge ", edge_id, " of polygon ", polygon_id, diff --git a/src/geode/inspector/inspection/criterion/internal/component_meshes_degeneration.cpp b/src/geode/inspector/inspection/criterion/internal/component_meshes_degeneration.cpp index 90709b80..a0ecf0bb 100644 --- a/src/geode/inspector/inspection/criterion/internal/component_meshes_degeneration.cpp +++ b/src/geode/inspector/inspection/criterion/internal/component_meshes_degeneration.cpp @@ -71,11 +71,14 @@ namespace geode const EdgedCurveDegeneration< Model::dim > inspector{ line.mesh() }; - auto issues = inspector.small_edges( threshold ); + std::pair< uuid, InspectionIssues< index_t > > result; + auto& [line_id, issues] = result; + line_id = line.id(); + issues = inspector.small_edges( threshold ); 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 ) ); + return result; } ) ); } for( auto& task : @@ -102,13 +105,15 @@ namespace geode } const geode::SurfaceMeshDegeneration< Model::dim > inspector{ surface.mesh() }; - auto issues = inspector.small_edges( threshold ); + std::pair< uuid, InspectionIssues< index_t > > result; + auto& [surface_id, issues] = result; + surface_id = surface.id(); + issues = inspector.small_edges( threshold ); issues.set_description( absl::StrCat( "Surface ", surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") small facet edges" ) ); - return std::make_pair( - surface.id(), std::move( issues ) ); + return result; } ) ); } for( auto& task : @@ -142,11 +147,14 @@ namespace geode tasks.emplace_back( async::spawn( [&threshold, &surface] { const geode::SurfaceMeshDegeneration< Model::dim > inspector{ surface.mesh() }; - auto issues = inspector.small_height_polygons( threshold ); + std::pair< uuid, InspectionIssues< index_t > > result; + auto& [surface_id, issues] = result; + surface_id = surface.id(); + issues = inspector.small_height_polygons( threshold ); issues.set_description( absl::StrCat( "Surface ", surface.name().value_or( surface.id().string() ), " (", surface.id().string(), ") small height polygons" ) ); - return std::make_pair( surface.id(), std::move( issues ) ); + return result; } ) ); } for( auto& task : diff --git a/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp b/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp index d5f5bc99..e6b298a7 100644 --- a/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp +++ b/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp @@ -772,7 +772,7 @@ namespace geode { if( surface.mesh().nb_polygons() == 0 ) { - geode::Logger::warn( + geode::Logger::warning( "One of the surface meshes has an empty mesh, cannot " "compute the AABBTree used for detecting the mesh " "intersections, no intersections will be " @@ -854,7 +854,7 @@ namespace geode { if( line.mesh().nb_edges() == 0 ) { - geode::Logger::warn( + geode::Logger::warning( "One of the line meshes has an empty mesh, " "skipping line-surface intersection detection." ); return component_intersections; @@ -934,7 +934,7 @@ namespace geode { if( surface.mesh().nb_polygons() == 0 ) { - geode::Logger::warn( + geode::Logger::warning( "One of the surface meshes has an empty mesh, " "skipping line-surface intersection detection." ); return component_intersections; @@ -944,7 +944,7 @@ namespace geode { if( line.mesh().nb_edges() == 0 ) { - geode::Logger::warn( + geode::Logger::warning( "One of the line meshes has an empty mesh, " "skipping line-surface intersection detection." ); return component_intersections; diff --git a/src/geode/inspector/inspection/criterion/manifold/surface_edge_manifold.cpp b/src/geode/inspector/inspection/criterion/manifold/surface_edge_manifold.cpp index 233f0c63..bc798394 100644 --- a/src/geode/inspector/inspection/criterion/manifold/surface_edge_manifold.cpp +++ b/src/geode/inspector/inspection/criterion/manifold/surface_edge_manifold.cpp @@ -53,7 +53,8 @@ namespace }; if( !polygons_around_edges .try_emplace( polygon_edge_vertex_cycle, - std::make_pair( 1, false ) ) + std::pair< geode::local_index_t, bool >{ + 1, false } ) .second ) { polygons_around_edges[polygon_edge_vertex_cycle].first += 1; diff --git a/src/geode/inspector/inspection/criterion/negative_elements/solid_negative_elements.cpp b/src/geode/inspector/inspection/criterion/negative_elements/solid_negative_elements.cpp index 8732f6c6..b0fbaf0f 100644 --- a/src/geode/inspector/inspection/criterion/negative_elements/solid_negative_elements.cpp +++ b/src/geode/inspector/inspection/criterion/negative_elements/solid_negative_elements.cpp @@ -82,7 +82,7 @@ namespace geode mesh_.polyhedron_vertex( { polyhedron_id, 2 } ) ), mesh_.point( mesh_.polyhedron_vertex( { polyhedron_id, 3 } ) ) }; - return tetrahedron_volume_sign( tetrahedron ) == Sign::negative; + return tetrahedron_volume_sign( tetrahedron ) == SIGN::negative; } return mesh_.polyhedron_volume( polyhedron_id ) < 0; } diff --git a/src/geode/inspector/inspection/criterion/negative_elements/surface_negative_elements.cpp b/src/geode/inspector/inspection/criterion/negative_elements/surface_negative_elements.cpp index f5ea4ea8..9ca2c615 100644 --- a/src/geode/inspector/inspection/criterion/negative_elements/surface_negative_elements.cpp +++ b/src/geode/inspector/inspection/criterion/negative_elements/surface_negative_elements.cpp @@ -49,7 +49,7 @@ namespace geode for( const auto polygon_id : Range{ mesh_.nb_polygons() } ) { if( polygon_area_sign( mesh_.polygon( polygon_id ) ) - == Sign::negative ) + == SIGN::negative ) { return true; } @@ -68,7 +68,7 @@ namespace geode for( const auto polygon_id : Range{ mesh_.nb_polygons() } ) { if( polygon_area_sign( mesh_.polygon( polygon_id ) ) - == Sign::negative ) + == SIGN::negative ) { wrong_polygons.add_issue( polygon_id, absl::StrCat( "negative polygon ", polygon_id ) ); diff --git a/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp b/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp index 24fd3f05..ef2b5dc3 100644 --- a/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp +++ b/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp @@ -185,7 +185,7 @@ namespace /// On one side of a topological non-manifold => 2 cases possible, /// depending on wether the topological non-manifold is on the /// interior or exterior of the block - geode::Logger::warn( absl::StrCat( + geode::Logger::warning( absl::StrCat( "[expected_block_cmvs_and_error] Unique vertex ", unique_vertex_id, " at position [", brep.block( unique_vertex_cmvs.block_cmvs[0].component_id.id() ) @@ -197,10 +197,10 @@ namespace if( nb_block_cmvs == predicted_nb_block_cmvs + nb_lines_on_several_boundaries ) { - return std::make_pair( nb_block_cmvs, std::nullopt ); + return { nb_block_cmvs, std::nullopt }; } } - return std::make_pair( predicted_nb_block_cmvs, + return { predicted_nb_block_cmvs, nb_block_cmvs == predicted_nb_block_cmvs ? std::nullopt : std::make_optional( absl::StrCat( "unique vertex ", @@ -227,7 +227,7 @@ namespace nb_line_on_boundary_cmvs, " cmvs counted for lines on the boundary, with ", nb_block_cmvs, " Block CMVs (expected ", - predicted_nb_block_cmvs, " with valid topology)." ) ) ); + predicted_nb_block_cmvs, " with valid topology)." ) ) }; } } // namespace diff --git a/tests/inspection/test-surface-intersections.cpp b/tests/inspection/test-surface-intersections.cpp index 2707ea12..ce46d386 100644 --- a/tests/inspection/test-surface-intersections.cpp +++ b/tests/inspection/test-surface-intersections.cpp @@ -58,17 +58,20 @@ void check_intersections2D() "2D Surface should have 3 intersecting elements pair." ); bool right_intersections{ true }; const auto &triangles_inter = inspection.issues(); - if( absl::c_find( triangles_inter, std::make_pair( 2u, 0u ) ) + if( absl::c_find( triangles_inter, + std::pair< geode::index_t, geode::index_t >{ 2u, 0u } ) == triangles_inter.end() ) { right_intersections = false; } - if( absl::c_find( triangles_inter, std::make_pair( 2u, 1u ) ) + if( absl::c_find( triangles_inter, + std::pair< geode::index_t, geode::index_t >{ 2u, 1u } ) == triangles_inter.end() ) { right_intersections = false; } - if( absl::c_find( triangles_inter, std::make_pair( 0u, 1u ) ) + if( absl::c_find( triangles_inter, + std::pair< geode::index_t, geode::index_t >{ 0u, 1u } ) == triangles_inter.end() ) { right_intersections = false; @@ -112,12 +115,14 @@ void check_intersections3D() inspection.nb_issues(), "." ); bool right_intersections{ true }; const auto &triangles_inter = inspection.issues(); - if( absl::c_find( triangles_inter, std::make_pair( 0u, 4u ) ) + if( absl::c_find( triangles_inter, + std::pair< geode::index_t, geode::index_t >{ 0u, 4u } ) == triangles_inter.end() ) { right_intersections = false; } - if( absl::c_find( triangles_inter, std::make_pair( 2u, 4u ) ) + if( absl::c_find( triangles_inter, + std::pair< geode::index_t, geode::index_t >{ 2u, 4u } ) == triangles_inter.end() ) { right_intersections = false;