
Sun, 08/10/2025 - 21:16
Hi all,
I've been using pythonOCC for about a year now. Currently, I am shooting rays (Gp_Lin) in directions around the face center of a face and want to compute the intersection point with the rest of the shape. However, I am noticing an incredibly long runtime if the shape has a lot of GeomAbs_Cylinders. I was wondering if someone could explain why this is the case and how I can optimize it. I'm using IntCurvesFace_ShapeIntersector and cannot seem to find specific implementations on whether or not this already efficiently looks for the relevant shapes to check intersections on (through BVH etc), I've also tried manually culling the faces whose bounding boxes are not intersected before performing the intersection itself, but it is still very slow.
I also tried compounding all rays and computing one intersection between the compounded rays and the shape and retrieving the vertices of intersection, but this seems to be even slower.
Any help is appreciated!