Salome HOME
0021338: EDF 1926 SMESH: New controls and filters
authoreap <eap@opencascade.com>
Thu, 26 Jan 2012 15:31:11 +0000 (15:31 +0000)
committereap <eap@opencascade.com>
Thu, 26 Jan 2012 15:31:11 +0000 (15:31 +0000)
doc/salome/gui/SMESH/images/double_faces.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/double_nodes.png [new file with mode: 0644]
doc/salome/gui/SMESH/input/about_quality_controls.doc
doc/salome/gui/SMESH/input/double_elements_control.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/double_nodes_control.doc [new file with mode: 0644]
doc/salome/gui/SMESH/input/selection_filter_library.doc
doc/salome/gui/SMESH/input/tui_filters.doc

diff --git a/doc/salome/gui/SMESH/images/double_faces.png b/doc/salome/gui/SMESH/images/double_faces.png
new file mode 100644 (file)
index 0000000..47bed1f
Binary files /dev/null and b/doc/salome/gui/SMESH/images/double_faces.png differ
diff --git a/doc/salome/gui/SMESH/images/double_nodes.png b/doc/salome/gui/SMESH/images/double_nodes.png
new file mode 100644 (file)
index 0000000..27a209b
Binary files /dev/null and b/doc/salome/gui/SMESH/images/double_nodes.png differ
index 374db90a93cc66b76c55b0a398f6ec21efbd689c..7854d5e49e97a6467b571c662149f93ff8e48c69 100644 (file)
@@ -19,6 +19,7 @@ face and volume entity type.
 Node quality controls:
 <ul>
 <li>\subpage free_nodes_page "Free nodes"</li>
+<li>\subpage double_nodes_control_page "Double nodes"</li>
 </ul>
 
 Edge quality controls:
@@ -27,6 +28,7 @@ Edge quality controls:
 <li>\subpage free_borders_page "Free borders"</li>
 <li>\subpage length_page "Length"</li>
 <li>\subpage borders_at_multi_connection_page "Borders at multi-connection"</li>
+<li>\subpage double_elements_page "Double edges"</li>
 </ul>
 
 Face quality controls:
@@ -43,6 +45,7 @@ Face quality controls:
 <li>\subpage warping_page "Warping"</li>
 <li>\subpage skew_page "Skew"</li>
 <li>\subpage max_element_length_2d_page "Element Diameter 2D"</li>
+<li>\subpage double_elements_page "Double faces"</li>
 </ul>
 
 Volume quality controls:
@@ -52,6 +55,7 @@ Volume quality controls:
 <li>\subpage max_element_length_3d_page "Element Diameter 3D"</li>
 <li>\subpage bare_border_volumes_page "Bare border volumes"</li>
 <li>\subpage over_constrained_volumes_page "Over-constrained volumes"</li>
+<li>\subpage double_elements_page "Double volumes"</li>
 </ul>
 
 To manage the quality controls call pop-up in the VTK viewer and select "Controls" sub-menu
diff --git a/doc/salome/gui/SMESH/input/double_elements_control.doc b/doc/salome/gui/SMESH/input/double_elements_control.doc
new file mode 100644 (file)
index 0000000..63ee0e7
--- /dev/null
@@ -0,0 +1,14 @@
+/*!
+
+\page double_elements_page Double edge, Double faces and Double volumes
+
+These mesh quality controls highlight the mesh elements basing on the same set of nodes.
+
+\image html double_faces.png
+
+In this picture some faces are coincident after copying all elements
+with translation with subsequent Merge of nodes.
+
+\sa A sample TUI Script of a \ref filter_double_elements "Filters of Double Elements".
+
+*/
diff --git a/doc/salome/gui/SMESH/input/double_nodes_control.doc b/doc/salome/gui/SMESH/input/double_nodes_control.doc
new file mode 100644 (file)
index 0000000..fbac9bc
--- /dev/null
@@ -0,0 +1,13 @@
+/*!
+
+\page double_nodes_control_page Double nodes
+
+This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). 
+
+\image html double_nodes.png
+
+In this picture some nodes are coincident after copying all elements with translation.
+
+\sa A sample TUI Script of a \ref tui_double_nodes_control "Double Nodes" filter.
+
+*/
index 0e83703c4e11b46096e87934a8ef72fdac933b1a..1b46bcc0a7908054d797cf5ce5e2f70e3a81106f 100644 (file)
@@ -106,12 +106,25 @@ specified arbitrary surface within a given <b>Tolerance</b>.
 </li>
 </ul>
 
+Additional criteria to select mesh <b>Nodes</b> are the following:
+<ul><li>
+<b>Free nodes</b> selects nodes belonging to none mesh element.
+</li><li>
+<b>Double nodes</b> selects node coincident with other nodes 
+(within a given <b>Tolerance</b>). 
+See also \ref tui_double_nodes_control "Double Nodes quality control".
+</li>
+</ul>
+
 Additional criteria to select mesh <b>Edges</b> are the following:
 <ul><li>
 <b>Free Borders</b> selects free 1D mesh elements, i.e. edges belonging to 
 one face only. See also a
 \ref free_borders_page "Free Borders quality control".
 </li><li>
+<b>Double edges</b> selects 1D mesh elements basing on the same set of nodes.
+See also \ref filter_double_elements "Double Elements quality control".
+</li><li>
 <b>Borders at Multi-Connections</b> selects edges belonging to several faces.
 The number of faces should be more, less or equal (within a given <b>Tolerance</b>)
 to the predefined <b>Threshold Value</b>. See also a
@@ -156,6 +169,9 @@ one element of mesh only. See also a
 </li><li>
 <b>Free faces</b> selects 2D mesh elements wich belong to less than two volumes.
 </li><li>
+<b>Double faces</b> selects 2D mesh elements basing on the same set of nodes.
+See also \ref filter_double_elements "Double Elements quality control".
+</li><li>
 <b>Faces with bare border</b> selects 2D mesh elements having a free border without an edge on it.
 See also \ref bare_border_faces_page "Bare border faces quality control".
 </li><li>
@@ -202,6 +218,9 @@ diagonals with a value of length, which is more, less or equal
 (within a given <b>Tolerance</b>) to the predefined <b>Threshold Value</b>. See also a
 \ref max_element_length_3d_page "Element Diameter 3D quality control".
 </li><li>
+<b>Double volumes</b> selects 3D mesh elements basing on the same set of nodes.
+See also \ref filter_double_elements "Double Elements quality control".
+</li><li>
 <b>Bad oriented volume</b> selects mesh volumes, which are incorrectly oriented from
 the point of view of MED convention.
 </li><li>
index 48c108fe50dc0e9ae971b852dbf6ead5533900b0..6d51c0a1031cf4cbe399452840d17181dae4c46b 100755 (executable)
@@ -318,6 +318,63 @@ print "Over-constrained faces:", ids
 
 \sa \ref tui_over_constrained_faces
 
+\section filter_double_elements Double edges, Double faces, Double volumes
+
+filter mesh elements basing on the same set of nodes:
+- element type is either \a smesh.EGDE, \a smesh.FACE or \a smesh.VOLUME
+- functor type is either \a smesh.FT_EqualEdges, \a
+          smesh.FT_EqualFaces or \a smesh.FT_EqualVolumes, 
+- threshold value is not required
+
+\code
+from smesh import *
+# make a mesh on a box
+box = geompy.MakeBoxDXDYDZ(100,100,100)
+mesh = Mesh( box, "Box" )
+mesh.Segment().NumberOfSegments(10)
+mesh.Quadrangle()
+mesh.Hexahedron()
+mesh.Compute()
+# copy all elements with translation and Merge nodes
+mesh.TranslateObject( mesh, MakeDirStruct( 10,0,0), Copy=True )
+mesh.MergeNodes( mesh.FindCoincidentNodes(1e-7) )
+# create filters to find equal elements
+equalEdgesFilter   = GetFilter(SMESH.EDGE, FT_EqualEdges)
+equalFacesFilter   = GetFilter(SMESH.FACE, FT_EqualFaces)
+equalVolumesFilter = GetFilter(SMESH.VOLUME, FT_EqualVolumes)
+# get equal elements
+print "Number of equal edges:",   len( mesh.GetIdsFromFilter( equalEdgesFilter ))
+print "Number of equal faces:",   len( mesh.GetIdsFromFilter( equalFacesFilter ))
+print "Number of equal volumes:", len( mesh.GetIdsFromFilter( equalVolumesFilter ))
+\endcode
+
+
+\section tui_double_nodes_control Double nodes
+
+filters mesh nodes which are coincident with other nodes (within a given tolerance):
+- element type is \a smesh.NODE
+- functor type is \a smesh.FT_EqualNodes
+- threshold value is not required
+- default tolerance is 1.0e-7
+
+\code
+from smesh import *
+# make a mesh on a box
+box = geompy.MakeBoxDXDYDZ(100,100,100)
+mesh = Mesh( box, "Box" )
+mesh.Segment().NumberOfSegments(10)
+mesh.Quadrangle()
+mesh.Hexahedron()
+mesh.Compute()
+# copy all elements with translation
+mesh.TranslateObject( mesh, MakeDirStruct( 10,0,0), Copy=True )
+# create filters to find nodes equal within tolerance of 1e-5
+filter = GetFilter(SMESH.NODE, FT_EqualNodes, Tolerance=1e-5)
+# get equal nodes
+print "Number of equal nodes:", len( mesh.GetIdsFromFilter( filter ))
+\endcode
+
+
 \section filter_borders_multiconnection Borders at multi-connection
 
 Filter border 1D mesh elements (edges) according to the specified number of