G-Shark icon indicating copy to clipboard operation
G-Shark copied to clipboard

ClosestPoint() implementation for meshes

Open iltabe opened this issue 1 year ago • 6 comments

Discussed in https://github.com/GSharker/G-Shark/discussions/415

Originally posted by iltabe May 30, 2023 Hi guys!

I know some of you for different reasons! Ciao!

For a client I'm building an algorithm that requires some geometrical operations. I've looked into G-Shark and started to use it. It looks promising and does almost everything I need (basic vector, point, plane stuff). Thanks guys for having give birth to this nice project!

The only thing I miss is a mesh.ClosestPoint(Point3 pt) method... Is it in the todo list by any luck? Thanks! Gianluca

It would be nice to implement some functionality for meshes, especially myMesh.ClosestPoint(Point3 test_point). The behaviour I expect is to get back from the function the real closest point:

  1. on a mesh vertex, if the mesh vertex is the closest point to the test point
  2. on a mesh face boundary (edge) if that is the closest point to the test point
  3. a point inside a mesh face if the length of the line perpendicular to the face (and passing per test_point) is shorter to any other line connecting test_point to the mesh.

Long story short: the closest point! :)

iltabe avatar Jun 01 '23 12:06 iltabe

Hi there!

We found a bit of internal resources to work on this, so we started a first implementation. We will open a PR in the next few days/weeks. Thanks!

iltabe avatar Jul 05 '23 09:07 iltabe

Excellent! Looking forward to it. Thank you for taking the time to contribute.

On Wed, Jul 5, 2023, 11:07 AM iltabe @.***> wrote:

Hi there!

We found a bit of internal resources to work on this, so we started a first implementation. We will open a PR in the next few days/weeks. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/GSharker/G-Shark/issues/416#issuecomment-1621341085, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPXUISFSLKSHANMG5F2ZE3XOUVENANCNFSM6AAAAAAYW3ZRVI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

d3ssy avatar Jul 05 '23 09:07 d3ssy

Ciao @d3ssy, The PR regarding mesh closest point is out. Who is the best person to be tagged as reviewer? Thanks!

iltabe avatar Jul 26 '23 08:07 iltabe

I'll review later today, cheers!

d3ssy avatar Jul 26 '23 08:07 d3ssy

Cool, thank you!

Il giorno mer 26 lug 2023 alle ore 10:47 Guido Maciocci < @.***> ha scritto:

I'll review later today, cheers!

— Reply to this email directly, view it on GitHub https://github.com/GSharker/G-Shark/issues/416#issuecomment-1651252021, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPLZ2HLAE3JLULGTLIHE73XSDKQVANCNFSM6AAAAAAYW3ZRVI . You are receiving this because you authored the thread.Message ID: @.***>

iltabe avatar Jul 26 '23 09:07 iltabe

@iltabe Review done! Apologies for the delay. Please reach out if you need any help or further info!

d3ssy avatar Aug 07 '23 13:08 d3ssy