Personal tools
You are here: Home Forum How to use Salome? Groups, how to identify an edge or face (TUI)

Groups, how to identify an edge or face (TUI)

Up to How to use Salome?

Groups, how to identify an edge or face (TUI)

Posted by andrea dm at May 22. 2016

Hi to everyone,

I have created a 3D blade from a set of wires (3 Edges each one) using the following procedure:

Create a Pipe from the wires that form the profiles and create the top and root faces.
Pipe4  = geompy.MakePipeWithDifferentSections(Wire, Vp4a, Curve_p4s[0], 0, 0)
Face_0 = geompy.MakeFaceWires(Wire[0], 1)
Face_T = geompy.MakeFaceWires(Wire[10], 1)

Create a shell:
Shel_4 = geompy.MakeShell([Pipe4, Face_0, Face_T])

Create a solid:
Soli_4 = geompy.MakeSolidFromConnectedFaces([Shel_4],False)
Now I'm generating the groups of edges and faces composing this solid. I would like to identify the Edges that I have used to create the Wires. However I found only IDs. 
How can I relate the ID I found with the original Edges I have used? I would like to do this operation via TUI.
I needs these groups to specify a node distribution on the further meshing operations.

Re: Groups, how to identify an edge or face (TUI)

Posted by William Tougeron at May 23. 2016

Hi Andrea,

The simplest way to create a group from an existing geometry (here, your edges) is to use the geompy.GetInPlace function.

In your case, you can put all your edges in a compound:

edge_compound = geompy.MakeCompound([the, edges, or, wires])

and create a group from it:

group = geompy.GetInPlace(Soli_4, edge_compound)

Then, if you want to use IDs instead, you can put them in a group like this:

group = geompy.CreateGroup(Soli_4, geompy.ShapeType["EDGE"])

for id in [list, of, ids] : AddObject(group, id)

All the best,


Powered by Ploneboard
Document Actions