Personal tools
You are here: Home Forum Use Creating groups in a partition using GetInPlace

Creating groups in a partition using GetInPlace

Up to Use

Creating groups in a partition using GetInPlace

Posted by Marc Beerens at December 05. 2017
Hello everyone,
 
For a project that I'm doing, I'm trying to mesh a vehicle geometry in SALOME that is to be used for a number of thermal simulations. These simulations require me to define the appropriate boundary conditions and materials for each surface and as there are quite a number of different BC's/materials (about 187 different groups of elements, ~3000 faces total), I'm trying to make this automated using a python-script.
 
So far, I've imported the geometry, exploded it to compounds (which matches the file structure/names in the STEP file), and partitioned it again. The latter is required as the nodes of the mesh have to be coincident for my simulations.
 
Now, I'm trying to generate groups in the partitioned vehicle based on the compounds of the original exploded geometry. To do this, I'm using GetInPlace as suggested in multiple posts on this forum (see the attached .py file for more details):
 
geompy.GetInPlace(theShapeWhere,theShapeWhat,True,theName="name")
 
However, GetInPlace does not yield the desired groups: instead of just returning a group with elements corresponding to the compound in the original geometry, the group also contains nearby faces that are connected to the compound (will attach a image of this in a next post). 
 
I've tried changing the boolean from True to False, but the results just got worse (more additional faces connected) and GetInPlaceByHistory returns the same results. Furthermore, limiting the tolerance before partitioning the main shape doesn't work either, nor does turning on/off the unit scaling during the import of the STEP file.
 
Doing it manually (using the GUI) will result in the creation of the proper groups, so I know it should be possible.
 
Any help regarding this topic would be greatly appreciated. Doing it all by hand is quite cumbersome, especially as the model will have some design iterations.
 
Best regards,
 
Marc 
Attachments

Re: Creating groups in a partition using GetInPlace

Posted by Marc Beerens at December 05. 2017

As mentioned in my previous post, I hereby post an image of how the groups should look like and how they look like using GetInPlace.

Best regards,

Marc

Attachments

Re: Creating groups in a partition using GetInPlace

Posted by Saint Michael at December 05. 2017

Hi Marc

Does Partition remove some faces, or number of faces does not change?

St.Michael

Re: Creating groups in a partition using GetInPlace

Posted by Marc Beerens at December 05. 2017

Hi St. Michael,

I just checked and it seems that the number of faces does indeed change during the process. The original geometry has 2378 sub-shapes of the type face when exploding the geometry using the "face" sub-shape type, whereas the partition has 3131 sub-shapes of the type "face" when exploded.

Is this maybe related to some tolerance? 

Although I would love to share the geometry to aid in the troubleshooting, I unfortunately can't as it is intellectual property. I hope you understand.

Thanks.

Marc

Re: Creating groups in a partition using GetInPlace

Posted by Saint Michael at December 05. 2017

Generally, Increasing number of faces while Partitioning is not a problem. But an approach that I had in mind supposed that the number of faces does not change. Alas. I don't know how to help.

St.Michael

Re: Creating groups in a partition using GetInPlace

Posted by Marc Beerens at Wednesday 10:27

Thanks for the effort anyway St. Michael.

It's been a week since the last time I've posted and I was able to get some work done in the meantime. I thought I would give a short update for the people that might struggle with similar problems.

I've changed my script (see the attachement) and the results are better than using the previous version: it is now able to correctly group the elements from the example in Front.png. There is, however, still a significant amount of parts that aren't grouped correctly.

I will continue working on the script and post here when there's any progress.

 

Marc

Attachments
Powered by Ploneboard
Document Actions