Skip to content

Conversation

@alxbilger
Copy link
Contributor

@alxbilger alxbilger commented Feb 9, 2026

The Pull Request introduces enhancements and refactoring in the Tetra2TriangleTopologicalMapping and TopologicalMapping classes to improve topology modifier handling. The changes replace the usage of direct pointers with a SingleLink, improve error logging, refactor validation checks for input/output topology types, and update how topological operations are handled dynamically.

Main Changes

  • Introduction of SingleLink:
    • A new SingleLink named l_topologyModifier is added to replace m_outTopoModifier, improving link-handling consistency.
  • Error Handling Improvements:
    • Refactoring of initialization and error messaging to ensure clearer runtime feedback regarding missing components (TriangleSetTopologyModifier).
  • Separation of Validation Logic:
    • New functions introduced (checkMappingInputType, checkMappingOutputType, compareInputTopologyType, compareOutputTopologyType) break down checkTopologyInputTypes for better reusability and readability in TopologicalMapping.cpp.
  • Code Updates in Tetra2TriangleTopologicalMapping:
    • Replacing direct calls to m_outTopoModifier with l_topologyModifier for operations such as adding/removing triangles, edges, or points.
    • Additional checks and graceful handling when l_topologyModifier is not set.

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@alxbilger alxbilger added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant