Skip to content

Conversation

@alxbilger
Copy link
Contributor

@alxbilger alxbilger commented Feb 9, 2026

This Pull Request extends the functionality of the MeshTopology and related classes by adding support for two new element types: Prism and Pyramid. It also improves the implementation of point counting and modifies the test suite to verify the functionality of these additions.

Main changes:

  • Enhancements in MeshTopology:
    • Added support for Prism and Pyramid types in element management functions.
    • Refactored the point counting logic for better readability and maintainability by utilizing a reusable helper method.
    • Updated element addition methods to correctly account for Prism and Pyramid.
  • Updates to BaseMeshTopology:
    • Declared and stubbed support for addPrism and addPyramid methods, which indicate these operations are not supported in the base implementation.
  • Changes in the header files:
    • Updated method declarations with the new Prism and Pyramid element types.
  • Test suite modifications:
    • Introduced tests for addPoint, addEdge, addTriangle, addQuad, addTetrahedron, addHexahedron, addPrism, and addPyramid methods.
  • Refactored the testEmptyContainer method to utilize a reusable MeshTopology instance (m_topo).

[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).

Centralize point counting into a reusable `countPoints` method, simplifying element addition functions and improving maintainability.
Introduce `doSetUp` for common initialization, simplifying and improving test code readability.
Add tests for adding point, edge, triangle, quad, tetrahedron, hexahedron, prism, and pyramid elements to verify correct functionality and point counting.
@alxbilger alxbilger added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request pr: test PR adding test(s) in SOFA 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 pr: test PR adding test(s) in SOFA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant