Skip to content

fix(IntersectionDetection): missing segment/segment 3D#1298

Open
BotellaA wants to merge 2 commits into
nextfrom
fix/simplex-line-intersection
Open

fix(IntersectionDetection): missing segment/segment 3D#1298
BotellaA wants to merge 2 commits into
nextfrom
fix/simplex-line-intersection

Conversation

@BotellaA

@BotellaA BotellaA commented Jul 1, 2026

Copy link
Copy Markdown
Member

No description provided.

@BotellaA BotellaA requested review from MelchiorSchuh and panquez July 1, 2026 13:17
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 97 concern(s)
  • bindings/python/src/geometry/intersection_detection.cpp:34:10: warning: [misc-use-internal-linkage]

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

       34 |     void define_intersection_detection( pybind11::module& module )
          |          ^
          |     static 
  • include/geode/geometry/basic_objects/infinite_line.hpp:43:11: warning: [cppcoreguidelines-special-member-functions]

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

       43 |     class GenericLine
          |           ^
  • include/geode/geometry/basic_objects/infinite_line.hpp:68:11: warning: [cppcoreguidelines-special-member-functions]

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

       68 |     class OwnerInfiniteLine
          |           ^
  • include/geode/geometry/basic_objects/infinite_line.hpp:88:11: warning: [cppcoreguidelines-special-member-functions]

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

       88 |     class OwnerRay : public GenericLine< Point< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/infinite_line.hpp:106:11: warning: [cppcoreguidelines-special-member-functions]

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

      106 |     class InfiniteLine : public GenericLine< RefPoint< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/infinite_line.hpp:116:9: warning: [google-explicit-constructor]

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

      116 |         InfiniteLine( const OwnerInfiniteLine< dimension >& other );
          |         ^
          |         explicit 
  • include/geode/geometry/basic_objects/infinite_line.hpp:126:11: warning: [cppcoreguidelines-special-member-functions]

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

      126 |     class Ray : public GenericLine< RefPoint< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/infinite_line.hpp:133:9: warning: [google-explicit-constructor]

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

      133 |         Ray( const Segment< dimension >& segment );
          |         ^
          |         explicit 
  • include/geode/geometry/basic_objects/infinite_line.hpp:136:9: warning: [google-explicit-constructor]

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

      136 |         Ray( const OwnerRay< dimension >& other );
          |         ^
          |         explicit 
  • include/geode/geometry/basic_objects/polygon.hpp:47:11: warning: [cppcoreguidelines-special-member-functions]

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

       47 |     class GenericPolygon
          |           ^
  • include/geode/geometry/basic_objects/polygon.hpp:52:9: warning: [google-explicit-constructor]

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

       52 |         GenericPolygon( std::vector< PointType > vertices ) noexcept;
          |         ^
          |         explicit 
  • include/geode/geometry/basic_objects/polygon.hpp:89:11: warning: [cppcoreguidelines-special-member-functions]

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

       89 |     class OwnerPolygon : public GenericPolygon< Point< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/polygon.hpp:107:11: warning: [cppcoreguidelines-special-member-functions]

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

      107 |     class Polygon : public GenericPolygon< RefPoint< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/polygon.hpp:112:9: warning: [google-explicit-constructor]

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

      112 |         Polygon( std::vector< RefPoint< dimension > > vertices ) noexcept;
          |         ^
          |         explicit 
  • include/geode/geometry/basic_objects/triangle.hpp:47:11: warning: [cppcoreguidelines-special-member-functions]

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

       47 |     class GenericTriangle
          |           ^
  • include/geode/geometry/basic_objects/triangle.hpp:97:11: warning: [cppcoreguidelines-special-member-functions]

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

       97 |     class OwnerTriangle
          |           ^
  • include/geode/geometry/basic_objects/triangle.hpp:116:11: warning: [cppcoreguidelines-special-member-functions]

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

      116 |     class Triangle : public GenericTriangle< RefPoint< dimension >, dimension >
          |           ^
  • include/geode/geometry/basic_objects/triangle.hpp:126:9: warning: [google-explicit-constructor]

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

      126 |         Triangle( const OwnerTriangle< dimension >& other ) noexcept;
          |         ^
          |         explicit 
  • include/geode/mesh/core/surface_mesh.hpp:63:24: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'PolygonVertex' of convertible types are easily swapped by mistake

       63 |         PolygonVertex( index_t polygon_id_in, local_index_t vertex_id_in )
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:63:32: note: the first parameter in the range is 'polygon_id_in'
       63 |         PolygonVertex( index_t polygon_id_in, local_index_t vertex_id_in )
          |                                ^~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:63:61: note: the last parameter in the range is 'vertex_id_in'
       63 |         PolygonVertex( index_t polygon_id_in, local_index_t vertex_id_in )
          |                                                             ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:63:24: note: 
       63 |         PolygonVertex( index_t polygon_id_in, local_index_t vertex_id_in )
          |                        ^
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:63:47: note: 'index_t' and 'local_index_t' may be implicitly converted: 'index_t' (as 'unsigned int') -> 'local_index_t' (as 'unsigned char'), 'local_index_t' (as 'unsigned char') -> 'index_t' (as 'unsigned int')
       63 |         PolygonVertex( index_t polygon_id_in, local_index_t vertex_id_in )
          |                                               ^
  • include/geode/mesh/core/surface_mesh.hpp:93:18: warning: [readability-identifier-naming]

    invalid case style for global function 'AbslHashValue'

       93 |         friend H AbslHashValue( H h, const PolygonVertex& value )
          |                  ^~~~~~~~~~~~~
          |                  absl_hash_value
  • include/geode/mesh/core/surface_mesh.hpp:93:35: warning: [readability-identifier-length]

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

       93 |         friend H AbslHashValue( H h, const PolygonVertex& value )
          |                                   ^
  • include/geode/mesh/core/surface_mesh.hpp:109:22: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'PolygonEdge' of convertible types are easily swapped by mistake

      109 |         PolygonEdge( index_t polygon_id_in, local_index_t edge_id_in )
          |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:109:30: note: the first parameter in the range is 'polygon_id_in'
      109 |         PolygonEdge( index_t polygon_id_in, local_index_t edge_id_in )
          |                              ^~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:109:59: note: the last parameter in the range is 'edge_id_in'
      109 |         PolygonEdge( index_t polygon_id_in, local_index_t edge_id_in )
          |                                                           ^~~~~~~~~~
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:109:22: note: 
      109 |         PolygonEdge( index_t polygon_id_in, local_index_t edge_id_in )
          |                      ^
    /__w/OpenGeode/OpenGeode/include/geode/mesh/core/surface_mesh.hpp:109:45: note: 'index_t' and 'local_index_t' may be implicitly converted: 'index_t' (as 'unsigned int') -> 'local_index_t' (as 'unsigned char'), 'local_index_t' (as 'unsigned char') -> 'index_t' (as 'unsigned int')
      109 |         PolygonEdge( index_t polygon_id_in, local_index_t edge_id_in )
          |                                             ^
  • include/geode/mesh/core/surface_mesh.hpp:138:18: warning: [readability-identifier-naming]

    invalid case style for global function 'AbslHashValue'

      138 |         friend H AbslHashValue( H h, const PolygonEdge& value )
          |                  ^~~~~~~~~~~~~
          |                  absl_hash_value
  • include/geode/mesh/core/surface_mesh.hpp:138:35: warning: [readability-identifier-length]

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

      138 |         friend H AbslHashValue( H h, const PolygonEdge& value )
          |                                   ^
  • include/geode/mesh/core/surface_mesh.hpp:152:70: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      152 |     using PolygonsAroundVertex = absl::InlinedVector< PolygonVertex, 10 >;
          |                                                                      ^
  • include/geode/mesh/core/surface_mesh.hpp:171:68: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      171 |         using VerticesAroundVertex = absl::InlinedVector< index_t, 10 >;
          |                                                                    ^
  • include/geode/mesh/core/surface_mesh.hpp:173:9: warning: [cppcoreguidelines-explicit-virtual-functions]

    annotate this function with 'override' or (rarely) 'final'

      173 |         ~SurfaceMesh();
          |         ^             
          |                        override
  • src/geode/geometry/basic_objects/polygon.cpp:42:1: warning: [modernize-concat-nested-namespaces]

    nested namespaces can be concatenated

       42 | namespace mapbox
          | ^~~~~~~~~~~~~~~~
       43 | {
          | ~
       44 |     namespace util
          |     ~~~~~~~~~~~~~~
          |     namespace mapbox::util
  • src/geode/geometry/basic_objects/polygon.cpp:49:13: warning: [readability-redundant-inline-specifier]

    function 'get' has inline specifier but is implicitly inlined

       49 |             inline static auto get( const geode::Point< dimension >& point )
          |             ^~~~~~
  • src/geode/geometry/basic_objects/polygon.cpp:58:13: warning: [readability-redundant-inline-specifier]

    function 'get' has inline specifier but is implicitly inlined

       58 |             inline static auto get( const geode::RefPoint< dimension >& point )
          |             ^~~~~~
  • src/geode/geometry/basic_objects/polygon.cpp:140:21: warning: [readability-identifier-length]

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

      140 |         const auto& p0 = vertices_[0];
          |                     ^
  • src/geode/geometry/basic_objects/polygon.cpp:143:25: warning: [readability-identifier-length]

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

      143 |             const auto& p1 = vertices_[v - 1];
          |                         ^
  • src/geode/geometry/basic_objects/polygon.cpp:144:25: warning: [readability-identifier-length]

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

      144 |             const auto& p2 = vertices_[v];
          |                         ^
  • src/geode/geometry/basic_objects/polygon.cpp:232:56: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      232 |                 new_triangles[3 * trgl], new_triangles[3 * trgl + 1],
          |                                                        ^~~~~~~~
          |                                                        (       )
  • src/geode/geometry/basic_objects/polygon.cpp:233:31: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      233 |                 new_triangles[3 * trgl + 2] } );
          |                               ^~~~~~~~
          |                               (       )
  • src/geode/geometry/basic_objects/polygon.cpp:239:52: warning: [readability-function-cognitive-complexity]

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

      239 |     double GenericPolygon< PointType, dimension >::minimum_height() const
          |                                                    ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:244:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      244 |         for( const auto e : geode::Range{ nb_vertices } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:248:48: note: +2, including nesting penalty of 1, nesting level increased to 2
      248 |                 vertices_[e == nb_vertices - 1 ? 0 : e + 1];
          |                                                ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:251:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      251 |             if( cur_length > max_length )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:257:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      257 |         if( max_length < GLOBAL_EPSILON )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:262:48: note: +1, including nesting penalty of 0, nesting level increased to 1
      262 |             max_length_edge + 1 == nb_vertices ? 0 : max_length_edge + 1;
          |                                                ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:268:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      268 |         for( const auto vertex : geode::Range{ nb_vertices } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:270:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      270 |             if( vertex == max_length_edge || vertex == next )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/polygon.cpp:270:43: note: +1
      270 |             if( vertex == max_length_edge || vertex == next )
          |                                           ^
  • src/geode/geometry/basic_objects/polygon.cpp:274:31: warning: [bugprone-narrowing-conversions]

    narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined

      274 |             opposite_vertex = vertex;
          |                               ^
  • src/geode/geometry/basic_objects/polygon.cpp:290:9: warning: [llvm-qualified-auto]

    'auto sep' can be declared as 'const auto *sep'

      290 |         auto sep = "";
          |         ^~~~
          |         const auto *
  • src/geode/geometry/basic_objects/triangle.cpp:41:12: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these fields: lengths

       41 |     struct PivotNormalResult
          |            ^
       42 |     {
       43 |         geode::local_index_t pivot{ geode::NO_LID };
       44 |         geode::Vector3D normal{ { 0, 0, 0 } };
       45 |         std::array< double, 3 > lengths;
          |                                        
          |                                        {}
  • src/geode/geometry/basic_objects/triangle.cpp:48:40: warning: [readability-function-cognitive-complexity]

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

       48 |     std::optional< PivotNormalResult > simple_pivot_and_normal(
          |                                        ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:52:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       52 |         for( const auto pivot : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:54:46: note: +2, including nesting penalty of 1, nesting level increased to 2
       54 |             const auto next = pivot + 1 == 3 ? 0 : pivot + 1;
          |                                              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:57:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       57 |             if( result->lengths[pivot] < geode::GLOBAL_EPSILON )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:62:42: note: +2, including nesting penalty of 1, nesting level increased to 2
       62 |             const auto prev = pivot == 0 ? 2 : pivot - 1;
          |                                          ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:65:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       65 |             if( length1 < geode::GLOBAL_EPSILON )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/basic_objects/triangle.cpp:72:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       72 |             if( length > geode::GLOBAL_ANGULAR_EPSILON )
          |             ^
  • src/geode/geometry/basic_objects/triangle.cpp:117:47: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      117 |         return ( point0 + point1 + point2 ) / 3.;
          |                                               ^
  • src/geode/geometry/basic_objects/triangle.cpp:192:20: warning: [readability-identifier-length]

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

      192 |         const auto e1 = longest_e == 2 ? 0 : longest_e + 1;
          |                    ^
  • src/geode/geometry/basic_objects/triangle.cpp:194:20: warning: [readability-identifier-length]

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

      194 |         const auto e2 = e1 == 2 ? 0 : e1 + 1;
          |                    ^
  • src/geode/geometry/basic_objects/triangle.cpp:201:36: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      201 |             const auto new_point = point0 * ( 1. - ratio ) + point1 * ratio;
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~
          |                                    (                      )
  • src/geode/geometry/basic_objects/triangle.cpp:201:62: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      201 |             const auto new_point = point0 * ( 1. - ratio ) + point1 * ratio;
          |                                                              ^~~~~~~~~~~~~~~
          |                                                              (             )
  • src/geode/geometry/bounding_box.cpp:100:19: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      100 |                 + segment_extent * std::fabs( segment_direction.value( i ) );
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                   (                                                         )
  • src/geode/geometry/bounding_box.cpp:130:24: warning: [readability-identifier-length]

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

      130 |             const auto ii = i == 2 ? 0 : i + 1;
          |                        ^
  • src/geode/geometry/bounding_box.cpp:155:26: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      155 |         const auto rhs = box_half_extent.value( 0 )
          |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
          |                          (
      156 |                              * std::fabs( line.direction().value( 1 ) )
          |                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                                                        )
  • src/geode/geometry/bounding_box.cpp:157:28: warning: [readability-math-missing-parentheses]

    '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations

      157 |                          + box_half_extent.value( 1 )
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
          |                            (
      158 |                                * std::fabs( line.direction().value( 0 ) );
          |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                                                          )
  • src/geode/geometry/bounding_box.cpp:238:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'BoundingBox' of similar type ('Point') are easily swapped by mistake

      238 |         Point< dimension > min, Point< dimension > max )
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:238:28: note: the first parameter in the range is 'min'
      238 |         Point< dimension > min, Point< dimension > max )
          |                            ^~~
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:238:52: note: the last parameter in the range is 'max'
      238 |         Point< dimension > min, Point< dimension > max )
          |                                                    ^~~
  • src/geode/geometry/bounding_box.cpp:466:51: warning: [readability-function-cognitive-complexity]

    function 'intersects<3U>' has cognitive complexity of 14 (threshold 10)

      466 |     bool opengeode_geometry_api BoundingBox< 3 >::intersects< 3 >(
          |                                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:470:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      470 |         for( const auto v : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:472:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      472 |             if( contains( vertices[v].get() ) )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:477:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      477 |         if( !intersects( triangle.bounding_box() ) )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:490:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      490 |         if( !bbox_1d_projection( *this, triangle_normal )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:498:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      498 |         for( const auto i : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:509:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      509 |             if( !triangle_interval.intersects( box_interval ) )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:516:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      516 |         for( const auto i0 : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:518:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      518 |             for( const auto i1 : LRange{ 3 } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:526:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      526 |                 if( !triangle_interval.intersects( box_interval ) )
          |                 ^
  • src/geode/geometry/bounding_box.cpp:516:25: warning: [readability-identifier-length]

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

      516 |         for( const auto i0 : LRange{ 3 } )
          |                         ^
  • src/geode/geometry/bounding_box.cpp:518:29: warning: [readability-identifier-length]

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

      518 |             for( const auto i1 : LRange{ 3 } )
          |                             ^
  • src/geode/geometry/bounding_box.cpp:537:51: warning: [readability-function-cognitive-complexity]

    function 'epsilon_intersects<3U>' has cognitive complexity of 14 (threshold 10)

      537 |     bool opengeode_geometry_api BoundingBox< 3 >::epsilon_intersects< 3 >(
          |                                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:541:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      541 |         for( const auto v : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:543:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      543 |             if( epsilon_contains( vertices[v].get() ) )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:548:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      548 |         if( !epsilon_intersects( triangle.bounding_box() ) )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:561:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      561 |         if( !bbox_1d_projection( *this, triangle_normal )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:569:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      569 |         for( const auto i : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:580:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      580 |             if( !triangle_interval.epsilon_intersects( box_interval ) )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:587:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      587 |         for( const auto i0 : LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:589:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      589 |             for( const auto i1 : LRange{ 3 } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/bounding_box.cpp:597:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      597 |                 if( !triangle_interval.epsilon_intersects( box_interval ) )
          |                 ^
  • src/geode/geometry/bounding_box.cpp:587:25: warning: [readability-identifier-length]

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

      587 |         for( const auto i0 : LRange{ 3 } )
          |                         ^
  • src/geode/geometry/bounding_box.cpp:589:29: warning: [readability-identifier-length]

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

      589 |             for( const auto i1 : LRange{ 3 } )
          |                             ^
  • src/geode/geometry/bounding_box.cpp:713:34: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      713 |         return ( min_ + max_ ) / 2.;
          |                                  ^
  • src/geode/geometry/bounding_box.cpp:750:25: warning: [readability-identifier-length]

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

      750 |         for( const auto c : LRange{ dimension } )
          |                         ^
  • src/geode/geometry/bounding_box.cpp:768:20: warning: [readability-identifier-naming]

    invalid case style for variable 'Pmin'

      768 |         const auto Pmin = point - min_;
          |                    ^~~~
          |                    pmin
      769 |         const auto Pmax = point - max_;
      770 |         auto inner_distance = std::numeric_limits< double >::max();
      771 |         for( const auto c : LRange{ dimension } )
      772 |         {
      773 |             const auto local_distance = std::min(
      774 |                 std::fabs( Pmin.value( c ) ), std::fabs( Pmax.value( c ) ) );
          |                            ~~~~
          |                            pmin
  • src/geode/geometry/bounding_box.cpp:769:20: warning: [readability-identifier-naming]

    invalid case style for variable 'Pmax'

      769 |         const auto Pmax = point - max_;
          |                    ^~~~
          |                    pmax
      770 |         auto inner_distance = std::numeric_limits< double >::max();
      771 |         for( const auto c : LRange{ dimension } )
      772 |         {
      773 |             const auto local_distance = std::min(
      774 |                 std::fabs( Pmin.value( c ) ), std::fabs( Pmax.value( c ) ) );
          |                                                          ~~~~
          |                                                          pmax
  • src/geode/geometry/bounding_box.cpp:771:25: warning: [readability-identifier-length]

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

      771 |         for( const auto c : LRange{ dimension } )
          |                         ^
  • src/geode/geometry/bounding_box.cpp:785:25: warning: [readability-identifier-length]

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

      785 |         for( const auto c : LRange{ dimension } )
          |                         ^
  • src/geode/geometry/intersection_detection.cpp:75:39: warning: [readability-function-cognitive-complexity]

    function 'segment_segment_intersection_detection2D' has cognitive complexity of 17 (threshold 10)

       75 |     geode::SegmentSegmentIntersection segment_segment_intersection_detection2D(
          |                                       ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:86:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       86 |         if( s0_p0_side == s0_p1_side || s1_p0_side == s1_p1_side )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:86:38: note: +1
       86 |         if( s0_p0_side == s0_p1_side || s1_p0_side == s1_p1_side )
          |                                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:88:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       88 |             if( s0_p0_side == geode::SIDE::zero
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:89:17: note: +1
       89 |                 && s1_p0_side == geode::SIDE::zero )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:95:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       95 |         if( s0_p0_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:97:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       97 |             if( s1_p0_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:101:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      101 |             if( s1_p1_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:107:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      107 |         if( s0_p1_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:109:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      109 |             if( s1_p0_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:113:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      113 |             if( s1_p1_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:119:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      119 |         if( s1_p0_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:123:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      123 |         if( s1_p1_side == geode::SIDE::zero )
          |         ^
  • src/geode/geometry/intersection_detection.cpp:75:39: warning: [readability-identifier-naming]

    invalid case style for function 'segment_segment_intersection_detection2D'

       75 |     geode::SegmentSegmentIntersection segment_segment_intersection_detection2D(
          |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                       segment_segment_intersection_detection2_d
  • src/geode/geometry/intersection_detection.cpp:131:9: warning: [readability-function-cognitive-complexity]

    function 'segment_triangle_plane_intersection_detection' has cognitive complexity of 17 (threshold 10)

      131 |         segment_triangle_plane_intersection_detection(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:142:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      142 |         for( const auto triangle_pt : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:150:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      150 |         for( const auto edge_v0 : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:156:56: note: +2, including nesting penalty of 1, nesting level increased to 2
      156 |                                                        ? 0
          |                                                        ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:158:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      158 |             if( seg_edge_inter.first == geode::POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:159:17: note: +1
      159 |                 || seg_edge_inter.first == geode::POSITION::parallel )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:163:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      163 |             if( ( seg_edge_inter.first == geode::POSITION::vertex0
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:165:17: note: +1
      165 |                 && ( seg_edge_inter.second == geode::POSITION::vertex0
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:164:21: note: +1
      164 |                     || seg_edge_inter.first == geode::POSITION::vertex1 )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:166:22: note: +1
      166 |                      || seg_edge_inter.second == geode::POSITION::vertex1 ) )
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:172:47: note: +3, including nesting penalty of 2, nesting level increased to 3
      172 |                                               ? edge_v0
          |                                               ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:182:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      182 |         if( geode::point_triangle_position(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:185:13: note: +1
      185 |             && geode::point_triangle_position(
          |             ^
  • src/geode/geometry/intersection_detection.cpp:194:39: warning: [readability-identifier-naming]

    invalid case style for function 'segment_segment_intersection_detection3D'

      194 |     geode::SegmentSegmentIntersection segment_segment_intersection_detection3D(
          |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                       segment_segment_intersection_detection3_d
  • src/geode/geometry/intersection_detection.cpp:251:32: warning: [readability-function-cognitive-complexity]

    function 'colinear_segment_segment_intersection_detection' has cognitive complexity of 18 (threshold 10)

      251 |     SegmentSegmentIntersection colinear_segment_segment_intersection_detection(
          |                                ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:267:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      267 |         if( s0_p0_position == POSITION::inside
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:270:13: note: +1
      270 |             || s1_p1_position == POSITION::inside )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:274:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      274 |         if( s0_p0_position == POSITION::vertex0 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:276:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      276 |             if( s0_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:277:17: note: +1
      277 |                 || s0_p1_position == POSITION::vertex0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:284:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      284 |         if( s0_p0_position == POSITION::vertex1 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:286:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      286 |             if( s0_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:287:17: note: +1
      287 |                 || s0_p1_position == POSITION::vertex1 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:294:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      294 |         if( s1_p0_position == POSITION::vertex0 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:296:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      296 |             if( s1_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:297:17: note: +1
      297 |                 || s1_p1_position == POSITION::vertex0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:304:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      304 |         if( s1_p0_position == POSITION::vertex1 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:306:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      306 |             if( s1_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:307:17: note: +1
      307 |                 || s1_p1_position == POSITION::vertex1 )
          |                 ^
  • src/geode/mesh/core/surface_mesh.cpp:117:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'not_same_orientation' of similar type ('const geode::PolygonEdge &') are easily swapped by mistake

      117 |         const geode::PolygonEdge& current_edge,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      118 |         const geode::PolygonEdge& adj_edge )
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:117:35: note: the first parameter in the range is 'current_edge'
      117 |         const geode::PolygonEdge& current_edge,
          |                                   ^~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:118:35: note: the last parameter in the range is 'adj_edge'
      118 |         const geode::PolygonEdge& adj_edge )
          |                                   ^~~~~~~~
  • src/geode/mesh/core/surface_mesh.cpp:152:47: warning: [readability-function-cognitive-complexity]

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

      152 |     geode::internal::PolygonsAroundVertexImpl compute_polygons_around_vertex(
          |                                               ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:157:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      157 |         if( !first_polygon )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:170:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      170 |         do
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:182:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      182 |             if( !cur_polygon_vertex )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:187:18: note: +1
      187 |                  && safety_count < MAX_SAFETY_COUNT );
          |                  ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:190:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      190 |         if( result.vertex_is_on_border )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:196:9: note: +1, nesting level increased to 1
      196 |         else
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:200:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      200 |         while( cur_polygon_vertex && safety_count < MAX_SAFETY_COUNT )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:200:35: note: +1
      200 |         while( cur_polygon_vertex && safety_count < MAX_SAFETY_COUNT )
          |                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:210:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      210 |             if( !cur_polygon_vertex )
          |             ^
  • src/geode/mesh/core/surface_mesh.cpp:170:9: warning: [cppcoreguidelines-avoid-do-while]

    avoid do-while loops

      170 |         do
          |         ^
  • src/geode/mesh/core/surface_mesh.cpp:286:9: warning: [google-explicit-constructor]

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

      286 |         Impl( SurfaceMesh& surface )
          |         ^
          |         explicit 
  • src/geode/mesh/core/surface_mesh.cpp:755:35: warning: [readability-function-cognitive-complexity]

    function 'polygon_adjacent_edge' has cognitive complexity of 27 (threshold 10)

      755 |         SurfaceMesh< dimension >::polygon_adjacent_edge(
          |                                   ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:759:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      759 |         if( !polygon_adj )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:769:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      769 |         for( const auto edge_id : LRange{ nb_edges } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:772:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      772 |             if( v0 == adj_vertices[edge_id] )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:776:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      776 |                         ? 0u
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:778:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      778 |                 if( v1 == adj_vertices[enext] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:780:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      780 |                     if( polygon_adjacent( polygon_adj_edge )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:788:18: note: +1, nesting level increased to 2
      788 |             else if( v1 == adj_vertices[edge_id] )
          |                  ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:792:25: note: +3, including nesting penalty of 2, nesting level increased to 3
      792 |                         ? 0u
          |                         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:794:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      794 |                 if( v0 == adj_vertices[enext] )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:796:21: note: +4, including nesting penalty of 3, nesting level increased to 4
      796 |                     if( polygon_adjacent( polygon_adj_edge )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:805:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      805 |         if( failed_edges.empty() )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:820:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      820 |         for( const auto& edge : failed_edges )
          |         ^
  • src/geode/mesh/core/surface_mesh.cpp:764:20: warning: [readability-identifier-length]

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

      764 |         const auto v0 = polygon_vertex( PolygonVertex{ polygon_edge } );
          |                    ^
  • src/geode/mesh/core/surface_mesh.cpp:765:20: warning: [readability-identifier-length]

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

      765 |         const auto v1 = polygon_edge_vertex( polygon_edge, 1 );
          |                    ^
  • src/geode/mesh/core/surface_mesh.cpp:776:27: warning: [hicpp-uppercase-literal-suffix]

    integer literal has suffix 'u', which is not uppercase

      776 |                         ? 0u
          |                           ^~
          |                            U
  • src/geode/mesh/core/surface_mesh.cpp:792:27: warning: [hicpp-uppercase-literal-suffix]

    integer literal has suffix 'u', which is not uppercase

      792 |                         ? 0u
          |                           ^~
          |                            U
  • src/geode/mesh/core/surface_mesh.cpp:852:39: warning: [hicpp-move-const-arg]

    std::move of the variable 'edge' of the trivially-copyable type 'PolygonEdge' has no effect; remove std::move()

      852 |                 borders.emplace_back( std::move( edge ) );
          |                                       ^~~~~~~~~~      ~
  • src/geode/mesh/core/surface_mesh.cpp:870:17: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      870 |                 polygon_adjacent_edge( next_border ).value() );
          |                 ^
  • src/geode/mesh/core/surface_mesh.cpp:888:17: warning: [bugprone-unchecked-optional-access]

    unchecked access to optional value

      888 |                 polygon_adjacent_edge( previous_border ).value() );
          |                 ^
  • src/geode/mesh/core/surface_mesh.cpp:921:18: warning: [cppcoreguidelines-avoid-magic-numbers]

    1. is a magic number; consider replacing it with a named constant
      921 |                / 2.;
          |                  ^
  • src/geode/mesh/core/surface_mesh.cpp:992:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'polygon_edge_from_vertices' of similar type ('index_t') are easily swapped by mistake

      992 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:992:21: note: the first parameter in the range is 'from_vertex_id'
      992 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |                     ^~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/core/surface_mesh.cpp:992:45: note: the last parameter in the range is 'to_vertex_id'
      992 |             index_t from_vertex_id, index_t to_vertex_id ) const
          |                                             ^~~~~~~~~~~~
  • src/geode/mesh/core/surface_mesh.cpp:1145:21: warning: [readability-identifier-length]

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

     1145 |         const auto& p1 = this->point( vertices[0] );
          |                     ^
  • src/geode/mesh/core/surface_mesh.cpp:1148:25: warning: [readability-identifier-length]

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

     1148 |             const auto& p2 = this->point( vertices[i] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1149:25: warning: [readability-identifier-length]

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

     1149 |             const auto& p3 = this->point( vertices[i + 1] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1166:21: warning: [readability-identifier-length]

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

     1166 |         const auto& p1 = this->point( vertices[0] );
          |                     ^
  • src/geode/mesh/core/surface_mesh.cpp:1169:25: warning: [readability-identifier-length]

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

     1169 |             const auto& p2 = this->point( vertices[i] );
          |                         ^
  • src/geode/mesh/core/surface_mesh.cpp:1170:25: warning: [readability-identifier-length]

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

     1170 |             const auto& p3 = this->point( vertices[i + 1] );
          |                         ^
  • src/geode/mesh/helpers/detail/mesh_intersection_detection.cpp:40:9: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'triangles_common_points' of similar type ('const geode::PolygonVertices &') are easily swapped by mistake

       40 |         const geode::PolygonVertices& vertices,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       41 |         const geode::PolygonVertices& other_vertices )
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/helpers/detail/mesh_intersection_detection.cpp:40:39: note: the first parameter in the range is 'vertices'
       40 |         const geode::PolygonVertices& vertices,
          |                                       ^~~~~~~~
    /__w/OpenGeode/OpenGeode/src/geode/mesh/helpers/detail/mesh_intersection_detection.cpp:41:39: note: the last parameter in the range is 'other_vertices'
       41 |         const geode::PolygonVertices& other_vertices )
          |                                       ^~~~~~~~~~~~~~
  • src/geode/mesh/helpers/detail/mesh_intersection_detection.cpp:88:10: warning: [readability-function-size]

    function 'triangle_intersects_other' exceeds recommended size/complexity thresholds

       88 |     bool triangle_intersects_other( const geode::Triangle3D& triangle,
          |          ^
    /__w/OpenGeode/OpenGeode/src/geode/mesh/helpers/detail/mesh_intersection_detection.cpp:88:10: note: 5 parameters (threshold 4)

Have any feedback or feature suggestions? Share it here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant