From: eap Date: Tue, 14 Jun 2011 14:19:21 +0000 (+0000) Subject: 0020743: EDF 1271 SMESH : Create a mesh from a group / export, FindElementByPoint... X-Git-Tag: V6_4_0a1~203 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=857d7aff3dc46f19c178e3b15d706975c7579d19;p=modules%2Fsmesh.git 0020743: EDF 1271 SMESH : Create a mesh from a group / export, FindElementByPoint() on groups --- diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.doc b/doc/salome/gui/SMESH/input/find_element_by_point.doc index fcdadea29..f02a4435a 100644 --- a/doc/salome/gui/SMESH/input/find_element_by_point.doc +++ b/doc/salome/gui/SMESH/input/find_element_by_point.doc @@ -7,7 +7,7 @@ belongs a certain point. To find the elements:
    -
  1. Select the mesh
  2. +
  3. Select a mesh or a group
  4. Select from the Mesh menu or from the context menu the Find Element by Point item. diff --git a/doc/salome/gui/SMESH/input/importing_exporting_meshes.doc b/doc/salome/gui/SMESH/input/importing_exporting_meshes.doc index dbf96ab89..cdedf8d33 100644 --- a/doc/salome/gui/SMESH/input/importing_exporting_meshes.doc +++ b/doc/salome/gui/SMESH/input/importing_exporting_meshes.doc @@ -3,8 +3,8 @@ \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. To import a mesh: @@ -21,7 +21,7 @@ importation. It is possible to select multiple files to be imported all at once. \image html meshimportmesh.png -To export a mesh: +To export a mesh or a group:
    1. Select the object you wish to export.
    2. diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc index bad32ebf4..220e63c8a 100644 --- a/doc/salome/gui/SMESH/input/tui_creating_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.doc @@ -231,6 +231,11 @@ tetra.Compute() # 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 +tetra.ExportMED("/tmp/groupMED.med", meshPart=group) \endcode
      @@ -270,7 +275,7 @@ fGroup = mesh.GroupOnGeom( face, "2D on face") 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") diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc index 7b2af8cb9..6ef80bf1b 100644 --- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc @@ -127,8 +127,12 @@ vols = mesh.FindElementsByPoint(x,y,z, SMESH.VOLUME ) 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