Personal tools
You are here: Home Forum Use Find overlapping volumes in mesh

Find overlapping volumes in mesh

Up to Use

Find overlapping volumes in mesh

Posted by Anirudh Nehra at December 19. 2018

Hello, 

I have got two meshes placed close by. I need to confirm whether they clash into each other or not. By clashing I mean, their volume elements are not completely overlapping each other but rather slightly merging into one another. How can I know which elements are partially penetrating each other? I tried the boolean mesh groups but they don't catch the elements because I think they need exact overlap to compute results. 

 

Thanks a lot.

Anirudh. 

 

Re: Find overlapping volumes in mesh

Posted by Anirudh Nehra at December 31. 2018

Hi,

Can someone suggest a workaround? I need to get mesh volume elements that clash into one another.

 

much thanks,

Anirudh 

Re: Find overlapping volumes in mesh

Posted by Christophe Bourcier at January 05. 2019

Hi,

there is no built-in function in SMESH to do this. But you can do this with MEDCoupling. See an example in attachment on two med files. Launching the script will create two new med files with only intersecting elements.

Christophe

Attachments

Re: Find overlapping volumes in mesh

Posted by Anirudh Nehra at January 06. 2019

HI,

Thank you for the reply.

When I try to load the script in mesh module by preselecting two med files, I get an error like this:

Traceback (most recent call last):

  File "<input>", line 1, in <module>

  File "/home/anirudh/Desktop/forum/getIntersectingCells/detect_intersections_MC_fn.py", line 4, in <module>

    mesh1 = ml.ReadUMeshFromFile("Mesh_1.med","Mesh_1",0)

  File "/home/anirudh/salome_meca/V2018.0.1_public/tools/Medcoupling-V8_5_0/lib/python2.7/site-packages/MEDLoader.py", line 20333, in ReadUMeshFromFile

    return _MEDLoader.ReadUMeshFromFile(*args)

MEDCoupling.InterpKernelException:  File : "Mesh_1.med" has been detected as NOT EXISTING : impossible to read anything !
 
What should I do? I also tried loading MEDCoupling module in advance by calling

from MEDCoupling import *

p, li { white-space: pre-wrap; } I have no understanding of this module and how it works. Attaching the screenshot.
 
Thanks a lot.
Anirudh
p, li { white-space: pre-wrap; }
Attachments

Re: Find overlapping volumes in mesh

Posted by Christophe Bourcier at January 06. 2019

Hi,

You have to export your two meshes in med format and change in the script the name of the med files (with full path if you don't launch Salome in the same directory) and change the name of the meshes.

With some more work, these steps could be automated in the script.

Christophe

Re: Find overlapping volumes in mesh

Posted by Christophe Bourcier at January 06. 2019

You can use the new script in attachment to automatically make the export/import from two selected meshes in the object browser.

Christophe

Attachments

Re: Find overlapping volumes in mesh

Posted by Anirudh Nehra at January 06. 2019

Hi,

Thank you for the script. Its working now.

 

Anirudh

Powered by Ploneboard
Document Actions