From 985ce7d8d6b53812b811a194bfa7a5c68619ea93 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 8 Dec 2017 17:09:48 +0300 Subject: [PATCH] Migration Mesh User's guide to Sphinx tool: first draft version --- doc/salome/gui/SMESH/CMakeLists.txt | 54 +- doc/salome/gui/SMESH/conf.py.in | 224 ++++ doc/salome/gui/SMESH/index.rst | 25 + .../gui/SMESH/input/1d_meshing_hypo.rst | 315 ++++++ .../gui/SMESH/input/2d_meshing_hypo.rst | 153 +++ doc/salome/gui/SMESH/input/about_filters.rst | 22 + doc/salome/gui/SMESH/input/about_hypo.rst | 58 ++ doc/salome/gui/SMESH/input/about_meshes.rst | 81 ++ .../SMESH/input/about_quality_controls.rst | 102 ++ .../SMESH/input/adding_nodes_and_elements.rst | 227 +++++ .../SMESH/input/adding_quadratic_elements.rst | 49 + .../gui/SMESH/input/additional_hypo.rst | 166 +++ doc/salome/gui/SMESH/input/area.rst | 30 + doc/salome/gui/SMESH/input/aspect_ratio.rst | 40 + .../gui/SMESH/input/aspect_ratio_3d.rst | 38 + .../gui/SMESH/input/bare_border_face.rst | 16 + .../gui/SMESH/input/bare_border_volumes.rst | 17 + .../gui/SMESH/input/basic_meshing_algos.rst | 97 ++ .../input/borders_at_multi_connection.rst | 15 + .../input/borders_at_multi_connection_2d.rst | 13 + .../gui/SMESH/input/building_compounds.rst | 49 + doc/salome/gui/SMESH/input/cartesian_algo.rst | 77 ++ .../changing_orientation_of_elements.rst | 33 + doc/salome/gui/SMESH/input/clipping.rst | 58 ++ doc/salome/gui/SMESH/input/colors_size.rst | 41 + doc/salome/gui/SMESH/input/connectivity.rst | 67 ++ .../gui/SMESH/input/constructing_meshes.rst | 435 ++++++++ .../SMESH/input/constructing_submeshes.rst | 145 +++ .../input/convert_to_from_quadratic_mesh.rst | 54 + doc/salome/gui/SMESH/input/copy_mesh.rst | 43 + .../input/create_groups_from_geometry.rst | 22 + .../gui/SMESH/input/creating_groups.rst | 112 ++ .../gui/SMESH/input/cut_mesh_by_plane.rst | 59 ++ .../gui/SMESH/input/cutting_quadrangles.rst | 61 ++ .../gui/SMESH/input/define_mesh_by_script.rst | 28 + .../gui/SMESH/input/deleting_groups.rst | 18 + .../input/diagonal_inversion_of_elements.rst | 42 + doc/salome/gui/SMESH/input/display_entity.rst | 43 + doc/salome/gui/SMESH/input/display_mode.rst | 41 + .../SMESH/input/double_elements_control.rst | 16 + .../gui/SMESH/input/double_nodes_control.rst | 16 + .../gui/SMESH/input/double_nodes_page.rst | 145 +++ doc/salome/gui/SMESH/input/editing_groups.rst | 51 + doc/salome/gui/SMESH/input/editing_meshes.rst | 43 + doc/salome/gui/SMESH/input/extrusion.rst | 183 ++++ .../gui/SMESH/input/extrusion_along_path.rst | 176 ++++ .../gui/SMESH/input/find_element_by_point.rst | 39 + doc/salome/gui/SMESH/input/free_borders.rst | 16 + doc/salome/gui/SMESH/input/free_edges.rst | 17 + doc/salome/gui/SMESH/input/free_faces.rst | 16 + doc/salome/gui/SMESH/input/free_nodes.rst | 16 + .../SMESH/input/generate_flat_elements.rst | 14 + .../input/group_of_underlying_elements.rst | 59 ++ .../gui/SMESH/input/grouping_elements.rst | 63 ++ .../input/importing_exporting_meshes.rst | 50 + doc/salome/gui/SMESH/input/index.rst | 50 + doc/salome/gui/SMESH/input/length.rst | 13 + doc/salome/gui/SMESH/input/length_2d.rst | 28 + .../gui/SMESH/input/make_2dmesh_from_3d.rst | 61 ++ .../gui/SMESH/input/max_element_length_2d.rst | 27 + .../gui/SMESH/input/max_element_length_3d.rst | 28 + .../SMESH/input/max_element_volume_hypo.rst | 14 + doc/salome/gui/SMESH/input/measurements.rst | 89 ++ .../gui/SMESH/input/merging_elements.rst | 68 ++ doc/salome/gui/SMESH/input/merging_nodes.rst | 91 ++ doc/salome/gui/SMESH/input/mesh_infos.rst | 188 ++++ .../gui/SMESH/input/mesh_preferences.rst | 237 +++++ .../gui/SMESH/input/mesh_through_point.rst | 58 ++ doc/salome/gui/SMESH/input/minimum_angle.rst | 26 + .../gui/SMESH/input/modifying_meshes.rst | 80 ++ doc/salome/gui/SMESH/input/numbering.rst | 41 + .../SMESH/input/over_constrained_faces.rst | 22 + .../SMESH/input/over_constrained_volumes.rst | 21 + .../gui/SMESH/input/pattern_mapping.rst | 200 ++++ doc/salome/gui/SMESH/input/point_marker.rst | 63 ++ doc/salome/gui/SMESH/input/prism_3d_algo.rst | 93 ++ .../gui/SMESH/input/projection_algos.rst | 128 +++ .../gui/SMESH/input/quad_from_ma_algo.rst | 43 + doc/salome/gui/SMESH/input/quad_ijk_algo.rst | 57 ++ .../gui/SMESH/input/radial_prism_algo.rst | 34 + .../input/radial_quadrangle_1D2D_algo.rst | 47 + .../input/removing_nodes_and_elements.rst | 142 +++ doc/salome/gui/SMESH/input/reorient_faces.rst | 70 ++ doc/salome/gui/SMESH/input/revolution.rst | 88 ++ doc/salome/gui/SMESH/input/rotation.rst | 64 ++ doc/salome/gui/SMESH/input/scalar_bar.rst | 34 + doc/salome/gui/SMESH/input/scale.rst | 118 +++ .../input/segments_around_vertex_algo.rst | 24 + .../SMESH/input/selection_filter_library.rst | 144 +++ doc/salome/gui/SMESH/input/sewing_meshes.rst | 253 +++++ doc/salome/gui/SMESH/input/skew.rst | 39 + .../gui/SMESH/input/smesh_migration.rst | 118 +++ .../gui/SMESH/input/smeshpy_interface.rst | 121 +++ doc/salome/gui/SMESH/input/smoothing.rst | 69 ++ .../SMESH/input/split_biquad_to_linear.rst | 44 + doc/salome/gui/SMESH/input/split_to_tetra.rst | 56 + doc/salome/gui/SMESH/input/symmetry.rst | 79 ++ doc/salome/gui/SMESH/input/taper.rst | 35 + doc/salome/gui/SMESH/input/tools.rst | 18 + doc/salome/gui/SMESH/input/translation.rst | 66 ++ doc/salome/gui/SMESH/input/transparency.rst | 13 + .../gui/SMESH/input/tui_cartesian_algo.rst | 19 + .../gui/SMESH/input/tui_creating_meshes.rst | 156 +++ .../SMESH/input/tui_defining_hypotheses.rst | 329 ++++++ doc/salome/gui/SMESH/input/tui_filters.rst | 959 ++++++++++++++++++ .../input/tui_generate_flat_elements.rst | 51 + .../gui/SMESH/input/tui_grouping_elements.rst | 157 +++ .../gui/SMESH/input/tui_measurements.rst | 50 + .../gui/SMESH/input/tui_modifying_meshes.rst | 409 ++++++++ .../gui/SMESH/input/tui_notebook_smesh.rst | 21 + .../gui/SMESH/input/tui_prism_3d_algo.rst | 24 + .../gui/SMESH/input/tui_quality_controls.rst | 342 +++++++ .../SMESH/input/tui_transforming_meshes.rst | 204 ++++ .../SMESH/input/tui_use_existing_faces.rst | 26 + .../gui/SMESH/input/tui_viewing_meshes.rst | 39 + .../input/tui_work_on_objects_from_gui.rst | 41 + .../SMESH/input/uniting_set_of_triangles.rst | 52 + .../gui/SMESH/input/uniting_two_triangles.rst | 44 + .../gui/SMESH/input/use_existing_algos.rst | 64 ++ .../SMESH/input/using_notebook_smesh_page.rst | 38 + .../input/using_operations_on_groups.rst | 155 +++ .../SMESH/input/viewing_meshes_overview.rst | 74 ++ doc/salome/gui/SMESH/input/volume.rst | 29 + doc/salome/gui/SMESH/input/warping.rst | 45 + doc/salome/gui/SMESH/python_api.rst | 24 + doc/salome/gui/SMESH/static/switchers.js | 82 ++ doc/salome/gui/SMESH/templates/layout.html | 30 + src/SMESH_SWIG/StdMeshersBuilder.py | 157 ++- src/SMESH_SWIG/smeshBuilder.py | 10 +- 129 files changed, 11050 insertions(+), 73 deletions(-) create mode 100644 doc/salome/gui/SMESH/conf.py.in create mode 100644 doc/salome/gui/SMESH/index.rst create mode 100644 doc/salome/gui/SMESH/input/1d_meshing_hypo.rst create mode 100644 doc/salome/gui/SMESH/input/2d_meshing_hypo.rst create mode 100644 doc/salome/gui/SMESH/input/about_filters.rst create mode 100644 doc/salome/gui/SMESH/input/about_hypo.rst create mode 100644 doc/salome/gui/SMESH/input/about_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/about_quality_controls.rst create mode 100644 doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst create mode 100644 doc/salome/gui/SMESH/input/adding_quadratic_elements.rst create mode 100644 doc/salome/gui/SMESH/input/additional_hypo.rst create mode 100644 doc/salome/gui/SMESH/input/area.rst create mode 100644 doc/salome/gui/SMESH/input/aspect_ratio.rst create mode 100644 doc/salome/gui/SMESH/input/aspect_ratio_3d.rst create mode 100644 doc/salome/gui/SMESH/input/bare_border_face.rst create mode 100644 doc/salome/gui/SMESH/input/bare_border_volumes.rst create mode 100644 doc/salome/gui/SMESH/input/basic_meshing_algos.rst create mode 100644 doc/salome/gui/SMESH/input/borders_at_multi_connection.rst create mode 100644 doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst create mode 100644 doc/salome/gui/SMESH/input/building_compounds.rst create mode 100644 doc/salome/gui/SMESH/input/cartesian_algo.rst create mode 100644 doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst create mode 100644 doc/salome/gui/SMESH/input/clipping.rst create mode 100644 doc/salome/gui/SMESH/input/colors_size.rst create mode 100644 doc/salome/gui/SMESH/input/connectivity.rst create mode 100644 doc/salome/gui/SMESH/input/constructing_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/constructing_submeshes.rst create mode 100644 doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst create mode 100644 doc/salome/gui/SMESH/input/copy_mesh.rst create mode 100644 doc/salome/gui/SMESH/input/create_groups_from_geometry.rst create mode 100644 doc/salome/gui/SMESH/input/creating_groups.rst create mode 100644 doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst create mode 100644 doc/salome/gui/SMESH/input/cutting_quadrangles.rst create mode 100644 doc/salome/gui/SMESH/input/define_mesh_by_script.rst create mode 100644 doc/salome/gui/SMESH/input/deleting_groups.rst create mode 100644 doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst create mode 100644 doc/salome/gui/SMESH/input/display_entity.rst create mode 100644 doc/salome/gui/SMESH/input/display_mode.rst create mode 100644 doc/salome/gui/SMESH/input/double_elements_control.rst create mode 100644 doc/salome/gui/SMESH/input/double_nodes_control.rst create mode 100644 doc/salome/gui/SMESH/input/double_nodes_page.rst create mode 100644 doc/salome/gui/SMESH/input/editing_groups.rst create mode 100644 doc/salome/gui/SMESH/input/editing_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/extrusion.rst create mode 100644 doc/salome/gui/SMESH/input/extrusion_along_path.rst create mode 100644 doc/salome/gui/SMESH/input/find_element_by_point.rst create mode 100644 doc/salome/gui/SMESH/input/free_borders.rst create mode 100644 doc/salome/gui/SMESH/input/free_edges.rst create mode 100644 doc/salome/gui/SMESH/input/free_faces.rst create mode 100644 doc/salome/gui/SMESH/input/free_nodes.rst create mode 100644 doc/salome/gui/SMESH/input/generate_flat_elements.rst create mode 100644 doc/salome/gui/SMESH/input/group_of_underlying_elements.rst create mode 100644 doc/salome/gui/SMESH/input/grouping_elements.rst create mode 100644 doc/salome/gui/SMESH/input/importing_exporting_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/index.rst create mode 100644 doc/salome/gui/SMESH/input/length.rst create mode 100644 doc/salome/gui/SMESH/input/length_2d.rst create mode 100644 doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst create mode 100644 doc/salome/gui/SMESH/input/max_element_length_2d.rst create mode 100644 doc/salome/gui/SMESH/input/max_element_length_3d.rst create mode 100644 doc/salome/gui/SMESH/input/max_element_volume_hypo.rst create mode 100644 doc/salome/gui/SMESH/input/measurements.rst create mode 100644 doc/salome/gui/SMESH/input/merging_elements.rst create mode 100644 doc/salome/gui/SMESH/input/merging_nodes.rst create mode 100644 doc/salome/gui/SMESH/input/mesh_infos.rst create mode 100644 doc/salome/gui/SMESH/input/mesh_preferences.rst create mode 100644 doc/salome/gui/SMESH/input/mesh_through_point.rst create mode 100644 doc/salome/gui/SMESH/input/minimum_angle.rst create mode 100644 doc/salome/gui/SMESH/input/modifying_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/numbering.rst create mode 100644 doc/salome/gui/SMESH/input/over_constrained_faces.rst create mode 100644 doc/salome/gui/SMESH/input/over_constrained_volumes.rst create mode 100644 doc/salome/gui/SMESH/input/pattern_mapping.rst create mode 100644 doc/salome/gui/SMESH/input/point_marker.rst create mode 100644 doc/salome/gui/SMESH/input/prism_3d_algo.rst create mode 100644 doc/salome/gui/SMESH/input/projection_algos.rst create mode 100644 doc/salome/gui/SMESH/input/quad_from_ma_algo.rst create mode 100644 doc/salome/gui/SMESH/input/quad_ijk_algo.rst create mode 100644 doc/salome/gui/SMESH/input/radial_prism_algo.rst create mode 100644 doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst create mode 100644 doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst create mode 100644 doc/salome/gui/SMESH/input/reorient_faces.rst create mode 100644 doc/salome/gui/SMESH/input/revolution.rst create mode 100644 doc/salome/gui/SMESH/input/rotation.rst create mode 100644 doc/salome/gui/SMESH/input/scalar_bar.rst create mode 100644 doc/salome/gui/SMESH/input/scale.rst create mode 100644 doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst create mode 100644 doc/salome/gui/SMESH/input/selection_filter_library.rst create mode 100644 doc/salome/gui/SMESH/input/sewing_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/skew.rst create mode 100644 doc/salome/gui/SMESH/input/smesh_migration.rst create mode 100644 doc/salome/gui/SMESH/input/smeshpy_interface.rst create mode 100644 doc/salome/gui/SMESH/input/smoothing.rst create mode 100644 doc/salome/gui/SMESH/input/split_biquad_to_linear.rst create mode 100644 doc/salome/gui/SMESH/input/split_to_tetra.rst create mode 100644 doc/salome/gui/SMESH/input/symmetry.rst create mode 100644 doc/salome/gui/SMESH/input/taper.rst create mode 100644 doc/salome/gui/SMESH/input/tools.rst create mode 100644 doc/salome/gui/SMESH/input/translation.rst create mode 100644 doc/salome/gui/SMESH/input/transparency.rst create mode 100644 doc/salome/gui/SMESH/input/tui_cartesian_algo.rst create mode 100644 doc/salome/gui/SMESH/input/tui_creating_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst create mode 100644 doc/salome/gui/SMESH/input/tui_filters.rst create mode 100644 doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst create mode 100644 doc/salome/gui/SMESH/input/tui_grouping_elements.rst create mode 100644 doc/salome/gui/SMESH/input/tui_measurements.rst create mode 100644 doc/salome/gui/SMESH/input/tui_modifying_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/tui_notebook_smesh.rst create mode 100644 doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst create mode 100644 doc/salome/gui/SMESH/input/tui_quality_controls.rst create mode 100644 doc/salome/gui/SMESH/input/tui_transforming_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/tui_use_existing_faces.rst create mode 100644 doc/salome/gui/SMESH/input/tui_viewing_meshes.rst create mode 100644 doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst create mode 100644 doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst create mode 100644 doc/salome/gui/SMESH/input/uniting_two_triangles.rst create mode 100644 doc/salome/gui/SMESH/input/use_existing_algos.rst create mode 100644 doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst create mode 100644 doc/salome/gui/SMESH/input/using_operations_on_groups.rst create mode 100644 doc/salome/gui/SMESH/input/viewing_meshes_overview.rst create mode 100644 doc/salome/gui/SMESH/input/volume.rst create mode 100644 doc/salome/gui/SMESH/input/warping.rst create mode 100644 doc/salome/gui/SMESH/python_api.rst create mode 100644 doc/salome/gui/SMESH/static/switchers.js create mode 100644 doc/salome/gui/SMESH/templates/layout.html diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index 9479329a0..b32eb233d 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -17,10 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) -SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py) +# SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) +# SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py) SALOME_CONFIGURE_FILE(static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) -SALOME_CONFIGURE_FILE(static/header_py.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header_py.html) +# SALOME_CONFIGURE_FILE(static/header_py.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header_py.html) SALOME_INSTALL_SCRIPTS(collect_mesh_methods.py ${SALOME_INSTALL_BINS}) @@ -29,30 +29,52 @@ SET(smesh_file "${CMAKE_CURRENT_SOURCE_DIR}/collect_mesh_methods.py") SET(kernel_file "${KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py") SALOME_ACCUMULATE_ENVIRONMENT(SMESH_MeshersList NOCHECK ${DOC_SMESH_MeshersList}) +SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_CURRENT_BINARY_DIR}/tmp2) SET(_cmd_options ${smesh_file} -o tmp1/smeshBuilder.py StdMeshers) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${PYTHON_EXECUTABLE}" "${_cmd_options}") +# Sphinx +SET(SPHINXOPTS ) +SET(PAPEROPT_a4 -D latex_paper_size=a4) +SET(ALLSPHINXOPTS -c ${CMAKE_CURRENT_BINARY_DIR} -d doctrees -b html ${PAPEROPT_a4} ${SPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR} html) + +SALOME_CONFIGURE_FILE(conf.py.in conf.py) + +SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd_sphinx env_script_sphinx "${SPHINX_EXECUTABLE}" "${ALLSPHINXOPTS}") + +# install user's documentation + ADD_CUSTOM_TARGET(usr_docs ${CMAKE_COMMAND} -E make_directory tmp1 COMMAND ${CMAKE_COMMAND} -E make_directory tmp2 - COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py - COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py - COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py - COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smeshstudytools.py ${CMAKE_SOURCE_DIR}/src/SMESH_PY/smeshstudytools.py + +# COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smeshBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshBuilder.py tmp2/smeshBuilder.py + +# COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/smesh_algorithm.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smesh_algorithm.py tmp2/smesh_algorithm.py + +# COMMAND ${PYTHON_EXECUTABLE} ${kernel_file} -o tmp2/StdMeshersBuilder.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/StdMeshersBuilder.py ${CMAKE_CURRENT_BINARY_DIR}/tmp2/StdMeshersBuilder.py + + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/SMESH_PY/smeshstudytools.py ${CMAKE_CURRENT_BINARY_DIR}/tmp2 COMMAND ${_cmd} - COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py - COMMAND ${DOXYGEN_EXECUTABLE} doxyfile - COMMAND ${CMAKE_COMMAND} -E remove_directory tmp1 - COMMAND ${CMAKE_COMMAND} -E remove_directory tmp2 - VERBATIM +# COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py +# COMMAND ${DOXYGEN_EXECUTABLE} doxyfile + COMMAND ${CMAKE_COMMAND} -E make_directory html + COMMAND ${CMAKE_COMMAND} -E make_directory doctrees + COMMAND ${_cmd_sphinx} +# COMMAND ${CMAKE_COMMAND} -E remove_directory tmp1 +# COMMAND ${CMAKE_COMMAND} -E remove_directory tmp2 +# VERBATIM WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)") -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SMESH DESTINATION ${SALOME_INSTALL_DOC}/gui) -INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH) -INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/smeshpy_doc) +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${SALOME_INSTALL_DOC}/gui) +#INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH) +#INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/SMESH/smeshpy_doc) FILE(GLOB tag_files ${CMAKE_CURRENT_BINARY_DIR}/*.tag) -SET(make_clean_files SMESH ${tag_files}) +SET(make_clean_files SMESH ${tag_files} html doctrees) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}") diff --git a/doc/salome/gui/SMESH/conf.py.in b/doc/salome/gui/SMESH/conf.py.in new file mode 100644 index 000000000..b691ed008 --- /dev/null +++ b/doc/salome/gui/SMESH/conf.py.in @@ -0,0 +1,224 @@ +# -*- coding: utf-8 -*- +# +# yacs documentation build configuration file, created by +# sphinx-quickstart on Fri Aug 29 09:57:25 2008. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# The contents of this file are pickled, so don't put values in the namespace +# that aren't pickleable (module imports are okay, they're removed automatically). +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If your extensions are in another directory, add it here. If the directory +# is relative to the documentation root, use os.path.abspath to make it +# absolute, like shown here. +#sys.path.append(os.path.abspath('.')) + +# General configuration +# --------------------- + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', + 'sphinxcontrib.napoleon' +] +#add pdfbuilder to build a pdf with rst2pdf +#extensions = ['rst2pdf.pdfbuilder'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@','templates')] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'Mesh' + +# Copyright is shown via custom footer +html_show_copyright = False + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '@SALOMESMESH_VERSION@' +# The full version, including alpha/beta/rc tags. +release = '@SALOMESMESH_VERSION@' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of documents that shouldn't be included in the build. +#unused_docs = [] + +# List of directories, relative to source directory, that shouldn't be searched +# for source files. +exclude_trees = ['.build','ref','images','CVS'] + +# A list of glob-style patterns that should be excluded when looking for source +# files. They are matched against the source file names relative to the +# source directory, using slashes as directory separators on all platforms. +exclude_patterns = ['**/CVS'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + + +# Options for HTML output +# ----------------------- + +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = '@SPHINX_THEME@' + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@','static')] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'],} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +html_use_modindex = True + +# If false, no index is generated. +html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, the reST sources are included in the HTML build as _sources/. +#html_copy_source = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = '' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'smeshdoc' + + +# Options for LaTeX output +# ------------------------ + +# The paper size ('letter' or 'a4'). +latex_paper_size = 'a4' + +# The font size ('10pt', '11pt' or '12pt'). +latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, document class [howto/manual]). +latex_documents = [ + ('index', 'Smesh.tex', 'SMESH User Documentation', '', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# Additional stuff for the LaTeX preamble. +latex_preamble = """ +\RecustomVerbatimEnvironment + {Verbatim}{Verbatim} + {fontsize=\scriptsize} +""" + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +latex_use_modindex = True + +#Options for rst2pdf output (through reportlab) +pdf_documents = [ + ('index', 'Smesh.tex', 'SMESH User Documentation', '', 'manual'), +] + +# A comma-separated list of custom stylesheets. +pdf_stylesheets = ['sphinx','kerning','a4'] + +# Create a compressed PDF +# Use True/False or 1/0 +#pdf_compressed = False + +# A colon-separated list of folders to search for fonts. Example: +# pdf_font_path = ['/usr/share/fonts', '/usr/share/texmf-dist/fonts/'] + +# Language to be used for hyphenation support +#pdf_language = "en_US" + +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {'https://docs.python.org/': None} + +locale_dirs = [os.path.join('@CMAKE_CURRENT_BINARY_DIR@','locale')] # path is example but recommended. +gettext_compact = False # optional diff --git a/doc/salome/gui/SMESH/index.rst b/doc/salome/gui/SMESH/index.rst new file mode 100644 index 000000000..ce987fc15 --- /dev/null +++ b/doc/salome/gui/SMESH/index.rst @@ -0,0 +1,25 @@ +.. SMESH documentation master file, created by + sphinx-quickstart on Tue Nov 21 15:18:10 2017. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to SMESH's documentation! +================================= + +.. toctree:: + :maxdepth: 3 + + input/index.rst + input/about_meshes.rst + input/modifying_meshes.rst + input/grouping_elements.rst + input/about_filters.rst + input/viewing_meshes_overview.rst + input/about_quality_controls.rst + input/measurements.rst + input/using_notebook_smesh_page.rst + input/mesh_preferences.rst + input/smeshpy_interface.rst + input/tools.rst + + diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst new file mode 100644 index 000000000..768923c6b --- /dev/null +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst @@ -0,0 +1,315 @@ +.. _a1d_meshing_hypo_page: + +********************* +1D Meshing Hypotheses +********************* + +Basic 1D hypothesis specifies: + * how a :ref:`a1d_algos_anchor` should divide the edge; + * how a :ref:`a1d_algos_anchor` should divide the group of C1-continuous edges. + +1D hypotheses can be categorized by type of nodes distribution as follows: + * Uniform distribution: + * :ref:`average_length_anchor` + * :ref:`max_length_anchor` + * :ref:`number_of_segments_anchor` with Equidistant distribution + * :ref:`automatic_length_anchor` + + * Constantly increasing or decreasing length of segments: + * :ref:`arithmetic_1d_anchor` + * :ref:`geometric_1d_anchor` + * :ref:`start_and_end_length_anchor` + * :ref:`number_of_segments_anchor` with Scale distribution + + * Distribution depending on curvature: + * :ref:`adaptive_1d_anchor` + * :ref:`deflection_1d_anchor` + + * Arbitrary distribution: + * :ref:`fixed_points_1d_anchor` + * :ref:`number_of_segments_anchor` "Number of Segments" with :ref:`analyticdensity_anchor` or Table Density Distribution + + +.. _adaptive_1d_anchor: + +Adaptive hypothesis +################### + +**Adaptive** hypothesis allows to split edges into segments with a length that depends on the curvature of edges and faces and is limited by **Min. Size** and **Max Size**. The length of a segment also depends on the lengths of adjacent segments (that can't differ more than twice) and on the distance to close geometrical entities (edges and faces) to avoid creation of narrow 2D elements. + + .. image:: ../images/adaptive1d.png + :align: center + +* **Min size** parameter limits the minimal segment size. +* **Max size** parameter defines the length of segments on straight edges. +* **Deflection** parameter gives maximal distance of a segment from a curved edge. + + .. image:: ../images/adaptive1d_sample_mesh.png + :align: center + + .. centered:: + Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features + +**See Also** a :ref:`tui_1d_adaptive` that uses Adaptive hypothesis. + +.. _arithmetic_1d_anchor: + +Arithmetic Progression hypothesis +################################# + +**Arithmetic Progression** hypothesis allows to split edges into segments with a length that changes in arithmetic progression (Lk = Lk-1 + d) beginning from a given starting length and up to a given end length. + +The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use +**Add** button to add the selected edges to the list. + +:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. + + +.. image:: ../images/a-arithmetic1d.png + :align: center + + +.. image:: ../images/b-ithmetic1d.png + :align: center + +.. centered:: + "Arithmetic Progression hypothesis - the size of mesh elements gradually increases" + +**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. + +.. _geometric_1d_anchor: + +Geometric Progression hypothesis +################################ + +**Geometric Progression** hypothesis allows splitting edges into segments with a length that changes in geometric progression (Lk = Lk-1 * d) starting from a given **Start Length** and with a given **Common Ratio**. + +The splitting direction is defined by the orientation of the underlying geometrical edge. +**Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list. + +:ref:'reversed_edges_helper_anchor' group assists you in +defining **Reversed Edges** parameter. + +.. image:: ../images/a-geometric1d.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. + +.. _deflection_1d_anchor: + +Deflection hypothesis +##################### + +**Deflection** hypothesis can be applied for meshing curvilinear edges composing your geometrical object. It defines only one parameter: the value of deflection (or chord error). + +A geometrical edge is divided into segments of length depending on edge curvature. The more curved the edge, the shorter the segment. Nodes on the edge are placed so that the maximum distance between the edge and a segment approximating a part of edge between two nodes should not exceed the value of deflection. + +.. image:: ../images/a-deflection1d.png + :align: center + +.. image:: ../images/b-flection1d.png + :align: center + +.. centered:: + "Deflection hypothesis - useful for meshing curvilinear edges" + +**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` operation. + +.. _average_length_anchor: + +Local Length hypothesis +####################### + +**Local Length** hypothesis can be applied for meshing of edges composing your geometrical object. Definition of this hypothesis consists of setting the **length** of segments, which will approximate these edges, and the **precision** of rounding. + +The **precision** parameter is used to round a *number of segments*, calculated by dividing the *edge length* by the specified **length** of segment, to the higher integer if the *remainder* exceeds the **precision** and to the lower integer otherwise. +Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07. + +For example: if *edge length* is 10.0 and the segment **length** +is 3.0 then their division gives 10./3. = 3.33(3) and the *remainder* is 0.33(3). +If **precision** is less than 0.33(3) then the edge is divided into 3 segments. +If **precision** is more than 0.33(3) then the edge is divided into 4 segments. + + +.. image:: ../images/image41.gif + :align: center + +.. image:: ../images/a-averagelength.png + :align: center + +.. image:: ../images/b-erage_length.png + :align: center + +.. centered:: + "Local Length hypothesis - all 1D mesh segments are equal" + +**See Also** a sample TUI Script of a :ref:`tui_average_length` hypothesis +operation. + +.. _max_length_anchor: + +Max Size +######## + +**Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments. +**Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`diagonal_size_ratio_pref` preference parameter. +**Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition. + +.. image:: ../images/a-maxsize1d.png + :align: center + +.. _number_of_segments_anchor: + +Number of Segments hypothesis +############################# + +**Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`nb_segments_pref` preference parameter. + +The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. + +:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. + +You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog bog : + +.. image:: ../images/a-nbsegments1.png + :align: center + +**Equidistant Distribution** - all segments will have the same length, you define only the **Number of Segments**. + +**Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length. + +Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is + +:: + + L * (1 - A)/(1 - A**N) + + +.. image:: ../images/a-nbsegments2.png + :align: center + + +**Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the nodedistribution as blue crosses. + +.. image:: ../images/distributionwithanalyticdensity.png + :align: center + + +.. _analyticdensity_anchor: + +Analytic Density +================ + +The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments. + +.. image:: ../images/analyticdensity.png + :align: center + +**Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows 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`. You can select the **Conversion mode** from **Exponent** and **Cut negative**. + +.. image:: ../images/distributionwithtabledensity.png + :align: center + + +**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` hypothesis operation. + +.. 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). + +.. _start_and_end_length_anchor: + +Start and End Length hypothesis +############################### + +**Start and End Length** hypothesis allows to divide a geometrical edge into segments so that the first and the last segments have a specified length. The length of medium segments changes with automatically chosen geometric progression. + +The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. + +:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. + + +.. image:: ../images/a-startendlength.png + :align: center + +.. image:: ../images/b-art_end_length.png + :align: center + +.. centered:: + "The lengths of the first and the last segment are strictly defined" + +**See Also** a sample TUI Script of a :ref:`tui_start_and_end_length` hypothesis operation. + + +.. _automatic_length_anchor: + +Automatic Length +################ + +The dialog box prompts you to define the quality of the future mesh by only one parameter, which is **Fineness**, ranging from 0 (coarse mesh, low number of segments) to 1 (extremely fine mesh, great number of segments). + +.. image:: ../images/automaticlength.png + :align: center + +Compare one and the same object (sphere) meshed with minimum and maximum value of this parameter. + +.. image:: ../images/image147.gif + :align: center + +.. centered:: + "Example of a rough mesh at Automatic Length Fineness of 0." + +.. image:: ../images/image148.gif + :align: center + +.. centered:: + "Example of a fine mesh at Automatic Length Fineness of 1." + +.. _fixed_points_1d_anchor: + +Fixed Points hypothesis +####################### + +**Fixed Points** hypothesis allows splitting edges through a set of points parametrized on the edge (from 1 to 0) and a number of segments for each interval limited by the points. + +.. image:: ../images/hypo_fixedpnt_dlg.png + :align: center + +It is possible to check in **Same Nb. Segments for all intervals** option and to define one value for all intervals. + +The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser. + +:ref:`reversed_edges_helper_anchor` group assists in defining **Reversed Edges** parameter. + + +.. image:: ../images/mesh_fixedpnt.png + :align: center + +.. centered:: + "Example of a sub-mesh on the edge built using Fixed Points hypothesis" + +**See Also** a sample TUI Script of a :ref:`tui_fixed_points` hypothesis operation. + + +.. _reversed_edges_helper_anchor: + +Reversed Edges Helper +##################### + +.. image:: ../images/rev_edges_helper_dlg.png + :align: center + +**Helper** group assists in defining **Reversed Edges** parameter of the hypotheses depending on edge direction. + +**Show whole geometry** check-box allows seeing the whole 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 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. **Reverse** button inverts the common direction of chain edges. **Add** button is active if some edges of a chain have a different direction, so you can click **Add** button to add them to **Reversed Edges** list. + +.. image:: ../images/propagation_chain.png + :align: center + +.. centered:: + "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` on one edge of the chain and assigning a :ref:`propagation_anchor` 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/2d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst new file mode 100644 index 000000000..dbd5472da --- /dev/null +++ b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst @@ -0,0 +1,153 @@ +.. _a2d_meshing_hypo_page: + +********************* +2D Meshing Hypotheses +********************* + +- :ref:`max_element_area_anchor` +- :ref:`length_from_edges_anchor` +- :ref:`hypo_quad_params_anchor` + +.. _max_element_area_anchor: + +Max Element Area +################ + +**Max Element Area** hypothesis is applied for meshing of faces composing your geometrical object. Definition of this hypothesis consists of setting the **maximum area** of mesh faces, which will compose the mesh of these faces. + +.. image:: ../images/a-maxelarea.png + :align: center + +| + +.. image:: ../images/max_el_area.png + :align: center + +.. centered:: + "In this example, Max. element area is very small compared to the 1D hypothesis" + +**See Also** a sample TUI Script of a :ref:`tui_max_element_area` hypothesis operation. + +.. _length_from_edges_anchor: + +Length from Edges +################# + +**Length from edges** hypothesis defines the maximum linear size of mesh faces as an average length of mesh edges approximating the meshed face boundary. + +**See Also** a sample TUI Script of a :ref:`tui_length_from_edges` hypothesis operation. + +.. _hypo_quad_params_anchor: + +Quadrangle parameters +##################### + +.. image:: ../images/ hypo_quad_params_dialog.png + :align: center + +.. centered:: + "Quadrangle parameters: Transition" + +**Quadrangle parameters** is a hypothesis for :ref:`quad_ijk_algo_page`. + +**Transition** tab is used to define the algorithm of transition between opposite sides of the face with a different number of segments on them. The following types of transition algorithms are available: + +* **Standard** is the default case, when both triangles and quadrangles are possible in the transition area along the finer meshed sides. +* **Triangle preference** forces building only triangles in the transition area along the finer meshed sides. + + .. note:: + This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now. + +* **Quadrangle preference** forces building only quadrangles in the transition area along the finer meshed sides. This hypothesis has a restriction: the total quantity of segments on all four face sides must be even (divisible by 2). + + .. note:: + This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now. + +* **Quadrangle preference (reversed)** works in the same way and with the same restriction as **Quadrangle preference**, but the transition area is located along the coarser meshed sides. +* **Reduced** type forces building only quadrangles and the transition between the sides is made gradually, layer by layer. This type has a limitation on the number of segments: one pair of opposite sides must have the same number of segments, the other pair must have an even total number of segments. In addition, the number of rows between sides with different discretization should be enough for the transition. Following the fastest transition pattern, three segments become one (see the image below), hence the least number of face rows needed to reduce from Nmax segments to Nmin segments is log3( Nmax / Nmin ). The number of face rows is equal to the number of segments on each of equally discretized sides. + +.. image:: ../images/ reduce_three_to_one.png + :align: center + +.. centered:: + "The fastest transition pattern: 3 to 1" + +**Base vertex** tab allows using Quadrangle: Mapping algorithm for meshing of trilateral faces. In this case it is necessary to select the vertex, which will be used as the forth degenerated side of quadrangle. + +.. image:: ../images/ hypo_quad_params_dialog_vert.png + :align: center + +.. centered:: + "Quadrangle parameters: Base Vertex" + +.. image:: ../images/ hypo_quad_params_1.png + :align: center + +.. centered:: + "A face built from 3 edges" + +.. image:: ../images/ hypo_quad_params_res.png + :align: center + +.. centered:: + "The resulting mesh" + +This parameter can be also used to mesh a segment of a circular face. Please, consider that there is a limitation on the selection of the vertex for the faces built with the angle > 180 degrees (see the picture). + +.. image:: ../images/ hypo_quad_params_2.png + :align: center + +.. centered:: + "3/4 of a circular face" + +In this case, selection of a wrong vertex for the **Base vertex** parameter will generate a wrong mesh. The picture below shows the good (left) and the bad (right) results of meshing. + +.. image:: ../images/ hypo_quad_params_res_2.png + :align: center + +.. centered:: + "The resulting meshes" + +.. image:: ../images/ hypo_quad_params_dialog_enf.png + :align: center + +.. centered:: + "Quadrangle parameters: Enforced nodes" + +**Enforced nodes** tab allows defining points, where the algorithm should create nodes. There are two ways to define positions of the enforced nodes. + + * **Vertices** group allows to set up shapes whose vertices will define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. + * **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. + +.. note:: + **Enforced nodes** cannot be created at **Reduced** transition type. + +Let us see how the algorithm works: + * Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). + +.. image:: ../images/ hypo_quad_params_enfnodes_algo1.png + :align: center + +.. centered:: + "Initial mesh" + +* Then the node closest to the enforced vertex is detected. Extreme nodes of the row and column of the detected node are used to create virtual edges (yellow lines) ending at the enforced vertex. + + .. image:: ../images/ hypo_quad_params_enfnodes_algo2.png + :align: center + .. centered:: + "Creation of virtual edges" + +* Consequently, the meshed face is divided by the virtual edges into four quadrilateral sub-domains each of which is meshed as usually: the nodes of the row and column of the detected node are moved to the virtual edges and the quadrilateral elements are constructed. + + .. image:: ../images/ hypo_quad_params_enfnodes_algo3.png + :align: center + + .. centered:: + "Final mesh" + + +If there are several enforced vertices, the algorithm is applied recursively to the formed sub-domains. + +**See Also** a sample TUI Script of a :ref:`tui_quadrangle_parameters` hypothesis. + diff --git a/doc/salome/gui/SMESH/input/about_filters.rst b/doc/salome/gui/SMESH/input/about_filters.rst new file mode 100644 index 000000000..4a41f4e6b --- /dev/null +++ b/doc/salome/gui/SMESH/input/about_filters.rst @@ -0,0 +1,22 @@ +.. _filters_page: + +************* +About filters +************* + + **Filters** allow picking only the mesh elements satisfying to a 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 *AND* and *OR*. In addition, a filter criterion can be reverted using logical operator *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). + +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 allowing to specify the list of filter criteria to be applied to the current selection. See :ref:`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 list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects (groups, sub-meshes) as input parameter. The page :ref:`tui_filters_page` provides examples of the filters usage in Python scripts. + +.. toctree:: + :maxdepth: 2 + + selection_filter_library.rst diff --git a/doc/salome/gui/SMESH/input/about_hypo.rst b/doc/salome/gui/SMESH/input/about_hypo.rst new file mode 100644 index 000000000..58d845968 --- /dev/null +++ b/doc/salome/gui/SMESH/input/about_hypo.rst @@ -0,0 +1,58 @@ +.. _about_hypo_page: + +**************** +About Hypotheses +**************** + +**Hypotheses** represent boundary conditions which will be taken into account by meshing algorithms. The hypotheses allow you to manage the level of detail of the resulting mesh: when applying different hypotheses with different parameters you can preset the quantity or size of elements which will compose your mesh. So, it will be possible to generate a coarse or a more refined mesh. + +The choice of a hypothesis depends on the selected algorithm. + +Hypotheses are created during creation and edition of +:ref:`constructing_meshes_page`:"meshes" and +:ref:`constructing_submeshes_page`:"sub-meshes". +Once created a hypotheses can be reused during creation and edition of other meshes and sub-meshes. All created hypotheses and algorithms are present in the Object Browser in *Hypotheses* and *Algorithms* folders correspondingly. It is possible to open a dialog to modify the parameters of a hypothesis from its context menu. This menu also provides **Unassign** command that will unassign the hypothesis from all meshes and sub-meshes using it. Modification of any parameter of a hypothesis and its unassignment leads to automatic removal of elements generated using it. + +In **MESH** there are the following Basic Hypotheses: + +* :ref:`a1d_meshing_hypo_page` (for meshing of **edges**): + * :ref:`number_of_segments_anchor` + * :ref:`average_length_anchor` + * :ref:`max_length_anchor` + * :ref:`adaptive_1d_anchor` + * :ref:`arithmetic_1d_anchor` + * :ref:`geometric_1d_anchor` + * :ref:`start_and_end_length_anchor` + * :ref:`deflection_1d_anchor` + * :ref:`automatic_length_anchor` + * :ref:`fixed_points_1d_anchor` + +* :ref:`a2d_meshing_hypo_page` (for meshing of **faces**): + + * :ref:`max_element_area_anchor` + * :ref:`length_from_edges_anchor` + * :ref:`hypo_quad_params_anchor` + +* 3D Hypothesis (for meshing of **volumes**): + + * :ref:`max_element_volume_hypo_page` + + + +There also exist :ref:`additional_hypo_page`: + + * :ref:`propagation_anchor` + * :ref:`propagofdistribution_anchor` + * :ref:`viscous_layers_anchor` + * :ref:`quadratic_mesh_anchor` + * :ref:`quadrangle_preference_anchor` + + +.. toctree:: + :maxdepth: 2 + + 1d_meshing_hypo.rst + 2d_meshing_hypo.rst + max_element_volume_hypo.rst + additional_hypo.rst + diff --git a/doc/salome/gui/SMESH/input/about_meshes.rst b/doc/salome/gui/SMESH/input/about_meshes.rst new file mode 100644 index 000000000..bdbbbeb4b --- /dev/null +++ b/doc/salome/gui/SMESH/input/about_meshes.rst @@ -0,0 +1,81 @@ +.. _about_meshes_page: + +************ +About meshes +************ + +**MESH** represents a discrete approximation of a subset of the three-dimensional space by `mesh_entities`_. + +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: + +* The main way is to :ref:`constructing_meshes_page` on the basis of the geometrical shape produced in the Geometry module. This way implies selection of + + * a geometrical object (**main shape**) and + * **meshing parameters** ( :ref:`basic_meshing_algos_page` and characteristics (e.g. element size) of a required mesh encapsulated in :ref:`about_hypo_page` objects). + + Construction of :ref:`constructing_submeshes_page` allows to discretize some sub-shapes of the main shape, for example a face, using the meshing parameters that differ from those used for other sub-shapes. + Meshing parameters of meshes and sub-meshes can be :ref:`editing_meshes_page`. (Upon edition only mesh entities generated using changed meshing parameters are removed and will be re-computed). + + .. note:: + Algorithms and hypotheses used at mesh level are referred to as *global* ones and those used at sub-mesh level are referred to as *local* ones. + +* Bottom-up way, using :ref:`modifying_meshes_page` operations, especially :ref:`extrusion_page` and :ref:`revolution_page`. To create an empty mesh not based on geometry, use the same dialog as to :ref:`constructing_meshes_page` but specify neither the geometry nor meshing algorithms. + +* The mesh can be :ref:`importing_exporting_meshes_page` from (and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and SAUVE formats. + +* The 3D mesh can be generated from the 2D mesh not based on geometry, which was either :ref:`importing_exporting_meshes_page` or created in other way. To setup the meshing parameters of a mesh not based on geometry, just invoke :ref:`editing_meshes_page` command on your 2D mesh. + +* Several meshes can be :ref:`building_compounds_page` into a new mesh. + +* The whole mesh or its part (sub-mesh or group) can be :ref:`copy_mesh_page` into a new mesh. + +* A new mesh can be created from a transformed, e.g. :ref:`translation_page`, part of the mesh. + + +Meshes can be edited using the MESH functions destined for :ref:`modifying_meshes_page` of meshes. + +Attractive meshing capabilities include: + +* 3D and 2D :ref:`viscous_layers_anchor` (boundary layers of highly stretched elements beneficial for high quality viscous computations); +* automatic conformal transition between tetrahedral and hexahedral sub-meshes. + +The **structure** of a SALOME mesh is described by nodes and elements based on these nodes. The geometry of an element is defined by the sequence of nodes constituting it and the :ref:`connectivity_page` (adopted from MED library). Definition of the element basing on the elements of a lower dimension is NOT supported. + +.. _mesh_entities: + +The mesh can include the following entities: + +* **Node** - a mesh entity defining a position in 3D space with coordinates (x, y, z). +* **Edge** (or segment) - 1D mesh element linking two nodes. +* **Face** - 2D mesh element representing a part of surface bound by links between face nodes. A face can be a triangle, quadrangle or polygon. +* **Volume** - 3D mesh element representing a part of 3D space bound by volume facets. Nodes of a volume describing each facet are defined by the :ref:`connectivity_page`. A volume can be a tetrahedron, hexahedron, pentahedron, pyramid, hexagonal prism or polyhedron. +* **0D** element - mesh element defined by one node. +* **Ball** element - discrete mesh element defined by a node and a diameter. + + +Every mesh entity has an attribute associating it to a sub-shape it is generated on (if any). The node generated on the geometrical edge or surface in addition stores its position in parametric space of the associated geometrical entity. This attribute is set up by meshing algorithms generating elements and nodes. + +Mesh entities are identified by integer IDs starting from 1. +Nodes and elements are counted separately, i.e. there can be a node and element with the same ID. + +SALOME supports elements of second order, without a central node (quadratic triangle, quadrangle, polygon, tetrahedron, hexahedron, +pentahedron and pyramid) and with central nodes (bi-quadratic triangle and quadrangle and tri-quadratic hexahedron). + +Quadratic mesh can be obtained in three ways: + +* Using a global :ref:`quadratic_mesh_anchor` hypothesis. (Elements with the central node are not generated in this way). +* Using :ref:`convert_to_from_quadratic_mesh_page` operation. +* Using an appropriate option of some meshing algorithms, which generate elements of several dimensions starting from mesh segments. + +.. toctree:: + :maxdepth: 2 + + constructing_meshes.rst + constructing_submeshes.rst + editing_meshes.rst + importing_exporting_meshes.rst + building_compounds.rst + copy_mesh.rst + connectivity.rst diff --git a/doc/salome/gui/SMESH/input/about_quality_controls.rst b/doc/salome/gui/SMESH/input/about_quality_controls.rst new file mode 100644 index 000000000..0a136211f --- /dev/null +++ b/doc/salome/gui/SMESH/input/about_quality_controls.rst @@ -0,0 +1,102 @@ +.. _quality_page: + +********************** +About quality controls +********************** + +.. note:: + **Mesh quality control** in MESH is destined for visual control of the generated mesh. + +Application of a definite quality control consists of usage of the corresponding algorithm, which calculates a value of a definite geometric characteristic (Area, Length of edges, etc) for all meshing elements, composing your mesh. Then all meshing elements are colored according the calculated values. The reference between the coloring of the meshing elements and these calculated values is shown with the help of a scalar bar, which is displayed near the presentation of your mesh. + +There are four types of quality controls, corresponding to node, edge, face and volume entity type. + +Node quality controls: + +* :ref:`free_nodes_page` +* :ref:`double_nodes_control_page` + + +Edge quality controls: + +* :ref:`free_borders_page` +* :ref:`length_page` +* :ref:`borders_at_multi_connection_page` +* :ref:`double_elements_page` + + +Face quality controls: + +* :ref:`free_edges_page` +* :ref:`free_faces_page` +* :ref:`bare_border_faces_page` +* :ref:`over_constrained_faces_page` +* :ref:`length_2d_page` +* :ref:`borders_at_multi_connection_2d_page` +* :ref:`area_page` +* :ref:`taper_page` +* :ref:`aspect_ratio_page` +* :ref:`minimum_angle_page` +* :ref:`warping_page` +* :ref:`skew_page` +* :ref:`max_element_length_2d_page` +* :ref:`double_elements_page` + + +Volume quality controls: + +* :ref:`aspect_ratio_3d_page` +* :ref:`volume_page` +* :ref:`max_element_length_3d_page` +* :ref:`bare_border_volumes_page` +* :ref:`over_constrained_volumes_page` +* :ref:`double_elements_page` + + +To manage the quality controls call pop-up in the VTK viewer and select "Controls" sub-menu + +.. image:: ../images/controls_popup.png + :align: center + + +* **Reset** switches off quality controls; +* **Node Controls** provides access to the node quality controls; +* **Edge Controls** provides access to the edge quality controls; +* **Face Controls** provides access to the face quality controls; +* **Volume Controls** provides access to the volume quality controls; +* **Scalar Bar Properties** allows setting :ref:scalar_bar_dlg; +* **Distribution -> Export ...** allows saving the distribution of quality control values in the text file; +* **Distribution -> Show** Shows/Hides the distribution histogram of the quality control values in the VTK Viewer. +* **Distribution -> Plot** Plots the distribution histogram of the quality control values in the Plot 2D Viewer. + + +.. toctree:: + :maxdepth: 2 + + free_nodes.rst + double_nodes_control.rst + free_borders.rst + length.rst + borders_at_multi_connection.rst + double_elements_control.rst + free_edges.rst + free_faces.rst + bare_border_face.rst + over_constrained_faces.rst + length_2d.rst + borders_at_multi_connection_2d.rst + area.rst + taper.rst + aspect_ratio.rst + minimum_angle.rst + warping.rst + skew.rst + max_element_length_2d.rst + aspect_ratio_3d.rst + volume.rst + max_element_length_3d.rst + bare_border_volumes.rst + over_constrained_volumes.rst + scalar_bar.rst + + diff --git a/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst new file mode 100644 index 000000000..e4be7c810 --- /dev/null +++ b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst @@ -0,0 +1,227 @@ +.. _adding_nodes_and_elements_page: + +************************* +Adding nodes and elements +************************* + +In MESH you can add to your mesh different elements such as: + +* :ref:`adding_nodes_anchor` +* :ref:`adding_0delems_anchor` +* :ref:`adding_0delems_on_all_nodes_anchor` +* :ref:`adding_balls_anchor` +* :ref:`adding_edges_anchor` +* :ref:`adding_triangles_anchor` +* :ref:`adding_quadrangles_anchor` +* :ref:`adding_polygons_anchor` +* :ref:`adding_tetrahedrons_anchor` +* :ref:`adding_hexahedrons_anchor` +* :ref:`adding_octahedrons_anchor` +* :ref:`adding_polyhedrons_anchor` + + +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. + +**To add a node or an element to your mesh:** + +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose the **Add** item, the following associated sub-menu will appear: + + .. image:: ../images/image152.png + :align: center + + From this sub-menu select the type of element which you would like to add to your mesh. + + .. note:: + All dialogs for new node or element adding to the mesh provide the possibility to automatically add a node or element to the specified group or to create it anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input new group name. The combo box lists groups of all the + :ref:`grouping_elements_page`: both + :ref:`standalone_group`, + :ref:`group_on_filter`, and + :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. + + If the user rejects conversion operation, it is cancelled and a new node/element is not created! + + +**See Also** sample TUI Scripts of :ref:`tui_adding_nodes_and_elements` operations. + +.. _adding_nodes_anchor: + +Adding nodes +############ + +.. image:: ../images/addnode.png + :align: center + +In this dialog box set coordinates for your node in the **Coordinates** set of fields and click the **Apply** or **Apply and Close** button. Your node will be created: + +.. image:: ../images/add_node.png + :align: center + + +.. _adding_0delems_anchor: + +Adding 0D elements +################## + +.. image:: ../images/add0delement.png + :align: center + +In this dialog box specify nodes which will form your 0D elements by selecting them in the 3D viewer. Activate **Allow duplicate elements** +to get several 0D elements on a node. Click the **Apply** or **Apply and Close** button. Your 0D elements will be created: + +.. image:: ../images/add_0delement.png + :align: center + + +.. _adding_0delems_on_all_nodes_anchor: + +Making 0D elements on Element Nodes +################################### + +There is another way to create 0D elements. It is possible to create 0D elements on all nodes of the selected mesh, sub-mesh, or a group of elements or nodes. + +.. image:: ../images/dlg_0D_on_all_nodes.png + :align: center + +In this dialog + +* The radio-buttons allow choosing the type of object to create 0D elements on. + + * **Mesh, sub-mesh, group** - this button allows selecting a mesh, a sub-mesh or a group to create 0D elements on the nodes of its elements. The name of the selected object is shown in the dialog. + * **Elements** - this button allows selecting elements in the VTK viewer or typing their IDs in the dialog. + * **Nodes** - this button allows selecting nodes to create 0D elements on in the VTK viewer or typing their IDs in the dialog. + +* **Set Filter** button allows selecting elements or nodes by filtering mesh elements or nodes with different criteria (see :ref:`filtering_elements`). +* Activate **Allow duplicate elements** to get several 0D elements on a node. +* Switching on **Add to group** check-box allows specifying the name of the group to which all created or found (existing) 0D elements will be added. You can either select an existing group from a drop-down list, or enter the name of the group to be created. If a selected existing :ref:`grouping_elements_page` is not Standalone (Group On Geometry or Group On Filter) it will be converted to Standalone. + +.. warning:: If **Add to group** is activated it has to be filled in. + + + + +.. _adding_balls_anchor: + +Adding ball elements +#################### + +.. image:: ../images/addball.png + :align: center + +In this dialog box specify the nodes, which will form your ball elements, either by selecting them in the 3D viewer or by manually entering their IDs, specify the ball diameter and click the **Apply** or **Apply and Close** button. + +.. image:: ../images/add_ball.png + :align: center + + +.. _adding_edges_anchor: + +Adding edges +############ + +.. image:: ../images/addedge.png + :align: center + +In this dialog box specify the nodes which will form your edge by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. Your edge will be created: + +.. image:: ../images/add_edge.png + :align: center + + +.. _adding_triangles_anchor: + +Adding triangles +################ + +.. image:: ../images/addtriangle.png + :align: center + +In this dialog box specify the nodes which will form your triangle by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. Your triangle will be created: + +.. image:: ../images/add_triangle.png + :align: center + + +.. _adding_quadrangles_anchor: + +Adding quadrangles +################## + +.. image:: ../images/addquadrangle.png + :align: center + +In this dialog box specify the nodes which will form your quadrangle by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. Your quadrangle will be created: + +.. image:: ../images/add_quadrangle.png + :align: center + + +.. _adding_polygons_anchor: + +Adding polygons +############### + +.. image:: ../images/addpolygon.png + :align: center + +In this dialog box specify the nodes which will form your polygon by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. + +.. image:: ../images/add_polygone.png + :align: center + + +.. _adding_tetrahedrons_anchor: + +Adding tetrahedrons +################### + +.. image:: ../images/addtetrahedron.png + :align: center + +In this dialog box specify the nodes which will form your tetrahedron by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. Your tetrahedron will be created: + +.. image:: ../images/image70.jpg + :align: center + + +.. _adding_hexahedrons_anchor: + +Adding hexahedrons +################## + +.. image:: ../images/addhexahedron.png + :align: center + +In this dialog box specify the nodes which will form your hexahedron by selecting them in the 3D viewer with pressed Shift button and click +the **Apply** or **Apply and Close** button. Your hexahedron will be created: + +.. image:: ../images/image71.jpg + :align: center + +.. _adding_octahedrons_anchor: + +Adding hexagonal prism +###################### + +In the Add Hexagonal Prism dialog box specify the nodes which will form your hexagonal prism by selecting them in the 3D viewer with pressed Shift button and click the **Apply** or **Apply and Close** button. Your hexagonal prism will be created: + +.. image:: ../images/image_octa12.png + :align: center + + +.. _adding_polyhedrons_anchor: + +Adding polyhedrons +################## + +.. image:: ../images/a-createpolyhedralvolume.png + :align: center + +There are two different ways to add polyhedral volumes. + +If you select **Node** as **Elements Type** you will specify the nodes which will form the faces of your polyhedron by selecting the nodes in the 3D viewer with pressed Shift button and clicking the **Add** button to add the face in the list of Faces by Nodes, which will form your polyhedron. Note, that it could be very useful to toggle Polyhedron Preview checkbox to see the results of your selection. +The second way is somewhat simpler, however, there are cases when it does not provide you with the necessary level of precision. If you select **Face** as **Elements Type**, you will be able to select the faces which will form your polyhedron in the 3D viewer with pressed Shift button. If you've managed to obtain the necessary result, click the **Apply** or **Apply and Close** button. Your polyhedron will be created: + +.. image:: ../images/add_polyhedron.png + :align: center + diff --git a/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst new file mode 100644 index 000000000..f2deb4e2c --- /dev/null +++ b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst @@ -0,0 +1,49 @@ + +.. _adding_quadratic_elements_page: + +************************* +Adding Quadratic Elements +************************* + +MESH module allows you to work with **Quadratic Elements**. + +Quadratic elements are defined by the same corner nodes as the corresponding linear ones, but in addition they have *midside* nodes located between the corner nodes on element sides. + +If a quadratic 2D element has an additional node at the element center, it is a bi-quadratic element (both TRIA7 and QUAD9 elements are supported). If a quadratic hexahedral element has 7 additional nodes: at the element center and at the center of each side, it is a tri-quadratic element (or HEXA27). + +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. + +There are several ways to create quadratic elements in your mesh: + +* manually (this way is described below); +* use :ref:`quadratic_mesh_anchor` hypothesis to generate a quadratic mesh on your geometry; +* convert an existing linear mesh to a quadratic one (see :ref:`convert_to_from_quadratic_mesh_page`). + +**To add a quadratic element to your mesh:** + +#. Select your mesh in the Object Browser or in the 3D viewer. + +#. From the **Modification** menu choose the **Add** item and select one of the following: + + .. image:: ../images/image152.png + :align: center + +.. note:: + All dialogs for adding quadratic element to the mesh provide the possibility to automatically add an element to the specified group or to create the group anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input a new group name. The combo box lists groups of all the + :ref:`grouping_elements_page` both + :ref:`standalone_group`, + :ref:`group_on_filter`, and + :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. + If the user rejects conversion operation, it is cancelled and a new quadratic element is not created. + + +To create any **Quadratic Element** specify the nodes which will form your element by selecting them in the 3D viewer with pressed Shift button and click *Selection* button to the right of **Corner Nodes** label. Their numbers will appear in the dialog box as **Corner Nodes** (alternatively you can just input numbers in this field without selection; note that to use this way the mesh should be selected before invoking this operation). The edges formed by the corner nodes will appear in the table. To define the middle nodes for each edge, double-click on the respective field and input the number of the node (or pick the node in the viewer). For bi-quadratic and tri-quadratic elements, your also need to specify central nodes. As soon as all needed nodes are specified, a preview of a new quadratic element will be displayed in the 3D viewer. Then you will be able to click **Apply** or **Apply and Close** button to add the element to the mesh. + +.. image:: ../images/aqt.png + :align: center + +**Reverse** button reverses the element. + + + + diff --git a/doc/salome/gui/SMESH/input/additional_hypo.rst b/doc/salome/gui/SMESH/input/additional_hypo.rst new file mode 100644 index 000000000..ec308784f --- /dev/null +++ b/doc/salome/gui/SMESH/input/additional_hypo.rst @@ -0,0 +1,166 @@ +.. _additional_hypo_page: + +********************* +Additional Hypotheses +********************* + +**Additional Hypotheses** can be applied as a supplement to the main hypotheses, introducing additional concepts to mesh creation. + +An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`create_mesh_anchor` or :ref:`constructing_submeshes_page` dialog. + +The following additional hypothesis are available: + +* :ref:`propagation_anchor` and :ref:`propagofdistribution_anchor` hypotheses are useful for creation of quadrangle and hexahedral meshes. +* :ref:`viscous_layers_anchor` and :ref:`viscous_layers_anchor` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations. +* :ref:`quadratic_mesh_anchor` hypothesis allows generation of second order meshes. +* :ref:`quadrangle_preference_anchor` enables generation of quadrangles. + + + +.. _propagation_anchor: + +Propagation of 1D Hypothesis on opposite edges +############################################## + +**Propagation of 1D Hypothesis on opposite edges** allows to mesh +opposite sides of a quadrangle face and other adjacent quadrangles, +using the same hypothesis assigned to only one edge. +Thus you define a sub-mesh on the edge where you define 1D meshing +parameters and the **Propagation hypothesis**. These local meshing +parameters will be propagated via opposite sides of quadrangles to the +whole geometry, and this propagation stops at an edge with other local +meshing parameters. + +This hypothesis can be taken into account by +:ref:`a1d_algos_anchor` and +:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. + +**See Also** a sample TUI Script of a :ref:`tui_propagation` operation + +.. _propagofdistribution_anchor: + +Propagation of Node Distribution on Opposite Edges +################################################## + +**Propagation of Node Distribution on Opposite Edges** allows to propagate +distribution of nodes onto an opposite edge. If a local hypothesis and +propagation are defined on an edge of a quadrangular face, the +opposite edge will have the same number of nodes and the same +relations between segment lengths, unless another hypothesis +has been locally defined on the opposite edge. + +This hypothesis can be taken into account by +:ref:`a1d_algos_anchor` "Wire Discretization" and +:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. + +**See Also** a sample TUI Script of a :ref:`tui_propagation` operation + +.. _viscous_layers_anchor: + +Viscous Layers and Viscous Layers 2D +#################################### + +**Viscous Layers** and **Viscous Layers 2D** additional +hypotheses can be used by several 3D algorithms, for example +Hexahedron(i,j,k), or 2D algorithms, for example Triangle +(MEFISTO), correspondingly. These hypotheses allow creation of layers +of highly stretched elements, prisms in 3D and quadrilaterals in 2D, +near mesh boundary, which is beneficial for high quality viscous +computations. + +.. image:: ../images/viscous_layers_hyp.png + :align: center + +.. image:: ../images/viscous_layers_2d_hyp.png + :align: center + + +* **Name** - allows to define the name of the hypothesis. +* **Total thickness** - gives the total thickness of element layers. +* **Number of layers** - defines the number of element layers. +* **Stretch factor** - defines the growth factor of element height from the mesh boundary inwards. +* **Extrusion method** (available in 3D only) - defines how positions of nodes are found during prism construction and how the creation of distorted and intersecting prisms is prevented. +* **Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms. +* **Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. +* **Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. + + .. image:: ../images/viscous_layers_extrusion_method.png + :align: center + + .. centered:: + "Prisms created by the tree extrusion methods at the same other parameters" + +* **Specified Faces/Edges are** - defines how the shapes specified by the next parameter are used. +* **Faces/Edges with/without layers** - defines geometrical faces or edges on which element layers either should be or should not be constructed, depending on the value of the previous parameter (**Specified Faces/Edges are**). Faces (or edges) can be selected either in the Object Browser or in the VTK Viewer. **Add** button becomes active as soon as a suitable sub-shape is selected. + +.. note:: + A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of "Sub-shapes preview chunk size" preference (in Preferences/Mesh/General tab). + + +If faces/edges without layers are specified, the element layers are + not constructed on geometrical faces shared by several solids in 3D + case and edges shared by several faces in 2D case. In other words, + in this mode the element layers can be constructed on boundary faces + and edges only, and are not constructed on internal faces and + edges. There is an exception to this rule: if a hypothesis is + assigned to a sub-mesh, the element layers can be constructed on + boundary faces/edges of the shape of this sub-mesh, at same time + possibly being internal faces/edges within the whole model. + +.. image:: ../images/viscous_layers_on_submesh.png + :align: center + +.. centered:: + 2D viscous layers constructed on boundary edges of a sub-mesh on a disk face. + +If you use **several** hypotheses to define viscous layers on faces of + one solid, keep in mind the following. Each hypothesis defines a set + of faces with viscous layers (even if you specify faces without + layers). The sets of faces with viscous layers defined by several + hypotheses should not intersect, else the module won't add an + hypothesis that is incompatible with another one. + Also you can't define different number of layers on adjacent faces + of a solid. + This logic is also valid for the 2D hypothesis. + + + +.. image:: ../images/viscous_layers_mesh.png + :align: center + +.. centered:: + A group containing viscous layer prisms. + +**See also** a sample TUI script of a :ref:`tui_viscous_layers`. + + +.. _quadratic_mesh_anchor: + +Quadratic Mesh +############## + +Quadratic Mesh hypothesis allows to build a quadratic mesh (in which +links between element nodes are not straight but curved lines due to +presence of an additional mid-side node). + +This 1D hypothesis can be taken into account by +:ref:`a1d_algos_anchor` "Wire Discretization" and +:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. To create a quadratic mes assign this hypothesis at +:ref:`constructing_meshes_page`. + +See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. + + +.. _quadrangle_preference_anchor: + +Quadrangle Preference +##################### + +This additional hypothesis can be used together with 2D triangulation algorithms. +It allows 2D triangulation algorithms to build quadrangular meshes. + +Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm is obsolete since introducing :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. +Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm corresponds to specifying "Quadrangle Preference" transition type of :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. + +.. note:: + "Quadrangle Preference" transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else "Standard" transition type is used. diff --git a/doc/salome/gui/SMESH/input/area.rst b/doc/salome/gui/SMESH/input/area.rst new file mode 100644 index 000000000..35bf8e886 --- /dev/null +++ b/doc/salome/gui/SMESH/input/area.rst @@ -0,0 +1,30 @@ + +.. _area_page: + +**** +Area +**** + +.. note:: **Area** mesh quality control is based on the algorithm of area + calculation of mesh faces. + +**To apply the Area quality control to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Area** or click **"Area"** button. + + .. image:: ../images/image35.png + :align: center + + .. centered:: + **"Area" button** + +Your mesh will be displayed in the viewer with its faces colored +according to the applied mesh quality control criterion: + + .. image:: ../images/image5.jpg + :align: center + + +**See Also** a sample TUI Script of an :ref:`tui_area` operation. + diff --git a/doc/salome/gui/SMESH/input/aspect_ratio.rst b/doc/salome/gui/SMESH/input/aspect_ratio.rst new file mode 100644 index 000000000..080941743 --- /dev/null +++ b/doc/salome/gui/SMESH/input/aspect_ratio.rst @@ -0,0 +1,40 @@ +.. _aspect_ratio_page: + +************ +Aspect Ratio +************ + +The **Aspect Ratio** quality criterion for mesh elements reveals the degree of conformity of a mesh element to the regular element of its type (with all edges having the same length). + + +* The **Aspect Ratio** of a **triangle** 2D element consisting of 3 nodes is calculated by the formula: + + .. image:: ../images/formula4.png + :align: center + +* The **Aspect Ratio** of a **quadrangle** 2D element consisting of 4 nodes is calculated using The Verdict Geometric Quality Library available within VTK. The calculation formula is: + + .. image:: ../images/formula5.png + :align: center + +**To apply the Aspect Ratio quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Aspect Ratio** or click **Aspect Ratio** button in the toolbar. + + + .. image:: ../images/image37.png + :align: center + + .. centered:: + Aspect Ratio button + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image94.jpg + :align: center + + +**See Also** a sample TUI Script of an :ref:`tui_aspect_ratio` operation. + + diff --git a/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst new file mode 100644 index 000000000..2f25b1727 --- /dev/null +++ b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst @@ -0,0 +1,38 @@ +.. _aspect_ratio_3d_page: + +*************** +Aspect ratio 3D +*************** + +The **Aspect Ratio 3D** mesh quality criterion calculates the same parameter as the :ref:`aspect_ratio_page` criterion, but it is applied to 3D mesh elements: tetrahedrons, pentahedrons, hexahedrons, etc. + +* The **Aspect Ratio** of a **tetrahedron** 3D element defined by vertices {a,b,c,d } is calculated by the formula: + + .. image:: ../images/formula1.png + :align: center + +* Other element types like polyhedron, pentahedron and hexahedron use the following formula: + + .. image:: ../images/formula2.png + :align: center + +**To apply the Aspect Ratio 3D quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Aspect Ratio 3D** or click **"Aspect Ratio 3D"** button of the toolbar. + + + .. image:: ../images/image144.png + :align: center + + .. centered:: + "Aspect Ratio 3D" button + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image86.jpg + :align: center + + +**See Also** a sample TUI Script of a :ref:`tui_aspect_ratio_3d` operation. + diff --git a/doc/salome/gui/SMESH/input/bare_border_face.rst b/doc/salome/gui/SMESH/input/bare_border_face.rst new file mode 100644 index 000000000..f15a291c1 --- /dev/null +++ b/doc/salome/gui/SMESH/input/bare_border_face.rst @@ -0,0 +1,16 @@ +.. _bare_border_faces_page: + +***************** +Bare border faces +***************** + +This mesh quality control highlights the faces having the border not +shared with other faces (free border) and missing an edge based on +nodes of the free border. The faces with bare border are shown with a +color different from the color of shared faces. + +.. image:: ../images/bare_border_faces_smpl.png + :align: center + +**See also** A sample TUI Script making a group of faces highlighted in the picture is :ref:`tui_bare_border_faces`. + diff --git a/doc/salome/gui/SMESH/input/bare_border_volumes.rst b/doc/salome/gui/SMESH/input/bare_border_volumes.rst new file mode 100644 index 000000000..c6a9bec6a --- /dev/null +++ b/doc/salome/gui/SMESH/input/bare_border_volumes.rst @@ -0,0 +1,17 @@ +.. _bare_border_volumes_page: + +******************* +Bare border volumes +******************* + +This mesh quality control highlights the volumes having the border not +shared with other volumes (free border) and missing a face based on +nodes of the free border. The volumes with bare border are shown with a +color different from the color of shared volumes. + +.. image:: ../images/bare_border_volumes_smpl.png + :align: center + +**See also** A sample TUI Script making a group of volumes highlighted in the +picture is :ref:`tui_bare_border_volumes`. + diff --git a/doc/salome/gui/SMESH/input/basic_meshing_algos.rst b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst new file mode 100644 index 000000000..e1e7b2a01 --- /dev/null +++ b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst @@ -0,0 +1,97 @@ +.. _basic_meshing_algos_page: + +************************ +Basic meshing algorithms +************************ + +The MESH module contains a set of meshing algorithms, which are used for meshing entities (1D, 2D, 3D sub-shapes) composing geometrical objects. + +An algorithm represents either an implementation of a certain meshing technique or an interface to the whole meshing program generating elements of several dimensions. + +.. _a1d_algos_anchor: + +1D Entities +=========== + +* For meshing of 1D entities (**edges**): +* **Wire Discretization** meshing algorithm - splits an edge into a number of mesh segments following an 1D hypothesis. +* **Composite Side Discretization** algorithm - allows to apply a 1D hypothesis to a whole side of a geometrical face even if it is composed of several edges provided that they form C1 curve in all faces of the main shape. +* For meshing of 2D entities (**faces**): + + + * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements. + * :ref:`quad_ijk_algo_page` meshing algorithm - splits faces into quadrangular elements. + + .. image:: ../images/image123.gif + :align: center + + .. centered:: + "Example of a triangular 2D mesh" + + .. image:: ../images/image124.gif + :align: center + + .. centered:: + "Example of a quadrangular 2D mesh" + + * For meshing of 3D entities (**solid objects**): + + + * **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles. + .. image:: ../images/hexa_ijk_mesh.png + :align: center + + .. centered:: + "Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces" + + + * :ref:`cartesian_algo_page` meshing algorithm - solids are split into hexahedral elements forming a Cartesian grid; polyhedra and other types of elements are generated where the geometrical boundary intersects Cartesian cells. + .. image:: ../images/image125.gif + :align: center + + .. centered:: + "Example of a tetrahedral 3D mesh" + + .. image:: ../images/image126.gif + :align: center + + .. centered:: + "Example of a hexahedral 3D mesh" + + +Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can +generate 3D meshes from 2D meshes, working without geometrical +objects. + +There is also a number of more specific algorithms: + + * :ref:`prism_3d_algo_page` - for meshing prismatic 3D shapes with hexahedra and prisms. + * :ref:`quad_from_ma_algo_page` - for quadrangle meshing of faces with sinuous borders and rings. + * **Polygon per Face** meshing algorithm - generates one mesh face (either a triangle, a quadrangle or a polygon) per a geometrical face using all nodes from the face boundary. + * :ref:`projection_algos_page` - for meshing by projection of another mesh. + * :ref:`import_algos_page` - for meshing by importing elements from another mesh. + * :ref:`radial_prism_algo_page` - for meshing 3D geometrical objects with cavities with hexahedra and prisms. + * :ref:`radial_quadrangle_1D2D_algo_page` - for quadrangle meshing of disks and parts of disks. + * :ref:`use_existing_page` - to create a 1D or a 2D mesh in a python script. + * :ref:`segments_around_vertex_algo_page` - for defining the length of mesh segments around certain vertices. + + +:ref:`constructing_meshes_page` page describes in detail how to apply meshing algorithms. + +**See Also** a sample TUI Script of a :ref:`tui_defining_meshing_algos` operation. + + +.. toctree:: + :maxdepth: 2 + + quad_ijk_algo.rst + cartesian_algo.rst + prism_3d_algo.rst + quad_from_ma_algo.rst + projection_algos.rst + use_existing_algos.rst + radial_prism_algo.rst + radial_quadrangle_1D2D_algo.rst + define_mesh_by_script.rst + segments_around_vertex_algo.rst + diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst new file mode 100644 index 000000000..7fe6fac47 --- /dev/null +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst @@ -0,0 +1,15 @@ +.. _borders_at_multi_connection_page: + +*************************** +Borders at multi-connection +*************************** + +This mesh quality control highlights segments according to the number of elements, faces and volumes, to which the segment belongs. + +.. image:: ../images/image151.gif + :align: center + +In this picture the borders at multi-connection are displayed in blue. + +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection` operation. + diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst new file mode 100644 index 000000000..bc7e89bba --- /dev/null +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst @@ -0,0 +1,13 @@ +.. _borders_at_multi_connection_2d_page: + +****************************** +Borders at multi-connection 2D +****************************** + +This mesh quality control highlights borders of faces (links between nodes) according to the number of faces, to which the link belongs. + +.. image:: ../images/image127.gif + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection_2d` operation. + diff --git a/doc/salome/gui/SMESH/input/building_compounds.rst b/doc/salome/gui/SMESH/input/building_compounds.rst new file mode 100644 index 000000000..c2f922e10 --- /dev/null +++ b/doc/salome/gui/SMESH/input/building_compounds.rst @@ -0,0 +1,49 @@ +.. _building_compounds_page: + +************************ +Building Compound Meshes +************************ + +Compound Mesh is a combination of several meshes. All elements and groups present in input meshes are present in the compound mesh. However, it does not use geometry or hypotheses of the initial meshes. +The links between the input meshes and the compound mesh are not supported, consequently the modification of an input mesh does not lead to the update of the compound mesh. + +**To Build a compound mesh:** + +From the **Mesh** menu select **Build Compound** or click **"Build Compound Mesh"** button in the toolbar. + + .. image:: ../images/image161.png + :align: center + +**"Build Compound Mesh" button** + + +The following dialog box will appear: + + .. image:: ../images/buildcompound.png + :align: center + + * **Name** - allows selecting the name of the resulting **Compound** mesh. + * **Meshes, sub-meshes, groups** - allows selecting the meshes, sub-meshes and groups to be concatenated. They can be chosen in the Object Browser while holding **Ctrl** button. + * **Processing identical groups** - allows selecting the method of processing the namesake groups existing in the input meshes. They can be either + + * **United** - all elements of **Group1** of **Mesh_1** and **Group1** of **Mesh_2** become the elements of **Group1** of the **Compound_Mesh**, or + * **Renamed** - **Group1** of **Mesh_1** becomes **Group1_1** and **Group1** of **Mesh_2** becomes **Group1_2**. + + See :ref:`grouping_elements_page` for more information about groups. + * **Create groups from input objects** check-box permits to automatically create groups corresponding to every initial mesh. + + .. image:: ../images/buildcompound_groups.png + :align: center + + .. centered:: + "Groups created from input meshes 'Box_large' and 'Box_small'" + + * You can choose to additionally :ref:`merging_nodes_page`, :ref:`merging_elements_page` in the compound mesh, in which case it is possible to define the **Tolerance** for this operation. + + .. image:: ../images/image160.gif + :align: center + + .. centered:: + "Example of a compound of two meshed cubes" + +**See Also** a sample :ref:`tui_building_compound`. diff --git a/doc/salome/gui/SMESH/input/cartesian_algo.rst b/doc/salome/gui/SMESH/input/cartesian_algo.rst new file mode 100644 index 000000000..6d61ca87d --- /dev/null +++ b/doc/salome/gui/SMESH/input/cartesian_algo.rst @@ -0,0 +1,77 @@ +.. _cartesian_algo_page: + +********************************* +Body Fitting 3D meshing algorithm +********************************* + +Body Fitting algorithm generates hexahedrons of a Cartesian grid in +the internal part of geometry and polyhedrons and other types of +elements at the intersection of Cartesian cells with the geometrical +boundary. + +.. image:: ../images/cartesian3D_sphere.png + :align: center + +.. centered:: + "A sphere meshed by Body Fitting algorithm" + +The meshing algorithm is as follows. + +#. Lines of a Cartesian structured grid defined by :ref:`cartesian_hyp_anchor` hypothesis are intersected with the geometry boundary, thus nodes lying on the boundary are found. This step also allows finding out for each node of the Cartesian grid if it is inside or outside the geometry. +#. For each cell of the grid, check how many of its nodes are outside of the geometry boundary. Depending on a result of this check +#. skip a cell, if all its nodes are outside +#. skip a cell, if it is too small according to **Size Threshold** parameter +#. add a hexahedron in the mesh, if all nodes are inside +#. add a polyhedron or another cell type in the mesh, if some nodes are inside and some outside. + +To apply this algorithm when you define your mesh, select **Body Fitting** in the list of 3D algorithms and add **Body Fitting Parameters** hypothesis. The following dialog will appear: + +.. _cartesian_hyp_anchor: + +Body Fitting Parameters hypothesis +################################## + +.. image:: ../images/cartesian3D_hyp.png + :align: center + +.. centered:: + "Body Fitting Parameters hypothesis dialog" + +This dialog allows to define + +* **Name** of the algorithm. +* Minimal size of a cell truncated by the geometry boundary. If the size of a truncated grid cell is **Threshold** times less than a initial cell size, then a mesh element is not created. +* **Implement Edges** check-box activates incorporation of geometrical edges in the mesh. + + .. image:: ../images/cartesian_implement_edge.png + :align: center + + .. centered:: + "Implement Edges switched off to the left and on to the right" + +* **Definition mode** allows choosing how Cartesian structured grid is defined. Location of nodes along each grid axis is defined individually: + + * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. + .. note:: + that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. + * You can define the **Spacing** of a grid as an algebraic formula **f(t)** where *t* is a position along a grid axis normalized at [0.0,1.0]. **f(t)** must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. + +* **Fixed Point** group allows defining an exact location of a grid node in the direction defined by spacing. The following cases are possible: + + * If all three directions are defined by spacing, there will be a mesh node at the **Fixed Point**. + * If two directions are defined by spacing, there will be at least a link between mesh nodes passing through the **Fixed Point**. + * If only one direction is defined by spacing, there will be at least an element facet passing through the **Fixed Point**. + * If no directions are defined by spacing, **Fixed Point** is disabled. + +* **Directions of Axes** group allows setting the directions of grid axes. + + * If **Orthogonal Axes** check-box is activated the axes remain orthogonal during their modification. + * Selection buttons enable snapping corresponding axes to direction of a geometrical edge selected in the Object Browser. Edge direction is defined by coordinates of its end points. + * **Optimal Axes** button runs an algorithm that tries to set the axes to maximize the number of generated hexahedra. + * **Reset** button returns the axes in a default position parallel to the axes of the Global Coordinate System. + + + + +**See Also** a sample TUI Script of a :ref:`tui_cartesian_algo`. + diff --git a/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst new file mode 100644 index 000000000..f97fcbf7b --- /dev/null +++ b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst @@ -0,0 +1,33 @@ +.. _changing_orientation_of_elements_page: + +******************************** +Changing orientation of elements +******************************** + +Orientation of an element is changed by changing the order of its nodes. + +**To change orientation of elements:** + +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Orientation** item or click **Orientation** button in the toolbar. + + .. image:: ../images/image79.png + :align: center + + .. centered:: + **"Orientation" button** + + The following dialog box will appear: + + .. image:: ../images/orientaation1.png + :align: center + + * Select type of elements to reorient: **Face** or **Volume**. + * **The main list** shall contain the elements which will be reoriented. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of elements IDs. The **Set filter** button allows to apply a definite :ref:`filtering_elements` "filter" to the selection of elements. + * **Apply to all** radio button allows to modify the orientation of all elements of the selected mesh. + * *Select from** set of fields allows to choose a sub-mesh or an existing group whose elements can be added to the list. + +#. Click the **Apply** or **Apply and Close** button to confirm the operation. + +**See Also** a sample TUI Script of a :ref:`tui_orientation` operation. + diff --git a/doc/salome/gui/SMESH/input/clipping.rst b/doc/salome/gui/SMESH/input/clipping.rst new file mode 100644 index 000000000..df466d24b --- /dev/null +++ b/doc/salome/gui/SMESH/input/clipping.rst @@ -0,0 +1,58 @@ +.. _clipping_page: + +******** +Clipping +******** + +**Clipping** allows creating cross-section views (clipping planes) of your mesh. +It is available as a sub-item in the context menu of an active mesh. +To create a clipping plane, click on the **New** button in the dialog and choose how it is defined: by **Absolute** or **Relative** coordinates. +**Absolute Coordinates** + +.. image:: ../images/Clipping_Absolute.png + :align: center + +* **Base point** - allows defining the coordinates of the base point for the clipping plane. +* **Reset** - returns the base point to coordinate origin. +* **Direction** - allows defining the orientation of the clipping plane. +* **Invert** - allows selecting, which part of the object will be removed and which will remain after clipping. + +**Relative mode** + +.. image:: ../images/Clipping_Relative.png + :align: center + +* **Orientation** ( ||X-Y, ||X-Z or ||Y-Z). +* **Distance** between the opposite extremities of the boundary box of selected objects, if it is set to 0.5 the boundary box is split in two halves. +* **Rotation** (in angle degrees) **around X** (Y to Z) and **around Y** (X to Z) (depending on the chosen Orientation) + + .. image:: ../images/before_clipping_preview.png + :align: center + +"The preview plane and the cut object" + +The other parameters are available in both modes : + +* **OpenGL clipping** check-box allows choosing OpenGL native clipping, which clips the whole presentation. If it is unchecked, the clipping is done on the dataset i.e. only the visibility of separate mesh cells is changed (see the examples). +* The List contains **Meshes, sub-meshes and groups** to which the cross-section will be applied. +* **Select all** check-box allows to selecting and deselecting all available objects at once. +* **Show preview** check-box shows the clipping plane in the **3D Viewer**. +* **Auto Apply** check-box shows button is on, you can preview the cross-section in the **3D Viewer**. + +It is also possible to interact with the clipping plane directly in 3D view using the mouse. + +To get a new object from **Clipping**, click **Apply**. + +**Examples:** + + .. image:: ../images/dataset_clipping.png + :align: center + +"The cross-section using dataset" + + .. image:: ../images/opengl_clipping.png + :align: center + +"The OpenGL cross-section" + + diff --git a/doc/salome/gui/SMESH/input/colors_size.rst b/doc/salome/gui/SMESH/input/colors_size.rst new file mode 100644 index 000000000..b3606c637 --- /dev/null +++ b/doc/salome/gui/SMESH/input/colors_size.rst @@ -0,0 +1,41 @@ +.. _colors_size_page: + +********** +Properties +********** + +.. image:: ../images/colors_size.png + :align: center + +Using this dialog you can customize different properties of the mesh visualization parameters. + +The GUI elements in the "Properties" dialog box are grouped according to the entity types of mesh data. If some data entities are not present in the mesh object, the corresponding GUI elements are not shown. + +* **Nodes**: + * **Color** - color of nodes. + * **Type** and **Scale** - these options allow changing the nodes representation (see :ref:point_marker_page "Point Marker" page for more details). +* **Edges / wireframe**: + * **Color** - color of element borders in wireframe mode. + * **Width** - width of lines (edges and borders of elements in wireframe mode). +* **Faces**: + * **Front** - surface color of face elements (seen in shading mode). + * **Back** - backside surface color of face elements. Use the slider to select this color generated on the base of the **Face** color by changing its brightness and saturation. +* **Volumes**: + * **Normal** - surface color of normal volume elements (seen in shading mode). + * **Reversed** - surface color of volume elements. Use the slider to select this color generated on the base of the **Normal** color by changing its brightness and saturation. +* **Outlines**: + * **Color** - color of element borders in shading mode. + * **Width** - width of outlines (borders of elements in shading mode). +* **0D elements**: + * **Color** - color of 0D elements. + * **Size** - size of 0D elements. +* **Balls**: + * **Color** - color of discrete ball elements. + * **Size** - size of discrete ball elements. + * **Scale** - scale factor of discrete ball elements. +* **Orientation vectors**: + * **Color** - color of orientation vectors. + * **Scale** - size of orientation vectors. + * **3D vectors** - allows to choose between 2D planar and 3D vectors. +* **Shrink coef.** - relative space of elements compared to gaps between them in shrink mode. + diff --git a/doc/salome/gui/SMESH/input/connectivity.rst b/doc/salome/gui/SMESH/input/connectivity.rst new file mode 100644 index 000000000..1b61565a0 --- /dev/null +++ b/doc/salome/gui/SMESH/input/connectivity.rst @@ -0,0 +1,67 @@ +.. _connectivity_page: + +****************************** +Nodal connectivity of elements +****************************** + +The following images show order of nodes in correctly defined elements. + ++------------------------------------------------------------------------------+ +| Edge (segment): linear and quadratic | +| .. image:: ../images/connectivity_edge.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Triangle: linear, quadratic and bi-quadratic | +| .. image:: ../images/connectivity_tria.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Quadrangle: linear, quadratic and bi-quadratic | +| .. image:: ../images/connectivity_quad.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Polygon: linear and quadratic | +| .. image:: ../images/connectivity_polygon.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Tetrahedron: linear and quadratic | +| .. image:: ../images/connectivity_tetra.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Hexahedron: linear, quadratic and tri-quadratic | +| .. image:: ../images/connectivity_hexa.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Pentahedron: linear and quadratic | +| .. image:: ../images/connectivity_penta.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Pyramid: linear and quadratic | +| .. image:: ../images/connectivity_pyramid.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Hexagonal prism | +| .. image:: ../images/connectivity_hex_prism.png | +| :align: center | ++------------------------------------------------------------------------------+ +| Polyhedron is defined by | +| * a sequence of nodes defining all facets | +| * a sequence of number of nodes per facet | +| | +| **Nodes**: | +| Node1_of_Facet1, Node2_of_Facet1, ..., NodeN_of_Facet1, | +| Node1_of_Facet2, Node2_of_Facet2, ..., NodeN_of_Facet2, | +| Node1_of_FacetM, Node2_of_FacetM, ..., NodeN_of_FacetM | +| | +| **Quantity** of nodes per facet: | +| NbNodes_in_Facet1, NbNodes_in_Facet2, ..., NbNodes_in_FacetM | +| | +| For example the polyhedron shown in the image below is defined by nodes | +| [ 1,2,3, 1,4,5,2, 2,5,6,3, 3,6,4,1, 4,7,9,5, 5,9,8,6, 6,8,7,4, 7,8,9 ] | +| and quantities [ 3, 4, 4, 4, 4, 4, 4, 3 ] | +| | +| .. image:: ../images/connectivity_polyhedron.png | +| :align: center | +| | +| Order of nodes of a facet must assure outward direction of its normal. | ++------------------------------------------------------------------------------+ + diff --git a/doc/salome/gui/SMESH/input/constructing_meshes.rst b/doc/salome/gui/SMESH/input/constructing_meshes.rst new file mode 100644 index 000000000..276d3a7c7 --- /dev/null +++ b/doc/salome/gui/SMESH/input/constructing_meshes.rst @@ -0,0 +1,435 @@ +.. _constructing_meshes_page: + +******************* +Constructing meshes +******************* + +To create a mesh on geometry, it is necessary to create a mesh object by choosing + +* a geometrical shape produced in the Geometry module (*main shape*); +* *meshing parameters*, including + * :ref:`basic_meshing_algos_page` and + * :ref:`about_hypo_page` specifying constraints to be taken into account by the chosen meshing algorithms. + +Then you can launch mesh generation by invoking :ref:`compute_anchor` command. +The generated mesh will be automatically shown in the Viewer. You can +switch off automatic visualization or limit mesh size until which it is +automatically shown in :ref:`mesh_preferences_page` (**Automatic update** entry). + +.. note:: + Sometimes *hypotheses* term is used to refer to both algorithms and hypotheses. + +Mesh generation on the geometry is performed in the bottom-up +flow: nodes on vertices are created first, then edges are divided into +segments using nodes on vertices; the nodes of segments are then +used to mesh faces; then the nodes of faces are used to mesh +solids. This automatically assures the conformity of the mesh. + +It is required to choose a meshing algorithm for every dimension of +sub-shapes up to the highest dimension to be generated. Note +that some algorithms generate elements of several dimensions, and +others of only one. It is not necessary to define meshing +parameters for all dimensions at once; you can start from 1D +meshing parameters only, compute the 1D mesh, then define 2D meshing +parameters and compute the 2D mesh (note that 1D mesh will not be +re-computed). + +An algorithm of a certain dimension chosen at mesh creation is applied +to discretize every sub-shape of this dimension. It is possible to +specify a different algorithm or hypothesis to be applied to one or +a group of sub-shapes by creating a :ref:`constructing_submeshes_page`. +You can specify no algorithms at all at mesh object +creation and specify the meshing parameters on sub-meshes only; then +only the sub-shapes, for which an algorithm and a hypothesis (if any) +have been defined will be discretized. + +.. note:: Construction of a mesh on a geometry includes at least two (:ref:`create_mesh_anchor` and :ref:`compute_anchor`) of the following steps: + + * :ref:`create_mesh_anchor`, where you can specify meshing parameters to apply to all sub-shapes of the main shape. + * :ref:`constructing_submeshes_page`, (optional) where you can specify meshing parameters to apply to the selected sub-shapes. + * :ref:`evaluate_anchor` (optional) can be used to know an approximate number of elements before their actual generation. + * :ref:`preview_anchor` (optional) can be used to generate mesh of only lower dimension(s) in order to visually estimate it before full mesh generation, which can be much longer. + * :ref:`submesh_order_anchor` (optional) can be useful if there are concurrent sub-meshes defined. + * :ref:`compute_anchor` uses defined meshing parameters to generate mesh elements. + * :ref:`edit_anchor` (optional) can be used to :ref:`modifying_meshes_page` the mesh of a lower dimension before :ref:`compute_anchor` elements of an upper dimension. + + +.. _create_mesh_anchor: + +Creation of a mesh object +######################### + +**To construct a mesh:** + +#. Select a geometrical object for meshing. +#. In the **Mesh** menu select **Create Mesh** or click **"Create Mesh"** button in the toolbar. + + .. image:: ../images/image32.png + :align: center + + .. centered:: + **"Create Mesh" button** + + The following dialog box will appear: + + .. image:: ../images/createmesh-inv.png + :align: center + +#. To filter off irrelevant meshing algorithms, you can select **Mesh Type** in the corresponding list from **Any, Hexahedral, Tetrahedral, Triangular** and **Quadrilateral** (there can be less items for the geometry of lower dimensions). Selection of a mesh type hides all meshing algorithms that cannot generate elements of this type. + +#. Apply :ref:`basic_meshing_algos_page` and :ref:`about_hypo_page` which will be used to compute this mesh. + + "Create mesh" dialog box contains several tab pages titled **3D**, **2D**, **1D** and **0D**. The title of each page reflects the dimension of the sub-shapes the algorithms listed on this page affect and the maximal dimension of elements the algorithms generate. For example, **3D** page lists the algorithms that affect 3D sub-shapes (solids) and generate 3D mesh elements (tetrahedra, hexahedra etc.) + + As soon as you have selected an algorithm, you can create a hypothesis (or select an already created one). A set of accessible hypotheses includes only the hypotheses that can be used by the selected algorithm. + + .. note:: + * Some page(s) can be disabled if the geometrical object does not include shapes (sub-shapes) of the corresponding dimension(s). For example, if the input object is a geometrical face, **3D** page is disabled. + * Some algorithms affect the geometry of several dimensions, i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the dialog pages related to the corresponding lower dimensions are disabled. + * **0D** page refers to 0D geometry (vertices) rather than to 0D elements. Mesh module does not provide algorithms that produce 0D elements. Currently **0D** page provides only one algorithm "Segments around vertex" that allows specifying the required size of mesh edges about the selected vertex (or vertices). + + For example, you need to mesh a 3D object. + + First, you can change a default name of your mesh in the **Name** box. Then check that the selected geometrical object indicated in **Geometry** field, is what you wish to mesh; if not, select the correct object in the Object Browser. Click "Select" button near **Geometry** field if the name of the object has not yet appeared in **Geometry** field. + .. image:: ../images/image120.png + :align: center + + .. centered:: + **"Select" button** + + Now you can define 3D Algorithm and 3D Hypotheses, which will be applied to discretize the solids of your geometrical object using 3D elements. Click the **"Add Hypothesis"** button to create and add a hypothesis. + .. image:: ../images/image121.png + :align: center + + .. centered:: + **"Add Hypothesis" button** + + Click the **"Plus"** button to enable adding more additional hypotheses. + + Click the **"Edit Hypothesis"** button to change the values for the current hypothesis. + .. image:: ../images/image122.png + :align: center + + .. centered:: + **"Edit Hypothesis" button** + + Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain: + + * **\** if the algorithm can work using default parameters. + * **\** if the algorithm requires a hypothesis defining its parameters. + * If the algorithm does not use hypotheses, this field is grayed. + + After selection of an algorithm **Add. Hypothesis** field can contain: + + * **\** if the algorithm can be tuned using an additional hypothesis. + * If the algorithm does not use additional hypotheses, this field is grayed. + + + Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm. + + If you wish you can select other algorithms and/or hypotheses for meshing some sub-shapes of your CAD model by :ref:`constructing_submeshes_page`. + + Some algorithms generate mesh of several dimensions, while others produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several Hypotheses for each dimension of your object, otherwise you will not get any mesh at all. Of course, if you wish to mesh a face, which is a 2D object, you do not need to define a 3D Algorithm and Hypotheses. + + In the **Object Browser** the structure of the new mesh is displayed as follows: + + .. image:: ../images/image88.jpg + :align: center + + It contains: + + * a mesh name (**Mesh_mechanic**); + * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*); + * **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh; + * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh. + * **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds. + * **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls. + + + There is an alternative way to assign Algorithms and Hypotheses by clicking **Assign a set of hypotheses** button and selecting among pre-defined sets of algorithms and hypotheses. In addition to the built-in sets of hypotheses, it is possible to create custom sets by editing CustomMeshers.xml file located in the home directory. CustomMeshers.xml file must describe sets of hypotheses in the same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml file does (sets of hypotheses are enclosed between \ tags). For example: + :: + + + + + + + + + + If the file contents are incorrect, there can be an error at activation of Mesh module: **"fatal parsing error: error triggered by consumer in line ..."** + + .. image:: ../images/hypo_sets.png + :align: center + + List of sets of hypotheses. Tag **[custom]** is automatically added to the sets defined by the user. + + .. note:: + * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. + * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. + + +Consider trying a sample script for construction of a mesh from our :ref:`tui_creating_meshes_page` section. + +.. _evaluate_anchor: + +Evaluating mesh size +#################### + +After the mesh object is created and all hypotheses are assigned and before :ref:`compute_anchor` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**. +The result of evaluation will be displayed in the following information box: + + .. image:: ../images/mesh_evaluation_succeed.png + :align: center + +.. _preview_anchor: + +Previewing the mesh +################### + +Before :ref:`compute_anchor` , it is also possible to see the mesh preview. This operation allows to incrementally compute the mesh, dimension by dimension, and to discard an unsatisfactory mesh. + +For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button in the toolbar or activate "Preview" item from the pop-up menu. + +.. image:: ../images/mesh_precompute.png + :align: center + +.. centered:: + **"Preview" button** + +Select **1D mesh** or **2D mesh** preview mode in the Preview dialog. + +.. image:: ../images/preview_mesh_1D.png + :align: center + +.. centered:: + "1D mesh preview shows nodes computed on geometry edges" + + +.. image:: ../images/preview_mesh_2D.png + :align: center + +.. centered:: + "2D mesh preview shows edge mesh elements, computed on geometry faces" + + +**Compute** button computes the whole mesh. + +When the Preview dialog is closed, the question about the storage of temporarily created mesh elements appears: + +.. image:: ../images/preview_tmp_data.png + :align: center + +These elements can be kept in the mesh. + + +.. _submesh_order_anchor: + +Changing sub-mesh priority +########################## + +If the mesh contains concurrent :ref:`constructing_submeshes_page`, it is possible to change the priority of their computation, i.e. to change the priority of applying algorithms to the shared sub-shapes of the Mesh shape. + +**To change sub-mesh priority:** + +Choose "Change sub-mesh priority" from the Mesh menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority. + +There is an example of sub-mesh order modifications taking a Mesh created on a Box shape. The main Mesh object: + +* *1D* **Wire discretisation** with **Number of Segments** =20 +* *2D* **Triangle: Mefisto** with Hypothesis **Max Element Area** + + +The first sub-mesh **Submesh_1** created on **Face_1** is: + +* *1D* **Wire discretisation** with **Number of Segments** =4 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 + +The second sub-mesh **Submesh_2** created on **Face_2** is: + +* *1D* **Wire discretisation** with **Number of Segments** =8 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 + + +And the last sub-mesh **Submesh_3** created on **Face_3** is: + +* *1D* **Wire discretisation** with **Number of Segments** =12 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 + + +The sub-meshes become concurrent if they share sub-shapes that can be meshed with different algorithms (or different hypotheses). In the example, we have three sub-meshes with concurrent algorithms, because they have different hypotheses. + +The first mesh computation is made with: + +.. image:: ../images/mesh_order_123.png + :align: center + +.. centered:: + **"Mesh order SubMesh_1, SubMesh_2, SubMesh_3"** + + +.. image:: ../images/mesh_order_123_res.png + :align: center + +.. centered:: + **"Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 "** + +The next mesh computation is made with: + +.. image:: ../images/mesh_order_213.png + :align: center + +.. centered:: + **"Mesh order SubMesh_2, SubMesh_1, SubMesh_3"** + +.. image:: ../images/mesh_order_213_res.png + :align: center + +.. centered:: + **"Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 "** + +And the last mesh computation is made with: + +.. image:: ../images/mesh_order_321.png + :align: center + +.. centered:: + **"Mesh order SubMesh_3, SubMesh_2, SubMesh_1"** + + +.. image:: ../images/mesh_order_321_res.png + :align: center + +.. centered:: + **"Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 "** + +As we can see, each mesh computation has a different number of result +elements and a different mesh discretization on the shared edges (the edges +that are shared between **Face_1**, **Face_2** and **Face_3**) + +Additionally, sub-mesh priority (the order of applied algorithms) can +be modified not only in a separate dialog box, but also in +the **Preview**. This helps to preview different mesh results, +modifying the order of sub-meshes. + +.. image:: ../images/mesh_order_preview.png + :align: center + +.. centered:: + **"Preview with sub-mesh priority list box"** + +If there are no concurrent sub-meshes under the Mesh object, the user +will see the following information. + +.. image:: ../images/mesh_order_no_concurrent.png + :align: center + +.. centered:: + **"No concurrent submeshes detected"** + + +.. _compute_anchor: + +Computing the mesh +################## + +It is equally possible to skip :ref:`evaluate_anchor` +and :ref:`preview_anchor` and to **Compute** the mesh after +the hypotheses are assigned. For this, select your mesh in +the **Object Browser**. From the **Mesh** menu or the context menu +select **Compute** or click *"Compute"* button of the toolbar. + +.. image:: ../images/image28.png + :align: center + +.. centered:: + **"Compute" button** + +After the mesh computation finishes, the Mesh Computation information +box appears. If you close this box and click "Compute" button again, +without previously changing meshing parameters, the mesh will NOT be +re-computed and the Mesh Computation information box will be shown +with the same contents. (To fully re-compute the mesh, invoke +:ref:`clear_mesh_anchor` command before). + +.. _meshing_result_anchor: + +Meshing Results +=============== + +If the mesh computation has been a success, the box shows information on the number of entities of different types in the mesh. + +.. image:: ../images/meshcomputationsucceed.png + :align: center + +.. _meshing_failed_anchor: + +Meshing Failed +============== + +If the mesh computation has failed, the information about the cause of the failure is provided in **Errors** table. + +.. image:: ../images/meshcomputationfail.png + :align: center + +After you select an error in **Errors** table, **Show Sub-shape** button allows +visualizing in magenta the geometrical entity meshing of which failed +(Name of this entity or its ID and type is shown in *Sub-shape* column). + +.. image:: ../images/failed_computation.png + :align: center + +.. centered:: + 3D algorithm failed to compute mesh on a box shown using **Show Sub-shape** button + +**Publish Sub-shape** button publishes the sub-shape, whose meshing +has failed, in the Geometry component as a child of the main shape, which +allows analyzing the problematic geometry and creating a sub-mesh on it in +order to locally tune the hypotheses. + +If the failure is caused by an invalid input mesh and the algorithm has +found which mesh entities are bad, **Show bad Mesh** +button appears in the dialog. Clicked, it shows the bad mesh entities in +the Viewer in magenta. Sometimes the shown mesh entities are too small +or/and hidden by other mesh elements. They can be seen after +switching the mesh to Wireframe visualization mode or switching off +the visualization of faces and volumes (if any). + +**Bad Mesh to Group** button creates groups of bad mesh entities to facilitate their analysis. + +.. image:: ../images/show_bad_mesh.png + :align: center + +Edges bounding a hole in the surface are shown in magenta using **Show bad Mesh** button + +.. note:: + Mesh Computation Information box does not appear if you set :ref:`show_comp_result_pref` preference to the "Never" value. This option gives the possibility to control mesh computation reporting. There are the following possibilities: always show the information box, show only if an error occurs or never. By default, the information box is always shown after mesh computation operation. + +.. _edit_anchor: + +Editing the mesh +################ + +It is possible to :ref:`modifying_meshes_page` of a +lower dimension before generation of the mesh of a higher dimension. + +For example you can generate a 2D mesh, modify it using e.g. :ref:`pattern_mapping_page`, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows: + +* Define 1D and 2D meshing algorithms. +* Compute the mesh. 2D mesh is generated. +* Apply :ref:`pattern_mapping_page`. +* Define 3D meshing algorithms without modifying 1D and 2D algorithms and hypotheses. +* Compute the mesh. 3D mesh is generated. + +.. note:: + Nodes and elements added :ref:`adding_nodes_and_elements_page` cannot be used in this workflow because the manually created entities are not attached to any geometry and thus (usually) cannot be found by the mesher paving a geometry. + +**See Also** a sample TUI Script demonstrates the possibility of :ref:`tui_editing_while_meshing`. + +.. toctree:: + :maxdepth: 2 + + basic_meshing_algos.rst + about_hypo.rst diff --git a/doc/salome/gui/SMESH/input/constructing_submeshes.rst b/doc/salome/gui/SMESH/input/constructing_submeshes.rst new file mode 100644 index 000000000..3f414135d --- /dev/null +++ b/doc/salome/gui/SMESH/input/constructing_submeshes.rst @@ -0,0 +1,145 @@ +.. _constructing_submeshes_page: + +*********************** +Constructing sub-meshes +*********************** + +.. contents:: `Table of contents` + +By purpose, the sub-mesh is an object used to assign to a sub-shape +different meshing parameters than those assigned to the main shape. + +Structurally, the sub-mesh is a mesh on a certain sub-shape, or a group of +sub-shapes, possibly generated using different meshing algorithms +and/or hypotheses than those used to generate the mesh on other +sub-shapes. + +Creation of a sub-mesh allows to control individually meshing of a +certain sub-shape, thus to get a locally coarser or finer mesh, to get +elements of different types in the same mesh, etc. + +A sub-mesh can be meshed individually. To achieve this, select a +sub-mesh and either invoke **Compute Sub-mesh** vai the contextual +menu in the Object Browser or invoke **Mesh > Compute** menu. + +.. _submesh_shape_section: + +How to get a sub-shape for sub-mesh construction +################################################ + +A sub-shape to create a sub-mesh on should be retrieved from the main shape +in one of the following ways: + + * In Geometry module, via **New Entity > Explode** menu. + * In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). + * In Mesh module, by :ref:`subshape_by_mesh_elem` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. + * In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing_failed_anchor`. + + +.. :submesh_priority: + +How hypotheses are selected among sub-meshes +############################################ + +Internally, definition of meshing parameters to apply for +discretization of a certain sub-shape, for example an edge of a +compound of solids, starts from searching an algorithm, 1D as for the +edge. The following sub-shapes are sequentially checked for presence +of a sub-mesh where 1D algorithm is assigned: + + * the **edge** itself + * **groups of edges** containing the edge, if any + * **wires** sharing the edge + * **faces** sharing the edge + * **groups of faces** sharing the edge, if any + * **shells** sharing the edge + * **solids** sharing the edge + * **groups of solids** sharing the edge, if any + * the **main shape** + +(This sequence of sub-shapes defines the priority of sub-meshes. Thus more +local, i.e. assigned to sub-shape of lower dimension, algorithms and +hypotheses have higher priority during the search of hypotheses to +apply.) + +As soon as a 1D algorithm is found, the search stops and the same +sequence of sub-shapes is checked to find the main and additional 1D +hypotheses, which can be taken into account by the found 1D algorithm. + +The multi-dimensional algorithms have a higher priority than +uni-dimensional ones if they are assigned to sub-meshes of the +same priority. + +If meshing parameters are defined on sub-meshes of the same priority, +for example, different 1D hypotheses are assigned to two faces sharing +an edge, the hypothesis assigned to a sub-shape with a lower ID will +be used for meshing. You can :ref:`submesh_order_anchor` mutual +priority of such concurrent sub-meshes. + +.. _submesh_definition: + +How to construct a sub-mesh +########################### + +.. note:: Construction of a sub-mesh consists of: + * Selecting a mesh which will encapsulate the sub-mesh + * Selecting a sub-shape for meshing + * Applying one or several :ref:`about_hypo_page` and :ref:`basic_meshing_algos_page` which will be used for discretization of this sub-shape. + + +**To construct a sub-mesh:** +From the **Mesh** menu select **Create Sub-mesh** or click **"Create Sum-mesh"** button in the toolbar. + + .. image:: ../images/image33.gif + :align: center + + .. centered:: + **"Create Sub-mesh" button** + +The following dialog box will appear: + + .. image:: ../images/createmesh-inv2.png + :align: center + +It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`constructing_meshes_page` dialog. + +Later you can change the applied hypotheses or their parameters in :ref:`editing_meshes_page` dialog. Mesh entities generated using changed hypotheses are automatically removed. + +.. _subshape_by_mesh_elem: + +Subshape by mesh element +======================== + +If the parent mesh is already computed, then you can define the **Geometry** by picking mesh elements computed on a sub-shape of interest in the 3D Viewer, i.e. you do not have to extract this sub-shape in Geometry module beforehand. To start element selection, press *Selection* button to the right of **Geometry** label. If this button is already down, then click it to release and then click it again. The following pop-up menu allowing to choose a way of geometry definition will appear. + +.. image:: ../images/choose_geom_selection_way.png + :align: center + +**Direct geometry selection** enables selecting the sub-shape in the Objec Browser. +**Find geometry by mesh element selection** activates the following dialog. + +.. image:: ../images/find_geom_by_mesh_elem.png + :align: center + +In this dialog, **Element Type** defines a kind of element to pick in the Viewer. Instead of picking an element in the Viewer, you can type its ID in **Element ID** field. **Geometry name** field allows defining a name of the sub-shape, with which the sub-shape will appear in the Object Browser (if not yet there). + + +.. _submesh_tree: + +Sub-mesh in the Object Browser +############################## + +In the Object Browser the structure of the new sub-mesh will be displayed as follows: + + .. image:: ../images/image10.jpg + :align: center + +It contains: + * a sub-mesh name (*SubMeshFace1*) + * a reference to the geometrical object on the basis of which the sub-mesh has been constructed (**Cylindrical Face_1**); + * **Applied hypotheses** folder containing references to hypotheses assigned to the sub-mesh; + * **Applied algorithms** folder containing references to algorithms assigned to the sub-mesh. + + +**See Also** a sample TUI Script of a :ref:`tui_construction_submesh` operation. + diff --git a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst new file mode 100644 index 000000000..0fa226cfb --- /dev/null +++ b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst @@ -0,0 +1,54 @@ +.. _convert_to_from_quadratic_mesh_page: + +**************************************** +Convert to/from Quadratic Mesh +**************************************** + +This functionality allows transforming linear meshes (or sub-meshes) to quadratic and vice versa. + +.. Note:: + that conversion of a sub-mesh most probably will produce a non-conformal mesh. Elements on the boundary between quadratic and linear sub-meshes become (or remain) quadratic. + +See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. + +**To produce a conversion:** + +#. Select a mesh or a sub-mesh in the Object Browser or in the Viewer. +#. From the Modification menu or from the contextual menu in the Object Browser choose **Convert to/from Quadratic Mesh** item, or click **"Convert to/from quadratic"** button in the toolbar. + + .. image:: ../images/image154.png + :align: center + + .. centered:: + **"Convert to/from quadratic" button** + + The following dialog box will appear: + + .. image:: ../images/convert.png + :align: center + +#. In this dialog box specify: + + * If it is necessary to convert a linear mesh to quadratic or a quadratic mesh to linear. **Convert to bi-quadratic** creates some types of quadratic elements with additional central nodes: TRIA7, QUAD9 and HEXA27 elements instead of TRIA6, QUAD8, and HEXA20 elements respectively. + * If it is necessary to place **medium nodes** of the quadratic mesh **on the geometry** (meshed shape). This option is relevant for conversion to quadratic provided that the mesh is based on a geometry (not imported from file). + + .. image:: ../images/image156.gif + :align: center + + .. centered:: + Linear mesh (coarse mesh on a torus) + + + .. image:: ../images/image155.gif + :align: center + + .. centered:: + Quadratic mesh + + + * Click the **Apply** or **Apply and Close** button. + + +**See Also** a sample TUI Script of a :ref:`tui_quadratic` operation. + + diff --git a/doc/salome/gui/SMESH/input/copy_mesh.rst b/doc/salome/gui/SMESH/input/copy_mesh.rst new file mode 100644 index 000000000..0f542df43 --- /dev/null +++ b/doc/salome/gui/SMESH/input/copy_mesh.rst @@ -0,0 +1,43 @@ +.. _copy_mesh_page: + +********* +Copy Mesh +********* + +A mesh can be created by copying a part of or the whole other mesh. + +**To make a copy of a mesh:** + +From the contextual menu in the Object Browser of from the **Mesh** menu select **Copy Mesh** or click **"Copy Mesh"** button in the toolbar. + +.. image:: ../images/copy_mesh_icon.png + :align: center + +.. centered:: + **"Copy Mesh" button** + +The following dialog box will appear: + +.. image:: ../images/copy_mesh_dlg.png + :align: center + + +In the dialog: + + * specify the part of mesh to copy: + + * **Select whole mesh, sub-mesh or group** by mouse activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the **Source Element IDs** directly in this field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` "Selection filter library" page. + + * specify the **New Mesh Name**; + * specify the conditions of copying: + + * activate **Generate groups** checkbox to copy the groups of the source mesh to the newly created mesh. + + * Click **Apply** or **Apply and Close** button to confirm the operation. + + +**See Also** a sample :ref:`tui_copy_mesh`. + diff --git a/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst new file mode 100644 index 000000000..790e884d9 --- /dev/null +++ b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst @@ -0,0 +1,22 @@ +.. _create_groups_from_geometry_page: + +*************************** +Create Groups from Geometry +*************************** + +This operation allows creating groups on geometry on all selected shapes. Only the main shape of the mesh and its sub-shapes can be selected. + +The type of each new group is defined automatically by the nature of the **Geometry**. +The group names will be the same as the names of geometrical objects. + +.. warning:: It's impossible to create a group of **0D elements** or **ball elements** with this operation. For this, it is necessary to use :ref:`creating_groups_page` operation. + +To use this operation, select in the **Mesh** menu or in the contextual menu in the Object browser **Create Groups from Geometry** item. + +.. image:: ../images/create_groups_from_geometry.png + :align: center + +In this dialog **Elements** group contains a list of shapes, on which groups of elements will be created; **Nodes** group contains a list of shapes, on which groups of nodes will be created. + + + diff --git a/doc/salome/gui/SMESH/input/creating_groups.rst b/doc/salome/gui/SMESH/input/creating_groups.rst new file mode 100644 index 000000000..d24d7c3c0 --- /dev/null +++ b/doc/salome/gui/SMESH/input/creating_groups.rst @@ -0,0 +1,112 @@ +.. _creating_groups_page: + +*************** +Creating groups +*************** + +In MESH you can create a :ref:`grouping_elements_page` of elements of a certain type. The main way to create a group, is to +select in the **Mesh** menu **Create Group** item (also available in the context menu of the mesh). +To create a group you should define the following: + +* **Mesh** - the mesh whose elements will form your group. You can select your mesh in the Objet Browser or in the 3D viewer. +* **Elements Type** - set of radio buttons allows to select the type of elements which will form your group: + * **Nodes** + * **0D Element** + * **Ball** + * **Edges** + * **Faces** + * **Volumes** +* **Name** field allows to enter the name of your new group. +* **Color** - allows to assign to the group a certain color. The chosen color is used to display the elements of the group. Activation of **Auto Color** item in mesh context menu switches on a random choice of a color for a new group. + +Mesh module distinguishes between the three Group types: +**Standalone Group**, **Group on Geometry** and **Group on Filter**. + + +.. _standalone_group: + +"Standalone Group" +################## + +**Standalone Group** contains a list of mesh elements, which you can define in +the following ways: + +* By adding all entities of the chosen type existing in the mesh. For this, turn on the **Select All** check-box. In this mode all controls, which allow selecting the entities, are disabled. +* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` "Selection filter library" page. +* By adding entities from either a sub-mesh or another group. For this, turn on the **Enable manual edition** check box. **Select from** fields group allows to select a sub-mesh or a group of the appropriate type and to **Add** their elements to the group. + +In the **manual edition** mode you can + +* click the **Remove** button to remove the selected items from the list. +* click the **Sort List** button to sort the list of IDs of mesh elements. + +.. image:: ../images/creategroup.png + :align: center + +For example, to create a new group containing all faces of an existing group and some other faces selected in the viewer: + +* Select the **Face** type of entities and input the name of the new group. +* Check the **Group** checkbox in **Select From** group. +* Select the existing group of faces in the object browser or in the viewer. +* Click **Add** in **Content** group. **Id Elements** list will be filled with IDs of faces belonging to the selected group. +* Select other faces in the viewer. +* Click **Add** in **Content** group. +* Click **Apply** button to create the new group. + + +Please note that the new group does not have references to the source group. It contains only the list of face IDs. So if the source group is changed, the new one is not updated accordingly. + +.. image:: ../images/image130.gif + :align: center + +.. centered:: + In this picture the brown cells belong to a group defined manually. + +**See Also** a sample TUI Script of a :ref:`tui_create_standalone_group` operation. + + +.. _group_on_geom: + +"Group on Geometry" +################### + +To create a group on geometry check **Group on geometry** in the **Group** **type** field. The group on geometry contains the elements of a certain type generated on the selected geometrical object. Group contents are dynamically updated if the mesh is modified. The group on geometry can be created only if the mesh is based on geometry. + +To define a group, click the *Selection* button and choose + +* **Direct geometry selection** to select a shape in the Object Browser or in the Viewer; +* **Find geometry by mesh element selection** to activate a dialog which retrieves a shape by the selected element generated on this shape. + +.. note:: + that this choice is available only if the mesh elements are already generated. + +.. image:: ../images/a-creategroup.png + :align: center + +After confirmation of the operation a new group of mesh elements will be created. + +.. image:: ../images/image132.gif + :align: center + +In this picture the cells which belong to a certain geometrical face are selected in green. + +**See Also** a sample TUI Script of a :ref:`tui_create_group_on_geometry` operation. + + +.. _group_on_filter: + +"Group on Filter" +################# + +To create a group on filter check **Group on filter** in the **Group type** field. +The group on filter contains the elements of a certain type satisfying the defined filter. +Group contents are dynamically updated if the mesh is modified. + +To define a group, click the **Set filter** button and define criteria of the filter in the opened dialog. After the operation is confirmed, a new group of mesh elements will be created. See more about filters on the :ref:`selection_filter_library_page` page. + + .. image:: ../images/creategroup_on_filter.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_create_group_on_filter` operation. + + diff --git a/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst new file mode 100644 index 000000000..889ed666f --- /dev/null +++ b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst @@ -0,0 +1,59 @@ +.. _cut_mesh_by_plane_page: + +********************************* +Cut a tetrahedron mesh by a plane +********************************* + +MeshCut works only with MED files and produces MED files, and is a standalone program. It can be used either directly from a command shell outside SALOME, or with a GUI interface in SMESH, provided in a python plugin that needs to be installed in your SALOME application. + +MeshCut allows to cut a mesh constituted of linear tetrahedrons by a plane. +The tetrahedrons intersected by the plane are cut and replaced by elements of various types, (tetrahedron, pyramid, pentahedron). + + +.. _meshcut_standalone: + +Using MeshCut as a standalone program, outside SALOME +##################################################### + +MeshCut is a standalone program, reading and producing med files. + +Syntax:: + + MeshCut input.med output.med resuMeshName aboveGroup belowGroup nx ny nz px py pz T + +where:: + + input.med = name of the original mesh file in med format + output.med = name of the result mesh file in med format + resuMeshName = name of the result mesh + aboveGroup = name of the group of volumes above the cut plane + belowGroups = name of the group of volumes below the cut plane + nx ny nz = vector normal to the cut plane + px py pz = a point of the cut plane + T = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to the cut plane if their distance from the plane is inferior to L*T, + where L is the mean edge size of the tetrahedron + + +.. _meshcut_plugin: + +Using MeshCut inside SALOME +########################### + +When the MeshCut plugin is installed, it can be found in the Mesh menu, sub-menu SMESH_plugins. +If the plugin is not installed, the file meshcut_plugin.py is in SMESH installation in subdirectory +*bin/salome/meshcut_plugin.py*. + +If there are already plugins defined in a smesh_plugins.py file, this file should be added at the end. If not, copied as +*${HOME}/Plugins/smesh_plugins.py* or *${APPLI}/Plugins/smesh_plugins.py* or in *${PLUGINPATH}* directory. + +From the Mesh menu, sub-menu SMESH_plugins, choose **"MeshCut"** item +The following dialog box will appear: + +.. image:: ../images/meshcut_plugin.png + :align: center + +.. centered:: + "MeshCut Plugin dialog box" + +See above for the meaning of the parameters. + diff --git a/doc/salome/gui/SMESH/input/cutting_quadrangles.rst b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst new file mode 100644 index 000000000..912d34780 --- /dev/null +++ b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst @@ -0,0 +1,61 @@ +.. _cutting_quadrangles_page: + +******************* +Cutting quadrangles +******************* + +This operation allows cutting one or several quadrangle elements into two or four triangles. + +**To cut quadrangles:** + +1. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +2. In the **Modification** menu select the **Cutting of quadrangles** item or click **"Cutting of quadrangles"** button in the toolbar. + +.. image:: ../images/image82.png + :align: center + +.. centered:: + **"Cutting of quadrangles" button** + +The following dialog box will appear: + +.. image:: ../images/a-cuttingofquadrangles.png + :align: center + + +* The main list contains the list of quadrangles selected for cutting. You can click on a quadrangle in the 3D viewer and it will be highlighted (lock Shift keyboard button to select several quadrangles): + * Click **Add** button and the ID of this quadrangle will be added to the list. + * To remove a selected element or elements from the list click **Remove** button. + * **Sort list** button allows sorting the list of IDs. + * **Filter** button allows applying a definite :ref:`filtering_elements` "filter" to the selection of quadrangles. +* **Apply to all** check box allows cutting all quadrangles of the selected mesh. +* **Preview** provides a preview of cutting in the viewer. It is disabled for **Cut into 4 triangles** as this cutting way implies no ambiguity. +* **Criterion** defines the way of cutting: + * **Cut into 4 triangles** allows cutting a quadrangle into four triangles by inserting a new node at the center of the quadrangle. The other options allow cutting a quadrangle into two triangles by connecting the nodes of a diagonal. + * **Use diagonal 1-3** and **Use diagonal 2-4** allow specifying the opposite corners, which will be connected to form two new triangles. + * **Use numeric functor** allows selecting in the field below a quality metric, which will be optimized when choosing a diagonal for cutting a quadrangle: + * **Minimum diagonal** cuts by the shortest diagonal. + * **Aspect Ratio** cuts by the diagonal splitting the quadrangle into triangles with :ref:`aspect_ratio_page` "Aspect Ratio" closer to 1 + * **Minimum Angle** cuts by the diagonal splitting the quadrangle into triangles with :ref:`minimum_angle_page` "Minimum Angle" closer to 60 degrees. + * **Skew** cuts by the diagonal splitting the quadrangle into triangles with :ref:`skew_page` "Skew" closer to 0.0 degrees. +* **Select from** allows choosing a sub-mesh or an existing group, whose quadrangle elements then can be added to the main list. + +3. Click the **Apply** or **Apply and Close** button to confirm the operation. + +.. image:: ../images/image52.jpg + :align: center + +.. centered:: + "The chosen quadrangular element" + +| + +.. image:: ../images/image51.jpg + :align: center + +.. centered:: + "Two resulting triangular elements" + +**See Also** a sample TUI Script of a :ref:`tui_cutting_quadrangles` operation. + + diff --git a/doc/salome/gui/SMESH/input/define_mesh_by_script.rst b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst new file mode 100644 index 000000000..a3329d3b6 --- /dev/null +++ b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst @@ -0,0 +1,28 @@ +.. _use_existing_page: + +************************************** +Use Edges/Faces to be Created Manually +************************************** + +The algorithms **Use Edges to be Created Manually** and **Use Faces to be Created Manually** allow creating a 1D or a 2D mesh in a python script (using **AddNode, AddEdge** and **AddFace** commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh. + +For example, you want to use standard algorithms to generate 1D and 3D +meshes and to create 2D mesh by your python code. For this, you + +#. create a mesh object, assign a 1D algorithm, +#. invoke **Compute** command, which computes a 1D mesh, + +#. assign **Use Faces to be Created Manually** and a 3D algorithm, +#. run your python code, which creates a 2D mesh, +#. invoke **Compute** command, which computes a 3D mesh. + +.. warning:: **Use Edges to be Created Manually** and **Use Faces to be Created Manually** algorithms should be assigned _before_ mesh generation by the Python code. + +Consider trying a sample script demonstrating the usage of :ref:`tui_use_existing_faces` algorithm for construction of a 2D mesh using Python commands. + + .. image:: ../images/use_existing_face_sample_mesh.png + :align: center + +**Mesh computed by** :ref:`tui_use_existing_faces` shown in a Shrink mode. + + diff --git a/doc/salome/gui/SMESH/input/deleting_groups.rst b/doc/salome/gui/SMESH/input/deleting_groups.rst new file mode 100644 index 000000000..02c06e803 --- /dev/null +++ b/doc/salome/gui/SMESH/input/deleting_groups.rst @@ -0,0 +1,18 @@ +.. _deleting_groups_page: + +**************************** +Deleting groups with content +**************************** + +To delete groups and their content, in the menu select **Modification -> Remove -> Delete groups with Contents** and select one or several groups you wish to delete in the 3D viewer or in the Object Browser. + +The selected groups will be listed in **Delete groups with contents** menu. +Then click **Apply and Close** button to remove the selected groups and close the menu or **Apply** button to remove them and proceed with the selection. + + .. image:: ../images/deletegroups.png + :align: center + +.. note:: + Please, note that this operation removes groups **with their elements**. To delete a group and leave its elements intact, right-click on the group in the Object Browser and select **Delete** in the pop-up menu or select the group and choose **Edit -> Delete** in the main menu. + + diff --git a/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst new file mode 100644 index 000000000..a0bc940a4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst @@ -0,0 +1,42 @@ +.. _diagonal_inversion_of_elements_page: + +*********************************** +Diagonal inversion of two triangles +*********************************** + +In MESH you can inverse the diagonal (edge) of a pseudo-quadrangle +formed by two neighboring triangles with one common edge. + +**To inverse the diagonal:** + +#. From the **Modification** menu choose the **Diagonal inversion** item or click **"Diagonal Inversion"** button in the toolbar. + + .. image:: ../images/image70.png + :align: center + + .. centered:: + **"Diagonal Inversion" button** + +The following dialog box shall appear: + + .. image:: ../images/diagonalinversion.png + :align: center + +#. Enter IDs of nodes forming the required edge in the **Edge** field (the node IDs must be separated by dashes) or select this edge in the 3D viewer. +#. Click the **Apply** or **Apply and Close** button. + + .. image:: ../images/image38.jpg + :align: center + + .. centered:: + "The selected edge" + + .. image:: ../images/image36.jpg + :align: center + + .. centered:: + "The inverted edge" + +**See Also** a sample TUI Script of a :ref:`tui_diagonal_inversion` operation. + + diff --git a/doc/salome/gui/SMESH/input/display_entity.rst b/doc/salome/gui/SMESH/input/display_entity.rst new file mode 100644 index 000000000..09eb03a45 --- /dev/null +++ b/doc/salome/gui/SMESH/input/display_entity.rst @@ -0,0 +1,43 @@ +.. _display_entity_page: + +************** +Display Entity +************** + +In this submenu you can choose to display only volumes, faces or edges or combine them. + +.. image:: ../images/image56.jpg + :align: center + +.. centered:: + Only Faces + +.. image:: ../images/image58.png + :align: center + +.. centered:: + Only Edges + +.. image:: ../images/image59.png + :align: center + +.. centered:: + Edges + Faces + +If the mesh contains a lot of elements, select **Choose...** item, + +.. image:: ../images/display_entity_choose_item.png + :align: center + +.. centered:: + Item to call 'Display Entity' dialog box + +and **Display Entity** dialog box will provide a way to display only some entities at the first display instead of displaying all entities, which can take a long time. + +.. image:: ../images/display_entity_dlg.png + :align: center + +.. centered:: + 'Display Entity' dialog allows to select entities before displaying + +This menu item is available from the context menu in both Object browser and 3D viewer. diff --git a/doc/salome/gui/SMESH/input/display_mode.rst b/doc/salome/gui/SMESH/input/display_mode.rst new file mode 100644 index 000000000..8414ebf74 --- /dev/null +++ b/doc/salome/gui/SMESH/input/display_mode.rst @@ -0,0 +1,41 @@ +.. _display_mode_page: + +************ +Display Mode +************ + +By default your objects are represented as defined in :ref:`mesh_tab_preferences`. +However, right-clicking on the mesh in the **Object Browser**, and selecting **Display Mode**, you can display your mesh as: + +.. image:: ../images/image53.gif + :align: center + + +.. centered:: + Wireframe + +.. image:: ../images/image37.jpg + :align: center + + +.. centered:: + Shading + +.. image:: ../images/image56.gif + :align: center + + +.. centered:: + Nodes + +**Wireframe** can combine with **Nodes** and **Shading**. + +**Shading** and **Wireframe** modes can combine with **Shrink**, however **Nodes** can't. + +.. image:: ../images/image55.gif + :align: center + + +.. centered:: + Shrink + diff --git a/doc/salome/gui/SMESH/input/double_elements_control.rst b/doc/salome/gui/SMESH/input/double_elements_control.rst new file mode 100644 index 000000000..ed1e9c7b4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/double_elements_control.rst @@ -0,0 +1,16 @@ +.. _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:: ../images/double_faces.png + :align: center + +In this picture some faces are coincident after copying all elements with translation with subsequent Merge of nodes. + +*A sample TUI Script of a* :ref:`filter_double_elements`:. + + diff --git a/doc/salome/gui/SMESH/input/double_nodes_control.rst b/doc/salome/gui/SMESH/input/double_nodes_control.rst new file mode 100644 index 000000000..f19eebde1 --- /dev/null +++ b/doc/salome/gui/SMESH/input/double_nodes_control.rst @@ -0,0 +1,16 @@ +.. _double_nodes_control_page: + +************ +Double nodes +************ + +This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). Distance at which two nodes are considered coincident is defined by :ref:`dbl_nodes_tol_pref` preference. + +.. image:: ../images/double_nodes.png + :align: center + +In this picture some nodes are coincident after copying all elements with translation. + +**See also**: A sample TUI Script of a :ref:`tui_double_nodes_control` filter. + + diff --git a/doc/salome/gui/SMESH/input/double_nodes_page.rst b/doc/salome/gui/SMESH/input/double_nodes_page.rst new file mode 100644 index 000000000..de4e30da9 --- /dev/null +++ b/doc/salome/gui/SMESH/input/double_nodes_page.rst @@ -0,0 +1,145 @@ +.. _double_nodes_page: + +******************************* +Duplicate Nodes or/and Elements +******************************* + +This operation allows duplicating mesh nodes or/and elements, which can be useful to emulate a crack in the model. + +Duplication consists in creation of mesh elements "equal" to existing ones. + +**To duplicate nodes or/and elements:** + +#. From the **Modification** menu choose **Transformation** -> **Duplicate Nodes or/and Elements** item or click **"Duplicate Nodes or/and Elements"** button in the toolbar. + + .. image:: ../images/duplicate_nodes.png + :align: center + + .. centered:: + "Duplicate Nodes or/and Elements button" + +#. Check in the dialog box one of four radio buttons corresponding to the type of duplication operation you would like to perform. +#. Fill the other fields available in the dialog box (depending on the chosen operation mode). +#. Click the **Apply** or **Apply and Close** button to perform the operation of duplication. + +"Duplicate Nodes or/and Elements" dialog has four working modes: + + * :ref:`mode_without_elem_anchor` + * :ref:`mode_with_elem_anchor` + * :ref:`mode_elem_only_anchor` + * :ref:`mode_group_boundary_anchor` + + + +.. _mode_without_elem_anchor: + +Duplicate nodes only +#################### + + .. image:: ../images/duplicate01.png + :align: center + + +Parameters to be defined in this mode: + + * **Group of nodes to duplicate** (**mandatory**): these nodes will be duplicated. + * **Group of elements to replace nodes with new ones** (**optional**): the new nodes will replace the duplicated nodes within these elements. + * **Construct group with newly created nodes** option (**checked by default**): if checked - the group with newly created nodes will be built. + +A schema below illustrates how the crack is emulated using the node duplication. + +.. image:: ../images/crack_emulation_double_nodes.png + :align: center + +.. centered:: + "Crack emulation" + + +This schema shows a virtual crack in a 2D mesh created using this duplication mode: + * Black balls are **duplicated nodes**. + * Red balls are **new nodes**. + * **Elements to replace nodes with new ones** are marked with green. + +.. note:: + Note that in the reality **duplicated nodes** coincide with **new nodes**. + + +.. _mode_with_elem_anchor: + +Duplicate nodes and border elements +################################### + +.. image:: ../images/duplicate02.png + :align: center + +Parameters to be defined in this mode: + + * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. + * **Group of nodes not to duplicate** (**optional**): group of nodes at crack bottom which will not be duplicated. + * **Group of elements to replace nodes with new ones** (**mandatory**): the new nodes will replace the nodes to duplicate within these elements. + * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. + * **Construct group with newly created nodes** option (**checked by default**): if checked - the group of newly created nodes will be built. + + +A schema below explains the crack emulation using the node duplication with border elements. + + .. image:: ../images/crack_emulation_double_nodes_with_elems.png + :align: center + + .. centered:: + "Crack emulation" + +This schema shows a virtual crack in a 2D mesh created using this duplication mode. In this schema: + +* Black segments are **duplicated elements** (edges in 2D case). +* Black balls (except for the lowest one) are duplicated nodes of **duplicated elements**. +* The lowest black ball is the **non-duplicated node**. +* Red balls are **newly created nodes**. +* Red segments are **created elements** (edges). +* **Elements to replace nodes with new ones** are marked with green. + +Note that in the reality **nodes to duplicate** coincide with **new nodes**. + +In a 3D case, where **elements to duplicate** are faces, the edges +located at the "crack" (if any) are cloned automatically. + + +.. _mode_elem_only_anchor: + +Duplicate elements only +####################### + +This mode duplicates the given elements, i.e. creates new elements with the same nodes as the given elements. + + +.. image:: ../images/duplicate03.png + :align: center + +Parameters to be defined in this mode: + + * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. + * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. The name of the created group starts from "DoubleElements". + + +.. _mode_group_boundary_anchor: + +Duplicate nodes on group boundaries +################################### + +This mode duplicates nodes located on boundaries between given groups of volumes. + + + +.. image:: ../images/duplicate04.png + :align: center + +Parameters to be defined in this mode: + + * **Groups (faces or volumes)** (**mandatory**): list of mesh groups. These groups should be disjoint, i.e. should not have shared elements. + * If **Create joint elements** option is activated, flat elements are created on the duplicated nodes: a triangular facet shared by two volumes of two groups generates a flat prism, a quadrangular facet generates a flat hexahedron. Correspondingly 2D joint elements (null area faces) are generated where edges are shared by two faces. The created flat volumes (or faces) are stored in groups. These groups are named according to the position of the group in the list of groups: group "j_n_p" is a group of flat elements that are built between the group \#n and the group \#p in the group list. All flat elements are gathered into the group named "joints3D" (correspondingly "joints2D"). The flat elements of multiple junctions between the simple junction are stored in a group named "jointsMultiples". + * If **On all boundaries** option is activated, the volumes (or faces), which are not included into **Groups** input, are considered as another group and thus the nodes on the boundary between **Groups** and the remaining mesh are also duplicated. + + +**See Also** a sample TUI Script of a :ref:`tui_duplicate_nodes` operation. + + diff --git a/doc/salome/gui/SMESH/input/editing_groups.rst b/doc/salome/gui/SMESH/input/editing_groups.rst new file mode 100644 index 000000000..20ab40e6a --- /dev/null +++ b/doc/salome/gui/SMESH/input/editing_groups.rst @@ -0,0 +1,51 @@ +.. _editing_groups_page: + +************** +Editing groups +************** + +**To edit an existing group of elements:** + +#. Select your group in the Object Browser and in the **Mesh** menu click the **Edit Group** item or **"Edit Group"** button in the toolbar. + + .. image:: ../images/image74.gif + :align: center + + + .. centered:: + **"Edit Group" button** + + + The following dialog box will appear (if the selected group is **standalone**, else this dialog looks different): + + .. image:: ../images/editgroup.png + :align: center + + In this dialog box you can modify the name and the color of your group despite of its type. You can add or remove the elements composing a **standalone group**. You can change criteria of the filter of a **group on filter**. For more information see :ref:`creating_groups_page`:"Creating Groups" page. + +#. Click the **Apply** or **Apply and Close** button to confirm modification of the group. + + +.. _convert_to_standalone: + +Convert to stanalone group +========================== + +**To convert an existing group on geometry or a group on filer into a standalone group and modify its contents:** + +#. Select your group on geometry or on filter in the Object Browser and in the **Mesh** menu click the **Edit Group as Standalone** item. + + .. image:: ../images/image74.gif + :align: center + + .. centered:: + **"Edit Group as Standalone" button** + + + The selected group will be converted into a standalone group and its contents can be modified. + +#. Click the **Apply** or **Apply and Close** button to confirm modification of the group. + +**See also:** A sample TUI Script of an :ref:`tui_edit_group` operation. + + diff --git a/doc/salome/gui/SMESH/input/editing_meshes.rst b/doc/salome/gui/SMESH/input/editing_meshes.rst new file mode 100644 index 000000000..98437ef12 --- /dev/null +++ b/doc/salome/gui/SMESH/input/editing_meshes.rst @@ -0,0 +1,43 @@ +.. _editing_meshes_page: + +************** +Editing Meshes +************** + +After you have created a mesh or sub-mesh with definite applied meshing algorithms and hypotheses you can edit your mesh by **assigning** other +algorithms and/or hypotheses or **unassigning** the applied hypotheses and algorithms. The editing proceeds in the same way as +:ref:`create_mesh_anchor`:"Mesh Creation". + +.. image:: ../images/createmesh-inv3.png + :align: center + +You can also change values for the current hypothesis by clicking the +**"Edit Hypothesis"** button. + +.. image:: ../images/image122.png + :align: center + +.. centered:: + **"Edit Hypothesis" button** + +Mesh entities generated before using changed hypotheses are automatically removed. + +See how the mesh constructed on a geometrical object +changes if we apply different meshing parameters to it. + +.. image:: ../images/edit_mesh1.png + :align: center + +.. centered:: + "Example of a mesh with Max. Element area 2D hypothesis roughly corresponding to 1D hypotheses on edges" + + +.. image:: ../images/edit_mesh_change_value_hyp.png + :align: center + +.. centered:: + "And now the Max Element area is greatly reduced" + +**See Also** a sample TUI Script of an :ref:`tui_editing_mesh` operation. + + diff --git a/doc/salome/gui/SMESH/input/extrusion.rst b/doc/salome/gui/SMESH/input/extrusion.rst new file mode 100644 index 000000000..44f9f14e8 --- /dev/null +++ b/doc/salome/gui/SMESH/input/extrusion.rst @@ -0,0 +1,183 @@ +.. _extrusion_page: + +********* +Extrusion +********* + +Extrusion is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Extrusion can be used to create a :ref:`extrusion_struct`:"structured mesh from scratch". + +.. image:: ../images/extrusion_box.png + :align: center + +.. centered:: + "If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh" + +Any node, segment or 2D element can be extruded. Each type of elements is extruded into a corresponding type of result elements: + ++----------------------+--------------------+ +| **Extruded element** | **Result element** | ++======================+====================+ +|Node | Segment | ++----------------------+--------------------+ +|Segment | Quadrilateral | ++----------------------+--------------------+ +|Triangle | Pentahedron | ++----------------------+--------------------+ +|Quadrilateral | Hexahedron | ++----------------------+--------------------+ +|Polygon | Polyhedron | ++----------------------+--------------------+ +|Hexagonal polygon | Hexagonal prism | ++----------------------+--------------------+ + + +When 2D elements are extruded, in addition to 3D elements segments are created on the ribs of the resulting 3D mesh. Free edges of input 2D elements generate logically horizontal rib segments. Logically vertical rib segments are generated from the nodes belonging to a sole input 2D element (the figure below illustrates this rule). + +.. image:: ../images/extru_rib_segs.png + :align: center + +.. centered:: + "Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles" + + +**To use extrusion:** + +#. From the **Modification** menu choose the **Extrusion** item or click **"Extrusion"** button in the toolbar. + + .. image:: ../images/image91.png + :align: center + + .. centered:: + **"Extrusion" button** + + The following dialog will appear: + + .. image:: ../images/extrusionalongaline1.png + :align: center + + + +#. In this dialog: + + * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. + .. image:: ../images/image120.png + :align: center + + .. centered:: + **"Selection" button** + + * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: + * **Select the whole mesh, sub-mesh or group** activating the corresponding check-box. + * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. + * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there. + * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements`:"Selection filters" page. + + * If the **Extrusion to Distance** radio button is selected + * specify the translation vector by which the elements will be extruded. + + * If the **Extrusion Along Vector** radio button is selected + + .. image:: ../images/extrusionalongaline2.png + :align: center + + * specify the components of the **Vector** along which the elements will be extruded, either directly or by selecting the mesh face (the normal to the face will define the vector), + * specify the **Distance** of extrusion along the vector (it can be negative). + + + + * If the **Extrusion By Normal** radio button is selected, every node of the selected faces is extruded along the *average* of the *normal* vectors to the faces sharing the node. (Nodes and edges cannot be extruded in this mode.) + + .. image:: ../images/extrusionalongaline3.png + :align: center + + * Specify the **Distance** of extrusion (it can be negative), + * Use **Along average normal** check-box to specify along which vector the distance is measured. + * If it is *activated* the distance is measured along the average normal mentioned above. + * If it is *deactivated* every node is extruded along the average normal till its intersection with a virtual plane obtained by translation of the face sharing the node along its own normal by the **Distance**. + + The picture below shows a cross-section of a 2D mesh extruded with **Along average normal** activated (to the left) and deactivated (to the right). + + .. image:: ../images/extrusionbynormal_alongavgnorm.png + :align: center + + .. centered:: + "'Along average normal' activated (to the left) and deactivated (to the right)" + + + + * **Use only input elements** check-box specifies what elements will be used to compute the average normal. + * If it is *activated* only selected faces, among faces sharing the node, are used to compute the average normal at the node. + * Else all faces sharing the node are used. + + The picture below shows a cross-section of a 2D mesh the upper plane of which is extruded with **Use only input elements** activated (to the left) and deactivated (to the right). + + .. image:: ../images/extrusionbynormal_useonly.png + :align: center + + .. centered:: + "'Use only input elements' activated (to the left) and deactivated (to the right)" + + + + * Specify the **Number of steps**. + * Optionally specify **Scale Factors**. Each scale factor in the list is applied to nodes of a corresponding extrusion step unless **Linear Variation of Scale Factors** is checked, is which case the scale factors are spread over all extrusion steps. + * **Scaling Center** can be defined either using spin boxes or by picking a node in the Viewer or by picking a geometrical vertex in the Object Browser. + * **Add** button adds a scale factor to the list. + + .. image:: ../images/add.png + :align: center + + .. centered:: + **"Add" button** + + * **Remove** button removes selected scale factors from the list. + + .. image:: ../images/remove.png + :align: center + + .. centered:: + **"Remove" button** + + + + * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "_extruded" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*. + + .. image:: ../images/extrusion_groups.png + :align: center + + .. image:: ../images/extrusion_groups_res.png + :align: center + + This check-box is active only if there are some groups in the mesh. + + + +#. Click **Apply** or **Apply and Close** button to confirm the operation. + +.. _extrusion_struct: + +Example: creation of a structured mesh from scratch +################################################### + +.. image:: ../images/image75.jpg + :align: center + +.. centered:: + "A node is extruded into a line of segments" + +.. image:: ../images/image76.jpg + :align: center + +.. centered:: + "The line of segments is extruded into a quadrangle mesh" + +.. image:: ../images/image77.jpg + :align: center + +.. centered:: + "The quadrangle mesh is revolved into a hexahedral mesh" + + +**See Also** a sample TUI Script of an :ref:`tui_extrusion` operation. + + diff --git a/doc/salome/gui/SMESH/input/extrusion_along_path.rst b/doc/salome/gui/SMESH/input/extrusion_along_path.rst new file mode 100644 index 000000000..fb9866f8a --- /dev/null +++ b/doc/salome/gui/SMESH/input/extrusion_along_path.rst @@ -0,0 +1,176 @@ +.. _extrusion_along_path_page: + +******************** +Extrusion along Path +******************** + +In principle, **Extrusion along Path** works in the same way as :ref:`extrusion_page`, the main difference is that we define not a vector, but a path of extrusion which must be an 1D mesh or 1D sub-mesh. +To get an idea of how this algorithm works, examine several examples, starting from the most simple case of extrusion along a straight edge. +In the examples the sample mesh will be extruded along different paths and with different parameters. +This 2D mesh has two quadrangle faces and seven edges. Look at the picture, where white digits are the node numbers and green are the element numbers: + +.. image:: ../images/mesh_for_extr_along_path.png + :align: center + +Extrusion along a straight edge +******************************* +(not using base point or angles) + +.. image:: ../images/straight_before.png + :align: center + +.. centered:: + The image shows a 1D path mesh, built on a linear edge, and the initial 2D mesh. + +.. image:: ../images/straight_after.png + :align: center + +.. centered:: + The image shows the result of extrusion of two edges (#1 and #2) of the initial mesh along the path. + +.. note:: Node #1 of path mesh has been selected as Start node. + +Extrusion along a curvilinear edge +################################## +(with and without angles) + +.. image:: ../images/curvi_simple_before.png + :align: center + +.. centered:: + The image shows a 1D path mesh, built on curvilinear edge, and the initial 2D mesh. + +.. image:: ../images/curvi_simple_after.png + :align: center + +.. centered:: + The central image shows the result of extrusion of one edge (#2) of the initial mesh along the path. + +.. note:: Node #1 of path mesh has been selected as **Start node**. + +.. image:: ../images/curvi_angles_after.png + :align: center + +.. centered:: + The same, but using angles {45, 45, 45, 0, -45, -45, -45} + +Extrusion of a 2D face along a mesh built on a wire +################################################### + +In this example the path mesh has been built on a wire containing 3 edges. Node 1 is a start node. Linear angle variation by 180 degrees has also been applied. + +.. image:: ../images/extr_along_wire_before.png + :align: center + +.. centered:: + **Meshed wire** + +.. image:: ../images/extr_along_wire_after.png + :align: center + +.. centered:: + **The resulting extrusion** + +Extrusion of 2d elements along a closed path +############################################ + +.. image:: ../images/circle_simple_before.png + :align: center + +.. centered:: + The image shows a path mesh built on a closed edge (circle). + +.. image:: ../images/circle_simple_after.png + :align: center + +.. centered:: + The central image shows the result of extrusion of both faces of the initial mesh. + +.. note:: Note, that no sewing has been done, so, there are six coincident nodes and two coincident faces in the resulting mesh. + +.. image:: ../images/circle_angles_after.png + :align: center + +.. centered:: + The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45} + + +**To use Extrusion along Path:** + +#. From the **Modification** menu choose the **Extrusion along a path** item or click **"Extrusion along a path"** button in the toolbar. + + .. image:: ../images/image101.png + :align: center + + .. centered:: + **"Extrusion along a path" button** + + The following dialog will appear: + + .. image:: ../images/extrusion_along_path_dlg.png + + +#. In this dialog: + + * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. + + .. image:: ../images/image120.png + :align: center + + .. centered:: + **"Selection" button** + + * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: + + * **Select the whole mesh, sub-mesh or group** activating this check-box. + * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. + * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there. + * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page. + + * Define the **Path** along which the elements will be extruded.Path definition consists of several elements: + + * **Mesh or sub-mesh** - 1D mesh or sub-mesh, along which proceeds the extrusion. + * **Start node** - the start node of the Path. It is used to define the direction of extrusion. + + + * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "_extruded" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*. + + .. image:: ../images/extrusion_groups.png + :align: center + + .. image:: ../images/extrusion_groups_res.png + :align: center + + This check-box is active only if there are some groups in the mesh. + + + + +#. There are two optional parameters, which can be very useful: + +#. If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration. + +#. The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the **"Add"** button and remove them from the list by pressing the **"Remove"** button. + + .. image:: ../images/add.png + :align: center + + .. centered:: + **"Add" button** + + .. image:: ../images/remove.png + :align: center + + .. centered:: + **"Remove" button** + + **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*. + + + +#. Click **Apply** or **Apply and Close** button to confirm the operation. Mesh edges will be extruded into faces, faces into volumes. The external surface of the resulting 3d mesh (if faces have been extruded) is covered with faces, and corners with edges. If the path is closed, the resulting mesh can contain duplicated nodes and faces, because no sewing is done. + + +**See Also** a sample TUI Script of an :ref:`tui_extrusion_along_path` operation. + + diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.rst b/doc/salome/gui/SMESH/input/find_element_by_point.rst new file mode 100644 index 000000000..0ecee32eb --- /dev/null +++ b/doc/salome/gui/SMESH/input/find_element_by_point.rst @@ -0,0 +1,39 @@ +.. _find_element_by_point_page: + +********************* +Find Element by Point +********************* + +This functionality allows you to find all mesh elements to which belongs a certain point. + +**To find the elements:** +#. Select a mesh or a group +#. Select from the Mesh menu or from the context menu the Find Element by Point item. + + .. image:: ../images/findelement3.png + :align: center + + .. centered:: + **"Find Element by Point" button** + + The following dialog box will appear: + + .. image:: ../images/findelement2.png + :align: center + + +#. 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. Choose type "All" to find elements of any type except for nodes and 0D elements. +#. Click the **Find** button. + +.. image:: ../images/findelement1.png + :align: center + +.. centered:: + The reference point and the related elements. + + +**See Also** a sample TUI Script of a :ref:`tui_find_element_by_point` operation. + + diff --git a/doc/salome/gui/SMESH/input/free_borders.rst b/doc/salome/gui/SMESH/input/free_borders.rst new file mode 100644 index 000000000..f4ddfa57e --- /dev/null +++ b/doc/salome/gui/SMESH/input/free_borders.rst @@ -0,0 +1,16 @@ +.. _free_borders_page: + +************ +Free borders +************ + +This mesh quality control highlights 1D elements (segments) belonging to one element (face or volume) only. + +.. image:: ../images/free_borders1.png + :align: center + +In this picture the free borders are displayed in red. (Faces are explicitly shown via **Display Entity** menu as all elements but segments are hidden upon this control activation). + +**See Also** a sample TUI Script of a :ref:`tui_free_borders` operation. + + diff --git a/doc/salome/gui/SMESH/input/free_edges.rst b/doc/salome/gui/SMESH/input/free_edges.rst new file mode 100644 index 000000000..59b95054d --- /dev/null +++ b/doc/salome/gui/SMESH/input/free_edges.rst @@ -0,0 +1,17 @@ +.. _free_edges_page: + +********** +Free edges +********** + +This mesh quality control highlights borders of faces (links between nodes, not mesh segments) belonging to one face only. + +.. image:: ../images/free_edges.png + :align: center + +.. centered:: + In this picture some elements of mesh have been deleted and the "holes" are outlined in red. + +**See Also** a sample TUI Script of a :ref:`tui_free_edges` operation. + + diff --git a/doc/salome/gui/SMESH/input/free_faces.rst b/doc/salome/gui/SMESH/input/free_faces.rst new file mode 100644 index 000000000..d634301bf --- /dev/null +++ b/doc/salome/gui/SMESH/input/free_faces.rst @@ -0,0 +1,16 @@ +.. _free_faces_page: + +********** +Free faces +********** + +This mesh quality control highlights the faces connected to less than two mesh volume elements. The free faces are shown with a color different from the color of shared faces. + +.. image:: ../images/free_faces.png + :align: center + +In this picture some volume mesh elements have been removed, as a result some faces became connected only to one volume. i.e. became free. + +**See also:** A sample TUI Script of a :ref:`tui_free_faces` operation. + + diff --git a/doc/salome/gui/SMESH/input/free_nodes.rst b/doc/salome/gui/SMESH/input/free_nodes.rst new file mode 100644 index 000000000..723ec6720 --- /dev/null +++ b/doc/salome/gui/SMESH/input/free_nodes.rst @@ -0,0 +1,16 @@ +.. _free_nodes_page: + +********** +Free nodes +********** + +This mesh quality control highlights the nodes which are not connected to any mesh element. + +.. image:: ../images/free_nodes.png + :align: center + +In this picture some nodes are not connected to any mesh element after deleting some elements and adding several isolated nodes. + +**See also:** A sample TUI Script of a :ref:`tui_free_nodes` operation. + + diff --git a/doc/salome/gui/SMESH/input/generate_flat_elements.rst b/doc/salome/gui/SMESH/input/generate_flat_elements.rst new file mode 100644 index 000000000..73081110b --- /dev/null +++ b/doc/salome/gui/SMESH/input/generate_flat_elements.rst @@ -0,0 +1,14 @@ +.. _generate_flat_elements_page: + +****************************************************** +Generate flat elements on group boundaries or on faces +****************************************************** + +These functionalities, used in some mechanics calculations, allow to generate flat volume elements +on the boundaries of a list of groups of volumes, or on a list of groups of faces. + +.. note:: These functionalities are only available in python scripts. + +**See** a sample TUI Script of :ref:`tui_double_nodes_on_group_boundaries` operation. + + diff --git a/doc/salome/gui/SMESH/input/group_of_underlying_elements.rst b/doc/salome/gui/SMESH/input/group_of_underlying_elements.rst new file mode 100644 index 000000000..a660030ed --- /dev/null +++ b/doc/salome/gui/SMESH/input/group_of_underlying_elements.rst @@ -0,0 +1,59 @@ +.. _group_of_underlying_elements_page: + +************************************ +Group Based on Nodes of Other Groups +************************************ + + +To create a standalone group of entities basing on nodes of existing reference groups, in the **Mesh** menu select **Group of underlying entities**. + +The following dialog box will appear: + +.. image:: ../images/dimgroup_dlg.png + :align: center + +In this dialog box specify + + * the resulting **Group name**, + * the **Elements Type** of entities of the resulting group, + * the criterion of inclusion of a mesh entity to the result group, which is **Number of common nodes** of the entity and the reference groups: + * **All** - include if all nodes are common; + * **Main** - include if all corner nodes are common (meaningful for a quadratic mesh) + * **At least one** - include if one or more nodes are common + * **Majority** - include if half or more nodes are common + + * select reference groups, + * If **Include underlying entities only** option is activated an entity can be included if it is based on nodes of one element of a reference group. + + +In the figure below, there are two reference Volume groups: + +.. image:: ../images/dimgroup_src.png + :align: center + +.. centered:: + Reference groups + +In this case the following results for Faces, Edges and Nodes are obtained: + +.. image:: ../images/dimgroup_2d.png + :align: center + +.. centered:: + Faces + +.. image:: ../images/dimgroup_1d.png + :align: center + +.. centered:: + Edges + +.. image:: ../images/dimgroup_0d.png + :align: center + +.. centered:: + Nodes + +**See Also** a sample TUI Script of a :ref:`tui_create_dim_group` operation. + + diff --git a/doc/salome/gui/SMESH/input/grouping_elements.rst b/doc/salome/gui/SMESH/input/grouping_elements.rst new file mode 100644 index 000000000..06341bdb4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/grouping_elements.rst @@ -0,0 +1,63 @@ +.. _grouping_elements_page: + +***************** +Grouping elements +***************** + +In Mesh module it is possible to create groups of mesh entities: nodes, edges, faces, volumes, 0D elements or balls. One group contains elements of only one type. Groups, unlike sub-meshes, are exported along with mesh entities into the files of following formats: MED, UNV, and CGNS. The group has a color attribute which is used for visualization only and is not exported. + +There are three types of groups different by their internal organization: + +#. **Standalone group** is a static set of mesh entities. Its contents can be explicitly controlled by the user. Upon removal of the entities included into the group, e.g. due to modification of meshing parameter, the group becomes empty and its content can be restored only manually. Hence it is reasonable to create standalone groups when the mesh generation is finished and mesh quality is verified. + .. warning:: Creation and edition of large standalone groups in :ref:`creating_groups_page` dialog using manual edition is problematic due to poor performance of the dialog. + +#. **Group on geometry** is associated to a sub-shape or a group of sub-shapes of the main shape and includes mesh entities generated on these geometrical entities. The association to a geometry is established at group construction and cannot be changed. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. +#. **Group on filter** encapsulates a :ref:`filters_page`, which is used to select mesh entities composing the group from the whole mesh. Criteria of the filter can be changed at any time. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. + +The group on geometry and group on filter can be converted to a standalone group. + +.. image:: ../images/groups_in_OB.png + :align: center + +.. centered:: + "Groups of different types look differently in the Object Browser" + +The following ways of group creation are possible: + +* :ref:`creating_groups_page` dialog allows creation of a group of any type: + :ref:`standalone_group`, + :ref:`group_on_geom` and + :ref:`group_on_filter` using dedicated tabs. +* :ref:`create_groups_from_geometry_page` dialog allows creation of several groups on geometry at once. +* Standalone groups of all nodes and elements of the chosen sub-mesh (type of elements depends on dimension of sub-mesh geometry) can be created using **Mesh -> Construct Group** menu item (available from the context menu as well). +* Standalone groups of any element type can be created basing on nodes of other groups - using :ref:`group_of_underlying_elements_page` dialog. +* Standalone groups can be created by applying :ref:`using_operations_on_groups_page` to other groups. +* Creation of standalone groups is an option of many :ref:`modifying_meshes_page` operations. + +The created groups can be later: + +* :ref:`editing_groups_page` +* :ref:`deleting_groups_page`, either as an object or together with contained elements. +* The group on geometry and group on filter can be :ref:`convert_to_standalone` group. +* :ref:`importing_exporting_meshes_page` into a file as a whole mesh. + +In the Object Browser, if an item contains more than one child group, it is possible to sort the groups by name in ascending order using **Sort children** context menu item. + +.. image:: ../images/smesh_sort_groups.png + :align: center + +.. centered:: + "Sorting groups" + +An important tool, providing filters for creation of standalone groups and groups on filter is :ref:`selection_filter_library_page`. + + +.. toctree:: + :maxdepth: 2 + + creating_groups.rst + create_groups_from_geometry.rst + group_of_underlying_elements.rst + using_operations_on_groups.rst + editing_groups.rst + deleting_groups.rst diff --git a/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst new file mode 100644 index 000000000..18d2c21a4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst @@ -0,0 +1,50 @@ + +.. _importing_exporting_meshes_page: + +****************************** +Importing and exporting meshes +****************************** + +In MESH there is a functionality allowing import/export of meshes from/to **MED**, **UNV** (I-DEAS 10), **DAT** (simple ascii format), **STL**, **GMF** (internal format of DISTENE products, namely MG-CADSurf, MG-Tetra and MG-Hexa algorithms) and **CGNS** format files. You can also export a group as a whole mesh. + +**To import a mesh:** + +#. From the **File** menu choose the **Import** item, from its sub-menu select the corresponding format (MED, UNV, STL, GMF and CGNS) of the file containing your mesh. +#. In the standard **Search File** dialog box find the file for import. It is possible to select multiple files to be imported all at once. +#. Click the **OK** button. + +.. image:: ../images/meshimportmesh.png + :align: center + +**To export a mesh or a group:** + +#. Select the object you wish to export. +#. From the **File** menu choose the **Export** item, from its sub-menu select the format (MED, UNV, DAT, STL, GMF and CGNS) of the file which will contain your exported mesh. +#. In the standard **Search File** select a location for the exported file and enter its name. +#. Click the **OK** button. + +.. image:: ../images/meshexportmesh.png + :align: center + +If you try to export a group, the warning will be shown: + +.. image:: ../images/meshexportgroupwarning.png + :align: center + +* **Don't show this warning anymore** check-box allows to switch off the warning. You can re-activate the warning in :ref:`group_export_warning_pref`. + +There are additional parameters available at export to MED and SAUV format files. + +.. _export_auto_groups: + +Auto Groups +=========== + + * **Automatically create groups** check-box specifies whether to create groups of all mesh entities of available dimensions or not. The created groups have names like "Group_On_All_Nodes", "Group_On_All_Faces", etc. A default state of this check-box can be set in :ref:`export_auto_groups_pref`. + * **Automatically define space dimension** check-box specifies whether to define space dimension for export by mesh configuration or not. Usually the mesh is exported as a mesh in 3D space, just as it is in Mesh module. The mesh can be exported as a mesh of a lower dimension in the following cases, provided that this check-box is checked: + * **1D**: if all mesh nodes lie on OX coordinate axis. + * **2D**: if all mesh nodes lie in XOY coordinate plane. + +**See Also** a sample TUI Script of an :ref:`tui_export_mesh` operation. + + diff --git a/doc/salome/gui/SMESH/input/index.rst b/doc/salome/gui/SMESH/input/index.rst new file mode 100644 index 000000000..a5a9a1465 --- /dev/null +++ b/doc/salome/gui/SMESH/input/index.rst @@ -0,0 +1,50 @@ +*************************** +Introduction to Mesh module +*************************** + +.. image:: ../images/a-viewgeneral.png + :align: center + +**Mesh** module of SALOME is destined for: + +* :ref:`about_meshes_page` in different ways: + * by meshing geometrical models previously created or imported by the Geometry component; + * bottom-up, using :ref:`modifying_meshes_page`, especially :ref:`extrusion_page` and :ref:`revolution_page`; + * by generation of the 3D mesh from the 2D mesh not based on the geometry (:ref:`importing_exporting_meshes_page` for example); + +* :ref:`importing_exporting_meshes_page` in various formats; +* :ref:`modifying_meshes_page` with a vast array of dedicated operations; +* :ref:`grouping_elements_page` of mesh elements; +* filtering mesh entities (nodes or elements) using :ref:`filters_page` functionality for :ref:`grouping_elements_page` and applying :ref:`modifying_meshes_page`; +* :ref:`viewing_meshes_overview_page` in the VTK viewer and :ref:`mesh_infos_page` on mesh and its sub-objects; +* applying to meshes :ref:`quality_page`, allowing to highlight important elements; +* taking various :ref:`measurements_page` of the mesh objects. + + +It is possible to use the variables predefined in :ref:`using_notebook_mesh_page` to set parameters of operations. +Mesh module preferences are described in the :ref:`mesh_preferences_page` section of SALOME Mesh Help. +Almost all mesh module functionalities are accessible via :ref:`smeshpy_interface_page`. +There is a set of :ref:`tools_page` plugged-in the module to extend the basic functionality listed above. + +.. image:: ../images/image7.jpg + :align: center + +.. centered:: + "Example of MESH module usage for engineering tasks" + + +.. toctree:: + :maxdepth: 3 + :hidden: + + about_meshes.rst + modifying_meshes.rst + grouping_elements.rst + about_filters.rst + viewing_meshes_overview.rst + about_quality_controls.rst + measurements.rst + using_notebook_smesh_page.rst + mesh_preferences.rst + smeshpy_interface.rst + tools.rst diff --git a/doc/salome/gui/SMESH/input/length.rst b/doc/salome/gui/SMESH/input/length.rst new file mode 100644 index 000000000..a3462857d --- /dev/null +++ b/doc/salome/gui/SMESH/input/length.rst @@ -0,0 +1,13 @@ +.. _length_page: + +****** +Length +****** + +Length quality control criterion returns a value of length of edge. + +.. image:: ../images/length-crit.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_length_1d` operation. + diff --git a/doc/salome/gui/SMESH/input/length_2d.rst b/doc/salome/gui/SMESH/input/length_2d.rst new file mode 100644 index 000000000..eb586a8e6 --- /dev/null +++ b/doc/salome/gui/SMESH/input/length_2d.rst @@ -0,0 +1,28 @@ +.. _length_2d_page: + +********* +Length 2D +********* + +This quality control criterion consists of calculation of length of the links between corner nodes of mesh faces. + +**To apply the Length 2D quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Length 2D** or click **"Length 2D"** button in the toolbar. + +.. image:: ../images/image34.png + :align: center + +.. centered:: + **"Length 2D" button** + +Your mesh will be displayed in the viewer with links colored according to the applied mesh quality control criterion: + +.. image:: ../images/length2d.png + :align: center + + +**See Also** a sample TUI Script of a :ref:`tui_length_2d` operation. + + diff --git a/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst new file mode 100644 index 000000000..d10985f77 --- /dev/null +++ b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst @@ -0,0 +1,61 @@ +.. _make_2dmesh_from_3d_page: + +************************** +Generate boundary elements +************************** + +This functionality allows to generate mesh elements on the borders of elements of a higher dimension, for example, to create 2D elements around a block of 3D elements as in the following figure. + +.. image:: ../images/2d_from_3d_example.png + :align: center + +.. centered:: + "Missing 2D elements were generated" + + +**To generate border elements:** + +#. Select a mesh or group in the Object Browser or in the 3D Viewer +#. From the Modification menu choose "Create boundary elements" item, or click "Create boundary elements" button in the toolbar + + .. image:: ../images/2d_from_3d_ico.png + :align: center + + .. centered:: + "Create boundary elements icon" + + + The following dialog box will appear: + + .. image:: ../images/2d_from_3d_dlg.png + :align: center + + .. centered:: + "Create boundary elements dialog box". + + +#. Check in the dialog box one of two radio buttons corresponding to the type of operation you would like to perform. +#. Fill the other fields available in the dialog box. +#. Click the **Apply** or **Apply and Close** button to perform the operation. + +"Create boundary elements" dialog allows creation of boundary elements of two types. + +* **2D from 3D** creates missing mesh faces on free facets of volume elements +* **1D from 2D** creates missing mesh edges on free edges of mesh faces + +Here a **free facet** means a facet shared by only one volume, a **free edge** +means an edge shared by only one mesh face. + +In this dialog: + +* specify the **Target** mesh, where the boundary elements will be created. + + * **This mesh** adds elements in the selected mesh. + * **New mesh** adds elements to a new mesh. The new mesh appears in the Object Browser with the name that you can change in the adjacent box. + +* activate **Copy source mesh** checkbox to copy all elements of the selected mesh to the new mesh, else the new mesh will contain only boundary elements (old and created by this operation). +* activate **Create group** checkbox to create a group to which all the boundary elements (old and new) are added. The new group appears in the Object Browser with the name that you can change in the adjacent box. + +**See Also** a sample TUI Script of a :ref:`tui_make_2dmesh_from_3d` operation. + + diff --git a/doc/salome/gui/SMESH/input/max_element_length_2d.rst b/doc/salome/gui/SMESH/input/max_element_length_2d.rst new file mode 100644 index 000000000..645807205 --- /dev/null +++ b/doc/salome/gui/SMESH/input/max_element_length_2d.rst @@ -0,0 +1,27 @@ +.. _max_element_length_2d_page: + +******************* +Element Diameter 2D +******************* + +This quality control criterion consists in calculation of the maximal length of edges and diagonals of 2D mesh elements (triangles and quadrangles). For polygons the value is always zero. + +**To apply the Element Diameter 2D quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Element Diameter 2D** or click **"Element Diameter 2D"** button in the toolbar. + + .. image:: ../images/image42.png + :align: center + + .. centered:: + **"Element Diameter 2D" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/max_element_length_2d.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_2d` operation. + + diff --git a/doc/salome/gui/SMESH/input/max_element_length_3d.rst b/doc/salome/gui/SMESH/input/max_element_length_3d.rst new file mode 100644 index 000000000..0e65c41be --- /dev/null +++ b/doc/salome/gui/SMESH/input/max_element_length_3d.rst @@ -0,0 +1,28 @@ +.. _max_element_length_3d_page: + +******************* +Element Diameter 3D +******************* + +This quality control criterion consists in calculation of the maximal length of edges and diagonals of 3D mesh elements (tetrahedrons, pyramids, etc). For polyhedra the value is always zero. + +**To apply the Element Diameter 3D quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Element Diameter 3D** or click **"Element Diameter 3D"** button in the toolbar. + + .. image:: ../images/image43.png + :align: center + + .. centered:: + **"Element Diameter 3D" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/max_element_length_3d.png + :align: center + + +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_3d` operation. + + diff --git a/doc/salome/gui/SMESH/input/max_element_volume_hypo.rst b/doc/salome/gui/SMESH/input/max_element_volume_hypo.rst new file mode 100644 index 000000000..5f835fc6b --- /dev/null +++ b/doc/salome/gui/SMESH/input/max_element_volume_hypo.rst @@ -0,0 +1,14 @@ +.. _max_element_volume_hypo_page: + +***************************** +Max Element Volume hypothesis +***************************** + +**Max Element Volume** hypothesis is applied for meshing of 3D objects composing your geometrical object. Definition of this hypothesis consists of setting the **maximum volume** of 3D meshing elements (depending on the chosen meshing algorithm it can be **hexahedrons** or **tetrahedrons**), which will compose the mesh of these 3D objects. + +.. image:: ../images/a-maxelvolume.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_max_element_volume` operation. + + diff --git a/doc/salome/gui/SMESH/input/measurements.rst b/doc/salome/gui/SMESH/input/measurements.rst new file mode 100644 index 000000000..ed1426a0a --- /dev/null +++ b/doc/salome/gui/SMESH/input/measurements.rst @@ -0,0 +1,89 @@ +.. _measurements_page: + +************ +Measurements +************ + +Mesh module provides the possibility to perform different measurements of the selected mesh data. + +All measurement operations are available via **Measurements** top-level menu. Access to the measurements operations is implemented via a single dialog box, where each operation is represented as a separate tab page. + +.. _min_distance_anchor: + +Minimum Distance +################ + +This operation allows measuring the distance between two objects. Currently only node-to-node and node-to-origin operations are available, but this operation will be extended in the future to support other mesh objects - elements, meshes, sub-meshes and groups. + +To start **Minimum Distance** operation, select **Minimum Distance** tab in **Measurements** dialog. + +.. image:: ../images/min_distance.png + :align: center + +Choose the first and the second target by switching the corresponding radio buttons, then select the objects the distance between which is to be calculated (or input their IDs directly in case of nodes/elements) and press **Compute** button. + +The following targets are supported: + +* **Node:** single mesh node; +* **Element:** single mesh element (not available in this version); +* **Object:** mesh, sub-mesh or group object (not available in this version); +* **Origin:** origin of the global co-ordinate system. + +The result will be shown in the bottom area of the dialog. In addition, a simple preview will be shown in the 3D viewer. + +.. image:: ../images/min_distance_preview.png + :align: center + +.. _bounding_box_anchor: + +Bounding Box +############ + +This operation allows calculating the bounding box of the selected object(s). + +To start **Bounding Box** operation, select **Bounding Box** tab in **Measurements** dialog. + +.. image:: ../images/bnd_box.png + :align: center + +Choose the required type of the object by switching the corresponding radio button, select the object(s) and press *Compute* button. + +The following types of input are available: + +* **Objects:** one or several mesh, sub-mesh or group objects; +* **Nodes:** a set of mesh nodes; +* **Elements:** a set of mesh elements. + +The result of calculation will be shown in the bottom area of the dialog. In addition, a simple preview will be shown in the 3D viewer. + +.. image:: ../images/bnd_box_preview.png + :align: center + +.. _basic_properties_anchor: + +Basic Properties +################ + +This operation provides calculation of length, area or volume for the the selected object: + +* **Length** is calculated as a sum of lengths of all 1D elements; +* **Area** is a sum of areas of all 2D elements +* **Volume** is a sum of volumes of all 3D elements. + +To start a **Basic Properties** calculation, select **Length**, **Area** or **Volume** item. + +.. image:: ../images/basic_props.png + :align: center + +In the dialog box select the required type of calculation (length, area or volume) and the object (mesh, sub-mesh or group) and press **Compute** button. + +The result of calculation will be shown in the bottom area of the dialog. + +.. note:: + * If the mesh consists of 3D elements only, its "length" and "area" will be 0. + * As calculation result is a sum of lengths, areas and volumes of all mesh elements, the duplication is not taken into account; i.e. all duplicated elements (elements built on the same set of nodes) will be included into the result. + * Similarly, intersection of elements is not taken into account. + +**See Also** a sample TUI Script of :ref:`tui_measurements_page`. + + diff --git a/doc/salome/gui/SMESH/input/merging_elements.rst b/doc/salome/gui/SMESH/input/merging_elements.rst new file mode 100644 index 000000000..5c9b80f95 --- /dev/null +++ b/doc/salome/gui/SMESH/input/merging_elements.rst @@ -0,0 +1,68 @@ +.. _merging_elements_page: + +**************** +Merging Elements +**************** + +This functionality allows to merge coincident elements of a mesh. Two elements are considered coincident if they are based on the same set of nodes. + +.. image:: ../images/mergeelems_ico.png + :align: center + +.. centered:: + "Merge elements menu button" + +To merge elements choose in the main menu **Modification** -> **Transformation** -> **Merge elements** item. The following dialog box shall appear: + +.. image:: ../images/mergeelems_auto.png + :align: center + +In this dialog: + + * Name is the name of the mesh object whose elements will be merged. + * **Automatic** or **Manual** Mode allows choosing how the elements are processed. In the **Automatic** Mode all elements created on the same nodes will be merged. In **Manual** mode you can adjust groups of coincident elements detected by the program. + If the **Manual** Mode is selected, additional controls are available: + + .. image:: ../images/mergeelems.png + :align: center + + + * **Detect** button generates the list of coincident elements found in the selected object. + * **Coincident elements** is a list of groups of elements for merging. After the operation all elements of each group will be united into one element. The first element of a group is kept and the others are removed. + * **Remove** button deletes the selected group from the list. + * **Add** button adds to the list a group of elements selected in the viewer with pressed "Shift" key. + * **Select all** check-box selects all groups. + * **Show double elements IDs** check-box shows/hides identifiers of elements of the selected groups in the 3D viewer. + * **Edit selected group of coincident elements** list allows editing the selected group: + + .. image:: ../images/add.png + :align: center + + .. centered:: + adds to the group the elements selected in the viewer. + + .. image:: ../images/remove.png + :align: center + + .. centered:: + removes the selected elements from the group. + + .. image:: ../images/sort.png + :align: center + + .. centered:: + moves the selected element to the first position in the group in order to keep it in the mesh. + + + + * To confirm your choice click **Apply** or **Apply and Close** button. + + +In this picture you see a triangle which coincides with one of the elements of the mesh. After we apply **Merge Elements** functionality, the triangle will be completely merged with the mesh. + +.. image:: ../images/meshtrianglemergeelem1.png + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_merging_elements` operation. + + diff --git a/doc/salome/gui/SMESH/input/merging_nodes.rst b/doc/salome/gui/SMESH/input/merging_nodes.rst new file mode 100644 index 000000000..5890279f4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/merging_nodes.rst @@ -0,0 +1,91 @@ +.. _merging_nodes_page: + +************* +Merging nodes +************* + +This functionality allows user to detect groups of coincident nodes with specified tolerance; each group of the coincident nodes can be then converted to the single node. + +.. image:: ../images/mergenodes_ico.png + :align: center + +.. centered:: + "Merge nodes menu button" + +**To merge nodes of your mesh:** + +#. Choose **Modification** -> **Transformation** -> **Merge nodes** menu item. The following dialog box shall appear: + + .. image:: ../images/mergenodes_auto.png + :align: center + + * **Name** is the name of the mesh whose nodes will be merged. + * **Automatic** or **Manual** mode allows choosing how the nodes are processed. In **Manual** mode you can adjust groups of coincident nodes detected by the program and/or select any nodes to be merged. + * **Tolerance** is a maximum distance between nodes sufficient for merging. + * Activation of **No merge of corner and medium nodes of quadratic cells** check-box prevents merging medium nodes of quadratic elements with corner nodes. This check-box is enabled provided that the selected mesh includes quadratic elements. + * Activation of **Avoid making holes** check-box prevents merging nodes that make elements invalid (but not degenerated) and hence removed. Thus, no holes in place of removed elements appear. + * **Exclude groups from detection** group allows to ignore the nodes which belong to the specified mesh groups. This control is active provided that the mesh includes groups. + * **Nodes to keep during the merge** group allows to specify nodes to keep in the mesh. (By default a node being the first in a group of coincident nodes is kept.) It is possible to either select nodes in the Viewer or select groups of any element type whose nodes will be kept. + + * *Selection* button activates selection of nodes to keep. + * **Nodes** button activates selection of nodes in the Viewer. + * **Groups and sub-meshes** button activates selection of groups and sub-meshes. + * **Add** button adds selected nodes or groups to the list. + * Nodes or groups selected in the list can be removed using **Remove** button. + +#. **Automatic mode:** + + * In the **Automatic** Mode all nodes within the indicated tolerance will be merged. The nodes which belong to the groups specified in **Exclude groups from detection** will NOT be taken into account. + +#. The **Manual** mode gives you full control of what the operation will do. In this mode additional controls are available: + + * **Detect** button generates the list of coincident nodes for the given **Tolerance**. + * **Coincident nodes** is a list of groups of nodes for merging. Upon **Apply** all nodes of each group will be united into one node. The first node of a group is kept and the others are removed. By default the first node has a lowest ID within the group. + + * **Remove** button deletes the selected group from the list. + * **Add** button adds to the list a group of nodes selected in the viewer. + * **Select all** check-box selects all groups. + * **Show double nodes IDs** check-box shows/hides identifiers of nodes of selected groups in the 3D viewer. + + .. image:: ../images/mergenodes.png + :align: center + + + * **Edit selected group of coincident nodes** list allows editing the selected group: + + .. image:: ../images/add.png + :align: center + + .. centered:: + adds to the group the nodes selected in the viewer. + + .. image:: ../images/remove.png + :align: center + + .. centered:: + removes from the group the selected nodes. + + .. image:: ../images/sort.png + :align: center + + .. centered:: + moves the selected node to the first position in the group in order to keep it in the mesh. + +#. To confirm your choice click **Apply** or **Apply and Close** button. + +.. image:: ../images/merging_nodes1.png + :align: center + +.. centered:: + The initial object. Nodes 25, 26 and 5 are added to **Nodes to keep during the merge** group. + +.. image:: ../images/merging_nodes2.png + :align: center + +.. centered:: + The object has been merged + + +**See Also** a sample TUI Script of a :ref:`tui_merging_nodes` operation. + + diff --git a/doc/salome/gui/SMESH/input/mesh_infos.rst b/doc/salome/gui/SMESH/input/mesh_infos.rst new file mode 100644 index 000000000..738623d90 --- /dev/null +++ b/doc/salome/gui/SMESH/input/mesh_infos.rst @@ -0,0 +1,188 @@ +.. _mesh_infos_page: + +**************** +Mesh Information +**************** + +The user can obtain information about the selected mesh object (mesh, sub-mesh or group) using **Mesh Information** dialog box. + +To view the **Mesh Information**, select your mesh, sub-mesh or group in the **Object Browser** and invoke **Mesh Information** item from the **Mesh** menu or from the context menu, or click **"Mesh Information"** button in the toolbar. + +.. image:: ../images/image49.png + :align: center + +.. centered:: + **"Mesh Information" button** + +The **Mesh Information** dialog box provides three tab pages: + +* :ref:`advanced_mesh_infos_anchor` - to show base and quantitative information about the selected mesh object. +* :ref:`mesh_element_info_anchor` - to show detailed information about the selected mesh nodes or elements. +* :ref:`mesh_addition_info_anchor` - to show additional information available for the selected mesh, sub-mesh or group object. +* :ref:`mesh_quality_info_anchor` - to show overall quality information about the selected mesh, sub-mesh or group object. + +.. _dump_mesh_infos: + +Dump Mesh Infos +############### + +The button **Dump** allows printing the information displayed in the dialog box to a .txt file. The dialog for choosing a file also allows to select which tab pages to dump via four check-boxes. The default state of the check-boxes can be changed via :ref:`mesh_information_pref` preferences. + +.. _advanced_mesh_infos_anchor: + +Base Information +################ + +The **Base Info** tab page of the dialog box provides general information on the selected object - mesh, sub-mesh or mesh group: name, type, total number of nodes and elements separately for each type: 0D elements, edges, faces, volumes, balls. + +.. image:: ../images/advanced_mesh_infos.png + :align: center + +.. centered:: + **"Base Info" page** + +.. _mesh_element_info_anchor: + +Mesh Element Information +######################## + +The **Element Info** tab page of the dialog box gives detailed information about the selected mesh node(s) or element(s), namely: + +* For a node: + * Node ID; + * Coordinates (X, Y, Z); + * Connectivity information (connected elements); double click in 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). + + .. image:: ../images/eleminfo1.png + :align: center + + .. centered:: + **"Element Info" page, node information** + + +* For an element: + * Element ID; + * Type (triangle, quadrangle, etc.); + * Gravity center (X, Y, Z coordinates); + * Connectivity information (connected nodes); double click in a line of a node reveals the information about this node; + * Quality controls (area, aspect ratio, volume, etc.); + * Position on a shape (for meshes built on a geometry); + * Groups information (names of groups the element belongs to). + + .. image:: ../images/eleminfo2.png + :align: center + + .. centered:: + **"Element Info" page, element information** + +The user can either input the ID of a node or element he wants to analyze directly in the dialog box or select the node(s) or element(s) in the 3D viewer. +If **Show IDs** is activated, IDs of selected nodes or elements are displayed in the 3D viewer. + +.. note:: + The information about the groups, to which the node or element belongs, can be shown in a short or in a detailed form. By default, for performance rasons, this information is shown in a short form (group names only). The detailed information on groups can be switched on via :ref:`group_detail_info_pref` option of :ref:`mesh_preferences_page`. + +.. _mesh_addition_info_anchor: + +Additional Information +###################### + +The **Additional Info** tab page of the dialog box provides an additional information on the selected object: mesh, sub-mesh or group. + +For a mesh object, the following information is shown: + +* Name +* Type: based on geomerty, imported, standalone +* Shape (if mesh is based on geometry) +* File (if mesh is imported from the file) +* Groups +* Sub-meshes + +.. image:: ../images/addinfo_mesh.png + :align: center + +.. centered:: + **"Additional Info" page, mesh information** + + +For a sub-mesh object, the following information is shown: + +* Name +* Parent mesh +* Shape + +.. image:: ../images/addinfo_submesh.png + :align: center + +.. centered:: + **"Additional Info" page, sub-mesh information** + + +.. _mesh_addition_info_group_anchor: + +Additional info for Group +========================= + +For a group object, the following information is shown: + +* Name +* Parent mesh +* Type: standalone, group on geometry, group on filter +* Entity type: node, edge, face, volume +* Size +* Color +* Number of underlying nodes (for non-nodal groups) + +.. image:: ../images/addinfo_group.png + :align: center + +.. centered:: + **"Additional Info" page, group information** + + +.. note:: + For the performance reasons, the number of underlying nodes is computed only by demand. For this, the user should press the "Compute" button (see picture). Also, the number of underlying nodes is automatically calculated if the size of the group does not exceed the :ref:`nb_nodes_limit_pref` preference value (zero value means no limit). + +.. _mesh_quality_info_anchor: + +Quality Information +################### + +The **Quality Info** tab provides overall information about mesh quality controls on the selected object - mesh, sub-mesh or mesh group: + +* Name; +* Nodes information: + * Number of free nodes; + * Maximal number of elements connected to a node; + * Number of double nodes; +* Edges information: + * Number of double edges; +* Faces information: + * Number of double faces; + * Number of over-constrained faces; + * Aspect Ratio histogram; +* Volume information: + * Number of double volumes; + * Number of over-constrained volumes; + * Aspect Ratio 3D histogram. + +.. image:: ../images/ctrlinfo.png + :align: center + +.. centered:: + **"Quality Info" page** + +.. note:: + It is possible to change **Double nodes tolerance**, which will be used upon consequent pressing *Compute* button. The default value of the tolerance can be set via the :ref:`dbl_nodes_tol_pref` preferences. + +.. note:: + For performance reasons, all quality control values for big meshes are computed only by demand. For this, press the *Compute* button. Also, values are automatically computed if the number of nodes / elements does not exceed the :ref:`auto_control_limit_pref` set via the :ref:`mesh_information_pref` preferences (zero value means that there is no limit). + +.. 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). + +See the :ref:`tui_viewing_mesh_infos`. + + + diff --git a/doc/salome/gui/SMESH/input/mesh_preferences.rst b/doc/salome/gui/SMESH/input/mesh_preferences.rst new file mode 100644 index 000000000..001056b44 --- /dev/null +++ b/doc/salome/gui/SMESH/input/mesh_preferences.rst @@ -0,0 +1,237 @@ +.. _mesh_preferences_page: + +**************** +Mesh preferences +**************** + +In the Mesh module you can set mesh preferences, which can be used right now or in later sessions with this module according to the preferences. + +General Preferences +################### + +.. image:: ../images/pref21.png + :align: center + +.. _automatic_update_pref: + +Automatic Update +================= + +* **Automatic Update** + + * **Automatic Update** - if activated, the mesh in your viewer will be automatically updated after it's computation, depending on values of additional preferences specified below. + * **Size limit (elements)** - allows specifying the maximum number of elements in the resulting mesh for which the automatic updating of the presentation is performed. This option affects only :ref:`compute_anchor` operation. Zero value means "no limit". Default value is 500 000 mesh elements. + * **Incremental limit check** - if activated, the mesh size limit check is not applied to the total number of elements in the resulting mesh, it is applied iteratively to each entity type in the following order: 0D elements, edges, faces, volumes, balls. At each step the number of entities of a certain type is added to the total number of elements computed at the previous step - if the resulting number of elements does not exceed the size limit, the entities of this type are shown, otherwise the user is warned that some entities are not shown. + +.. _display_mode_pref: + +Display mode +============ + +* **Display mode** + * **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`display_mode_page` as default. + +.. _quadratic_2d_mode_pref: + +Quadratic 2D preferences +======================== + +* **Representation of the 2D quadratic elements** + * **Default mode of the 2D quadratic elements** - allows to select either *Lines* or *Arcs* as a default :ref:`quadratic_2d_mode` of 1D and 2D :ref:`adding_quadratic_elements_page`. + * **Maximum Angle** - maximum deviation angle used by the application to build arcs. + +* **Quality Controls** + * **Display entity** - if activated, only currently :ref:`quality_page` entities are displayed in the viewer and other entities are temporarily hidden. For example if you activate :ref:`length_page` quality control, which controls the length of mesh segments, then only mesh segments are displayed and faces and volumes are hidden. + * **Use precision** - if activated, all quality controls will be computed at precision defined by **Number of digits after point** - as integers by default. + +.. _dbl_nodes_tol_pref: + +Double nodes tolerance +====================== + + * **Double nodes tolerance** - defines the maximal distance between two mesh nodes, at which they are considered coincident by :ref:`double_nodes_control_page` quality control. This value is also used in :ref:`mesh_quality_info_anchor` tab page of :ref:`mesh_infos_page` dialog. + +* **Mesh export** + +.. _export_auto_groups_pref: + +Automatically create groups for MED export +========================================== + + * **Automatically create groups for MED export** - defines a default state of a corresponding check-box in :ref:`export_auto_groups` dialog. + +.. _group_export_warning_pref: + +Show warning when exporting group +================================= + + * **Show warning when exporting group** - if activated, a warning is displayed when exporting a group. + +.. _show_comp_result_pref: + +Mesh computation +================ + +* **Mesh computation** + * **Show a computation result notification** - allows to select the notification mode about a :ref:`compute_anchor` result. There are 3 possible modes: + * **Never** - not to show the :ref:`meshing_result_anchor` at all; + * **Errors only** - the result dialog will be shown if there were some errors during a mesh computation; + * **Always** - show the result dialog after each mesh computation. This is a default mode. + +.. _mesh_information_pref: + +Mesh information +================ + +* **Mesh information** + + * **Mesh element information** - allows changing the way :ref:`mesh_element_info_anchor` is shown: + * **Simple** - as a plain text + * **Tree** - in a tree-like form + +.. _nb_nodes_limit_pref: + +Automatic nodes compute limit +============================= + + * **Automatic nodes compute limit** - allows defining the size limit for the :ref:`mesh_addition_info_group_anchor` for which the number of underlying nodes is calculated automatically. If the group size exceeds the value set in the preferences, the user will have to press \em Compute button explicitly. Zero value means "no limit". By default the value is set to 100 000 mesh elements. + +.. _auto_control_limit_pref: + +Automatic controls compute limit +================================ + + * **Automatic controls compute limit** - allows defining a maximal number of mesh elements for which the quality controls in the :ref:`mesh_quality_info_anchor` tab page are calculated automatically. If the number of mesh elements exceeds the value set in the preferences, it is necessary to press **Compute** button explicitly to calculate a quality measure. Zero value means "no limit". By default the value is set to 3 000 mesh elements. + +.. _group_detail_info_pref: + +Detailed info for groups +======================== + + * **Show details on groups in element information tab** - when this option is switched off (default), only the names of groups, to which the node or element belongs, are shown in the :ref:`mesh_element_info_anchor` tab of "Mesh Information" dialog box. If this option is switched on, the detailed information on groups is shown. + * **Dump base information** - allows dumping base mesh information to the file, see :ref:`dump_mesh_infos`. + * **Dump element information** - allows dumping element information to the file, see :ref:`dump_mesh_infos`. + * **Dump additional information** - allows dumping additional mesh information to the file, see :ref:`dump_mesh_infos`. + * **Dump controls information** - allows dumping quality mesh information to the file, see :ref:`dump_mesh_infos`. + +* **Automatic Parameters** + +.. _diagonal_size_ratio_pref: + +Ratio Bounding Box Diagonal +=========================== + + * **Ratio Bounding Box Diagonal / Max Size** - defines the ratio between the bounding box of the meshed object and the Max Size of segments. It is used as a default value of :ref:`a1d_meshing_hypo_page` defining length of segments, especially by :ref:`max_length_anchor` hypothesis. + +.. _nb_segments_pref: + +Default Number of Segments +========================== + + * **Default Number of Segments** - defines the default number of segments in :ref:`number_of_segments_anchor` hypothesis. + +* **Mesh loading** + + * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file when a hypothesis is modified. This allows saving time by omitting loading data of a large mesh that is planned to be recomputed with other parameters. + +* **Input fields precision** - allows to adjust input precision of different parameters. The semantics of the precision values is described in detail in **Using input widgets** chapter of GUI documentation (Introduction to Salome Platform / Introduction to GUI / Using input widgets). In brief: **positive** precision value is the maximum allowed number of digits after the decimal point in the fixed-point format; **negative** precision value is the maximum allowed number of significant digits in mantissa in either the fixed-point or scientific format. + + * **Length precision** - allows to adjust input precision of coordinates and dimensions. + * **Angular precision** - allows to adjust input precision of angles. + * **Length tolerance precision** - allows to adjust input precision of tolerance of coordinates and dimensions. + * **Parametric precision** - allows to adjust input precision of parametric values. + * **Area precision** - allows to adjust input precision of mesh element area. + * **Volume precision** - allows to adjust input precision of mesh element volume. + +* **Preview** + * **Sub-shapes preview chunk size** - allows to limit the number of previewed sub-shapes shown in the hypotheses creation dialog boxes, for example "Reverse Edges" parameter of :ref:`number_of_segments_anchor` hypothesis. + +* **Python Dump** + * **Historical python dump** - allows switching between *Historical* and *Snapshot* dump mode: + * In *Historical* mode, Python Dump script includes all commands performed by SMESH engine. + * In *Snapshot* mode, the commands relating to objects removed from the Study as well as the commands not influencing the current state of meshes are excluded from the script. + +.. _mesh_tab_preferences: + +Mesh Preferences +################ + +**Mesh** tab page contains parameters defining the way the mesh is displayed in the 3D Viewer. + +.. image:: ../images/pref22.png + :align: center + +* **Nodes** - allows to define default parameters for nodes, which will be applied for a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. + * **Color** - allows to select the color of nodes. Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Type of marker** - allows to define the shape of nodes. + * **Scale of marker** - allows to define the size of nodes. + +* **Elements** - allows to define default parameters for different elements, which will be applied to a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. + * **Surface color** - allows to select the surface color of 2D elements (seen in Shading mode). Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Back surface color** - allows to select the back surface color of 2D elements. This is useful to differ 2d elements with reversed orientation. Use the slider to select the color generated basing on the **Surface color** by changing its brightness and saturation. + * **Volume color** - allows to select the surface color of 3D elements (seen in Shading mode). + * **Reversed volume color** - allows to select the surface color of reversed 3D elements. Use the slider to select the color generated basing on the **Volume color** by changing its brightness and saturation. + * **0D element color** - allows to choose color of 0D mesh elements. + * **Ball color** - allows to choose color of discrete mesh elements (balls). + * **Outline color** - allows to select the color of element borders. + * **Wireframe color** - allows to select the color of borders of elements in the wireframe mode. + * **Preview color** - allows to select the preview color of the elements, which is used while :ref:`adding_nodes_and_elements_page`. + * **Size of 0D elements** - specifies default size of 0D elements. + * **Size of ball elements** - specifies default size of discrete elements (balls). + * **Scale factor of ball elements** - specifies default scale factor of discrete elements (balls) allowing to adjust their size in the Viewer. + * **Line width** - allows to define the width of 1D elements (segments). + * **Outline width** - allows to define the width of borders of 2D and 3D elements (shown in the Shading mode). + * **Shrink coef.** - allows to define relative size of a shrunk element compared a non-shrunk element in percents in the shrink mode. + +* **Groups** + * **Names color** - specifies color of group names to be used in the 3D viewer. + * **Default color** - specifies the default group color, which is used to create a new mesh group (see :ref:`creating_groups_page`). + +* **Numbering** allows to define properties of numbering functionality: + * **Nodes** - specifies text properties of nodes numbering (font family, size, attributes, color). + * **Elements** - same for elements. + +* **Orientation of Faces** - allows to define default properties of orientation vectors. These preferences will be applied to the newly created meshes only; properties of existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. + * **Color** - allows to define the color of orientation vectors; + * **Scale** - allows to define the size of orientation vectors; + * **3D Vector** - allows to choose between 2D planar and 3D vectors. + +Selection Preferences +##################### + +.. image:: ../images/pref23.png + :align: center + +* **Selection** - performed with mouse-indexing (preselection) and left-clicking on an object, whose appearance changes as defined in the **Preferences**. + * **Object color** - allows to select the color of mesh (edges and borders of meshes) of the selected entity. Click on the colored line to access to the **Select Color** dialog box. + * **Element color** - allows to select the color of surface of selected elements (seen in Shading mode). Click on the colored line to access to the **Select Color** dialog box. + +* **Preselection** - performed with mouse-indexing on an object, whose appearance changes as defined in the **Preferences**. + * **Highlight color** - allows to select the color of mesh (edges and borders of meshes) of the entity. Click on the colored line to access to the **Select Color** dialog box. + +* **Precision** - in this menu you can set the value of precision used for **Nodes**, **Elements** and **Objects**. + +Scalar Bar Preferences +###################### + +.. image:: ../images/pref24.png + :align: center + +.. note:: + The following settings are default and will be applied to a newly created mesh only. Existing meshes can be customized using local :ref:`scalar_bar_dlg` available from the context menu of a mesh. + +* **Font** - in this menu you can set type, face and color of the font of **Title** and **Labels**. + +* **Colors & Labels** - in this menu you can set the **number of colors** and the **number of labels** in use. + +* **Orientation** - here you can choose between vertical and horizontal orientation of the **Scalar Bar**. + +* **Origin & Size Vertical & Horizontal** - allows to define placement (**X** and **Y**) and lookout (**Width** and **Height**) of Scalar Bars. + * **X** - abscissa of the point of origin (from the left side). + * **Y** - ordinate of the origin of the bar (from the bottom). + +* **Distribution** in this menu you can Show/Hide distribution histogram of the values of the **Scalar Bar** and specify the **Coloring Type** of the histogram: + * **Multicolor** - the histogram is colored as **Scalar Bar**. + * **Monocolor** - the histogram is colored as selected with **Distribution color** selector. + + diff --git a/doc/salome/gui/SMESH/input/mesh_through_point.rst b/doc/salome/gui/SMESH/input/mesh_through_point.rst new file mode 100644 index 000000000..1a788c725 --- /dev/null +++ b/doc/salome/gui/SMESH/input/mesh_through_point.rst @@ -0,0 +1,58 @@ +.. _mesh_through_point_page: + +************ +Moving nodes +************ + +In mesh you can define a node at a certain point either +* by movement of the node closest to the point or +* by movement of a selected node to the point. + +**To displace a node:** + +#. From the **Modification** menu choose the **Move node** item or click **"Move Node"** button in the toolbar. + + .. image:: ../images/image67.png + :align: center + + .. centered:: + **"Move Node" button** + + The following dialog will appear: + + .. image:: ../images/meshtopass1.png + :align: center + + .. centered:: + "Manual node selection" + + + .. image:: ../images/meshtopass2.png + :align: center + + .. centered:: + "Automatic node selection" + + + +#. Specify the way of node selection: manually (the first radio button) or automatically (the second radio button). +#. If the manual method is selected, select a node to move (X, Y, Z fields show the original coordinates of the node) or type the node ID. +#. Enter the coordinates of the destination point. You can click **Update Destination** button to set the coordinates of the destination point equal to the coordinates of the node to move. +#. Activate **Preview** check-box to show the result of move in the viewer. +#. Click the **Apply** or **Apply and Close** button to confirm the operation. + +.. image:: ../images/moving_nodes1.png + :align: center + +.. centered:: + "The initial mesh" + +.. image:: ../images/moving_nodes2.png + :align: center + +.. centered:: + "The modified mesh" + +**See Also** a sample TUI Script of a :ref:`tui_moving_nodes` operation. + + diff --git a/doc/salome/gui/SMESH/input/minimum_angle.rst b/doc/salome/gui/SMESH/input/minimum_angle.rst new file mode 100644 index 000000000..403c960b4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/minimum_angle.rst @@ -0,0 +1,26 @@ +.. _minimum_angle_page: + +************* +Minimum angle +************* + +**Minimum angle** mesh quality criterion consists of calculation of the minimum value of angle between two adjacent sides of a 2D meshing element (triangle or quadrangle). + +**To apply the Minimum angle quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Minimum angle** or click **"Minimum Angle"** button. + + .. image:: ../images/image38.png + :align: center + + .. centered:: + **"Minimum Angle" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image92.jpg + :align: center + +**See Also** a sample TUI Script of a :ref:`tui_minimum_angle` operation. + diff --git a/doc/salome/gui/SMESH/input/modifying_meshes.rst b/doc/salome/gui/SMESH/input/modifying_meshes.rst new file mode 100644 index 000000000..73614e4f0 --- /dev/null +++ b/doc/salome/gui/SMESH/input/modifying_meshes.rst @@ -0,0 +1,80 @@ +.. _modifying_meshes_page: + +**************** +Modifying meshes +**************** + +Salome provides a vast specter of mesh modification and transformation operations, giving the possibility to: + +* :ref:`adding_nodes_and_elements_page` mesh elements from nodes to polyhedrons at an arbitrary place in the mesh. +* :ref:`adding_quadratic_elements_page` mesh elements from quadratic segments to quadratic hexahedrons at an arbitrary place in the mesh. +* :ref:`removing_nodes_and_elements_page` any existin" mesh elements and nodes. +* :ref:`translation_page` in the indicated direction the mesh or some of its elements. +* :ref:`rotation_page` by the indicated axis and angle the mesh or some of its elements. +* :ref:`scale_page` the mesh or some of its elements. +* :ref:`symmetry_page` the mesh through a point, a vector or a plane of symmetry. +* :ref:`double_nodes_page`. Duplication of nodes can be useful to emulate a crack in the model. +* Unite meshes by :ref:`sewing_meshes_page` free borders, border to side or side elements. +* :ref:`merging_nodes_page`, coincident within the indicated tolerance. +* :ref:`merging_elements_page` based on the same nodes. +* :ref:`mesh_through_point_page` to an arbitrary location with consequent transformation of all adjacent elements. +* :ref:`diagonal_inversion_of_elements_page` between neighboring triangles. +* :ref:`uniting_two_triangles_page`. +* :ref:`uniting_set_of_triangles_page`. +* :ref:`changing_orientation_of_elements_page` of the selected elements. +* :ref:`reorient_faces_page` by several means. +* :ref:`cutting_quadrangles_page` into two triangles. +* :ref:`split_to_tetra_page` volumic elements into tetrahedra or prisms. +* :ref:`split_biquad_to_linear_page` elements into linear ones without creation of additional nodes. +* :ref:`smoothing_page` elements, reducung distortions in them by adjusting the locations of nodes. +* Create an :ref:`extrusion_page` along a vector or by normal to a discretized surface. +* Create an :ref:`extrusion_along_path_page`. +* Create elements by :ref:`revolution_page` of the selected nodes and elements. +* Apply :ref:`pattern_mapping_page`. +* :ref:`convert_to_from_quadratic_mesh_page`, or vice versa. +* :ref:`make_2dmesh_from_3d_page`. +* :ref:`generate_flat_elements_page`. +* :ref:`cut_mesh_by_plane_page`. + + +.. note:: + It is possible to :ref:`edit_anchor` of a lower dimension before generation of the mesh of a higher dimension. + + +.. note:: + It is possible to use the variables defined in the SALOME **NoteBook** to specify the numerical parameters used for modification of any object. + + +.. toctree:: + :maxdepth: 2 + + adding_nodes_and_elements.rst + adding_quadratic_elements.rst + removing_nodes_and_elements.rst + translation.rst + rotation.rst + scale.rst + symmetry.rst + double_nodes_page.rst + sewing_meshes.rst + merging_nodes.rst + merging_elements.rst + mesh_through_point.rst + diagonal_inversion_of_elements.rst + uniting_two_triangles.rst + uniting_set_of_triangles.rst + changing_orientation_of_elements.rst + reorient_faces.rst + cutting_quadrangles.rst + split_to_tetra.rst + split_biquad_to_linear.rst + smoothing.rst + extrusion.rst + extrusion_along_path.rst + revolution.rst + pattern_mapping.rst + convert_to_from_quadratic_mesh.rst + make_2dmesh_from_3d.rst + generate_flat_elements.rst + cut_mesh_by_plane.rst + diff --git a/doc/salome/gui/SMESH/input/numbering.rst b/doc/salome/gui/SMESH/input/numbering.rst new file mode 100644 index 000000000..c540b9057 --- /dev/null +++ b/doc/salome/gui/SMESH/input/numbering.rst @@ -0,0 +1,41 @@ +.. _numbering_page: + +********* +Numbering +********* + +Displaying node numbers +####################### + +In MESH you can display the ID numbers of all nodes of your mesh in the viewer. + +**To display ID numbers of nodes:** + +#. Display your mesh in the viewer +#. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Nodes #**. + +.. image:: ../images/image96.jpg + :align: center + +.. centered:: + "Displayed node numbers" + + +Displaying element numbers +########################## + +In MESH you can display the ID numbers of all meshing elements composing your mesh in the viewer. + +**To display ID numbers of elements:** + +#. Display your mesh in the viewer +#. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Elements #**. + +.. image:: ../images/image95.jpg + :align: center + +.. centered:: + "Displayed element numbers" + + + diff --git a/doc/salome/gui/SMESH/input/over_constrained_faces.rst b/doc/salome/gui/SMESH/input/over_constrained_faces.rst new file mode 100644 index 000000000..c670ec941 --- /dev/null +++ b/doc/salome/gui/SMESH/input/over_constrained_faces.rst @@ -0,0 +1,22 @@ +.. _over_constrained_faces_page: + +********************** +Over-constrained faces +********************** + +This mesh quality control highlights faces sharing only one border +with other faces. In other words, the faces having all their nodes on +the free border of the 2D mesh are highlighted. + +.. note:: + The highlighted faces are actually over-constrained only if, at the computation time, the boundary conditions on the borders where the nodes are located are all Dirichlet boundary conditions. + +.. image:: ../images/over_constrained_faces.png + :align: center + +.. centered:: + In this picture the over-constrained face is displayed in red. + +**See Also** a sample TUI Script of a :ref:`tui_over_constrained_faces` filter. + + diff --git a/doc/salome/gui/SMESH/input/over_constrained_volumes.rst b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst new file mode 100644 index 000000000..dca1c8d4b --- /dev/null +++ b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst @@ -0,0 +1,21 @@ +.. _over_constrained_volumes_page: + +************************ +Over-constrained volumes +************************ + +This mesh quality control highlights volumes sharing only one border with other volumes. +In other words, the volumes having all their nodes on the external border of the mesh are highlighted. + +.. note:: + The highlighted volumes are actually over-constrained only if, at the computation time, the boundary conditions on the borders where the nodes are located are all Dirichlet boundary conditions. + +.. image:: ../images/over_constrained_volumes.png + :align: center + +.. centered:: + In this picture the over-constrained volume is displayed in red. + +**See Also** a sample TUI Script of a :ref:`tui_over_constrained_volumes` filter. + + diff --git a/doc/salome/gui/SMESH/input/pattern_mapping.rst b/doc/salome/gui/SMESH/input/pattern_mapping.rst new file mode 100644 index 000000000..c687ddb61 --- /dev/null +++ b/doc/salome/gui/SMESH/input/pattern_mapping.rst @@ -0,0 +1,200 @@ +.. _pattern_mapping_page: + +*************** +Pattern mapping +*************** + +About patterns +############## + +The pattern describes a mesh to generate: positions of nodes within a +geometrical domain and nodal connectivity of elements. A +pattern also specifies the so-called key-points, i.e. the nodes that will be +located at geometrical vertices. The pattern description is stored in +\.smp file. + +The smp file contains 4 sections: + + #. The first line indicates the total number of pattern nodes (N). + #. The next N lines describe nodes coordinates. Each line contains 2 node coordinates for a 2D pattern or 3 node coordinates for a 3D pattern. Note, that node coordinates of a 3D pattern can be defined only by relative values in range [0;1]. + #. The key-points line contains the indices of the nodes to be mapped on geometrical vertices (for a 2D pattern only). Index n refers to the node described on the n-th line of section 2. The index of the first node is zero. For a 3D pattern the key points are not specified. + #. The remaining lines describe nodal connectivity of elements, one line for each element. Each line holds indices of nodes forming an element. Index n refers to the node described on the n-th line of section 2. The first node index is zero. There must be 3 or 4 indices on each line for a 2D pattern (only liner 2d elements are allowed) and 4, 5, 6 or 8 indices for a 3D pattern (only linear 3d elements are allowed). + +A 2D pattern must contain at least one element and at least one key-point. All key-points must lie on boundaries. + +A 3D pattern must contain at least one element. + +An example of a simple 2D pattern smp file: +:: + + !!! SALOME 2D mesh pattern file + !!! + !!! Nb of points: + 9 + 200 0 !- 0 + 100 0 !- 1 + 0 0 !- 2 + 0 -100 !- 3 + 0 -200 !- 4 + 100 -200 !- 5 + 200 -200 !- 6 + 200 -100 !- 7 + 100 -100 !- 8 + !!! Indices of 4 key-points + 2 0 4 6 + !!! Indices of points of 6 elements + 0 1 8 + 8 5 6 7 + 2 3 8 + 8 3 4 5 + 8 7 0 + 8 1 2 + +The image below provides a preview of the above pattern: + +.. image:: ../images/pattern2d.png + :align: center + +.. centered:: + An example of a simple 3D pattern smp file: + +:: + + !!! SALOME 3D mesh pattern file + !!! + !!! Nb of points: + 9 + 0 0 0 !- 0 + 1 0 0 !- 1 + 0 1 0 !- 2 + 1 1 0 !- 3 + 0 0 1 !- 4 + 1 0 1 !- 5 + 0 1 1 !- 6 + 1 1 1 !- 7 + 0.5 0.5 0.5 !- 8 + !!! Indices of points of 6 elements: + 0 1 5 4 8 + 7 5 1 3 8 + 3 2 6 7 8 + 2 0 4 6 8 + 0 2 3 1 8 + 4 5 7 6 8 + + +Application of pattern mapping +############################## + +**To apply pattern mapping to a geometrical object or mesh elements:** + +From the **Modification** menu choose the **Pattern Mapping** item or click +**"Pattern mapping"** button in the toolbar. + +.. image:: ../images/image98.png + :align: center + +.. centered:: + **"Pattern mapping" button** + +The following dialog box will appear: + +For a **2D pattern** + + +.. image:: ../images/patternmapping1.png + :align: center + +In this dialog you should specify: + +* **Pattern**, which can be loaded from .smp pattern file previously created manually or generated automatically from an existing mesh or sub-mesh. +* **Face** with the number of vertices equal to the number of key-points in the pattern; the number of key-points on internal boundaries of the pattern must also be equal to the number of vertices on internal boundaries of the face; +* **Vertex** to which the first key-point should be mapped; + + +Alternatively, it is possible to select **Refine selected mesh elements** check-box and apply the pattern to + +* **Mesh Face** instead of a geometric Face +* and select **Node** instead of vertex. + + +Additionally it is possible to: + +* **Reverse the order of key-points**. By default, the vertices of a face are ordered counterclockwise. +* Enable to **Create polygons near boundary** +* and **Create polyhedrons near boundary** + + +For a **3D pattern** + +.. image:: ../images/patternmapping2.png + :align: center + +In this dialog you should specify: + +* **Pattern**, which can be loaded from .smp pattern file previously created manually or generated automatically from an existing mesh or sub-mesh. +* A 3D block (Solid) object. +* Two vertices that specify the order of nodes in the resulting mesh. + + +Alternatively, it is possible to select **Refine selected mesh elements** check-box and apply the pattern to + +* One or several **Mesh volumes** instead of a geometric 3D object +* and select two **Nodes** instead of vertices. + +Additionally it is possible to: + +* Enable to **Create polygons near boundary** +* and **Create polyhedrons near boundary** + + + +Automatic Pattern Generation +**************************** + +To generate a pattern automatically from an existing mesh or sub-mesh, click **New** button. + +The following dialog box will appear: + +.. image:: ../images/a-patterntype1.png + :align: center + +In this dialog you should specify: + + +* **Mesh or Sub-mesh**, which is a meshed geometrical face (for a 2D pattern) or a meshed solid block (for a 3D pattern). Mesh nodes lying on the face vertices become key-points of the pattern. +* A custom **Pattern Name** +* Additionally, for a 2D pattern you may choose to **Project nodes on the face** to get node coordinates instead of using "positions on face" generated by the mesher (if there is any). The faces having a seam edge cannot be used for automatic pattern creation. + + +When a pattern is created from an existing mesh, two cases are possible: + +* A sub-mesh on a face/solid is selected. The pattern is created from the 2d/3d elements bound to the face/solid by the mesher. For a 2D pattern, the node coordinates are either "positions on face" computed by the mesher, or coordinates got by node projection on a geometrical surface, according to the user choice. For a 3D pattern, the node coordinates correspond to the nodes computed by the mesher. +* A mesh, where the main shape is a face/solid, is selected. The pattern is created from all 2d/3d elements in a mesh. In addition, if all mesh elements of a 2D pattern are built by the mesher, the user can select how to get node coordinates, otherwise all nodes are projected on a face surface. + + +Mapping algorithm +################# + +The mapping algorithm for a 2D case is as follows: + +* The key-points are set counterclockwise in the order corresponding to their location on the pattern boundary. The first key-point is preserved. +* The geometrical vertices corresponding to the key-points are found on face boundary. Here, "Reverse order of key-points" flag is set. + +.. image:: ../images/image95.gif + :align: center + +* The boundary nodes of the pattern are mapped onto the edges of the face: a node located between two key-points on the pattern boundary is mapped on the geometrical edge limited by the corresponding geometrical vertices. The node position on the edge depends on its distance from the key-points. + +.. image:: ../images/image96.gif + :align: center + +* The coordinates of a non-boundary node in the parametric space of the face are defined in the following way. In the parametric space of the pattern, the node lies at the intersection of two iso-lines. Both of them intersect the pattern boundary at two points at least. If the mapped positions of boundary nodes are known, it is possible to find, where the points at the intersection of iso-lines and boundaries are mapped. Then it is possible to find the direction of mapped iso-line section and, finally, the positions of two nodes on two mapped isolines. The eventual mapped position of the node is found as an average of the positions on mapped iso-lines. + +.. image:: ../images/image97.gif + :align: center + +The 3D algorithm is similar. + +**See Also** a sample TUI Script of a :ref:`tui_pattern_mapping` operation. + + diff --git a/doc/salome/gui/SMESH/input/point_marker.rst b/doc/salome/gui/SMESH/input/point_marker.rst new file mode 100644 index 000000000..ddf7e2eb0 --- /dev/null +++ b/doc/salome/gui/SMESH/input/point_marker.rst @@ -0,0 +1,63 @@ +.. _point_marker_page: + +************ +Point Marker +************ + +You can change the representation of points in +the 3D viewer either by selecting one of the predefined +shapes or by loading a custom texture from an external file. + +- Standard point markers + +The Mesh module provides a set of predefined point marker shapes +which can be used to display points in the 3D viewer. +Each standard point marker has two attributes: type (defines shape +form) and scale factor (defines shape size). + +.. image:: ../images/point_marker_widget1.png + :align: center + + +.. image:: ../images/std_point_marker.png + :align: center + +.. centered:: + "Mesh presentation with standard point markers" + +- Custom point markers + +It is also possible to load a point marker shape from an external file. +This file should provide a description of the point texture as a set +of lines; each line is represented as a sequence of "0" and "1" symbols, +where "1" symbol means an opaque pixel and "0" symbol means a +transparent pixel. The width of the texture corresponds to the length +of the longest line in the file, expanded to the nearest byte-aligned +value. The height of the texture is equal to the number of non-empty +lines in the file. Note that missing symbols are replaced by "0". + +Here is a texture file sample: +:: + + 11111111 + 10000001 + 10011001 + 10111101 + 10111101 + 10011001 + 10000001 + 11111111 + + +.. image:: ../images/point_marker_widget2.png + :align: center + + +.. image:: ../images/custom_point_marker.png + :align: center + +.. centered:: + "Mesh presentation with custom point markers" + + + diff --git a/doc/salome/gui/SMESH/input/prism_3d_algo.rst b/doc/salome/gui/SMESH/input/prism_3d_algo.rst new file mode 100644 index 000000000..3ce7a4db9 --- /dev/null +++ b/doc/salome/gui/SMESH/input/prism_3d_algo.rst @@ -0,0 +1,93 @@ +.. _prism_3d_algo_page: + +****************************** +Extrusion 3D meshing algorithm +****************************** + +Extrusion 3D algorithm can be used for meshing prisms, i.e. 3D shapes +defined by two opposing faces having the same number of vertices and +edges. These two faces should be connected by quadrangle "side" faces. + +.. image:: ../images/prism_mesh.png + :align: center + +.. centered:: + "Clipping view of a mesh of a prism with non-planar base and top faces" + +The prism is allowed to have sides composed of several faces. (A prism +side is a row of faces (or one face) connecting the corresponding edges of +the top and base faces). However, a prism +side can be split only vertically as indicated in the +picture below. + +.. image:: ../images/prism_ok_ko.png + :align: center + +.. centered:: + "A suitable and an unsuitable prism" + +In this picture, the left prism is suitable for meshing with 3D +extrusion algorithm: it has six sides, two of which are split +vertically. The right prism cannot be meshed with this +algorithm because one of the prism sides is split horizontally (the +splitting edge is highlighted). + +The algorithm can propagate 2D mesh not only between horizontal +(i.e. base and top) faces of one prism but also between faces of prisms +organized in a stack and between stacks sharing prism sides. + +.. image:: ../images/prism_stack.png + :align: center + +.. centered:: + "Prism stacks" + +This picture shows four neighboring prism stacks, each comprising two prisms. +The shown sub-mesh is used by the algorithm to mesh +all eight prisms in the stacks. + +To use **Extrusion 3D** algorithm you need to assign algorithms +and hypotheses of lower dimensions as follows. +(A sample picture below shows algorithms and hypotheses used to +mesh a cylinder with prismatic volumes). + +.. image:: ../images/prism_needs_hyps.png + :align: center + +The **Global** algorithms and hypotheses to be chosen at +:ref:`create_mesh_anchor` are: + +* 1D algorithm and hypothesis that will be applied for meshing (logically) vertical edges of the prism (which connect the top and the base faces of the prism). In the sample picture above these are "Regular_1D" algorithm and "Number of Segments" hypothesis named "Vertical Nb. Segments". + + +The **Local** algorithms and hypotheses to be chosen at +:ref:`constructing_submeshes_page` are: + +* 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`submesh_shape_section`. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.) + +* Optionally you can define a 1D sub-mesh on some vertical :ref:`submesh_shape_section` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the **Prism stacks** picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge. + + +If **Extrusion 3D** algorithm is assigned to a sub-mesh in a mesh +with multiple sub-meshes, the described above approach may not work as +expected. For example the bottom face may be meshed by other algorithm +before **Extrusion 3D** have a chance to project a mesh from the +base face. This thing can happen with vertical edges as well. All +these can lead to either a meshing failure or to an incorrect meshing. + +In such a case, it's necessary to explicitly define algorithms +that **Extrusion 3D** implicitly applies in a simple case: + +* assign :ref:`projection_1D2D` algorithm to the top face and +* assign a 1D algorithm to a group of all vertical edges. + +.. image:: ../images/image157.gif + :align: center + +.. centered:: + "Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned." + +**See Also** a sample TUI Script of +:ref:`tui_prism_3d_algo`. + + diff --git a/doc/salome/gui/SMESH/input/projection_algos.rst b/doc/salome/gui/SMESH/input/projection_algos.rst new file mode 100644 index 000000000..3b4de91db --- /dev/null +++ b/doc/salome/gui/SMESH/input/projection_algos.rst @@ -0,0 +1,128 @@ +.. _projection_algos_page: + +********************* +Projection Algorithms +********************* + +.. contents:: `Table of contents` + +Projection algorithms allow to define the mesh of a geometrical +object by the projection of another already meshed geometrical object. + +.. note:: + Source and target geometrical objects mush be topologically equal, i.e. they must have same number of sub-shapes, connected to corresponding counterparts. + +.. image:: ../images/topo_equality.png + :align: center + +.. centered:: + Topologically equal faces suitable for 2D projection. + + +.. _projection_1D: + +Projection 1D +============= + +**Projection 1D** algorithm allows to define the mesh of an edge (or group of edges) +by the projection of another already meshed edge (or group of edges). + +To apply this algorithm select the edge to be meshed (indicated in +the field **Geometry** of **Create mesh** dialog box), +**Projection1D** in the list of 1D algorithms and click the +**"Add Hypothesis"** button. +The following dialog box will appear: + +.. image:: ../images/projection_1d.png + :align: center + +In this dialog you can define + +* the **Name** of the algorithm, +* the already meshed **Source Edge** and +* the **Source Mesh** (It can be omitted only when projecting a sub-mesh on another one of the same Mesh). +* It could also be necessary to define the orientation of edges, which is done by indicating the **Source Vertex** being the first point of the **Source Edge **and the **Target Vertex** being the first point of the edge being meshed. + + +For a group of edges, **Source** and **Target** vertices should be +shared by only one edge of the group. If **Source** and **Target** +vertices are specified, the edges in the group must be connected. +The source and target groups must contain equal number of edges +and they must form topologically equal structures. + +.. _projection_2D: + +Projection 2D +============= + + +**Projection 2D** algorithm allows to define the mesh of a face +(or group of faces) by the projection of another already meshed face +(or group of faces). This algorithm works only if all edges of the +target face have been discretized into the same number of +segments as corresponding edges of the source face. + +To apply this algorithm select the face to be meshed (indicated in the +field **Geometry** of **Create mesh** dialog box), **Projection +2D** in the list of 2D algorithms and click the **"Add Hypothesis"** button. The following dialog box will appear: + +.. image:: ../images/projection_2d.png + :align: center + +In this dialog you can define + +* the **Name** of the algorithm, +* the already meshed **Source Face** and +* the **Source Mesh** (It can be omitted only when projecting a submesh on another one of the same Mesh). +* It could also be necessary to define the orientation of mesh on the face, which is done by indicating two **Source Vertices**, which belong to the same edge of the **Source Face**, and two **Target Vertices**, which belong to the same edge of the face being meshed. + + +The groups of faces are suitable for this algorithm only if they +contain an equal number of faces and form topologically equal +structures. + +.. _projection_1D2D: + +Projection 1D-2D +================ + +**Projection 1D-2D** algorithm differs from +:ref:`projection_2D` algorithm in one aspect: it generates mesh segments +on edges of the face according to the projected 2D elements; thus it +does not require the edges to be meshed by any other 1D algorithm; +moreover it does not allow to mesh edges of the face using another +algorithm via definition of sub-meshes. + + +.. _projection_3D: + +Projection 3D +============= + +**Projection 3D** algorithm allows to define the mesh of a shape by +the projection of another already meshed shape. This algorithm works +only if all faces and edges of the target shape have been meshed as 1D-2D +Projections of the faces and edges of the source shape. Another +limitation is that this algorithm currently works only on boxes. + +To apply this algorithm select the solid to be meshed (indicated in +the field **Geometry** of **Create mesh** dialog box), **Projection 3D** +in the list of 3D algorithms and click the button. The +following dialog box will appear: + +.. image:: ../images/projection_3d.png + :align: center + +In this menu you can define the **Name** of the algorithm, the already +meshed source **3D shape** and the **Mesh** (It can be omitted only when +projecting a submesh on another one from the same global Mesh). +It could also be necessary to define the orientation of mesh on the shape, which is +done by indicating two **Source Vertices**, which belong to the same edge +of the source **3D Shape**, and two **Target Vertices**, which belong to the +same edge of the source **3D Shape**. + +**See Also** a sample TUI Script of a +:ref:`tui_projection`. + + + diff --git a/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst new file mode 100644 index 000000000..c2a8b8a46 --- /dev/null +++ b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst @@ -0,0 +1,43 @@ +.. _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 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** +hypothesis. + +.. image:: ../images/quad_from_ma_mesh.png + :align: center + +.. centered:: + "A mesh of a river model to the left and of a ring-face to the right" + +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.) + +.. image:: ../images/quad_from_ma_medial_axis.png + :align: center + +.. centered:: + "Medial Axis between two blue sinuous borders" + +The Medial Axis is used in two ways: + +#. 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. +#. 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 both borders to find positions of nodes. + +.. image:: ../images/quad_from_ma_ring_mesh.png + :align: center + +.. centered:: + "Mesh depends on defined sub-meshes: to the left - sub-meshes on both wires, to the right - a sub-mesh on internal wire only" + diff --git a/doc/salome/gui/SMESH/input/quad_ijk_algo.rst b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst new file mode 100644 index 000000000..f6b4d3883 --- /dev/null +++ b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst @@ -0,0 +1,57 @@ +.. _quad_ijk_algo_page: + +************************************* +Quadrangle: Mapping meshing algorithm +************************************* + +**Quadrangle: Mapping** meshing algorithm is intended for creating +all-quadrangle and quad-dominant meshes on faces without holes and +bound by at least three edges. + +The algorithm can create mesh on any face but its quality and +validity depend on two factors: + +* face shape (number of edges and boundary concavity); +* discretization of edges. + +.. image:: ../images/quad_mesh_invalid.png + :align: center + +.. centered:: + "Invalid mesh on quadrilateral concave faces" + +The algorithm uses **Transfinite Interpolation** technique in the +parametric space of a face to locate nodes inside the face. + +The algorithm treats any face as quadrangle. If a face is bound by +more than four edges, four most sharp vertices are considered as +corners of the quadrangle and all edges between these vertices are +treated as quadrangle sides. In the case of three edges, the vertex +specified by the user is considered as a fourth degenerated side of the +quadrangle. + +.. image:: ../images/quad_meshes.png + :align: center + +.. centered:: + "Algorithm generates a structured mesh on complex faces provided that edges are properly discretized" + +To get an all-quadrangle mesh you have to carefully define 1D +hypotheses on edges of a face. To get a **structured** mesh you have to provide +equal number of segments on opposite sides of the quadrangle. If this +condition is not respected, the algorithm by default (without a +hypothesis) creates a **quad-dominant** mesh with triangles located near the +side with the maximal number of segments. However, you can get an +**all-quadrangle** mesh in this case by using +:ref:`hypo_quad_params_anchor` hypothesis to specify how to make transition mesh between opposite +sides with different number of segments, provided that certain +conditions are respected. In any case the total number of segments must be +even. To use *Reduced* transition method, there must be an equal number +of segments on one pair of opposite sides. + +The following hypotheses help to create quadrangle meshes. + +* :ref:`propagation_anchor` additional 1D hypotheses help to get an equal number of segments on the opposite sides of a quadrilateral face. +* :ref:`a1d_algos_anchor` algorithm is useful to discretize several C1 continuous edges as one quadrangle side. + + diff --git a/doc/salome/gui/SMESH/input/radial_prism_algo.rst b/doc/salome/gui/SMESH/input/radial_prism_algo.rst new file mode 100644 index 000000000..029fb400f --- /dev/null +++ b/doc/salome/gui/SMESH/input/radial_prism_algo.rst @@ -0,0 +1,34 @@ +.. _radial_prism_algo_page: + +************ +Radial Prism +************ + +This algorithm applies to the meshing of a hollow 3D shape, +i.e. such shape should be composed of two meshed shells: an outer +shell and an internal shell without intersection with the outer +shell. One of the shells should be a 2D Projection of the other +shell. The meshes of the shells can consist both of triangles and +quadrangles. + +The Radial Prism algorithm would fill the space between the two shells +with prisms. + +.. image:: ../images/radial_prism_mesh.png + :align: center + +.. centered:: + "Cut-view of a hollow sphere meshed by Radial Prism algorithm" + +This algorithm also needs the information concerning the number and +distribution of mesh layers between the inner and the outer shapes. + +.. image:: ../images/number_of_layers.png + :align: center + +Distribution of layers can be set with any of 1D Hypotheses. + +.. image:: ../images/distribution_of_layers.png + :align: center + + diff --git a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst new file mode 100644 index 000000000..2c55149b3 --- /dev/null +++ b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst @@ -0,0 +1,47 @@ +.. _radial_quadrangle_1D2D_algo_page: + +*********************** +Radial Quadrangle 1D-2D +*********************** + +This algorithm applies to the meshing of 2D shapes under the +following conditions: the face must be a full ellipse or a part of ellipse +(i.e. the number of edges is less or equal to 3 and one of them is an ellipse curve). +The resulting mesh consists of triangles (near the center point) and +quadrangles. + +This algorithm is optionally parametrized by the hypothesis indicating +the number of mesh layers along the radius. The distribution of layers +can be set with any 1D Hypothesis. If the face boundary includes +radial edges, this distribution is applied to the longest radial +edge. If the face boundary does not include radial edges, this +distribution is applied to the longest virtual radial edge. The +distribution is applied to the longest radial edge starting from its +end lying on the elliptic curve. + + +If no own hypothesis of the algorithm is assigned, any local or global +hypothesis is used by the algorithm to discretize edges. + +If no 1D hypothesis is assigned to an edge, +:ref:`nb_segments_pref` preferences +parameter is used to discretize the edge. + +.. image:: ../images/hypo_radquad_dlg.png + :align: center + +.. image:: ../images/mesh_radquad_01.png + :align: center + +.. centered:: + "Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder" + +.. image:: ../images/mesh_radquad_02.png + :align: center + +.. centered:: + "Radial Quadrangle 2D mesh on a part of circle" + +**See also** A sample :ref:`tui_radial_quadrangle`. + + diff --git a/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst new file mode 100644 index 000000000..3fcb4840a --- /dev/null +++ b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst @@ -0,0 +1,142 @@ +.. _removing_nodes_and_elements_page: + +*************************** +Removing nodes and elements +*************************** + +In MESH you can remove nodes and all types of cells of your mesh. + +* :ref:`removing_nodes_anchor` +* :ref:`removing_orphan_nodes_anchor` +* :ref:`removing_elements_anchor` +* :ref:`clear_mesh_anchor` + + + +.. _removing_nodes_anchor: + +Removing nodes +############## + +**To remove a node:** + +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Nodes**, or just click **"Remove nodes"** button in the toolbar. + + .. image:: ../images/remove_nodes_icon.png + :align: center + + .. centered:: + **"Remove nodes" button** + + The following dialog box will appear: + + .. image:: ../images/removenodes.png + :align: center + + + In this dialog box you can specify one or several nodes: + +#. choose mesh nodes with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or +#. input the node IDs directly in **ID Elements** field. The selected nodes will be highlighted in the viewer; or +#. apply Filters. **Set filter** button allows to apply a filter to the selection of nodes. See more about filters in the :ref:`selection_filter_library_page` page. + + + +.. note:: + Be careful while removing nodes because if you remove a definite node of your mesh all adjacent elements will be also deleted. + + +.. _removing_orphan_nodes_anchor: + +Removing orphan nodes +##################### + +There is a quick way to remove all orphan (free) nodes. + +**To remove orphan nodes:** + +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select **Orphan Nodes**, or just click **"Remove orphan nodes"** button in the toolbar. + + .. image:: ../images/remove_orphan_nodes_icon.png + :align: center + + .. centered:: + **"Remove orphan nodes" button** + +The following Warning message box will appear: + + .. image:: ../images/removeorphannodes.png + :align: center + + +Confirm nodes removal by pressing "Yes" button. + + +.. _removing_elements_anchor: + +Removing elements +################# + +**To remove an element:** + +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Elements**, or just click **"Remove elements"** button in the toolbar. + + .. image:: ../images/remove_elements_icon.png + :align: center + + .. centered:: + **"Remove elements" button** + + The following dialog box will appear: + + .. image:: ../images/removeelements.png + :align: center + + In this dialog box you can specify one or several elements + +#. choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or +#. input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or +#. apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. +#. Click **Apply** or **Apply and Close** to confirm deletion of the specified elements. + +.. image:: ../images/remove_nodes1.png + :align: center + +.. centered:: + "The initial mesh" + +.. image:: ../images/remove_nodes2.png + :align: center + +.. centered:: + "The mesh with some elements removed" + + +.. _clear_mesh_anchor: + +Clearing Mesh Data +################## + +**To remove all nodes and all types of cells in your mesh at once:** + +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the Modification menu choose Remove and from the associated submenu select the Clear Mesh Data, or just click **"Clear Mesh Data"** button in the toolbar. You can also right-click on the mesh in the Object Browser and select Clear Mesh Data in the pop-up menu. + +.. image:: ../images/mesh_clear.png + :align: center + +.. centered:: + **"Clear Mesh Data" button** + +.. note:: + This command works in a different way in different situations: + * if the mesh is computed on a geometry, then "Clear Mesh Data" removes all elements and nodes. + * if the mesh is not based on a geometry (imported, compound, created from scratch etc.), then "Clear Mesh Data" removes only the elements and nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing. + +**See Also** a sample TUI Script of a :ref:`tui_removing_nodes_and_elements` operation. + + + diff --git a/doc/salome/gui/SMESH/input/reorient_faces.rst b/doc/salome/gui/SMESH/input/reorient_faces.rst new file mode 100644 index 000000000..142a707d2 --- /dev/null +++ b/doc/salome/gui/SMESH/input/reorient_faces.rst @@ -0,0 +1,70 @@ + +.. _reorient_faces_page: + +************ +Orient faces +************ + +This operation allows fixing the orientation of a set of faces in the following ways: + +* The required orientation of a set of neighboring faces can be defined by a vector giving the direction of a normal to a certain face. Since the direction of face normals in the set can be even opposite, it is necessary to specify a *control* face, the normal to which will be compared with the vector. This face can be either: + * found by proximity to a given point, or + * specified explicitly. +* Alternatively, the faces can be oriented relatively to the adjacent volumes. + +The orientation of a face is changed by reverting the order of its nodes. + +**To set orientation of faces:** + +#. In the **Modification** menu select **Reorient faces** item or click **Reorient faces** button in the toolbar. + + .. image:: ../images/reorient_faces_face.png + :align: center + + .. centered:: + **"Reorient faces" button** + + + +#. In the "Reorient faces" dialog box +#. Select the **Object** (mesh, sub-mesh or group) containing faces to reorient, in the Object Browser or in the 3D Viewer. +#. To reorient by direction of the face normal: + + * Specify the coordinates of the **Point** by which the control face will be found. You can specify the **Point** by picking a node in the 3D Viewer or selecting a vertex in the Object Browser. + * Set up the **Direction** vector to be compared with the normal of the control face. There are following options: + + * adjust vector components directly; + * select a vertex in the Object Browser or a node in the 3D Viewer; their coordinates will define vector components; + * pick two nodes (holding Shift button), the **Direction** vector will go from the first to the second node. + + .. image:: ../images/reorient_2d_point.png + :align: center + + .. centered:: + "The orientation of adjacent faces is chosen according to a vector. The control face is found by point." + + * In the second mode it is possible to pick the **Face** by mouse in the 3D Viewer or directly input the **Face** ID in the corresponding field. + + .. image:: ../images/reorient_2d_face.png + :align: center + + .. centered:: + "The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given." + + + * In the third mode, the faces can be reoriented according to volumes: + + * Select an object (mesh, sub-mesh or group) containing reference **Volumes**, in the Object Browser or in the 3D Viewer. + * Specify whether face normals should point outside or inside the reference volumes using **Face normal outside volume** check-box. + + .. image:: ../images/reorient_2d_volume.png + :align: center + + .. centered:: + "The orientation of faces is chosen relatively to adjacent volumes." + +#. Click the **Apply** or **Apply and Close** button to confirm the operation. + +**See Also** a sample TUI Script of a :ref:`tui_reorient_faces` operation. + + diff --git a/doc/salome/gui/SMESH/input/revolution.rst b/doc/salome/gui/SMESH/input/revolution.rst new file mode 100644 index 000000000..9d13d3de4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/revolution.rst @@ -0,0 +1,88 @@ +.. _revolution_page: + +********** +Revolution +********** + +Revolution is used to build mesh elements of plus one +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`. +See :ref:`extrusion_page` page for general information on Revolution, +which can be viewed as extrusion along a circular path. + +**To apply revolution:** + +#. From the **Modification** menu choose the **Revolution** item or click **"Revolution"** button in the toolbar. + + .. image:: ../images/image92.png + :align: center + + .. centered:: + **"Revolution" button** + + The following dialog will appear: + + .. image:: ../images/revolution1.png + :align: center + + +#. In this dialog: + + * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. + + .. image:: ../images/image120.png + :align: center + + .. centered:: + **"Selection" button** + + * Specify **Nodes**, **Edges** and **Faces**, which will be revolved, by one of following means: + * **Select the whole mesh, sub-mesh or group** activating this check-box. + * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. + * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there. + * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page. + * Specify the **Axis** of revolution: + * Specify the coordinates of the start **Point** of the axis of revolution; either directly or by picking a node in the Viewer (selection of nodes is activated as you click the *Selection* button). + * Specify the **Vector** of the axis in either of three ways: + * directly adjust vector components; + * click *Selection* button, choose **From Origin to selected Point** in the opened menu and pick a node in the Viewer; + * click *Selection* button, chose **Normal to selected Face** in the opened menu and pick a mesh face in the Viewer. + * Specify the **Angle** of revolution and the **Number of steps** of revolution, + * **Angle by Step** - the elements are revolved by the specified angle at each step (i.e. for Angle=30 and Number of Steps=3, the elements will be extruded by 30 degrees twice for a total of 30*3=90) + + .. image:: ../images/revolutionsn2.png + :align: center + + .. centered:: + "Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3" + + * **Total Angle** - the elements are revolved by the specified angle only once and the number of steps defines the number of iterations (i.e. for Angle=30 and Number of Steps=3, the elements will be revolved by 30/3=10 degrees twice for a total of 30). + + .. image:: ../images/revolutionsn1.png + :align: center + + .. centered:: + "Example of Revolution with Total Angle. Angle=30 and Number of Steps=3" + + + + * Specify the **Tolerance**, which is used to detect nodes lying on the axis of revolution. + * Activate **Preview** check-box to see the result mesh in the viewer. + * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "_rotated" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_rotated* group and a quadrangle created at the "top" of revolved mesh will be included in *g_Faces_top* group. + + .. image:: ../images/extrusion_groups.png + :align: center + + .. image:: ../images/extrusion_groups_res.png + :align: center + + + This check-box is active only if there are some groups in the mesh. + +#. Click **Apply** or **Apply and Close** button to confirm the operation. + +**See Also** a sample TUI Script of a :ref:`tui_revolution` operation. + + diff --git a/doc/salome/gui/SMESH/input/rotation.rst b/doc/salome/gui/SMESH/input/rotation.rst new file mode 100644 index 000000000..d84abab6c --- /dev/null +++ b/doc/salome/gui/SMESH/input/rotation.rst @@ -0,0 +1,64 @@ +.. _rotation_page: + +******** +Rotation +******** + +This operation allows to rotate in space the mesh or some of its elements. + +**To rotate the mesh:** + +#. From the **Modification** menu choose **Transformation** -> **Rotation** item or click **"Rotation"** button in the toolbar. + + .. image:: ../images/rotation_ico.png + :align: center + + .. centered:: + "Rotation button" + + The following dialog will appear: + + .. image:: ../images/rotation.png + :align: center + +#. In this dialog: + + * specify the IDs of the elements which will be rotated: + + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. + + * specify the axis of rotation: + * specify the cooordinates of the start **Point** of the vector of rotation; + * specify the **Vector** of rotation through the coordinates of its end point with respect to the coordinates of the start point; + + * specify the **Angle** of rotation + + * specify the conditions of rotation: + + * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; + * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; + * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); + * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. + + * activate **Preview** checkbox to show the result of transformation in the viewer + * click **Apply** or **Apply and Close** button to confirm the operation. + + +.. image:: ../images/rotation1.png + :align: center + +.. centered:: + "The initial mesh" + +.. image:: ../images/rotation2.png + :align: center + +.. centered:: + "The rotated mesh" + +**See Also** a sample TUI Script of a :ref:`tui_rotation` operation. + + diff --git a/doc/salome/gui/SMESH/input/scalar_bar.rst b/doc/salome/gui/SMESH/input/scalar_bar.rst new file mode 100644 index 000000000..a4219cdf9 --- /dev/null +++ b/doc/salome/gui/SMESH/input/scalar_bar.rst @@ -0,0 +1,34 @@ +.. _scalar_bar_dlg: + +********************* +Scalar Bar properties +********************* + +In this dialog you can specify the properties of the scalar bar + +.. image:: ../images/scalar_bar_dlg.png + :align: center + + +* **Scalar Range** - in this menu you can specify **Min value** and **Max value** of the **Scalar Bar**, and turn on/off **Logarithmic** scaling of the scalar bar. + + .. note:: + **Logarithmic scale** is not applicable in case of negative and zero values in the range. In such cases it is disabled. + +* **Font** - in this menu you can set type, face and color for the font of **Title** and **Labels** of the **Scalar Bar** + +* **Colors & Labels** - in this menu you can set the **number of colors** and the **number of labels** of the **Scalar Bar** + +* **Orientation** - allows choosing between vertical and horizontal orientation of the **Scalar Bar**. + +* **Origin & Size Vertical & Horizontal** - allows defining the location (**X** and **Y**) and size (**Width** and **Height**) of **Scalar Bar** + * **X**: abscissa of the origin (from the left side) + * **Y**: ordinate of the origin (from the bottom) +* **Distribution** - in this menu you can Show/Hide distribution histogram of the values of the **Scalar Bar** and specify histogram properties + * **Multicolor** the histogram is colored as **Scalar Bar** + * **Monocolor** the histogram is colored as selected with **Distribution color** selector + + + + + diff --git a/doc/salome/gui/SMESH/input/scale.rst b/doc/salome/gui/SMESH/input/scale.rst new file mode 100644 index 000000000..c8b201cea --- /dev/null +++ b/doc/salome/gui/SMESH/input/scale.rst @@ -0,0 +1,118 @@ +.. _scale_page: + +***** +Scale +***** + +This geometrical operation allows to scale in space your mesh or some of its elements. + +**To scale a mesh:** + +#. From the **Modification** menu choose **Transformation** -> **Scale Transform** item. + One of the following dialogs will appear: + + With one scale factor: + + .. image:: ../images/scale01.png + :align: center + + Or with different scale factors for axes: + + .. image:: ../images/scale02.png + :align: center + +#. In the dialog: + * specify the IDs of the translated elements: + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. + + * specify the base point for scale + + * specify the scale factor + + * specify the conditions of scale: + + * activate **Move elements** radio button to scale the selected mesh (or elements) without creating a copy; + * activate **Copy elements** radio button to duplicate the selected mesh (or elements) and to apply scaling to the copy within the same mesh; + * activate **Create as new mesh** radio button to leave the selected mesh (or elements) at its previous location and create a new mesh of the scaled copy of the selected elements; the new mesh appears in the Object Browser with the default name MeshName_scaled (it is possible to change this name in the adjacent box); + * activate **Copy groups** checkbox to copy the groups of elements existing in the source mesh to the newly created mesh. + + * activate **Preview** checkbox to show the result of transformation in the viewer + * click **Apply** or **Apply and Close** button to confirm the operation. + + +**Example of using:** + +#. Create quandrangle mesh 3x3 on a simple planar face (200x200) + + .. image:: ../images/scaleinit01.png + :align: center + + and union 3 faces (along axis Z) to group "gr_faces" + + .. image:: ../images/scaleinit02.png + :align: center + + + +#. Perform scale operation for the whole mesh and create a new mesh: + + .. image:: ../images/scale03.png + :align: center + + result after operation: + + .. image:: ../images/scaleres03.png + :align: center + +#. Perform scale operation for the whole mesh and copy elements: + + .. image:: ../images/scale04.png + :align: center + + result after operation: + + .. image:: ../images/scaleres04.png + :align: center + +#. Perform scale operation for a group of faces and copy elements: + + .. image:: ../images/scale06.png + :align: center + + result after operation: + + .. image:: ../images/scaleres06.png + :align: center + + + +#. Perform scale operation for two edges and move elements: + + .. image:: ../images/scale07.png + :align: center + + result after operation: + + .. image:: ../images/scaleres07.png + :align: center + + + +#. Perform scale operation for one face and move elements: + + .. image:: ../images/scale09.png + :align: center + + result after operation: + + .. image:: ../images/scaleres09.png + :align: center + + +**See Also** a sample TUI Script of a :ref:`tui_scale` operation. + + + diff --git a/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst new file mode 100644 index 000000000..73cdd6378 --- /dev/null +++ b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst @@ -0,0 +1,24 @@ +.. _segments_around_vertex_algo_page: + +********************** +Segments around Vertex +********************** + +**Segments around Vertex** algorithm is considered to be a 0D meshing +algorithm, but, of course, it doesn't mesh vertices. It allows to define +the local size of the segments in the neighborhood of a certain +vertex. If we assign this algorithm to a geometrical object of higher +dimension, it applies to all its vertices. + +Length of segments near vertex is defined by **Length Near Vertex** hypothesis. +This hypothesis is used by :ref:`a1d_algos_anchor` "Wire Discretization" or +:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms as +follows: a geometrical edge is discretized according to a 1D +hypotheses and then nodes near vertices are modified to assure the +segment length required by **Length Near Vertex** hypothesis. + +.. image:: ../images/lengthnearvertex.png + :align: center + + + diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.rst b/doc/salome/gui/SMESH/input/selection_filter_library.rst new file mode 100644 index 000000000..cb92bd189 --- /dev/null +++ b/doc/salome/gui/SMESH/input/selection_filter_library.rst @@ -0,0 +1,144 @@ +.. _selection_filter_library_page: + +************************ +Selection filter library +************************ + +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**. +It is also possible to save/load a filter by invoking the filter library +from :ref:`filtering_elements` launched from any mesh operation. + +.. image:: ../images/selectionfilterlibrary.png + :align: center + +**Library file name** shows the path and the file name where your +filters will be stored. By clicking the **Browse** button you can +load an existing filter library. + +**Names of filters** lists the filters created or uploaded for +the current study. You can **Add** or **Delete** filters. + +In **Filter name** box you can specify the name for your +filter. By default it is prefixed with the corresponding entity type. + +.. _filtering_elements: + +Filter Dialog +############# + +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. + +.. image:: ../images/a-filteronfaces.png + :align: center + +The **Add** button creates a new criterion at the end of the list of +criteria. The **Insert** button creates a new criterion before the +selected criterion. The **Remove** button deletes the selected +criterion. The **Clear** button deletes all criteria. + +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. + +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 +the found elements should be **More**, **Less** or **Equal** to this +**Value**. You can also reverse the sense of a criterion using **Unary** +operator *Not* and you should specify logical relations between +criteria using **Binary** operators *Or* and *And*. + +Some criteria have the additional parameter of **Tolerance**. +Switching on **Insert filter in viewer** check-box limits +selection of elements in the Viewer to the current filter. + +In the **Source** field you choose if the filter will be applied to +the whole **Mesh**, the **Initial Selection** or the **Current Dialog**. +If **Mesh** is chosen, the elements satisfying the filter +will be selected in the 3D Viewer. If **Initial Selection** is +chosen, the filter will be applied to the selected elements and the +elements rejected by the filter will be deselected. If **Current Dialog** +is chosen, the filter will be applied to the list of +elements in the current dialog and the elements rejected +by the filter will be removed from the list. + +**Copy from...** button gives you a possibility to load an +existing filter from **Selection filter library** and **Add to...** +button gives you a possibility to save your current filter in the Library. + +.. note:: + If the button **Apply and Close** is disabled, there 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. + +Some criteria are applicable to all **Entity types**: + +* **Belong to Geom** selects entities whose all nodes lie on the shape defined by **Threshold Value**. If the threshold shape is a sub-shape of the main shape of the mesh, the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and **Tolerance** is not used. If the threshold shape is any other shape, the algorithm works slower because distance between nodes and the shape is measured and is compared with **Tolerance**. The latter approach (distance measurement) is also used if an element is not associated to any shape. +* **Lying on Geom** selects entities whose at least one node lies on the shape defined by the **Threshold Value**. If the threshold shape is a sub-shape of the main shape of the mesh, the filtering algorithm works faster because node-to-shape association is used instead of measuring distance between nodes and the shape, and **Tolerance** is not used. If the threshold shape is any other shape, the algorithm works slower because distance between nodes and the shape is measured and is compared with **Tolerance**. The latter approach (distance measurement) is also used if an element is not associated to any shape. +* **Belong to Mesh Group** selects entities included into the mesh group defined by the **Threshold Value**. +* **Range of IDs** allows selection of entities with the specified IDs. **Threshold Value** can be, for example: "1,2,3,50-60,63,67,70-78" +* **Color of Group** allows selection of entities belonging to the Group with the color defined by the **Threshold Value**. +* **Elements of a domain** allows selection of entities belonging to one domain of a mesh. The domain is mesh part not connected to other parts. **Threshold Value** locating any element of the domain can be either + * node ID (that you can pick in the Viewer) or + * geometrical vertex (that you can pick either in the Viewer or in the Object Browser) or + * 3 coordinates of a point (that you can enter in TUI mode only). + +Some criteria are applicable to entities of dimension more than zero, i.e. to **Edges**, **Faces** and **Volumes**: + +* **Linear** allows selection of Linear or Quadratic elements (if Unary is set to "Not") +* **Geometry type** allows selection of elements by their geometric type defined by the **Threshold Value**. The list of available geometric types depends on the current entity type. +* **Entity type** allows selection of elements by their type defined as a combination of geometry type and the number of nodes. + +The following criteria are applicable to Entities of **all** types except for *Volumes*: + +* **Belong to Plane** selects entities whose all nodes belong to a specified plane within a given **Tolerance**. +* **Belong to Cylinder** selects entities whose all nodes belong to a specified cylinder within a given **Tolerance**. +* **Belong to Surface** selects entities whose all nodes belong to a specified arbitrary surface within a given **Tolerance**. + +The following criteria allow selecting mesh **Nodes**: + +* **Free nodes** selects nodes not belonging to any mesh element. +* **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`tui_double_nodes_control`. +* **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to the predefined **Threshold Value**. Elements of the highest dimension are countered only. + +The following criteria allow selecting mesh **Edges**: + +* **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`free_borders_page`. +* **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` . +* **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_page`. +* **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_page` . + +The following criteria allow selecting mesh **Faces**: + +* **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page`. +* **Free faces** selects 2D mesh elements, which belong to less than two volumes. +* **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. +* **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page`. +* **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page`. +* **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page`. +* **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_2d_page`. +* **Coplanar faces** selects mesh faces neighboring the one selected by ID in **Threshold Value** field, if the angle between the normal to the neighboring face and the normal to the selected face is less then the angular tolerance (defined in degrees). Selection continues among all neighbor faces of already selected ones. +* **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_2d_page`. + +The following criteria allow selecting mesh **Volumes**: + +* **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. +* **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_3d_page`. +* **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. +* **Bad oriented volume** selects mesh volumes, which are incorrectly oriented from the point of view of MED convention. +* **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page`. +* **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page`. + + + + + diff --git a/doc/salome/gui/SMESH/input/sewing_meshes.rst b/doc/salome/gui/SMESH/input/sewing_meshes.rst new file mode 100644 index 000000000..704504627 --- /dev/null +++ b/doc/salome/gui/SMESH/input/sewing_meshes.rst @@ -0,0 +1,253 @@ +.. _sewing_meshes_page: + +************* +Sewing meshes +************* + +In SMESH you can sew elements of a mesh. The current +functionality allows you to sew: + +* :ref:`free_borders_anchor` +* :ref:`conform_free_borders_anchor` +* :ref:`border_to_side_anchor` +* :ref:`side_elements_anchor` + + +.. image:: ../images/sewing.png + :align: center + +.. centered:: + "Sewing button" + +**To sew elements of a mesh:** + +#. From the **Modification** menu choose the **Transformation** item and from its sub-menu select the **Sewing** item. +#. Check in the dialog box one of the radio buttons corresponding to the type of sewing operation you would like to perform. +#. Fill the other fields available in the dialog box. +#. Click the **Apply** or **Apply and Close** button to perform the operation of sewing. + + + +.. _free_borders_anchor: + +Sew free borders +################ + +This functionality allows you to unite free borders of a 2D mesh. + +There are two working modes: *Automatic* and *Manual*. In the +**Automatic** mode, the program finds free borders coincident within the +specified tolerance and sews them. Optionally it is possible to +visually check and correct if necessary the found free borders before +sewing. +In the **Manual** mode you are to define borders to sew by picking +three nodes of each of two borders. + +.. image:: ../images/sewing1.png + :align: center + +.. centered:: + Default mode is *Automatic* + +To use **Automatic** sewing: + +* Specify the mesh you want to sew by selecting it or any its part (group or sub-mesh) in the Object Browser or in the VTK Viewer. +* Specify the **Tolerance**, within which free borders are considered coincident. At the default zero **Tolerance**, the tolerance used by he search algorithm is defined as one tenth of an average size of elements adjacent to compared free borders. +* To visually check the coincident free borders found by the algorithm, switch off **Auto Sewing** check-box. The controls to adjust groups of coincident free borders will become available in the dialog. + + .. image:: ../images/sewing_auto.png + :align: center + + .. centered:: + Controls to adjust groups of coincident free borders + +* **Detect** button launches the algorithm of search of coincident free borders. +* The found groups of **Coincident Free Borders** are shown in the list, one group per line. Each group has its own color, which is used to display the group borders in the VTK Viewer. A free border within a group is designated by the IDs of its first, second and last nodes within parenthesis. All borders present in the list will be sewn upon **Apply**. +* **Remove** button removes the selected groups from the list. +* **Select All** check-box selects all groups in the list. +* When a group is selected, its borders appear in **Edit Selected Group** list that allows you to change this group. + + .. image:: ../images/sort.png + :align: center + + .. centered:: + **Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing. + + .. image:: ../images/remove.png + :align: center + + .. centered:: + **Remove Border** button removes the selected borders from the group. It is active if there are more than two borders in the group. + + +* Selection of a border in the list allows changing its first and last nodes whose IDs appear in two fields below the list. *Arrow* buttons near each field move the corresponding end node by the number of nodes defined by **Step** field. + + .. image:: ../images/swap.png + :align: center + + .. centered:: + **Swap** button swaps the first and last nodes of a selected border. + + +* For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node: + + .. image:: ../images/sewing_manual.png + :align: center + +* the first node specifies beginning of the border; +* the second node specifies the part of the border which should be considered (as far as the free border usually forms a closed contour); +* the last node specifies the end of the border. + + +You can select these nodes in the 3D viewer or define by its id. + +The first and the second nodes should belong to the same link of a +face. The second and the last nodes of a border can be the same. The +first and the last nodes of two borders can be the same. The +corresponding end nodes of two borders will be merged. Intermediate +nodes of two borders will be either merged or inserted into faces of +the opposite border. + +In practice the borders to sew often coincide and in this case it is +difficult to specify the first and the last nodes of a border since +they coincide with the first and the last nodes of the other +border. To cope with this, +:ref:`merging_nodes_page` coincident nodes into one +beforehand. Two figures below illustrate this approach. + +.. image:: ../images/sew_using_merge.png + :align: center + +.. centered:: + "Merge coincident nodes, which are difficult to distinguish" + +.. image:: ../images/sew_after_merge.png + :align: center + +.. centered:: + "After merging nodes it is easy to specify border nodes" + +The sewing algorithm is as follows: + +#. The parameter (U) of each node within a border is computed. So that the first node has U=0.0, the last node has U=1.0, for the rest nodes 0.0 < U < 1.0; +#. Compare node parameters of the two borders. If two nodes of the opposite borders have close parameters, they are merged, i.e. a node of the first border is replaced in all elements by a node of the second border. If a node has no node with a close parameter in the opposite border, it is inserted into an edge of element of the opposite border, an element is split. Two nodes are considered close enough to merge, if difference of their parameters is less than one fifth of minimum length of adjacent face edges on the borders. + + + .. image:: ../images/image22.jpg + :align: center + + .. centered:: + "Sewing free borders" + +**See Also** a sample TUI Script of a +:ref:`tui_sew_free_borders` operation. + + +.. _conform_free_borders_anchor: + +Sew conform free borders +######################## + +This functionality can be used to unite two free borders of a 2D mesh. + +.. image:: ../images/sewing2.png + :align: center + +The borders of meshes for sewing are defined as for "Sew free borders" +except that the second free border is not limited and can be defined +by the first and the second nodes only. The first nodes of two borders +can be the same. + +The algorithm is following: counting nodes starting at the first ones, +the n-th node of the first border is merged with the n-th node of the +other border, until the end of either of borders. Nodes of the first +border are replaced in all elements with corresponding nodes of the +second border. + +.. note:: + For sewing conform free borders you should define three points on the first border and two points on the second one. User can select these nodes in 3D viewer or define node by its id. + +.. image:: ../images/image23.jpg + :align: center + +.. centered:: + "Sewing conform free borders" + +**See Also** a sample TUI Script of a +:ref:`tui_sew_conform_free_borders` operation. + + +.. _border_to_side_anchor: + +Sew border to side +################## + +"Sew border to side" is intended to sew a free border to a mesh +surface. + +.. note:: + The free border is defined as for "Sewing of free borders". The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side. + +.. image:: ../images/sewing3.png + :align: center + +The algorithm is following. + +#. Find a sequence of linked nodes on the side such that the found links to be most co-directed with the links of the free border. +#. Sew two sequences of nodes using algorithm of "Sewing of free berders". + +.. note:: + For sewing border to side you should define three points on the border and two points on the side. User can select these nodes in 3D viewer or define node by its id. + +.. image:: ../images/image30.jpg + :align: center + +.. centered:: + "Sewing border to side" + +**See Also** a sample TUI Script of a +:ref:`tui_sew_meshes_border_to_side` operation. + + +.. _side_elements_anchor: + +Sew side elements +================= + +This operation is intended to unite two mesh surfaces. + +.. image:: ../images/sewing4.png + :align: center + +Surfaces may be defined by either 2d or 3d elements. The number of +given elements of the sides must be the same. The sets of given +elements must be topologically equal, i.e. each node of one element +set must have a corresponding node in the other element set and +corresponding nodes must be equally linked. If there are 3d elements +in a set, only their free faces must obey to that rule. + +.. note:: Two corresponding nodes on each side must be specified. They must belong to one element and must be located on an element set boundary. + +Sewing algorithm finds and merges the corresponding nodes starting +from the specified ones. + +.. image:: ../images/image31.jpg + :align: center + +.. centered:: + "Step-by-step sewing process" + +.. image:: ../images/image32.jpg + :align: center + +.. centered:: + "The result of side elements sewing" + +For sewing side elements you should define elements for sewing and two +nodes for merging on the each side. User can select these elements and +nodes in 3D viewer or define them by its id. + +**See Also** a sample TUI Script of a +:ref:`tui_sew_side_elements` operation. + + diff --git a/doc/salome/gui/SMESH/input/skew.rst b/doc/salome/gui/SMESH/input/skew.rst new file mode 100644 index 000000000..726e07e7b --- /dev/null +++ b/doc/salome/gui/SMESH/input/skew.rst @@ -0,0 +1,39 @@ +.. _skew_page: + +**** +Skew +**** + +**Skew** mesh quality criterion reflects the angle between the lines +that join opposite sides of a quadrangle element or the greatest angle +between a median and a midline in a triangle element. This mesh quality +criterion can be applied to elements composed of 4 and 3 nodes +(quadrangles and triangles). + +.. image:: ../images/image27.jpg + :align: center + +.. centered:: + **To apply the Skew quality criterion to your mesh:** + + +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Skew** or click **"Skew"** button of the toolbar. + + .. image:: ../images/image40.png + :align: center + + .. centered:: + **"Skew" button** + + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image93.jpg + :align: center + + +**See Also** a sample TUI Script of a +:ref:`tui_skew` operation. + + diff --git a/doc/salome/gui/SMESH/input/smesh_migration.rst b/doc/salome/gui/SMESH/input/smesh_migration.rst new file mode 100644 index 000000000..30993717d --- /dev/null +++ b/doc/salome/gui/SMESH/input/smesh_migration.rst @@ -0,0 +1,118 @@ +.. _smesh_migration_page: + +***************************************************** +Modifing Mesh Python scripts from SALOME 6 and before +***************************************************** + +In SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality: + + +Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality. + +The compatibility mode allows old scripts to work in almost all cases, but with a warning. + +See also :ref:`geompy_migration_page` + +**Salome initialisation must always be done as shown below** + +*salome_init()* can be invoked safely several times): +:: + + import salome + salome.salome_init() + +**smesh initialisation is modified.** +the old mode (from dump): +:: + + import smesh, SMESH, SALOMEDS + smesh.SetCurrentStudy(salome.myStudy) + +the new mode: +:: + + import SMESH, SALOMEDS + from salome.smesh import smeshBuilder + smesh = smeshBuilder.New(salome.myStudy) + + +**Of course,** from smesh import ***is no more possible.** + +You have to explicitely write **smesh.some_method()**. + +**All algorithms have been transferred from the namespace **smesh** to the namespace **smeshBuilder**.** + +For instance: +:: + + MEFISTO_2D_1 = Mesh_1.Triangle(algo=smesh.MEFISTO,geom=Face_1) + +is replaced by: +:: + + MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) + +StdMeshers algorithms concerned are **REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD**. + +SMESH Plugins provide such algorithms as: **NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D**. + +If you use DISTENE plugins, you also have **BLSURF, GHS3D, GHS3DPRL, Hexotic**. + +**Some variables were available in both namespaces **smesh** and **SMESH**. + +Now they are available only in namespace **SMESH****. + +The dump function used only the namespace **SMESH**, +so, if your script was built with the help of the dump function, it should be already OK in this respect. + +The most used variables concerned are: + **NODE, EDGE, FACE, VOLUME, ALL.** + **FT_xxx, geom_xxx, ADD_xxx...** + +For instance: +:: + + srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", smesh.FACE ) + mesh.MakeGroup("Tetras",smesh.VOLUME,smesh.FT_ElemGeomType,"=",smesh.Geom_TETRA) + filter = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, 6.5) + +is replaced by: +:: + + srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", SMESH.FACE ) + mesh.MakeGroup("Tetras",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_TETRA) + filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, SMESH.FT_MoreThan, 6.5) + + +**The namespace **smesh.smesh** does not exist any more, use **smesh** instead.** +For instance: +:: + + Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) + +is replaced by: +:: + + Compound1 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) + +**If you need to import a %SMESH Plugin explicitely, keep in mind that they are now located in separate namespaces.** + +For instance: +:: + + import StdMeshers + import NETGENPlugin + import BLSURFPlugin + import GHS3DPlugin + import HexoticPLUGIN + +is replaced by: +:: + + from salome.StdMeshers import StdMeshersBuilder + from salome.NETGENPlugin import NETGENPluginBuilder + from salome.BLSURFPlugin import BLSURFPluginBuilder + from salome.GHS3DPlugin import GHS3DPluginBuilder + from salome.HexoticPLUGIN import HexoticPLUGINBuilder + + diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.rst b/doc/salome/gui/SMESH/input/smeshpy_interface.rst new file mode 100644 index 000000000..48a064280 --- /dev/null +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.rst @@ -0,0 +1,121 @@ +.. _smeshpy_interface_page: + +**************** +Python interface +**************** + +Python API of SALOME Mesh module defines several classes that can +be used for easy mesh creation and edition. + +Documentation of SALOME %Mesh module Python API is available in two forms: + +- `Structured documentation `_, where all methods and classes are grouped by their functionality. + +- `Linear documentation `_ grouped only by classes, declared in the :ref:`smeshBuilder` and :ref:`StdMeshersBuilder` Python packages. + +With SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality. + +You may have to modify your scripts generated with SALOME 6 or older versions. + +Please see :ref:`smesh_migration_page`. + +Class :ref:`smeshBuilder.smeshBuilder` provides an interface to create and handle +meshes. It can be used to create an empty mesh or to import mesh from the data file. + +As soon as a mesh is created, it is possible to manage it via its own +methods, described in class :ref:`smeshBuilder.Mesh` documentation. + +Class :ref:`smeshstudytools.SMeshStudyTools` provides several methods to manipulate mesh objects in Salome study. + +A usual workflow to generate a mesh on geometry is following: + +#. Create an instance of :ref:`smeshBuilder.smeshBuilder`: + .. code-block:: python + :linenos: + + from salome.smesh import smeshBuilder + smesh = smeshBuilder.New( salome.myStudy ) + +#. Create a :ref:`smeshBuilder.Mesh` object: + + .. code-block:: python + :linenos: + + mesh = :ref:`smeshBuilder.smeshBuilder.Mesh`smesh.Mesh( geometry ) + +#. Create and assign :ref:`basic_meshing_algos_page` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`constructing_submeshes_page` is implicitly created on this sub-shape: + .. code-block:: python + :linenos: + + regular1D = :ref:`smeshBuilder.Mesh.Segment` + mefisto = :ref:`smeshBuilder.Mesh.Triangle` ( smeshBuilder.MEFISTO ) + # use other triangle algorithm on a face -- a sub-mesh appears in the mesh + netgen = :ref:`smeshBuilder.Mesh.Triangle` ( smeshBuilder.NETGEN_1D2D, face ) + +#. Create and assign :ref:`about_hypo_page` by calling corresponding methods of algorithms: + .. code-block:: python + :linenos: + + segLen10 = :ref:`StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength`( 10. ) + maxArea = :ref:`StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength`( 100. ) + netgen.SetMaxSize( 20. ) + netgen.SetFineness( smeshBuilder.VeryCoarse ) + +#. :ref:`compute_anchor` the mesh (generate mesh nodes and elements): + .. code-block:: python + :linenos: + + :ref:`Mesh.Compute`() + +An easiest way to start with Python scripting is to do something in +GUI and then to get a corresponding Python script via +**File > Dump Study** menu item. Don't forget that you can get +all methods of any object in hand (e.g. a mesh group or a hypothesis) +by calling *dir()* Python built-in function. + +All methods of the Mesh Group can be found in :ref:`tui_create_standalone_group` sample script. + +An example below demonstrates usage of the Python API for 3d mesh +generation and for retrieving information on mesh nodes and elements. + +.. _example_3d_mesh: + +Example of 3d mesh generation: +############################## + +.. _3dmesh.py: + +``3dmesh.py`` + + +.. literalinclude:: ../../../examples/3dmesh.py + :linenos: + :language: python + +:download:`../../../examples/3dmesh.py` + +Examples of Python scripts for Mesh operations are available by +the following links: + +- :ref:`tui_creating_meshes_page` +- :ref:`tui_defining_hypotheses_page` +- :ref:`tui_grouping_elements_page` +- :ref:`tui_filters_page` +- :ref:`tui_modifying_meshes_page` +- :ref:`tui_transforming_meshes_page` +- :ref:`tui_viewing_meshes_page` +- :ref:`tui_quality_controls_page` +- :ref:`tui_measurements_page` +- :ref:`tui_work_on_objects_from_gui` +- :ref:`tui_notebook_smesh_page` +- :ref:`tui_cartesian_algo` +- :ref:`tui_use_existing_faces` +- :ref:`tui_prism_3d_algo` +- :ref:`tui_generate_flat_elements_page` + + + +.. toctree:: + :maxdepth: 2 + + smesh_migration.rst diff --git a/doc/salome/gui/SMESH/input/smoothing.rst b/doc/salome/gui/SMESH/input/smoothing.rst new file mode 100644 index 000000000..37e9b189e --- /dev/null +++ b/doc/salome/gui/SMESH/input/smoothing.rst @@ -0,0 +1,69 @@ +.. _smoothing_page: + +********* +Smoothing +********* + +Smoothing is used to improve quality of 2D mesh by adjusting the +locations of element corners (nodes). + +.. note:: Depending on the chosen method and mesh geometry the smoothing can actually decrease the quality of elements and even make some elements inverted. + +**To apply smoothing to the elements of your mesh:** + +#. In the **Modification** menu select the **Smoothing** item or click **"Smoothing"** button in the toolbar. + + .. image:: ../images/image84.png + :align: center + + .. centered:: + **"Smoothing" button** + + The following dialog will appear: + + .. image:: ../images/smoothing.png + :align: center + +#. In this dialog: + + * specify the IDs of the elements which will be smoothed: + * **Select the whole mesh, sub-mesh or group** activating this check-box; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filters** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page. + + * define the **Fixed nodes ids** that should remain at their location during smoothing. If a mesh is built on a shape, the nodes built on its geometric edges are always fixed. If the smoothing is applied to a part of the mesh (a set of element), the nodes on boundary of the element set are also fixed. It is possible to additionally fix any other nodes. The fixed nodes can be selected manually or by filters, just as the smoothed elements. + * choose the **Smoothing Method:** + * **Laplacian** smoothing pulls a node toward the center of surrounding nodes directly connected to that node along an element edge. + * **Centroidal** smoothing pulls a node toward the element-area-weighted centroid of the surrounding elements. + + Laplacian method will produce the mesh with the least element edge length. It is also the fastest method. Centroidal smoothing produces a mesh with more uniform element sizes. + + + .. image:: ../images/image83.gif + :align: center + + + * specify the **Iteration limit**. Both smoothing methods iterate through a number of steps to produce the resulting smoothed mesh. At each new step the smoothing is reevaluated with the updated nodal locations. This process continues till the limit of iterations has been exceeded, or till the aspect ratio of all element is less than or equal to the specified one. + * specify the **Max. aspect ratio** - the target mesh quality at which the smoothing algorithm should stop the iterations. + * activate **in parametric space** check-box if it is necessary to improve the shape of faces in the parametric space of geometrical surfaces on which they are generated, else the shape of faces in the 3D space is improved that is suitable for **planar meshes only**. + +#. Click **Apply** or **Apply and Close** button to confirm the operation. + + +.. image:: ../images/smoothing1.png + :align: center + +.. centered:: + "The initial mesh" + +.. image:: ../images/smoothing2.png + :align: center + +.. centered:: + "The smoothed mesh" + +**See Also** a sample TUI Script of a +:ref:`tui_smoothing` operation. + + diff --git a/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst new file mode 100644 index 000000000..94b79f3ac --- /dev/null +++ b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst @@ -0,0 +1,44 @@ +.. _split_biquad_to_linear_page: + +****************************** +Split bi-quadratic into linear +****************************** + +This functionality allows to split bi-quadratic elements into +linear ones without creation of additional nodes. + +So that + +* bi-quadratic triangle will be split into 3 linear quadrangles; +* bi-quadratic quadrangle will be split into 4 linear quadrangles; +* tri-quadratic hexahedron will be split into 8 linear hexahedra; +* quadratic segments adjacent to the split bi-quadratic element will be split into 2 liner segments. + +.. image:: ../images/split_biquad_to_linear_mesh.png + :align: center + +.. centered:: + "Mesh before and after splitting" + +**To split bi-quadratic elements into linear:** + +#. From the **Modification** menu choose the **Split bi-quadratic into linear** item or click **"Split bi-quadratic into linear"** button in the toolbar. + + .. image:: ../images/split_biquad_to_linear_icon.png + :align: center + + .. centered:: + **"Split bi-quadratic into linear" button** + + The following dialog box shall appear: + + .. image:: ../images/split_biquad_to_linear_dlg.png + :align: center + + +#. Select a mesh, groups or sub-meshes in the Object Browser or in the Viewer. +#. Click the **Apply** or **Apply and Close** button. + +**See Also** a sample TUI Script of a :ref:`tui_split_biquad` operation. + + diff --git a/doc/salome/gui/SMESH/input/split_to_tetra.rst b/doc/salome/gui/SMESH/input/split_to_tetra.rst new file mode 100644 index 000000000..692e3af3e --- /dev/null +++ b/doc/salome/gui/SMESH/input/split_to_tetra.rst @@ -0,0 +1,56 @@ +.. _split_to_tetra_page: + +***************** +Splitting volumes +***************** + +This operation allows to split either any volumic elements into +tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly. + +**To split volumes:** + +#. Select a mesh, a sub-mesh or a group. +#. In the **Modification** menu select the **Split Volumes** item or click **"Split Volumes"** button in the toolbar. + + .. image:: ../images/split_into_tetra_icon.png + :align: center + + .. centered:: + **"Split Volumes" button** + + The following dialog box will appear: + + .. image:: ../images/split_into_tetra.png + :align: center + + + First it is possible to select the type of operation: + + * If **Tetrahedron** button is checked, the operation will split volumes of any type into tetrahedra. + * If **Prism** button is checked, the operation will split hexahedra into prisms. + * The main list contains the list of volumes to split. You can click on a volume in the 3D viewer and it will be highlighted (lock Shiftkeyboard button to select several volumes). Click **Add** button and the ID of this volume will be added to the list. To remove the selected element or elements from the list click **Remove** button. **Sort list** button allows to sort the list of IDs. **Filter** button allows applying a filter to the selection of volumes. + **Note:** If you split not all adjacent non-tetrahedral volumes, your mesh becomes non-conform. + + * **Apply to all** radio button allows splitting all volumes of the currently selected mesh. + * If **Tetrahedron** element type is selected, **Split hexahedron** group allows specifying the number of tetrahedra a hexahedron will be split into. If the chosen method does not allow to get a conform mesh, a generic solution is applied: an additional node is created at the gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron. + + * If **Prism** element type is selected, the **Split hexahedron** group looks as follows: + + .. image:: ../images/split_into_prisms.png + :align: center + + * **Into 2 (or 4) prisms** allows to specify the number of prisms a hexahedron will be split into. + * **Facet to split** group allows to specify the side (facet) of the hexahedron, which is split into triangles. This facet is defined by a point and a direction. The algorithm finds a hexahedron closest to the specified point and splits a facet whose normal is closest to the specified direction. Then the splitting is propagated from that hexahedron to all adjacent hexahedra. The point and the direction by which the first split hexahedron is found can be specified: + + * by input of coordinates in **Hexa location** and **Facet normal** fields, or + * by clicking **Selection** button and selecting in the viewer the element whose barycenter will be used as the start point and whose direction will be used as a normal to facet to split into triangles. Switch this button off to return to selection of volumes to split. + + + * If **All domains** option is off, the operation stops when all hehexedra adjacent to the start hexahedron are split into prisms. Else the operation tries to continue splitting starting from another hexahedron closest to the **Hexa location**. + + * **Select from** set of fields allows choosing a sub-mesh or an existing group whose elements will be added to the list as you click **Add** button. + + +#. Click **Apply** or **Apply and Close** button to confirm the operation. + + diff --git a/doc/salome/gui/SMESH/input/symmetry.rst b/doc/salome/gui/SMESH/input/symmetry.rst new file mode 100644 index 000000000..c013100d4 --- /dev/null +++ b/doc/salome/gui/SMESH/input/symmetry.rst @@ -0,0 +1,79 @@ +.. _symmetry_page: + +******** +Symmetry +******** + +This geometrical operation allows to perform a symmetrical copy of your mesh or some of its elements. + +**To create a symmetrical copy:** + +#. From the **Modification** menu choose **Transformation** -> **Symmetry** item or click **"Symmetry"** button in the toolbar. + + .. image:: ../images/symmetry.png + :align: center + + .. centered:: + "Symmetry button" + + One of the following dialogs will appear: + + It is possible to mirror a mesh or some of its elements through: + + .. image:: ../images/symmetry1.png + :align: center + + .. centered:: + "a point" + + .. image:: ../images/symmetry2.png + :align: center + + .. centered:: + "an axis" + + .. image:: ../images/symmetry3.png + :align: center + + .. centered:: + a plane (defined by a point and a normal to the plane)" + + + +#. In the dialog: + + * specify the elements for the symmetry operation: + + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set Filter** button allows to apply a :ref:`filtering_elements` to the selection of elements. + + * depending on the nature of the mirror object: + + * if the mesh is mirrored through a point, specify the coordinates of the point, either directly or by picking a mesh node; + * if the mesh is mirrored through an axis: + + * specify the coordinates of the start **Point** of the axis, either directly or by picking a mesh node; + * specify the components of axis **Vector**, either directly or by picking a mesh node, in which case **Vector** is defined as a shift between the **Point** and the node; + + * if the mesh is mirrored through a plane: + + * specify the cooordinates of the **Point** lying on the plane, either directly or by picking a mesh node; + * specify the components of plane **Normal**, either directly or by picking a mesh node, in which case **Normal** is defined as a shift between the **Point** and the node. + + * specify the conditions of symmetry operation: + + * activate **Move elements** radio button to change the location of the selected elements within the current mesh; + * activate **Copy elements** radio button to duplicate the selected elements at the new location within the current mesh; + * activate **Create as new mesh** radio button to create a new element in a new mesh; the new mesh appears in the Object Browser with the default name *MeshName_mirrored* (it is possible to change this name in the adjacent box); + * activate **Copy groups** check-box to put new mesh entities into new groups if source entities belong to some groups. New groups are named by pattern "_mirrored". + + * activate **Preview** check-box to show the result of transformation in the viewer; + * click **Apply** or **Apply and Close** button to confirm the operation. + + +**See Also** a sample TUI Script of a +:ref:`tui_symmetry` operation. + + diff --git a/doc/salome/gui/SMESH/input/taper.rst b/doc/salome/gui/SMESH/input/taper.rst new file mode 100644 index 000000000..768fda0bc --- /dev/null +++ b/doc/salome/gui/SMESH/input/taper.rst @@ -0,0 +1,35 @@ +.. _taper_page: + +***** +Taper +***** + +**Taper** mesh quality criterion represents the ratio of the areas +of two triangles separated by a diagonal within a quadrilateral face. + +:: + + **JA = 0.25 * (A1 + A2 + A3 + A4)** + **TAPER = MAX(|A1/JA - 1|, |A2/JA - 1|, |A3/JA - 1|, |A4/JA - 1|)** + +**To apply the Taper quality criterion to your mesh:** + + +#. Display your mesh in the viewer. + +#. Choose **Controls > Face Controls > Taper** or click **"Taper"** button in the toolbar. + + .. image:: ../images/image36.png + :align: center + + .. centered:: + **"Taper" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image90.jpg + :align: center + +**See Also** a sample TUI Script of a +:ref:`tui_taper` operation. + diff --git a/doc/salome/gui/SMESH/input/tools.rst b/doc/salome/gui/SMESH/input/tools.rst new file mode 100644 index 000000000..3ffb4f968 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tools.rst @@ -0,0 +1,18 @@ +.. _tools_page: + +******* +Plugins +******* + +The following plugins are accessible via **Mesh > SMESH pligins** menu: + +* `SpherePadder plugin `_ +* `MGSurfOpt plugin `_ +* `MGCleaner plugin `_ +* `Z-cracks plugin `_ +* `MacMesh plugin `_ +* `blocFissure plugin `_ +* **MeshCut plugin** - allows to cut a mesh constituted of linear tetrahedrons by a plane. +* **Get min or max value of control** - a sample plugin whose sources are located in **${GUI_ROOT_DIR}/share/salome/plugins/gui/demo** directory (files **minmax_plugin.py, minmax_ui.py and smesh_plugins.py**). You can find a detailed description of how to create your own plugin in documentation: **Help > GUI module > User's Guide > How-To's and Best Practices > Extend SALOME gui functions using python plugins**. + + diff --git a/doc/salome/gui/SMESH/input/translation.rst b/doc/salome/gui/SMESH/input/translation.rst new file mode 100644 index 000000000..8d1c47a67 --- /dev/null +++ b/doc/salome/gui/SMESH/input/translation.rst @@ -0,0 +1,66 @@ +.. _translation_page: + +*********** +Translation +*********** + +This geometrical operation allows to translate in space your mesh +or some of its elements. + +**To translate a mesh:** + + +#. From the **Modification** menu choose **Transformation** -> **Translation** item or click **"Translation"** button in the toolbar. + + .. image:: ../images/translation.png + :align: center + .. centered:: + "Translation button" + + One of the following dialogs will appear: + + It is possible to define the vector of thanslation: + + .. image:: ../images/translation1.png + :align: center + + .. centered:: + "by two points" + +| + + .. image:: ../images/translation2.png + :align: center + + .. centered:: + "by the vector from the origin of coordinates" + + + +#. In the dialog: + + * specify the IDs of the translated elements: + + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. + + * specify the vector of translation: + + * specify the cooordinates of the start and end **Points** of the vector of translation; or + * specify the end point of the **Vector** of rotation starting at the origin of coordinates. + + * specify the conditions of translation: + + * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; + * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; + * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); + * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. + + * activate **Preview** checkbox to show the result of transformation in the viewer + * click **Apply** or **Apply and Close** button to confirm the operation. + +**See Also** a sample TUI Script of a :ref:`tui_translation` operation. + + diff --git a/doc/salome/gui/SMESH/input/transparency.rst b/doc/salome/gui/SMESH/input/transparency.rst new file mode 100644 index 000000000..59900338a --- /dev/null +++ b/doc/salome/gui/SMESH/input/transparency.rst @@ -0,0 +1,13 @@ +.. _transparency_page: + +************ +Transparency +************ + +.. image:: ../images/a-transparency.png + :align: center + +Using this slider you can set the transparency of shading. Absolutely +transparent shading will be invisible. By default it is absolutely +opaque. + diff --git a/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst b/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst new file mode 100644 index 000000000..ea77136ab --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst @@ -0,0 +1,19 @@ +.. _tui_cartesian_algo: + +Body Fitting algorithm +###################### + + Usage of Body Fitting algorithm + +.. _cartesian_alogo.py: + +``cartesian_algo.py`` + +.. literalinclude:: ../../../examples/cartesian_algo.py + :linenos: + :language: python + +:download:`../../../examples/cartesian_algo.py` + + + diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.rst b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst new file mode 100644 index 000000000..314858dbd --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst @@ -0,0 +1,156 @@ +.. _tui_creating_meshes_page: + +*************** +Creating Meshes +*************** + +.. contents:: `Table of contents` + + +First of all see :ref:`example_3d_mesh` which is an example of good python script style for Mesh module. + + +.. _construction_of_a_mesh: + +Construction of a mesh +====================== + + +.. _creating_meshes_ex01.py: + +``creating_meshes_ex01.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex01.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex01.py` + +.. _tui_construction_submesh: + +Construction of a sub-mesh +========================== + +.. _creating_meshes_ex02.py: + +``creating_meshes_ex02.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex02.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex02.py` + +.. _change_priority_of_submeshes_in_mesh: + +Change priority of sub-meshes in mesh +===================================== + +.. _creating_meshes_ex03.py: + +``creating_meshes_ex03.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex03.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex03.py` + +.. _tui_editing_while_meshing: + +Intermediate edition while meshing +================================== + +.. _a3DmeshOnModified2Dmesh.py: + +``a3DmeshOnModified2Dmesh.py`` + +.. literalinclude:: ../../../examples/a3DmeshOnModified2Dmesh.py + :linenos: + :language: python + +:download:`../../../examples/a3DmeshOnModified2Dmesh.py` + +.. _tui_editing_mesh: + +Editing a mesh (i.e. changing hypotheses) +========================================= + +.. _creating_meshes_ex04.py: + +``creating_meshes_ex04.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex04.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex04.py` + +.. _tui_export_mesh: + +Export of a Mesh +================ + +.. _creating_meshes_ex05.py: + +``creating_meshes_ex05.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex05.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex05.py` + +.. _how_to_mesh_a_cylinder_with_hexahedrons: + +How to mesh a cylinder with hexahedrons? +======================================== + +Here you can see an example of python script, creating a hexahedral +mesh on a cylinder. A picture below the source code of the script +demonstrates the resulting mesh. + +.. _creating_meshes_ex06.py: + +``creating_meshes_ex06.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex06.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex06.py` + +.. image:: ../images/mesh_cylinder_hexa.png + :align: center + + +.. _tui_building_compound: + +Building a compound of meshes +============================= + +.. _creating_meshes_ex07.py: + +``creating_meshes_ex07.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex07.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex07.py` + +.. _tui_copy_mesh: + +Mesh Copying +============ + +.. _creating_meshes_ex08.py: + +``creating_meshes_ex08.py`` + +.. literalinclude:: ../../../examples/creating_meshes_ex08.py + :linenos: + :language: python + +:download:`../../../examples/creating_meshes_ex08.py` + diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst new file mode 100644 index 000000000..329701dfa --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst @@ -0,0 +1,329 @@ +.. _tui_defining_hypotheses_page: + +********************************** +Defining Hypotheses and Algorithms +********************************** + +This page provides example codes of :ref:`tui_defining_meshing_algos` +"defining algorithms" and hypotheses. + +* Wire discretisation 1D algorithm + + * :ref:`tui_1d_adaptive` hypothesis + * :ref:`tui_1d_arithmetic` hypothesis + * :ref:`tui_deflection_1d` hypotheses + * :ref:`tui_start_and_end_length` hypotheses + * :ref:`tui_average_length` + * :ref:`tui_propagation` additional hypothesis + * :ref:`tui_fixed_points` hypothesis + + +* Triangle: Mefisto 2D algorithm + + * :ref:`tui_max_element_area` hypothesis + * :ref:`tui_length_from_edges` hypothesis + + +* NETGEN 3D algorithm + + * :ref:`tui_max_element_volume` hypothesis + * :ref:`tui_viscous_layers` + + +* :ref:`tui_projection` +* :ref:`tui_radial_quadrangle` algorithm +* Quadrangle: Mapping 2D algorithm + + * :ref:`tui_quadrangle_parameters` hypothesis + + +* :ref:`tui_import` from Another Mesh" algorithm + + + +Defining 1D Hypotheses +###################### + + + +.. _tui_1d_arithmetic: + +Arithmetic Progression and Geometric Progression +================================================ + +.. _defining_hypotheses_ex01.py: + +``defining_hypotheses_ex01.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex01.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex01.py` + +.. _tui_1d_adaptive: + +Adaptive +======== + +.. _defining_hypotheses_adaptive1d.py: + +``defining_hypotheses_adaptive1d.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_adaptive1d.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_adaptive1d.py` + + +.. _tui_deflection_1d: + +Deflection and Number of Segments +================================= + +.. _defining_hypotheses_ex02.py: + +``defining_hypotheses_ex02.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex02.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex02.py` + + +.. _tui_start_and_end_length: + +Start and End Length +==================== + +.. _creating_meshes_ex08.py: + +``defining_hypotheses_ex03.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex03.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex03.py` + + +.. _tui_average_length: + +Local Length +============ + +.. _defining_hypotheses_ex04.py: + +``defining_hypotheses_ex04.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex04.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex04.py` + +Defining 2D and 3D hypotheses +############################# + + +.. _tui_max_element_area: + +Maximum Element Area +==================== + +.. _defining_hypotheses_ex05.py: + +``defining_hypotheses_ex05.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex05.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex05.py` + + +.. _tui_max_element_volume: + +Maximum Element Volume +====================== + +.. _defining_hypotheses_ex06.py: + +``defining_hypotheses_ex06.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex06.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex06.py` + + +.. _tui_length_from_edges: + +Length from Edges +================= + +.. _defining_hypotheses_ex07.py: + +``defining_hypotheses_ex07.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex07.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex07.py` + +Defining Additional Hypotheses +############################## + +.. _tui_propagation: + +Propagation +=========== + +.. _defining_hypotheses_ex08.py: + +``defining_hypotheses_ex08.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex08.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex08.py` + + +.. _tui_defining_meshing_algos: + +Defining Meshing Algorithms +########################### + +.. _defining_hypotheses_ex09.py: + +``defining_hypotheses_ex09.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex09.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex09.py` + + +.. _tui_projection: + +Projection Algorithms +===================== + +.. _defining_hypotheses_ex10.py: + +``defining_hypotheses_ex10.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex10.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex10.py` + +Projection 1D2D +=============== + +.. _defining_hypotheses_ex11.py: + +``defining_hypotheses_ex11.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex11.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex11.py` + +.. _tui_fixed_points: + +1D Mesh with Fixed Points example +################################# + +.. _defining_hypotheses_ex12.py: + +``defining_hypotheses_ex12.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex12.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex12.py` + +.. _tui_radial_quadrangle: + +Radial Quadrangle 1D-2D example +############################### + +.. _defining_hypotheses_ex13.py: + +``defining_hypotheses_ex13.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex13.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex13.py` + +.. _tui_quadrangle_parameters: + +Quadrangle Parameters example 1 (meshing a face with 3 edges) +############################################################## + +.. _defining_hypotheses_ex14.py: + +``defining_hypotheses_ex14.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex14.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex14.py` + +Quadrangle Parameters example 2 (using different types) +####################################################### + +.. _defining_hypotheses_ex15.py: + +``defining_hypotheses_ex15.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex15.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex15.py` + +.. _tui_import: + +"Import 1D-2D Elements from Another Mesh" example +################################################# + +.. _defining_hypotheses_ex16.py: + +``defining_hypotheses_ex16.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex16.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex16.py` + +.. _tui_viscous_layers: + +Viscous layers construction +########################### + +.. _defining_hypotheses_ex17.py: + +``defining_hypotheses_ex17.py`` + +.. literalinclude:: ../../../examples/defining_hypotheses_ex17.py + :linenos: + :language: python + +:download:`../../../examples/defining_hypotheses_ex17.py` + + diff --git a/doc/salome/gui/SMESH/input/tui_filters.rst b/doc/salome/gui/SMESH/input/tui_filters.rst new file mode 100644 index 000000000..67cdb3ebe --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_filters.rst @@ -0,0 +1,959 @@ +.. _tui_filters_page: + +************* +Filters usage +************* + +.. contents:: `Table of contents` + + +Filters allow picking only the mesh elements satisfying to a +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 filtering criteria can be combined together by using logical +operators *AND* and *OR*. In addition, a filtering criterion can +be reverted using logical operator *NOT*. + +Mesh filters can use the functionality of mesh quality controls to filter +mesh nodes / elements by a specific characteristic (Area, Length, etc). + +This page provides a short description of the existing mesh filters, +describes required parameters and gives simple examples of usage in +Python scripts. + +**See also:** :ref:`tui_quality_controls_page` + +.. _filter_aspect_ratio: + +Aspect ratio +============ + +filters 2D mesh elements (faces) according to the aspect ratio value: + +* element type should be *SMESH.FACE* +* functor type should be *SMESH.FT_AspectRatio* +* threshold is floating point value (aspect ratio) + +.. _filters_ex01.py: + +``filters_ex01.py`` + +.. literalinclude:: ../../../examples/filters_ex01.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex01.py` + +**See also:** :ref:`tui_aspect_ratio` + +.. _filter_aspect_ratio_3d: + +Aspect ratio 3D +=============== + +filters 3D mesh elements (volumes) according to the aspect ratio value: + +* element type is *SMESH.VOLUME* +* functor type is *SMESH.FT_AspectRatio3D* +* threshold is floating point value (aspect ratio) + +.. _filters_ex02.py: + +``filters_ex02.py`` + +.. literalinclude:: ../../../examples/filters_ex02.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex02.py` + +**See also:** :ref:`tui_aspect_ratio_3d` + +.. _filter_warping_angle: + +Warping angle +============= + +filters 2D mesh elements (faces) according to the warping angle value: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_Warping* +* threshold is floating point value (warping angle) + +.. _filters_ex03.py: + +``filters_ex03.py`` + +.. literalinclude:: ../../../examples/filters_ex03.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex03.py` + +**See also:** :ref:`tui_warping` + +.. _filter_minimum_angle: + +Minimum angle +============= + +filters 2D mesh elements (faces) according to the minimum angle value: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_MinimumAngle* +* threshold is floating point value (minimum angle) + +.. _filters_ex04.py: + +``filters_ex04.py`` + +.. literalinclude:: ../../../examples/filters_ex04.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex04.py` + +**See also:** :ref:`tui_minimum_angle` + +.. _filter_taper: + +Taper +===== + +filters 2D mesh elements (faces) according to the taper value: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_Taper* +* threshold is floating point value (taper) + +.. _filters_ex05.py: + +``filters_ex05.py`` + +.. literalinclude:: ../../../examples/filters_ex05.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex05.py` + +**See also:** :ref:`tui_taper` + +.. _filter_skew: + +Skew +==== + +filters 2D mesh elements (faces) according to the skew value: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_Skew* +* threshold is floating point value (skew) + +.. _filters_ex06.py: + +``filters_ex06.py`` + +.. literalinclude:: ../../../examples/filters_ex06.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex06.py` + +**See also:** :ref:`tui_skew` + +.. _filter_area: + +Area +==== + +filters 2D mesh elements (faces) according to the area value: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_Area* +* threshold is floating point value (area) + +.. _filters_ex07.py: + +``filters_ex07.py`` + +.. literalinclude:: ../../../examples/filters_ex07.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex07.py` + +**See also:** :ref:`tui_area` + +.. _filter_volume: + +Volume +====== + +filters 3D mesh elements (volumes) according to the volume value: + +* element type is *SMESH.VOLUME* +* functor type is *SMESH.FT_Volume3D* +* threshold is floating point value (volume) + +.. _filters_ex08.py: + +``filters_ex08.py`` + +.. literalinclude:: ../../../examples/filters_ex08.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex08.py` + +**See also:** :ref:`tui_volume` + +.. _filter_free_borders: + +Free borders +============ + +filters 1D mesh elements (edges) which represent free borders of a mesh: + +* element type is *SMESH.EDGE* +* functor type is *SMESH.FT_FreeBorders* +* threshold value is not required + +\tui_script{filters_ex09.py} +.. _filters_ex09.py: + +``filters_ex09.py`` + +.. literalinclude:: ../../../examples/filters_ex09.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex09.py` + +**See also:** :ref:`tui_free_borders` + +.. _filter_free_edges: + +Free edges +========== + +filters 2D mesh elements (faces) having edges (i.e. links between +nodes, not mesh segments) belonging to one face of mesh only: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_FreeEdges* +* threshold value is not required + +.. _filters_ex10.py: + +``filters_ex10.py`` + +.. literalinclude:: ../../../examples/filters_ex10.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex10.py` + +**See also:** :ref:`tui_free_edges` + +.. _filter_free_nodes: + +Free nodes +========== + +filters free nodes: + +* element type is *SMESH.NODE* +* functor type is *SMESH.FT_FreeNodes* +* threshold value is not required + +.. _filters_ex11.py: + +``filters_ex11.py`` + +.. literalinclude:: ../../../examples/filters_ex11.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex11.py` + +**See also:** :ref:`tui_free_nodes` + +.. _filter_free_faces: + +Free faces +========== + +filters free faces: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_FreeFaces* +* threshold value is not required + +.. _filters_ex12.py: + +``filters_ex12.py`` + +.. literalinclude:: ../../../examples/filters_ex12.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex12.py` + +**See also:** :ref:`tui_free_faces` + +.. _filter_bare_border_faces: + +Bare border faces +================= + +filters faces with bare borders: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_BareBorderFace* +* threshold value is not required + +.. _filters_ex13.py: + +``filters_ex13.py`` + +.. literalinclude:: ../../../examples/filters_ex13.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex13.py` + +**See also:** :ref:`tui_bare_border_faces` + +.. _filter_coplanar_faces: + +Coplanar faces +============== + +filters coplanar faces: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_CoplanarFaces* +* threshold value is the face ID +* tolerance is in degrees + +.. _filters_ex14.py: + +``filters_ex14.py`` + +.. literalinclude:: ../../../examples/filters_ex14.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex14.py` + +.. _filter_over_constrained_faces: + +Over-constrained faces +====================== + +filters over-constrained faces: + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_OverConstrainedFace* +* threshold value is not required + +.. _filters_ex15.py: + +``filters_ex15.py`` + +.. literalinclude:: ../../../examples/filters_ex15.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex15.py` + +**See also:** :ref:`tui_over_constrained_faces` + +.. _filter_double_elements: + +Double edges, Double faces, Double volumes +########################################## + +filters mesh elements basing on the same set of nodes: + +* element type is either *SMESH.EGDE*, *SMESH.FACE* or *SMESH.VOLUME* +* functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*, +* threshold value is not required + +.. _filters_ex16.py: + +``filters_ex16.py`` + +.. literalinclude:: ../../../examples/filters_ex16.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex16.py` + +.. _tui_double_nodes_control: + +Double nodes +============ + +filters mesh nodes which are coincident with other nodes (within a given tolerance): + +* element type is *SMESH.NODE* +* functor type is *SMESH.FT_EqualNodes* +* threshold value is not required +* default tolerance is 1.0e-7 + +.. _filters_ex17.py: + +``filters_ex17.py`` + +.. literalinclude:: ../../../examples/filters_ex17.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex17.py` + +.. _filter_node_nb_conn: + +Node connectivity number +======================== + +filters nodes according to a number of elements of highest dimension connected to a node: + +* element type should be *SMESH.NODE* +* functor type should be *SMESH.FT_NodeConnectivityNumber* +* threshold is an integer value (number of elements) + +.. _filters_node_nb_conn.py: + +``filters_node_nb_conn.py`` + +.. literalinclude:: ../../../examples/filters_node_nb_conn.py + :linenos: + :language: python + +:download:`../../../examples/filters_node_nb_conn.py` + +.. _filter_borders_multiconnection: + +Borders at multi-connection +=========================== + +filters 1D mesh elements (segments) according to the specified number of +connections (faces and volumes on whose border the segment lies): + +* element type is *SMESH.EDGE* +* functor type is *SMESH.FT_MultiConnection* +* threshold is integer value (number of connections) + +.. _filters_ex18.py: + +``filters_ex18.py`` + +.. literalinclude:: ../../../examples/filters_ex18.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex18.py` + +**See also:** :ref:`tui_borders_at_multiconnection` + +.. _filter_borders_multiconnection_2d: + +Borders at multi-connection 2D +============================== + +filters 2D mesh elements (faces) with the specified maximal number of +faces connected to a border (link between nodes, not mesh segment): + +* element type is *SMESH.FACE* +* functor type is *SMESH.FT_MultiConnection2D* +* threshold is integer value (number of connections) + +.. _filters_ex19.py: + +``filters_ex19.py`` + +.. literalinclude:: ../../../examples/filters_ex19.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex19.py` + +**See also:** :ref:`tui_borders_at_multiconnection_2d` + +.. _filter_length: + +Length +====== + +filters 1D mesh elements (edges) according to the edge length value: + +* element type should be *SMESH.EDGE* +* functor type should be *SMESH.FT_Length* +* threshold is floating point value (length) + +.. _filters_ex20.py: + +``filters_ex20.py`` + +.. literalinclude:: ../../../examples/filters_ex20.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex20.py` + +**See also:** :ref:`tui_length_1d` + +.. _filter_length_2d: + +Length 2D +========= + +filters 2D mesh elements (faces) according to the maximum length of its +edges (links between nodes): + +* element type should be *SMESH.FACE* +* functor type should be *SMESH.FT_Length2D* +* threshold is floating point value (edge length) + +.. _filters_ex21.py: + +``filters_ex21.py`` + +.. literalinclude:: ../../../examples/filters_ex21.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex21.py` + +**See also:** :ref:`tui_length_2d` + +.. _filter_max_element_length_2d: + +Element Diameter 2D +=================== + +filters 2D mesh elements (faces) according to the maximum length +of its edges and diagonals: + +* element type should be *SMESH.FACE* +* functor type should be *SMESH.FT_MaxElementLength2D* +* threshold is floating point value (length) + +.. _filters_ex22.py: + +``filters_ex22.py`` + +.. literalinclude:: ../../../examples/filters_ex22.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex22.py` + +**See also:** :ref:`tui_max_element_length_2d` + +.. _filter_max_element_length_3d: + +Element Diameter 3D +=================== + +filters 3D mesh elements (volumes) according to the maximum length +of its edges and diagonals: + +* element type should be *SMESH.VOLUME* +* functor type should be *SMESH.FT_MaxElementLength3D* +* threshold is floating point value (edge/diagonal length) + +.. _filters_ex23.py: + +``filters_ex23.py`` + +.. literalinclude:: ../../../examples/filters_ex23.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex23.py` + +**See also:** :ref:`tui_max_element_length_3d` + +.. _filter_bare_border_volumes: + +Bare border volumes +=================== + +filters 3D mesh elements with bare borders, i.e. having a facet not +shared with other volumes and without a face on it: + +* element type is *SMESH.VOLUME* +* functor type is *SMESH.FT_BareBorderVolume* +* threshold value is not required + +.. _filters_ex24.py: + +``filters_ex24.py`` + +.. literalinclude:: ../../../examples/filters_ex24.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex24.py` + +**See also:** :ref:`tui_bare_border_volumes` + +.. _filter_over_constrained_volumes: + +Over-constrained volumes +======================== + +filters over-constrained volumes, whose all nodes are on the mesh boundary: + +* element type is *SMESH.VOLUME* +* functor type is *SMESH.FT_OverConstrainedVolume* +* threshold value is not required + +.. _filters_ex25.py: + +``filters_ex25.py`` + +.. literalinclude:: ../../../examples/filters_ex25.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex25.py` + +**See also:** :ref:`tui_over_constrained_faces` + +.. _filter_belong_to_group: + +Belong to Mesh Group +==================== + +filters mesh entities (nodes or elements) included in a mesh group +defined by threshold value: + +* element type can be any, from *SMESH.NODE* to *SMESH.BALL* +* functor type should be *SMESH.FT_BelongToMeshGroup* +* threshold is mesh group object + +.. _filters_belong2group.py: + +``filters_belong2group.py`` + +.. literalinclude:: ../../../examples/filters_belong2group.py + :linenos: + :language: python + +:download:`../../../examples/filters_belong2group.py` + +.. _filter_belong_to_geom: + +Belong to Geom +============== + +filters mesh entities (nodes or elements) which all nodes lie on the +shape defined by threshold value: + +* element type can be any, from *SMESH.NODE* to *SMESH.BALL* +* functor type should be *SMESH.FT_BelongToGeom* +* threshold is geometrical object +* tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry. + +.. _filters_ex26.py: + +``filters_ex26.py`` + +.. literalinclude:: ../../../examples/filters_ex26.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex26.py` + +.. _filter_lying_on_geom: + +Lying on Geom +============= + +filters mesh entities (nodes or elements) at least one node of which lies on the +shape defined by threshold value: + +* element type can be any, from *SMESH.NODE* to *SMESH.BALL* +* functor type should be *SMESH.FT_LyingOnGeom* +* threshold is geometrical object +* tolerance is a distance between a node and the geometrical object; + +it is used if an node is not associated to any geometry. + +.. _filters_ex27.py: + +``filters_ex27.py`` + +.. literalinclude:: ../../../examples/filters_ex27.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex27.py` + +.. _filter_belong_to_plane: + +Belong to Plane +=============== + +filters mesh entities (nodes or elements) which all nodes belong to the +plane defined by threshold value with the given tolerance: + +* element type can be any except *SMESH.VOLUME* +* functor type should be *SMESH.FT_BelongToPlane* +* threshold is geometrical object (plane) +* default tolerance is 1.0e-7 + +.. _filters_ex28.py: + +``filters_ex28.py`` + +.. literalinclude:: ../../../examples/filters_ex28.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex28.py` + +.. _filter_belong_to_cylinder: + +Belong to Cylinder +================== + +filters mesh entities (nodes or elements) which all nodes belong to the +cylindrical face defined by threshold value with the given tolerance: + +* element type can be any except *SMESH.VOLUME* +* functor type should be *SMESH.FT_BelongToCylinder* +* threshold is geometrical object (cylindrical face) +* default tolerance is 1.0e-7 + +.. _filters_ex29.py: + +``filters_ex29.py`` + +.. literalinclude:: ../../../examples/filters_ex29.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex29.py` + +.. _filter_belong_to_surface: + +Belong to Surface +================= + +filters mesh entities (nodes or elements) which all nodes belong to the +arbitrary surface defined by threshold value with the given tolerance: + +* element type can be any except *SMESH.VOLUME* +* functor type should be *SMESH.FT_BelongToGenSurface* +* threshold is geometrical object (arbitrary surface) +* default tolerance is 1.0e-7 + +.. _filters_ex30.py: + +``filters_ex30.py`` + +.. literalinclude:: ../../../examples/filters_ex30.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex30.py` + +.. _filter_range_of_ids: + +Range of IDs +============ + +filters mesh entities elements (nodes or elements) according to the +specified identifiers range: + +* element type can be any, from *SMESH.NODE* to *SMESH.BALL* +* functor type is *SMESH.FT_RangeOfIds* +* threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78" + +.. _filters_ex31.py: + +``filters_ex31.py`` + +.. literalinclude:: ../../../examples/filters_ex31.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex31.py` + +.. _filter_bad_oriented_volume: + +Badly oriented volume +===================== + +filters 3D mesh elements (volumes), which are incorrectly oriented from +the point of view of MED convention. + +* element type should be *SMESH.VOLUME* +* functor type is *SMESH.FT_BadOrientedVolume* +* threshold is not required + +.. _filters_ex32.py: + +``filters_ex32.py`` + +.. literalinclude:: ../../../examples/filters_ex32.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex32.py` + +.. _filter_linear_or_quadratic: + +Linear / quadratic +================== + +filters linear / quadratic mesh elements: + +* element type should be either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME* +* functor type is *SMESH.FT_LinearOrQuadratic* +* threshold is not required +* if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected + +.. _filters_ex33.py: + +``filters_ex33.py`` + +.. literalinclude:: ../../../examples/filters_ex33.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex33.py` + +.. _filter_group_color: + +Group color +=========== + +filters mesh entities, belonging to the group with the color defined by the threshold value. + +* element type can be any, from *SMESH.NODE* to *SMESH.BALL* +* functor type is *SMESH.FT_GroupColor* +* threshold should be of SALOMEDS.Color type + +.. _filters_ex34.py: + +``filters_ex34.py`` + +.. literalinclude:: ../../../examples/filters_ex34.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex34.py` + +.. _filter_geom_type: + +Geometry type +============= + +filters mesh elements by the geometric type defined with the threshold +value. The list of available geometric types depends on the element +entity type. + +* element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc. +* functor type should be *SMESH.FT_ElemGeomType* +* threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types. + +.. _filters_ex35.py: + +``filters_ex35.py`` + +.. literalinclude:: ../../../examples/filters_ex35.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex35.py` + +.. _filter_entity_type: + +Entity type +=========== + +filters mesh elements by the geometric type and number of nodes. + +* element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc. +* functor type should be *SMESH.FT_EntityType* +* threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types. + +.. _filters_ex37.py: + +``filters_ex37.py`` + +.. literalinclude:: ../../../examples/filters_ex37.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex37.py` + +.. _filter_ball_diam: + +Ball diameter +============= + +filters ball elements by diameter. + +* element type should be *SMESH.BALL* +* functor type should be *SMESH.FT_BallDiameter* +* threshold is floating point value (ball diameter) + +.. _filters_ex38.py: + +``filters_ex38.py`` + +.. literalinclude:: ../../../examples/filters_ex38.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex38.py` + +.. _filter_domain: + +Elements of a domain +==================== + +filters elements of a specified domain. + +* element type can be any, e.g.: *SMESH.EDGE*, *SMESH.FACE*, *SMESH.VOLUME*, etc. +* functor type should be *SMESH.FT_ConnectedElements* +* threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point. + +.. _filters_ex39.py: + +``filters_ex39.py`` + +.. literalinclude:: ../../../examples/filters_ex39.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex39.py` + +.. _combining_filters: + +How to combine several criteria into a filter? +============================================== + +Several criteria can be combined into a filter. + +Example : + +.. _filters_ex36.py: + +``filters_ex36.py`` + +.. literalinclude:: ../../../examples/filters_ex36.py + :linenos: + :language: python + +:download:`../../../examples/filters_ex36.py` + + diff --git a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst new file mode 100644 index 000000000..36848ceeb --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst @@ -0,0 +1,51 @@ +.. _tui_generate_flat_elements_page: + +********************** +Generate flat elements +********************** + + +.. _tui_double_nodes_on_group_boundaries: + +Double nodes on groups boundaries +################################# + +Double nodes on shared faces between groups of volumes and create flat elements on demand. + +The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups. + +The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements. + +Triangles are transformed into prisms, and quadrangles into hexahedrons. + +The flat elements are stored in groups of volumes. + +These groups are named according to the position of the group in the list: +the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list. +If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created. +All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation). +The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples". + +This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder). +The big cylinder is defined by two geometric volumes. + +.. _generate_flat_elements.py: + +``generate_flat_elements.py`` + +.. literalinclude:: ../../../examples/generate_flat_elements.py + :linenos: + :language: python + +:download:`../../../examples/generate_flat_elements.py` + +Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh. +The flat elements on group boundaries and on faces are built with the +2 last lines of the code above. + +If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1, +the flat elements are built, otherwise, there is only a duplication of the nodes. + +To observe flat element groups, save the resulting mesh on a MED file and reload it. + + diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.rst b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst new file mode 100644 index 000000000..6700ec42f --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst @@ -0,0 +1,157 @@ +.. _tui_grouping_elements_page: + +***************** +Grouping Elements +***************** + +.. contents:: `Table of contents` + + +.. _tui_create_standalone_group: + +Create a Standalone Group +========================= + +.. _grouping_elements_ex01.py: + +``grouping_elements_ex01.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex01.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex01.py` + +.. image:: ../images/create_group.png + :align: center + + +.. _tui_create_group_on_geometry: + +Create a Group on Geometry +========================== + +.. _grouping_elements_ex02.py: + +``grouping_elements_ex02.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex02.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex02.py` + +.. _tui_create_group_on_filter: + +Create a Group on Filter +======================== + +.. _grouping_elements_ex03.py: + +``grouping_elements_ex03.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex03.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex03.py` + +.. _tui_edit_group: + +Edit a Group +============ + +.. _grouping_elements_ex04.py: + +``grouping_elements_ex04.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex04.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex04.py` + +.. image:: ../images/editing_groups1.png + :align: center + + +.. _tui_union_of_groups: + +Union of groups +=============== + +.. _grouping_elements_ex05.py: + +``grouping_elements_ex05.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex05.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex05.py` + +.. image:: ../images/union_groups1.png + :align: center + + +.. _tui_intersection_of_groups: + +Intersection of groups +====================== + +.. _grouping_elements_ex06.py: + +``grouping_elements_ex06.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex06.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex06.py` + +.. image:: ../images/intersect_groups1.png + :align: center + + +.. _tui_cut_of_groups: + +Cut of groups +============= + +.. _grouping_elements_ex07.py: + +``grouping_elements_ex07.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex07.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex07.py` + +.. image:: ../images/cut_groups1.png + :align: center + + +.. _tui_create_dim_group: + +Creating groups of entities basing on nodes of other groups +=========================================================== + +.. _grouping_elements_ex08.py: + +``grouping_elements_ex08.py`` + +.. literalinclude:: ../../../examples/grouping_elements_ex08.py + :linenos: + :language: python + +:download:`../../../examples/grouping_elements_ex08.py` + +.. image:: ../images/dimgroup_tui1.png + :align: center + + + + + + diff --git a/doc/salome/gui/SMESH/input/tui_measurements.rst b/doc/salome/gui/SMESH/input/tui_measurements.rst new file mode 100644 index 000000000..366c3be0a --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_measurements.rst @@ -0,0 +1,50 @@ +.. _tui_measurements_page: + +************ +Measurements +************ +.. _tui_min_distance: + +Minimum Distance +================ + +.. _measurements_ex01.py: + +``measurements_ex01.py`` + +.. literalinclude:: ../../../examples/measurements_ex01.py + :linenos: + :language: python + +:download:`../../../examples/measurements_ex01.py` + +.. _tui_bounding_box: + +Bounding Box +============ + +.. _measurements_ex02.py: + +``measurements_ex02.py`` + +.. literalinclude:: ../../../examples/measurements_ex02.py + :linenos: + :language: python + +:download:`../../../examples/measurements_ex02.py` + +.. _tui_basic_properties: + +Basic Properties +================ + +.. _measurements_ex03.py: + +``measurements_ex03.py`` + +.. literalinclude:: ../../../examples/measurements_ex03.py + :linenos: + :language: python + +:download:`../../../examples/measurements_ex03.py` + diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst new file mode 100644 index 000000000..b14ba8553 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst @@ -0,0 +1,409 @@ +.. _tui_modifying_meshes_page: + +**************** +Modifying Meshes +**************** + +.. contents:: `Table of contents` + + +.. _tui_adding_nodes_and_elements: + +Adding Nodes and Elements +========================= + +.. _tui_add_node: + +Add Node +******** + +.. _modifying_meshes_ex01.py: + +``modifying_meshes_ex01.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex01.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex01.py` + +.. _tui_add_0DElement: + +Add 0D Element +************** + +.. _modifying_meshes_ex02.py: + +``modifying_meshes_ex02.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex02.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex02.py` + +.. _tui_add_0DElement_on_all_nodes: + +Add 0D Element on Element Nodes +******************************* + +.. _modifying_meshes_ex03.py: + +``modifying_meshes_ex03.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex03.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex03.py` + +.. _tui_add_edge: + +Add Edge +******** + +.. _modifying_meshes_ex04.py: + +``modifying_meshes_ex04.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex04.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex04.py` + +.. _tui_add_triangle: + +Add Triangle +************ + +.. _modifying_meshes_ex05.py: + +``modifying_meshes_ex05.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex05.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex05.py` + +.. _tui_add_quadrangle: + +Add Quadrangle +************** + +.. _modifying_meshes_ex06.py: + +``modifying_meshes_ex06.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex06.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex06.py` + +.. _tui_add_tetrahedron: + +Add Tetrahedron +*************** + +.. _modifying_meshes_ex07.py: + +``modifying_meshes_ex07.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex07.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex07.py` + +.. _tui_add_hexahedron: + +Add Hexahedron +************** + +.. _modifying_meshes_ex08.py: + +``modifying_meshes_ex08.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex08.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex08.py` + +.. _tui_add_polygon: + +Add Polygon +*********** + +.. _modifying_meshes_ex09.py: + +``modifying_meshes_ex09.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex09.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex09.py` + +.. _tui_add_polyhedron: + +Add Polyhedron +************** + +.. _modifying_meshes_ex10.py: + +``modifying_meshes_ex10.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex10.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex10.py` + +.. _tui_removing_nodes_and_elements: + +Removing Nodes and Elements +=========================== + +.. _tui_removing_nodes: + +Removing Nodes +************** + +.. _modifying_meshes_ex11.py: + +``modifying_meshes_ex11.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex11.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex11.py` + +.. _tui_removing_elements: + +Removing Elements +***************** + +.. _modifying_meshes_ex12.py: + +``modifying_meshes_ex12.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex12.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex12.py` + +.. _tui_removing_orphan_nodes: + +Removing Orphan Nodes +********************* + +.. _modifying_meshes_ex13.py: + +``modifying_meshes_ex13.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex13.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex13.py` + +.. _tui_moving_nodes: + +Moving Nodes +============ + +.. _modifying_meshes_ex15.py: + +``modifying_meshes_ex15.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex15.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex15.py` + +.. _tui_diagonal_inversion: + +Diagonal Inversion +================== + +.. _modifying_meshes_ex16.py: + +``modifying_meshes_ex16.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex16.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex16.py` + +.. _tui_uniting_two_triangles: + +Uniting two Triangles +===================== + +.. _modifying_meshes_ex17.py: + +``modifying_meshes_ex17.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex17.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex17.py` + +.. _tui_uniting_set_of_triangles: + +Uniting a Set of Triangles +========================== + +.. _modifying_meshes_ex18.py: + +``modifying_meshes_ex18.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex18.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex18.py` + +.. _tui_orientation: + +Orientation +=========== + +.. _modifying_meshes_ex19.py: + +``modifying_meshes_ex19.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex19.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex19.py` + +.. _tui_cutting_quadrangles: + +Cutting Quadrangles +=================== + +.. _modifying_meshes_ex20.py: + +``modifying_meshes_ex20.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex20.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex20.py` + +.. _tui_smoothing: + +Smoothing +========= + +.. _modifying_meshes_ex21.py: + +``modifying_meshes_ex21.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex21.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex21.py` + +.. _tui_extrusion: + +Extrusion +========= + +.. _modifying_meshes_ex22.py: + +``modifying_meshes_ex22.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex22.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex22.py` + +.. _tui_extrusion_along_path: + +Extrusion along a Path +====================== + +.. _modifying_meshes_ex23.py: + +``modifying_meshes_ex23.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex23.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex23.py` + +.. _tui_revolution: + +Revolution +========== + +.. _modifying_meshes_ex24.py: + +``modifying_meshes_ex24.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex24.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex24.py` + +.. _tui_pattern_mapping: + +Pattern Mapping +=============== + +.. _modifying_meshes_ex25.py: + +``modifying_meshes_ex25.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex25.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex25.py` + +.. _tui_quadratic: + +Convert mesh to/from quadratic +============================== + +.. _modifying_meshes_ex26.py: + +``modifying_meshes_ex26.py`` + +.. literalinclude:: ../../../examples/modifying_meshes_ex26.py + :linenos: + :language: python + +:download:`../../../examples/modifying_meshes_ex26.py` + +.. _tui_split_biquad: + +Split bi-quadratic into linear +============================== + +.. _split_biquad.py: + +``split_biquad.py`` + +.. literalinclude:: ../../../examples/split_biquad.py + :linenos: + :language: python + +:download:`../../../examples/split_biquad.py` + diff --git a/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst new file mode 100644 index 000000000..697018719 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst @@ -0,0 +1,21 @@ +.. _tui_notebook_smesh_page: + + +********************* +Using SALOME NoteBook +********************* + +.. _tui_notebook_smesh: + +Notebook Smesh +============== + +.. _notebook_smesh.py: + +``notebook_smesh.py`` + +.. literalinclude:: ../../../examples/notebook_smesh.py + :linenos: + :language: python + +:download:`../../../examples/notebook_smesh.py` diff --git a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst new file mode 100644 index 000000000..5e3b1b187 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst @@ -0,0 +1,24 @@ +.. _tui_prism_3d_algo: + +********************************** +Use Extrusion 3D meshing algorithm +********************************** + + +.. _prism_3d_algo.py: + +``prism_3d_algo.py`` + +.. literalinclude:: ../../../examples/prism_3d_algo.py + :linenos: + :language: python + +:download:`../../../examples/prism_3d_algo.py` + +The result geometry and mesh is shown below + +.. image:: ../images/prism_tui_sample.png + :align: center + + + diff --git a/doc/salome/gui/SMESH/input/tui_quality_controls.rst b/doc/salome/gui/SMESH/input/tui_quality_controls.rst new file mode 100644 index 000000000..3ce1a2715 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_quality_controls.rst @@ -0,0 +1,342 @@ +.. _tui_quality_controls_page: + +**************** +Quality Controls +**************** + +.. contents:: `Table of contents` + + +.. _tui_free_borders: + +Free Borders +============ + +.. _quality_controls_ex01.py: + +``quality_controls_ex01.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex01.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex01.py` + + +.. _tui_borders_at_multiconnection: + +Borders at Multiconnection +========================== + +.. _quality_controls_ex02.py: + +``quality_controls_ex02.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex02.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex02.py` + + +.. _tui_length_1d: + +Length 1D +========= + +.. _quality_controls_ex03.py: + +``quality_controls_ex03.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex03.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex03.py` + +.. _tui_free_edges: + +Free Edges +========== + +.. _quality_controls_ex04.py: + +``quality_controls_ex04.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex04.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex04.py` + +.. _tui_free_nodes: + +Free Nodes +========== + +.. _quality_controls_ex05.py: + +``quality_controls_ex05.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex05.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex05.py` + +.. _tui_free_faces: + +Free Faces +========== + +.. _quality_controls_ex06.py: + +``quality_controls_ex06.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex06.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex06.py` + +.. _tui_bare_border_faces: + +Bare border faces +================= + +.. _quality_controls_ex07.py: + +``quality_controls_ex07.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex07.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex07.py` + +.. _tui_bare_border_volumes: + +Bare border volumes +=================== + +.. _quality_controls_ex08.py: + +``quality_controls_ex08.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex08.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex08.py` + +.. _tui_over_constrained_faces: + +Over-constrained faces +====================== + +.. _quality_controls_ex09.py: + +``quality_controls_ex09.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex09.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex09.py` + +.. _tui_over_constrained_volumes: + +Over-constrained volumes +======================== + +.. _quality_controls_ex10.py: + +``quality_controls_ex10.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex10.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex10.py` + +.. _tui_length_2d: + +Length 2D +========= + +.. _quality_controls_ex11.py: + +``quality_controls_ex11.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex11.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex11.py` + + +.. _tui_borders_at_multiconnection_2d: + +Borders at Multiconnection 2D +============================= + +.. _quality_controls_ex12.py: + +``quality_controls_ex12.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex12.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex12.py` + +.. _tui_area: + +Area +==== + +.. _quality_controls_ex13.py: + +``quality_controls_ex13.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex13.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex13.py` + +.. _tui_taper: + +Taper +===== + +.. _quality_controls_ex14.py: + +``quality_controls_ex14.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex14.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex14.py` + +.. _tui_aspect_ratio: + +Aspect Ratio +============ + +.. _quality_controls_ex15.py: + +``quality_controls_ex15.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex15.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex15.py` + +.. _tui_minimum_angle: + +Minimum Angle +============= + +.. _quality_controls_ex16.py: + +``quality_controls_ex16.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex16.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex16.py` + +.. _tui_warping: + +Warping +======= + +.. _quality_controls_ex17.py: + +``quality_controls_ex17.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex17.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex17.py` + +.. _tui_skew: + +Skew +==== + +.. _quality_controls_ex18.py: + +``quality_controls_ex18.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex18.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex18.py` + +.. _tui_max_element_length_2d: + +Element Diameter 2D +=================== + +.. _quality_controls_ex19.py: + +``quality_controls_ex19.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex19.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex19.py` + +.. _tui_aspect_ratio_3d: + +Aspect Ratio 3D +=============== + +.. _quality_controls_ex20.py: + +``quality_controls_ex20.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex20.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex20.py` + +.. _tui_volume: + +Volume +====== + +.. _quality_controls_ex21.py: + +``quality_controls_ex21.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex21.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex21.py` + +.. _tui_max_element_length_3d: + +Element Diameter 3D +=================== + +.. _quality_controls_ex22.py: + +``quality_controls_ex22.py`` + +.. literalinclude:: ../../../examples/quality_controls_ex22.py + :linenos: + :language: python + +:download:`../../../examples/quality_controls_ex22.py` + diff --git a/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst new file mode 100644 index 000000000..b62ab5988 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst @@ -0,0 +1,204 @@ +.. _tui_transforming_meshes_page: + +******************* +Transforming Meshes +******************* + +.. contents:: `Table of contents` + + +.. _tui_translation: + +Translation +=========== + +.. _transforming_meshes_ex01.py: + +``transforming_meshes_ex01.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex01.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex01.py` + +.. _tui_rotation: + +Rotation +======== + +.. _transforming_meshes_ex02.py: + +``transforming_meshes_ex02.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex02.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex02.py` + +.. _tui_scale: + +Scale +===== + +.. _transforming_meshes_ex03.py: + +``transforming_meshes_ex03.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex03.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex03.py` + +.. _tui_symmetry: + +Symmetry +======== + +.. _transforming_meshes_ex04.py: + +``transforming_meshes_ex04.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex04.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex04.py` + +.. _tui_merging_nodes: + +Merging Nodes +============= + +.. _transforming_meshes_ex05.py: + +``transforming_meshes_ex05.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex05.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex05.py` + +.. _tui_merging_elements: + +Merging Elements +================ + +.. _transforming_meshes_ex06.py: + +``transforming_meshes_ex06.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex06.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex06.py` + +.. _tui_sew_meshes_border_to_side: + +Sew Meshes Border to Side +========================= + +.. _transforming_meshes_ex07.py: + +``transforming_meshes_ex07.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex07.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex07.py` + +.. _tui_sew_conform_free_borders: + +Sew Conform Free Borders +======================== + +.. _transforming_meshes_ex08.py: + +``transforming_meshes_ex08.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex08.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex08.py` + +.. _tui_sew_free_borders: + +Sew Free Borders +================ + +.. _transforming_meshes_ex09.py: + +``transforming_meshes_ex09.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex09.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex09.py` + +.. _tui_sew_side_elements: + +Sew Side Elements +================= + +.. _transforming_meshes_ex10.py: + +``transforming_meshes_ex10.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex10.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex10.py` + +.. _tui_duplicate_nodes: + +Duplicate nodes or/and elements +=============================== + +.. _transforming_meshes_ex11.py: + +``transforming_meshes_ex11.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex11.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex11.py` + +.. _tui_make_2dmesh_from_3d: + +Create boundary elements +======================== + +.. _transforming_meshes_ex12.py: + +``transforming_meshes_ex12.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex12.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex12.py` + +.. _tui_reorient_faces: + +Reorient faces +============== + +.. _transforming_meshes_ex13.py: + +``transforming_meshes_ex13.py`` + +.. literalinclude:: ../../../examples/transforming_meshes_ex13.py + :linenos: + :language: python + +:download:`../../../examples/transforming_meshes_ex13.py` + diff --git a/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst b/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst new file mode 100644 index 000000000..3f873ec52 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst @@ -0,0 +1,26 @@ +.. _tui_use_existing_faces: + +***************************************************** +Usage of "Use Faces to be Created Manually" algorithm +***************************************************** + +This sample demonstrates how to use **Use Faces to be Created Manually** algorithm, +which is actually just a stub allowing to use your own 2D algorithm +implemented in Python. + +.. _use_existing_faces.py: + +``use_existing_faces.py`` + +.. literalinclude:: ../../../examples/use_existing_faces.py + :linenos: + :language: python + +:download:`../../../examples/use_existing_faces.py` + +Resulting mesh: + +.. image:: ../images/use_existing_face_sample_mesh.png + :align: center + + diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst new file mode 100644 index 000000000..f436e6324 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst @@ -0,0 +1,39 @@ + +.. _tui_viewing_meshes_page: + +************** +Viewing Meshes +************** + +.. _tui_viewing_mesh_infos: + +Viewing Mesh Infos +################## + + +.. _viewing_meshes_ex01.py: + +``viewing_meshes_ex01.py`` + +.. literalinclude:: ../../../examples/viewing_meshes_ex01.py + :linenos: + :language: python + +:download:`../../../examples/viewing_meshes_ex01.py` + +.. _tui_find_element_by_point: + + +Find Element by Point +##################### + +.. _viewing_meshes_ex02.py: + +``viewing_meshes_ex02.py`` + +.. literalinclude:: ../../../examples/viewing_meshes_ex02.py + :linenos: + :language: python + +:download:`../../../examples/viewing_meshes_ex02.py` + diff --git a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst new file mode 100644 index 000000000..46006da89 --- /dev/null +++ b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst @@ -0,0 +1,41 @@ + +.. _tui_work_on_objects_from_gui: + +*************************************** +How to work with objects from the GUI ? +*************************************** + +It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type: + +.. code-block:: python + :linenos: + + myMesh_ref = salome.IDToObject( ID ) + # were ID is a string looking like "0:1:2:3" that appears in the Object Browser in the Entry column. + # ( If hidden, show it by right clicking and checking the checkbox Entry ) + myMesh = smesh.Mesh(myMesh_ref) + +or + +.. code-block:: python + :linenos: + + myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() + #'/Mesh/myMesh' is a path to the desired object in the Object Browser + myMesh = smesh.Mesh(myMesh_ref) + +or + +.. code-block:: python + :linenos: + + # get a selected mesh + from salome.gui import helper + myMesh_ref = helper.getSObjectSelected()[0].GetObject() + myMesh = smesh.Mesh(myMesh_ref) + +All the methods documented in these pages can then be used on myMesh + +.. note:: The first statement only gives you access to a reference to the object created via the GUI. But the methods available on this reference are not exactly the same as those documented in these help pages. This Python API is meant to be used on smesh.Mesh instances. That's why you'll have to create such an instance with the second statement. + + diff --git a/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst new file mode 100644 index 000000000..cdb57bdcf --- /dev/null +++ b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst @@ -0,0 +1,52 @@ +.. _uniting_set_of_triangles_page: + +************************** +Uniting a set of triangles +************************** + +It is possible to unite many neighboring triangles into +quadrangles by deletion of the common edge. + +**To union several triangles:** + +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Union of triangles** item or click **"Union of triangles"** button in the tool-bar. + + .. image:: ../images/image80.png + :align: center + + .. centered:: + **"Union of triangles" button** + + The following dialog box will appear: + + .. image:: ../images/a-unionoftriangles.png + + + * **The main list** shall contain the triangles which will be united. You can click on a triangle in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this triangle will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of IDs. The **Filter** button allows to apply a definite :ref:`filtering_elements` to selection of triangles. + * **Apply to all** radio button allows to apply the operation to all triangles of the selected mesh. + * **Preview** provides a preview in the viewer. + * **Criterion** menu allows to choose a quality criterion, which will be optimized to select triangles to unite. + * **Select from** set of fields allows to choose a sub-mesh or an existing group whose triangle elements then can be added to the list. + +#. Click the **Apply** or **Apply and Close** button to confirm the operation. + +If some selected triangle elements have no adjacent edges with one of +the others, the operation on these elements shall take no effect. + +.. image:: ../images/uniting_a_set_of_triangles1.png + :align: center + +.. centered:: + "The chosen triangles" + +.. image:: ../images/uniting_a_set_of_triangles2.png + :align: center + +.. centered:: + "The union of several triangles - several quadrangular cells are created" + +**See Also** a sample TUI Script of a +:ref:`tui_uniting_set_of_triangles` operation. + + diff --git a/doc/salome/gui/SMESH/input/uniting_two_triangles.rst b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst new file mode 100644 index 000000000..1db64d445 --- /dev/null +++ b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst @@ -0,0 +1,44 @@ +.. _uniting_two_triangles_page: + +********************* +Uniting two triangles +********************* + +In MESH you can union two neighboring triangles by deletion of the common edge. + +**To unite two triangles:** + +#. From the **Modification** menu choose the **Union of two triangles** item or click **"Union of two triangles"** button in the tool-bar. + + .. image:: ../images/image71.png + :align: center + + .. centered:: + **"Union of two triangles" button** + + The following dialog box shall appear: + + .. image:: ../images/unionoftwotriangles.png + :align: center + + +#. Enter IDs of nodes forming the required edge in the **Edge** field (a couple of node IDs separated by a dash) or select this edge in the 3D viewer. +#. Click the **Apply** or **Apply and Close** button. + +.. image:: ../images/uniting_two_triangles1.png + :align: center + +.. centered:: + "The selected triangles" + + +.. image:: ../images/uniting_two_triangles2.png + :align: center + +.. centered:: + "The union of two triangles" + +**See Also** a sample TUI Script of a +:ref:`tui_uniting_two_triangles` operation. + + diff --git a/doc/salome/gui/SMESH/input/use_existing_algos.rst b/doc/salome/gui/SMESH/input/use_existing_algos.rst new file mode 100644 index 000000000..afe9f17ce --- /dev/null +++ b/doc/salome/gui/SMESH/input/use_existing_algos.rst @@ -0,0 +1,64 @@ +.. _import_algos_page: + +******************************************** +Import Elements from Another Mesh Algorithms +******************************************** + +**Import Elements from Another Mesh** algorithms allow to +define the mesh of a geometrical +object by importing suitably located mesh elements from another +mesh. The mesh elements to import from the other mesh should be contained in +groups. If several groups are used to mesh the same geometry, validity of +nodal connectivity of result mesh must be assured by connectivity of +the source mesh; no geometrical checks are performed to merge +different nodes at same locations. + +The source elements must totally cover the meshed geometry. +The source elements lying partially over the geometry will not be used. + +These algorithms can be used to mesh a very complex geometry part by +part, by storing meshes of parts in files and then fusing them +together using these algorithms. + + +**Import 1D Elements from Another Mesh** algorithm allows to define +the mesh of a geometrical edge (or group of edges) +by importing mesh edges contained in a group (or groups) from another mesh. + +To apply this algorithm select the edge to be meshed (indicated in +the field **Geometry** of **Create mesh** dialog box), +**Import 1D Elements from Another Mesh** in the list of 1D +algorithms and click the **"Add Hypothesis"** button. +The following dialog box will appear: + +.. image:: ../images/hyp_source_edges.png + :align: center + +In this dialog box you can define + +* The **Name** of the algorithm. +* The **Groups of Edges** to import 1D elements from. +* **To copy mesh** checkbox allows to import not only the edges of the selected **Groups of Edges**, but the whole source mesh. In this case **To copy groups** checkbox allows to create the same groups as in the imported source mesh. + + +**Import 1D-2D Elements from Another Mesh** algorithm allows to define the mesh of a geometrical face (or group of faces) by importing mesh faces contained in a group (or groups) from another (or this) mesh. 1D elements on the boundary of the geometrical face (if not yet present) are also created by the algorithm in conformity with the created 2D elements. + +To apply this algorithm select the geometrical face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D-2D Elements from Another Mesh** in the list of 2D algorithms and click the **"Add Hypothesis"** button. + +The following dialog box will appear: + +.. image:: ../images/hyp_source_faces.png + :align: center + +In this dialog box you can define + +* The **Name** of the algorithm. +* The **Groups of Faces** to import 2D elements from. +* **To copy mesh** checkbox allows to import not only the faces of the selected **Groups of Faces**, but the whole source mesh. In this case **To copy groups** checkbox allows to create the same groups as in the imported source mesh. + + +**See Also** a sample TUI Script of a +:ref:`tui_import`. + + + diff --git a/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst new file mode 100644 index 000000000..f634dc773 --- /dev/null +++ b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst @@ -0,0 +1,38 @@ +.. _using_notebook_mesh_page: + +********************* +Using SALOME NoteBook +********************* + +**SALOME NoteBook** allows defining variables to be used for +creation and modification of objects. + +.. image:: ../images/using_notebook_smesh.png + :align: center + +.. centered:: + "Setting of variables in SALOME NoteBook" + +.. image:: ../images/addnode_notebook.png + :align: center + +.. centered:: + "Use of variables to add a node in MESH module" + +The following limitations on the use of variables still exist: + +* :ref:`radial_prism_algo_page` hypothesis - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`a1d_meshing_hypo_page` hypothesis, Distribution with Table Density and Distribution with Analytic Density - parametrical values are not applicable. +* :ref:`translation_page` dialog box, default mode (translation by two points) - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`merging_nodes_page` dialog box - parametrical value (tolerance of coincident nodes detection) is correctly applied, but it is not restored after "Update study" operation. +* :ref:`revolution_page` dialog box - it is impossible to use the angle of revolution as "total angle" if it is defined as variable. +* :ref:`extrusion_along_path_page` dialog box - it is impossible to use "Linear variation of the angles" mode if at least one of those angles is defined as variable. +* :ref:`pattern_mapping_page` dialog box - parametrical values (indices of nodes) are correctly applied, but they are not restored after "Update study" operation. +* :ref:`clipping_page` dialog box. +* **Properties** dialog box. + + +Our **TUI Scripts** provide you with useful examples of +:ref:`tui_notebook_smesh` . + + diff --git a/doc/salome/gui/SMESH/input/using_operations_on_groups.rst b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst new file mode 100644 index 000000000..0c0344157 --- /dev/null +++ b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst @@ -0,0 +1,155 @@ +.. _using_operations_on_groups_page: + +**************************** +Boolean operations on groups +**************************** + +In MESH you can perform some Boolean operations on groups, which belong to one and the same mesh. + +* :ref:`union_anchor` +* :ref:`intersection_anchor` +* :ref:`cut_anchor` + + + + +.. _union_anchor: + +Union of groups +############### + +This operation allows to create a new group in such a way that all +mesh elements that are present in the initial groups will be added to +the new one. + +**To union groups:** + +#. In the **Mesh** menu select the **Union Groups** item. The following dialog box will appear: + + .. image:: ../images/uniongroups.png + :align: center + + In this dialog box you should specify the name of the resulting group and set of groups which will be united. + + For example, we have two groups Group1 and Group2. + + The result of their **Union** will be Group12: + + .. image:: ../images/image133.gif + :align: center + + .. centered:: + Group1 + + .. image:: ../images/image134.gif + :align: center + + .. centered:: + Group2 + + .. image:: ../images/image135.gif + :align: center + + .. centered:: + Group12 + +#. Click the **Apply** or **Apply and Close** button to confirm creation of the group. + + +**See Also** a sample TUI Script of a +:ref:`tui_union_of_groups` operation. + + +.. _intersection_anchor: + +Intersection of groups +###################### + +This operation allows to create a new group in such a way that all +mesh elements that are present in all initial groups together are added to the +new one. + +**To intersect groups:** + +#. In the **Mesh** menu select the **Intersect Groups** item. The following dialog box will appear: + + .. image:: ../images/intersectgroups.png + :align: center + + In this dialog box you should specify the name of the resulting group and set of groups which will be intersected. + + For example, we have two groups Group1 and Group2. + + The result of their **Intersection** will be Group12a: + + .. image:: ../images/image133.gif + :align: center + + .. centered:: + Group1 + + .. image:: ../images/image134.gif + :align: center + + .. centered:: + Group2 + + .. image:: ../images/image136.gif + :align: center + + .. centered:: + Group12a + +#. Click the **Apply** or **Apply and Close** button to confirm creation of the group. + + +**See Also** a sample TUI Script of an +:ref:`tui_intersection_of_groups` operation. + + +.. _cut_anchor: + +Cut of groups +############# + +This operation allows to create a new group in such a way that all +mesh elements that are present in the main groups but are absent in the +tool groups are added to the new one. + +**To cut groups:** + +#. In the **Mesh** menu select the **Cut Groups** item. The following dialog box will appear: + + .. image:: ../images/cutgroups.png + :align: center + + In this dialog box you should specify the name of the resulting group and groups which will be cut. + + For example, we have two groups Group1 and Group2. + The result of their **Cut** will be Group12b: + + .. image:: ../images/image133.gif + :align: center + + .. centered:: + Group1 + + .. image:: ../images/image134.gif + :align: center + + .. centered:: + Group2 + + .. image:: ../images/image137.gif + :align: center + + .. centered:: + Group12b + +#. Click the **Apply** or **Apply and Close** button to confirm creation of the group. + + +**See Also** a sample TUI Script of a +:ref:`tui_cut_of_groups` operation. + + diff --git a/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst new file mode 100644 index 000000000..e3587624c --- /dev/null +++ b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst @@ -0,0 +1,74 @@ +.. _viewing_meshes_overview_page: + +************** +Viewing meshes +************** + +By default a just :ref:`compute_anchor` mesh will be +automatically displayed in the **VTK 3D Viewer**. (You can switch +off :ref:`automatic_update_pref` preference parameter +to prevent this.) +Click **Display only** to hide all other objects at the same time. + +**VTK 3D Viewer** is described in detail in the documentation on **GUI module**. + +Use the following :ref:`mesh_preferences_page` +to adjust how the mesh is displayed by default: + +* :ref:`automatic_update_pref` +* :ref:`display_mode_pref` +* :ref:`quadratic_2d_mode_pref` +* All parameters of :ref:`mesh_tab_preferences` Preferences dialog. + +After the mesh has appeared in the Viewer, you can select it with +left mouse click and get information about it, change its +presentation parameters and access to other useful options by +right-clicking on the selected mesh. + +.. image:: ../images/dialog.png + :align: center + + +* **Rename** - allows to rename the object in the Object browser. +* **Hide all** - allows to hide all objects in the viewer. +* **Update** - refreshes the presentation of your mesh in the Object Browser, applying all recent changes. +* :ref:`mesh_infos_page` - provides information about the mesh. +* :ref:`find_element_by_point_page` - allows to find all mesh elements, to which belongs a point with the given coordinates. +* **Auto Color** - switch on / off auto-assigning colors for the groups. If switched on, a default color of a new group in :ref:`creating_groups_page` dialog is chosen randomly. +* :ref`:`numbering_page` - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer. +* :ref:`display_mode_page` - allows to select between Wireframe, Shading and Nodes presentation. +* :ref:`display_entity_page` - allows to display entities by types (Faces, Edges, Volumes etc.). + +.. _quadratic_2d_mode: + +Quadratic 2D +============ + +* **2D Quadratic** - allows to select between the representation of quadratic edges as broken **lines** or as **arcs**. A default representation can be set in :ref:`quadratic_2d_mode_pref`. Arc representation applies to 1D and 2D elements only. +* **Orientation of faces** - shows vectors of orientation of faces of the selected mesh. The orientation vector is shown for each 2D mesh element and for each free facet of a 3D mesh element. The vector direction is calculated by the first three nodes of the face produced by vectors n1-n2 and n1-n3. +* :ref:`colors_size_page` - allows to define several visual properties, including color of elements, shrink size, ... +* :ref:`transparency_page` - allows to change the transparency of mesh elements. +* :ref:`quality_page` - graphically presents various information about the mesh. +* **Hide** - allows to hide the selected mesh from the viewer. +* **Show Only** - allows to display only the selected mesh, hiding all others from the viewer. +* :ref:`clipping_page` - allows to create cross-sections of the displayed objects. +* **Dump view** - exports an object from the viewer in bmp, png or jpeg image format. +* **Change background** - allows to redefine the background color. By default it is black. +* **View Operations** - allows to show/hide the visualization toolbar in the Viewer window. +* **Recording Operations** - allows to show/hide the recording toolbar in the Viewer window. + + + +.. toctree:: + :maxdepth: 2 + + mesh_infos.rst + find_element_by_point.rst + numbering.rst + display_mode.rst + display_entity.rst + colors_size.rst + transparency.rst + clipping.rst + + diff --git a/doc/salome/gui/SMESH/input/volume.rst b/doc/salome/gui/SMESH/input/volume.rst new file mode 100644 index 000000000..080da7102 --- /dev/null +++ b/doc/salome/gui/SMESH/input/volume.rst @@ -0,0 +1,29 @@ +.. _volume_page: + +****** +Volume +****** + +**Volume** mesh quality criterion reflects the volume of meshes of a +3D object. + +**To apply the Volume quality criterion to your mesh:** + +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Volume** or click **"Volume"** button in the toolbar. + + .. image:: ../images/image145.png + :align: center + + .. centered:: + **"Volume" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image143.gif + :align: center + + +**See Also** a sample TUI Script of a +:ref:`tui_volume` operation. + diff --git a/doc/salome/gui/SMESH/input/warping.rst b/doc/salome/gui/SMESH/input/warping.rst new file mode 100644 index 000000000..ece775cc7 --- /dev/null +++ b/doc/salome/gui/SMESH/input/warping.rst @@ -0,0 +1,45 @@ +.. _warping_page: + +******* +Warping +******* + +.. image:: ../images/image24.gif + :align: center + +**Warping** indicates that a face is not planar and is applied only to +2D elements with 4 nodes. This quality control criterion is based on a +projection plane created by: + +#. bisecting the four element edges, +#. creating a point on the plane at the vector average of the corners, where the x-axis extends from the point to the bisector on edge 2. + +The plane normal is in the direction of the cross product of the +x-axis and the vector from the origin to the bisector of edge 3. Every +corner of the quad will then be a distance *h* from the plane. The +length of each half edge is measured and the shortest length is +assigned *l*. The warp angle is the arcsine of the ratio of the +projection height *h* to the half edge length *l*. + +**To apply the Warping quality criterion to your mesh:** + +#. Display your mesh in the viewer. + +#. Choose **Controls > Face Controls > Warping Angle** or click **"Warping angle"** button of the toolbar. + + .. image:: ../images/image39.png + :align: center + + .. centered:: + **"Warping angle" button** + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + + .. image:: ../images/image97.jpg + :align: center + + +**See Also** a sample TUI Script of a +:ref:`tui_warping` operation. + + diff --git a/doc/salome/gui/SMESH/python_api.rst b/doc/salome/gui/SMESH/python_api.rst new file mode 100644 index 000000000..635ecd044 --- /dev/null +++ b/doc/salome/gui/SMESH/python_api.rst @@ -0,0 +1,24 @@ +===================== +Mesh Python interface +===================== + +smeshstudytools module +====================== +.. automodule:: smeshstudytools + :members: + +StdMeshersBuilder module +======================== +.. automodule:: StdMeshersBuilder + :members: + +smeshBuilder module +=================== +.. automodule:: smeshBuilder + :members: + +smesh_algorithm module +====================== +.. automodule:: smesh_algorithm + :members: + diff --git a/doc/salome/gui/SMESH/static/switchers.js b/doc/salome/gui/SMESH/static/switchers.js new file mode 100644 index 000000000..3c7133ff5 --- /dev/null +++ b/doc/salome/gui/SMESH/static/switchers.js @@ -0,0 +1,82 @@ +(function() { + 'use strict'; + + // Parses versions in URL segments like: + + var all_languages = { + 'en': 'English', + 'fr': 'French', + 'ja': 'Japanese', + }; + + + function build_language_select(current_language) { + var buf = [''); + return buf.join(''); + } + + function navigate_to_first_existing(urls) { + // Navigate to the first existing URL in urls. + var url = urls.shift(); + if (urls.length == 0) { + window.location.href = url; + return; + } + $.ajax({ + url: url, + success: function() { + window.location.href = url; + }, + error: function() { + navigate_to_first_existing(urls); + } + }); + } + + function on_language_switch() { + var selected_language = $(this).children('option:selected').attr('value') + '/'; + var url = window.location.href; + var current_language = language_segment_from_url(url); + var current_version = version_segment_in_url(url); + if (selected_language == 'en/') // Special 'default' case for english. + selected_language = ''; + var new_url = url.replace('.org/' + current_language + current_version, + '.org/' + selected_language + current_version); + if (new_url != url) { + navigate_to_first_existing([ + new_url, + 'https://docs.python.org/' + ]); + } + } + + // Returns the path segment of the language as a string, like 'fr/' + // or '' if not found. + function language_segment_from_url(url) { + var language_regexp = '\.org/([a-z]{2}(?:-[a-z]{2})?/)'; + var match = url.match(language_regexp); + if (match !== null) + return match[1]; + return ''; + } + + $(document).ready(function() { + var release = DOCUMENTATION_OPTIONS.VERSION; + var language_segment = language_segment_from_url(window.location.href); + var current_language = language_segment.replace(/\/+$/g, '') || 'en'; + + var language_select = build_language_select(current_language); + + $('.language_switcher_placeholder').html(language_select); + $('.language_switcher_placeholder select').bind('change', on_language_switch); + }); +})(); diff --git a/doc/salome/gui/SMESH/templates/layout.html b/doc/salome/gui/SMESH/templates/layout.html new file mode 100644 index 000000000..42fb48273 --- /dev/null +++ b/doc/salome/gui/SMESH/templates/layout.html @@ -0,0 +1,30 @@ +{% extends "!layout.html" %} + +{% block rootrellink %} + {{ language or 'en' }} + {{ super() }} +{% endblock %} + +{% block extrahead %} + +{{ super() }} +{% endblock %} + +{%- block sidebarlogo %} +{{ super() }} +{%- +include "searchbox.html" +%} +

+{%- endblock %} +{%- block sidebarsearch %} +{%- endblock %} + +{%- block footer %} +

+ {{ super() }} +{%- endblock %} diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index beea2de8d..e4030fdcd 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -17,9 +17,9 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -## -# @package StdMeshersBuilder -# Python API for the standard meshing plug-in module. +""" +Python API for the standard meshing plug-in module. +""" LIBRARY = "libStdMeshersEngine.so" @@ -30,24 +30,50 @@ import StdMeshers # Mesh algo type identifiers #---------------------------- -## Algorithm type: Regular 1D algorithm, see StdMeshersBuilder_Segment REGULAR = "Regular_1D" -## Algorithm type: Python 1D algorithm, see StdMeshersBuilder_Segment_Python +""" +Algorithm type: Regular 1D algorithm, see :class:`StdMeshersBuilder_Segment` +""" + PYTHON = "Python_1D" -## Algorithm type: Composite segment 1D algorithm, see StdMeshersBuilder_CompositeSegment +""" +Algorithm type: Python 1D algorithm, see StdMeshersBuilder_Segment_Python +""" + COMPOSITE = "CompositeSegment_1D" -## Algorithm type: Triangle MEFISTO 2D algorithm, see StdMeshersBuilder_Triangle_MEFISTO +""" + +Algorithm type: Composite segment 1D algorithm, see StdMeshersBuilder_CompositeSegment +""" MEFISTO = "MEFISTO_2D" -## Algorithm type: Hexahedron 3D (i-j-k) algorithm, see StdMeshersBuilder_Hexahedron +""" +Algorithm type: Triangle MEFISTO 2D algorithm, see StdMeshersBuilder_Triangle_MEFISTO +""" + Hexa = "Hexa_3D" -## Algorithm type: Quadrangle 2D algorithm, see StdMeshersBuilder_Quadrangle +""" +Algorithm type: Hexahedron 3D (i-j-k) algorithm, see StdMeshersBuilder_Hexahedron +""" + QUADRANGLE = "Quadrangle_2D" -## Algorithm type: Radial Quadrangle 1D-2D algorithm, see StdMeshersBuilder_RadialQuadrangle1D2D +""" +Algorithm type: Quadrangle 2D algorithm, see StdMeshersBuilder_Quadrangle +""" + RADIAL_QUAD = "RadialQuadrangle_1D2D" -## Algorithm type: Quadrangle (Medial Axis Projection) 1D-2D algorithm, see StdMeshersBuilder_QuadMA_1D2D +""" +Algorithm type: Radial Quadrangle 1D-2D algorithm, see StdMeshersBuilder_RadialQuadrangle1D2D +""" + QUAD_MA_PROJ = "QuadFromMedialAxis_1D2D" -## Algorithm type: Polygon Per Face 2D algorithm, see StdMeshersBuilder_PolygonPerFace +""" +Algorithm type: Quadrangle (Medial Axis Projection) 1D-2D algorithm, see StdMeshersBuilder_QuadMA_1D2D +""" + POLYGON = "PolygonPerFace_2D" +""" +Algorithm type: Polygon Per Face 2D algorithm, see StdMeshersBuilder_PolygonPerFace +""" # import items of enums for e in StdMeshers.QuadType._items: exec('%s = StdMeshers.%s'%(e,e)) @@ -57,52 +83,70 @@ for e in StdMeshers.VLExtrusionMethod._items: exec('%s = StdMeshers.%s'%(e,e)) # Algorithms #---------------------- -## Defines segment 1D algorithm for edges discretization. -# -# It can be created by calling smeshBuilder.Mesh.Segment(geom=0) -# -# @ingroup l3_algos_basic class StdMeshersBuilder_Segment(Mesh_Algorithm): - - ## name of the dynamic method in smeshBuilder.Mesh class - # @internal + """ + Defines segment 1D algorithm for edges discretization. + + It can be created by calling smeshBuilder.Mesh.Segment(geom=0) + """ + # @ingroup l3_algos_basic + meshMethod = "Segment" - ## type of algorithm used with helper function in smeshBuilder.Mesh class - # @internal + """ + name of the dynamic method in smeshBuilder.Mesh class + """ + algoType = REGULAR - ## flag pointing whether this algorithm should be used by default in dynamic method - # of smeshBuilder.Mesh class - # @internal + """ + type of algorithm used with helper function in smeshBuilder.Mesh class + """ + isDefault = True - ## doc string of the method - # @internal + """ + flag pointing whether this algorithm should be used by default in dynamic method + of smeshBuilder.Mesh class + """ + docHelper = "Creates segment 1D algorithm for edges" + """ + doc string of the method + """ - ## Private constructor. - # @param mesh parent mesh object algorithm is assigned to - # @param geom geometry (shape/sub-shape) algorithm is assigned to; - # if it is @c 0 (default), the algorithm is assigned to the main shape def __init__(self, mesh, geom=0): + """ + Private constructor. + Parameters: + mesh: parent mesh object algorithm is assigned to + geom: geometry (shape/sub-shape) algorithm is assigned to; + if it is @c 0 (default), the algorithm is assigned to the main shape + """ Mesh_Algorithm.__init__(self) self.Create(mesh, geom, self.algoType) pass - ## Defines "LocalLength" hypothesis to cut an edge in several segments with the same length - # @param l for the length of segments that cut an edge - # @param UseExisting if ==true - searches for an existing hypothesis created with - # the same parameters, else (default) - creates a new one - # @param p precision, used for calculation of the number of segments. - # The precision should be a positive, meaningful value within the range [0,1]. - # In general, the number of segments is calculated with the formula: - # nb = ceil((edge_length / l) - p) - # Function ceil rounds its argument to the higher integer. - # So, p=0 means rounding of (edge_length / l) to the higher integer, - # p=0.5 means rounding of (edge_length / l) to the nearest integer, - # p=1 means rounding of (edge_length / l) to the lower integer. - # Default value is 1e-07. - # @return an instance of StdMeshers_LocalLength hypothesis - # @ingroup l3_hypos_1dhyps def LocalLength(self, l, UseExisting=0, p=1e-07): + """ + Defines "LocalLength" hypothesis to cut an edge in several segments with the same length + + Parameters: + l : for the length of segments that cut an edge + UseExisting : if == true - searches for an existing hypothesis created with + the same parameters, else (default) - creates a new one + p : precision, used for calculation of the number of segments. + The precision should be a positive, meaningful value within the range [0,1]. + In general, the number of segments is calculated with the formula: + nb = ceil((edge_length / l) - p) + Function ceil rounds its argument to the higher integer. + So, p=0 means rounding of (edge_length / l) to the higher integer, + p=0.5 means rounding of (edge_length / l) to the nearest integer, + p=1 means rounding of (edge_length / l) to the lower integer. + Default value is 1e-07. + + Returns: + an instance of StdMeshers_LocalLength hypothesis + """ + # @ingroup l3_hypos_1dhyps + from salome.smesh.smeshBuilder import IsEqual comFun=lambda hyp, args: IsEqual(hyp.GetLength(), args[0]) and IsEqual(hyp.GetPrecision(), args[1]) hyp = self.Hypothesis("LocalLength", [l,p], UseExisting=UseExisting, CompareMethod=comFun) @@ -110,14 +154,21 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): hyp.SetPrecision(p) return hyp - ## Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value - # @param length is optional maximal allowed length of segment, if it is omitted - # the preestimated length is used that depends on geometry size - # @param UseExisting if ==true - searches for an existing hypothesis created with - # the same parameters, else (default) - creates a new one - # @return an instance of StdMeshers_MaxLength hypothesis - # @ingroup l3_hypos_1dhyps def MaxSize(self, length=0.0, UseExisting=0): + """ + Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value + + Parameters: + length : is optional maximal allowed length of segment, if it is omitted + the preestimated length is used that depends on geometry size + UseExisting : if ==true - searches for an existing hypothesis created with + the same parameters, else (default) - creates a new one + + Returns: + an instance of StdMeshers_MaxLength hypothesis + """ + # @ingroup l3_hypos_1dhyps + hyp = self.Hypothesis("MaxLength", [length], UseExisting=UseExisting) if length > 0.0: # set given length diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 3d4dcf599..151130a0e 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -467,11 +467,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): pnt = PointStruct(x,y,z) return DirStruct(pnt) - ## Get AxisStruct from object - # @param theObj a GEOM object (line or plane) - # @return SMESH.AxisStruct - # @ingroup l1_auxiliary def GetAxisStruct(self,theObj): + """ + Get AxisStruct from object + Parameters: + theObj a GEOM object (line or plane) + SMESH.AxisStruct + """ import GEOM edges = self.geompyD.SubShapeAll( theObj, geomBuilder.geomBuilder.ShapeType["EDGE"] ) axis = None -- 2.39.2