Skip to content

fix(ModelIntersection): missing line/line intersection - #188

Merged
BotellaA merged 1 commit into
nextfrom
fix/simplex-line-intersection
Jul 2, 2026
Merged

fix(ModelIntersection): missing line/line intersection#188
BotellaA merged 1 commit 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:18
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 29 concern(s)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:85:13: warning: [bugprone-easily-swappable-parameters]

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

       85 |             const geode::uuid& surface_id,
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       86 |             const geode::uuid& line_id )
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:85:32: note: the first parameter in the range is 'surface_id'
       85 |             const geode::uuid& surface_id,
          |                                ^~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:86:32: note: the last parameter in the range is 'line_id'
       86 |             const geode::uuid& line_id )
          |                                ^~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:167:9: warning: [google-explicit-constructor]

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

      167 |         ModelIntersectionBase( const Model& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:210:13: warning: [bugprone-easily-swappable-parameters]

    2 adjacent parameters of 'polygons_intersect' of similar type ('geode::index_t') are easily swapped by mistake

      210 |             geode::index_t p1_id, geode::index_t p2_id ) const
          |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:210:28: note: the first parameter in the range is 'p1_id'
      210 |             geode::index_t p1_id, geode::index_t p2_id ) const
          |                            ^~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:210:50: note: the last parameter in the range is 'p2_id'
      210 |             geode::index_t p1_id, geode::index_t p2_id ) const
          |                                                  ^~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:252:17: warning: [bugprone-easily-swappable-parameters]

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

      252 |                 const geode::PolygonVertices& t1_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      253 |                 const geode::PolygonVertices& t2_vertices ) const
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:252:47: note: the first parameter in the range is 't1_vertices'
      252 |                 const geode::PolygonVertices& t1_vertices,
          |                                               ^~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:253:47: note: the last parameter in the range is 't2_vertices'
      253 |                 const geode::PolygonVertices& t2_vertices ) const
          |                                               ^~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:428:58: warning: [readability-function-cognitive-complexity]

    function 'triangles_intersect' has cognitive complexity of 28 (threshold 10)

      428 |         ModelSurfacesIntersectionBase< geode::Section >::triangles_intersect(
          |                                                          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:434:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      434 |         if( common_vertices.size() == 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:17: note: +1
      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:67: note: nesting level increased to 2
      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:70: note: nesting level increased to 2
      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                                                                      ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:458:20: note: +1
      458 |                    || geode::point_triangle_position( t2_third_pt, triangle1 )
          |                    ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:461:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      461 |         for( const auto t1_edge_v : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:465:44: note: +2, including nesting penalty of 1, nesting level increased to 2
      465 |                 t1_vertices[t1_edge_v == 2 ? 0 : t1_edge_v + 1]
          |                                            ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:469:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      469 |             for( const auto t2_edge_v : geode::LRange{ 3 } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:473:48: note: +3, including nesting penalty of 2, nesting level increased to 3
      473 |                     t2_vertices[t2_edge_v == 2 ? 0 : t2_edge_v + 1]
          |                                                ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:479:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      479 |                 if( edge_edge_inter.first == geode::POSITION::outside
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:480:21: note: +1
      480 |                     || edge_edge_inter.first == geode::POSITION::parallel )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:484:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      484 |                 if( common_vertices.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:492:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      492 |                 if( t1_edge_inter_pt_id == geode::NO_LID
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:493:21: note: +1
      493 |                     || t2_edge_inter_pt_id == geode::NO_LID )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:497:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      497 |                 if( edge1_vertices[t1_edge_inter_pt_id] != common_vertices[0][0]
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:498:21: note: +1
      498 |                     || edge2_vertices[t2_edge_inter_pt_id]
          |                     ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:17: warning: [bugprone-chained-comparison]

    chained comparison 'v0 > v1 != v2' may generate unintended results, use parentheses to specify order of evaluation or a logical operator to separate comparison expressions

      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      444 |                         .first
          |                         ~~~~~~
      445 |                     != geode::POSITION::outside
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:17: note: operand 'v0' is here
      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:67: note: operand 'v1' is here
      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                                                                   ^
      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      444 |                         .first
          |                         ~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:445:24: note: operand 'v2' is here
      445 |                     != geode::POSITION::outside
          |                        ^~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:62: error: [clang-diagnostic-error]

    comparison between pointer and integer ('SegmentSegmentIntersection ()(const Segment2D &, const Segment2D &)' (aka 'pair<POSITION, POSITION> ()(const Segment<2> &, const Segment<2> &)') and 'int')

      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:443:23: warning: [clang-diagnostic-unused-value]

    left operand of comma operator has no effect

      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                       ^~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:443:35: warning: [clang-diagnostic-unused-value]

    expression result unused

      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                                   ^~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:443:46: error: [clang-diagnostic-error]

    expected ';' after expression

      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                                              ^
          |                                              ;
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:443:48: error: [clang-diagnostic-error]

    expected ')'

      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                                                ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:442:67: note: to match this '('
      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                                                                   ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:444:26: error: [clang-diagnostic-error]

    no member named 'first' in 'geode::Point<2>'

      442 |             if( geode::segment_segment_intersection_detection< 2 >(
          |                                                                   ~
      443 |                     { common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      444 |                         .first
          |                          ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:20: warning: [bugprone-chained-comparison]

    chained comparison 'v0 > v1 != v2' may generate unintended results, use parentheses to specify order of evaluation or a logical operator to separate comparison expressions

      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      447 |                        { common_pt1, t1_third_pt },
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      448 |                        { common_pt0, t2_third_pt } )
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      449 |                            .first
          |                            ~~~~~~
      450 |                        != geode::POSITION::outside )
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:20: note: operand 'v0' is here
      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:70: note: operand 'v1' is here
      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                                                                      ^
      447 |                        { common_pt1, t1_third_pt },
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      448 |                        { common_pt0, t2_third_pt } )
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      449 |                            .first
          |                            ~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:450:27: note: operand 'v2' is here
      450 |                        != geode::POSITION::outside )
          |                           ^~~~~~~~~~~~~~~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:65: error: [clang-diagnostic-error]

    comparison between pointer and integer ('SegmentSegmentIntersection ()(const Segment2D &, const Segment2D &)' (aka 'pair<POSITION, POSITION> ()(const Segment<2> &, const Segment<2> &)') and 'int')

      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:447:26: warning: [clang-diagnostic-unused-value]

    left operand of comma operator has no effect

      447 |                        { common_pt1, t1_third_pt },
          |                          ^~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:447:38: warning: [clang-diagnostic-unused-value]

    expression result unused

      447 |                        { common_pt1, t1_third_pt },
          |                                      ^~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:447:49: error: [clang-diagnostic-error]

    expected ';' after expression

      447 |                        { common_pt1, t1_third_pt },
          |                                                 ^
          |                                                 ;
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:447:51: error: [clang-diagnostic-error]

    expected ')'

      447 |                        { common_pt1, t1_third_pt },
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:446:70: note: to match this '('
      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                                                                      ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:449:29: error: [clang-diagnostic-error]

    no member named 'first' in 'geode::Point<2>'

      446 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                                                                      ~
      447 |                        { common_pt1, t1_third_pt },
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      448 |                        { common_pt0, t2_third_pt } )
      449 |                            .first
          |                             ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24: warning: [readability-function-cognitive-complexity]

    function 'triangle_intersects_other' has cognitive complexity of 22 (threshold 10)

      508 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:516:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      516 |         for( const auto v_id : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:518:42: note: +2, including nesting penalty of 1, nesting level increased to 2
      518 |             const auto v2_id = v_id == 2 ? 0 : v_id + 1;
          |                                          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:522:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      522 |             if( intersection.first != geode::POSITION::outside )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:524:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      524 |                 if( common_vertices.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:532:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      532 |                 if( edge_inter_pt_id == geode::NO_LID
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:533:21: note: +1
      533 |                     || t2_inter_pt_id == geode::NO_LID )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:537:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      537 |                 if( t1_vertices[edge_inter_pt_id == 0 ? v_id : v2_id]
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:539:21: note: +1
      539 |                     || t2_vertices[t2_inter_pt_id]
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:537:55: note: +3, including nesting penalty of 2, nesting level increased to 3
      537 |                 if( t1_vertices[edge_inter_pt_id == 0 ? v_id : v2_id]
          |                                                       ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:538:71: note: +3, including nesting penalty of 2, nesting level increased to 3
      538 |                         != common_vertices[0][t2_vertex_position == 0 ? 1 : 0]
          |                                                                       ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24: warning: [readability-function-size]

    function 'triangle_intersects_other' exceeds recommended size/complexity thresholds

      508 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24: note: 6 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:577:19: warning: [readability-suspicious-call-argument]

    1st argument 'triangle2' (passed to 'triangle1') looks like it might be swapped with the 2nd, 'triangle1' (passed to 'triangle2')

      577 |                || triangle_intersects_other( triangle2, triangle1, t2_vertices,
          |                   ^                          ~~~~~~~~~  ~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24: note: in the call to 'triangle_intersects_other', declared here
      508 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
      509 |         const geode::Triangle3D& triangle1,
          |                                  ~~~~~~~~~
      510 |         const geode::Triangle3D& triangle2,
          |                                  ~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:577:19: warning: [readability-suspicious-call-argument]

    3rd argument 't2_vertices' (passed to 't1_vertices') looks like it might be swapped with the 4th, 't1_vertices' (passed to 't2_vertices')

      577 |                || triangle_intersects_other( triangle2, triangle1, t2_vertices,
          |                   ^                                                ~~~~~~~~~~~
      578 |                    t1_vertices, common_vertices, 0 );
          |                    ~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:508:24: note: in the call to 'triangle_intersects_other', declared here
      508 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
      509 |         const geode::Triangle3D& triangle1,
      510 |         const geode::Triangle3D& triangle2,
      511 |         const geode::PolygonVertices& t1_vertices,
          |                                       ~~~~~~~~~~~
      512 |         const geode::PolygonVertices& t2_vertices,
          |                                       ~~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:613:9: warning: [modernize-use-nodiscard]

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

      613 |         bool lines_intersect( geode::index_t p1_id, geode::index_t p2_id ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:617:21: error: [clang-diagnostic-error]

    no viable conversion from 'Segment<3>' to 'const Segment<2>'

      617 |                     mesh1_.segment( p1_id ), mesh2_.segment( p2_id ) );
          |                     ^~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:605:23: note: in instantiation of member function '(anonymous namespace)::LineLineIntersection<geode::BRep>::lines_intersect' requested here
      605 |             if( this->lines_intersect( p1_id, p2_id ) )
          |                       ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/detail/aabb_impl.hpp:289:24: note: in instantiation of member function '(anonymous namespace)::LineLineIntersection<geode::BRep>::operator()' requested here
      289 |                 return action( mapping_morton( element_begin1 ),
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/detail/aabb_impl.hpp:520:16: note: in instantiation of function template specialization 'geode::AABBTree<3>::Impl::self_intersect_recursive<(anonymous namespace)::LineLineIntersection<geode::BRep>>' requested here
      520 |         impl_->self_intersect_recursive( Impl::ROOT_INDEX, 0, nb_bboxes(),
          |                ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:873:26: note: in instantiation of function template specialization 'geode::AABBTree<3>::compute_self_element_bbox_intersections<(anonymous namespace)::LineLineIntersection<geode::BRep>>' requested here
      873 |                         .compute_self_element_bbox_intersections(
          |                          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/basic_objects/segment.hpp:99:9: note: candidate constructor not viable: no known conversion from 'Segment<3U>' to 'const Segment<2U> &' for 1st argument
       99 |         Segment( const Segment< dimension >& other ) noexcept;
          |         ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/basic_objects/segment.hpp:100:9: note: candidate constructor not viable: no known conversion from 'Segment<3U>' to 'const OwnerSegment<2U> &' for 1st argument
      100 |         Segment( const OwnerSegment< dimension >& other ) noexcept;
          |         ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/basic_objects/segment.hpp:103:9: note: candidate constructor not viable: no known conversion from 'Segment<3U>' to 'Segment<2U> &&' for 1st argument
      103 |         Segment( Segment< dimension >&& other ) noexcept;
          |         ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-17.3.6-rc.3-ubuntu/include/geode/geometry/intersection_detection.hpp:55:30: note: passing argument to parameter 'segment0' here
       55 |             const Segment2D& segment0, const Segment2D& segment1 );
          |                              ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:652:9: warning: [google-explicit-constructor]

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

      652 |         Impl( const Model& model )
          |         ^
          |         explicit 
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:768:13: warning: [readability-function-cognitive-complexity]

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

      768 |             intersecting_polygons() const
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:771:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      771 |             for( const auto& surface : model_.active_surfaces() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:773:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      773 |                 if( surface.mesh().nb_polygons() == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:785:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      785 |             for( const auto& surface : model_.active_surfaces() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:787:51: note: nesting level increased to 2
      787 |                 tasks.emplace_back( async::spawn( [this, &surface] {
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:797:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      797 |                     for( const auto& [polygon1, polygon2] :
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:810:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      810 |             for( const auto& components : surfaces_overlap.component_pairs )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:812:51: note: nesting level increased to 2
      812 |                 tasks.emplace_back( async::spawn( [this, &components] {
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:828:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      828 |                     for( const auto& [polygon1, polygon2] :
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:838:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      838 |             for( auto& task : async::when_all( tasks ).get() )
          |             ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:848:13: warning: [readability-function-cognitive-complexity]

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

      848 |             intersecting_lines() const
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:853:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      853 |             for( const auto& line : model_.active_lines() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:855:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      855 |                 if( line.mesh().nb_edges() == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:865:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      865 |             for( const auto& line : model_.active_lines() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:867:51: note: nesting level increased to 2
      867 |                 tasks.emplace_back( async::spawn( [this, &line] {
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:877:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      877 |                     for( const auto& [edge1, edge2] :
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:890:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      890 |             for( const auto& components : lines_overlap.component_pairs )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:892:51: note: nesting level increased to 2
      892 |                 tasks.emplace_back( async::spawn( [this, &components] {
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:908:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      908 |                     for( const auto& [edge1, edge2] :
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:918:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      918 |             for( auto& task : async::when_all( tasks ).get() )
          |             ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:928:13: warning: [readability-function-cognitive-complexity]

    function 'intersecting_lines_surfaces' has cognitive complexity of 15 (threshold 10)

      928 |             intersecting_lines_surfaces( const BRep& brep ) const
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:933:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      933 |             for( const auto& surface : brep.active_surfaces() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:935:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      935 |                 if( surface.mesh().nb_polygons() == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:943:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      943 |             for( const auto& line : brep.active_lines() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:945:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      945 |                 if( line.mesh().nb_edges() == 0 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:953:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      953 |             for( const auto& surface : brep.active_surfaces() )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:958:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      958 |                 for( const auto& line : brep.active_lines() )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:960:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      960 |                     if( brep.nb_embedding_blocks( line ) == 0 )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:971:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      971 |                     for( const auto& element_pair :
          |                     ^

Have any feedback or feature suggestions? Share it here.

@BotellaA
BotellaA merged commit 0169f4a into next Jul 2, 2026
25 of 30 checks passed
@BotellaA
BotellaA deleted the fix/simplex-line-intersection branch July 2, 2026 08:58
@BotellaA

BotellaA commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

@BotellaA

BotellaA commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 6.11.5 🎉

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.

2 participants