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

Mesh3D minimum distance return points #1335

Open
1 of 2 tasks
MackJoly opened this issue Mar 21, 2024 · 0 comments
Open
1 of 2 tasks

Mesh3D minimum distance return points #1335

MackJoly opened this issue Mar 21, 2024 · 0 comments

Comments

@MackJoly
Copy link
Contributor

MackJoly commented Mar 21, 2024

  • I'm submitting a ...

    • bug report ?
    • feature request
  • What is the current behavior?
    When I choose "return_points" = True in display.Mesh3D.minimum_distance, I have all points used and not both close one that gives me the minimum distance, is it normal ?

  • What is the expected behavior?
    I expected to have only the two close points

  • What is the motivation / use case for changing the behavior?
    I don't know how to manipulate all the points given without all distances

  • Possible fixes
    Return only two close points

exemple: after min_distance:

id_min_self_to_other_distances = list(self_to_other_distances).index(self_to_other_distances.min())
id_min_other_to_self_distances = list(other_to_self_distances).index(other_to_self_distances.min())

and instead of closest_points_xxx

closest_points_self = volmdlr.Point3D(*self.vertices[id_min_self_to_other_distances])
closest_points_other = volmdlr.Point3D(*other_mesh.vertices[id_min_other_to_self_distances])

It is a proposal, perhaps you know something better or it doesn't fit with the method behavior

  • Please tell us about your environment:

    • branch: master
    • commit: latest
    • python version: 3.9.13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant