gradientspace / geometry3Sharp

C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license.
http://www.gradientspace.com
Boost Software License 1.0
1.73k stars 390 forks source link

FindNearestTriangle method does not return right triangle #181

Open iammanik opened 2 years ago

iammanik commented 2 years ago

Hi Team,

Thanks for the library functions. I'm a newbie for this library.

Issue: I'm using 3d meshes for my project. My objective is to find the nearest triangle based on the user reference point input. The FindNearestTriangle method returns the triangle from the other side (3D-geom) of the reference point and not on the same side.

How do I get the triangle in the same face side of the selected reference point?

iammanik commented 2 years ago

image

As shown in the above image, the reference point is on the top face. The nearest triangle which the method returns is on the bottom side. I was expecting that the method should return the nearest triangle on the top face.