From adbaad82a83c2fbbaaf746dde8762c77bd1b3561 Mon Sep 17 00:00:00 2001
From: mkr In
- MESH you can create groups of elements of different types and having definite
- properties. In MESH you
+ can create groups of elements of different types. To create a group of
+ elements
+ in the Mesh
+ menu select Create Group.
+ To create any group
+ you should define the following: To create a group of elements: 1. In the Mesh
- menu select Create
- Group. The following dialog box will appear: This dialog box contains
- the following fields which should be filled: Mesh: the name of the mesh whose elements
+ Mesh:
+ the name of the mesh whose elements
will form your group. You can enter the name manually or select your mesh
- in the Objet Browser or in the 3D viewer.Creating groups
-
+
-
Elements Type set of radio buttons allows - to select the type of elements which will form your group:
Elements + Type set of radio buttons allows to + select the type of elements which will form your group:
Nodes
Nodes
Edges +
Edges
Faces
Faces
Volumes
Volumes
Name field allows to enter the - name of your new group.
Group type set of radio buttons allows - to select the type of your group:
Standalone group consisting - of mesh elements.
Group on geometry consisting of - geometrical elements. If you choose this type of group your dialog - box will change and it will look like as follows:
Name field allows to enter the name + of your new group.
- - +
SALOME Platform distinguishes + between the two Group types: Standalone + Group and Group on Geometry. +
-+
In this dialog box you should enter the name - of the geometrical object (you can enter the name manually or select your - geometrical object in the Objet Browser or in the 3D viewer) from which - the elements will be taken. And after confirmation of the operation MESH - will create a new group consisting of geometrical elements of the previously - defined type.
+The box for creation of a Standalone + Group appears by default. Standalone + Group consists of mesh elements, which you can define in two possible + ways.
-- -
Content field - allows to manually define the mesh elements which will form your - group. You can click on an element in the 3D viewer and it will be highlighted. - After that click the Add button - and the ID of this element will be added to the list. To remove a selected - element or elements from the list click the Remove - button. The Sort button - allows to sort the list of elements IDs. The Set - filter button allows to apply a definite filter to selection of - the elements of your group. See more about filters on the Selection - filter library page
Choosing them manually + with the mouse in the 3D Viewer. You can click on an element in the 3D + viewer and it will be highlighted. After that click the Add + button and the ID of this element will be added to the list.
Select from set of fields allows to - choose a submesh or an existing group whose elements of the previously - defined type will be added to the list of elements which will form your - group.
Applying Filters. The + Set filter button allows to apply + a definite filter to selection of the elements of your group. See more + about filters on the Selection + filter library page.
To remove a selected element or elements + from the list click the Remove button. + The Sort button allows to sort + the list of IDs of mesh elements.
+ +Select from + set of fields allows to choose a submesh or an existing group whose + elements of the previously defined type will be added to the list of elements + which will form your group.
+-
2. Click the OK - button to confirm creation of your group or Cancel - to quit this dialog box.
++ | +
+ + + + + + + In this picture left the brown cells belong + to a group defined manually. ++ In this picture the brown cells belong to the group defined
+ by the criterion +
|
-
See Also - a sample TUI Script of a Create - Group operation.
+See + Also a sample TUI Script of a Create + a Standalone Group operation.
+ +To create a group on + geometry check Group on geometry + in the Group type field. Group on geometry contains the elements + of a certain type belonging to the selected + geometrical object. To define a group select in the Objet Browser + or in the 3D viewer a geometrical object from which the elements will + be taken. After confirmation of the operation MESH will create a new group + consisting of geometrical elements of the previously defined type.
+ ++ +
+ | +
+ In this picture the cells which belong to a certain face + are selected in green. |
+ +
See + Also a sample TUI Script of a Create + a Group on Geometry operation. +
+ ++ +
-
+
- +
diff --git a/doc/salome/gui/SMESH/files/reassigning_hypotheses_and_algorithms.htm b/doc/salome/gui/SMESH/files/reassigning_hypotheses_and_algorithms.htm index 088b1bf43..0de684dc9 100755 --- a/doc/salome/gui/SMESH/files/reassigning_hypotheses_and_algorithms.htm +++ b/doc/salome/gui/SMESH/files/reassigning_hypotheses_and_algorithms.htm @@ -14,13 +14,13 @@ if (navigator.appName !="Netscape")
@@ -160,6 +172,276 @@ else
+ + +
import salome
+ +import geompy
+ ++ +
import StdMeshers
+ ++ +
smesh = salome.lcc.FindOrLoadComponent("FactoryServer", + "SMESH")
+ ++ +
smeshgui = salome.ImportComponentGUI("SMESH")
+ +smeshgui.Init(salome.myStudyId);
+ ++ +
# create a box
+ +box = geompy.MakeBox(0., + 0., 0., 100., 100., 100.)
+ ++ +
# add the box to the study
+ +idbox = geompy.addToStudy(box, + "box")
+ ++ +
# add the first face of + the box to the study
+ +subShapeList = geompy.SubShapeAll(box, + geompy.ShapeType["FACE"])
+ +face = subShapeList[0]
+ +name = geompy.SubShapeName(face, + box)
+ +idface = geompy.addToStudyInFather(box, + face, name)
+ ++ +
# create a hypothesis
+ +print "-------------------------- + create Hypothesis"
+ ++ +
print "-------------------------- + NumberOfSegments"
+ +numberOfSegments + = 7
+ ++ +
hypNbSeg = smesh.CreateHypothesis("NumberOfSegments", + "libStdMeshersEngine.so")
+ +hypNbSeg.SetNumberOfSegments(numberOfSegments)
+ ++ +
print hypNbSeg.GetName()
+ +print hypNbSeg.GetId()
+ +print hypNbSeg.GetNumberOfSegments()
+ ++ +
smeshgui.SetName(salome.ObjectToID(hypNbSeg), + "NumberOfSegments_10")
+ ++ +
print "-------------------------- + MaxElementArea"
+ +maxElementArea = + 800
+ ++ +
hypArea = smesh.CreateHypothesis("MaxElementArea", + "libStdMeshersEngine.so")
+ +hypArea.SetMaxElementArea(maxElementArea)
+ ++ +
print hypArea.GetName()
+ +print hypArea.GetId()
+ +print hypArea.GetMaxElementArea()
+ ++ +
smeshgui.SetName(salome.ObjectToID(hypArea), + "MaxElementArea_500")
+ ++ +
print "-------------------------- + MaxElementVolume"
+ +maxElementVolume + = 900
+ ++ +
hypVolume = smesh.CreateHypothesis("MaxElementVolume", + "libStdMeshersEngine.so")
+ +hypVolume.SetMaxElementVolume(maxElementVolume)
+ ++ +
print hypVolume.GetName()
+ +print hypVolume.GetId()
+ +print hypVolume.GetMaxElementVolume()
+ ++ +
smeshgui.SetName(salome.ObjectToID(hypVolume), + "MaxElementVolume_500")
+ ++ +
# create algorithms
+ +print "-------------------------- + create Algorithms"
+ ++ +
print "-------------------------- + Regular_1D"
+ +regular1D = smesh.CreateHypothesis("Regular_1D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(regular1D), + "Wire Discretisation")
+ ++ +
print "-------------------------- + Quadrangle_2D"
+ +quad2D = smesh.CreateHypothesis("Quadrangle_2D", + "libStdMeshersEngine.so")
+ +smeshgui.SetName(salome.ObjectToID(quad2D), + "Quadrangle_2D")
+ ++ +
# initialize a mesh with + the box
+ +mesh = smesh.CreateMesh(box)
+ +smeshgui.SetName(salome.ObjectToID(mesh), + "MeshBox")
+ ++ +
# add a hypothesis to the + box
+ +print "-------------------------- + add hypothesis to the box"
+ +mesh.AddHypothesis(box,hypNbSeg)
+ +mesh.AddHypothesis(box,hypArea)
+ +mesh.AddHypothesis(box,hypVolume)
+ +mesh.AddHypothesis(box,regular1D)
+ +mesh.AddHypothesis(box,quad2D)
+ ++ +
# compute the mesh
+ +print "-------------------------- + compute the mesh of the box"
+ +ret = smesh.Compute(mesh,box)
+ +print ret
+ +if ret == 0:
+ +print + "probleme when computing the mesh"
+ ++ +
# create geometry groups + on the plane:
+ +aGeomGroup1 = geompy.CreateGroup(face + , geompy.ShapeType["FACE"])
+ +geompy.AddObject(aGeomGroup1, + 1)
+ ++ +
aGeomGroup2 = geompy.CreateGroup(face + , geompy.ShapeType["EDGE"])
+ ++ +
geompy.AddObject(aGeomGroup2, + 3)
+ +geompy.AddObject(aGeomGroup2, + 6)
+ +geompy.AddObject(aGeomGroup2, + 8)
+ +geompy.AddObject(aGeomGroup2, + 10)
+ ++ +
geompy.addToStudy(aGeomGroup1, + "Group on Faces")
+ +geompy.addToStudy(aGeomGroup2, + "Group on Edges")
+ ++ +
aSmeshGroup1 = mesh.CreateGroupFromGEOM(SMESH.FACE, + "SMESHGroup1", aGeomGroup1)
+ +aSmeshGroup2 = mesh.CreateGroupFromGEOM(SMESH.EDGE, + "SMESHGroup2", aGeomGroup2)
+ ++ +
salome.sg.updateObjBrowser(1) +
+ ++
import SMESH
@@ -291,6 +573,8 @@ else+
+
import SMESH
@@ -492,6 +776,14 @@ else+ + +
+ +
+ +
+
import SMESH
@@ -632,6 +924,8 @@ else+
+
import SMESH
@@ -772,7 +1066,7 @@ else-
+