mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-04 00:00:33 +05:00
0020743: EDF 1271 SMESH : Create a mesh from a group / export, FindElementByPoint() on groups
This commit is contained in:
parent
70aa7fe704
commit
857d7aff3d
@ -7,7 +7,7 @@ belongs a certain point.
|
|||||||
|
|
||||||
<em>To find the elements:</em>
|
<em>To find the elements:</em>
|
||||||
<ol>
|
<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
|
<li>Select from the Mesh menu or from the context menu the Find
|
||||||
Element by Point item.
|
Element by Point item.
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
\page importing_exporting_meshes_page Importing and exporting meshes
|
\page importing_exporting_meshes_page Importing and exporting meshes
|
||||||
|
|
||||||
\n In MESH there is a functionality allowing importation/exportation
|
\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
|
of meshes from/to \b MED, \b UNV (I-DEAS 10), \b DAT (Nastran) and STL
|
||||||
format files.
|
format files. You can also export a group as a whole mesh.
|
||||||
|
|
||||||
|
|
||||||
<em>To import a mesh:</em>
|
<em>To import a mesh:</em>
|
||||||
@ -21,7 +21,7 @@ importation. It is possible to select multiple files to be imported all at once.
|
|||||||
|
|
||||||
\image html meshimportmesh.png
|
\image html meshimportmesh.png
|
||||||
|
|
||||||
<em>To export a mesh:</em>
|
<em>To export a mesh or a group:</em>
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li>Select the object you wish to export.</li>
|
<li>Select the object you wish to export.</li>
|
||||||
|
@ -231,6 +231,11 @@ tetra.Compute()
|
|||||||
|
|
||||||
# export the mesh in a MED file
|
# export the mesh in a MED file
|
||||||
tetra.ExportMED("/tmp/meshMED.med", 0)
|
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
|
\endcode
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -270,7 +275,7 @@ fGroup = mesh.GroupOnGeom( face, "2D on face")
|
|||||||
nGroup = mesh.GroupOnGeom( face, "nodes on face", NODE)
|
nGroup = mesh.GroupOnGeom( face, "nodes on face", NODE)
|
||||||
subMesh = localAlgo.GetSubMesh()
|
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
|
# 1. copy the whole mesh
|
||||||
newMesh = CopyMesh( mesh, "whole mesh copy")
|
newMesh = CopyMesh( mesh, "whole mesh copy")
|
||||||
|
@ -127,8 +127,12 @@ vols = mesh.FindElementsByPoint(x,y,z, SMESH.VOLUME )
|
|||||||
assert( len(vols) == 1)
|
assert( len(vols) == 1)
|
||||||
|
|
||||||
# Find 0D elements at the point
|
# Find 0D elements at the point
|
||||||
edges = mesh.FindElementsByPoint(x,y,z, SMESH.ELEM0D )
|
elems0d = mesh.FindElementsByPoint(x,y,z, SMESH.ELEM0D )
|
||||||
assert( len(edges) == 0)
|
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
|
\endcode
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user