From: eap Date: Wed, 16 Dec 2009 08:27:00 +0000 (+0000) Subject: 0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates X-Git-Tag: V6_0_0~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ef4c6e012f0f992764a6152705ef0f41b9e8bf9;p=modules%2Fsmesh.git 0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates --- diff --git a/doc/salome/gui/SMESH/images/dialog.png b/doc/salome/gui/SMESH/images/dialog.png index 1fa2c4263..2f3bbed31 100755 Binary files a/doc/salome/gui/SMESH/images/dialog.png and b/doc/salome/gui/SMESH/images/dialog.png differ diff --git a/doc/salome/gui/SMESH/images/findelement1.png b/doc/salome/gui/SMESH/images/findelement1.png new file mode 100644 index 000000000..c741368e2 Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement1.png differ diff --git a/doc/salome/gui/SMESH/images/findelement2.png b/doc/salome/gui/SMESH/images/findelement2.png new file mode 100644 index 000000000..b351b32ec Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement2.png differ diff --git a/doc/salome/gui/SMESH/images/findelement3.png b/doc/salome/gui/SMESH/images/findelement3.png new file mode 100644 index 000000000..26cfff2d7 Binary files /dev/null and b/doc/salome/gui/SMESH/images/findelement3.png differ diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.doc b/doc/salome/gui/SMESH/input/find_element_by_point.doc new file mode 100644 index 000000000..34380aed4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/find_element_by_point.doc @@ -0,0 +1,41 @@ +/*! + +\page find_element_by_point_page Find Element by Point + +\n This functionality allows you to find all mesh elements to which +belongs a certain point. + +To find the elements: +
    +
  1. Select the mesh
  2. +
  3. Select from the Mesh menu or from the context menu the Find +Element by Point item. + +\image html findelement3.png +
    "Find Element by Point" button
    + +The following dialog box will appear: + +\image html findelement2.png + +
  4. +
  5. In this dialog box you should select: + +
      +
    • the coordinates of the point;
    • +
    • the type of elements to be found; it is also possible to find elements +of all types related to the reference point. To be exact, type "All" +means to find elements of any type except nodes and 0D elements.
    • +
    + +
  6. +
  7. Click the \b Apply or \b OK button.
  8. +
+ +\image html findelement1.png +
The reference point and the related elements.
+ + +
See Also a sample TUI Script of a \ref tui_find_element_by_point "Find Element by Point" operation. + +*/ diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc index 862cb302e..7b2af8cb9 100644 --- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc +++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc @@ -83,4 +83,53 @@ for i in keys: pass \endcode + + +
+\anchor tui_find_element_by_point +

Find Element by Point

+ +\code +import geompy +import smesh +import SMESH + +# Create a geometry to mesh +box = geompy.MakeBoxDXDYDZ(100,100,100) + +# Create a mesh +mesh = Mesh(box,"Mesh") +mesh.AutomaticHexahedralization() +mesh.Compute() + +# Create a point +x,y,z = 0, 0, 1 + +# Find all elements (except 0D ones) located at the point +all_elems_except_0D = mesh.FindElementsByPoint(x,y,z) +assert( len(all_elems_except_0D) == 4) + +# Find nodes at the point +nodes = mesh.FindElementsByPoint(x,y,z, SMESH.NODE ) +assert( len(nodes) == 0) +assert( len( mesh.FindElementsByPoint(x,y,0, SMESH.NODE)) == 1) + +# Find an edge at the point +edges = mesh.FindElementsByPoint(x,y,z, SMESH.EDGE ) +assert( len(edges) == 1) + +# Find faces at the point +edges = mesh.FindElementsByPoint(x,y,z, SMESH.FACE ) +assert( len(edges) == 2) + +# Find a volume at the point +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) + +\endcode + */ diff --git a/doc/salome/gui/SMESH/input/viewing_meshes_overview.doc b/doc/salome/gui/SMESH/input/viewing_meshes_overview.doc index ee4c6dd4a..8c7145787 100644 --- a/doc/salome/gui/SMESH/input/viewing_meshes_overview.doc +++ b/doc/salome/gui/SMESH/input/viewing_meshes_overview.doc @@ -24,6 +24,9 @@ Object Browser, applying all recent changes. information about the mesh.
  • \ref mesh_element_info_anchor "Mesh Element Info" - provides basic information about the selected element of the mesh.
  • +
  • \subpage find_element_by_point_page "Find Element by Point" - +allows to find all mesh elements, to which belongs a point with the +given coordinates.
  • \subpage numbering_page "Numbering" - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer.
  • @@ -31,6 +34,8 @@ viewer. Wireframe, Shading and Nodes presentation.
  • \subpage display_entity_page "Display Entity" - allows to display Faces, Edges or both.
  • +
  • 2D Quadratic - allows to select between the representation +of quadratic edges as broken lines or as arcs
  • Orientation of faces - shows vectors of orientation of faces of the selected mesh
  • Colors / Size - allows to select color and size of @@ -43,7 +48,12 @@ presents various information about meshes.
  • Hide - allows to hide the selected mesh from the viewer.
  • Show Only -allows to display only the selected mesh, hiding all other from the viewer.
  • Dump view - exports an object from the viewer in bmp, png, jpg or jpeg image format.
  • -
  • Change background - allows to redefine the background color. By default it is black.
  • +
  • Change background - allows to redefine the background +color. By default it is black.
  • +
  • View Operations checkbox - allows to show/hide the +visualization toolbar in the viewer window.
  • +
  • Recording Operations - allows to show/hide the recording +toolbar in the viewer window.
  • */