Merge from V5_1_main branch 24/11/2010

This commit is contained in:
vsr 2010-11-25 12:44:43 +00:00
parent b178526bb0
commit d8f644ca3d
329 changed files with 34047 additions and 10081 deletions

View File

@ -28,6 +28,6 @@ find bin -name Makefile.in | xargs rm -f
find doc -name Makefile.in | xargs rm -f find doc -name Makefile.in | xargs rm -f
find idl -name Makefile.in | xargs rm -f find idl -name Makefile.in | xargs rm -f
find resources -name Makefile.in | xargs rm -f find resources -name Makefile.in | xargs rm -f
find salome_adm -name Makefile.in | xargs rm -f find adm_local -name Makefile.in | xargs rm -f
find src -name Makefile.in | xargs rm -f find src -name Makefile.in | xargs rm -f
rm -f Makefile.in rm -f Makefile.in

View File

@ -24,7 +24,7 @@
# Modified by : Alexander BORODIN (OCN) - autotools usage # Modified by : Alexander BORODIN (OCN) - autotools usage
# Created from configure.in.base # Created from configure.in.base
# #
AC_INIT([Salome2 Project SMESH module], [6.1.0], [webmaster.salome@opencascade.com], [SalomeSMESH]) AC_INIT([Salome2 Project SMESH module], [6.2.0], [webmaster.salome@opencascade.com], [SalomeSMESH])
AC_CONFIG_AUX_DIR(adm_local/unix/config_files) AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
@ -355,6 +355,13 @@ echo
CHECK_HTML_GENERATORS CHECK_HTML_GENERATORS
echo
echo ---------------------------------------------
echo testing sphinx
echo ---------------------------------------------
echo
CHECK_SPHINX
echo echo
echo --------------------------------------------- echo ---------------------------------------------
echo Testing Kernel echo Testing Kernel
@ -390,11 +397,11 @@ echo
echo Configure echo Configure
if test "${gui_ok}" = "yes"; then if test "${gui_ok}" = "yes"; then
variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok qwt_ok Kernel_ok Geom_ok Med_ok gui_ok" variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok qwt_ok Kernel_ok Geom_ok Med_ok gui_ok"
elif test "${SalomeGUI_need}" != "no"; then elif test "${SalomeGUI_need}" != "no"; then
variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok gui_ok" variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok gui_ok"
else else
variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok" variables="cc_ok fortran_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok sphinx_ok Kernel_ok Geom_ok Med_ok"
fi fi
for var in $variables for var in $variables
@ -435,6 +442,19 @@ echo
# chmod +x ./bin/salome/*; \ # chmod +x ./bin/salome/*; \
#]) #])
AC_CONFIG_COMMANDS([hack_libtool],[
sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\
if test \"\$(echo \$[@] | grep -E '\\\-L/usr/lib(/../lib)?(64)? ')\" == \"\" \n\
then\n\
cmd=\"\1 \$[@]\"\n\
else\n\
cmd=\"\1 \"\`echo \$[@] | sed -r -e 's|(.*)-L/usr/lib(/../lib)?(64)? (.*)|\\\1\\\4 -L/usr/lib\\\3|g'\`\n\
fi\n\
\$cmd\n\
}\n\
CC=\"hack_libtool\"%g" libtool
],[])
# This list is initiated using autoscan and must be updated manually # This list is initiated using autoscan and must be updated manually
# when adding a new file <filename>.in to manage. When you execute # when adding a new file <filename>.in to manage. When you execute
# autoscan, the Makefile list is generated in the output file configure.scan. # autoscan, the Makefile list is generated in the output file configure.scan.
@ -448,6 +468,7 @@ AC_OUTPUT([ \
bin/Makefile \ bin/Makefile \
SMESH_version.h \ SMESH_version.h \
doc/Makefile \ doc/Makefile \
doc/docutils/Makefile \
doc/salome/Makefile \ doc/salome/Makefile \
doc/salome/gui/Makefile \ doc/salome/gui/Makefile \
doc/salome/gui/SMESH/Makefile \ doc/salome/gui/SMESH/Makefile \
@ -479,6 +500,7 @@ AC_OUTPUT([ \
src/StdMeshers/Makefile \ src/StdMeshers/Makefile \
src/StdMeshersGUI/Makefile \ src/StdMeshersGUI/Makefile \
src/StdMeshers_I/Makefile \ src/StdMeshers_I/Makefile \
src/SMESH_PY/Makefile \
resources/Makefile \ resources/Makefile \
resources/SMESHCatalog.xml \ resources/SMESHCatalog.xml \
idl/Makefile \ idl/Makefile \

View File

@ -24,7 +24,7 @@
# $Header$ # $Header$
# source path # source path
# #
SUBDIRS = salome SUBDIRS = salome docutils
usr_docs: usr_docs:
(cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs) (cd salome && $(MAKE) $(AM_MAKEFLAGS) usr_docs)

91
doc/docutils/Makefile.am Normal file
View File

@ -0,0 +1,91 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
include $(top_srcdir)/adm_local/unix/make_common_starter.am
pydocdir = $(docdir)/tui/SMESH/docutils
.PHONY : latex
if SPHINX_IS_OK
html/index.html:$(RSTFILES)
make htm
endif
SPHINXOPTS =
SOURCEDIR = $(srcdir)
SPHINXBUILD = sphinx-build
PAPEROPT_a4 = -D latex_paper_size=a4
ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
SPHINX_PYTHONPATH = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(prefix)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/bin/salome:$(KERNEL_ROOT_DIR)/lib/python$(PYTHON_VERSION)/site-packages/salome:$(KERNEL_ROOT_DIR)/lib64/python$(PYTHON_VERSION)/site-packages/salome:$(OMNIORB_ROOT)/lib/python$(PYTHON_VERSION)/site-packages:$(OMNIORB_ROOT)/lib64/python$(PYTHON_VERSION)/site-packages
SPHINX_LD_LIBRARY_PATH = $(KERNEL_ROOT_DIR)/lib/salome:$(OMNIORB_ROOT)/lib
htm:
mkdir -p html doctrees
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
$(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) html
@echo
@echo "Build finished. The HTML pages are in html."
latex:
mkdir -p latex doctrees
PYTHONPATH=$(SPHINX_PYTHONPATH):${PYTHONPATH}; \
LD_LIBRARY_PATH=$(SPHINX_LD_LIBRARY_PATH):${LD_LIBRARY_PATH}; \
$(SPHINXBUILD) -W -b latex $(ALLSPHINXOPTS) latex
@echo
@echo "Build finished; the LaTeX files are in latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
html:
mkdir -p $@
RSTFILES= \
index.rst \
overview.rst \
docapi.rst
EXTRA_DIST+= $(RSTFILES)
EXTRA_DIST+= \
conf.py
install-data-local: html/index.html
test -z $(pydocdir) || mkdir -p $(DESTDIR)$(pydocdir)
if test -d "html"; then b=; else b="$(srcdir)/"; fi; \
cp -rf $$b"html"/* $(pydocdir) ; \
if test -f $$b"latex"/smeshpy.pdf; then cp -f $$b"latex"/smeshpy.pdf $(pydocdir) ; fi;
uninstall-local:
-test -d $(pydocdir) && chmod -R +w $(pydocdir) && rm -rf $(pydocdir)/*
clean-local:
-rm -rf html latex doctrees
if test -d "html"; then rm -rf html ; fi
disthook :
-test -d html && cp -Rp html $(distdir)

200
doc/docutils/conf.py Normal file
View File

@ -0,0 +1,200 @@
# -*- coding: iso-8859-1 -*-
#
# 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']
# Uncomment the following line to build the links with Python documentation
# (you might need to set http_proxy environment variable for this to work)
#extensions += ['sphinx.ext.intersphinx']
# Intersphinx mapping to add links to modules and objects in the Python
# standard library documentation
intersphinx_mapping = {'http://docs.python.org': None}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_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 = 'SMESH python packages'
copyright = '2010 EDF R&D'
# 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 = '5.1.4'
# The full version, including alpha/beta/rc tags.
release = '5.1.4'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'
# 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','.svn']
# 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 = 'default'
#html_theme = 'nature'
#html_theme = 'agogo'
#html_theme = 'sphinxdoc'
#html_theme = 'omadoc'
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = ['themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> 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 = ['_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 = {}
# 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 = False
# 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/<name>.
html_copy_source = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> 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 = 'smeshpydoc'
# 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', 'smeshpy.tex', 'Documentation of the SMESH python packages', 'EDF R\&D', 'manual')
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
latex_logo = '../salome/tui/images/head.png'
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = True
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
latex_use_modindex = False

17
doc/docutils/docapi.rst Normal file
View File

@ -0,0 +1,17 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Documentation of the programming interface (API)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This section describes the python packages and modules of the
``salome.smesh`` python package. The main part is generated from the
code documentation included in source python files.
:mod:`salome.smesh` -- Package containing the SMESH python utilities
====================================================================
:mod:`smeshstudytools` -- Tools to access SMESH objects in the study
--------------------------------------------------------------------
.. automodule:: salome.smesh.smeshstudytools
:members:

14
doc/docutils/index.rst Normal file
View File

@ -0,0 +1,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Documentation of the SMESH python packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Main documentation
==================
.. toctree::
:maxdepth: 3
overview.rst
docapi.rst

24
doc/docutils/overview.rst Normal file
View File

@ -0,0 +1,24 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
General presentation of the SMESH python package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The SMESH python package contains (today) helpser functions to
manipulate mesh elements and interact with this elements.
Note that these functions either encapsulate the python programming
interface of SMESH core (the CORBA or SWIG interface for example) or
extend existing utilities as the ``smesh.py`` module.
The functions are distributed in the python package
``salome.smesh``.
The specification of the programming interface of this package is
detailled in the part :doc:`Documentation of the programming interface
(API)</docapi>` of this documentation.
.. note::
The main package ``salome`` contains other sub-packages that are
distributed with the other SALOME modules. For example, the KERNEL
module provides the python package ``salome.kernel`` and GEOM the
package ``salome.geom``.

View File

@ -32,22 +32,20 @@ guidoc_DATA = images/head.png
usr_docs: doxyfile_py doxyfile usr_docs: doxyfile_py doxyfile
echo "===========================================" ; \ echo "===========================================" ; \
echo "Replacing smeshDC by smesh" ; \
echo "===========================================" ; \
sed -e "/class smeshDC/d" -e "s/^ *#/#/g" -e "s/^ *def /def /g" \
-e "s/smeshDC/smesh/g" $(top_srcdir)/src/SMESH_SWIG/smeshDC.py > \
$(top_builddir)/src/SMESH_SWIG/smesh.py ; \
echo "===========================================" ; \
echo "Generating Python interface documentation"; \ echo "Generating Python interface documentation"; \
echo "===========================================" ; \ echo "===========================================" ; \
$(DOXYGEN) doxyfile_py ; \ $(DOXYGEN) doxyfile_py ; \
echo "===========================================" ; \ echo "===========================================" ; \
echo "Replacing smeshDC by smesh" ; \
echo "===========================================" ; \
files=`find smeshpy_doc -type f` ; \
for filen in $${files} ; do \
sed -e "s/\<smeshDC\>/smesh/g" -e "s/smesh\.smesh/smesh/g" \
-e "s/smesh::smesh/smesh/g" $${filen} > $${filen}_ ; \
mv -f $${filen}_ $${filen} ; \
done ; \
echo "===========================================" ; \
echo "Generating GUI documentation" ; \ echo "Generating GUI documentation" ; \
echo "===========================================" ; \ echo "===========================================" ; \
$(DOXYGEN) doxyfile ; $(DOXYGEN) doxyfile ; \
rm -f $(top_builddir)/src/SMESH_SWIG/smesh.py
docs: usr_docs docs: usr_docs
@ -55,7 +53,7 @@ clean-local:
@for filen in `find . -maxdepth 1` ; do \ @for filen in `find . -maxdepth 1` ; do \
case $${filen} in \ case $${filen} in \
./Makefile | ./doxyfile | ./doxyfile_py ) ;; \ ./Makefile | ./doxyfile | ./doxyfile_py ) ;; \
. | .. ) ;; \ . | .. | ./static ) ;; \
*) echo "Removing $${filen}" ; rm -rf $${filen} ;; \ *) echo "Removing $${filen}" ; rm -rf $${filen} ;; \
esac ; \ esac ; \
done ; done ;
@ -66,7 +64,7 @@ install-data-local: usr_docs
case $${filen} in \ case $${filen} in \
./Makefile | ./doxyfile | ./doxyfile_py ) ;; \ ./Makefile | ./doxyfile | ./doxyfile_py ) ;; \
./doxyfile.bak | ./doxyfile_py.bak ) ;; \ ./doxyfile.bak | ./doxyfile_py.bak ) ;; \
. | .. ) ;; \ . | .. | ./static ) ;; \
*) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/SMESH ;; \ *) echo "Installing $${filen}" ; cp -rp $${filen} $(DESTDIR)$(docdir)/gui/SMESH ;; \
esac ; \ esac ; \
done ; done ;

View File

@ -70,3 +70,4 @@ GENERATE_RTF = NO
#External reference options #External reference options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
TAGFILES = smeshpy_doc.tag=smeshpy_doc TAGFILES = smeshpy_doc.tag=smeshpy_doc
SEARCHENGINE = YES

View File

@ -98,8 +98,8 @@ EXAMPLE_RECURSIVE = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
#Input related options #Input related options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
INPUT = @top_srcdir@/src/SMESH_SWIG INPUT = @top_builddir@/src/SMESH_SWIG
FILE_PATTERNS = smeshDC.py FILE_PATTERNS = smesh.py
IMAGE_PATH = @srcdir@/images IMAGE_PATH = @srcdir@/images
RECURSIVE = NO RECURSIVE = NO
EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG EXAMPLE_PATH = @top_srcdir@/src/SMESH_SWIG
@ -157,3 +157,4 @@ DOT_CLEANUP = YES
#External reference options #External reference options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_TAGFILE = smeshpy_doc.tag GENERATE_TAGFILE = smeshpy_doc.tag
SEARCHENGINE = YES

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 B

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -5,7 +5,7 @@
<br> <br>
<ul> <ul>
<li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li> <li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li>
<li>\ref average_length_anchor "Average Length"</li> <li>\ref average_length_anchor "Local Length"</li>
<li>\ref max_length_anchor "Max Size"</li> <li>\ref max_length_anchor "Max Size"</li>
<li>\ref deflection_1d_anchor "Deflection 1D"</li> <li>\ref deflection_1d_anchor "Deflection 1D"</li>
<li>\ref number_of_segments_anchor "Number of segments"</li> <li>\ref number_of_segments_anchor "Number of segments"</li>
@ -57,9 +57,9 @@ locations and 1D mesh elements are constructed on segments.
<br> <br>
\anchor average_length_anchor \anchor average_length_anchor
<h2>Average Length hypothesis</h2> <h2>Local Length hypothesis</h2>
<b>Average Length</b> hypothesis can be applied for meshing of edges <b>Local Length</b> hypothesis can be applied for meshing of edges
composing your geometrical object. Definition of this hypothesis composing your geometrical object. Definition of this hypothesis
consists of setting the \b length of segments, which will split these consists of setting the \b length of segments, which will split these
edges, and the \b precision of rounding. The points on the edges edges, and the \b precision of rounding. The points on the edges
@ -79,10 +79,10 @@ integer. Default value is 1e-07.
\image html a-averagelength.png \image html a-averagelength.png
\image html b-erage_length.png "Average length hypothesis - all 1D mesh elements are roughly equal" \image html b-erage_length.png "Local Length hypothesis - all 1D mesh elements are roughly equal"
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_average_length "Defining Average Length" hypothesis \ref tui_average_length "Defining Local Length" hypothesis
operation. operation.
<br>\anchor max_length_anchor <br>\anchor max_length_anchor
@ -157,7 +157,7 @@ operation.
<b>Start and End Length</b> hypothesis allows to divide a geometrical edge <b>Start and End Length</b> hypothesis allows to divide a geometrical edge
into segments so that the first and the last segments have a specified into segments so that the first and the last segments have a specified
length. The length medium segments changes with automatically chosen length. The length of medium segments changes with automatically chosen
geometric progression. Then mesh nodes are geometric progression. Then mesh nodes are
constructed at segment ends location and 1D mesh elements are constructed at segment ends location and 1D mesh elements are
constructed on them. constructed on them.

View File

@ -43,27 +43,58 @@ length calculated as an average edge length for a given wire.
\anchor hypo_quad_params_anchor \anchor hypo_quad_params_anchor
<h2>Quadrangle parameters</h2> <h2>Quadrangle parameters</h2>
<b>Quadrangle parameters</b> is a hypothesis for \image html hypo_quad_params_dialog.png "Quadrangle parameters creation/edition dialog"
Quadrangle (Mapping), which allows using this algorithm for meshing of
triangular faces.In this case it is necessary to select the <b>Base vertex</b> <b>Quadrangle parameters</b> is a hypothesis for Quadrangle (Mapping).
used as a degenerated edge.
<b>Base vertex</b> parameter allows using Quadrangle (Mapping)
algorithm for meshing of triangular faces. In this case it is
necessary to select the vertex, which will be used as the fourth edge
(degenerated).
\image html hypo_quad_params_1.png "A face built from 3 edges" \image html hypo_quad_params_1.png "A face built from 3 edges"
\image html hypo_quad_params_res.png "The resulting mesh" \image html hypo_quad_params_res.png "The resulting mesh"
This hypothesis can be also used to mesh a segment of a circular face. This parameter can be also used to mesh a segment of a circular face.
Please, consider that there is a limitation on the selectiion of the degenerated 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). vertex for the faces built with the angle > 180 degrees (see the picture).
\image html hypo_quad_params_2.png "3/4 of a circular face" \image html hypo_quad_params_2.png "3/4 of a circular face"
In this case, selection of a wrong vertex for the <b>Quadrangle parameters</b> In this case, selection of a wrong vertex for the <b>Base vertex</b>
hypothesis will generate a wrong mesh. The picture below parameter will generate a wrong mesh. The picture below
shows the good (left) and the bad (right) results of meshing. shows the good (left) and the bad (right) results of meshing.
\image html hypo_quad_params_res_2.png "The resulting meshes" \image html hypo_quad_params_res_2.png "The resulting meshes"
<b>Type</b> parameter is used on faces with a different number of
segments on opposite sides to define the algorithm of transition
between them. The following types are available:
<ul>
<li><b>Standard</b> is the default case, when both triangles and quadrangles
are possible in the transition area along the finer meshed sides.</li>
<li><b>Triangle preference</b> forces building only triangles in the
transition area along the finer meshed sides.
<i>This type corresponds to <b>Triangle Preference</b> additional
hypothesis, which is obsolete now.</i></li>
<li><b>Quadrangle preference</b> 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 sides of the face must be even (divisible by 2).</li>
<i>This type corresponds to <b>Quadrangle Preference</b>
additional hypothesis, which is obsolete now.</i></li>
<li><b>Quadrangle preference (reversed)</b> works in the same way and
with the same restriction as <b>Quadrangle preference</b>, but
the transition area is located along the coarser meshed sides.</li>
<li><b>Reduced</b> 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 difference
between the numbers of segments on the sides.</li>
</ul>
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis. \ref tui_quadrangle_parameters "Quadrangle Parameters" hypothesis.

View File

@ -0,0 +1,31 @@
/*!
\page filters_page About filters
\b 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 object, control
mesh quality by different parameters, etc.
Several filters can be combined together by using logical operators \a
AND and \a OR. In addition, applied filter criterion can be reverted
using logical operator \a NOT.
Mesh filters 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 an additional
"Set Filters" button, clicking on which opens the dialog box
allowing to specify the list of filter criterions to be applied to the
current selection. See \subpage selection_filter_library_page page to learn more
about selection filters and their usage in GUI.
- In Python scripts, filters can be used to choose only some mesh
entities (nodes and/or elements) for the operations, which require the
list of entities as input parameter (create/modify group, remove
nodes/elements, etc). The page \ref tui_filters_page provides
examples of the filters usage in Python scripts.
*/

View File

@ -17,7 +17,7 @@ them, you operate numerical values):
<b>edges</b>):</li> <b>edges</b>):</li>
<ul> <ul>
<li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li> <li>\ref arithmetic_1d_anchor "Arithmetic 1D"</li>
<li>\ref average_length_anchor "Average Length"</li> <li>\ref average_length_anchor "Local Length"</li>
<li>\ref max_length_anchor "Max Size"</li> <li>\ref max_length_anchor "Max Size"</li>
<li>\ref deflection_1d_anchor "Deflection 1D"</li> <li>\ref deflection_1d_anchor "Deflection 1D"</li>
<li>\ref number_of_segments_anchor "Number of segments"</li> <li>\ref number_of_segments_anchor "Number of segments"</li>
@ -29,8 +29,6 @@ them, you operate numerical values):
<li>\ref max_element_area_anchor "Max Element Area"</li> <li>\ref max_element_area_anchor "Max Element Area"</li>
<li>\ref length_from_edges_anchor "Length from Edges"</li> <li>\ref length_from_edges_anchor "Length from Edges"</li>
<li>\ref hypo_quad_params_anchor "Quadrangle Parameters"</li> <li>\ref hypo_quad_params_anchor "Quadrangle Parameters"</li>
<li>\ref quadrangle_preference_anchor "Quadrangle Preference"</li>
<li>\ref triangle_preference_anchor "Triangle Preference"</li>
</ul> </ul>
<li>3D Hypothesis (for meshing of <b>volumes</b>):</li> <li>3D Hypothesis (for meshing of <b>volumes</b>):</li>
<ul> <ul>

View File

@ -13,24 +13,25 @@ the meshing elements and these calculated values is shown with the
help of a scalar bar, which is displayed near the presentation of your help of a scalar bar, which is displayed near the presentation of your
mesh. mesh.
There are 0D, 1D, 2D and 3D quality controls. There are four types of quality controls, corresponding to node, edge,
face and volume entity type.
0D mesh quality controls: Node quality controls:
<ul>
<li>\ref free_nodes_page "Free nodes"</li>
</ul>
1D mesh quality controls:
<ul>
<li>\subpage free_borders_page "Free borders"</li>
<li>\subpage borders_at_multi_connection_page "Borders at multi-connection"</li>
<li>\subpage length_page "Length"</li>
</ul>
2D mesh quality controls:
<ul> <ul>
<li>\subpage free_nodes_page "Free nodes"</li> <li>\subpage free_nodes_page "Free nodes"</li>
</ul>
Edge quality controls:
<ul>
<li>\subpage free_edges_page "Free edges"</li> <li>\subpage free_edges_page "Free edges"</li>
<li>\subpage free_borders_page "Free borders"</li>
<li>\subpage length_page "Length"</li>
<li>\subpage borders_at_multi_connection_page "Borders at multi-connection"</li>
</ul>
Face quality controls:
<ul>
<li>\subpage free_faces_page "Free faces"</li>
<li>\subpage length_2d_page "Length 2D"</li> <li>\subpage length_2d_page "Length 2D"</li>
<li>\subpage borders_at_multi_connection_2d_page "Borders at multi-connection 2D"</li> <li>\subpage borders_at_multi_connection_2d_page "Borders at multi-connection 2D"</li>
<li>\subpage area_page "Area"</li> <li>\subpage area_page "Area"</li>
@ -39,13 +40,14 @@ There are 0D, 1D, 2D and 3D quality controls.
<li>\subpage minimum_angle_page "Minimum angle"</li> <li>\subpage minimum_angle_page "Minimum angle"</li>
<li>\subpage warping_page "Warping"</li> <li>\subpage warping_page "Warping"</li>
<li>\subpage skew_page "Skew"</li> <li>\subpage skew_page "Skew"</li>
<li>\subpage max_element_length_2d_page "Max element length 2D"</li>
</ul> </ul>
3D mesh quality controls: Volume quality controls:
<ul> <ul>
<li>\subpage aspect_ratio_3d_page "Aspect ratio 3D"</li> <li>\subpage aspect_ratio_3d_page "Aspect ratio 3D"</li>
<li>\subpage volume_page "Volume"</li> <li>\subpage volume_page "Volume"</li>
<li>\subpage free_faces_page "Free faces"</li> <li>\subpage max_element_length_3d_page "Max element length 3D"</li>
</ul> </ul>
*/ */

View File

@ -27,23 +27,23 @@ following associated submenu will appear:</li>
From this submenu select the type of element which you would like to add to your mesh. From this submenu select the type of element which you would like to add to your mesh.
\note All dialogs for adding new node or element to the mesh (except for \note All dialogs for new node or element adding to the mesh (except for
the dialog for 0D elements) provide a possibility to add it the dialog for 0D elements) provide the possibility to automatically add
automatically to the specified group or to create it anew using a node or element to the specified group or to create the anew using
<b>Add to group</b> box, that allows to choose an existing group for <b>Add to group</b> box, that allows choosing an existing group for
the created node or element or to give the name to a new group. By the created node or element or giving the name to a new group. By
default, the <b>Add to group</b> check box is switched off. If user default, the <b>Add to group</b> check box is switched off. If the user
swiches this check box on, the combo box listing all currently swiches this check box on, the combo box listing all currently
existing groups of the corresponding type becomes available. By existing groups of the corresponding type becomes available. By
default, no any group is selected. In such a case, when user presses default, no group is selected. In this case, when the user presses
<b>Apply</b> or <b>Apply & Close</b> button, the warning message box <b>Apply</b> or <b>Apply & Close</b> button, the warning message box
informing the user about the necessity to input new group name is informs the user about the necessity to input new group name. The
shown. The combo box lists both \ref standalone_group "standalone groups" combo box lists both \ref standalone_group "standalone groups"
and \ref group_on_geom "groups on geometry". If the user has and \ref group_on_geom "groups on geometry". If the user chooses a
chosen the group on geometry, he is warned and proposed to group on geometry, he is warned and proposed to
\ref convert_to_standalone "convert this group to the standalone". \ref convert_to_standalone "convert this group to standalone".
If user refuses converting operation, an operation is cancelled and If the user rejects conversion operation, it is cancelled and
new node/element is not created! a new node/element is not created!
</ol> </ol>

View File

@ -18,23 +18,23 @@ one of the following:
\image html image152.png \image html image152.png
\note All dialogs for adding quadratic element to the mesh \note All dialogs for quadratic element adding to the mesh
provide a possibility to add new element provide the possibility to automatically add an element
automatically to the specified group or to create it anew using to the specified group or to create the group anew using
<b>Add to group</b> box, that allows to choose an existing group for <b>Add to group</b> box, that allows choosing an existing group for
the created node or element or to give the name to a new group. By the created node or element or giving the name to a new group. By
default, the <b>Add to group</b> check box is switched off. If user default, the <b>Add to group</b> check box is switched off. If the user
swiches this check box on, the combo box listing all currently swiches this check box on, the combo box listing all currently
existing groups of the corresponding type becomes available. By existing groups of the corresponding type becomes available. By
default, no any group is selected. In such a case, when user presses default, no group is selected. In this case, when the user presses
<b>Apply</b> or <b>Apply & Close</b> button, the warning message box <b>Apply</b> or <b>Apply & Close</b> button, the warning message box
informing the user about the necessity to input new group name is informs the user about the necessity to input a new group name. The
shown. The combo box lists both \ref standalone_group "standalone groups" combo box lists both \ref standalone_group "standalone groups"
and \ref group_on_geom "groups on geometry". If the user has and \ref group_on_geom "groups on geometry". If the user chooses a
chosen the group on geometry, he is warned and proposed to group on geometry, he is warned and proposed to
\ref convert_to_standalone "convert this group to the standalone". \ref convert_to_standalone "convert this group to standalone".
If user refuses converting operation, an operation is cancelled and If the user rejects conversion operation, it is cancelled and
new node/element is not created! a new quadratic element is not created.
To create any <b>Quadratic Element</b> specify the nodes which will form your To create any <b>Quadratic Element</b> specify the nodes which will form your

View File

@ -41,17 +41,20 @@ It allows Netgen 2D to build quadrangular meshes at any conditions.
It allows Quadrangle (Mapping) to build quadrangular meshes even if the number It allows Quadrangle (Mapping) to build quadrangular meshes even if the number
of nodes at the opposite edges of a meshed face is not equal, of nodes at the opposite edges of a meshed face is not equal,
otherwise this mesh will contain some triangular elements. otherwise this mesh will contain some triangular elements. <i>This use
case is obsolete now. Use <b>Quadrangle Parameters</b> hypothesis with
type <b>Quadrangle Preference</b> set instead.</i>
<br> <br>
This hypothesis has one restriction on its work: the total quantity of This hypothesis has one restriction on its work: the total quantity of
segments on all four sides of the face must be even (divisible by 2). segments on all four sides of the face must be even (divisible by 2).
<h2>Triangle Preference</h2> <h2>Triangle Preference <i>(obsolete)</i></h2>
This additional hypothesis can be used only together with Quadrangle (Mapping) This additional hypothesis can be used only together with Quadrangle (Mapping)
algorithm. It allows to build triangular mesh faces in the refinement algorithm. It allows to build triangular mesh faces in the refinement
area if the number of nodes at the opposite edges of a meshed face is not equal, area if the number of nodes at the opposite edges of a meshed face is not equal,
otherwise refinement area will contain some quadrangular elements. otherwise refinement area will contain some quadrangular elements.
<i>This hypothesis is obsolete now. Use <b>Quadrangle Parameters</b>
hypothesis with type <b>Triangle Preference</b> set instead.</i>
*/ */

View File

@ -11,7 +11,8 @@ quadrangles).
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Area</b> or click <em>"Area"</em> button. <li>Choose <b>Controls > Face Controls > Area</b> or click
<em>"Area"</em> button.
\image html image35.png \image html image35.png
<center><em>"Area" button</em></center> <center><em>"Area" button</em></center>

View File

@ -13,10 +13,10 @@ nodes is calculated by the formula:
\image html formula4.png \image html formula4.png
- The <b>Aspect Ratio</b> of a \b quadrangle 2D element consisting of - The <b>Aspect Ratio</b> of a \b quadrangle 2D element consisting of 4
4 nodes is the worst (i.e. the greatest) value from all triangles nodes is calculated by the formula:
which can be built taking three nodes of the quadrangle. There are
four triangles to consider: \image html formula5.png
\image html image138.gif \image html image138.gif
@ -24,8 +24,8 @@ nodes is calculated by the formula:
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Aspect Ratio</b> or click <em>"Aspect <li>Choose <b>Controls > Face Controls > Aspect Ratio</b> or click
Ratio"</em> button in the toolbar. <em>"Aspect Ratio"</em> button in the toolbar.
\image html image37.png \image html image37.png
<center><em>"Aspect Ratio" button</em></center> <center><em>"Aspect Ratio" button</em></center>

View File

@ -21,8 +21,8 @@ by the formula:
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Aspect Ratio 3D</b> or click <em>"Aspect Ratio 3D"</em> <li>Choose <b>Controls > Volume Controls > Aspect Ratio 3D</b> or click
button of the toolbar. <em>"Aspect Ratio 3D"</em> button of the toolbar.
\image html image144.png \image html image144.png
<center><em>"Aspect Ratio 3D" button</em></center> <center><em>"Aspect Ratio 3D" button</em></center>

View File

@ -62,6 +62,7 @@ license to be used within the Mesh module.
There is also a number of more specific algorithms: There is also a number of more specific algorithms:
<ul> <ul>
<li>\subpage projection_algos_page "for meshing by projection of another mesh"</li> <li>\subpage projection_algos_page "for meshing by projection of another mesh"</li>
<li>\subpage import_algos_page "for meshing by importing elements from another mesh"</li>
<li>\subpage radial_prism_algo_page "for meshing geometrical objects with cavities"</li> <li>\subpage radial_prism_algo_page "for meshing geometrical objects with cavities"</li>
<li>\subpage segments_around_vertex_algo_page "for defining the local size of elements around a certain node"</li> <li>\subpage segments_around_vertex_algo_page "for defining the local size of elements around a certain node"</li>
<li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li> <li>\subpage prism_3d_algo_page "for meshing prismatic shapes"</li>

View File

@ -9,11 +9,14 @@ To start, click on the \em New button.
\image html a-clipping2.png \image html a-clipping2.png
Now you can define the parameters of your cross-section: \b Orientation Now you can define the parameters of your cross-section: list of
(X-Y, X-Z or Y-Z); \b Distance between the opposite extremities of the <b>meshes, sub-meshes and groups</b> the cross-section will be applied to
object, if it is set to 0.5 the object is split in two halves; and (<b>Select all</b> button allows to select and deselect all available
\b Rotation (in angle degrees) <b>around X</b> (Y to Z) and <b>around Y</b> (X to objects at once), \b Orientation (X-Y, X-Z or Y-Z); \b Distance between the
Z). If the <b>Show preview</b> button is on, you can see the clipping plane opposite extremities of the boundary box of selected objects, if it is set
to 0.5 the boundary box is split in two halves; and \b Rotation (in angle
degrees) <b>around X</b> (Y to Z) and <b>around Y</b> (X to Z).
If the <b>Show preview</b> button is on, you can see the clipping plane
in the <b>3D Viewer</b>. in the <b>3D Viewer</b>.
\image html image79.jpg "The plane and the cut object" \image html image79.jpg "The plane and the cut object"

View File

@ -26,7 +26,7 @@ SALOME Platform distinguishes between the two Group types:
\anchor standalone_group <br><h2>"Standalone Group"</h2> \anchor standalone_group <br><h2>"Standalone Group"</h2>
<b>Standalone Group</b> consists of mesh elements, which you can define in <b>Standalone Group</b> consists of mesh elements, which you can define in
two possible ways. the following ways:
<ul> <ul>
<li>Choosing them manually with the mouse in the 3D Viewer. You can <li>Choosing them manually with the mouse in the 3D Viewer. You can
click on an element in the 3D viewer and it will be highlighted. After click on an element in the 3D viewer and it will be highlighted. After
@ -36,6 +36,9 @@ the list.</li>
definite filter to selection of the elements of your group. See more definite filter to selection of the elements of your group. See more
about filters on the about filters on the
\ref selection_filter_library_page "Selection filter library" page.</li> \ref selection_filter_library_page "Selection filter library" page.</li>
<li>By adding all existing entities of the chosen type to the
group. For this turn on the <b>Select All</b> check box. In this
mode all controls, which allow selecting the entities manually or by filters, are disabled.</li>
</ul> </ul>
To remove a selected element or elements from the list click the To remove a selected element or elements from the list click the
\b Remove button. The <b>Sort List</b> button allows to sort the list of IDs of \b Remove button. The <b>Sort List</b> button allows to sort the list of IDs of

View File

@ -0,0 +1,70 @@
/*!
\page double_nodes_page Duplicate Nodes
\n This operation allows to duplicate nodes of your mesh.
Duplication consists in replacement of an existing mesh element by another one.
Lower level elements of the duplicated ones are cloned
automatically.
<em>To duplicate nodes:</em>
<ol>
<li>From the \b Modification menu choose \b Transformation -> \b Duplicate
\b Nodes item or click <em>"Duplicate Nodes"</em> button in the toolbar.
<br>
\image html duplicate_nodes.png "Duplicate Nodes button"
</li>
<li>Check in the dialog box one of two radio buttons corresponding to
the type of nodes duplication operation you would like to perform.</li>
<li>Fill the other fields available in the dialog box (depends on the chosen
operation mode).</li>
<li>Click the \b Apply or <b>Apply and Close</b> button to perform the operation of nodes
duplication.</li>
</ol>
\n "Duplicate Nodes" dialog has two working modes:
<ul>
<li>\ref mode_without_elem_anchor "Without the duplication of border elements"</li>
<li>\ref mode_with_elem_anchor "With the duplication of border elements"</li>
</ul>
<br>
\anchor mode_without_elem_anchor
<h2>Without duplication of border elements</h2>
In this mode the dialog looks like:
\image html duplicate01.png
Parameters to be defined in this mode:
<ul>
<li><b>Group of nodes to duplicate</b> (<em>mandatory</em>): these nodes will be duplicated.</li>
<li><b>Group of elements to replace nodes with new ones</b> (<em>optional</em>): the duplicated nodes
will be associated with these elements.</li>
<li><b>Construct group with newly created nodes</b> option (<em>checked by default</em>):
if checked - the group with just created nodes will be built.</li>
</ul>
<br>
\anchor mode_with_elem_anchor
<h2>With duplication of border elements</h2>
In this mode the dialog looks like:
\image html duplicate02.png
Parameters to be defined in this mode:
<ul>
<li><b>Group of elements to duplicate</b> (<em>mandatory</em>): these elements will be duplicated.</li>
<li><b>Group of nodes at not to duplicate</b> (<em>optional</em>): group of nodes at crack bottom
which will not be duplicated.</li>
<li><b>Group of elements to replace nodes with new ones</b> (<em>mandatory</em>): the duplicated nodes
will be associated with these elements.</li>
<li><b>Construct group with newly created elements</b> option (<em>checked by default</em>):
if checked - the group with just created elements will be built.</li>
</ul>
<br><b>See Also</b> a sample TUI Script of a \ref tui_duplicate_nodes "Duplicate nodes" operation.
*/

View File

@ -33,7 +33,7 @@ The created groups can be later:
</ul> </ul>
An important tool, providing filters for creation of \b Standalone An important tool, providing filters for creation of \b Standalone
groups is \subpage selection_filter_library_page. groups is \ref selection_filter_library_page.
*/ */

View File

@ -13,9 +13,12 @@ previously created or imported by the Geometry component; </li>
the VTK viewer;</li> the VTK viewer;</li>
<li>\subpage grouping_elements_page "creating groups of mesh elements";</li> <li>\subpage grouping_elements_page "creating groups of mesh elements";</li>
<li>applying to meshes \subpage quality_page "Quality Controls", <li>applying to meshes \subpage quality_page "Quality Controls",
allowing to highlight important elements: allowing to highlight important elements;
<li>filtering sub-sets of mesh entities (nodes elements) using
\subpage filters_page "Filters" functionality;</li>
<li>\subpage modifying_meshes_page "modifying meshes" with a vast <li>\subpage modifying_meshes_page "modifying meshes" with a vast
array of dedicated operations.</li> array of dedicated operations;</li>
<li>different \subpage measurements_page "measurements" of the mesh objects;
<li>easily setting parameters via the variables predefined in <li>easily setting parameters via the variables predefined in
\subpage using_notebook_mesh_page "Salome notebook".</li> \subpage using_notebook_mesh_page "Salome notebook".</li>
</ul> </ul>
@ -23,6 +26,10 @@ array of dedicated operations.</li>
Almost all mesh module functionalities are accessible via Almost all mesh module functionalities are accessible via
\subpage smeshpy_interface_page "Mesh module Python interface". \subpage smeshpy_interface_page "Mesh module Python interface".
Also it can be useful to have a look at the
\subpage smeshpypkg_page "documentation on SMESH python package".
\image html image7.jpg "Example of MESH module usage for engineering tasks" \image html image7.jpg "Example of MESH module usage for engineering tasks"
*/ */

View File

@ -10,8 +10,8 @@ of your mesh.
<ol> <ol>
<li>Display your mesh in the viewer. </li> <li>Display your mesh in the viewer. </li>
<li>Choose <b>Controls > Length 2D</b> or click <em>"Length 2D"</em> <li>Choose <b>Controls > Face Controls > Length 2D</b> or click
button in the toolbar. <em>"Length 2D"</em> button in the toolbar.
\image html image34.png \image html image34.png
<center><em>"Length 2D" button</em></center> <center><em>"Length 2D" button</em></center>

View File

@ -1,22 +1,58 @@
/*! /*!
\page make_2dmesh_from_3d_page Generate the skin elements (2D) of a mesh having 3D elements \page make_2dmesh_from_3d_page Generate boundary elements
\n This functionality allows to generate 2D mesh elements as a skin \n This functionality allows to generate mesh elements on the borders of
on the existing 3D mesh elements. elements of a higher dimension.
<em>To generate 2D mesh:</em> <em>To generate border elements:</em>
<ol> <ol>
<li>From the Modification menu choose "Create 2D mesh from 3D" <li>From the Modification menu choose "Create boundary elements"
item, or choose from the popup menu. item, or click "Create boundary elements" button in the toolbar
\image html 2d_from_3d_menu.png \image html 2d_from_3d_ico.png "Create boundary elements icon"
The algorithm detects boundary volume faces without connections to The following dialog box will appear:
other volumes and creates 2D mesh elements on face nodes. If the mesh \image html 2d_from_3d_dlg.png "Create boundary elements dialog box".
already contains 2D elements on the detected nodes, new elements are not </li>
created. The the resulting dialog shows mesh information statistics <li>Check in the dialog box one of three radio buttons corresponding to
about the newly created 2D mesh elements. the type of operation you would like to perform.</li>
<li>Fill the other fields available in the dialog box.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button to perform the operation.</li>
</ol> </ol>
\n "Create boundary elements" dialog allows creation of boundary elements
of three types.
<ul>
<li><b>2D from 3D</b> creates mesh faces on free facets of volume elements</li>
<li><b>1D from 2D</b> creates mesh edges on free edges of mesh faces</li>
<li><b>1D from 3D</b> creates mesh edges on all borders of free facets of volume elements</li>
</ul>
Here a <em>free facet</em> means a facet shared by only one volume, a <em>free edge</em>
means an edge shared by only one mesh face.
In this dialog:
<ul>
<li>specify the <b>Mesh, submesh or group</b>, the boundary which of
will be analyzed.</li>
<li>specify the <b>Target</b> mesh, where the boundary elements will
be created.
<ul>
<li><b>This mesh</b> adds elements in the selected mesh or the mesh
the selected submesh or group belongs to.</li>
<li><b>New mesh</b> 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. </li>
</ul></li>
<li>activate <b>Copy source mesh</b> checkbox to copy 2D or 3D
elements (depending on the operation type), which belong to the analyzed
<b>Mesh, submesh or group</b> field, to the new mesh.</li>
<li>deactivate <b>Copy missing elements only</b> checkbox to copy
boundary elements already present in the analyzed mesh to the
new mesh.</li>
<li>activate <b>Create group</b> checkbox to create a group to which the
missing boundary elements are added. The new group appears
in the Object Browser with the name that you can change in the adjacent box. </li>
</ul>
<br><b>See Also</b> a sample TUI Script of a \ref tui_make_2dmesh_from_3d "Create boundary elements" operation.
*/ */

View File

@ -0,0 +1,29 @@
/*!
\page max_element_length_2d_page Element Diameter 2D
\n This quality control criterion consists of calculation of length of
the edges and diagonals combining the meshing elements (triangles and quadrangles)
of your mesh.
<em>To apply the Element Diameter 2D quality criterion to your mesh:</em>
<ol>
<li>Display your mesh in the viewer. </li>
<li>Choose <b>Controls > Face Controls > Element Diameter 2D</b> or click
<em>"Element Diameter 2D"</em> button in the toolbar.
\image html image42.png
<center><em>"Element Diameter 2D" button</em></center>
Your mesh will be displayed in the viewer with its elements colored according to the
applied mesh quality control criterion:
\image html max_element_length_2d.png
</li>
</ol>
<br><b>See Also</b> a sample TUI Script of a
\ref tui_max_element_length_2d "Element Diameter 2D quality control" operation.
*/

View File

@ -0,0 +1,30 @@
/*!
\page max_element_length_3d_page Element Diameter 3D
\n This quality control criterion consists of calculation of length of
the edges and diagonals combining the 3D meshing elements
(tetrahedrons, pyramids, pentahendrons, hexahedrons and polyhedrons)
of your mesh.
<em>To apply the Element Diameter 3D quality criterion to your mesh:</em>
<ol>
<li>Display your mesh in the viewer. </li>
<li>Choose <b>Controls > Volume Controls > Element Diameter 3D</b> or click
<em>"Element Diameter 3D"</em> button in the toolbar.
\image html image43.png
<center><em>"Element Diameter 3D" button</em></center>
Your mesh will be displayed in the viewer with its elements colored according to the
applied mesh quality control criterion:
\image html max_element_length_3d.png
</li>
</ol>
<br><b>See Also</b> a sample TUI Script of a
\ref tui_max_element_length_3d "Element Diameter 3D quality control" operation.
*/

View File

@ -0,0 +1,71 @@
/*!
\page measurements_page Measurements
Mesh module provides possibility to perform different measurements
of the selected mesh data.
All the measurement operations are available via \b Measurements
top-level menu. An access to the measurements operations is
implemented via single dialog box, where each operation is represented
as a separate tab page.
\section min_distance_anchor Minimum Distance
This operation allows measuring a distance between two objects.
Currently only node-to-node and node-to-origin operations are
available, but this operation will be extended in future to support
other mesh objects - elements, meshes, sub-meshes and groups.
To start <b>Minimum Distance</b> operation, select <b>Minimum Distance</b>
item from \b Measurements menu.
\image html min_distance.png
In the dialog box choose the first target and second target mode by
switching the corresponding radio buttons, then select the objects
between which the distance is to be calculated (or enter directly IDs
in case of nodes/elements) and press \em Compute button.
The following types of targets are supported:
- \em Node: single mesh node;
- \em Element: single mesh element (not available in this version);
- \em Object: mesh, sub-mesh or group object (not available in this
version);
- \em Origin: origin of the global co-ordinate system.
The result will
be shown in the bottom area of the dialog box. In addition, the simple
preview will be shown in the 3D viewer.
\image html min_distance_preview.png
\section bounding_box_anchor Bounding Box
This operation allows to calculate the bounding box of the selected
object(s).
To start <b>Bounding Box</b> operation, select <b>Bounding Box</b>
item from \b Measurements menu.
\image html bnd_box.png
In the dialog box choose desired type of the object by switching the
corresponding radio button, select the desired object(s) and press
\em Compute button.
The following types of input are available:
- \em Objects: select one or more mesh, sub-mesh, group objects;
- \em Nodes: select set of mesh nodes;
- \em Elements: select set of mesh elements.
The result of calculation will be shown in the bottom area of the
dialog box. In addition, the simple preview will be shown in the 3D
viewer.
\image html bnd_box_preview.png
<b>See Also</b> a sample TUI Script of a
\ref tui_measurements_page "Measurement operations".
*/

View File

@ -2,8 +2,9 @@
\page merging_nodes_page Merging nodes \page merging_nodes_page Merging nodes
\n This functionality allows user to detect groups of coincident nodes This functionality allows user to detect groups of coincident nodes
with desirable tolerance, edit these groups and merge. with specified tolerance; each group of the coincident nodes can be
then converted to the single node.
\image html mergenodes_ico.png "Merge nodes button" \image html mergenodes_ico.png "Merge nodes button"
@ -12,7 +13,7 @@ with desirable tolerance, edit these groups and merge.
<li>From the \b Modification choose \b Transformation and from its <li>From the \b Modification choose \b Transformation and from its
sub-menu select the <b>Merge nodes</b> item. The following dialog box sub-menu select the <b>Merge nodes</b> item. The following dialog box
shall appear:</li> shall appear:</li>
<br>
\image html mergenodes_auto.png \image html mergenodes_auto.png
<br> <br>
<ul> <ul>
@ -21,13 +22,16 @@ shall appear:</li>
processed. processed.
<li>\b Tolerance is a maximum distance between nodes sufficient for <li>\b Tolerance is a maximum distance between nodes sufficient for
merging.</li> merging.</li>
<li><b>Exclude Groups</b> group box allows to ignore the nodes which
belong to the specified mesh groups.
</ul> </ul>
<li><b>Automatic mode:</b> <li><b>Automatic mode:</b>
<br> <br>
<ul> <ul>
<li>In the \b Automatic Mode all Nodes within the indicated tolerance <li>In the \b Automatic Mode all Nodes within the indicated tolerance
will be merged.</li> will be merged. The nodes which belong to the groups specified in the
<b>Exclude Groups</b> will be not taken into account.</li>
</ul> </ul>
</li><br> </li><br>
<li>If the \b Manual Mode is selected, additional controls are available: <li>If the \b Manual Mode is selected, additional controls are available:
@ -44,8 +48,9 @@ viewer with pressed "Shift" key.</li>
<li><b>Select all</b> checkbox selects all groups.</li> <li><b>Select all</b> checkbox selects all groups.</li>
</ul> </ul>
<br>
\image html mergenodes.png \image html mergenodes.png
<br>
</li> </li>
<li><b>Edit selected group</b> list allows editing the selected <li><b>Edit selected group</b> list allows editing the selected
group: group:

View File

@ -1,62 +1,67 @@
/*! /*!
\page mesh_infos_page Mesh infos \page mesh_infos_page Mesh Information
\n There are three information boxes: <b>Standard Mesh The user can obtain an information about the selected mesh object
Infos</b>, <b>Advanced Mesh Infos</b> and <b> Mesh Element Info</b>. (mesh, sub-mesh or group) using <b>Mesh Information</b> dialog box.
<br> The <b>Mesh Information</b> dialog box provides two tab pages:
\anchor standard_mesh_infos_anchor - <b>Base Info</b> - to show base information about selected mesh
<h2>Standard Mesh Infos</h2> object
- <b>Element Info</b> - to show detail information about selected mesh
node or element.
The <b>Standard Mesh Infos</b> box gives only the information on the \anchor advanced_mesh_infos_anchor
number of elements of maximum dimension and the number of nodes in the <h2>Base Info</h2>
mesh. However, from this Info you can learn about groups selected on
this mesh. The <b>Base Info</b> tab page of the dialog box provides general
\n To view the <b>Standard Mesh Infos</b>, select your mesh or submesh information on the selected object - mesh, sub-mesh or mesh group:
in the <b>Object Browser</b> and select <b>Standard Mesh Infos</b> name, type, total number of nodes and elements separately for each
from the \b Mesh menu or click <em>"Standard Mesh Infos"</em> button type: 0D elements, edges, faces and volumes.
To view the <b>Mesh Information</b>, select your mesh, sub-mesh or
group in the <b>Object Browser</b> and invoke <b>Mesh Information</b>
item from the \b Mesh menu or click <em>"Mesh Information"</em> button
in the toolbar. in the toolbar.
\image html image49.png \image html image49.png
<center><em>"Standard Mesh Infos" button</em></center> <center><em>"Mesh Information" button</em></center>
The following information will be displayed:
\image html a-standmeshinfo.png
<br>
\anchor advanced_mesh_infos_anchor
<h2>Advanced Mesh Infos</h2>
The <b>Advanced Mesh Infos</b> box gives more information about the mesh,
including the total number of faces and volumes and their geometrical
types.
\n To view the <b>Advanced Mesh Infos</b>, select your mesh or submesh
in the <b>Object Browser</b> and select <b>Advanced Mesh Infos</b>
from the \b Mesh menu or click <em>"Advanced Mesh Infos"</em> button
in the toolbar.
\image html image50.gif
<center><em>"Advanced Mesh Infos" button</em></center>
The following information will be displayed: The following information will be displayed:
\image html advanced_mesh_infos.png \image html advanced_mesh_infos.png
<center><em>"Base Info" page</em></center>
<br>
\anchor mesh_element_info_anchor \anchor mesh_element_info_anchor
<h2>Mesh Element Info</h2> <h2>Mesh Element Information</h2>
The <b>Mesh Element Info</b> dialog box gives basic information about the type, coordinates and connectivity of the selected mesh node or element. The <b>Element Info</b> tab page of the dialog box gives basic
\n It is possible to input the Element ID or to select the Element in information about the type, coordinates and connectivity of the
the Viewer. selected mesh node or element.
To view the <b>Mesh Element Information</b>, select your mesh, sub-mesh or
group in the <b>Object Browser</b> and invoke <b>Mesh Element Information</b>
item from the \b Mesh menu or click <em>"Mesh Element Information"</em> button
in the toolbar.
\image html elem_info.png
<center><em>"Mesh Element Information" button</em></center>
The following information will be displayed:
\image html eleminfo1.png \image html eleminfo1.png
<center><em>"Element Info" page, node</em></center>
<br>
\image html eleminfo2.png \image html eleminfo2.png
<center><em>"Element Info" page, element</em></center>
In case you get Mesh Infos via a TUI script the information is displayed in Python Console. The use can either input the ID of a node or element he wants to
<b>See the</b> \ref tui_viewing_mesh_infos "TUI Example", analyze directly in the dialog box or select the node or element in
the 3D viewer.
In case you get <b>Mesh Information</b> via a TUI script, the information is
displayed in the Python Console.
<b>See the</b> \ref tui_viewing_mesh_infos "TUI Example".
*/ */

View File

@ -1,34 +1,37 @@
/*! /*!
\page mesh_through_point_page Mesh through point \page mesh_through_point_page Moving nodes
\n In mesh you can define a node at a certain point either by creation \n In mesh you can define a node at a certain point either
of a new node, by movement of the node closest to the point or by by movement of the node closest to the point or by
movement of any node to the point. movement of any node to the point.
<em>To create a mesh passing through a point:</em> <em>To displace a node:</em>
<ol> <ol>
<li>From the \b Modification menu choose the <b>Mesh through point</b> item or <li>From the \b Modification menu choose the <b>Move node</b> item or
click <em>"Mesh to pass through a point"</em> button in the toolbar. click <em>"Move Node"</em> button in the toolbar.
\image html mesh_node_to_point.png \image html image67.png
<center><em>"Mesh to pass through a point" button</em></center> <center><em>"Move Node" button</em></center>
The following dialog box shall appear: The following dialog box shall appear:
\image html meshtopass.png \image html meshtopass.png
</li> </li>
<li>Enter the coordinates of the point.</li> <li>Enter the coordinates of the destination point.</li>
<li>Choose one of several methods: you can either \b Create a new node at <li>Check in <b>Find closest to destination</b> option or
the indicated point or Move the existing node to the point. In the select the necessary node manually (X, Y, Z, dX, dY, dZ fields allow
latter case you can check in <b>Automatic search</b> of the closest node or to see original coordinates and displacement of the node to move).
select the necessary node manually. \b Preview check-box allows to see \b Preview check-box allows to see the results of the operation.</li>
the results of the operation.</li> <li>Click the \b Apply or <b>Apply and Close</b> button.</li>
<li>Click the \b Apply or \b OK button.</li>
</ol> </ol>
\image html moving_nodes1.png "The initial mesh"
\image html moving_nodes2.png "The modified mesh"
<br><b>See Also</b> a sample TUI Script of a <br><b>See Also</b> a sample TUI Script of a
\ref tui_mesh_through_point "Mesh through point" operation. \ref tui_moving_nodes "Moving Nodes" operation.
*/ */

View File

@ -10,7 +10,8 @@ element (triangle or quadrangle).
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Minimum angle</b> or click <em>"Minimum Angle"</em> button. <li>Choose <b>Controls > Face Controls > Minimum angle</b> or click
<em>"Minimum Angle"</em> button.
\image html image38.png \image html image38.png
<center><em>"Minimum Angle" button</em></center> <center><em>"Minimum Angle" button</em></center>

View File

@ -18,7 +18,9 @@ elements of the mesh.</li>
its elements.</li> its elements.</li>
<li>\subpage rotation_page "Rotate" by the indicated axis and angle <li>\subpage rotation_page "Rotate" by the indicated axis and angle
the mesh or some of its elements.</li> the mesh or some of its elements.</li>
<li>\subpage scale_page "Scale Transform" the mesh or some of its elements.</li> <li>\subpage scale_page "Scale Transform" the mesh or some of its
elements.</li>
<li>\subpage double_nodes_page "Duplicate nodes".</li>
<li>Create a \subpage symmetry_page "symmetrical copy" of the mesh <li>Create a \subpage symmetry_page "symmetrical copy" of the mesh
through a point or a vector of symmetry.</li> through a point or a vector of symmetry.</li>
<li>Unite meshes by \subpage sewing_meshes_page "sewing" free borders, <li>Unite meshes by \subpage sewing_meshes_page "sewing" free borders,
@ -27,10 +29,8 @@ conform free borders, border to side or side elements.</li>
within the indicated tolerance.</li> within the indicated tolerance.</li>
<li>\subpage merging_elements_page "Merge Elements", considered coincident <li>\subpage merging_elements_page "Merge Elements", considered coincident
within the indicated tolerance.</li> within the indicated tolerance.</li>
<li>\subpage moving_nodes_page "Move Nodes" to an arbitrary location <li>\subpage mesh_through_point_page "Move Nodes" to an arbitrary location
with consequent transformation of all adjacent elements and edges.</li> with consequent transformation of all adjacent elements and edges.</li>
<li>\subpage mesh_through_point_page "Make node at a point", existing
or created anew.</li>
<li>\subpage diagonal_inversion_of_elements_page "Invert an edge" between neighboring triangles.</li> <li>\subpage diagonal_inversion_of_elements_page "Invert an edge" between neighboring triangles.</li>
<li>\subpage uniting_two_triangles_page "Unite two triangles".</li> <li>\subpage uniting_two_triangles_page "Unite two triangles".</li>
<li>\subpage uniting_set_of_triangles_page "Unite several adjacent triangles".</li> <li>\subpage uniting_set_of_triangles_page "Unite several adjacent triangles".</li>
@ -47,8 +47,7 @@ of the selected node or edge.</li>
<li>Apply \subpage pattern_mapping_page "pattern mapping".</li> <li>Apply \subpage pattern_mapping_page "pattern mapping".</li>
<li>\subpage convert_to_from_quadratic_mesh_page "Convert regular mesh to quadratic", <li>\subpage convert_to_from_quadratic_mesh_page "Convert regular mesh to quadratic",
or vice versa.</li> or vice versa.</li>
<li>\subpage make_2dmesh_from_3d_page "Create 2D mesh from 3D".</li> <li>\subpage make_2dmesh_from_3d_page "Generate boundary elements".</li>
</ul> </ul>
\note It is possible to use the variables defined in the SALOME \b NoteBook \note It is possible to use the variables defined in the SALOME \b NoteBook

View File

@ -1,36 +0,0 @@
/*!
\page moving_nodes_page Moving nodes
\n In MESH you can change the location of any node of your mesh. In
this case all adjacent elements (edges) will be also transformed right
after the displaced node.
<em>To displace a node:</em>
<ol>
<li>From the \b Modification menu choose the <b>Move node</b> item or
click <em>"Move Node"</em> button in the toolbar.
\image html image67.png
<center><em>"Move Node" button</em></center>
The following dialog box shall appear:
\image html movenodes.png
</li>
<li>Enter the ID of the required node in the <b>Node ID</b> field or
select this node in the 3D viewer. The coordinates of your node will
be automatically displayed in the \b Coordinates set of fields.</li>
<li>Set new coordinates for your node in the \b Coordinates set of fields.</li>
<li>Click the \b Apply or <b>Apply and Close</b> button.</li>
</ol>
\image html moving_nodes1.png "The initial mesh"
\image html moving_nodes2.png "The node has been moved, transforming all adjacent edges"
<br><b>See Also</b> a sample TUI Script of a
\ref tui_moving_nodes "Moving Nodes" operation.
*/

View File

@ -5,11 +5,9 @@
<b>Netgen 2D</b> and <b>Netgen 3D</b> hypotheses work only with <b>Netgen 1D-2D</b> and <b>Netgen 2D</b> and <b>Netgen 3D</b> hypotheses work only with <b>Netgen 1D-2D</b> and
<b>Netgen 1D-2D-3D</b> algorithms. These algorithms do not require <b>Netgen 1D-2D-3D</b> algorithms. These algorithms do not require
definition of lower-level hypotheses and algorithms (2D and 1D for definition of lower-level hypotheses and algorithms (2D and 1D for
meshing 3D objects and 1D for meshing 2D objects). They prove to be meshing 3D objects and 1D for meshing 2D objects).
useful if lower-level meshing is homogeneous for all wires and faces
of the meshed object.
\image html netgen2d.png \image html netgen2d3d.png
- <b>Name</b> - allows to define the name for the algorithm (Netgen - <b>Name</b> - allows to define the name for the algorithm (Netgen
2D (or 3D) Parameters by default). 2D (or 3D) Parameters by default).
@ -32,7 +30,18 @@ not possible.
- <b>Optimize</b> - if this box is checked in, the algorithm will try to - <b>Optimize</b> - if this box is checked in, the algorithm will try to
create regular (possessing even sides) elements. create regular (possessing even sides) elements.
\image html netgen3d_simple.png \image html netgen3d_local_size.png
- <b>Local sizes</b> - allows to define size of elements on and
around specified geometrical edges and vertices. To define the local
size it is necessary to select a geometrical edge or vertex in the
object browser or in the viewer, and to click <b>On Edge</b> or <b>On
Vertex</b> correspondingly. <b>Name</b> of the geometrical object and
a default <b>Value</b> will be added in the table where the
<b>Value</b> can be changed.
- <b>Remove</b> - deletes a selected row from the table.
\image html netgen2d3d_simple.png
<b>Netgen 2D simple parameters</b> and <b>Netgen 3D simple <b>Netgen 2D simple parameters</b> and <b>Netgen 3D simple
parameters</b> allow defining the size of elements for each parameters</b> allow defining the size of elements for each
@ -42,8 +51,8 @@ dimension.
- <b>Number of Segments</b> has the same sense as \ref - <b>Number of Segments</b> has the same sense as \ref
number_of_segments_anchor "Number of segments" hypothesis with number_of_segments_anchor "Number of segments" hypothesis with
equidistant distribution. equidistant distribution.
- <b>Average Length</b> has the same sense as \ref - <b>Local Length</b> has the same sense as \ref
average_length_anchor "Average Length" hypothesis. average_length_anchor "Local Length" hypothesis.
\b 2D group allows defining the size of 2D elements \b 2D group allows defining the size of 2D elements
- <b>Length from edges</b> if checked in, acts like \ref - <b>Length from edges</b> if checked in, acts like \ref

View File

@ -5,33 +5,31 @@
<br><h2>About patterns</h2> <br><h2>About patterns</h2>
The pattern describes a mesh to generate: positions of nodes within a The pattern describes a mesh to generate: positions of nodes within a
geometrical domain and nodal connectivity of elements. As well, a geometrical domain and nodal connectivity of elements. A
pattern specifies the so-called key-points, i.e. nodes that will be pattern also specifies the so-called key-points, i.e. the nodes that will be
located at geometrical vertices. Pattern description is stored in located at geometrical vertices. The pattern description is stored in
\<pattern_name\>.smp file. \<pattern_name\>.smp file.
The smp file contains 4 sections: The smp file contains 4 sections:
-# The first line holds the total number of the pattern nodes (N). -# The first line indicates the total number of pattern nodes (N).
-# The next N lines describe nodes coordinates. Each line holds 2 -# The next N lines describe nodes coordinates. Each line contains 2
coordinates of a node for 2D pattern or 3 cordinates for 3D pattern. node coordinates for a 2D pattern or 3 node cordinates for a 3D pattern.
Note, that for 3D pattern only relateive values in range [0;1] are Note, that node coordinates of a 3D pattern can be defined only by relative values in range [0;1].
valid for coordinates of the nodes. -# The key-points line contains the indices of the nodes to be mapped on geometrical
-# A key-points line: indices of nodes to be mapped on geometrical vertices (for a 2D pattern only). Index n refers to the node described
vertices (for 2D pattern only). An index n refers to a node described on the n-th line of section 2. The index of the first node zero. For a 3D pattern the key points are not specified.
on an n-th line of section 2. The first node index is zero. For 3D -# The remaining lines describe nodal connectivity of elements, one line
pattern key points are not specified. for each element. Each line holds indices of nodes forming an element.
-# The rest lines describe nodal connectivity of elements, one line Index n refers to the node described on the n-th line of section 2.
for an element. A line holds indices of nodes forming an element. An The first node index is zero. There must be 3 or 4 indices on each
index n refers to a node described on an n-th line of the section line for a 2D pattern (only 2d elements are allowed) and 4, 5, 6 or 8
2. The first node index is zero. There must be 3 or 4 indices on a indices for a 3D pattern (only 3d elements are allowed).
line for 2D pattern (only 2d elements are allowed) and 4, 5, 6 or 8
indices for 3D pattern (only 3d elements are allowed).
The 2D pattern must contain at least one element and at least one A 2D pattern must contain at least one element and at least one
key-point. All key-points must lay on boundaries. key-point. All key-points must lie on boundaries.
The 3D pattern must contain at least one element. A 3D pattern must contain at least one element.
An example of a simple 2D pattern smp file: An example of a simple 2D pattern smp file:
@ -60,7 +58,7 @@ An example of a simple 2D pattern smp file:
8 1 2 8 1 2
\endcode \endcode
The image below provides a preview of above described pattern: The image below provides a preview of the above pattern:
\image html pattern2d.png \image html pattern2d.png
@ -99,91 +97,120 @@ From the \b Modification menu choose the <b>Pattern Mapping</b> item or click
\image html image98.png \image html image98.png
<center><em>"Pattern mapping" button</em></center> <center><em>"Pattern mapping" button</em></center>
The following dialog box shall appear: The following dialog box will appear:
\n For a <b>2D pattern</b>
\image html patternmapping1.png \image html patternmapping1.png
<center><b> 2D Pattern Mapping dialog box</b></center> In this dialog you should specify:
<ul>
<li> \b Pattern, which can be loaded from .smp pattern file previously
created manually or generated automatically from an existing mesh or submesh.</li>
<li> \b 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;</li>
<li> \b Vertex to which the first key-point should be mapped;</li>
Alternatively, it is possible to select <b>Refine selected mesh elements</b>
checkbox and apply the pattern to
<li> <b>Mesh Face</b> instead of a geometric Face</li>
<li> and select \b Node instead of vertex.</li>
Additionally it is possible to:
<li> <b>Reverse the order of key-points</b> By default, the vertices of
a face are ordered counterclockwise.<li>
<li> Enable to <b> Create polygons near boundary</b> </li>
<li> and <b>Create polyhedrons near boundary</b><li>
</ul>
\n For a <b>3D pattern</b>
\image html patternmapping2.png \image html patternmapping2.png
<center><b> 3D Pattern Mapping dialog box</b></center> In this dialog you should specify:
<ul>
<li> \b Pattern, which can be loaded from .smp pattern file previously
created manually or generated automatically from an existing mesh or submesh.</li>
<li> A 3D block (Solid) object;</li>
<li> Two vertices that specify the order of nodes in the resulting mesh.</li>
Alternatively, it is possible to select <b>Refine selected mesh elements</b>
checkbox and apply the pattern to
<li> One or several <b>Mesh volumes</b> instead of a geometric 3D
object</li>
<li> and select two /b Nodes instead of vertices.</li>
Additionally it is possible to:
<li> Enable to <b> Create polygons near boundary</b> </li>
<li> and <b>Create polyhedrons near boundary</b><li>
</ul>
To apply a pattern to a geometrical object, you should specify: \n Automatic Generation
-# For 2D pattern To generate a pattern automatically from an existing mesh or submesh,
- A face having the number of vertices equal to the number of click \b New button.
key-points in the pattern; the number of key-points on internal
boundaries of a pattern must also be equal to the number of vertices
on internal boundaries of a face;
- A vertex to which the first key-point should be mapped;
- Reverse or not the order of key-points. (The order of vertices of
a face is counterclockwise looking from outside).
-# For 3D pattern
- 3D block (Solid) object;
- Two vertices that specify the order of nodes in the resulting
mesh.
Then you either load a .smp pattern file previously created manually The following dialog box will appear:
by clicking on the <em>"Load pattern"</em> button, or click on the \b
New button for automatic generation of the pattern.
For an automatic generation you just specify a geometrical face (for
2D) or solid (for 3d) having a mesh built on it. Mesh nodes lying on
face vertices become key-points of 2D pattern. Additionally, for 2D
pattern you may choose the way of getting nodes coordinates by
<b>projecting nodes on the face</b> instead of using
"positions on face" generated by mesher (if there is any). Faces
having a seam edge can't be used for automatic pattern creation.
When creating a pattern from an existing mesh, there are two possible
cases:
- A sub-mesh on face/solid is selected. A pattern is created from the 2d/3d
elements bound to a face/solid by mesher. For 2D pattern, node coordinates are either
"positions on face" computed by mesher, or coordinates got by node
projection on a geometrical surface, according to the user choice. For
3D pattern, nodes coordinates correspond to the nodes computed by mesher.
- A mesh where the main shape is a face/solid, is selected. A pattern is
created from all the 2d/3d elements in a mesh. In addition, for 2D
pattern, if all mesh elements are build by mesher, the user can select
the way of getting nodes coordinates, else all nodes are projected on
a face surface.
\image html a-patterntype.png
<center><b> 2D Pattern Creation dialog box</b></center>
\image html a-patterntype1.png \image html a-patterntype1.png
<center><b> 3D Pattern Creation dialog box</b></center> In this dialog you should specify:
<ul>
<li> <b>Mesh or Submesh</b>, which is a meshed geometrical face (for a
2D pattern) or a meshed solid (for a 3D pattern). Mesh nodes lying on
the face vertices become key-points of the pattern. </li>
<li> A custom <b>Pattern Name </b> </li>
<li>Additionally, for a 2D pattern you may choose to
<b>Project nodes on the face</b> 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.</li>
</ul>
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.
<br><h2>Mapping algorithm</h2> <br><h2>Mapping algorithm</h2>
The mapping algorithm for 2D case is as follows: The mapping algorithm for a 2D case is as follows:
- Key-points are set in the order that they are encountered when - The key-points are set counterclockwise in the order corresponding
walking along a pattern boundary so that elements are on the left. The to their location on the pattern boundary. The first key-point is preserved.
first key-point is preserved. - The geometrical vertices corresponding to the key-points are found
- Find geometrical vertices corresponding to key-points by vertices on face boundary. Here, "Reverse order of key-points" flag is set.
order in a face boundary; here, "Reverse order of key-points" flag is \image html image95.gif
taken into account. \image html image95.gif - The boundary nodes of the pattern are mapped onto the edges of the face: a
- Boundary nodes of a pattern are mapped onto edges of a face: a node located between two key-points on the pattern boundary is
node located between certain key-points on a pattern boundary is mapped on the geometrical edge limited by the corresponding geometrical
mapped on a geometrical edge limited by corresponding geometrical vertices. The node position on the edge depends on its distance from the
vertices. Node position on an edge reflects its distance from two key-points.
key-points. \image html image96.gif \image html image96.gif
- Coordinates of a non-boundary node in a parametric space of a face - The cordinates of a non-boundary node in the parametric space of the face
are defined as following. In a parametric space of a pattern, a node are defined in the following way. In the parametric space of the
lays at the intersection of two iso-lines, each of which intersects a pattern, the node lies at the intersection of two iso-lines. Both
pattern boundary at least at two points. Knowing mapped positions of of them intersect the pattern boundary at two
boundary nodes, we find where isoline-boundary intersection points are points at least. If the mapped positions of boundary nodes are known, it is
mapped to, and hence we can find mapped isolines direction and then, possible to find, where the points at the intersection of isolines
two node positions on two mapped isolines. The eventual mapped and boundaries are mapped. Then it is possible to find
position of a node is found as an average of positions on mapped the direction of mapped isolinesection and, filally, the poitions of
isolines. \image html image97.gif two nodes on two mapped isolines. The eventual mapped
position of the node is found as an average of the positions on mapped
isolines.
\image html image97.gif
For 3D case the algorithm is similar. The 3D algorithm is similar.
<b>See Also</b> a sample TUI Script of a <b>See Also</b> a sample TUI Script of a
\ref tui_pattern_mapping "Pattern Mapping" operation. \ref tui_pattern_mapping "Pattern Mapping" operation.

View File

@ -6,6 +6,7 @@
<ul> <ul>
<li>\ref removing_nodes_anchor "Nodes"</li> <li>\ref removing_nodes_anchor "Nodes"</li>
<li>\ref removing_orphan_nodes_anchor "Orphan Nodes"</li>
<li>\ref removing_elements_anchor "Elements"</li> <li>\ref removing_elements_anchor "Elements"</li>
<li>\ref clear_mesh_anchor "Clear Mesh Data"</li> <li>\ref clear_mesh_anchor "Clear Mesh Data"</li>
</ul> </ul>
@ -18,11 +19,11 @@
<ol> <ol>
<li>Select your mesh in the Object Browser or in the 3D viewer.</li> <li>Select your mesh in the Object Browser or in the 3D viewer.</li>
<li>From the Modification menu choose Remove and from the associated <li>From the <em>Modification</em> menu choose <em>Remove</em> and from the associated
submenu select the Remove nodes, or just click <em>"Remove nodes"</em> submenu select the <em>Nodes</em>, or just click <em>"Remove nodes"</em>
button in the toolbar. button in the toolbar.
\image html image88.gif \image html remove_nodes_icon.png
<center><em>"Remove nodes" button</em></center> <center><em>"Remove nodes" button</em></center>
The following dialog box will appear: The following dialog box will appear:
@ -46,6 +47,30 @@ about filters in the \ref selection_filter_library_page "Selection filter librar
\note Be careful while removing nodes because if you remove a definite \note Be careful while removing nodes because if you remove a definite
node of your mesh all adjacent elements will be also deleted. node of your mesh all adjacent elements will be also deleted.
<br>
\anchor removing_orphan_nodes_anchor
<h2>Removing orphan nodes</h2>
There is a quick way to remove all orphan (free) nodes.
<em>To remove orphan nodes:</em>
<ol>
<li>Select your mesh in the Object Browser or in the 3D viewer.</li>
<li>From the <em>Modification</em> menu choose <em>Remove</em> and from the associated
submenu select <em>Orphan Nodes</em>, or just click <em>"Remove orphan nodes"</em>
button in the toolbar.
\image html remove_orphan_nodes_icon.png
<center><em>"Remove orphan nodes" button</em></center>
The following Warning message box will appear:
\image html removeorphannodes.png
Confirm nodes removal by pressing "Yes" button.
</ol>
<br> <br>
\anchor removing_elements_anchor \anchor removing_elements_anchor
<h2>Removing elements</h2> <h2>Removing elements</h2>
@ -54,8 +79,8 @@ node of your mesh all adjacent elements will be also deleted.
<ol> <ol>
<li>Select your mesh in the Object Browser or in the 3D viewer.</li> <li>Select your mesh in the Object Browser or in the 3D viewer.</li>
<li>From the \b Modification menu choose \b Remove and from the <li>From the <em>Modification</em> menu choose <em>Remove</em> and from the
associated submenu select the Remove elements, or just click associated submenu select the <em>Elements</em>, or just click
<em>"Remove elements"</em> button in the toolbar. <em>"Remove elements"</em> button in the toolbar.
\image html remove_elements_icon.png \image html remove_elements_icon.png
@ -94,7 +119,7 @@ about filters in the \ref selection_filter_library_page "Selection filter librar
<li>From the Modification menu choose Remove and from the associated <li>From the Modification menu choose Remove and from the associated
submenu select the Clear Mesh Data, or just click <em>"Clear Mesh Data"</em> submenu select the Clear Mesh Data, or just click <em>"Clear Mesh Data"</em>
button in the toolbar. You can also right-click on the mesh in the 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. Object Browser and select Clear Mesh Data in the pop-up menu.</li>
</ol> </ol>
\image html mesh_clear.png \image html mesh_clear.png

View File

@ -156,6 +156,17 @@ See also a
length, which is more, less or equal (within a given <b>Tolerance</b>) to the predefined length, which is more, less or equal (within a given <b>Tolerance</b>) to the predefined
<b>Threshold Value</b>. See also a <b>Threshold Value</b>. See also a
\ref length_2d_page "Length 2D quality control". \ref length_2d_page "Length 2D quality control".
</li><li>
<b>Coplanar faces</b> selects mesh faces neighboring the one selected
by ID in <b>Threshold Value</b> 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.<br>
</li><li>
<b>Element Diameter 2D</b> selects triangles and quadrangles combining of the edges and
diagonals with a value of length, which is more, less or equal
(within a given <b>Tolerance</b>) to the predefined <b>Threshold Value</b>. See also a
\ref max_element_length_2d_page "Element Diameter 2D quality control".
</li> </li>
</ul> </ul>
@ -169,6 +180,11 @@ Additional criteria to select mesh <b>Volumes</b> are the following:
\ref volume_page "Volume quality control"), which is more, less or equal (within a given \ref volume_page "Volume quality control"), which is more, less or equal (within a given
<b>Tolerance</b>) to the predefined <b>Threshold Value</b>. <b>Tolerance</b>) to the predefined <b>Threshold Value</b>.
</li><li> </li><li>
<b>Element Diameter 3D</b> selects 3D mesh elements combining of the edges and
diagonals with a value of length, which is more, less or equal
(within a given <b>Tolerance</b>) to the predefined <b>Threshold Value</b>. See also a
\ref max_element_length_3d_page "Element Diameter 3D quality control".
</li><li>
<b>Bad oriented volume</b> selects mesh volumes, which are incorrectly oriented from <b>Bad oriented volume</b> selects mesh volumes, which are incorrectly oriented from
the point of view of MED convention. the point of view of MED convention.
</li> </li>

View File

@ -14,7 +14,8 @@ criterion can be applied to elements composed of 4 and 3 nodes
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Skew</b> or click <em>"Skew"</em> button of the toolbar. <li>Choose <b>Controls > Face Controls > Skew</b> or click
<em>"Skew"</em> button of the toolbar.
\image html image40.png \image html image40.png
<center><em>"Skew" button </em></center> <center><em>"Skew" button </em></center>

View File

@ -133,9 +133,11 @@ the following links:
- \subpage tui_viewing_meshes_page - \subpage tui_viewing_meshes_page
- \subpage tui_defining_hypotheses_page - \subpage tui_defining_hypotheses_page
- \subpage tui_quality_controls_page - \subpage tui_quality_controls_page
- \subpage tui_filters_page
- \subpage tui_grouping_elements_page - \subpage tui_grouping_elements_page
- \subpage tui_modifying_meshes_page - \subpage tui_modifying_meshes_page
- \subpage tui_transforming_meshes_page - \subpage tui_transforming_meshes_page
- \subpage tui_notebook_smesh_page - \subpage tui_notebook_smesh_page
- \subpage tui_measurements_page
*/ */

View File

@ -0,0 +1,14 @@
/*!
\page smeshpypkg_page Programming Interface of the SMESH python package
Sorry, but the documentation is not available yet in doxygen format.
Fortunately, a documentation exists in restructured format and then
can be generated here using sphinx, in the expectative of the doxygen
version.
Please refer to this <a href="../../tui/SMESH/docutils/index.html">
documentation of the SMESH python packages</a>.
*/

View File

@ -37,7 +37,7 @@ volumes of the currently displayed mesh or submesh.</li>
<li>\b Split hexahedron <li>\b Split hexahedron
<ul> <ul>
<li><b>Into 5 tetrahedra</b> and <b>Into 6 tetrahedra</b> allows to <li><b>Into 5 tetrahedra</b>, <b>Into 5 tetrahedra</b> and <b>Into 24 tetrahedra</b> allows to
specify the number of tetrahedra a hexahedron will be split into. If the specified method does specify the number of tetrahedra a hexahedron will be split into. If the specified method does
not allow to get a conform mesh, a generic solution is applied: an additional node 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.</li> 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.</li>

View File

@ -13,8 +13,8 @@ for elements consisting of 4 nodes.
<ol> <ol>
<li>Display your mesh in the viewer.</li> <li>Display your mesh in the viewer.</li>
<li>Choose <b>Controls > Taper</b> or click <em>"Taper"</em> button in <li>Choose <b>Controls > Face Controls > Taper</b> or click
the toolbar. <em>"Taper"</em> button in the toolbar.
\image html image36.png \image html image36.png
<center><em>"Taper" button</em></center> <center><em>"Taper" button</em></center>

View File

@ -128,7 +128,7 @@ hexa.Compute()
<br> <br>
\anchor tui_average_length \anchor tui_average_length
<h3>Average Length</h3> <h3>Local Length</h3>
\code \code
from geompy import * from geompy import *
@ -549,11 +549,10 @@ mesh.Compute()
\endcode \endcode
\anchor tui_quadrangle_parameters \anchor tui_quadrangle_parameters
<h2>Quadrangle Parameters example </h2> <h2>Quadrangle Parameters example 1 (meshing a face with 3 edges) </h2>
\code \code
import geompy from smesh import *
import smesh SetCurrentStudy(salome.myStudy)
import StdMeshers
# Get 1/4 part from the disk face. # Get 1/4 part from the disk face.
Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100) Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
@ -566,17 +565,112 @@ geompy.addToStudy( Common_1, "Common_1" )
# Set the Geometry for meshing # Set the Geometry for meshing
Mesh_1 = smesh.Mesh(Common_1) Mesh_1 = smesh.Mesh(Common_1)
# Create Quadrangle parameters and define the Base Vertex.
Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
Quadrangle_Parameters_1.SetTriaVertex( 8 )
# Define 1D hypothesis and cmpute the mesh # Define 1D hypothesis and compute the mesh
Regular_1D = Mesh_1.Segment() Regular_1D = Mesh_1.Segment()
Nb_Segments_1 = Regular_1D.NumberOfSegments(10) Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
Nb_Segments_1.SetDistrType( 0 ) Nb_Segments_1.SetDistrType( 0 )
# Create Quadrangle parameters and define the Base Vertex.
Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( 8 )
Mesh_1.Compute()
\endcode
<h2>Quadrangle Parameters example 2 (using different types) </h2>
\code
import geompy
import smesh
import StdMeshers
# Make quadrangle face and explode it on edges.
Vertex_1 = geompy.MakeVertex(0, 0, 0)
Vertex_2 = geompy.MakeVertex(40, 0, 0)
Vertex_3 = geompy.MakeVertex(40, 30, 0)
Vertex_4 = geompy.MakeVertex(0, 30, 0)
Quadrangle_Face_1 = geompy.MakeQuad4Vertices(Vertex_1, Vertex_4, Vertex_3, Vertex_2)
[Edge_1,Edge_2,Edge_3,Edge_4] = geompy.SubShapeAllSorted(Quadrangle_Face_1, geompy.ShapeType["EDGE"])
geompy.addToStudy( Vertex_1, "Vertex_1" )
geompy.addToStudy( Vertex_2, "Vertex_2" )
geompy.addToStudy( Vertex_3, "Vertex_3" )
geompy.addToStudy( Vertex_4, "Vertex_4" )
geompy.addToStudy( Quadrangle_Face_1, "Quadrangle Face_1" )
geompy.addToStudyInFather( Quadrangle_Face_1, Edge_2, "Edge_2" )
# Set the Geometry for meshing
Mesh_1 = smesh.Mesh(Quadrangle_Face_1)
# Create Quadrangle parameters and
# define the Type as Quadrangle Preference
Quadrangle_Parameters_1 = smesh.CreateHypothesis('QuadrangleParams')
Quadrangle_Parameters_1.SetQuadType( StdMeshers.QUAD_QUADRANGLE_PREF )
# Define other hypotheses and algorithms
Regular_1D = Mesh_1.Segment()
Nb_Segments_1 = Regular_1D.NumberOfSegments(4)
Nb_Segments_1.SetDistrType( 0 )
status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1) status = Mesh_1.AddHypothesis(Quadrangle_Parameters_1)
Quadrangle_2D = Mesh_1.Quadrangle() Quadrangle_2D = Mesh_1.Quadrangle()
Mesh_1.Compute()
# Define submesh on one edge to provide different number of segments
Regular_1D_1 = Mesh_1.Segment(geom=Edge_2)
Nb_Segments_2 = Regular_1D_1.NumberOfSegments(10)
Nb_Segments_2.SetDistrType( 0 )
SubMesh_1 = Regular_1D_1.GetSubMesh()
# Compute mesh (with Quadrangle Preference type)
isDone = Mesh_1.Compute()
# Change type to Reduced and compute again
Quadrangle_Parameters_1.SetQuadType( StdMeshers.QUAD_REDUCED )
isDone = Mesh_1.Compute()
\endcode
\anchor tui_import
<h2>"Use Existing Elements" example </h2>
\code
from smesh import *
SetCurrentStudy(salome.myStudy)
# Make a patritioned box
box = geompy.MakeBoxDXDYDZ(100,100,100)
N = geompy.MakeVectorDXDYDZ( 1,0,0 )
O = geompy.MakeVertex( 50,0,0 )
plane = geompy.MakePlane( O, N, 200 ) # plane YOZ
shape2boxes = geompy.MakeHalfPartition( box, plane )
boxes = geompy.SubShapeAllSorted(shape2boxes, geompy.ShapeType["SOLID"])
geompy.addToStudy( boxes[0], "boxes[0]")
geompy.addToStudy( boxes[1], "boxes[1]")
midFace0 = geompy.SubShapeAllSorted(boxes[0], geompy.ShapeType["FACE"])[5]
geompy.addToStudyInFather( boxes[0], midFace0, "middle Face")
midFace1 = geompy.SubShapeAllSorted(boxes[1], geompy.ShapeType["FACE"])[0]
geompy.addToStudyInFather( boxes[1], midFace1, "middle Face")
# Mesh one of boxes with quadrangles. It is a source mesh
srcMesh = Mesh(boxes[0], "source mesh") # box coloser to CS origin
nSeg1 = srcMesh.Segment().NumberOfSegments(4)
srcMesh.Quadrangle()
srcMesh.Compute()
srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", FACE )
# Import faces from midFace0 to the target mesh
tgtMesh = Mesh(boxes[1], "target mesh")
importAlgo = tgtMesh.UseExisting2DElements(midFace1)
import2hyp = importAlgo.SourceFaces( [srcFaceGroup] )
tgtMesh.Segment().NumberOfSegments(3)
tgtMesh.Quadrangle()
tgtMesh.Compute()
# Import the whole source mesh with groups
import2hyp.SetCopySourceMesh(True,True)
tgtMesh.Compute()
\endcode \endcode
\n Other meshing algorithms: \n Other meshing algorithms:

View File

@ -0,0 +1,594 @@
/*!
\page tui_filters_page Filters usage
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 object, control
mesh quality by different parameters, etc.
Several filters can be combined together by using logical operators \a
AND and \a OR. In addition, applied filter criterion can be reverted
using logical operator \a NOT.
Mesh filters 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.
\sa \ref tui_quality_controls_page
\section filter_aspect_ratio Aspect ratio
Filter 2D mesh elements (faces) according to the aspect ratio value:
- element type should be \a smesh.FACE
- functor type should be \a smesh.FT_AspectRatio
- threshold is floating point value (aspect ratio)
\code
# create mesh
from SMESH_mechanic import *
# get faces with aspect ratio > 6.5
filter = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, 6.5)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with aspect ratio > 6.5:", len(ids)
\endcode
\sa \ref tui_aspect_ratio
\section filter_aspect_ratio_3d Aspect ratio 3D
Filter 3D mesh elements (volumes) according to the aspect ratio value:
- element type is \a smesh.VOLUME
- functor type is \a smesh.FT_AspectRatio3D
- threshold is floating point value (aspect ratio)
\code
# create mesh with volumes
from SMESH_mechanic import *
mesh.Tetrahedron( algo=smesh.NETGEN )
mesh.Compute()
# get volumes with aspect ratio < 2.0
filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_AspectRatio3D, smesh.FT_LessThan, 2.0)
ids = mesh.GetIdsFromFilter(filter)
print "Number of volumes with aspect ratio < 2.0:", len(ids)
\endcode
\sa \ref tui_aspect_ratio_3d
\section filter_warping_angle Warping angle
Filter 2D mesh elements (faces) according to the warping angle value:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_Warping
- threshold is floating point value (warping angle)
\code
# create mesh
from SMESH_mechanic import *
# get faces with warping angle = 2.0e-13 with tolerance 5.0e-14
criterion = smesh.GetCriterion(smesh.FACE, smesh.FT_Warping, smesh.FT_EqualTo, 2.0e-13)
criterion.Tolerance = 5.0e-14
filter = smesh.CreateFilterManager().CreateFilter()
filter.SetCriteria([criterion])
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with warping angle = 2.0e-13 (tolerance 5.0e-14):", len(ids)
\endcode
\sa \ref tui_warping
\section filter_minimum_angle Minimum angle
Filter 2D mesh elements (faces) according to the minimum angle value:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_MinimumAngle
- threshold is floating point value (minimum angle)
\code
# create mesh
from SMESH_mechanic import *
# get faces with minimum angle > 75
filter = smesh.GetFilter(smesh.FACE, smesh.FT_MinimumAngle, smesh.FT_MoreThan, 75)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with minimum angle > 75:", len(ids)
\endcode
\sa \ref tui_minimum_angle
\section filter_taper Taper
Filter 2D mesh elements (faces) according to the taper value:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_Taper
- threshold is floating point value (taper)
\code
# create mesh
from SMESH_mechanic import *
# get faces with taper < 1.e-15
filter = smesh.GetFilter(smesh.FACE, smesh.FT_Taper, smesh.FT_LessThan, 1.e-15)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with taper < 1.e-15:", len(ids)
\endcode
\sa \ref tui_taper
\section filter_skew Skew
Filter 2D mesh elements (faces) according to the skew value:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_Skew
- threshold is floating point value (skew)
\code
# create mesh
from SMESH_mechanic import *
# get faces with skew > 50
filter = smesh.GetFilter(smesh.FACE, smesh.FT_Skew, smesh.FT_MoreThan, 50)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with skew > 50:", len(ids)
\endcode
\sa \ref tui_skew
\section filter_area Area
Filter 2D mesh elements (faces) according to the area value:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_Area
- threshold is floating point value (area)
\code
# create mesh
from SMESH_mechanic import *
# get faces with area > 60 and < 90
criterion1 = smesh.GetCriterion(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, 60,\
smesh.FT_Undefined, smesh.FT_LogicalAND)
criterion2 = smesh.GetCriterion(smesh.FACE, smesh.FT_Area, smesh.FT_LessThan, 90)
filter = smesh.CreateFilterManager().CreateFilter()
filter.SetCriteria([criterion1,criterion2])
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with area in range (60,90):", len(ids)
\endcode
\sa \ref tui_area
\section filter_volume Volume
Filter 3D mesh elements (volumes) according to the volume value:
- element type is \a smesh.VOLUME
- functor type is \a smesh.FT_Volume3D
- threshold is floating point value (volume)
\code
# create mesh with volumes
from SMESH_mechanic import *
mesh.Tetrahedron( algo=smesh.NETGEN )
mesh.Compute()
# get volumes faces with volume > 100
filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_Volume3D, smesh.FT_MoreThan, 100)
ids = mesh.GetIdsFromFilter(filter)
print "Number of volumes with volume > 100:", len(ids)
\endcode
\sa \ref tui_volume
\section filter_free_borders Free borders
Filter 1D mesh elements (edges) which represent free borders of a mesh:
- element type is \a smesh.EDGE
- functor type is \a smesh.FT_FreeBorders
- threshold value is not required
\code
# create mesh
import geompy, smesh, StdMeshers
face = geompy.MakeFaceHW(100, 100, 1)
geompy.addToStudy( face, "quadrangle" )
mesh = smesh.Mesh(face)
mesh.Segment().NumberOfSegments(10)
mesh.Triangle().MaxElementArea(25)
mesh.Compute()
# get all free borders
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeBorders)
ids = mesh.GetIdsFromFilter(filter)
print "Number of edges on free borders:", len(ids)
\endcode
\sa \ref tui_free_borders
\section filter_free_edges Free edges
Filter 2D mesh elements (faces) consisting of edges belonging to one
element of mesh only:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_FreeEdges
- threshold value is not required
\code
# create mesh
import geompy, smesh, StdMeshers
face = geompy.MakeFaceHW(100, 100, 1)
geompy.addToStudy( face, "quadrangle" )
mesh = smesh.Mesh(face)
mesh.Segment().NumberOfSegments(10)
mesh.Triangle().MaxElementArea(25)
mesh.Compute()
# get all faces with free edges
filter = smesh.GetFilter(smesh.FACE, smesh.FT_FreeEdges)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with free edges:", len(ids)
\endcode
\sa \ref tui_free_edges
\section filter_free_nodes Free nodes
Filter free nodes:
- element type is \a smesh.NODE
- functor type is \a smesh.FT_FreeNodes
- threshold value is not required
\code
# create mesh
from SMESH_mechanic import *
# add node
mesh.AddNode(0,0,0)
# get all free nodes
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeNodes)
ids = mesh.GetIdsFromFilter(filter)
print "Number of free nodes:", len(ids)
\endcode
\sa \ref tui_free_nodes
\section filter_free_faces Free faces
Filter free faces:
- element type is \a smesh.FACE
- functor type is \a smesh.FT_FreeFaces
- threshold value is not required
\code
# create mesh
from SMESH_mechanic import *
# get all free faces
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_FreeFaces)
ids = mesh.GetIdsFromFilter(filter)
print "Number of free faces:", len(ids)
\endcode
\sa \ref tui_free_faces
\section filter_borders_multiconnection Borders at multi-connection
Filter border 1D mesh elements (edges) according to the specified number of
connections (faces belonging the border edges)
- element type is \a smesh.EDGE
- functor type is \a smesh.FT_MultiConnection
- threshold is integer value (number of connections)
\code
# create mesh
from SMESH_mechanic import *
# get border edges with number of connected faces = 5
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_MultiConnection, 5)
ids = mesh.GetIdsFromFilter(filter)
print "Number of border edges with 5 faces connected:", len(ids)
\endcode
\sa \ref tui_borders_at_multiconnection
\section filter_borders_multiconnection_2d Borders at multi-connection 2D
Filter 2D mesh elements (faces) which consist of edges belonging
to the specified number of mesh elements
- element type is \a smesh.FACE
- functor type is \a smesh.FT_MultiConnection2D
- threshold is integer value (number of connections)
\code
# create mesh
from SMESH_mechanic import *
# get faces which consist of edges belonging to 2 mesh elements
filter = smesh.GetFilter(smesh.FACE, smesh.FT_MultiConnection2D, 2)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces consisting of edges belonging to 2 faces:", len(ids)
\endcode
\sa \ref tui_borders_at_multiconnection_2d
\section filter_length Length
Filter 1D mesh elements (edges) according to the edge length value:
- element type should be \a smesh.EDGE
- functor type should be \a smesh.FT_Length
- threshold is floating point value (length)
\code
# create mesh
from SMESH_mechanic import *
# get edges with length > 14
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_Length, smesh.FT_MoreThan, 14)
ids = mesh.GetIdsFromFilter(filter)
print "Number of edges with length > 14:", len(ids)
\endcode
\sa \ref tui_length_1d
\section filter_length_2d Length 2D
Filter 2D mesh elements (faces) corresponding to the maximum length.
value of its edges:
- element type should be \a smesh.FACE
- functor type should be \a smesh.FT_Length2D
- threshold is floating point value (edge length)
\code
# create mesh
from SMESH_mechanic import *
# get all faces that have edges with length > 14
filter = smesh.GetFilter(smesh.FACE, smesh.FT_Length2D, smesh.FT_MoreThan, 14)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with maximum edge length > 14:", len(ids)
\endcode
\sa \ref tui_length_2d
\section filter_max_element_length_2d Element Diameter 2D
Filter 2D mesh elements (faces) corresponding to the maximum length
value of its edges and diagonals:
- element type should be \a smesh.FACE
- functor type should be \a smesh.FT_MaxElementLength2D
- threshold is floating point value (edge/diagonal length)
\code
# create mesh
from SMESH_mechanic import *
# get all faces that have elements with length > 10
filter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength2D, smesh.FT_MoreThan, 10)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces with maximum element length > 10:", len(ids)
\endcode
\sa \ref tui_max_element_length_2d
\section filter_max_element_length_3d Element Diameter 3D
Filter 3D mesh elements (volumes) corresponding to the maximum length
value of its edges and diagonals:
- element type should be \a smesh.VOLUME
- functor type should be \a smesh.FT_MaxElementLength3D
- threshold is floating point value (edge/diagonal length)
\code
# create mesh with volumes
from SMESH_mechanic import *
mesh.Tetrahedron( algo=smesh.NETGEN )
mesh.Compute()
# get all volumes that have elements with length > 10
filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_MaxElementLength3D, smesh.FT_MoreThan, 10)
ids = mesh.GetIdsFromFilter(filter)
print "Number of volumes with maximum element length > 10:", len(ids)
\endcode
\sa \ref tui_max_element_length_3d
\section filter_belong_to_geom Belong to Geom
Filter mesh entities (nodes or elements) which all nodes lie on the
shape defined by threshold value:
- element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
- functor type should be \a smesh.FT_BelongToGeom
- threshold is geometrical object
\code
# create mesh
from SMESH_mechanic import *
# get all faces which nodes lie on the face sub_face3
filter = smesh.GetFilter(smesh.FACE, smesh.FT_BelongToGeom, sub_face3)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces which nodes lie on sub_face3:", len(ids)
\endcode
\section filter_lying_on_geom Lying on Geom
Filter mesh entities (nodes or elements) at least one node of which lies on the
shape defined by threshold value:
- element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
- functor type should be \a smesh.FT_LyingOnGeom
- threshold is geometrical object
\code
# create mesh
from SMESH_mechanic import *
# get all faces at least one node of each lies on the face sub_face3
filter = smesh.GetFilter(smesh.FACE, smesh.FT_LyingOnGeom, sub_face3)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces at least one node of each lies on sub_face3:", len(ids)
\endcode
\section filter_belong_to_plane Belong to Plane
Filter mesh entities (nodes or elements) which all nodes belong to the
plane defined by threshold value with the given tolerance:
- element type can be: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
- functor type should be \a smesh.FT_BelongToPlane
- threshold is geometrical object (plane)
- default tolerance is 1.0e-7
\code
# create mesh
from SMESH_mechanic import *
# create plane
import geompy
plane_1 = geompy.MakePlane(p3,seg1,2000)
geompy.addToStudy(plane_1, "plane_1")
# get all nodes which lie on the plane \a plane_1
filter = smesh.GetFilter(smesh.NODE, smesh.FT_BelongToPlane, plane_1)
ids = mesh.GetIdsFromFilter(filter)
print "Number of nodes which lie on the plane plane_1:", len(ids)
\endcode
\section filter_belong_to_cylinder Belong to Cylinder
Filter 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: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
- functor type should be \a smesh.FT_BelongToCylinder
- threshold is geometrical object (cylindrical face)
- default tolerance is 1.0e-7
\code
# create mesh
from SMESH_mechanic import *
# get all faces which lie on the cylindrical face \a sub_face1
filter = smesh.GetFilter(smesh.FACE, smesh.FT_BelongToCylinder, sub_face1)
ids = mesh.GetIdsFromFilter(filter)
print "Number of faces which lie on the cylindrical surface sub_face1:", len(ids)
\endcode
\section filter_belong_to_surface Belong to Surface
Filter 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: \a smesh.NODE, \a smesh.EDGE, \a smesh.FACE
- functor type should be \a smesh.FT_BelongToGenSurface
- threshold is geometrical object (arbitrary surface)
- default tolerance is 1.0e-7
\code
# create mesh
from SMESH_mechanic import *
# create b-spline
spline_1 = geompy.MakeInterpol([p4,p6,p3,p1])
surface_1 = geompy.MakePrismVecH( spline_1, vz, 70.0 )
geompy.addToStudy(surface_1, "surface_1")
# get all nodes which lie on the surface \a surface_1
filter = smesh.GetFilter(smesh.NODE, smesh.FT_BelongToGenSurface, surface_1)
ids = mesh.GetIdsFromFilter(filter)
print "Number of nodes which lie on the surface surface_1:", len(ids)
\endcode
\section filter_range_of_ids Range of IDs
Filter mesh entities elements (nodes or elements) according to the
specified identifiers range:
- element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
- functor type is \a 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"
\code
# create mesh
from SMESH_mechanic import *
# get nodes with identifiers [5-10] and [15-30]
criterion1 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="5-10",\
BinaryOp=smesh.FT_LogicalOR)
criterion2 = smesh.GetCriterion(smesh.NODE, smesh.FT_RangeOfIds, Treshold="15-30")
filter = smesh.CreateFilterManager().CreateFilter()
filter.SetCriteria([criterion1,criterion2])
ids = mesh.GetIdsFromFilter(filter)
print "Number of nodes in ranges [5-10] and [15-30]:", len(ids)
\endcode
\section filter_bad_oriented_volume Badly oriented volume
Filter 3D mesh elements (volumes), which are incorrectly oriented from
the point of view of MED convention.
- element type should be \a smesh.VOLUME
- functor type is \a smesh.FT_BadOrientedVolume
- threshold is not required
\code
# create mesh with volumes
from SMESH_mechanic import *
mesh.Tetrahedron( algo=smesh.NETGEN )
mesh.Compute()
# get all badly oriented volumes
filter = smesh.GetFilter(smesh.VOLUME, smesh.FT_BadOrientedVolume)
ids = mesh.GetIdsFromFilter(filter)
print "Number of badly oriented volumes:", len(ids)
\endcode
\section filter_linear_or_quadratic Linear / quadratic
Filter linear / quadratic mesh elements:
- element type should be any element type, e.g.: \a smesh.EDGE, \a smesh.FACE, \a smesh.VOLUME
- functor type is \a 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
\code
# create mesh
from SMESH_mechanic import *
# get number of linear and quadratic edges
filter_linear = smesh.GetFilter(smesh.EDGE, smesh.FT_LinearOrQuadratic)
filter_quadratic = smesh.GetFilter(smesh.EDGE, smesh.FT_LinearOrQuadratic, smesh.FT_LogicalNOT)
ids_linear = mesh.GetIdsFromFilter(filter_linear)
ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)
# convert mesh to quadratic
print "Convert to quadratic..."
mesh.ConvertToQuadratic(True)
# get number of linear and quadratic edges
ids_linear = mesh.GetIdsFromFilter(filter_linear)
ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic)
print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)
\endcode
\section filter_group_color Group color
Filter mesh entities, belonging to the group with the color defined by the threshold value.
- element type can be any entity type, from \a smesh.NODE to \a smesh.VOLUME
- functor type is \a smesh.FT_GroupColor
- threshold should be of SALOMEDS.Color type
\code
# create mesh
from SMESH_mechanic import *
# create group of edges
all_edges = mesh.GetElementsByType(smesh.EDGE)
grp = mesh.MakeGroupByIds("edges group", smesh.EDGE, all_edges[:len(all_edges)/4])
import SALOMEDS
c = SALOMEDS.Color(0.1, 0.5, 1.0)
grp.SetColor(c)
# get number of the edges not belonging to the group with the given color
filter = smesh.GetFilter(smesh.EDGE, smesh.FT_GroupColor, c, smesh.FT_LogicalNOT)
ids = mesh.GetIdsFromFilter(filter)
print "Number of edges not beloging to the group with color (0.1, 0.5, 1.0):", len(ids)
\endcode
\section filter_geom_type Geometry type
Filter 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 should be any element type, e.g.: \a smesh.EDGE, \a smesh.FACE, \a smesh.VOLUME
- functor type should be \a smesh.FT_ElemGeomType
- threshold is of smesh.GeometryType value
\code
# create mesh with volumes
from SMESH_mechanic import *
mesh.Tetrahedron( algo=smesh.NETGEN )
mesh.Compute()
# get all triangles, quadrangles, tetrahedrons, pyramids
filter_tri = smesh.GetFilter(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_TRIANGLE)
filter_qua = smesh.GetFilter(smesh.FACE, smesh.FT_ElemGeomType, smesh.Geom_QUADRANGLE)
filter_tet = smesh.GetFilter(smesh.VOLUME, smesh.FT_ElemGeomType, smesh.Geom_TETRA)
filter_pyr = smesh.GetFilter(smesh.VOLUME, smesh.FT_ElemGeomType, smesh.Geom_PYRAMID)
ids_tri = mesh.GetIdsFromFilter(filter_tri)
ids_qua = mesh.GetIdsFromFilter(filter_qua)
ids_tet = mesh.GetIdsFromFilter(filter_tet)
ids_pyr = mesh.GetIdsFromFilter(filter_pyr)
print "Number of triangles:", len(ids_tri)
print "Number of quadrangles:", len(ids_qua)
print "Number of tetrahedrons:", len(ids_tet)
print "Number of pyramids:", len(ids_pyr)
\endcode
*/

View File

@ -19,7 +19,11 @@ aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_Area, smesh.FT_MoreThan, 100.)
anIds = mesh.GetIdsFromFilter(aFilter) anIds = mesh.GetIdsFromFilter(aFilter)
# create a group consisting of faces with area > 100 # create a group consisting of faces with area > 100
aGroup = mesh.MakeGroupByIds("Area > 100", smesh.FACE, anIds) aGroup1 = mesh.MakeGroupByIds("Area > 100", smesh.FACE, anIds)
# create a group that contains all nodes from the mesh
aGroup2 = mesh.CreateEmptyGroup(smesh.NODE, "all nodes")
aGroup2.AddFrom(mesh.mesh)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode

View File

@ -0,0 +1,84 @@
/*!
\page tui_measurements_page Measurements
\section tui_min_distance Minimum Distance
\code
import smesh
from SMESH_mechanic import mesh as mesh1
from SMESH_test1 import mesh as mesh2
mesh1.Compute()
mesh2.Compute()
# compute min distance from mesh1 to the origin (not available yet)
smesh.MinDistance(mesh1)
# compute min distance from node 10 of mesh1 to the origin
smesh.MinDistance(mesh1, id1=10)
# ... or
mesh1.MinDistance(10)
# compute min distance between nodes 10 and 20 of mesh1
smesh.MinDistance(mesh1, id1=10, id2=20)
# ... or
mesh1.MinDistance(10, 20)
# compute min distance from element 100 of mesh1 to the origin (not available yet)
smesh.MinDistance(mesh1, id1=100, isElem1=True)
# ... or
mesh1.MinDistance(100, isElem1=True)
# compute min distance between elements 100 and 200 of mesh1 (not available yet)
smesh.MinDistance(mesh1, id1=100, id2=200, isElem1=True, isElem2=True)
# ... or
mesh1.MinDistance(100, 200, True, True)
# compute min distance from element 100 to node 20 of mesh1 (not available yet)
smesh.MinDistance(mesh1, id1=100, id2=20, isElem1=True)
# ... or
mesh1.MinDistance(100, 20, True)
# compute min distance from mesh1 to mesh2 (not available yet)
smesh.MinDistance(mesh1, mesh2)
# compute min distance from node 10 of mesh1 to node 20 of mesh2
smesh.MinDistance(mesh1, mesh2, 10, 20)
# compute min distance from node 10 of mesh1 to element 200 of mesh2 (not available yet)
smesh.MinDistance(mesh1, mesh2, 10, 200, isElem2=True)
# etc...
\endcode
\section tui_bounding_box Bounding Box
\code
import smesh
from SMESH_mechanic import mesh as mesh1
from SMESH_test1 import mesh as mesh2
mesh1.Compute()
mesh2.Compute()
# compute bounding box for mesh1
mesh1.BoundingBox()
# compute bounding box for list of nodes of mesh1
mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381])
# compute bounding box for list of elements of mesh1
mesh1.BoundingBox([363, 364, 370, 371, 372, 373, 379, 380, 381], isElem=True)
# compute common bounding box of mesh1 and mesh2
smesh.BoundingBox([mesh1, mesh2])
# etc...
\endcode
*/

View File

@ -281,6 +281,24 @@ if res == 1: print "Elements removing is OK!"
else: print "KO Elements removing." else: print "KO Elements removing."
\endcode \endcode
<br>
\anchor tui_removing_orphan_nodes
<h3>Removing Orphan Nodes</h3>
\code
import SMESH_mechanic
mesh = SMESH_mechanic.mesh
# add orphan nodes
mesh.AddNode(0,0,0)
mesh.AddNode(1,1,1)
# remove just created orphan nodes
res = mesh.RemoveOrphanNodes()
if res == 1: print "Removed %d nodes!" % res
else: print "KO nodes removing."
\endcode
<br> <br>
\anchor tui_renumbering_nodes_and_elements \anchor tui_renumbering_nodes_and_elements
<h2>Renumbering Nodes and Elements</h2> <h2>Renumbering Nodes and Elements</h2>
@ -299,19 +317,6 @@ mesh.RenumberElements()
\anchor tui_moving_nodes \anchor tui_moving_nodes
<h2>Moving Nodes</h2> <h2>Moving Nodes</h2>
\code
import SMESH_mechanic
mesh = SMESH_mechanic.mesh
# move node #38
mesh.MoveNode(38, 20., 10., 0.)
\endcode
<br>
\anchor tui_mesh_through_point
<h2>Mesh through point</h2>
\code \code
from geompy import * from geompy import *
from smesh import * from smesh import *
@ -344,16 +349,11 @@ n = mesh.FindNodeClosestTo( -1,-1,-1 )
if not n == node000: if not n == node000:
raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 ) raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )
# check if any node will be found for a point inside a box
n = mesh.FindNodeClosestTo( 100, 100, 100 )
if not n > 0:
raise "FindNodeClosestTo( 100, 100, 100 ) fails"
# move node000 to a new location # move node000 to a new location
x,y,z = -10, -10, -10 x,y,z = -10, -10, -10
n = mesh.MeshToPassThroughAPoint( x,y,z ) n = mesh.MoveNode( n,x,y,z )
if not n == node000: if not n:
raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 ) raise "MoveNode() returns " + n
# check the coordinates of the node000 # check the coordinates of the node000
xyz = mesh.GetNodeXYZ( node000 ) xyz = mesh.GetNodeXYZ( node000 )

View File

@ -2,9 +2,7 @@
\page tui_quality_controls_page Quality Controls \page tui_quality_controls_page Quality Controls
<br> \section tui_free_borders Free Borders
\anchor tui_free_borders
<h2>Free Borders</h2>
\code \code
import salome import salome
@ -48,9 +46,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_borders_at_multiconnection Borders at Multiconnection
\anchor tui_borders_at_multiconnection
<h2>Borders at Multiconnection</h2>
\code \code
import salome import salome
@ -97,9 +93,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_length_1d Length 1D
\anchor tui_length_1d
<h2>Length 1D</h2>
\code \code
import salome import salome
@ -145,9 +139,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_free_edges Free Edges
\anchor tui_free_edges
<h2>Free Edges</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -189,9 +181,7 @@ for i in range(len(aBorders)):
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_free_nodes Free Nodes
\anchor tui_free_nodes
<h2>Free Nodes</h2>
\code \code
import salome import salome
@ -242,10 +232,7 @@ print ""
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
\section tui_free_faces Free Faces
<br>
\anchor tui_free_faces
<h2>Free Faces</h2>
\code \code
import salome import salome
@ -322,10 +309,7 @@ aGroup.Add(aFaceIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
\section tui_length_2d Length 2D
<br>
\anchor tui_length_2d
<h2>Length 2D</h2>
\code \code
import salome import salome
@ -372,9 +356,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_borders_at_multiconnection_2d Borders at Multiconnection 2D
\anchor tui_borders_at_multiconnection_2d
<h2>Borders at Multiconnection 2D</h2>
\code \code
import salome import salome
@ -421,9 +403,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_area Area
\anchor tui_area
<h2>Area</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -456,9 +436,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_taper Taper
\anchor tui_taper
<h2>Taper</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -491,9 +469,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_aspect_ratio Aspect Ratio
\anchor tui_aspect_ratio
<h2>Aspect Ratio</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -526,9 +502,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_minimum_angle Minimum Angle
\anchor tui_minimum_angle
<h2>Minimum Angle</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -562,9 +536,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_warping Warping
\anchor tui_warping
<h2>Warping</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -598,9 +570,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_skew Skew
\anchor tui_skew
<h2>Skew</h2>
\code \code
import SMESH_mechanic import SMESH_mechanic
@ -633,9 +603,40 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_max_element_length_2d Element Diameter 2D
\anchor tui_aspect_ratio_3d
<h2>Aspect Ratio 3D</h2> \code
import SMESH_mechanic
smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
salome = SMESH_mechanic.salome
# Criterion : ELEMENT DIAMETER 2D > 10
mel_2d_margin = 10
aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength2D, smesh.FT_MoreThan, mel_2d_margin)
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
print "Criterion: Element Diameter 2D Ratio > ", mel_2d_margin, " Nb = ", len(anIds)
j = 1
for i in range(len(anIds)):
if j > 20: j = 1; print ""
print anIds[i],
j = j + 1
pass
print ""
# create a group
aGroup = mesh.CreateEmptyGroup(smesh.FACE, "Element Diameter 2D > " + `mel_2d_margin`)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
\endcode
\section tui_aspect_ratio_3d Aspect Ratio 3D
\code \code
import SMESH_mechanic_tetra import SMESH_mechanic_tetra
@ -669,9 +670,7 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
<br> \section tui_volume Volume
\anchor tui_volume
<h2>Volume</h2>
\code \code
import SMESH_mechanic_tetra import SMESH_mechanic_tetra
@ -706,4 +705,37 @@ aGroup.Add(anIds)
salome.sg.updateObjBrowser(1) salome.sg.updateObjBrowser(1)
\endcode \endcode
\section tui_max_element_length_3d Element Diameter 3D
\code
import SMESH_mechanic_tetra
smesh = SMESH_mechanic_tetra.smesh
mesh = SMESH_mechanic_tetra.mesh
salome = SMESH_mechanic_tetra.salome
# Criterion : ELEMENT DIAMETER 3D > 10
mel_3d_margin = 10
aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_MaxElementLength3D, smesh.FT_MoreThan, mel_3d_margin)
anIds = mesh.GetIdsFromFilter(aFilter)
# print the result
print "Criterion: Element Diameter 3D Ratio > ", mel_3d_margin, " Nb = ", len(anIds)
j = 1
for i in range(len(anIds)):
if j > 20: j = 1; print ""
print anIds[i],
j = j + 1
pass
print ""
# create a group
aGroup = mesh.CreateEmptyGroup(smesh.FACE, "Element Diameter 3D > " + `mel_3d_margin`)
aGroup.Add(anIds)
salome.sg.updateObjBrowser(1)
\endcode
*/ */

View File

@ -350,4 +350,238 @@ mesh.Compute()
mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58) mesh.SewSideElements([69, 70, 71, 72], [91, 92, 89, 90], 8, 38, 23, 58)
\endcode \endcode
<br>
\anchor tui_duplicate_nodes
<h3>Duplicate nodes</h3>
\code
import salome
import smesh
import SMESH_test1
mesh = SMESH_test1.mesh
# Compute mesh
mesh.Compute()
# Without the duplication of border elements
# Nodes to duplicate
nodes1 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes1' )
nodes1.Add( [ 289, 278, 302, 285 ] )
# Group of faces to replace nodes with new ones
faces1 = mesh.CreateEmptyGroup( smesh.FACE, 'faces1' )
faces1.Add( [ 519, 556, 557 ] )
# Duplicate nodes
print "\nMesh before the first nodes duplication:"
print "Nodes : ", mesh.NbNodes()
print "Edges : ", mesh.NbEdges()
print "Triangles : ", mesh.NbTriangles()
groupOfCreatedNodes = mesh.DoubleNodeGroup(nodes1, faces1, theMakeGroup=True)
print "New nodes:", groupOfCreatedNodes.GetIDs()
print "\nMesh after the first nodes duplication:"
print "Nodes : ", mesh.NbNodes()
print "Edges : ", mesh.NbEdges()
print "Triangles : ", mesh.NbTriangles()
# With the duplication of border elements
# Edges to duplicate
edges = mesh.CreateEmptyGroup( smesh.EDGE, 'edges' )
edges.Add( [ 29, 30, 31 ] )
# Nodes not to duplicate
nodes2 = mesh.CreateEmptyGroup( smesh.NODE, 'nodes2' )
nodes2.Add( [ 32, 5 ] )
# Group of faces to replace nodes with new ones
faces2 = mesh.CreateEmptyGroup( smesh.FACE, 'faces2' )
faces2.Add( [ 576, 578, 580 ] )
# Duplicate nodes
print "\nMesh before the second nodes duplication:"
print "Nodes : ", mesh.NbNodes()
print "Edges : ", mesh.NbEdges()
print "Triangles : ", mesh.NbTriangles()
groupOfNewEdges = mesh.DoubleNodeElemGroup( edges, nodes2, faces2, theMakeGroup=True )
print "New edges:", groupOfNewEdges.GetIDs()
print "\nMesh after the second nodes duplication:"
print "Nodes : ", mesh.NbNodes()
print "Edges : ", mesh.NbEdges()
print "Triangles : ", mesh.NbTriangles()
# Update object browser
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(0)
\endcode
<br>
\anchor tui_make_2dmesh_from_3d
<h3>Create boundary elements</h3>
\code
# The objective of these samples is to illustrate the following use cases:
# 1) The mesh MESH1 with 3D cells has no or only a part of its skin (2D cells):
# 1.1) Add the 2D skin (missing 2D cells) to MESH1 (what is done now by the algorithm).
# 1.2) Create a new 3D Mesh MESH2 that consists of MESH1 and added 2D skin cells.
# 1.3) Create a new 2D Mesh MESH3 that consists only of 2D skin cells.
# 2) The mesh MESH1 with 3D cells has all its skin (2D cells):
# Create a new 2D Mesh MESH3 that consists only of 2D skin cells.
#
# In all cases an option to create a group containing these 2D skin cells is available.
from smesh import *
box = geompy.MakeBoxDXDYDZ(1,1,1)
geompy.addToStudy(box,"box")
boxFace = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])[0]
geompy.addToStudyInFather(box,boxFace,"boxFace")
MESH1 = Mesh(box,"MESH1")
MESH1.AutomaticHexahedralization()
init_nb_edges = MESH1.NbEdges()
init_nb_faces = MESH1.NbFaces()
init_nb_volumes = MESH1.NbVolumes()
# =========================================================================================
# 1) The mesh MESH1 with 3D cells has no or only a part of its skin (2D cells)
# =========================================================================================
# remove some faces
all_faces = MESH1.GetElementsByType(SMESH.FACE)
rm_faces = all_faces[:init_nb_faces/5] + all_faces[4*init_nb_faces/5:]
MESH1.RemoveElements(rm_faces)
assert(MESH1.NbFaces() == init_nb_faces-len(rm_faces))
# 1.1) Add the 2D skin (missing 2D cells) to MESH1
# -------------------------------------------------
# add missing faces
# 1.1.1) to the whole mesh
m,g = MESH1.MakeBoundaryMesh(MESH1)
assert(init_nb_faces == MESH1.NbFaces())
assert(init_nb_edges == MESH1.NbEdges())
assert(m)
assert(not g)
# 1.1.2) to some elements
MESH1.RemoveElements(rm_faces)
MESH1.MakeBoundaryMesh([])
assert(init_nb_faces != MESH1.NbFaces())
volumes = MESH1.GetElementsByType(SMESH.VOLUME)
for v in volumes:
MESH1.MakeBoundaryMesh([v])
assert(init_nb_faces == MESH1.NbFaces())
assert(init_nb_edges == MESH1.NbEdges())
# 1.1.3) to a group of elements
volGroup1 = MESH1.CreateEmptyGroup(SMESH.VOLUME, "volGroup1")
volGroup1.Add( volumes[: init_nb_volumes/2])
volGroup2 = MESH1.CreateEmptyGroup(SMESH.VOLUME, "volGroup2")
volGroup1.Add( volumes[init_nb_volumes/2:])
MESH1.RemoveElements(rm_faces)
MESH1.MakeBoundaryMesh(volGroup1)
MESH1.MakeBoundaryMesh(volGroup2)
assert(init_nb_faces == MESH1.NbFaces())
assert(init_nb_edges == MESH1.NbEdges())
# 1.1.4) to a submesh.
# The submesh has no volumes, so it is required to check if it passes without crash and does not create
# missing faces
faceSubmesh = MESH1.GetSubMesh( boxFace, "boxFace" )
MESH1.RemoveElements(rm_faces)
MESH1.MakeBoundaryMesh(faceSubmesh)
assert(init_nb_faces != MESH1.NbFaces())
# check group creation
MESH1.RemoveElements(rm_faces)
groupName = "added to mesh"
m,group = MESH1.MakeBoundaryMesh(MESH1,groupName=groupName)
assert(group)
assert(group.GetName() == groupName)
assert(group.Size() == len(rm_faces))
# 1.2) Create a new 3D Mesh MESH2 that consists of MESH1 and added 2D skin cells.
# ------------------------------------------------------------------------------
MESH1.RemoveElements(rm_faces)
meshName = "MESH2"
MESH2,group = MESH1.MakeBoundaryMesh(MESH1,meshName=meshName,toCopyElements=True)
assert(MESH2)
assert(MESH2.GetName() == meshName)
assert(MESH2.NbVolumes() == MESH1.NbVolumes())
assert(MESH2.NbFaces() == len(rm_faces))
# check group creation
MESH1.RemoveElements(rm_faces)
MESH2,group = MESH1.MakeBoundaryMesh(MESH1,meshName="MESH2_0",
groupName=groupName,toCopyElements=True)
assert(group)
assert(group.GetName() == groupName)
assert(group.Size() == len(rm_faces))
assert(group.GetMesh()._is_equivalent(MESH2.GetMesh()))
# 1.3) Create a new 2D Mesh MESH3 that consists only of 2D skin cells.
# -----------------------------------------------------------------------
MESH1.RemoveElements(rm_faces)
meshName = "MESH3"
MESH3,group = MESH1.MakeBoundaryMesh(MESH1,meshName=meshName,toCopyExistingBondary=True)
assert(MESH3)
assert(not group)
assert(MESH3.GetName() == meshName)
assert(MESH3.NbVolumes() == 0)
assert(MESH3.NbFaces() == init_nb_faces)
# check group creation
MESH1.RemoveElements(rm_faces)
MESH3,group = MESH1.MakeBoundaryMesh(MESH1,meshName=meshName,
groupName=groupName, toCopyExistingBondary=True)
assert(group)
assert(group.GetName() == groupName)
assert(group.Size() == len(rm_faces))
assert(group.GetMesh()._is_equivalent(MESH3.GetMesh()))
assert(MESH3.NbFaces() == init_nb_faces)
# ==================================================================
# 2) The mesh MESH1 with 3D cells has all its skin (2D cells)
# Create a new 2D Mesh MESH3 that consists only of 2D skin cells.
# ==================================================================
MESH1.MakeBoundaryMesh(MESH1)
MESH3,group = MESH1.MakeBoundaryMesh(MESH1,meshName=meshName,toCopyExistingBondary=True)
assert(MESH3)
assert(not group)
assert(MESH3.NbVolumes() == 0)
assert(MESH3.NbFaces() == init_nb_faces)
# check group creation
MESH3,group = MESH1.MakeBoundaryMesh(MESH1,meshName=meshName,
groupName=groupName, toCopyExistingBondary=True)
assert(group)
assert(group.GetName() == groupName)
assert(group.Size() == 0)
assert(group.GetMesh()._is_equivalent(MESH3.GetMesh()))
assert(MESH3.NbFaces() == init_nb_faces)
# ================
# Make 1D from 2D
# ================
MESH1.Clear()
MESH1.Compute()
MESH1.RemoveElements( MESH1.GetElementsByType(SMESH.EDGE))
rm_faces = faceSubmesh.GetIDs()[:2] # to remove few adjacent faces
nb_missing_edges = 2 + 2*len(rm_faces)
MESH1.RemoveElements(rm_faces)
mesh,group = MESH1.MakeBoundaryMesh(MESH1, BND_1DFROM2D)
assert( MESH1.NbEdges() == nb_missing_edges )
\endcode
*/ */

View File

@ -0,0 +1,58 @@
/*!
\page import_algos_page Use Existing Elements Algorithms
\n Use Existing Elements algorithms allow to define the mesh of a geometrical
object by the importing suitably located mesh elements from another
mesh. The mesh elements to import from the other mesh are to be contained in
groups. If several groups are used to mesh one 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.
<br> The source elements must totally cover the meshed geometry.
The source elements lying partially over the geometry will not be used.
<br>
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.
<br>
<b>Use Existing 1D Elements</b> algorithm allows to define the mesh of
a geometrical edge (or group of edges)
by the importing of mesh edges of another mesh contained in a group (or groups).
\n To apply this algorithm select the edge to be meshed (indicated in
the field \b Geometry of <b>Create mesh</b> dialog box),
<b>Use existing 1D elements</b> in the list of 1D algorithms and click the
<em>"Add Hypothesis"</em> button.
The following dialog box will appear:
\image html hyp_source_edges.png
In this menu you can define the \b Name of the algorithm, the
<b>Groups of Edges</b> to import elements from, <b> To copy mesh</b>
the selected <b>Groups of Edges</b> belong to as a whole and <b>To
copy groups</b> along with the whole mesh.
<br>
<b>Use Existing 2D Elements</b> algorithm allows to define the mesh of
a geometrical face (or group of faces)
by the importing of mesh faces of another mesh contained in a group (or groups).
\n To apply this algorithm select the edge to be meshed (indicated in
the field \b Geometry of <b>Create mesh</b> dialog box),
<b>Use existing 2D elements</b> in the list of 2D algorithms and click the
<em>"Add Hypothesis"</em> button.
The following dialog box will appear:
\image html hyp_source_faces.png
In this menu you can define the \b Name of the algorithm, the
<b>Groups of Faces</b> to import elements from, <b> To copy mesh</b>
the selected <b>Groups of Fcaes</b> belong to as a whole and <b>To
copy groups</b> along with the whole mesh.
<br>
<br><b>See Also</b> a sample TUI Script of a
\ref tui_import "Use Existing Elements Algorithms".
*/

Some files were not shown because too many files have changed in this diff Show More