From: eap Date: Thu, 19 Oct 2017 17:01:16 +0000 (+0300) Subject: refs #256: 7.5.7. Quality check algorithms X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae7ef703f3b22c85d69eb18ccff3261651e08075;p=modules%2Fsmesh.git refs #256: 7.5.7. Quality check algorithms Implement Deflection quality control refs #254: 7.5.5. Mesh generation for semi-analytical boundaries Implement HoleFiller needed for NETGEN Remesher --- diff --git a/doc/salome/examples/quality_controls_defl.py b/doc/salome/examples/quality_controls_defl.py new file mode 100644 index 000000000..9105fee6a --- /dev/null +++ b/doc/salome/examples/quality_controls_defl.py @@ -0,0 +1,45 @@ +# Deflection 2D + + +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) + +# fuse a box and a sphere +Sphere_1 = geompy.MakeSphereR(100) +Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) +Fuse = geompy.MakeFuse( Sphere_1, Box_1, theName="box + sphere" ) + +# create a mesh +mesh = smesh.Mesh( Fuse, "Deflection_2D") +algo = mesh.Segment() +algo.LocalLength(35) +algo = mesh.Triangle() +mesh.Compute() + +# get min and max deflection +minMax = mesh.GetMinMax( SMESH.FT_Deflection2D ) +print "min and max deflection: ", minMax + +# get deflection of a certain face +faceID = mesh.NbEdges() + mesh.NbFaces() +defl = mesh.FunctorValue( SMESH.FT_Deflection2D, faceID ) +print "deflection of face %s = %s" % ( faceID, defl ) + +margin = minMax[1] / 2 + +# get all faces with deflection LESS than the margin +aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Deflection2D, '<', margin, mesh=mesh) +anIds = aFilter.GetIDs() +print "%s faces have deflection less than %s" %( len(anIds), margin ) + +# create a group of faces with deflection MORE than the margin +aGroup = mesh.MakeGroup("Deflection > " + `margin`, SMESH.FACE, SMESH.FT_Deflection2D,'>',margin) +print "%s faces have deflection more than %s: %s ..." %( aGroup.Size(), margin, aGroup.GetIDs()[:10] ) + +salome.sg.updateObjBrowser(True) diff --git a/doc/salome/gui/SMESH/images/deflection_2d.png b/doc/salome/gui/SMESH/images/deflection_2d.png new file mode 100644 index 000000000..e69de29bb diff --git a/doc/salome/gui/SMESH/input/about_filters.doc b/doc/salome/gui/SMESH/input/about_filters.doc index 7468931a1..0519da4f5 100644 --- a/doc/salome/gui/SMESH/input/about_filters.doc +++ b/doc/salome/gui/SMESH/input/about_filters.doc @@ -7,21 +7,22 @@ specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. -Several criteria can be combined together by using logical operators \a -AND and \a OR. In addition, a filter criterion can be reverted -using logical operator \a NOT. +Several \ref filtering_criteria "filtering criteria" can be combined +together by using logical operators \a AND and \a OR. In addition, a +filter criterion can be reverted using logical operator \a NOT. -Some filtering criteria use the functionality of \ref quality_page "mesh quality controls" -to filter mesh nodes / elements by specific characteristic (Area, Length, etc). +Some filtering criteria use the functionality of \ref quality_page +"mesh quality controls" to filter mesh nodes / elements by specific +characteristic (Area, Length, etc). The functinality of mesh filters is available in both GUI and TUI modes: -- In GUI, filters are available in some dialog boxes via -"Set Filters" button, clicking on which opens the dialog box +- In GUI, filters are available in some dialog boxes via "Set Filters" +button, clicking on which opens the \ref filtering_elements "dialog box" allowing to specify the list of filter criteria to be applied to the -current selection. See \subpage selection_filter_library_page page to learn more -about selection filters and their usage in GUI. +current selection. See \subpage selection_filter_library_page page to +learn more about selection filters and their usage in GUI. - In Python scripts, filters can be used to choose only some mesh entities (nodes or elements) for the operations, which require the diff --git a/doc/salome/gui/SMESH/input/about_quality_controls.doc b/doc/salome/gui/SMESH/input/about_quality_controls.doc index 9dbb5c992..84bcf0d4d 100644 --- a/doc/salome/gui/SMESH/input/about_quality_controls.doc +++ b/doc/salome/gui/SMESH/input/about_quality_controls.doc @@ -37,6 +37,7 @@ Face quality controls:
  • \subpage bare_border_faces_page "Bare border faces"
  • \subpage over_constrained_faces_page "Over-constrained faces"
  • \subpage length_2d_page "Length 2D"
  • +
  • \subpage deflection_2d_page "Deflection 2D"
  • \subpage borders_at_multi_connection_2d_page "Borders at multi-connection 2D"
  • \subpage area_page "Area"
  • \subpage taper_page "Taper"
  • diff --git a/doc/salome/gui/SMESH/input/deflection_2d.doc b/doc/salome/gui/SMESH/input/deflection_2d.doc new file mode 100644 index 000000000..a9d38cde3 --- /dev/null +++ b/doc/salome/gui/SMESH/input/deflection_2d.doc @@ -0,0 +1,25 @@ +/*! + +\page deflection_2d_page Deflection 2D + +\n This quality control criterion consists of calculation of distance +between a mesh face gravity corner and the surface the face discretizes. + +To apply the Deflection 2D quality criterion to your mesh: +
      +
    1. Display your mesh in the viewer.
    2. + +
    3. Choose Controls > Face Controls > Deflection 2D or click +"Deflection 2D" button in the toolbar. + +Your mesh will be displayed in the viewer with faces colored according +to the applied mesh quality control criterion: + +\image html deflection_2d.png +
    4. +
    + +
    See Also a sample TUI Script of a +\ref tui_deflection_2d "Deflection 2D quality control" operation. + +*/ diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index 03438c490..97d63ec02 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -2,6 +2,10 @@ \page selection_filter_library_page Selection filter library +\tableofcontents + +\section selection_filter_library Filter library + \n Selection filter library allows creating and storing in files the filters that can be later reused for operations on meshes. You can access it from the Main Menu via Tools / Selection filter library. @@ -18,8 +22,7 @@ the current study. You can \b Add or \b Delete filters. \n In Filter name box you can specify the name for your filter. By default it is prefixed with the corresponding entity type. -\anchor filtering_elements -

    Filter Dialog

    +\section filtering_elements Filter Dialog When we use filters during group creation or another operation (by clicking Set Filter button in the corresponding dialog), the @@ -64,6 +67,8 @@ in the Library. is no selected mesh in the Object Browser and the filter can not be created. You have to select the mesh and the button will be enabled. +\section filtering_criteria Filtering Criteria + Some criteria are applicable to all Entity types: