NCollection UBTree

Any one uses those classes can give a hint about them
Thanks for all your contribution

Bearloga's picture

please, make your request more specific.

Hesham Nasif's picture

Sorry, i mean the classes of NCollection. Specifically NCollection_UBTree

Bearloga's picture

Well, what kind of hint would you like to get? Start reading comments inside the class header file.

Hugues Delorme's picture

Yes reading the headers file is a good start.
I successfully used those tools to get the minimal distance between a point and a triangulation (Poly_Triangulation). Basically you have to redefine NCollection_UBTree<>::Selector and its Reject() and Accept() member functions. In the common case you will likely use Bnd_Box as the the bounding box class along with your specific data (say of class MyObject).

Then you will have to fill, say a NCollection_UBTree instance. Use a NCollection_UBTreeFiller for that purpose and call successively filler.Add() and finalize with filler.Fill().

To perform the search instanciate a selector (the one you redefined) and call myUbTree.Select(mySelector).

Hesham Nasif's picture

Dear Hugues
Thanks for that. I will read the header files to get more familiar with those functions and then will try it. The idea is i have a complex shape and i would like to partioning it into smaller and simpler shapes. I need mainly to remove concavity between the faces by adding (cutting planes).
Thanks for any idea or part of code to help