Skip to content

[Topology.Mapping] Support MeshTopology as output in Tetra2TriangleTopologicalMapping#5948

Merged
fredroy merged 7 commits intosofa-framework:masterfrom
alxbilger:tetra2tri
Mar 3, 2026
Merged

[Topology.Mapping] Support MeshTopology as output in Tetra2TriangleTopologicalMapping#5948
fredroy merged 7 commits intosofa-framework:masterfrom
alxbilger:tetra2tri

Conversation

@alxbilger
Copy link
Copy Markdown
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
@fredroy fredroy requested a review from epernod February 19, 2026 09:21
@bakpaul
Copy link
Copy Markdown
Contributor

bakpaul commented Feb 26, 2026

Did you have time to review this PR @epernod ?

Comment thread Sofa/framework/Core/src/sofa/core/topology/TopologicalMapping.h Outdated
@fredroy
Copy link
Copy Markdown
Contributor

fredroy commented Mar 2, 2026

[ci-build][with-all-tests]

@fredroy fredroy added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Mar 3, 2026
@fredroy fredroy merged commit a2dda5e into sofa-framework:master Mar 3, 2026
16 of 17 checks passed
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 ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants