Skip to content

Fix B3 (Vec reverse iterator return types) and B1 (ABF lambda update index)#29

Merged
csparker247 merged 2 commits intodevelopfrom
fix/B1-B3-vec-abf-bugs
Mar 14, 2026
Merged

Fix B3 (Vec reverse iterator return types) and B1 (ABF lambda update index)#29
csparker247 merged 2 commits intodevelopfrom
fix/B1-B3-vec-abf-bugs

Conversation

@csparker247
Copy link
Member

Summary

  • B3 (include/OpenABF/Vec.hpp): rbegin/rend/crbegin/crend declared to return iterator/const_iterator instead of reverse_iterator/const_reverse_iterator, preventing correct reverse iteration and causing compilation errors when reverse iterators are used.
  • B1 (include/OpenABF/ABF.hpp): Interior-vertex lambda update loop used idx + intIdx where both variables incremented each iteration, producing wrong delta offsets for meshes with 2+ interior vertices. Fixed by capturing a fixed base = edgeCnt + faceCnt before the loop, matching the correct pattern already used in ABFPlusPlus.

TDD Tests (T1–T4)

Added prior to the fixes as regression coverage:

  • T1: ConstructGrid fixture + multi-interior-vertex parameterization tests (ABF_MultiInterior, ABFPlusPlus_MultiInterior, ABF_NoInteriorVertices, ABF_MaxIters)
  • T2: FindEdgePath disconnected-mesh test
  • T3: OBJ and PLY round-trip IO tests with vertex position assertions
  • T4: Vec reverse iteration test (rbegin/rend/crbegin/crend)

Test plan

  • All 6 test suites pass (ctest 100%)
  • ABF_MultiInterior now passes on the 4×4 grid (was crashing before B1 fix)
  • Vec::ReverseIteration now compiles and passes (was compile error before B3 fix)
  • No regressions in existing tests

Closes #6, #8, #21, #22, #23, #24

csparker247 and others added 2 commits March 13, 2026 19:30
…index)

B3: rbegin/rend/crbegin/crend returned iterator/const_iterator instead of
reverse_iterator/const_reverse_iterator, preventing correct reverse iteration.

B1: The interior-vertex lambda update loop used idx+intIdx where both incremented
each iteration, producing wrong delta offsets for meshes with 2+ interior vertices.
Fixed by capturing a fixed base = edgeCnt+faceCnt before the loop.

Includes TDD tests (T1-T4) written prior to these fixes: multi-interior-vertex
grid parameterization tests, FindEdgePath disconnected-mesh test, OBJ/PLY
round-trip IO tests with vertex position assertions, and Vec reverse iteration
tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@csparker247 csparker247 merged commit bfa0f1b into develop Mar 14, 2026
7 checks passed
@csparker247 csparker247 deleted the fix/B1-B3-vec-abf-bugs branch March 14, 2026 00:04
csparker247 added a commit that referenced this pull request Mar 14, 2026
All six tracks were resolved via PR #29 (merged to develop):
B1, B3 fixed; T1-T4 tests written and passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment