Check for mesh connectivity between two bodies

amusthaf
amusthaf Member Posts: 16
Name Dropper First Comment First Anniversary
**

How to check whether there is mesh connectivity between two bodies using scripting?

for example,
manually I can use mesh connection option in Display settings to verify:

upon observation, I can confirm whether it has mesh connectivity or not.

but, if I have to verify the same using scripting, is there any way?

Comments

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 327
    25 Answers First Anniversary 100 Comments 25 Likes
    ✭✭✭✭

    There are a number of ways to do this. The least scripting version would be to do a worksheet named selection where you can select faces that are shared across bodies. This indicates shared topology on those faces, and you can assume the nodes are shared across the bodies.

    If you want to do a more explicit check at the mesh level, you can use this post to get a body from any node:
    https://discuss.ansys.com/discussion/2417

    Notice this returns a list of bodies, as nodes can be shared. You would simply want to look at any nodes that have more than one body attachment.
    This is another general post that shows how to get information about nodes and how they are connected to geometry (CAD):
    https://discuss.ansys.com/discussion/2385

    From these two posts, it should be possible to make a routine that first checks for nodes shared across bodies, then starts to check about face connections as well from this subset.