Skip to content

fix(Intersections): robustness and performance of the intersections inspection - #201

Merged
BotellaA merged 15 commits into
nextfrom
fix/intersections-review
Oct 15, 2026
Merged

BotellaA merged 15 commits into
nextfrom
fix/intersections-review

Conversation

@BotellaA

Copy link
Copy Markdown
Member

Summary

Robustness and performance fixes for the model and mesh intersection inspections, from a review of OpenGeode-Inspector. There is one commit per fix, and each fix comes with a test in tests/inspection/test-model-intersections.cpp.

Robustness (wrong results)

  • Section shared edge: when two triangles shared two vertices, the second shared vertex was read in mesh1 using its mesh2 index. This gave false intersections between adjacent surfaces whose vertices are numbered differently.
  • Vertices without unique vertex: these all compared equal (NO_ID), so unrelated triangles were treated as sharing vertices.
  • Empty meshes: a single surface with no polygons, or line with no edges, disabled the whole inspection. Components are now iterated through the AABB trees, which also removes the mesh_tree_ids_.at() lookups.
  • 2D nested triangles: a triangle lying inside another one, or nested in its corner at a common vertex, was not reported.
  • Lines in a surface plane: a line crossing a triangle within the triangle's plane (parallel) was ignored.
  • Collinear line edges: overlapping or duplicated collinear edges were ignored. model_A1 has 1254 such pairs of duplicated line edges, so its expected count goes from 13494 to 14748 in test-brep and test-py-brep.py.
  • Common vertices with slightly different coordinates: the second triangle now uses mesh1 points for its common vertices. Before, the exact predicates saw a tiny crossing at the shared corner.

Performance (identical results on all benchmark models)

  • Each surface's mesh vertex → unique vertex mapping is precomputed once, instead of up to 12 unique_vertex() hash lookups per candidate pair.
  • 3D triangle pairs separated by a plane are rejected with 3 exact orientations, instead of up to 12.
  • Self intersections no longer traverse pairs of different surfaces.
  • Line/surface checks are culled by the components AABB trees and run in parallel. The test models have few embedded lines, so this shows no measurable gain here.
  • Redundant point positions are removed from the surface/curve test. A brute-force comparison on 2M random segment/triangle pairs gives identical results.
  • Quad fan triangles no longer allocate on the heap.

ModelMeshesIntersections<BRep> timings, inspect_intersections() plus inspect_surfaces_self_intersections(), best of 3:

model before after
fimiston (Geode-Conversion data, 185k intersections) 11.7 s 6.15 s
cva/brep_from_topo (Geode-Explicit data) 1.76 s 1.04 s
corbi_tet_mesh (Geode-Background data) 0.61 s 0.17 s
model_D 0.19 s 0.13 s

Not done

  • Degenerate (zero-area) triangles: they can produce spurious hits with their neighbours. Skipping them changes what gets reported, so it needs a decision.
  • Non-convex polygons: these are still split into a single fan from vertex 0.
  • Early exit for the boolean queries: model_has_intersecting_surfaces and similar are not used by validity.

Related

🤖 Generated with Claude Code

BotellaA and others added 13 commits October 14, 2026 17:43
When two Section triangles share two vertices, the second shared point was
read in mesh1 with its mesh2 index, giving a wrong point and false
intersections between adjacent surfaces numbered differently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mesh vertices not linked to a unique vertex all compared equal (NO_ID), so
unrelated triangles were seen as sharing vertices. Ignore NO_ID and fall back
to mesh vertex indices within the same surface.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…spection

When any surface had no polygon (or any line no edge), the whole model
intersection inspection returned without checking anything. Components are
now iterated through the AABB trees, which skip empty meshes, and the
mesh_tree_ids_ lookups are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With zero or one common vertex, 2D triangles were only tested for crossing
edges, so a triangle lying inside another one (or nested in its corner at the
common vertex) was not reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A line segment lying in a triangle plane and crossing it is reported as
'parallel' by the segment/triangle detection, which was ignored. It is now an
intersection unless the contact is reduced to triangle vertices. The edge0/1/2
tests on the segment position, which can never happen, are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collinear edges are reported as 'parallel' by the segment/segment detection
and were ignored, so overlapping or duplicated lines (and lines folding back on
themselves) were never reported. model_A1 has 1254 such pairs of duplicated
line edges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vertex shared by two surfaces (same unique vertex) can have slightly
different coordinates in each mesh. The exact predicates then saw a tiny
crossing at the common corner and reported a false intersection. The second
triangle now uses the first mesh points for its common vertices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding the common vertices of each candidate triangle pair made up to 12
model.unique_vertex() calls (uuid hash map lookup + attribute read). The
mesh vertex to unique vertex mapping of each surface is now computed once.

corbi_tet_mesh 0.61s -> 0.21s, cva/brep_from_topo 1.76s -> 1.33s,
fimiston 11.7s -> 8.2s (identical results).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before the segment/triangle tests (up to 12 exact orientations), check if the
non-common vertices of a triangle are strictly on one side of the other
triangle plane: the triangles can then only touch at their common vertex.

cva/brep_from_topo 1.33s -> 1.05s, fimiston 8.2s -> 6.5s (identical results).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
inspect_surfaces_self_intersections still traversed the AABB trees of every
pair of overlapping surfaces, only to reject every polygon pair in the action.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each surface was tested serially against every embedded line, without
checking their bounding boxes first, and nb_embedding_blocks was recomputed
for each surface. Overlapping (surface, line) pairs now come from the
components AABB trees and are processed in parallel, in the same order as
before. No change on the test models (few embedded lines); the cost was
quadratic in the number of surfaces and lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e test

The two point_triangle_position calls before the segment/triangle detection
are covered by it (inside second position, or parallel then end point
check). Brute-force check on 2M random integer segment/triangle pairs,
including degenerate ones: identical results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
polygon_fan_triangles stored a single triangle inline, so every quad (two fan
triangles) allocated for each candidate polygon pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BotellaA
BotellaA requested a review from panquez October 14, 2026 17:32
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

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

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

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

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

      168 |         ModelIntersectionBase( const Model& model ) : model_( model ) {}
          |         ^
          |         explicit 
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:184:9: warning: [readability-function-size]

    function 'ModelSurfacesIntersectionBase' exceeds recommended size/complexity thresholds

      184 |         ModelSurfacesIntersectionBase( const Model& model,
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:184:9: note: 5 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:202:13: warning: [bugprone-easily-swappable-parameters]

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

      202 |             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:202:28: note: the first parameter in the range is 'p1_id'
      202 |             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:202:50: note: the last parameter in the range is 'p2_id'
      202 |             geode::index_t p1_id, geode::index_t p2_id ) const
          |                                                  ^~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:243:13: warning: [readability-function-cognitive-complexity]

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

      243 |             triangles_common_vertices(
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:249:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      249 |             for( const auto v1_id : t1_vertices )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:252:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      252 |                 for( const auto v2_id : t2_vertices )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:254:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      254 |                     if( same_surface_ && v1_id == v2_id )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:254:39: note: +1
      254 |                     if( same_surface_ && v1_id == v2_id )
          |                                       ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:259:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      259 |                     if( v1_unique_vertex != geode::NO_ID
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:260:25: note: +1
      260 |                         && v1_unique_vertex == unique_vertices2_[v2_id] )
          |                         ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:244:17: warning: [bugprone-easily-swappable-parameters]

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

      244 |                 const geode::PolygonVertices& t1_vertices,
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      245 |                 const geode::PolygonVertices& t2_vertices ) const
          |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:244:47: note: the first parameter in the range is 't1_vertices'
      244 |                 const geode::PolygonVertices& t1_vertices,
          |                                               ^~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:245:47: note: the last parameter in the range is 't2_vertices'
      245 |                 const geode::PolygonVertices& t2_vertices ) const
          |                                               ^~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:338:9: warning: [readability-function-size]

    function 'AllModelSurfacesIntersection' exceeds recommended size/complexity thresholds

      338 |         AllModelSurfacesIntersection( const Model& model,
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:338:9: note: 5 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:371:9: warning: [readability-function-size]

    function 'AllModelSurfacesAutoIntersection' exceeds recommended size/complexity thresholds

      371 |         AllModelSurfacesAutoIntersection( const Model& model,
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:371:9: note: 5 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:422:24: warning: [readability-function-size]

    function 'non_common_vertex_inside' exceeds recommended size/complexity thresholds

      422 |     [[nodiscard]] bool non_common_vertex_inside(
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:422:24: note: 5 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:448:58: warning: [readability-function-cognitive-complexity]

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

      448 |         ModelSurfacesIntersectionBase< geode::Section >::triangles_intersect(
          |                                                          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:454:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      454 |         if( common_vertices.size() == 2 )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:462:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      462 |             if( geode::segment_segment_intersection_detection< 2 >(
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:466:17: note: +1
      466 |                 || geode::segment_segment_intersection_detection< 2 >(
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:479:20: note: +1
      479 |                    || geode::point_triangle_position( t2_third_pt, triangle1 )
          |                    ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:482:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      482 |         for( const auto t1_edge_v : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:486:44: note: +2, including nesting penalty of 1, nesting level increased to 2
      486 |                 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:490:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      490 |             for( const auto t2_edge_v : geode::LRange{ 3 } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:494:48: note: +3, including nesting penalty of 2, nesting level increased to 3
      494 |                     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:501:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      501 |                 if( edge_edge_inter.first == geode::POSITION::outside
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:502:21: note: +1
      502 |                     || edge_edge_inter.first == geode::POSITION::parallel )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:506:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      506 |                 if( common_vertices.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:514:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      514 |                 if( t1_edge_inter_pt_id == geode::NO_LID
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:515:21: note: +1
      515 |                     || t2_edge_inter_pt_id == geode::NO_LID )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:519:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      519 |                 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:520:21: note: +1
      520 |                     || edge2_vertices[t2_edge_inter_pt_id]
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:532:16: note: +1
      532 |                || non_common_vertex_inside( mesh2_, t2_vertices,
          |                ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:536:24: warning: [readability-function-cognitive-complexity]

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

      536 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:544:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      544 |         for( const auto v_id : geode::LRange{ 3 } )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:546:42: note: +2, including nesting penalty of 1, nesting level increased to 2
      546 |             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:550:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      550 |             if( intersection.first != geode::POSITION::outside )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:552:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      552 |                 if( common_vertices.size() != 1 )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:560:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      560 |                 if( edge_inter_pt_id == geode::NO_LID
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:561:21: note: +1
      561 |                     || t2_inter_pt_id == geode::NO_LID )
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:565:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      565 |                 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:567:21: note: +1
      567 |                     || t2_vertices[t2_inter_pt_id]
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:565:55: note: +3, including nesting penalty of 2, nesting level increased to 3
      565 |                 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:566:71: note: +3, including nesting penalty of 2, nesting level increased to 3
      566 |                         != common_vertices[0][t2_vertex_position == 0 ? 1 : 0]
          |                                                                       ^
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:536:24: warning: [readability-function-size]

    function 'triangle_intersects_other' exceeds recommended size/complexity thresholds

      536 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:536:24: note: 6 parameters (threshold 4)
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:584:9: warning: [cppcoreguidelines-pro-type-member-init]

    uninitialized record type: 'sides'

      584 |         std::array< geode::SIDE, 3 > sides;
          |         ^                                 
          |                                           {}
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:633: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')

      633 |                || triangle_intersects_other( triangle2, triangle1, t2_vertices,
          |                   ^                          ~~~~~~~~~  ~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:536:24: note: in the call to 'triangle_intersects_other', declared here
      536 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
      537 |         const geode::Triangle3D& triangle1,
          |                                  ~~~~~~~~~
      538 |         const geode::Triangle3D& triangle2,
          |                                  ~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:633: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')

      633 |                || triangle_intersects_other( triangle2, triangle1, t2_vertices,
          |                   ^                                                ~~~~~~~~~~~
      634 |                    t1_vertices, common_vertices, 0 );
          |                    ~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:536:24: note: in the call to 'triangle_intersects_other', declared here
      536 |     [[nodiscard]] bool triangle_intersects_other(
          |                        ^
      537 |         const geode::Triangle3D& triangle1,
      538 |         const geode::Triangle3D& triangle2,
      539 |         const geode::PolygonVertices& t1_vertices,
          |                                       ~~~~~~~~~~~
      540 |         const geode::PolygonVertices& t2_vertices,
          |                                       ~~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:666:9: warning: [modernize-use-nodiscard]

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

      666 |         bool lines_intersect( geode::index_t p1_id, geode::index_t p2_id ) const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:666:31: warning: [bugprone-easily-swappable-parameters]

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

      666 |         bool lines_intersect( 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:666:46: note: the first parameter in the range is 'p1_id'
      666 |         bool lines_intersect( 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:666:68: note: the last parameter in the range is 'p2_id'
      666 |         bool lines_intersect( geode::index_t p1_id, geode::index_t p2_id ) const
          |                                                                    ^~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:671:17: warning: [readability-suspicious-call-argument]

    1st argument 'segment1' (passed to 'segment0') looks like it might be swapped with the 2nd, 'segment2' (passed to 'segment1')

      671 |                 geode::segment_segment_intersection_detection(
          |                 ^
      672 |                     segment1, segment2 );
          |                     ~~~~~~~~  ~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/OpenGeode-19.0.1-rc.2-ubuntu/include/geode/geometry/intersection_detection.hpp:55:9: note: in the call to 'segment_segment_intersection_detection<2U>', declared here
       55 |         segment_segment_intersection_detection(
          |         ^
       56 |             const Segment< dimension >& segment0,
          |                                         ~~~~~~~~
       57 |             const Segment< dimension >& segment1 );
          |                                         ~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:741:9: warning: [google-explicit-constructor]

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

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

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

      873 |             intersecting_polygons() const
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:878:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      878 |             for( const auto tree_id : Indices{ surfaces_model_tree_.uuids_ } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:880:51: note: nesting level increased to 2
      880 |                 tasks.emplace_back( async::spawn( [this, tree_id] {
          |                                                   ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:894:21: note: +3, including nesting penalty of 2, nesting level increased to 3
      894 |                     for( const auto& [polygon1, polygon2] :
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:907:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      907 |             if constexpr( !std::is_same_v< Action,
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:913:17: note: +2, including nesting penalty of 1, nesting level increased to 2
      913 |                 for( const auto& components : surfaces_overlap )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:915:55: note: nesting level increased to 3
      915 |                     tasks.emplace_back( async::spawn( [this, &components] {
          |                                                       ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:935:25: note: +4, including nesting penalty of 3, nesting level increased to 4
      935 |                         for( const auto& [polygon1, polygon2] :
          |                         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/model_intersections.cpp:947:13: note: +1, including nesting penalty of 0, nesting level increased to 1
      947 |             for( auto& task : async::when_all( tasks ).get() )
          |             ^
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:73:9: warning: [bugprone-easily-swappable-parameters]

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

       73 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:73:24: note: the first parameter in the range is 'triangle_id'
       73 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |                        ^~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:73:52: note: the last parameter in the range is 'edge_id'
       73 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |                                                    ^~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:77:25: warning: [readability-identifier-length]

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

       77 |         for( const auto ev : geode::LRange{ 2 } )
          |                         ^
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:107:41: warning: [readability-function-cognitive-complexity]

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

      107 |     bool TriangleEdgeIntersection< 3 >::edge_intersects_triangle(
          |                                         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:114:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      114 |         if( result.first == geode::POSITION::outside
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:115:13: note: +1
      115 |             || result.second == geode::POSITION::outside )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:120:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      120 |         if( result.first == geode::POSITION::inside )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:125:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      125 |         if( result.second == geode::POSITION::inside
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:128:13: note: +1
      128 |             || result.second == geode::POSITION::edge2 )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:133:9: note: +1, including nesting penalty of 0, nesting level increased to 1
      133 |         if( result.first == geode::POSITION::parallel )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:135:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      135 |             for( const auto ev : geode::LRange{ 2 } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:139:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      139 |                 if( position != geode::POSITION::vertex0
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:141:21: note: +1
      141 |                     && position != geode::POSITION::vertex2 )
          |                     ^
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:108:9: warning: [bugprone-easily-swappable-parameters]

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

      108 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:108:24: note: the first parameter in the range is 'triangle_id'
      108 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |                        ^~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:108:52: note: the last parameter in the range is 'edge_id'
      108 |         geode::index_t triangle_id, geode::index_t edge_id ) const
          |                                                    ^~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:135:29: warning: [readability-identifier-length]

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

      135 |             for( const auto ev : geode::LRange{ 2 } )
          |                             ^
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:163:9: warning: [modernize-use-nodiscard]

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

      163 |         bool meshes_have_intersections() const
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:168:24: warning: [readability-simplify-boolean-expr]

    redundant boolean literal in conditional return statement

      166 |             if( intersections.empty() )
          |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |             return !static_cast<bool>(intersections.empty())
      167 |             {
          |             ~
      168 |                 return false;
          |                 ~~~~~~~^~~~~~
      169 |             }
          |             ~
      170 |             return true;
          |             ~~~~~~~~~~~
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:173:9: warning: [modernize-use-nodiscard]

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

      173 |         InspectionIssues< std::pair< index_t, index_t > >
          |         ^
          |         [[nodiscard]] 
  • src/geode/inspector/inspection/criterion/intersections/surface_curve_intersections.cpp:190:9: warning: [modernize-use-nodiscard]

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

      190 |         std::vector< std::pair< index_t, index_t > >
          |         ^
          |         [[nodiscard]] 
  • tests/inspection/test-brep.cpp:34:16: warning: [misc-use-internal-linkage]

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

       34 | geode::index_t corners_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:62:16: warning: [misc-use-internal-linkage]

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

       62 | geode::index_t lines_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:96:16: warning: [misc-use-internal-linkage]

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

       96 | geode::index_t surfaces_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:128:16: warning: [misc-use-internal-linkage]

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

      128 | geode::index_t blocks_topological_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:163:16: warning: [misc-use-internal-linkage]

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

      163 | geode::index_t launch_topological_validity_checks(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:173:16: warning: [misc-use-internal-linkage]

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

      173 | geode::index_t meshes_adjacencies_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:196:16: warning: [misc-use-internal-linkage]

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

      196 | geode::index_t meshes_degenerations_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:224:16: warning: [misc-use-internal-linkage]

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

      224 | geode::index_t meshes_intersections_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:225:56: warning: [performance-unnecessary-value-param]

    the const qualified parameter 'result' is copied for each invocation; consider making it a reference

      225 |     const geode::ElementsIntersectionsInspectionResult result, bool string )
          |                                                        ^
          |                                                       &
  • tests/inspection/test-brep.cpp:239:16: warning: [misc-use-internal-linkage]

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

      239 | geode::index_t meshes_manifolds_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:268:16: warning: [misc-use-internal-linkage]

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

      268 | geode::index_t meshes_colocations_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:285:16: warning: [misc-use-internal-linkage]

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

      285 | geode::index_t meshes_unique_vertices_validity(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:304:16: warning: [misc-use-internal-linkage]

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

      304 | geode::index_t launch_component_meshes_validity_checks(
          |                ^
          | static 
  • tests/inspection/test-brep.cpp:307:10: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'nb_issues' during its initialization is never read

      307 |     auto nb_issues =
          |          ^~~~~~~~~
      308 |         meshes_adjacencies_validity( result.meshes_adjacencies, string );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-brep.cpp:307:10: note: Value stored to 'nb_issues' during its initialization is never read
      307 |     auto nb_issues =
          |          ^~~~~~~~~
      308 |         meshes_adjacencies_validity( result.meshes_adjacencies, string );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/inspection/test-brep.cpp:322:6: warning: [misc-use-internal-linkage]

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

      322 | void check_model_a1( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:335:34: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      335 |         nb_topological_issues == 6182, "model_A1 has ", nb_topological_issues,
          |                                  ^
  • tests/inspection/test-brep.cpp:341:39: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      341 |         nb_component_meshes_issues == 14748, "model_A1 has ",
          |                                       ^
  • tests/inspection/test-brep.cpp:345:6: warning: [misc-use-internal-linkage]

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

      345 | void check_model_a1_valid( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:358:34: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      358 |         nb_topological_issues == 6182, "model_A1_valid has ",
          |                                  ^
  • tests/inspection/test-brep.cpp:364:39: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      364 |         nb_component_meshes_issues == 14748, "model_A1_valid has ",
          |                                       ^
  • tests/inspection/test-brep.cpp:368:6: warning: [misc-use-internal-linkage]

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

      368 | void check_model_mss( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:381:34: warning: [cppcoreguidelines-avoid-magic-numbers]

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

      381 |         nb_topological_issues == 65, "mss has ", nb_topological_issues,
          |                                  ^
  • tests/inspection/test-brep.cpp:391:6: warning: [misc-use-internal-linkage]

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

      391 | void check_model_D( bool string )
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:391:6: warning: [readability-identifier-naming]

    invalid case style for global function 'check_model_D'

      391 | void check_model_D( bool string )
          |      ^~~~~~~~~~~~~
          |      check_model_d
  • tests/inspection/test-brep.cpp:412:6: warning: [misc-use-internal-linkage]

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

      412 | void check_wrong_bsurfaces_model()
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:440:6: warning: [misc-use-internal-linkage]

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

      440 | void check_segmented_cube()
          |      ^
          | static 
  • tests/inspection/test-brep.cpp:450:16: warning: [clang-analyzer-deadcode.DeadStores]

    Value stored to 'nb_component_meshes_issues' during its initialization is never read

      450 |     const auto nb_component_meshes_issues =
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
      451 |         launch_component_meshes_validity_checks( result.meshes, false );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-brep.cpp:450:16: note: Value stored to 'nb_component_meshes_issues' during its initialization is never read
      450 |     const auto nb_component_meshes_issues =
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
      451 |         launch_component_meshes_validity_checks( result.meshes, false );
          |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tests/inspection/test-model-intersections.cpp:66:10: warning: [readability-function-cognitive-complexity]

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

       66 |     void fill_model( const Model& model,
          |          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:73:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       73 |         for( const auto& definition : surfaces )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:77:21: note: +2, including nesting penalty of 1, nesting level increased to 2
       77 |                     ? builder.add_surface( geode::OpenGeodePolygonalSurface<
          |                     ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:82:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       82 |             for( const auto& point : definition.points )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:86:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       86 |             for( const auto& polygon : definition.polygons )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:90:13: note: +2, including nesting penalty of 1, nesting level increased to 2
       90 |             for( const auto v : geode::Indices{ definition.unique_vertices } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:92:17: note: +3, including nesting penalty of 2, nesting level increased to 3
       92 |                 if( definition.unique_vertices[v] != geode::NO_ID )
          |                 ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:99:9: note: +1, including nesting penalty of 0, nesting level increased to 1
       99 |         for( const auto& definition : lines )
          |         ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:103:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      103 |             for( const auto& point : definition.points )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:107:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      107 |             for( const auto& edge : definition.edges )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:111:13: note: +2, including nesting penalty of 1, nesting level increased to 2
      111 |             for( const auto v : geode::Indices{ definition.unique_vertices } )
          |             ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:113:17: note: +3, including nesting penalty of 2, nesting level increased to 3
      113 |                 if( definition.unique_vertices[v] != geode::NO_ID )
          |                 ^
  • tests/inspection/test-model-intersections.cpp:66:10: warning: [readability-function-size]

    function 'fill_model' exceeds recommended size/complexity thresholds

       66 |     void fill_model( const Model& model,
          |          ^
    /__w/OpenGeode-Inspector/OpenGeode-Inspector/tests/inspection/test-model-intersections.cpp:66:10: note: 5 parameters (threshold 4)
  • tests/inspection/test-model-intersections.cpp:175:6: warning: [misc-use-internal-linkage]

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

      175 | void check_section_adjacent_surfaces_different_numbering()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:192:6: warning: [misc-use-internal-linkage]

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

      192 | void check_section_nested_triangles()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:226:6: warning: [misc-use-internal-linkage]

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

      226 | void check_brep_vertices_without_unique_vertex()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:259:6: warning: [misc-use-internal-linkage]

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

      259 | void check_brep_line_in_surface_plane()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:283:6: warning: [misc-use-internal-linkage]

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

      283 | void check_collinear_lines()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:325:6: warning: [misc-use-internal-linkage]

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

      325 | void check_brep_common_vertex_with_different_coordinates()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:345:6: warning: [misc-use-internal-linkage]

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

      345 | void check_brep_triangle_touching_plane()
          |      ^
          | static 
  • tests/inspection/test-model-intersections.cpp:374:6: warning: [misc-use-internal-linkage]

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

      374 | void check_brep_with_empty_meshes()
          |      ^
          | static 

Have any feedback or feature suggestions? Share it here.

check_section_nested_triangles();
check_brep_vertices_without_unique_vertex();
check_brep_with_empty_meshes();
check_brep_common_vertex_with_different_coordinates();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a global comment on the commit, do you have an inspector criterion searching if vertices with the same unique vertex are at the same location. If not this should be added

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it already exists: UniqueVerticesColocation reports unique_vertices_linked_to_different_points, the unique vertices whose component mesh vertices are not at the same location. It is part of the BRep and Section meshes inspectors. This test covers the case where the coordinates differ by less than that criterion's tolerance, so the vertices are valid for it, but the exact predicates still saw a tiny crossing.

BotellaA and others added 2 commits October 15, 2026 16:36
…ed check

Review follow-up: a straight line made of several collinear edges reports
no self intersection, and a comment explains why a single non common
vertex is tested for 2D nested triangles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BotellaA
BotellaA merged commit a21fdb5 into next Oct 15, 2026
23 checks passed
@BotellaA
BotellaA deleted the fix/intersections-review branch October 15, 2026 19:13
@BotellaA

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 6.12.4-rc.3 🎉

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