I have an Ansys Mechanical model with multiple cylindrical faces of 3mm radius distributed across different bodies. I want to write a Python script (in the Mechanical scripting console) that:
1.Finds all faces with a radius of 3mm and group faces who are adjacent
2.Identifies the closest pair of such faces based on centroid distance
3.Creates Named Selections for this pair, like "bpr1" for one set and "bpm1" for its closest set
I've tried iterating over all bodies and faces using DataModel.GetObjectsByType and comparing centroids, but I'm not sure if this is the right approach, or if there's a more efficient built-in method.