Hi Uwe, Are your edges segments? It seemed like they might be from the edgeScaling and edgeDirection lines. If so, there are closed-form methods you could use with numpy to calculate this very, very fast. (Just dig up an old parametric calculus book.) I can write a quick example for you if this is indeed the case.
If not, BrepExtrema_DistShapeShape looked like a good choice to me. (I'm not aware of alternatives.) Have you profiled your program to find where the time and memory sink occurs? Is it in the BrepExtrema_DistShapeShape routine or the math at the bottom? I would assume it's in BRepExtrema_DistShapeShape. If so, since your edges are short, couldn't you prefilter many of the edges out before BrepExtrema_DistShapeShape is called by putting a bounding box around the edge and see if the bounding box points are close to the vertex with numpy? - Charles _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users