Hi, I want to check shell/line intersection for around 100 shells and up to 100000 (relatively short) lines. At the moment I do this the following way:
1. Pre-sort lines per shell with center of line cl, center of shell cs. If distance between cl and cs > max(distance cs to any of the shells vertices), then skip current line 2. Loop over all shells and all remaining lines and use IntCurvesFace_ShapeIntersector() Step 1 is reasonably fast, as i do it with scipy.spatial.KDTree. Step 2 is ok in terms of speed unless the shell is very long and thin, then it becomes unbearably slow. >From what I've read on the OpenCascade forums, there is an algorithm of unbalanced binary tree of bounding boxes which should be ideal for this case: NCollection_UBTree/NCollection_UBTreeFiller However, it is not present in my installation of OCE/pythonocc. >>> import OCC.NCollection works fine, but >>> dir(OCC.NCollection) does not contain anything UBTree. What did i miss? I use OCE 0.12 and pythonocc 0.6-rc1. Uwe _______________________________________________ Pythonocc-users mailing list [email protected] https://mail.gna.org/listinfo/pythonocc-users
