I am trying to use the following line
Bentley::Ustn::PointCloud::PointCloudDataQueryPtr query = Bentley::Ustn::PointCloud::IPointCloudDataQuery::CreateOrientedBoxQuery (eeh, OrientedBox);
The oriented box I am using is where it is supposed to be...(Notice the green and blue
lines.. Those are the X and Y vectors used for the oriented box... Z is a very large +- vector
... Origin is defined at the point where the green and blue vectors meet...)
The red points are the points that are being selected by the orientedbox that I am using..
pSP->UnselectAll(); if(showSelection){ pSP->SetSelectMode(PointCloudSelectPoints::Select); pSP->SetDensityMode(PointCloudSelectPoints::FullDensity); pSP->SetDrawColor(rgbSelection); pSP->ByOrientedBox(OrientedBox); }
Sometimes it will pick it out OK, mostly not...
Hi Maury,
By a very large Z vector do you mean something near the minimum and maximum values a double can take?
A better solution for the Z vector would be to take the Z range of the point cloud, which can be obtained using the method IPointCloudFileQuery::GetMetaData.
Here is another thread you might find useful : communities.bentley.com/.../231188.aspx.
Finally if you could provide a small dataset (.dgn with the green and blue vectors and the POD file) I would be glad to try to reproduce your problem on my computer.
Thanks,
Mathieu
Hi Mathieu,
Getting the Z range of the point cloud would not work in my case as it will not always be in the Z direction.. I am trying to work in any view direction.
Here is the DGN and POD file...
www.c3ddata.com/files/Test.zip
Thanks!
EDIT: I'm using a newer version that has a correction for this. Sorry, I didn't notice it.I downloaded your testcase and was able to select the points by snapping to the vectors.
First, you need to make sure that the X Y Z vectors are all perpendicular when you build your OrientedBox.
The tool that I used to test insures that.
Thanks for your dataset.
It appears that this is a known bug caused by the use of single instead of double precision floating points in the query pipeline (TR 332529).
Note that the TR is not currently fixed.
One possible workaround would be to translate your points and recreate your POD file so that their coordinates are small.
Mathieu,
Thanks for the info.. unfortunately that is not a viable solution/workaround
Is this also why when using a larger query box, the edges of the results are not bound to my query box?
I would expect it to work in the same way that the QuerySphere works, where the results returned are only within the sphere specified... I have attached an image below
Simon, how were you able to get yours to show up properly? Are you on version 8.11.09.357?
I edited my response, I was using a work-in-progress version that appears to have a fix for this.
Answer Verified By: Maury