Thu, 12/04/2008 - 22:33
Forums:
Hi,
I'm having problems with Performance of point projection on a face.
I'm getting the surface from the face, and using GeomAPI_ProjectPointOnSurf to project the point; getting the LowerDistanceParameters and getting the 2d Point from the surface (surface->Value(U,V)); finally I'm using BRepClass_FaceClassifier to verify if the point is in/on or out the face.
Someone does know a better way to do this sequence?
Thanks in Advance.
Fri, 12/05/2008 - 11:49
Hi Thiago,
One way to increase performance is to perform less real projections. If you project a point on the shape having many faces it is better initially to select the few nearest faces that are the best candidates for doing projection on them. For that you can iterate on all faces and compute location of the point relatively the bounding box, or you can use some algorithm that is based on binary search such as NCollection_UBTree.
Bearloga
Fri, 12/05/2008 - 15:09
Hi Berloga,
Thanks for your answer.
Actually I'm projecting 25500 points on just one face. I think it could be a performance problem with GeomAPI_ProjectPointOnCurve + BRepClass_FaceClassifier. I've tried to use all projection function and other ways to classifier the point, but I have no success.
Could you help me again?
Regards,
Fri, 12/05/2008 - 16:41
Try using the method ShapeAnalysis_Surface::NextValueOfUV. It allows to quickly find the solution of projection if you have a solution for a near point.
Fri, 12/05/2008 - 19:23
The points are independent one of them. It means there's 25500 calls to my projection function.
I think it won't help, will it?
And to classify? Is there another way to do it, instead of using BRepClass_FaceClassifier?
Regards,