<em>To find the elements:</em>
<ol>
-<li>Select the mesh</li>
+<li>Select a mesh or a group</li>
<li>Select from the Mesh menu or from the context menu the Find
Element by Point item.
\page importing_exporting_meshes_page Importing and exporting meshes
\n In MESH there is a functionality allowing importation/exportation
-of meshes from \b MED, \b UNV (I-DEAS 10), \b DAT (Nastran) and STL
-format files.
+of meshes from/to \b MED, \b UNV (I-DEAS 10), \b DAT (Nastran) and STL
+format files. You can also export a group as a whole mesh.
<em>To import a mesh:</em>
\image html meshimportmesh.png
-<em>To export a mesh:</em>
+<em>To export a mesh or a group:</em>
<ol>
<li>Select the object you wish to export.</li>
# export the mesh in a MED file
tetra.ExportMED("/tmp/meshMED.med", 0)
+
+# export a group in a MED file
+face = geompy.SubShapeAll( box, geompy.ShapeType["FACE"])[0] # a box side
+group = tetra.GroupOnGeom( face, "face group" ) # group of 2D elements on the <face>
+tetra.ExportMED("/tmp/groupMED.med", meshPart=group)
\endcode
<br>
nGroup = mesh.GroupOnGeom( face, "nodes on face", NODE)
subMesh = localAlgo.GetSubMesh()
-# make a new mesh by copying different part of the mesh
+# make a new mesh by copying different parts of the mesh
# 1. copy the whole mesh
newMesh = CopyMesh( mesh, "whole mesh copy")
assert( len(vols) == 1)
# Find 0D elements at the point
-edges = mesh.FindElementsByPoint(x,y,z, SMESH.ELEM0D )
-assert( len(edges) == 0)
+elems0d = mesh.FindElementsByPoint(x,y,z, SMESH.ELEM0D )
+assert( len(elems0d) == 0)
+
+# Find edges within a group
+group1D = mesh.MakeGroupByIds("1D", SMESH.EDGE, [1,2] )
+edges = mesh.FindElementsByPoint(x,y,z, SMESH.EDGE, group1D )
\endcode