From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-25-2022 08:00 AM
Hello,
I´m having a problem using a PickPoint in my 3D Picture. The thing is when I load STL, everything works (displayes point coordinates) but when a point cloud is loaded, nothing happens. Unfortunately I can´t give my code away so at least I will put here some screenshots.
Thank you for your suggestions.
01-25-2022 09:28 AM
I'd say that a point is infinitely small, so you simply won't be able to click a point.
You probably have to do the hit detection yourself. And yes, that's probably hard.
You'll find out that you can't hit detect a line and a point, you'd probably have to find the point closest to the line, and test if the distance is acceptable.
Another option is to make a mesh from the points, but that's a huge topic on it's own.
01-25-2022 09:41 AM
Thank you for your ideas.
I have tried to increase the point size by a large amout but it did not help either. So my guess is that LabVIEW does not count those points as the object (like surface of a STL object).
Unfortunately I don´t have neither time or skill to do the nearest point detection my self, since my deadline for this project is getting tighter every day 😀
Creating an invissible mesh from the cloud and picking a point from there is something I thinked about, but the output I need is the precise point I clicked on (for further cloud alignment by ICP algorythm).
01-25-2022 10:21 AM
@Spin69 wrote:
Thank you for your ideas.
I have tried to increase the point size by a large amout but it did not help either. So my guess is that LabVIEW does not count those points as the object (like surface of a STL object).
Not LabVIEW, but OpenGL\Mesa3D.
I doubt LabVIEW does much to do the hit detect.
The point size seems to be just rendering, and I would have put my money on that.
@Spin69 wrote:
Creating an invissible mesh from the cloud and picking a point from there is something I thinked about, but the output I need is the precise point I clicked on (for further cloud alignment by ICP algorythm).
The point (pun intended) is that you can't click exactly on a point.
The problem is also ambiguous. If you would do a manual hit detect, you get a conflict. It will return distances to all the points, and as you click through the object, are you looking for the point closest to the line, or closest to the camera? I don't think there's an easy answer.
Getting the distance from the line to the point doesn't seem too hard:
1) Get a 3D vector going through the camera and the click on the view plane
2) For all points, get the Distance from a point to a line - Wikipedia (I'd use "Line defined by two points)
3) Use Array Min & Max to get the smallest distance and the index of the point.
I don't know by heart how to do 1), but it can't be that hard.