Hello,
Is it possible to select/find a point in a point cloud? I can open the set via .csv file OK. So far in my experiments only selection of the whole object works despite I use zoom on and select a single point with a rectangle.
Thank you
Picking a point in a cloud
-
- Posts: 65
- Joined: Tue Jun 18, 2024 6:12 am
Re: Picking a point in a cloud
Hi Aaron
We do not have it currently in the core, but it is easy to implement in an application:
Determine the selection rectangle on the screen in pixels, say from mouse down and mouse up events. Loop by all points in the cloud and take its projection to the screen using IView_DG.ProjectToScreen(). If it is inside the rectangle, the 3D point can be listed as selected.
Regards
We do not have it currently in the core, but it is easy to implement in an application:
Determine the selection rectangle on the screen in pixels, say from mouse down and mouse up events. Loop by all points in the cloud and take its projection to the screen using IView_DG.ProjectToScreen(). If it is inside the rectangle, the 3D point can be listed as selected.
Regards
-
- Posts: 65
- Joined: Tue Jun 18, 2024 6:12 am
Re: Picking a point in a cloud
Forgot to mention:
The point should be global. Ones stored in the cloud have coordinates relative to the local frame of the entity. So, you need to do:
The point should be global. Ones stored in the cloud have coordinates relative to the local frame of the entity. So, you need to do:
Code: Select all
IFrame_DG frame = iEntityTheCloud.GetLocation();
PointDg ptGlobal = frame.ToGlobal(pointFromTheGeometry);
PairIntDg pairPixels = iView.ProjectToScreen(ptGlobal);
//...