Personal tools
You are here: Home Forum How to use Salome? Simple volume element group creation not working!

Simple volume element group creation not working!

Up to How to use Salome?

Simple volume element group creation not working!

Posted by JMB at August 12. 2010

Hello,

 

I am using Salome ver 5.1.4 (the latest available) installed as binaries and the process of creating a volume group "Belong to Geom" or "Lying on Geom" does NOT work!  I have tried this many times in 2 different PCs a) Ubuntu Jaunty 64bit Salome 5.1.4 and b) CAELinux2010Beta with Ubuntu Lucid 64bit, Salome 5.1.4 & SalomeMeca2010.  And yes, I have even closed out Salome and started with completely fresh sessions of Salome.

 

In the next message I will attach Box.med (100mm cube) created using a script shown in the help sections of Salome.  I used the script below to create a plane (Z_745) at z=100.  I am trying to use the GUI to select all the elements that are just adjacent to this Z_745 plane.  When I use the filter and click on 'Add' nothing happens.

 

I have checked the center of the mass of the Z_745 plane (0,0,100) and the co-ords of the topmost node at (0,0,100).  So the Z_745 plane is indeed at Z=100 as is the topmost surface of the mesh.

 

The script I used for creating the Z_745 plane is:

 

import math

import GEOM, geompy

import SALOMEDS, salome

import SMESH, smesh

 

Plane_Dim=200.0

Z_Plane = geompy.MakePlaneLCS(None, Plane_Dim, 1)

geompy.addToStudy( Z_Plane, "Z_Plane" )

Z_745 = geompy.MakeTranslation(Z_Plane, 0, 0, 100)

geompy.addToStudy( Z_745, "Z_745" )

 

I got to this point after several un-successful attempts and numerous postings on the forum asking for help with a TUI to accomplish this.  After I got nowhere with those attempts, I decided to test Salome.  What I report here is the result of hours of futility and frustration.  Try it for yourself and tell me if you succeed in getting all the topmost volume elements into a group called 'Top'.  Somebody tell me if I doing something wrong.  Otherwise if Salome in its 5th+ incarnation is unable to process a simple pre-processing requirement such as this, it requires some serious review of its capabilities or QC process...

 

Regards,

JMB

 

===============================================================================

 

PS:  If you want to create the 'Box' mesh here is the script:

 

import salome

import geompy

import smesh

 

# create a box

box = geompy.MakeBox(0., 0., 0., 100., 100., 100.)

geompy.addToStudy(box, "box")

 

# add the first face of the box to the study

subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])

face = subShapeList[0]

geompy.addToStudyInFather(box, face, "face 1")

 

# create group of edges on the face

aGeomGroupE = geompy.CreateGroup(face, geompy.ShapeType["EDGE"])

geompy.AddObject(aGeomGroupE, 3)

geompy.AddObject(aGeomGroupE, 6)

geompy.AddObject(aGeomGroupE, 8)

geompy.AddObject(aGeomGroupE, 10)

geompy.addToStudyInFather(face, aGeomGroupE, "Group of Edges")

 

# create quadrangle 2D mesh on the box

quadra = smesh.Mesh(box, "Box")

algo1D = quadra.Segment()

quadra.Quadrangle()

algo1D.NumberOfSegments(7)

 

# compute the mesh

quadra.Compute()

 

# create SMESH group on the face with name "SMESHGroup1"

aSmeshGroup1 = quadra.GroupOnGeom(face, "SMESHGroup1")

 

# create SMESH group on <aGeomGroupE> with default name

aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE)

 

salome.sg.updateObjBrowser(1)

Attachments

Re: Simple volume element group creation not working!

Posted by JMB at August 12. 2010

Attached: Box.med

Attachments

Re: Simple volume element group creation not working!

Posted by Erwan ADAM at September 03. 2010

Hi JMB, did you try to select "Mesh" in the "Source" field of the "Filters" dialog box ? With this choice, it seems to work. Erwan.

Re: Simple volume element group creation not working!

Posted by Erwan ADAM at September 03. 2010

Previously Erwan ADAM wrote:

Hi JMB, did you try to select "Mesh" in the "Source" field of the "Filters" dialog box ? With this choice, it seems to work. Erwan.

Ooops, indeed, I see that you have selected Mesh in your image ... Sorry ! I will write the complete list of clicks I've done to work !

Re: Simple volume element group creation not working!

Posted by Erwan ADAM at September 03. 2010

Previously JMB wrote:

Hello,

 

I am using Salome ver 5.1.4 (the latest available) installed as binaries and the process of creating a volume group "Belong to Geom" or "Lying on Geom" does NOT work!  I have tried this many times in 2 different PCs a) Ubuntu Jaunty 64bit Salome 5.1.4 and b) CAELinux2010Beta with Ubuntu Lucid 64bit, Salome 5.1.4 & SalomeMeca2010.  And yes, I have even closed out Salome and started with completely fresh sessions of Salome.

 

In the next message I will attach Box.med (100mm cube) created using a script shown in the help sections of Salome.  I used the script below to create a plane (Z_745) at z=100.  I am trying to use the GUI to select all the elements that are just adjacent to this Z_745 plane.  When I use the filter and click on 'Add' nothing happens.

 

I have checked the center of the mass of the Z_745 plane (0,0,100) and the co-ords of the topmost node at (0,0,100).  So the Z_745 plane is indeed at Z=100 as is the topmost surface of the mesh.

 

The script I used for creating the Z_745 plane is:

 

import math

import GEOM, geompy

import SALOMEDS, salome

import SMESH, smesh

 

Plane_Dim=200.0

Z_Plane = geompy.MakePlaneLCS(None, Plane_Dim, 1)

geompy.addToStudy( Z_Plane, "Z_Plane" )

Z_745 = geompy.MakeTranslation(Z_Plane, 0, 0, 100)

geompy.addToStudy( Z_745, "Z_745" )

 

I got to this point after several un-successful attempts and numerous postings on the forum asking for help with a TUI to accomplish this.  After I got nowhere with those attempts, I decided to test Salome.  What I report here is the result of hours of futility and frustration.  Try it for yourself and tell me if you succeed in getting all the topmost volume elements into a group called 'Top'.  Somebody tell me if I doing something wrong.  Otherwise if Salome in its 5th+ incarnation is unable to process a simple pre-processing requirement such as this, it requires some serious review of its capabilities or QC process...

 

Regards,

JMB

 

===============================================================================

 

PS:  If you want to create the 'Box' mesh here is the script:

 

import salome

import geompy

import smesh

 

# create a box

box = geompy.MakeBox(0., 0., 0., 100., 100., 100.)

geompy.addToStudy(box, "box")

 

# add the first face of the box to the study

subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])

face = subShapeList[0]

geompy.addToStudyInFather(box, face, "face 1")

 

# create group of edges on the face

aGeomGroupE = geompy.CreateGroup(face, geompy.ShapeType["EDGE"])

geompy.AddObject(aGeomGroupE, 3)

geompy.AddObject(aGeomGroupE, 6)

geompy.AddObject(aGeomGroupE, 8)

geompy.AddObject(aGeomGroupE, 10)

geompy.addToStudyInFather(face, aGeomGroupE, "Group of Edges")

 

# create quadrangle 2D mesh on the box

quadra = smesh.Mesh(box, "Box")

algo1D = quadra.Segment()

quadra.Quadrangle()

algo1D.NumberOfSegments(7)

 

# compute the mesh

quadra.Compute()

 

# create SMESH group on the face with name "SMESHGroup1"

aSmeshGroup1 = quadra.GroupOnGeom(face, "SMESHGroup1")

 

# create SMESH group on <aGeomGroupE> with default name

aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE)

 

salome.sg.updateObjBrowser(1)

When looking at your image, it seems that you are trying to create a group of "Volume" on a mesh which does not contain any volumic cells. In your case, I've tried the "Node", "Edge" and "Face" and the filter "Belong to Geom" works perfectly. If I generate the hexaedron, I have to use the "Lying on Geom" filter to get the first layer. Regards, E.A.

Powered by Ploneboard
Document Actions