From: Paul RASCLE Date: Tue, 16 Feb 2016 17:52:15 +0000 (+0100) Subject: Merge branch 'hydro/imps_2015' into V7_dev X-Git-Tag: V7_8_0a2~25 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=5482b99d07dd144fd5be299e722f39a81de3b5be;hp=762641c5edac12dcbb64246bef97a34cf39e1f45 Merge branch 'hydro/imps_2015' into V7_dev --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 08f747133..312c48e84 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 7) SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) -SET(${PROJECT_NAME_UC}_VERSION_DEV 0) +SET(${PROJECT_NAME_UC}_VERSION_DEV 1) # Find KERNEL # =========== @@ -87,7 +87,8 @@ MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB) # Various # Python -FIND_PACKAGE(SalomePython REQUIRED) +FIND_PACKAGE(SalomePythonInterp REQUIRED) +FIND_PACKAGE(SalomePythonLibs REQUIRED) # PThread FIND_PACKAGE(SalomePThread REQUIRED) # SWIG diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index 8a8827406..3ec182cbe 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -75,32 +75,34 @@ IF(SALOME_SMESH_USE_TBB) SET_AND_CHECK(TBB_ROOT_DIR_EXP "@PACKAGE_TBB_ROOT_DIR@") ENDIF() -# For all prerequisites, load the corresponding targets if the package was used +# For all prerequisites, load the corresponding targets if the package was used # in CONFIG mode. This ensures dependent projects link correctly # without having to set LD_LIBRARY_PATH: -SET(_PREREQ @_PREREQ_LIST@) -SET(_PREREQ_CONFIG_DIR @_PREREQ_DIR_LIST@) -SET(_PREREQ_COMPONENTS "@_PREREQ_COMPO_LIST@") -LIST(LENGTH _PREREQ_CONFIG_DIR _list_len) -IF(NOT _list_len EQUAL 0) +SET(_PREREQ_@PROJECT_NAME@ @_PREREQ_LIST@) +SET(_PREREQ_@PROJECT_NAME@_CONFIG_DIR @_PREREQ_DIR_LIST@) +SET(_PREREQ_@PROJECT_NAME@_COMPONENTS "@_PREREQ_COMPO_LIST@") +LIST(LENGTH _PREREQ_@PROJECT_NAME@_CONFIG_DIR _list_len_@PROJECT_NAME@) +IF(NOT _list_len_@PROJECT_NAME@ EQUAL 0) # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ... - MATH(EXPR _range "${_list_len}-1") - FOREACH(_p RANGE ${_range}) - LIST(GET _PREREQ ${_p} _pkg ) - LIST(GET _PREREQ_CONFIG_DIR ${_p} _pkg_dir) - LIST(GET _PREREQ_COMPONENTS ${_p} _pkg_compo) - MESSAGE(STATUS "===> Reloading targets from ${_pkg} ...") - IF(NOT _pkg_compo) - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) - ELSE() - STRING(REPLACE "," ";" _compo_lst "${_pkg_compo}") - MESSAGE(STATUS "===> (components: ${_pkg_compo})") - FIND_PACKAGE(${_pkg} REQUIRED NO_MODULE - COMPONENTS ${_compo_lst} - PATHS "${_pkg_dir}" - NO_DEFAULT_PATH) + MATH(EXPR _range_@PROJECT_NAME@ "${_list_len_@PROJECT_NAME@}-1") + FOREACH(_p_@PROJECT_NAME@ RANGE ${_range_@PROJECT_NAME@}) + LIST(GET _PREREQ_@PROJECT_NAME@ ${_p_@PROJECT_NAME@} _pkg_@PROJECT_NAME@ ) + LIST(GET _PREREQ_@PROJECT_NAME@_CONFIG_DIR ${_p_@PROJECT_NAME@} _pkg_dir_@PROJECT_NAME@) + LIST(GET _PREREQ_@PROJECT_NAME@_COMPONENTS ${_p_@PROJECT_NAME@} _pkg_compo_@PROJECT_NAME@) + IF(NOT OMIT_DETECT_PACKAGE_${_pkg_@PROJECT_NAME@}) + MESSAGE(STATUS "===> Reloading targets from ${_pkg_@PROJECT_NAME@} ...") + IF(NOT _pkg_compo_@PROJECT_NAME@) + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ELSE() + STRING(REPLACE "," ";" _compo_lst_@PROJECT_NAME@ "${_pkg_compo_@PROJECT_NAME@}") + MESSAGE(STATUS "===> (components: ${_pkg_compo_@PROJECT_NAME@})") + FIND_PACKAGE(${_pkg_@PROJECT_NAME@} REQUIRED NO_MODULE + COMPONENTS ${_compo_lst_@PROJECT_NAME@} + PATHS "${_pkg_dir_@PROJECT_NAME@}" + NO_DEFAULT_PATH) + ENDIF() ENDIF() ENDFOREACH() ENDIF() diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 233b699a9..88305c97f 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -25,3 +25,10 @@ crit = [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_AspectRatio, '<', 1.5, BinaryO triaGroup = mesh.MakeGroupByCriteria( "Tria AR < 1.5", crit ) print "Number of triangles with aspect ratio < 1.5:", triaGroup.Size() +# get range of values of Aspect Ratio of all faces in the mesh +aspects = mesh.GetMinMax( SMESH.FT_AspectRatio ) +print "MESH: Min aspect = %s, Max aspect = %s" % ( aspects[0], aspects[1] ) + +# get max value of Aspect Ratio of faces in triaGroup +grAspects = mesh.GetMinMax( SMESH.FT_AspectRatio, triaGroup ) +print "GROUP: Max aspect = %s" % grAspects[1] diff --git a/doc/salome/examples/filters_ex36.py b/doc/salome/examples/filters_ex36.py index 3dc8e4fc6..ec1e2b4fb 100644 --- a/doc/salome/examples/filters_ex36.py +++ b/doc/salome/examples/filters_ex36.py @@ -1,13 +1,17 @@ -# Combine filters with Criterion structures using of "criteria". +# Combine several criteria into a filter # create mesh from SMESH_mechanic import * + # get all the quadrangle faces ... criterion1 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_ElemGeomType, SMESH.Geom_QUADRANGLE, SMESH.FT_LogicalAND) -# ... AND do NOT get those from sub_face3 +# ... but those from sub_face3 criterion2 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_BelongToGeom, sub_face3, SMESH.FT_LogicalNOT) -filter = smesh.CreateFilterManager().CreateFilter() -filter.SetCriteria([criterion1,criterion2]) -ids = mesh.GetIdsFromFilter(filter) -myGroup = mesh.MakeGroupByIds("Quads_on_cylindrical_faces",SMESH.FACE,ids) +quadFilter = smesh.GetFilterFromCriteria([criterion1,criterion2]) + +# get faces satisfying the criteria +ids = mesh.GetIdsFromFilter(quadFilter) + +# create a group of faces satisfying the criteria +myGroup = mesh.GroupOnFilter(SMESH.FACE,"Quads_on_cylindrical_faces",quadFilter) diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py index 510a408f8..cd74c4495 100755 --- a/doc/salome/examples/testme.py +++ b/doc/salome/examples/testme.py @@ -24,11 +24,21 @@ import unittest, sys, os class SalomeSession(object): def __init__(self, script): import runSalome - sys.argv = ["runSalome.py"] + run_script = "runSalome.py" + if sys.platform == 'win32': + module_dir = os.getenv("KERNEL_ROOT_DIR") + if module_dir: run_script = os.path.join(module_dir, "bin", "salome", run_script) + pass + sys.argv = [run_script] sys.argv += ["--terminal"] sys.argv += ["--modules=GEOM,MED,SMESH"] sys.argv += ["%s" % script] + if sys.platform == 'win32': + main_module_path = sys.modules['__main__'].__file__ + sys.modules['__main__'].__file__ = '' clt, d = runSalome.main() + if sys.platform == 'win32': + sys.modules['__main__'].__file__ = main_module_path return def __del__(self): diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc index a5b54c82c..01deffbcd 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.doc @@ -241,7 +241,7 @@ in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for \ref analyticdensity_anchor "Distribution with Analytic Density". You -can select the Conversion mode from\b Exponent and Cut +can select the Conversion mode from \b Exponent and Cut negative. \image html distributionwithtabledensity.png @@ -250,7 +250,7 @@ negative. \ref tui_deflection_1d "Defining Number of Segments" hypothesis operation. -\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module). +\note The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module).
\anchor start_and_end_length_anchor @@ -344,16 +344,24 @@ geometrical model in the 3D Viewer, which can help to understand the location of a set of edges within the model. Propagation chains group allows defining Reversed Edges -for splitting opposite edges of quadrilateral faces -in a logically uniform direction. When this group is -activated, the list is filled with propagation chains found within the -model. When a chain is selected in the list its edges are -shown in the Viewer with arrows, which enables choosing a common -direction for all chain edges. \b Reverse button inverts the common -direction of chain edges. If \b Add button is active, some -edges of a chain have a different direction, so you can click \b Add -button to add them to Reversed Edges list. +for splitting opposite edges of quadrilateral faces in a logically +uniform direction. When this group is activated, the list is filled +with propagation chains found within the shape on which a hypothesis +is assigned. When a chain is selected in the list its edges are shown +in the Viewer with arrows, which enables choosing a common direction +for all chain edges. \b Reverse button inverts the common direction of +chain edges. \b Add button is active if some edges of a chain have a +different direction, so you can click \b Add button to add them +to Reversed Edges list. \image html propagation_chain.png "The whole geometry and a propagation chain" +\note Alternatively, uniform direction of edges of one propagation +chain can be achieved by +\ref constructing_submeshes_page "definition of a sub-mesh" on one +edge of the chain and assigning a +\ref propagation_anchor "Propagation" additional hypothesis. +Orientation of this edge (and hence of all the rest edges of the chain) can be +controlled by using Reversed Edges field. + */ diff --git a/doc/salome/gui/SMESH/input/about_meshes.doc b/doc/salome/gui/SMESH/input/about_meshes.doc index 7550e8934..621a47e99 100644 --- a/doc/salome/gui/SMESH/input/about_meshes.doc +++ b/doc/salome/gui/SMESH/input/about_meshes.doc @@ -3,14 +3,19 @@ \page about_meshes_page About meshes \n \b MESH represents a discrete approximation of a subset of the -three-dimensional space by \ref mesh_entities "elementary geometrical elements". +three-dimensional space by \ref mesh_entities "elementary geometrical +elements". + +A SALOME study can contain multiple meshes, but they do not +implicitly compose one super-mesh, and finally each of them +can be used (e.g. exported) only individually. Mesh module provides several ways to create the mesh: +
  • If the Extrusion to Distance radio button is selected - - specify the translation vector by which the elements will be extruded. +
  • -


    - -\image html extrusionalongaline2.png
  • If the Extrusion Along Vector radio button is selected +\image html extrusionalongaline2.png
  • -


    -\image html extrusionalongaline3.png -
  • If the Extrusion By Normal radio button is selected, every node of the selected faces is extruded along the \a average of the \a normal vectors to the faces sharing the node. (Nodes and edges cannot be extruded in this mode.) +\image html extrusionalongaline3.png
  • diff --git a/doc/salome/gui/SMESH/input/mesh_infos.doc b/doc/salome/gui/SMESH/input/mesh_infos.doc index 2013cd426..929deb8f3 100644 --- a/doc/salome/gui/SMESH/input/mesh_infos.doc +++ b/doc/salome/gui/SMESH/input/mesh_infos.doc @@ -46,7 +46,7 @@ information about the selected mesh node(s) or element(s), namely: - Node ID; - Coordinates (X, Y, Z); - Connectivity information (connected elements); double click in - this line makes the dialog show information of these elements; + this line reveals information about these elements; - Position on a shape (for meshes built on a geometry); - Groups information (names of groups the node belongs to). @@ -59,7 +59,7 @@ information about the selected mesh node(s) or element(s), namely: - Type (triangle, quadrangle, etc.); - Gravity center (X, Y, Z coordinates); - Connectivity information (connected nodes); double click in - a line of a node makes the dialog show information of this node; + a line of a node reveals the information about this node; - Quality controls (area, aspect ration, volume, etc.); - Position on a shape (for meshes built on a geometry); - Groups information (names of groups the element belongs to). @@ -156,7 +156,7 @@ button. Also, values are automatically computed if the number of nodes / elements does not exceed the "Automatic controls compute limit" set via the "Mesh information" preferences (zero value means that there is no limit). -\note The plot functionality is available only if GUI module is builded with Plot 2D Viewer (set option SALOME_USE_PLOT2DVIEWER to ON when building GUI module). +\note The plot functionality is available only if the GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). The button \b "Dump" allows printing the information displayed in the dialog box to a .txt file. diff --git a/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc b/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc index 6a90f376e..e3df9e4a5 100644 --- a/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc +++ b/doc/salome/gui/SMESH/input/quad_from_ma_algo.doc @@ -3,9 +3,9 @@ \page quad_from_ma_algo_page Medial Axis Projection Quadrangle meshing algorithm Medial Axis Projection algorithm can be used for meshing faces with -sinuous borders and having channel-like shape, for which is it -difficult to define 1D hypotheses so that generated quadrangles to be -of good shape. The algorithm can be also applied to faces with ring +sinuous borders and a channel-like shape, for which it can be +difficult to define 1D hypotheses such that to obtain a good shape of +resulting quadrangles. The algorithm can be also applied to faces with ring topology, which can be viewed as a closed 'channel'. In the latter case radial discretization of a ring can be specified by using Number of Layers or Distribution of Layers @@ -13,7 +13,7 @@ hypothesis. \image html quad_from_ma_mesh.png "A mesh of a river model to the left and of a ring-face to the right" -The algorithm assures good shape of quadrangles by constructing Medial +The algorithm provides proper shape of quadrangles by constructing Medial Axis between sinuous borders of the face and using it to discretize the borders. (Shape of quadrangles can be not perfect at locations where opposite sides of a 'channel' are far from being parallel.) @@ -22,13 +22,13 @@ locations where opposite sides of a 'channel' are far from being parallel.) The Medial Axis is used in two ways:
      -
    1. If there is a sub-mesh on either sinuous border, then the nodes of +
    2. If there is a sub-mesh on a sinuous border, then the nodes of this border are mapped to the opposite border via the Medial Axis.
    3. -
    4. If there is no sub-meshes on the sinuous borders, then a part of +
    5. If there are no sub-meshes on sinuous borders, then the part of the Medial Axis that can be mapped to both borders is discretized using a 1D hypothesis assigned to the face or its ancestor shapes, - and the division points are mapped from the Medial Axis to the both + and the division points are mapped from the Medial Axis to both borders to find positions of nodes.
    diff --git a/doc/salome/gui/SMESH/input/revolution.doc b/doc/salome/gui/SMESH/input/revolution.doc index f0d4194df..4b1d81240 100644 --- a/doc/salome/gui/SMESH/input/revolution.doc +++ b/doc/salome/gui/SMESH/input/revolution.doc @@ -7,7 +7,7 @@ dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Revolution can be used to create a \ref extrusion_struct "structured mesh from scratch". -See \ref extrusion_page page for general information on Revolution +See \ref extrusion_page page for general information on Revolution, which can be viewed as extrusion along a circular path. To apply revolution: diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.doc b/doc/salome/gui/SMESH/input/selection_filter_library.doc index 308706075..c87d928e8 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.doc +++ b/doc/salome/gui/SMESH/input/selection_filter_library.doc @@ -3,10 +3,10 @@ \page selection_filter_library_page Selection filter library \n Selection filter library allows creating and storing in files -filters that can be later loaded and used for operations on meshes. You can -access to it from the Main Menu via Tools / Selection filter library. -It is also possible to save any filter by invoking the filter library -from \a Filter dialog launched from any mesh operation. +the filters that can be later reused for operations on meshes. You can +access it from the Main Menu via Tools / Selection filter library. +It is also possible to save/load a filter by invoking the filter library +from \ref filtering_elements "Filter dialog" launched from any mesh operation. \image html selectionfilterlibrary.png @@ -19,8 +19,9 @@ the current study. You can \b Add or \b Delete filters. filter. By default it is prefixed with the corresponding entity type. \anchor filtering_elements +

    Filter Dialog

    -When we use filters during a group creation or another operation (by +When we use filters during group creation or another operation (by clicking Set Filter button in the corresponding dialog), the dialog for setting filters looks as shown below. @@ -29,7 +30,10 @@ dialog for setting filters looks as shown below. The \b Add button creates a new criterion at the end of the list of criteria. The \b Insert button creates a new criterion before the selected criterion. The \b Remove button deletes the selected -criterion. The \b Clear button deletes all criteria. +criterion. The \b Clear button deletes all criteria.\n +If there is a choice of Entity type in the dialog, only +criteria of currently selected type are used to create or change a +filter, and criteria of hidden types (if were specified) are ignored. \n Each Entity type has its specific list of criteria, however all filters have common syntax. The Threshold Value should be specified for most criteria. For numerical criteria it is necessary to indicate if @@ -63,15 +67,22 @@ created. You have to select the mesh and the button will be enabled. Some criteria are applicable to all Entity types: -Some criteria are applicable to all Entity types of dimension +Some criteria are applicable to entities of dimension more than zero, i.e. to \b Edges, \b Faces and \b Volumes: -The following criteria are applicable to all Entity types -except for Volumes: +The following criteria are applicable to Entities of \b all types +except for \a Volumes: -The following criteria allow selecting mesh Volumes: +The following criteria allow selecting mesh Volumes: