Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Topology.Container] Add new method computeSegmentTriangleIntersectionInPlane in TriangleSetGeometryAlgorithm #5188

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

epernod
Copy link
Contributor

@epernod epernod commented Jan 6, 2025

This method compute the intersection between a Triangle from the current topology and a Segment [AB] which will be projected in Triangle Frame. Using Segment-Segment intersection from geometry::Edge::intersectionWithEdge

Return true if there is an intersection otherwise false.

Will fill input variables sofa::type::vector<EdgeID>& intersectedEdges and sofa::type::vector<Real>& baryCoefs with the list of intersected edges (Id in global topology, not relative to the triangle) and the barycoef of the intersection relative to the first vertex of the edge. I.e coordinate of the intersection is: Edge[0] * barycoef + Edge[1] * (1-barycoef )

This method will replace computeSegmentTriangleIntersection when all the work regarding new incision in triangle using TriangleSubvider is finished.


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

@epernod epernod added pr: status to review To notify reviewers to review this pull-request pr: new feature Implement a new feature labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new feature Implement a new feature 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