question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ClosestPoint() implementation for meshes

See original GitHub issue

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

<div type='discussions-op-text'>

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</div>

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! 😃

Issue Analytics

  • State:open
  • Created 4 months ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

2reactions
iltabecommented, Jul 5, 2023

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!

1reaction
iltabecommented, Jul 26, 2023

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get the closest point on a mesh surface from a free point in ...
Hi all, given a mesh and a free point in space, is there a way to detect the closest point on the mesh...
Read more >
Scripting API: Collider.ClosestPoint
Vector3 The point on the collider that is closest to the specified location. Description. Returns a point on the collider that is closest...
Read more >
Closest point on mesh / collider
Hi everyone! I'm stumbling across a small problem, here's hoping someone can help. :D Basically what I need is the nearest point to...
Read more >
How do I get the closest point on mesh of ...
I got ~0.25sec elapsed time for 256*30 query points. I attach my implementation below. Note that mesh is not the class of pytorch3d....
Read more >
Alternative method for Mesh.ClosestPoint() on c#?? – ...
I've been coding on c# a few components to modify meshes. I've found myself using the Mesh.ClosestPoint() method ( sometimes to get a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found