Skip to content

feat(VertexIdentifier): add a unique_vertex_attribute_id - #1324

Merged
BotellaA merged 2 commits into
nextfrom
feat/add_unique_vertex_attribute_id
Aug 26, 2026
Merged

feat(VertexIdentifier): add a unique_vertex_attribute_id#1324
BotellaA merged 2 commits into
nextfrom
feat/add_unique_vertex_attribute_id

Conversation

@BenPinet

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 189 concern(s)
  • include/geode/model/mixin/core/vertex_identifier.hpp:50:32: warning: [cppcoreguidelines-special-member-functions]

    class 'ComponentMeshVertex' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator

       50 |     struct opengeode_model_api ComponentMeshVertex
          |                                ^
  • include/geode/model/mixin/core/vertex_identifier.hpp:72:18: warning: [readability-identifier-naming]

    invalid case style for global function 'AbslHashValue'

       72 |         friend H AbslHashValue( H h, const ComponentMeshVertex& value )
          |                  ^~~~~~~~~~~~~
          |                  absl_hash_value
  • include/geode/model/mixin/core/vertex_identifier.hpp:72:35: warning: [readability-identifier-length]

    parameter name 'h' is too short, expected at least 3 characters

       72 |         friend H AbslHashValue( H h, const ComponentMeshVertex& value )
          |                                   ^
  • include/geode/model/mixin/core/vertex_identifier.hpp:91:31: warning: [cppcoreguidelines-special-member-functions]

    class 'VertexIdentifier' defines a destructor, a move constructor and a move assignment operator but does not define a copy constructor or a copy assignment operator

       91 |     class opengeode_model_api VertexIdentifier
          |                               ^
  • include/geode/model/mixin/core/vertex_identifier.hpp:96:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

       96 |         VertexIdentifier( BITSERY );
          |         ^
          |         explicit 
  • include/geode/model/mixin/core/vertex_identifier.hpp:172:49: warning: [readability-identifier-length]

    parameter name 'nb' is too short, expected at least 3 characters

      172 |         index_t create_unique_vertices( index_t nb, BuilderKey /*key*/ );
          |                                                 ^
  • src/geode/model/helpers/convert_model_meshes.cpp:99:13: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

       99 |             tri_surface.value()->vertex_attribute_manager().delete_attribute(
          |             ^~~~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:102:26: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      102 |                 surface, std::move( tri_surface ).value() );
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:169:13: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      169 |             tet_solid.value()->vertex_attribute_manager().delete_attribute(
          |             ^~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:171:47: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      171 |             builder.update_block_mesh( block, std::move( tet_solid ).value() );
          |                                               ^~~~~~~~~~~~~~~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:181:13: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      181 |             hybrid_solid.value()->vertex_attribute_manager().delete_attribute(
          |             ^~~~~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:184:24: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      184 |                 block, std::move( hybrid_solid ).value() );
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/model/helpers/convert_model_meshes.cpp:208:10: warning: [misc-use-internal-linkage]

    function 'convert_surface_meshes_into_triangulated_surfaces' can be made static or moved into an anonymous namespace to enforce internal linkage

      208 |     void convert_surface_meshes_into_triangulated_surfaces( BRep& brep )
          |          ^
          |     static 
  • src/geode/model/mixin/core/vertex_identifier.cpp:131:9: warning: [google-explicit-constructor]

    single-argument constructors must be marked explicit to avoid unintentional implicit conversions

      131 |         Impl( BITSERY ) {}
          |         ^
          |         explicit 
  • src/geode/model/mixin/core/vertex_identifier.cpp:131:23: warning: [hicpp-named-parameter]

    all parameters should be named in a function

      131 |         Impl( BITSERY ) {}
          |                       ^
          |                        /*unused*/
  • src/geode/model/mixin/core/vertex_identifier.cpp:133:9: warning: [modernize-use-nodiscard]

    function 'nb_unique_vertices' should be marked [[nodiscard]]

      133 |         index_t nb_unique_vertices() const
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:138:9: warning: [modernize-use-nodiscard]

    function 'is_unique_vertex_isolated' should be marked [[nodiscard]]

      138 |         bool is_unique_vertex_isolated( index_t unique_vertex_id ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:143:9: warning: [modernize-use-nodiscard]

    function 'component_mesh_vertices' should be marked [[nodiscard]]

      143 |         const std::vector< ComponentMeshVertex >& component_mesh_vertices(
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:154:9: warning: [modernize-use-nodiscard]

    function 'unique_vertex' should be marked [[nodiscard]]

      154 |         index_t unique_vertex(
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:160:9: warning: [modernize-use-nodiscard]

    function 'has_component_mesh_vertices' should be marked [[nodiscard]]

      160 |         bool has_component_mesh_vertices(
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:175:9: warning: [modernize-use-nodiscard]

    function 'has_component_mesh_vertices' should be marked [[nodiscard]]

      175 |         bool has_component_mesh_vertices(
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:189:9: warning: [modernize-use-nodiscard]

    function 'unique_vertex_attribute_id' should be marked [[nodiscard]]

      189 |         const uuid& unique_vertex_attribute_id() const
          |         ^
          |         [[nodiscard]] 
  • src/geode/model/mixin/core/vertex_identifier.cpp:201:13: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'unique_vertex_attribute_values'

      201 |             AttributeValues< index_t > unique_vertex_attribute_values;
          |             ^                                                        
          |                                                                      {}
  • src/geode/model/mixin/core/vertex_identifier.cpp:258:55: warning: [readability-identifier-length]

    parameter name 'nb' is too short, expected at least 3 characters

      258 |         index_t create_unique_vertices( const index_t nb )
          |                                                       ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:300:24: warning: [readability-identifier-length]

    variable name 'it' is too short, expected at least 3 characters

      300 |             const auto it = absl::c_find( vertices, component_vertex_id );
          |                        ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:313:14: warning: [readability-function-cognitive-complexity]

    function 'update_unique_vertices' has cognitive complexity of 13 (threshold 10)

      313 |         void update_unique_vertices( const ComponentID& component_id,
          |              ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:318:17: note: nesting level increased to 1
      318 |                 [this, &component_id, &old2new]( index_t uv ) {
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:319:21: note: +2, including nesting penalty of 1, nesting level increased to 2
      319 |                     if( !has_component_mesh_vertices( uv, component_id.id ) )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:326:21: note: +2, including nesting penalty of 1, nesting level increased to 2
      326 |                     for( const auto v : Indices{ all_vertices } )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:329:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      329 |                         if( cmv.component_id.id != component_id.id )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:334:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      334 |                         if( new_id == NO_ID )
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:339:25: note: +1, nesting level increased to 3
      339 |                         else
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:342:33: note: nesting level increased to 4
      342 |                                 [v, new_id]( std::vector< ComponentMeshVertex >&
          |                                 ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:348:21: note: +2, including nesting penalty of 1, nesting level increased to 2
      348 |                     if( need_to_delete )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:351:29: note: nesting level increased to 3
      351 |                             [&to_delete](
          |                             ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:318:58: warning: [readability-identifier-length]

    parameter name 'uv' is too short, expected at least 3 characters

      318 |                 [this, &component_id, &old2new]( index_t uv ) {
          |                                                          ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:359:32: warning: [readability-function-cognitive-complexity]

    function 'delete_isolated_vertices' has cognitive complexity of 11 (threshold 10)

      359 |         std::vector< index_t > delete_isolated_vertices()
          |                                ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:364:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      364 |             for( const auto v : Range{ nb_unique_vertices() } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:366:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      366 |                 if( is_unique_vertex_isolated( v ) )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:371:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      371 |                 for( const auto& cmv : component_mesh_vertices( v ) )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:379:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      379 |             for( const auto& component_vertices : components_vertices )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:383:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      383 |                 for( const auto v : component_vertices.second )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/model/mixin/core/vertex_identifier.cpp:386:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      386 |                     if( value == NO_ID )
          |                     ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:447:44: error: [clang-diagnostic-error]

    no member named 'StdMap' in namespace 'bitsery::ext'

      447 |                              bitsery::ext::StdMap{ old_map.max_size() },
          |                                            ^~~~~~
  • src/geode/model/mixin/core/vertex_identifier.cpp:448:59: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

      448 |                              []( Archive& archive2, uuid& id,
          |                                                           ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:471:47: error: [clang-diagnostic-error]

    no member named 'StdMap' in namespace 'bitsery::ext'

      471 |                                 bitsery::ext::StdMap{ old_map.max_size() },
          |                                               ^~~~~~
  • src/geode/model/mixin/core/vertex_identifier.cpp:472:62: warning: [readability-identifier-length]

    parameter name 'id' is too short, expected at least 3 characters

      472 |                                 []( Archive& archive2, uuid& id,
          |                                                              ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:650:17: warning: [readability-identifier-length]

    parameter name 'nb' is too short, expected at least 3 characters

      650 |         index_t nb, BuilderKey /*key*/ )
          |                 ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:656:29: warning: [performance-unnecessary-value-param]

    the parameter 'component_vertex_id' is copied for each invocation but only used as a const reference; consider making it a const reference

      656 |         ComponentMeshVertex component_vertex_id,
          |                             ^
          |         const              &
  • src/geode/model/mixin/core/vertex_identifier.cpp:661:13: warning: [hicpp-move-const-arg]

    passing result of std::move() as a const reference argument; no move will actually happen

      661 |             std::move( component_vertex_id ), unique_vertex_id );
          |             ^~~~~~~~~~                     ~
    /__w/OpenGeode/OpenGeode/include/geode/model/mixin/core/vertex_identifier.hpp:50:32: note: 'ComponentMeshVertex' is not move assignable/constructible
       50 |     struct opengeode_model_api ComponentMeshVertex
          |                                ^
  • src/geode/model/mixin/core/vertex_identifier.cpp:689:9: warning: [readability-avoid-return-with-void-value]

    return statement within a void function should not have a specified return value

      689 |         return impl_->load( directory );
          |         ^~~~~~
  • tests/model/test-brep.cpp:61:30: warning: [misc-use-internal-linkage]

    function 'add_corners' can be made static or moved into an anonymous namespace to enforce internal linkage

       61 | std::array< geode::uuid, 6 > add_corners(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:64:30: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       64 |     std::array< geode::uuid, 6 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:65:21: warning: [readability-identifier-length]

    variable name 'c' is too short, expected at least 3 characters

       65 |     for( const auto c : geode::Range{ 6 } )
          |                     ^
  • tests/model/test-brep.cpp:75:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       75 |     geode::OpenGeodeModelException::test( model.nb_corners() == 6, message );
          |                                                                 ^
  • tests/model/test-brep.cpp:77:67: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       77 |         geode::detail::count_range_elements( model.corners() ) == 6, message );
          |                                                                   ^
  • tests/model/test-brep.cpp:81:38: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       81 |         model.nb_active_corners() == 6, message );
          |                                      ^
  • tests/model/test-brep.cpp:87:31: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

       87 |         model.nb_corners() == 6, "BRep should still have 6 corners" );
          |                               ^
  • tests/model/test-brep.cpp:91:30: warning: [misc-use-internal-linkage]

    function 'add_lines' can be made static or moved into an anonymous namespace to enforce internal linkage

       91 | std::array< geode::uuid, 9 > add_lines(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:94:30: warning: [cppcoreguidelines-avoid-magic-numbers]

    9 is a magic number; consider replacing it with a named constant

       94 |     std::array< geode::uuid, 9 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:95:21: warning: [readability-identifier-length]

    variable name 'l' is too short, expected at least 3 characters

       95 |     for( const auto l : geode::Range{ 9 } )
          |                     ^
  • tests/model/test-brep.cpp:105:63: warning: [cppcoreguidelines-avoid-magic-numbers]

    9 is a magic number; consider replacing it with a named constant

      105 |     geode::OpenGeodeModelException::test( model.nb_lines() == 9, message );
          |                                                               ^
  • tests/model/test-brep.cpp:107:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    9 is a magic number; consider replacing it with a named constant

      107 |         geode::detail::count_range_elements( model.lines() ) == 9, message );
          |                                                                 ^
  • tests/model/test-brep.cpp:111:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    9 is a magic number; consider replacing it with a named constant

      111 |         model.nb_active_lines() == 9, message );
          |                                    ^
  • tests/model/test-brep.cpp:115:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      115 |         model.nb_active_lines() == 7, "BRep should have 7 active lines" );
          |                                    ^
  • tests/model/test-brep.cpp:117:29: warning: [cppcoreguidelines-avoid-magic-numbers]

    9 is a magic number; consider replacing it with a named constant

      117 |         model.nb_lines() == 9, "BRep should still have 9 lines" );
          |                             ^
  • tests/model/test-brep.cpp:121:30: warning: [misc-use-internal-linkage]

    function 'add_surfaces' can be made static or moved into an anonymous namespace to enforce internal linkage

      121 | std::array< geode::uuid, 5 > add_surfaces(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:124:30: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      124 |     std::array< geode::uuid, 5 > uuids;
          |                              ^
  • tests/model/test-brep.cpp:125:21: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      125 |     for( const auto s : geode::Range{ 2 } )
          |                     ^
  • tests/model/test-brep.cpp:132:21: warning: [readability-identifier-length]

    variable name 's' is too short, expected at least 3 characters

      132 |     for( const auto s : geode::Range{ 2, 5 } )
          |                     ^
  • tests/model/test-brep.cpp:140:66: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      140 |     geode::OpenGeodeModelException::test( model.nb_surfaces() == 5, message );
          |                                                                  ^
  • tests/model/test-brep.cpp:142:68: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      142 |         geode::detail::count_range_elements( model.surfaces() ) == 5, message );
          |                                                                    ^
  • tests/model/test-brep.cpp:146:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      146 |         model.nb_active_surfaces() == 5, message );
          |                                       ^
  • tests/model/test-brep.cpp:152:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      152 |         model.nb_surfaces() == 5, "BRep should still have 5 surfaces" );
          |                                ^
  • tests/model/test-brep.cpp:156:13: warning: [misc-use-internal-linkage]

    function 'add_block' can be made static or moved into an anonymous namespace to enforce internal linkage

      156 | geode::uuid add_block( const geode::BRep& model, geode::BRepBuilder& builder )
          |             ^
          | static 
  • tests/model/test-brep.cpp:179:30: warning: [misc-use-internal-linkage]

    function 'add_model_boundaries' can be made static or moved into an anonymous namespace to enforce internal linkage

      179 | std::array< geode::uuid, 3 > add_model_boundaries(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:183:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      183 |     for( const auto mb : geode::Range{ 3 } )
          |                     ^
  • tests/model/test-brep.cpp:216:30: warning: [misc-use-internal-linkage]

    function 'add_corner_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      216 | std::array< geode::uuid, 2 > add_corner_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:220:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      220 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:254:30: warning: [misc-use-internal-linkage]

    function 'add_line_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      254 | std::array< geode::uuid, 2 > add_line_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:258:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      258 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:290:30: warning: [misc-use-internal-linkage]

    function 'add_surface_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      290 | std::array< geode::uuid, 2 > add_surface_collections(
          |                              ^
          | static 
  • tests/model/test-brep.cpp:294:21: warning: [readability-identifier-length]

    variable name 'mb' is too short, expected at least 3 characters

      294 |     for( const auto mb : geode::Indices{ uuids } )
          |                     ^
  • tests/model/test-brep.cpp:327:13: warning: [misc-use-internal-linkage]

    function 'add_block_collection' can be made static or moved into an anonymous namespace to enforce internal linkage

      327 | geode::uuid add_block_collection(
          |             ^
          | static 
  • tests/model/test-brep.cpp:358:6: warning: [misc-use-internal-linkage]

    function 'add_corner_line_boundary_relation' can be made static or moved into an anonymous namespace to enforce internal linkage

      358 | void add_corner_line_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:366:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      366 |         model.corner( corner_uuids[0] ), model.line( line_uuids[5] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:382:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      382 |         model.corner( corner_uuids[3] ), model.line( line_uuids[5] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:384:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      384 |         model.corner( corner_uuids[3] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:386:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      386 |         model.corner( corner_uuids[3] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:390:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      390 |         model.corner( corner_uuids[4] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:392:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      392 |         model.corner( corner_uuids[4] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:394:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      394 |         model.corner( corner_uuids[5] ), model.line( line_uuids[4] ) );
          |                                    ^
  • tests/model/test-brep.cpp:396:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      396 |         model.corner( corner_uuids[5] ), model.line( line_uuids[7] ) );
          |                                    ^
  • tests/model/test-brep.cpp:396:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      396 |         model.corner( corner_uuids[5] ), model.line( line_uuids[7] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:398:36: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      398 |         model.corner( corner_uuids[5] ), model.line( line_uuids[6] ) );
          |                                    ^
  • tests/model/test-brep.cpp:398:65: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      398 |         model.corner( corner_uuids[5] ), model.line( line_uuids[6] ) );
          |                                                                 ^
  • tests/model/test-brep.cpp:425:23: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      425 |         if( line_id < 6 )
          |                       ^
  • tests/model/test-brep.cpp:438:6: warning: [misc-use-internal-linkage]

    function 'add_line_surface_boundary_relation' can be made static or moved into an anonymous namespace to enforce internal linkage

      438 | void add_line_surface_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:464:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      464 |         model.line( line_uuids[5] ), model.surface( surface_uuids[1] ) );
          |                                ^
  • tests/model/test-brep.cpp:466:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      466 |         model.line( line_uuids[5] ), model.surface( surface_uuids[3] ) );
          |                                ^
  • tests/model/test-brep.cpp:468:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      468 |         model.line( line_uuids[6] ), model.surface( surface_uuids[1] ) );
          |                                ^
  • tests/model/test-brep.cpp:470:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      470 |         model.line( line_uuids[6] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:472:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      472 |         model.line( line_uuids[7] ), model.surface( surface_uuids[2] ) );
          |                                ^
  • tests/model/test-brep.cpp:474:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      474 |         model.line( line_uuids[7] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:476:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    8 is a magic number; consider replacing it with a named constant

      476 |         model.line( line_uuids[8] ), model.surface( surface_uuids[3] ) );
          |                                ^
  • tests/model/test-brep.cpp:478:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    8 is a magic number; consider replacing it with a named constant

      478 |         model.line( line_uuids[8] ), model.surface( surface_uuids[4] ) );
          |                                ^
  • tests/model/test-brep.cpp:495:6: warning: [misc-use-internal-linkage]

    function 'add_surface_block_boundary_relation' can be made static or moved into an anonymous namespace to enforce internal linkage

      495 | void add_surface_block_boundary_relation( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:525:6: warning: [misc-use-internal-linkage]

    function 'add_surfaces_in_model_boundaries' can be made static or moved into an anonymous namespace to enforce internal linkage

      525 | void add_surfaces_in_model_boundaries( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:550:6: warning: [misc-use-internal-linkage]

    function 'add_corners_in_corner_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      550 | void add_corners_in_corner_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:577:6: warning: [misc-use-internal-linkage]

    function 'add_lines_in_line_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      577 | void add_lines_in_line_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:602:6: warning: [misc-use-internal-linkage]

    function 'add_surfaces_in_surface_collections' can be made static or moved into an anonymous namespace to enforce internal linkage

      602 | void add_surfaces_in_surface_collections( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:629:6: warning: [misc-use-internal-linkage]

    function 'add_block_in_block_collection' can be made static or moved into an anonymous namespace to enforce internal linkage

      629 | void add_block_in_block_collection( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:643:6: warning: [misc-use-internal-linkage]

    function 'add_internal_corner_relations' can be made static or moved into an anonymous namespace to enforce internal linkage

      643 | void add_internal_corner_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:643:6: warning: [readability-function-size]

    function 'add_internal_corner_relations' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:643:6: note: 6 parameters (threshold 4)
  • tests/model/test-brep.cpp:645:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'add_internal_corner_relations' of similar type ('absl::Span') are easily swapped by mistake

      645 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      646 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      647 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:645:37: note: the first parameter in the range is 'corner_uuids'
      645 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:647:37: note: the last parameter in the range is 'surface_uuids'
      647 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:706:6: warning: [misc-use-internal-linkage]

    function 'add_internal_line_relations' can be made static or moved into an anonymous namespace to enforce internal linkage

      706 | void add_internal_line_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:706:6: warning: [readability-function-cognitive-complexity]

    function 'add_internal_line_relations' has cognitive complexity of 12 (threshold 10)

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:713:5: note: +1, including nesting penalty of 0, nesting level increased to 1
      713 |     for( const auto& line_id : line_uuids )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:715:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      715 |         if( !model.is_boundary( model.line( line_id ),
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:721:9: note: +1, nesting level increased to 2
      721 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:729:5: note: +1, including nesting penalty of 0, nesting level increased to 1
      729 |     for( const auto& line_id : line_uuids )
          |     ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:731:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      731 |         for( const auto& embedding :
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:743:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      743 |         for( const auto& embedding :
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:752:9: note: +2, including nesting penalty of 1, nesting level increased to 2
      752 |         if( model.is_boundary( model.line( line_id ),
          |         ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:762:9: note: +1, nesting level increased to 2
      762 |         else
          |         ^
  • tests/model/test-brep.cpp:706:6: warning: [readability-function-size]

    function 'add_internal_line_relations' exceeds recommended size/complexity thresholds

      706 | void add_internal_line_relations( const geode::BRep& model,
          |      ^
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:706:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:708:5: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'add_internal_line_relations' of similar type ('absl::Span') are easily swapped by mistake

      708 |     absl::Span< const geode::uuid > line_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      709 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:708:37: note: the first parameter in the range is 'line_uuids'
      708 |     absl::Span< const geode::uuid > line_uuids,
          |                                     ^~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:709:37: note: the last parameter in the range is 'surface_uuids'
      709 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:778:6: warning: [misc-use-internal-linkage]

    function 'add_internal_surface_block_relations' can be made static or moved into an anonymous namespace to enforce internal linkage

      778 | void add_internal_surface_block_relations( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:813:6: warning: [misc-use-internal-linkage]

    function 'set_geometry' can be made static or moved into an anonymous namespace to enforce internal linkage

      813 | void set_geometry( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:813:6: warning: [readability-function-size]

    function 'set_geometry' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:813:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:815:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'set_geometry' of similar type ('absl::Span') are easily swapped by mistake

      815 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      816 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      817 |     absl::Span< const geode::uuid > surface_uuids )
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:815:37: note: the first parameter in the range is 'corner_uuids'
      815 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:817:37: note: the last parameter in the range is 'surface_uuids'
      817 |     absl::Span< const geode::uuid > surface_uuids )
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:819:33: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      819 |     std::array< geode::Point3D, 6 > points;
          |                                 ^
  • tests/model/test-brep.cpp:823:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      823 |     points[3] = geode::Point3D{ { 1., 1., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:824:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      824 |     points[4] = geode::Point3D{ { 1., 2., 2. } };
          |                                       ^
  • tests/model/test-brep.cpp:824:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      824 |     points[4] = geode::Point3D{ { 1., 2., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:825:12: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      825 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |            ^
  • tests/model/test-brep.cpp:825:35: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      825 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                   ^
  • tests/model/test-brep.cpp:825:39: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      825 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                       ^
  • tests/model/test-brep.cpp:825:43: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      825 |     points[5] = geode::Point3D{ { 2., 2., 2. } };
          |                                           ^
  • tests/model/test-brep.cpp:850:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      850 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:851:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      851 |     builder.line_mesh_builder( model.line( line_uuids[5] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:853:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      853 |     builder.line_mesh_builder( model.line( line_uuids[5] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:855:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      855 |     builder.line_mesh_builder( model.line( line_uuids[6] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:857:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    6 is a magic number; consider replacing it with a named constant

      857 |     builder.line_mesh_builder( model.line( line_uuids[6] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:859:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      859 |     builder.line_mesh_builder( model.line( line_uuids[7] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:861:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    7 is a magic number; consider replacing it with a named constant

      861 |     builder.line_mesh_builder( model.line( line_uuids[7] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:862:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      862 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:863:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    8 is a magic number; consider replacing it with a named constant

      863 |     builder.line_mesh_builder( model.line( line_uuids[8] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:865:55: warning: [cppcoreguidelines-avoid-magic-numbers]

    8 is a magic number; consider replacing it with a named constant

      865 |     builder.line_mesh_builder( model.line( line_uuids[8] ) )
          |                                                       ^
  • tests/model/test-brep.cpp:866:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      866 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:910:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      910 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:923:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      923 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:934:32: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

      934 |         ->create_point( points[5] );
          |                                ^
  • tests/model/test-brep.cpp:939:6: warning: [misc-use-internal-linkage]

    function 'test_boundary_ranges' can be made static or moved into an anonymous namespace to enforce internal linkage

      939 | void test_boundary_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:939:6: warning: [readability-function-size]

    function 'test_boundary_ranges' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:939:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:940:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'test_boundary_ranges' of similar type ('absl::Span') are easily swapped by mistake

      940 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      941 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      942 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:940:37: note: the first parameter in the range is 'corner_uuids'
      940 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:942:37: note: the last parameter in the range is 'surface_uuids'
      942 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:997:6: warning: [misc-use-internal-linkage]

    function 'test_incidence_ranges' can be made static or moved into an anonymous namespace to enforce internal linkage

      997 | void test_incidence_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:997:6: warning: [readability-function-size]

    function 'test_incidence_ranges' exceeds recommended size/complexity thresholds

    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:997:6: note: 5 parameters (threshold 4)
  • tests/model/test-brep.cpp:998:5: warning: [bugprone-easily-swappable-parameters]

    3 adjacent parameters of 'test_incidence_ranges' of similar type ('absl::Span') are easily swapped by mistake

      998 |     absl::Span< const geode::uuid > corner_uuids,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      999 |     absl::Span< const geode::uuid > line_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1000 |     absl::Span< const geode::uuid > surface_uuids,
          |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:998:37: note: the first parameter in the range is 'corner_uuids'
      998 |     absl::Span< const geode::uuid > corner_uuids,
          |                                     ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/tests/model/test-brep.cpp:1000:37: note: the last parameter in the range is 'surface_uuids'
     1000 |     absl::Span< const geode::uuid > surface_uuids,
          |                                     ^~~~~~~~~~~~~
  • tests/model/test-brep.cpp:1011:56: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

     1011 |                 || corner_incidence.id() == line_uuids[5],
          |                                                        ^
  • tests/model/test-brep.cpp:1044:6: warning: [misc-use-internal-linkage]

    function 'test_item_ranges' can be made static or moved into an anonymous namespace to enforce internal linkage

     1044 | void test_item_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1069:6: warning: [misc-use-internal-linkage]

    function 'test_corner_collection_ranges' can be made static or moved into an anonymous namespace to enforce internal linkage

     1069 | void test_corner_collection_ranges( const geode::BRep& model,
          |      ^
          | static 
  • tests/model/test-brep.cpp:1081:57: warning: [cppcoreguidelines-avoid-magic-numbers]

    5 is a magic number; consider replacing it with a named constant

     1081 |                 || collection_item.id() == corner_uuids[5],
          |                                                         ^

Have any feedback or feature suggestions? Share it here.

Comment thread src/geode/model/helpers/convert_model_meshes.cpp
@BenPinet
BenPinet requested a review from panquez August 25, 2026 13:28
Comment thread src/geode/model/mixin/core/vertex_identifier.cpp Outdated
Comment thread src/geode/model/mixin/core/vertex_identifier.cpp Outdated
@BotellaA
BotellaA merged commit ac744f6 into next Aug 26, 2026
19 checks passed
@BotellaA
BotellaA deleted the feat/add_unique_vertex_attribute_id branch August 26, 2026 13:38
@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 18.1.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

Copy link
Copy Markdown
Member

🎉 This PR is included in version 18.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants