Skip to content

fix(Geometry): robustness to degenerated primitives from in-dev stitching models - #1377

Open
panquez wants to merge 2 commits into
nextfrom
bug/in-dev-stitching-models
Open

panquez wants to merge 2 commits into
nextfrom
bug/in-dev-stitching-models

Conversation

@panquez

@panquez panquez commented Oct 21, 2026

Copy link
Copy Markdown
Member

Two crashes found while converting and inspecting models produced by the in-dev stitching (Geode-Conversion PR on the same branch).

fix(RadialSort): return identity order for fewer than 3 points

radial_sort always built its plane from segment.direction(), which throws on a zero-length segment. surface_radial_sort hits this on a Line edge between two colocated unique vertices. With 0, 1 or 2 points every cyclic order is the same, so no geometry is needed. With 3+ points around a zero-length segment the sort is still undefined and keeps throwing.

fix(IntersectionDetection): handle triangles collapsed to a point

In the coplanar branch of segment_triangle_intersection_detection, best_projection_axis indexed the triangle vertices with longest_edge_index(), which is NO_LID when all three vertices are colocated. The out-of-bounds read made BRepInspector segfault on such models (intersections inspection). The projection axis now only depends on the segment in that case.

Tests

  • test-radial-sort: zero-length segment with 2 points.
  • test-intersection-detection: segment vs triangle collapsed to a point (segfaulted before the fix).

🤖 Generated with Claude Code

panquez and others added 2 commits October 21, 2026 13:20
A cyclic order of 0, 1 or 2 elements is unique, so no geometric
computation is needed. Previously the segment direction was always
computed, so a zero-length segment threw in Segment::direction, e.g.
in surface_radial_sort on a degenerated Line edge between two colocated
unique vertices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In coplanar segment/triangle detection, best_projection_axis indexed the
triangle vertices with longest_edge_index(), which is NO_LID when all the
triangle vertices are colocated. This out-of-bounds read made
BRepInspector segfault on models with such triangles. The projection axis
now only depends on the segment in that case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v21.1.8) reports: 92 concern(s)
  • src/geode/geometry/intersection_detection.cpp:91:26: warning: [hicpp-move-const-arg]

    std::move of the variable 'candidate' of the trivially-copyable type 'Vector<3>' has no effect; remove std::move()

       91 |                 normal = std::move( candidate );
          |                          ^~~~~~~~~~           ~
  • src/geode/geometry/intersection_detection.cpp:132:39: warning: [readability-function-cognitive-complexity]

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

      132 |     geode::SegmentSegmentIntersection segment_segment_intersection_detection2D(
          |                                       ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:143:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      143 |         if( s0_p0_side == s0_p1_side || s1_p0_side == s1_p1_side )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:143:38: note: +1
      143 |         if( s0_p0_side == s0_p1_side || s1_p0_side == s1_p1_side )
          |                                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:145:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      145 |             if( s0_p0_side == geode::SIDE::zero
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:146:17: note: +1
      146 |                 && s1_p0_side == geode::SIDE::zero )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:152:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      152 |         if( s0_p0_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:154:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      154 |             if( s1_p0_side == geode::SIDE::zero )
          |             ^
    /__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( s1_p1_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:164:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      164 |         if( s0_p1_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:166:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      166 |             if( s1_p0_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:170:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      170 |             if( s1_p1_side == geode::SIDE::zero )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:176:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      176 |         if( s1_p0_side == geode::SIDE::zero )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:180:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      180 |         if( s1_p1_side == geode::SIDE::zero )
          |         ^
  • src/geode/geometry/intersection_detection.cpp:132:39: warning: [readability-identifier-naming]

    invalid case style for function 'segment_segment_intersection_detection2D'

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

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

      188 |         segment_triangle_plane_intersection_detection(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:199:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      199 |         for( const auto triangle_pt : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:207:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      207 |         for( const auto edge_v0 : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:213:56: note: +2, including nesting penalty of 1, nesting level increased to 2
      213 |                                                        ? 0
          |                                                        ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:215:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      215 |             if( seg_edge_inter.first == geode::POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:216:17: note: +1
      216 |                 || seg_edge_inter.first == geode::POSITION::parallel )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:220:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      220 |             if( ( seg_edge_inter.first == geode::POSITION::vertex0
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:222:17: note: +1
      222 |                 && ( seg_edge_inter.second == geode::POSITION::vertex0
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:221:21: note: +1
      221 |                     || seg_edge_inter.first == geode::POSITION::vertex1 )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:223:22: note: +1
      223 |                      || seg_edge_inter.second == geode::POSITION::vertex1 ) )
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:229:47: note: +3, including nesting penalty of 2, nesting level increased to 3
      229 |                                               ? edge_v0
          |                                               ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:239:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      239 |         if( geode::point_triangle_position(
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:242:13: note: +1
      242 |             && geode::point_triangle_position(
          |             ^
  • src/geode/geometry/intersection_detection.cpp:251:39: warning: [readability-identifier-naming]

    invalid case style for function 'segment_segment_intersection_detection3D'

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

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

      320 |     SegmentSegmentIntersection colinear_segment_segment_intersection_detection(
          |                                ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:336:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      336 |         if( s0_p0_position == POSITION::inside
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:339:13: note: +1
      339 |             || s1_p1_position == POSITION::inside )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:343:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      343 |         if( s0_p0_position == POSITION::vertex0 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:345:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      345 |             if( s0_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:346:17: note: +1
      346 |                 || s0_p1_position == POSITION::vertex0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:353:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      353 |         if( s0_p0_position == POSITION::vertex1 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:355:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      355 |             if( s0_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:356:17: note: +1
      356 |                 || s0_p1_position == POSITION::vertex1 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:363:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      363 |         if( s1_p0_position == POSITION::vertex0 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:365:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      365 |             if( s1_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:366:17: note: +1
      366 |                 || s1_p1_position == POSITION::vertex0 )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:373:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      373 |         if( s1_p0_position == POSITION::vertex1 )
          |         ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:375:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      375 |             if( s1_p1_position == POSITION::outside
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/intersection_detection.cpp:376:17: note: +1
      376 |                 || s1_p1_position == POSITION::vertex1 )
          |                 ^
  • src/geode/geometry/radial_sort.cpp:58:14: warning: [readability-function-cognitive-complexity]

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

       58 |         void recursive_sort( absl::FixedArray< geode::index_t >& result,
          |              ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:63:13: note: +1, including nesting penalty of 0, nesting level increased to 1
       63 |             if( size < 2 )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:71:13: note: +1, including nesting penalty of 0, nesting level increased to 1
       71 |             for( const auto i : geode::Range{ size - 1 } )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:78:17: note: +2, including nesting penalty of 1, nesting level increased to 2
       78 |                 if( side == geode::SIDE::positive )
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:82:22: note: +1, nesting level increased to 2
       82 |                 else if( side == geode::SIDE::negative )
          |                      ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:86:17: note: +1, nesting level increased to 2
       86 |                 else
          |                 ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:100:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      100 |                     if( position == geode::POSITION::inside )
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:104:21: note: +1, nesting level increased to 3
      104 |                     else
          |                     ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:110:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      110 |             for( const auto id : same )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:120:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      120 |             if( left_middle_id != begin )
          |             ^
    /__w/OpenGeode/OpenGeode/src/geode/geometry/radial_sort.cpp:125:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      125 |             if( right_middle_id != end )
          |             ^
  • src/geode/geometry/radial_sort.cpp:73:28: warning: [readability-identifier-length]

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

       73 |                 const auto id = begin + i + 1;
          |                            ^
  • src/geode/geometry/radial_sort.cpp:110:29: warning: [readability-identifier-length]

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

      110 |             for( const auto id : same )
          |                             ^
  • src/geode/geometry/radial_sort.cpp:118:50: warning: [cppcoreguidelines-pro-bounds-pointer-arithmetic]

    do not use pointer arithmetic

      118 |             absl::c_copy( sorted, result.begin() + begin );
          |                                                  ^
  • tests/geometry/test-intersection-detection.cpp:37:6: warning: [misc-use-internal-linkage]

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

       37 | void test_segment_segment_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:39:26: warning: [readability-identifier-length]

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

       39 |     const geode::Point2D a{ { 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:40:26: warning: [readability-identifier-length]

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

       40 |     const geode::Point2D b{ { 1.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:41:26: warning: [readability-identifier-length]

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

       41 |     const geode::Point2D c{ { 2.0, 1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:58:5: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

       58 |     geode::SegmentSegmentIntersection result, answer;
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/geometry/test-intersection-detection.cpp:161:6: warning: [misc-use-internal-linkage]

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

      161 | void test_segment_segment_intersection_detection_3d()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:163:26: warning: [readability-identifier-length]

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

      163 |     const geode::Point3D a{ { 0, 0, 0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:164:26: warning: [readability-identifier-length]

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

      164 |     const geode::Point3D b{ { 2, 2, 0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:167:26: warning: [readability-identifier-length]

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

      167 |     const geode::Point3D c{ { 1, 1, -0.1 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:189:26: warning: [readability-identifier-length]

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

      189 |     const geode::Point3D g{ { 3, 3, 0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:200:6: warning: [misc-use-internal-linkage]

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

      200 | void test_segment_degenerated_triangle_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:202:26: warning: [readability-identifier-length]

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

      202 |     const geode::Point3D a{ { 0, 0, 0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:203:26: warning: [readability-identifier-length]

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

      203 |     const geode::Point3D b{ { 2, 2, 0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:204:26: warning: [readability-identifier-length]

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

      204 |     const geode::Point3D c{ { 1, 1, 1e-8 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:239:6: warning: [misc-use-internal-linkage]

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

      239 | void test_segment_line_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:241:26: warning: [readability-identifier-length]

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

      241 |     const geode::Point2D a{ { 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:242:26: warning: [readability-identifier-length]

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

      242 |     const geode::Point2D b{ { 1.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:243:26: warning: [readability-identifier-length]

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

      243 |     const geode::Point2D c{ { 2.0, 1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:258:21: warning: [cppcoreguidelines-init-variables]

    variable 'result' is not initialized

      258 |     geode::POSITION result;
          |                     ^
  • tests/geometry/test-intersection-detection.cpp:305:6: warning: [misc-use-internal-linkage]

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

      305 | void test_segment_triangle_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:307:26: warning: [readability-identifier-length]

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

      307 |     const geode::Point3D a{ { 0.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:308:26: warning: [readability-identifier-length]

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

      308 |     const geode::Point3D b{ { 1.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:309:26: warning: [readability-identifier-length]

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

      309 |     const geode::Point3D c{ { 1.0, 1.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:313:26: warning: [readability-identifier-length]

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

      313 |     const geode::Point3D g{ { 2.0, 2.0, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:314:26: warning: [readability-identifier-length]

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

      314 |     const geode::Point3D h{ { -1.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:318:26: warning: [readability-identifier-length]

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

      318 |     const geode::Point3D l{ { -10.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:319:26: warning: [readability-identifier-length]

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

      319 |     const geode::Point3D m{ { 0.5, 0.25, 1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:320:26: warning: [readability-identifier-length]

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

      320 |     const geode::Point3D n{ { 0.5, 0.25, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:321:26: warning: [readability-identifier-length]

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

      321 |     const geode::Point3D o{ { 0.75, 0.25, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:337:5: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      337 |     geode::SegmentTriangleIntersection result, answer;
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/geometry/test-intersection-detection.cpp:410:6: warning: [misc-use-internal-linkage]

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

      410 | void test_line_triangle_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:412:26: warning: [readability-identifier-length]

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

      412 |     const geode::Point3D a{ { 0.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:413:26: warning: [readability-identifier-length]

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

      413 |     const geode::Point3D b{ { 1.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:414:26: warning: [readability-identifier-length]

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

      414 |     const geode::Point3D c{ { 1.0, 1.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:418:26: warning: [readability-identifier-length]

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

      418 |     const geode::Point3D g{ { 2.0, 2.0, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:419:26: warning: [readability-identifier-length]

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

      419 |     const geode::Point3D h{ { -1.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:423:26: warning: [readability-identifier-length]

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

      423 |     const geode::Point3D l{ { -10.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:424:26: warning: [readability-identifier-length]

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

      424 |     const geode::Point3D m{ { 0.5, 0.25, 1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:425:26: warning: [readability-identifier-length]

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

      425 |     const geode::Point3D n{ { 0.5, 0.25, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:426:26: warning: [readability-identifier-length]

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

      426 |     const geode::Point3D o{ { 0.75, 0.25, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:442:5: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      442 |     geode::POSITION result, answer;
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/geometry/test-intersection-detection.cpp:442:21: warning: [cppcoreguidelines-init-variables]

    variable 'result' is not initialized

      442 |     geode::POSITION result, answer;
          |                     ^
  • tests/geometry/test-intersection-detection.cpp:442:29: warning: [cppcoreguidelines-init-variables]

    variable 'answer' is not initialized

      442 |     geode::POSITION result, answer;
          |                             ^
  • tests/geometry/test-intersection-detection.cpp:505:6: warning: [misc-use-internal-linkage]

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

      505 | void test_segment_plane_intersection_detection()
          |      ^
          | static 
  • tests/geometry/test-intersection-detection.cpp:507:26: warning: [readability-identifier-length]

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

      507 |     const geode::Point3D a{ { 0.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:508:26: warning: [readability-identifier-length]

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

      508 |     const geode::Point3D b{ { 1.0, 0.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:509:26: warning: [readability-identifier-length]

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

      509 |     const geode::Point3D c{ { 1.0, 1.0, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:513:26: warning: [readability-identifier-length]

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

      513 |     const geode::Point3D g{ { 2.0, 2.0, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:514:26: warning: [readability-identifier-length]

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

      514 |     const geode::Point3D h{ { -1.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:518:26: warning: [readability-identifier-length]

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

      518 |     const geode::Point3D l{ { -10.0, -1.0, -1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:519:26: warning: [readability-identifier-length]

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

      519 |     const geode::Point3D m{ { 0.5, 0.25, 1.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:520:26: warning: [readability-identifier-length]

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

      520 |     const geode::Point3D n{ { 0.5, 0.25, 3.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:521:26: warning: [readability-identifier-length]

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

      521 |     const geode::Point3D o{ { 0.75, 0.25, 0.0 } };
          |                          ^
  • tests/geometry/test-intersection-detection.cpp:537:5: warning: [readability-isolate-declaration]

    multiple declarations in a single statement reduces readability

      537 |     geode::POSITION result, answer;
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/geometry/test-intersection-detection.cpp:537:21: warning: [cppcoreguidelines-init-variables]

    variable 'result' is not initialized

      537 |     geode::POSITION result, answer;
          |                     ^
  • tests/geometry/test-intersection-detection.cpp:537:29: warning: [cppcoreguidelines-init-variables]

    variable 'answer' is not initialized

      537 |     geode::POSITION result, answer;
          |                             ^
  • tests/geometry/test-intersection-detection.cpp:600:6: warning: [misc-use-internal-linkage]

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

      600 | void test()
          |      ^
          | static 
  • tests/geometry/test-radial-sort.cpp:33:6: warning: [misc-use-internal-linkage]

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

       33 | void test_1()
          |      ^
          | static 
  • tests/geometry/test-radial-sort.cpp:35:20: warning: [readability-identifier-length]

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

       35 |     geode::Point3D s0{ { 0, 1, 0 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:36:20: warning: [readability-identifier-length]

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

       36 |     geode::Point3D s1{ { 0, 0, 0 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:37:20: warning: [readability-identifier-length]

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

       37 |     geode::Point3D a{ { 1, 0, 0 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:38:20: warning: [readability-identifier-length]

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

       38 |     geode::Point3D b{ { 1, 1, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:39:20: warning: [readability-identifier-length]

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

       39 |     geode::Point3D c{ { 0, 0, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:43:20: warning: [readability-identifier-length]

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

       43 |     geode::Point3D g{ { 0, 0, -1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:44:20: warning: [readability-identifier-length]

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

       44 |     geode::Point3D h{ { 1, 1, -1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:53:6: warning: [misc-use-internal-linkage]

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

       53 | void test_2()
          |      ^
          | static 
  • tests/geometry/test-radial-sort.cpp:55:20: warning: [readability-identifier-length]

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

       55 |     geode::Point3D s0{ { 0, 0, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:56:20: warning: [readability-identifier-length]

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

       56 |     geode::Point3D s1{ { 0, 1, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:57:20: warning: [readability-identifier-length]

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

       57 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:57:28: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       57 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                            ^
  • tests/geometry/test-radial-sort.cpp:57:33: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       57 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                                 ^
  • tests/geometry/test-radial-sort.cpp:58:20: warning: [readability-identifier-length]

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

       58 |     geode::Point3D b{ { 0, 0, 0.5 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:58:31: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       58 |     geode::Point3D b{ { 0, 0, 0.5 } };
          |                               ^
  • tests/geometry/test-radial-sort.cpp:59:20: warning: [readability-identifier-length]

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

       59 |     geode::Point3D c{ { 1, 1, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:67:6: warning: [misc-use-internal-linkage]

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

       67 | void test_degenerated_segment()
          |      ^
          | static 
  • tests/geometry/test-radial-sort.cpp:69:20: warning: [readability-identifier-length]

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

       69 |     geode::Point3D s0{ { 0, 0, 1 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:70:20: warning: [readability-identifier-length]

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

       70 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:70:28: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       70 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                            ^
  • tests/geometry/test-radial-sort.cpp:70:33: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       70 |     geode::Point3D a{ { 0, 0.5, 1.5 } };
          |                                 ^
  • tests/geometry/test-radial-sort.cpp:71:20: warning: [readability-identifier-length]

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

       71 |     geode::Point3D b{ { 0, 0, 0.5 } };
          |                    ^
  • tests/geometry/test-radial-sort.cpp:71:31: warning: [cppcoreguidelines-avoid-magic-numbers]

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

       71 |     geode::Point3D b{ { 0, 0, 0.5 } };
          |                               ^
  • tests/geometry/test-radial-sort.cpp:79:6: warning: [misc-use-internal-linkage]

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

       79 | void test()
          |      ^
          | static 

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.

3 participants