diff --git a/include/geode/inspector/inspection/topology/internal/topology_helpers.hpp b/include/geode/inspector/inspection/topology/internal/topology_helpers.hpp index e43024a1..3b26328d 100644 --- a/include/geode/inspector/inspection/topology/internal/topology_helpers.hpp +++ b/include/geode/inspector/inspection/topology/internal/topology_helpers.hpp @@ -37,7 +37,7 @@ namespace geode class Section; struct uuid; struct ComponentMeshVertex; - class ComponentID; + struct ComponentID; class VertexSet; } // namespace geode @@ -59,9 +59,9 @@ namespace geode for( const auto& cmv : model.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == type ) + if( cmv.component_id.type == type ) { - component_uuids.push_back( cmv.component_id.id() ); + component_uuids.push_back( cmv.component_id.id ); } } sort_unique( component_uuids ); diff --git a/src/geode/inspector/inspection/criterion/colocation/unique_vertices_colocation.cpp b/src/geode/inspector/inspection/criterion/colocation/unique_vertices_colocation.cpp index 45cb7fb9..2f775746 100644 --- a/src/geode/inspector/inspection/criterion/colocation/unique_vertices_colocation.cpp +++ b/src/geode/inspector/inspection/criterion/colocation/unique_vertices_colocation.cpp @@ -52,22 +52,21 @@ namespace const geode::ComponentMeshVertex& cmv, const geode::Point< Model::dim >& point ) { - if( cmv.component_id.type() + if( cmv.component_id.type == geode::Line< Model::dim >::component_type_static() ) { - return point.inexact_equal( model.line( cmv.component_id.id() ) - .mesh() - .point( cmv.vertex ) ); + return point.inexact_equal( + model.line( cmv.component_id.id ).mesh().point( cmv.vertex ) ); } - else if( cmv.component_id.type() + else if( cmv.component_id.type == geode::Surface< Model::dim >::component_type_static() ) { - return point.inexact_equal( model.surface( cmv.component_id.id() ) + return point.inexact_equal( model.surface( cmv.component_id.id ) .mesh() .point( cmv.vertex ) ); } return point.inexact_equal( - model.corner( cmv.component_id.id() ).mesh().point( cmv.vertex ) ); + model.corner( cmv.component_id.id ).mesh().point( cmv.vertex ) ); } bool model_cmv_is_colocated_on_point( const geode::Section& model, @@ -82,11 +81,10 @@ namespace const geode::ComponentMeshVertex& cmv, const geode::Point3D& point ) { - if( cmv.component_id.type() == geode::Block3D::component_type_static() ) + if( cmv.component_id.type == geode::Block3D::component_type_static() ) { - return point.inexact_equal( model.block( cmv.component_id.id() ) - .mesh() - .point( cmv.vertex ) ); + return point.inexact_equal( + model.block( cmv.component_id.id ).mesh().point( cmv.vertex ) ); } return model_cmv_is_colocated_on_point_base< geode::BRep >( model, cmv, point ); @@ -99,7 +97,7 @@ namespace { for( const auto& cmv : cmvs ) { - if( !model.component( cmv.component_id.id() ).is_active() ) + if( !model.component( cmv.component_id.id ).is_active() ) { continue; } @@ -115,21 +113,19 @@ namespace geode::Point< Model::dim > model_cmv_point( const Model& model, const geode::ComponentMeshVertex& cmv ) { - if( cmv.component_id.type() + if( cmv.component_id.type == geode::Line< Model::dim >::component_type_static() ) { - return model.line( cmv.component_id.id() ) - .mesh() - .point( cmv.vertex ); + return model.line( cmv.component_id.id ).mesh().point( cmv.vertex ); } - if( cmv.component_id.type() + if( cmv.component_id.type == geode::Surface< Model::dim >::component_type_static() ) { - return model.surface( cmv.component_id.id() ) + return model.surface( cmv.component_id.id ) .mesh() .point( cmv.vertex ); } - return model.corner( cmv.component_id.id() ).mesh().point( cmv.vertex ); + return model.corner( cmv.component_id.id ).mesh().point( cmv.vertex ); } std::optional< geode::Point2D > model_unique_vertex_point( @@ -138,7 +134,7 @@ namespace { for( const auto& cmv : cmvs ) { - if( !model.component( cmv.component_id.id() ).is_active() ) + if( !model.component( cmv.component_id.id ).is_active() ) { continue; } @@ -153,14 +149,14 @@ namespace { for( const auto& cmv : cmvs ) { - if( !model.component( cmv.component_id.id() ).is_active() ) + if( !model.component( cmv.component_id.id ).is_active() ) { continue; } - if( cmv.component_id.type() + if( cmv.component_id.type == geode::Block3D::component_type_static() ) { - return model.block( cmv.component_id.id() ) + return model.block( cmv.component_id.id ) .mesh() .point( cmv.vertex ); } diff --git a/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp b/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp index e6b298a7..86f32e36 100644 --- a/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp +++ b/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp @@ -672,16 +672,16 @@ namespace geode for( const auto& polygon_pair : intersections ) { const auto& surface1 = - model_.surface( polygon_pair.first.component_id.id() ); + model_.surface( polygon_pair.first.component_id.id ); const auto& surface2 = - model_.surface( polygon_pair.second.component_id.id() ); + model_.surface( polygon_pair.second.component_id.id ); intersection_issues.add_issue( polygon_pair, absl::StrCat( "Surfaces ", surface1.name().value_or( surface1.id().string() ), - " (", polygon_pair.first.component_id.id().string(), + " (", polygon_pair.first.component_id.id.string(), ") and ", surface2.name().value_or( surface2.id().string() ), - " (", polygon_pair.second.component_id.id().string(), + " (", polygon_pair.second.component_id.id.string(), ") intersect on polygons ", polygon_pair.first.element_id, " and ", polygon_pair.second.element_id ) ); @@ -696,15 +696,15 @@ namespace geode for( const auto& edge_pair : intersections ) { const auto& line1 = - model_.line( edge_pair.first.component_id.id() ); + model_.line( edge_pair.first.component_id.id ); const auto& line2 = - model_.line( edge_pair.second.component_id.id() ); + model_.line( edge_pair.second.component_id.id ); intersection_issues.add_issue( edge_pair, absl::StrCat( "Lines ", line1.name().value_or( line1.id().string() ), " (", - edge_pair.first.component_id.id().string(), ") and ", + edge_pair.first.component_id.id.string(), ") and ", line2.name().value_or( line2.id().string() ), " (", - edge_pair.second.component_id.id().string(), + edge_pair.second.component_id.id.string(), ") intersect on edges ", edge_pair.first.element_id, " and ", edge_pair.second.element_id ) ); } @@ -719,11 +719,11 @@ namespace geode for( const auto& polygon_pair : intersections ) { const auto& surface = - model_.surface( polygon_pair.first.component_id.id() ); + model_.surface( polygon_pair.first.component_id.id ); intersection_issues.add_issue( polygon_pair, absl::StrCat( "Surface ", surface.name().value_or( surface.id().string() ), " (", - polygon_pair.first.component_id.id().string(), + polygon_pair.first.component_id.id.string(), ") has a self intersection on polygons ", polygon_pair.first.element_id, "and ", polygon_pair.second.element_id ) ); @@ -741,16 +741,16 @@ namespace geode for( const auto& element_pair : intersections ) { const auto& surface = - model_.surface( element_pair.first.component_id.id() ); + model_.surface( element_pair.first.component_id.id ); const auto& line = - model_.line( element_pair.second.component_id.id() ); + model_.line( element_pair.second.component_id.id ); intersection_issues.add_issue( element_pair, absl::StrCat( "Surface ", surface.name().value_or( surface.id().string() ), - " (", element_pair.first.component_id.id().string(), + " (", element_pair.first.component_id.id.string(), ") and Line ", line.name().value_or( line.id().string() ), " (", - element_pair.second.component_id.id().string(), + element_pair.second.component_id.id.string(), ") intersect on polygon ", element_pair.first.element_id, " and edge ", element_pair.second.element_id ) ); diff --git a/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp b/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp index ae4b49bf..cc7d21f5 100644 --- a/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp +++ b/src/geode/inspector/inspection/topology/brep_blocks_topology.cpp @@ -651,33 +651,32 @@ namespace geode for( const auto& surface_cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( surface_cmv.component_id.type() + if( surface_cmv.component_id.type != Surface3D::component_type_static() ) { continue; } if( brep_.Relationships::is_boundary( - surface_cmv.component_id.id(), block_uuids[0] ) + surface_cmv.component_id.id, block_uuids[0] ) && brep_.Relationships::is_boundary( - surface_cmv.component_id.id(), block_uuids[1] ) ) + surface_cmv.component_id.id, block_uuids[1] ) ) { return std::nullopt; } for( const auto& line_cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( line_cmv.component_id.type() + if( line_cmv.component_id.type != Line3D::component_type_static() ) { continue; } if( brep_.Relationships::is_boundary( - line_cmv.component_id.id(), - surface_cmv.component_id.id() ) + line_cmv.component_id.id, surface_cmv.component_id.id ) && ( brep_.Relationships::is_boundary( - surface_cmv.component_id.id(), block_uuids[0] ) + surface_cmv.component_id.id, block_uuids[0] ) || brep_.Relationships::is_boundary( - surface_cmv.component_id.id(), block_uuids[1] ) ) ) + surface_cmv.component_id.id, block_uuids[1] ) ) ) { return std::nullopt; } @@ -721,48 +720,47 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Surface3D::component_type_static() - || !brep_.surface( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Surface3D::component_type_static() + || !brep_.surface( cmv.component_id.id ).is_active() ) { continue; } - if( brep_.nb_incidences( cmv.component_id.id() ) >= 1 + if( brep_.nb_incidences( cmv.component_id.id ) >= 1 && absl::c_contains( - not_boundary_surfaces, cmv.component_id.id() ) ) + not_boundary_surfaces, cmv.component_id.id ) ) { return absl::StrCat( "unique vertex with index ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ) + brep_.surface( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .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 - && brep_.nb_incidences( cmv.component_id.id() ) < 1 + if( brep_.nb_embeddings( cmv.component_id.id ) >= 1 + && brep_.nb_incidences( cmv.component_id.id ) < 1 && !absl::c_contains( - not_boundary_surfaces, cmv.component_id.id() ) - && absl::c_contains( dangling_surface, cmv.component_id.id() ) ) + not_boundary_surfaces, cmv.component_id.id ) + && absl::c_contains( dangling_surface, cmv.component_id.id ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ) + brep_.surface( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .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 - && brep_.nb_embeddings( cmv.component_id.id() ) < 1 - && !absl::c_contains( - dangling_surface, cmv.component_id.id() ) ) + if( brep_.nb_incidences( cmv.component_id.id ) < 1 + && brep_.nb_embeddings( cmv.component_id.id ) < 1 + && !absl::c_contains( dangling_surface, cmv.component_id.id ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Surface ", - brep_.surface( cmv.component_id.id() ) + brep_.surface( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which is not internal to " "a Block while it should be." ); } diff --git a/src/geode/inspector/inspection/topology/brep_corners_topology.cpp b/src/geode/inspector/inspection/topology/brep_corners_topology.cpp index 7a716574..0b848f7b 100644 --- a/src/geode/inspector/inspection/topology/brep_corners_topology.cpp +++ b/src/geode/inspector/inspection/topology/brep_corners_topology.cpp @@ -106,8 +106,8 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner3D::component_type_static() - || !brep_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner3D::component_type_static() + || !brep_.corner( cmv.component_id.id ).is_active() ) { continue; } @@ -116,7 +116,7 @@ namespace geode return false; } corner_found = true; - const auto& corner_uuid = cmv.component_id.id(); + const auto& corner_uuid = cmv.component_id.id; if( brep_.nb_embeddings( corner_uuid ) == 0 ) { if( brep_.nb_incidences( corner_uuid ) == 0 ) @@ -161,8 +161,8 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner3D::component_type_static() - || !brep_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner3D::component_type_static() + || !brep_.corner( cmv.component_id.id ).is_active() ) { continue; } @@ -183,22 +183,22 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Corner3D::component_type_static() - && brep_.corner( cmv.component_id.id() ).is_active() - && brep_.nb_embeddings( cmv.component_id.id() ) > 1 ) + if( cmv.component_id.type == Corner3D::component_type_static() + && brep_.corner( cmv.component_id.id ).is_active() + && brep_.nb_embeddings( cmv.component_id.id ) > 1 ) { for( const auto& embedding : - brep_.embeddings( cmv.component_id.id() ) ) + brep_.embeddings( cmv.component_id.id ) ) { - if( embedding.type() == Block3D::component_type_static() - && brep_.block( embedding.id() ).is_active() ) + if( embedding.type == Block3D::component_type_static() + && brep_.block( embedding.id ).is_active() ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner ", - brep_.corner( cmv.component_id.id() ) + brep_.corner( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which is embedded in several components " "including a Block." ); } @@ -215,17 +215,17 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Corner3D::component_type_static() - && brep_.corner( cmv.component_id.id() ).is_active() - && brep_.nb_embeddings( cmv.component_id.id() ) < 1 - && brep_.nb_incidences( cmv.component_id.id() ) < 1 ) + if( cmv.component_id.type == Corner3D::component_type_static() + && brep_.corner( cmv.component_id.id ).is_active() + && brep_.nb_embeddings( cmv.component_id.id ) < 1 + && brep_.nb_incidences( cmv.component_id.id ) < 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner ", - brep_.corner( cmv.component_id.id() ) + brep_.corner( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which is neither internal nor boundary." ); } } @@ -239,18 +239,18 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner3D::component_type_static() - || !brep_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner3D::component_type_static() + || !brep_.corner( cmv.component_id.id ).is_active() ) { continue; } - const auto& corner = brep_.corner( cmv.component_id.id() ); + const auto& corner = brep_.corner( cmv.component_id.id ); absl::linked_hash_map< uuid, index_t > line_to_nb_cmvs; for( const auto& cmv_line : brep_.component_mesh_vertices( unique_vertex_index ) ) { - const auto& line_id = cmv_line.component_id.id(); - if( cmv_line.component_id.type() + const auto& line_id = cmv_line.component_id.id; + if( cmv_line.component_id.type != Line3D::component_type_static() || !brep_.line( line_id ).is_active() ) { diff --git a/src/geode/inspector/inspection/topology/brep_lines_topology.cpp b/src/geode/inspector/inspection/topology/brep_lines_topology.cpp index 0f5b2ef2..fac18113 100644 --- a/src/geode/inspector/inspection/topology/brep_lines_topology.cpp +++ b/src/geode/inspector/inspection/topology/brep_lines_topology.cpp @@ -124,8 +124,8 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Line3D::component_type_static() - && brep_.line( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type == Line3D::component_type_static() + && brep_.line( cmv.component_id.id ).is_active() ) { part_of_active_line = true; break; @@ -167,12 +167,11 @@ namespace geode for( const auto& line_cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( line_cmv.component_id.type() - != Line3D::component_type_static() ) + if( line_cmv.component_id.type != Line3D::component_type_static() ) { continue; } - const auto& line_id = line_cmv.component_id.id(); + const auto& line_id = line_cmv.component_id.id; const auto& line = brep_.line( line_id ); if( !line.is_active() ) { @@ -180,8 +179,7 @@ namespace geode } for( const auto& embedding : brep_.embeddings( line_id ) ) { - if( brep_.Relationships::is_boundary( - line_id, embedding.id() ) ) + if( brep_.Relationships::is_boundary( line_id, embedding.id ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of line ", @@ -189,12 +187,12 @@ namespace geode line_id.string(), "), which is both boundary and embedded in " "Surface ", - brep_.surface( embedding.id() ) + brep_.surface( embedding.id ) .name() - .value_or( embedding.id().string() ), - " (", embedding.id().string() + ")." ); + .value_or( embedding.id.string() ), + " (", embedding.id.string() + ")." ); } - if( embedding.type() == Block3D::component_type_static() + if( embedding.type == Block3D::component_type_static() && !internal::brep_blocks_are_meshed( brep_ ) ) { continue; @@ -209,10 +207,10 @@ namespace geode " is part of Line ", line.name().value_or( line_id.string() ), " (", line_id.string(), "), which is embedded in Surface ", - brep_.surface( embedding.id() ) + brep_.surface( embedding.id ) .name() - .value_or( embedding.id().string() ), - " (", embedding.id().string(), + .value_or( embedding.id.string() ), + " (", embedding.id.string(), "), but the unique vertex is not linked to the " "Surface mesh vertices." ); } @@ -319,11 +317,11 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Line3D::component_type_static() ) + if( cmv.component_id.type != Line3D::component_type_static() ) { continue; } - const auto& line = brep_.line( cmv.component_id.id() ); + const auto& line = brep_.line( cmv.component_id.id ); if( !line.is_active() || line.mesh().nb_edges() == 0 ) { continue; @@ -351,7 +349,7 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", line.name().value_or( line.id().string() ), " (", - cmv.component_id.id().string(), + cmv.component_id.id.string(), "), which is boundary of Surface ", incident_surface.name().value_or( incident_surface.id().string() ), @@ -372,7 +370,7 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", line.name().value_or( line.id().string() ), " (", - cmv.component_id.id().string(), + cmv.component_id.id.string(), "), which is embedded in Surface ", embedding_surface.name().value_or( embedding_surface.id().string() ), @@ -384,7 +382,7 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", line.name().value_or( line.id().string() ), " (", - cmv.component_id.id().string(), + cmv.component_id.id.string(), "), which is embedded in Surface ", embedding_surface.name().value_or( embedding_surface.id().string() ), @@ -393,7 +391,7 @@ namespace geode "edge around Line edge 0)" ); } } - if( brep_.nb_incidences( cmv.component_id.id() ) == 0 + if( brep_.nb_incidences( cmv.component_id.id ) == 0 && brep_.nb_embedding_surfaces( line ) == 0 ) { for( const auto& [surface_id, _] : cme.surface_edges ) @@ -403,7 +401,7 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", line.name().value_or( line.id().string() ), " (", - cmv.component_id.id().string(), + cmv.component_id.id.string(), "), which should be internal or boundary to " "Surface ", brep_.surface( surface_id ) @@ -426,12 +424,12 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Corner3D::component_type_static() ) + if( cmv.component_id.type == Corner3D::component_type_static() ) { is_a_corner = true; } - else if( cmv.component_id.type() == Line3D::component_type_static() - && brep_.line( cmv.component_id.id() ).is_active() ) + else if( cmv.component_id.type == Line3D::component_type_static() + && brep_.line( cmv.component_id.id ).is_active() ) { nb_lines++; } diff --git a/src/geode/inspector/inspection/topology/brep_surfaces_topology.cpp b/src/geode/inspector/inspection/topology/brep_surfaces_topology.cpp index 14c16229..c56ac006 100644 --- a/src/geode/inspector/inspection/topology/brep_surfaces_topology.cpp +++ b/src/geode/inspector/inspection/topology/brep_surfaces_topology.cpp @@ -116,8 +116,8 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Surface3D::component_type_static() - && brep_.surface( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type == Surface3D::component_type_static() + && brep_.surface( cmv.component_id.id ).is_active() ) { surface_found = true; break; @@ -169,13 +169,13 @@ namespace geode } for( const auto& embedding : brep_.embeddings( surface_id ) ) { - const auto& block = brep_.block( embedding.id() ); + const auto& block = brep_.block( embedding.id ); if( !block.is_active() ) { continue; } if( brep_.Relationships::is_boundary( - surface_id, embedding.id() ) ) + surface_id, embedding.id ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Surface ", @@ -183,13 +183,13 @@ namespace geode surface_id.string(), "), which is both internal and boundary of ", "Block ", block.name().value_or( block.id().string() ), " (", - embedding.id().string(), ")" ); + embedding.id.string(), ")" ); } if( internal::brep_blocks_are_meshed( brep_ ) && !absl::c_any_of( brep_.component_mesh_vertices( unique_vertex_index ), [&embedding]( const ComponentMeshVertex& cmv ) { - return cmv.component_id.id() == embedding.id(); + return cmv.component_id.id == embedding.id; } ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, @@ -198,7 +198,7 @@ namespace geode surface_id.string(), " (", surface_id.string(), "), which is embedded in Block ", block.name().value_or( block.id().string() ), " (", - embedding.id().string(), " (", embedding.id().string(), + embedding.id.string(), " (", embedding.id.string(), "), but the unique vertex is not linked to any " "of the Block vertices." ); } @@ -229,12 +229,11 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() - != Corner3D::component_type_static() ) + if( cmv.component_id.type != Corner3D::component_type_static() ) { continue; } - const auto& corner = brep_.corner( cmv.component_id.id() ); + const auto& corner = brep_.corner( cmv.component_id.id ); for( const auto& surface_id : surface_uuids ) { const auto& surface = brep_.surface( surface_id ); @@ -270,7 +269,7 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Line3D::component_type_static() ) + if( cmv.component_id.type != Line3D::component_type_static() ) { continue; } @@ -278,9 +277,9 @@ namespace geode for( const auto& surface_id : surface_uuids ) { if( brep_.Relationships::is_boundary( - cmv.component_id.id(), surface_id ) + cmv.component_id.id, surface_id ) || brep_.Relationships::is_internal( - cmv.component_id.id(), surface_id ) ) + cmv.component_id.id, surface_id ) ) { nb_of_line_relationships_with_surfaces += 1; } @@ -293,12 +292,11 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() - != Corner3D::component_type_static() ) + if( cmv.component_id.type != Corner3D::component_type_static() ) { continue; } - if( brep_.Relationships::nb_embeddings( cmv.component_id.id() ) + if( brep_.Relationships::nb_embeddings( cmv.component_id.id ) + nb_of_line_relationships_with_surfaces < surface_uuids.size() ) { @@ -307,7 +305,7 @@ namespace geode "Line, is a Corner, but is not internal to all the " "Surfaces without relationships to the Line." ); } - if( brep_.Relationships::nb_embeddings( cmv.component_id.id() ) + if( brep_.Relationships::nb_embeddings( cmv.component_id.id ) + nb_of_line_relationships_with_surfaces > surface_uuids.size() ) { @@ -334,11 +332,11 @@ namespace geode for( const auto& cmv : brep_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Surface3D::component_type_static() ) + if( cmv.component_id.type != Surface3D::component_type_static() ) { continue; } - const auto& surface = brep_.surface( cmv.component_id.id() ); + const auto& surface = brep_.surface( cmv.component_id.id ); if( surface.mesh().is_vertex_on_border( cmv.vertex ) ) { continue; @@ -353,7 +351,7 @@ namespace geode return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of a Line and of Surface ", surface.name().value_or( surface.id().string() ), " (", - cmv.component_id.id().string(), + cmv.component_id.id.string(), ") but the associated vertex in the " "Surface mesh is not on the mesh border." ); } diff --git a/src/geode/inspector/inspection/topology/brep_topology.cpp b/src/geode/inspector/inspection/topology/brep_topology.cpp index fe8b3894..065126fb 100644 --- a/src/geode/inspector/inspection/topology/brep_topology.cpp +++ b/src/geode/inspector/inspection/topology/brep_topology.cpp @@ -87,7 +87,7 @@ namespace geode { return false; } - if( brep_.component( cmv.component_id.id() ).is_active() + if( brep_.component( cmv.component_id.id ).is_active() && brep_.unique_vertex( cmv ) != uv_id ) { return false; @@ -127,7 +127,7 @@ namespace geode cmv.string(), "]." ) ); continue; } - if( brep_.component( cmv.component_id.id() ).is_active() + if( brep_.component( cmv.component_id.id ).is_active() && brep_.unique_vertex( cmv ) != uv_id ) { linked_to_nonbijective_result.add_issue( @@ -207,40 +207,40 @@ namespace geode private: bool cmv_exists_in_brep( const ComponentMeshVertex& cmv ) const { - if( cmv.component_id.type() == Corner3D::component_type_static() ) + if( cmv.component_id.type == Corner3D::component_type_static() ) { - if( brep_.has_corner( cmv.component_id.id() ) - && cmv.vertex < brep_.corner( cmv.component_id.id() ) + if( brep_.has_corner( cmv.component_id.id ) + && cmv.vertex < brep_.corner( cmv.component_id.id ) .mesh() .nb_vertices() ) { return true; } } - if( cmv.component_id.type() == Line3D::component_type_static() ) + if( cmv.component_id.type == Line3D::component_type_static() ) { - if( brep_.has_line( cmv.component_id.id() ) - && cmv.vertex < brep_.line( cmv.component_id.id() ) + if( brep_.has_line( cmv.component_id.id ) + && cmv.vertex < brep_.line( cmv.component_id.id ) .mesh() .nb_vertices() ) { return true; } } - if( cmv.component_id.type() == Surface3D::component_type_static() ) + if( cmv.component_id.type == Surface3D::component_type_static() ) { - if( brep_.has_surface( cmv.component_id.id() ) - && cmv.vertex < brep_.surface( cmv.component_id.id() ) + if( brep_.has_surface( cmv.component_id.id ) + && cmv.vertex < brep_.surface( cmv.component_id.id ) .mesh() .nb_vertices() ) { return true; } } - if( cmv.component_id.type() == Block3D::component_type_static() ) + if( cmv.component_id.type == Block3D::component_type_static() ) { - if( brep_.has_block( cmv.component_id.id() ) - && cmv.vertex < brep_.block( cmv.component_id.id() ) + if( brep_.has_block( cmv.component_id.id ) + && cmv.vertex < brep_.block( cmv.component_id.id ) .mesh() .nb_vertices() ) { 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 ef2b5dc3..61eb4616 100644 --- a/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp +++ b/src/geode/inspector/inspection/topology/internal/expected_nb_cmvs.cpp @@ -97,20 +97,19 @@ namespace { const auto nb_block_cmvs = count_cmvs( unique_vertex_cmvs.block_cmvs, [&block_uuid]( const auto& cmv ) { - return cmv.component_id.id() == block_uuid; + return cmv.component_id.id == block_uuid; } ); const auto& block = brep.block( block_uuid ); geode::index_t nb_boundary_surface_cmvs{ 0 }; geode::index_t nb_internal_surface_cmvs{ 0 }; for( const auto& cmv : unique_vertex_cmvs.surface_cmvs ) { - if( brep.is_boundary( - brep.surface( cmv.component_id.id() ), block ) ) + if( brep.is_boundary( brep.surface( cmv.component_id.id ), block ) ) { nb_boundary_surface_cmvs++; } else if( brep.is_internal( - brep.surface( cmv.component_id.id() ), block ) ) + brep.surface( cmv.component_id.id ), block ) ) { nb_internal_surface_cmvs++; } @@ -123,7 +122,7 @@ namespace geode::index_t nb_line_boundary_to_several_internal_surfaces_cmvs{ 0 }; for( const auto& cmv : unique_vertex_cmvs.line_cmvs ) { - const auto& cmv_line = brep.line( cmv.component_id.id() ); + const auto& cmv_line = brep.line( cmv.component_id.id ); if( brep.nb_embedding_blocks( cmv_line ) != 0 ) { continue; @@ -157,7 +156,7 @@ namespace { continue; } - if( brep.nb_incidences( cmv.component_id.id() ) == 1 ) + if( brep.nb_incidences( cmv.component_id.id ) == 1 ) { nb_free_line_cmvs++; continue; @@ -188,7 +187,7 @@ namespace 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() ) + brep.block( unique_vertex_cmvs.block_cmvs[0].component_id.id ) .mesh() .point( unique_vertex_cmvs.block_cmvs[0].vertex ) .string(), @@ -205,8 +204,8 @@ namespace ? std::nullopt : std::make_optional( absl::StrCat( "unique vertex ", unique_vertex_id, " at position [", - brep.block( unique_vertex_cmvs.block_cmvs[0] - .component_id.id() ) + brep.block( + unique_vertex_cmvs.block_cmvs[0].component_id.id ) .mesh() .point( unique_vertex_cmvs.block_cmvs[0].vertex ) .string(), @@ -242,22 +241,20 @@ namespace geode for( const auto& cmv : brep.component_mesh_vertices( unique_vertex_id ) ) { - if( cmv.component_id.type() - == Block3D::component_type_static() ) + if( cmv.component_id.type == Block3D::component_type_static() ) { result.block_cmvs.push_back( cmv ); } - if( cmv.component_id.type() + if( cmv.component_id.type == Surface3D::component_type_static() ) { result.surface_cmvs.push_back( cmv ); } - if( cmv.component_id.type() == Line3D::component_type_static() ) + if( cmv.component_id.type == Line3D::component_type_static() ) { result.line_cmvs.push_back( cmv ); } - if( cmv.component_id.type() - == Corner3D::component_type_static() ) + if( cmv.component_id.type == Corner3D::component_type_static() ) { result.corner_cmvs.push_back( cmv ); } diff --git a/src/geode/inspector/inspection/topology/section_corners_topology.cpp b/src/geode/inspector/inspection/topology/section_corners_topology.cpp index f35181aa..fad7faa6 100644 --- a/src/geode/inspector/inspection/topology/section_corners_topology.cpp +++ b/src/geode/inspector/inspection/topology/section_corners_topology.cpp @@ -106,8 +106,8 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner2D::component_type_static() - || !section_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner2D::component_type_static() + || !section_.corner( cmv.component_id.id ).is_active() ) { continue; } @@ -116,7 +116,7 @@ namespace geode return false; } corner_found = true; - const auto& corner_uuid = cmv.component_id.id(); + const auto& corner_uuid = cmv.component_id.id; if( section_.nb_embeddings( corner_uuid ) > 1 ) { return false; @@ -135,13 +135,12 @@ namespace geode for( const auto& line : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( line.component_id.type() - != Line2D::component_type_static() ) + if( line.component_id.type != Line2D::component_type_static() ) { continue; } if( !section_.Relationships::is_boundary( - corner_uuid, line.component_id.id() ) ) + corner_uuid, line.component_id.id ) ) { return false; } @@ -173,8 +172,8 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner2D::component_type_static() - || !section_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner2D::component_type_static() + || !section_.corner( cmv.component_id.id ).is_active() ) { continue; } @@ -195,16 +194,16 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Corner2D::component_type_static() - && section_.corner( cmv.component_id.id() ).is_active() - && section_.nb_embeddings( cmv.component_id.id() ) > 1 ) + if( cmv.component_id.type == Corner2D::component_type_static() + && section_.corner( cmv.component_id.id ).is_active() + && section_.nb_embeddings( cmv.component_id.id ) > 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner", - section_.corner( cmv.component_id.id() ) + section_.corner( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which has several embeddings." ); } } @@ -218,17 +217,17 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Corner2D::component_type_static() - && section_.corner( cmv.component_id.id() ).is_active() - && section_.nb_embeddings( cmv.component_id.id() ) < 1 - && section_.nb_incidences( cmv.component_id.id() ) < 1 ) + if( cmv.component_id.type == Corner2D::component_type_static() + && section_.corner( cmv.component_id.id ).is_active() + && section_.nb_embeddings( cmv.component_id.id ) < 1 + && section_.nb_incidences( cmv.component_id.id ) < 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated to Corner ", - section_.corner( cmv.component_id.id() ) + section_.corner( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which is neither internal nor boundary." ); } } @@ -242,22 +241,21 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Corner2D::component_type_static() - || !section_.corner( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Corner2D::component_type_static() + || !section_.corner( cmv.component_id.id ).is_active() ) { continue; } - const auto& corner_uuid = cmv.component_id.id(); + const auto& corner_uuid = cmv.component_id.id; for( const auto& line : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( line.component_id.type() - != Line2D::component_type_static() ) + if( line.component_id.type != Line2D::component_type_static() ) { continue; } if( !section_.Relationships::is_boundary( - corner_uuid, line.component_id.id() ) ) + corner_uuid, line.component_id.id ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is associated with Corner ", @@ -265,10 +263,10 @@ namespace geode .name() .value_or( corner_uuid.string() ), " (", corner_uuid.string(), "), part of Line ", - section_.line( line.component_id.id() ) + section_.line( line.component_id.id ) .name() - .value_or( line.component_id.id().string() ), - " (", line.component_id.id().string(), + .value_or( line.component_id.id.string() ), + " (", line.component_id.id.string(), "), but is not a boundary of the Line." ); } } diff --git a/src/geode/inspector/inspection/topology/section_lines_topology.cpp b/src/geode/inspector/inspection/topology/section_lines_topology.cpp index dd2c9e83..f10755d3 100644 --- a/src/geode/inspector/inspection/topology/section_lines_topology.cpp +++ b/src/geode/inspector/inspection/topology/section_lines_topology.cpp @@ -116,8 +116,8 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Line2D::component_type_static() - && section_.line( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type == Line2D::component_type_static() + && section_.line( cmv.component_id.id ).is_active() ) { is_a_line = true; break; @@ -159,20 +159,20 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Line2D::component_type_static() - || !section_.line( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Line2D::component_type_static() + || !section_.line( cmv.component_id.id ).is_active() ) { continue; } - if( section_.nb_embeddings( cmv.component_id.id() ) < 1 - && section_.nb_incidences( cmv.component_id.id() ) < 1 ) + if( section_.nb_embeddings( cmv.component_id.id ) < 1 + && section_.nb_incidences( cmv.component_id.id ) < 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - section_.line( cmv.component_id.id() ) + section_.line( cmv.component_id.id ) .name() - .value_or( cmv.component_id.id().string() ), - " (", cmv.component_id.id().string(), + .value_or( cmv.component_id.id.string() ), + " (", cmv.component_id.id.string(), "), which is neither embedded nor incident." ); } } @@ -186,39 +186,39 @@ namespace geode for( const auto& line_cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( line_cmv.component_id.type() != Line2D::component_type_static() - || !section_.line( line_cmv.component_id.id() ).is_active() ) + if( line_cmv.component_id.type != Line2D::component_type_static() + || !section_.line( line_cmv.component_id.id ).is_active() ) { continue; } - if( section_.nb_embeddings( line_cmv.component_id.id() ) < 1 ) + if( section_.nb_embeddings( line_cmv.component_id.id ) < 1 ) { return std::nullopt; } - if( section_.nb_embeddings( line_cmv.component_id.id() ) > 1 ) + if( section_.nb_embeddings( line_cmv.component_id.id ) > 1 ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of line ", - section_.line( line_cmv.component_id.id() ) + section_.line( line_cmv.component_id.id ) .name() - .value_or( line_cmv.component_id.id().string() ), - " (", line_cmv.component_id.id().string(), + .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 ) + 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() ) + section_.line( line_cmv.component_id.id ) .name() - .value_or( line_cmv.component_id.id().string() ), - " (", line_cmv.component_id.id().string(), + .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 : - section_.embeddings( line_cmv.component_id.id() ) ) + section_.embeddings( line_cmv.component_id.id ) ) { - if( !section_.surface( embedding.id() ).is_active() ) + if( !section_.surface( embedding.id ).is_active() ) { continue; } @@ -226,20 +226,20 @@ namespace geode && !absl::c_any_of( section_.component_mesh_vertices( unique_vertex_index ), [&embedding]( const ComponentMeshVertex& cmv ) { - return cmv.component_id.id() == embedding.id(); + return cmv.component_id.id == embedding.id; } ) ) { return absl::StrCat( "unique vertex ", unique_vertex_index, " is part of Line ", - section_.line( line_cmv.component_id.id() ) + section_.line( line_cmv.component_id.id ) .name() - .value_or( line_cmv.component_id.id().string() ), + .value_or( line_cmv.component_id.id.string() ), " (", line_cmv.component_id.string(), "), which is embedded in surface ", - section_.surface( embedding.id() ) + section_.surface( embedding.id ) .name() - .value_or( embedding.id().string() ), - " (", embedding.id().string(), + .value_or( embedding.id.string() ), + " (", embedding.id.string(), "), but the unique vertex is not linked to the " "Surface mesh vertices." ); } @@ -321,12 +321,12 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() == Line2D::component_type_static() - && section_.line( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type == Line2D::component_type_static() + && section_.line( cmv.component_id.id ).is_active() ) { nb_cmv_lines += 1; } - else if( cmv.component_id.type() + else if( cmv.component_id.type == Corner2D::component_type_static() ) { corner_found = true; diff --git a/src/geode/inspector/inspection/topology/section_surfaces_topology.cpp b/src/geode/inspector/inspection/topology/section_surfaces_topology.cpp index 8b5a75c5..dca5af47 100644 --- a/src/geode/inspector/inspection/topology/section_surfaces_topology.cpp +++ b/src/geode/inspector/inspection/topology/section_surfaces_topology.cpp @@ -100,8 +100,8 @@ namespace geode for( const auto& cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( cmv.component_id.type() != Surface2D::component_type_static() - || !section_.surface( cmv.component_id.id() ).is_active() ) + if( cmv.component_id.type != Surface2D::component_type_static() + || !section_.surface( cmv.component_id.id ).is_active() ) { continue; } @@ -144,15 +144,15 @@ namespace geode for( const auto& line_cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( line_cmv.component_id.type() + if( line_cmv.component_id.type != Line2D::component_type_static() ) { continue; } if( section_.Relationships::is_boundary( - line_cmv.component_id.id(), surface_uuids[0] ) + line_cmv.component_id.id, surface_uuids[0] ) && section_.Relationships::is_boundary( - line_cmv.component_id.id(), surface_uuids[1] ) ) + line_cmv.component_id.id, surface_uuids[1] ) ) { return std::nullopt; } @@ -176,31 +176,31 @@ namespace geode for( const auto& line_cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( line_cmv.component_id.type() != Line2D::component_type_static() - || !section_.line( line_cmv.component_id.id() ).is_active() ) + if( line_cmv.component_id.type != Line2D::component_type_static() + || !section_.line( line_cmv.component_id.id ).is_active() ) { continue; } for( const auto& surface_cmv : section_.component_mesh_vertices( unique_vertex_index ) ) { - if( surface_cmv.component_id.type() + if( surface_cmv.component_id.type != Surface2D::component_type_static() - || !section_.surface( surface_cmv.component_id.id() ) + || !section_.surface( surface_cmv.component_id.id ) .is_active() ) { continue; } - if( !section_.surface( surface_cmv.component_id.id() ) + if( !section_.surface( surface_cmv.component_id.id ) .mesh() .is_vertex_on_border( surface_cmv.vertex ) ) { return absl::StrCat( "Unique vertex ", unique_vertex_index, " is part of a Line and of Surface ", - section_.surface( surface_cmv.component_id.id() ) + section_.surface( surface_cmv.component_id.id ) .name() - .value_or( surface_cmv.component_id.id().string() ), - " (", surface_cmv.component_id.id().string(), + .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." ); } diff --git a/src/geode/inspector/inspection/topology/section_topology.cpp b/src/geode/inspector/inspection/topology/section_topology.cpp index 0b9b0227..8d3459f3 100644 --- a/src/geode/inspector/inspection/topology/section_topology.cpp +++ b/src/geode/inspector/inspection/topology/section_topology.cpp @@ -84,7 +84,7 @@ namespace geode { return false; } - if( section_.component( cmv.component_id.id() ).is_active() + if( section_.component( cmv.component_id.id ).is_active() && section_.unique_vertex( cmv ) != uv_id ) { return false; @@ -124,7 +124,7 @@ namespace geode cmv.string(), "]." ) ); continue; } - if( section_.component( cmv.component_id.id() ).is_active() + if( section_.component( cmv.component_id.id ).is_active() && section_.unique_vertex( cmv ) != uv_id ) { linked_to_nonbijective_result.add_issue( @@ -199,30 +199,30 @@ namespace geode private: bool cmv_exists_in_section( const ComponentMeshVertex& cmv ) const { - if( cmv.component_id.type() == Corner2D::component_type_static() ) + if( cmv.component_id.type == Corner2D::component_type_static() ) { - if( section_.has_corner( cmv.component_id.id() ) - && cmv.vertex < section_.corner( cmv.component_id.id() ) + if( section_.has_corner( cmv.component_id.id ) + && cmv.vertex < section_.corner( cmv.component_id.id ) .mesh() .nb_vertices() ) { return true; } } - if( cmv.component_id.type() == Line2D::component_type_static() ) + if( cmv.component_id.type == Line2D::component_type_static() ) { - if( section_.has_line( cmv.component_id.id() ) - && cmv.vertex < section_.line( cmv.component_id.id() ) + if( section_.has_line( cmv.component_id.id ) + && cmv.vertex < section_.line( cmv.component_id.id ) .mesh() .nb_vertices() ) { return true; } } - if( cmv.component_id.type() == Surface2D::component_type_static() ) + if( cmv.component_id.type == Surface2D::component_type_static() ) { - if( section_.has_surface( cmv.component_id.id() ) - && cmv.vertex < section_.surface( cmv.component_id.id() ) + if( section_.has_surface( cmv.component_id.id ) + && cmv.vertex < section_.surface( cmv.component_id.id ) .mesh() .nb_vertices() ) {