TAGGED: Ansys Discovery, python-scripts
-
-
January 6, 2026 at 9:03 pm
to.81
SubscriberI have two parts where one is encapsulated by the other(imagine a layered shape, or like an onion). I want to select all the outer faces of the inside part and all the inner faces of the outside part in order to create a bonded contact. None of the faces of either parts share anything in common so I can't use the power selection tool. I've tried creating a bonded contact that is just Component1.ConvertToFaces and Component2.ConvertToFaces, but the contacts don't turn out the way that it should be if I had manually selected each component and created a bonded contact. Additionally, there are some faces that aren't touching the other parts at all and I don't want those in my selection. I just want to select the faces that are identical and touching between the inside and outside parts.
-
January 9, 2026 at 1:52 pm
mohan.urs
Ansys EmployeeHey,
I don't think there is a direct approach to do this - You can try this - loop over faces of both parts, filter by proximity using face centroids MeasureHelper.GetCentroid(face), then verify face opposition using face normals (face.GetFaceNormal(u,v) and a dot-product check). For accurate gap checks, use MeasureHelper.DistanceBetweenObjects (or centroid distance as a lightweight prefilter). Faces that pass distance tolerance + opposite normal criteria are collected and grouped to create contacts. For suitable examples for these commands, you can search through the developer forum -Â Home - Community ForumRegards,
Mohan Urs
-
- You must be logged in to reply to this topic.
-
4858
-
1587
-
1386
-
1242
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.