Skip to content

Fix getHexagonRequiredNodeId3 for high ring values#587

Merged
chrxh merged 1 commit intofeatures/ConstructionSequencesfrom
copilot/fix-required-node-id3-calculation
Apr 8, 2026
Merged

Fix getHexagonRequiredNodeId3 for high ring values#587
chrxh merged 1 commit intofeatures/ConstructionSequencesfrom
copilot/fix-required-node-id3-calculation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

getHexagonRequiredNodeId3 produced wrong requiredNodeId3 values for large hexagons (high k), causing broken topology in rings beyond ~2.

Three formula/logic errors in even-k branches:

  • Side 2: 3k²-5k-1-((pos-1)/2)3k²-5k-pos
  • Side 3: Only handled pos == 2; now handles all even pos ≥ 2 with 3k²-6k+2-(pos-2)
  • Side 4: Removed incorrect k == 2 special case; fixed formula from 3k²-6k-pos3k²-7k+4-pos

Verified with generateHexagon_61cells_withSeparation (5-ring, 61-cell hexagon).

@chrxh chrxh marked this pull request as ready for review April 8, 2026 19:43
@chrxh chrxh merged commit 207501e into features/ConstructionSequences Apr 8, 2026
@chrxh chrxh deleted the copilot/fix-required-node-id3-calculation branch April 8, 2026 19:44
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.

2 participants