Skip to content

Conversation

@th-skam
Copy link
Collaborator

@th-skam th-skam commented Sep 9, 2025

This PR adds an Operation that enables the InsertionAlgorithm to use the GenericOperation dispatcher and perform a point-in-triangle or point-in-tetra geometric predicate before adding a proximity to the needle-tissue coupling system.

The new classes are:

  1. Operation::ContainsInElement which uses the TriangleToolbox and TetrahedronToolbox to perform the check.
  2. Operation::ContainsInProximity which takes proximities as input and delegates to the one above.

They can now be used by InsertionAlgorithm as in:
auto containsPointInVol = Operations::ContainsPointInProximity::Operation::get(l_volGeom->getTypeInfo());
if(containsPointInVol(tipProx->getPosition(), volProx))

Close #81

    * Checks whether a point is inside an element
    * Works with an element or a proximity type as input
@th-skam th-skam added pr: enhancement pr: status to review To notify reviewers to review this pull-request labels Sep 9, 2025
@epernod epernod 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 Sep 12, 2025
@epernod epernod merged commit aacf5bd into master Sep 12, 2025
4 checks passed
@epernod epernod deleted the operations-containsPoint branch September 12, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: 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.

[algorithm] Refactor InsertionAlgorithm to use an Operation for geometric predicates

3 participants