0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates

This commit is contained in:
eap 2009-12-16 08:27:00 +00:00
parent e0589e63e6
commit 7ef4c6e012
7 changed files with 101 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

View File

@ -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.
<em>To find the elements:</em>
<ol>
<li>Select the mesh</li>
<li>Select from the Mesh menu or from the context menu the Find
Element by Point item.
\image html findelement3.png
<center><em>"Find Element by Point" button</em></center>
The following dialog box will appear:
\image html findelement2.png
</li>
<li>In this dialog box you should select:
<ul>
<li>the coordinates of the point;</li>
<li>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.</li>
</ul>
</li>
<li>Click the \b Apply or \b OK button.</li>
</ol>
\image html findelement1.png
<center>The reference point and the related elements.</center>
<br><b>See Also</b> a sample TUI Script of a \ref tui_find_element_by_point "Find Element by Point" operation.
*/

View File

@ -83,4 +83,53 @@ for i in keys:
pass pass
\endcode \endcode
<br>
\anchor tui_find_element_by_point
<h2>Find Element by Point</h2>
\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
*/ */

View File

@ -24,6 +24,9 @@ Object Browser, applying all recent changes. </li>
information about the mesh.</li> information about the mesh.</li>
<li>\ref mesh_element_info_anchor "Mesh Element Info" - provides basic <li>\ref mesh_element_info_anchor "Mesh Element Info" - provides basic
information about the selected element of the mesh. </li> information about the selected element of the mesh. </li>
<li>\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.</li>
<li>\subpage numbering_page "Numbering" - allows to display the ID <li>\subpage numbering_page "Numbering" - allows to display the ID
numbers of all meshing elements or nodes composing your mesh in the numbers of all meshing elements or nodes composing your mesh in the
viewer.</li> viewer.</li>
@ -31,6 +34,8 @@ viewer.</li>
Wireframe, Shading and Nodes presentation.</li> Wireframe, Shading and Nodes presentation.</li>
<li>\subpage display_entity_page "Display Entity" - allows to display <li>\subpage display_entity_page "Display Entity" - allows to display
Faces, Edges or both.</li> Faces, Edges or both.</li>
<li><b>2D Quadratic</b> - allows to select between the representation
of quadratic edges as broken <b>lines</b> or as <b>arcs</b></li>
<li><b>Orientation of faces</b> - shows vectors of orientation of <li><b>Orientation of faces</b> - shows vectors of orientation of
faces of the selected mesh</li> faces of the selected mesh</li>
<li><b>Colors / Size</b> - allows to select color and size of <li><b>Colors / Size</b> - allows to select color and size of
@ -43,7 +48,12 @@ presents various information about meshes.</li>
<li><b>Hide</b> - allows to hide the selected mesh from the viewer.</li> <li><b>Hide</b> - allows to hide the selected mesh from the viewer.</li>
<li><b>Show Only</b> -allows to display only the selected mesh, hiding all other from the viewer.</li> <li><b>Show Only</b> -allows to display only the selected mesh, hiding all other from the viewer.</li>
<li><b>Dump view</b> - exports an object from the viewer in bmp, png, jpg or jpeg image format.</li> <li><b>Dump view</b> - exports an object from the viewer in bmp, png, jpg or jpeg image format.</li>
<li><b>Change background</b> - allows to redefine the background color. By default it is black.</li> <li><b>Change background</b> - allows to redefine the background
color. By default it is black.</li>
<li><b>View Operations</b> checkbox - allows to show/hide the
visualization toolbar in the viewer window.</li>
<li><b>Recording Operations</b> - allows to show/hide the recording
toolbar in the viewer window.</li>
</ul> </ul>
*/ */