--- /dev/null
+Advanced Remeshing Options
+==========================
+
+** be aware that no control of coherency is done when you set these parameters : for instance, geometrical approximation is only allowed when yams compute a mesh for finite elements but the GUI will let you choose geometrical approximation and compute a visualisation mesh. read DISTENE documentation **
+
+ - **Ridge detection**
+if not set (ridge detection disabled ), Yams will not try to detect any new ridge edge by its own mechanism :
+it will consider as ridge only the ridges given in the mesh. All non-ridge edges that would have been detected as ridge by the Ridge angle paramaeter (see below split edge) will be considered as part of the same continuous patch. This option should not be checked when all the known ridges of the mesh are given and when all other possible ridges are not geometric ridges to take into account.
+
+ - **Point smoothing**
+When not set (point smoothing is disabled), Yams will not try to move the initial given vertices (along an edge, a ridge or onto the surface), hence Yams will only swap edges, remove vertices or add vertices (refines) to change the mesh.
+
+ - **Geometrical approximation**
+this field as well as the Chordal deviation tolerance parameter,enables the user to bound the maximal chordal deviation allowed. it avoids having sharp angles. , that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent.
+
+.. image:: images/Tolerance.png
+ :align: center
+
+
+This parameter P enables the user to specify the maximal chordal deviation E relatively to the local curvature. the maximal chordal deviation will be set to E=P x r (r is the radius of the circumcercle) if the units parameter is set to relative or E=P if the units parameter is set to absolute.
+
+
+ - **Ridge angle**
+
+This parameter specifies the angular values for the automatic detection of ridges and corners. A ridge is automatically detected if the angle between the normal vectors of two adjacent faces exceeds this value.
+
+
+ - **Maximal/Minimal size around vertices**
+
+These two parameters allow the user to prescribe a Maximal/Minimal size for the mesh elements, ie the lengths of the edges.
+
+
+ - **Mesh gradation**
+This paramater P controls the element size variation : Yams will avoid having two adjacent egdes which sizes vary more than th given gradation. a size correction is applied to the size map : if two adjacent edges are respectively e1 and e2 long and e2 > Pxe1, then, the new size for the second edge will be set to P x e1.
+**This procedure is desactived if P=-1***
+
+
+
+ - **Split edge**
+If this option is activated, Yams creates new vertices placed on the curved surface and adds them to elements.
+It may be used to obtain higher order elements.
+
--- /dev/null
+Generic Options
+=================
+
+These options are not meshing options but allow the user to configure control parameters for yams.
+
+
+- **Verbosity Level**
+
+This parameter (between 0 and 10) indicates the amount of information that Yams prints during the run.
+
+
+- **Memory Size**
+You usually don't have to set this parameter but you can choose to limit the amount of memory used by Yams. - It requires 370 bytes per node -. Or, if you try to enrich a already big mesh (up to 2 millions nodes), you exceptionally, need to allocate more memory.
+
+
+- **File**
+
+You can change the file used to store the remeshing hypothesis. see paragraph :ref:`hypothesis-label` for further informations.
+
+.. image:: images/Generic.png
+ :align: center
+
--- /dev/null
+# Copyright (C) 2011 EDF R&D
+#
+# 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
+#
+
+srcdir=@srcdir@
+eficasdocdir=@prefix@/share/doc/salome/gui/EFICAS
+INSTALL=@INSTALL@
+
+SPHINXOPTS =
+SOURCEDIR = $(srcdir)
+SPHINXBUILD = sphinx-build
+PAPEROPT_a4 = -D latex_paper_size=a4
+ALLSPHINXOPTS = -d doctrees $(PAPEROPT_a4) $(SPHINXOPTS) $(SOURCEDIR)
+
+doc:
+ mkdir -p html doctrees
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) html
+ @echo
+ @echo "Build finished. The HTML pages are in html."
+
+install:
+ if test -d "html"; then \
+ $(INSTALL) -d $(eficasdocdir); \
+ cp -rf $$b"html"/* $(eficasdocdir); \
+ fi
+
+uninstall:
+ chmod -R +w $(eficasdocdir)
+ rm -rf $(eficasdocdir)/*
+
+clean:
+ -rm -rf html doctrees
+
+resources:doc
+
+inc:
+depend:
+lib:
+bin:
--- /dev/null
+Simple Remeshing Options
+=========================
+
+simple case
+-----------
+
+ All options, but the input mesh, have default values. however, **you have to specified these
+ simple options in order to drive yams and control remeshing parameters**.
+
+ You can access Distene documentation by clicking on Help button.
+
+
+.. image:: images/Simple.png
+ :align: center
+
+
+- **Original Mesh**
+
+ You have to select a Mesh Object from Salome Object Browser or choose a .GMF file.
+
+
+Optimisation
+------------
+
+This is the main remeshing Option. Yams always does quality improvement. It is done by point smooting and edge swapping. It can produce a regular mesh for finite element computation (initial mesh is a a geometrical mesh). In this case, the given surface trianglation is modified in accordance to a size map : an intrinsic size map is computed automatically. it is based on the surface proporties. Yams is also able to produce a geometrical mesh (initial mesh is a a mesh for finite element computation). In both case, It can coarsen or enrich the mesh.
+
+ - **Quality improvement**
+
+ If you activitate this option, Yams does only quality improvement.
+
+ It is equivalent to Yams's batch option 0.
+
+ - **Pure Geometry Enrichement**
+
+ The given surface triangulation is enriched (no coarsening at all) in such away that the distance between the elements in the final mesh and those of the initial one is bounded by auser specified tolerance value. One should use this option, to enrich the mesh where purely geometrical features may be insuficiently fine, i.e. the resulting mesh will be least as fine as the input. Mesh and the geometric features will be refined if needed as specified by the other program parameters. The meshes obtained with those settings may not be suitable for computation.
+
+ It is equivalent to Yams's batch option G.
+
+ - **Uniform subdivision**
+
+ A uniform subdivision of the given surface triangulation is performed : each triangle of the given surface triangulation is considered at and is divided into identical triangles.
+
+ It is equivalent to Yams's batch option U.
+
+ - **Smoothing**
+
+ A surface sandpapering without shrinkage of the given surface triangulation is performed, i.e., the high curvature variations of the given surface will be smoothed out without shrinking the volume in doing so. If ridges are defined, they will be kept as they are in the resulting mesh. It could modify the geometry.
+ It is equivalent to Yams's batch option S.
+
+ - **Geometrical Mesh : Coarsening**
+
+ The given surface triangulation is modified in such a way that the distance between the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value.One should use this option, to coarsen when a purely geometrical mesh is needed. (a mesh that keeps and obeys its geometric features only.) The meshes obtained with this option are usually not suitable for computation because anisotropic elements may be generated
+
+ It is equivalent to Yams's batch option -2.
+
+ - **Geometrical Mesh : Coarsening and Enrichment**
+
+ Yams coarses and enrichs meshes to obtain a purely geometrical mesh. The method is the same as above.
+
+ It is equivalent to Yams's batch option 2.
+
+ - **Mesh for finite element computation : Coarsening**
+
+ The given surface triangulation is modfied in accordance to a size map. The latter is the intrinsic size map (computed automatically and based on the surface properties, i.e. the local curvatures). One should use this option to coarsen the mesh, when a regular mesh for computation purposes is desired, i.e. a mesh with good aspect ratios or good quality elements.
+
+ It is equivalent to Yams's batch option -1.
+
+ - **Mesh for finite element computation : Coarsening and Enrichment**
+
+ One should use this option to coarsen and enrich the mesh, when a regular mesh for computation purposes is desired, i.e. a mesh with good aspect ratios or good quality elements. The method is the same as above.
+
+ It is equivalent to Yams's batch option 1.
+
+
+Units parameter
+---------------
+
+It indicates what reference is used for the values corresponding to size or distance specifications:
+If the Units parameter is absolute, values are relative to the bounding box,otherwise the tolerance parameter is expressed in model units. The bounding box size is defined as the length of the diagonal (lower left back icorner to upper right front corner).
+
+
+
+Chordal deviation tolerance parameter
+-------------------------------------
+
+This field enables the user to bound the maximal chordal deviation allowed, that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent.
+
+.. image:: images/Tolerance.png
+ :align: center
+
+
+This parameter enables the user to specify the maximal chordal deviation epsilon max.
+
+it can be :
+ - relative : the maximal chordal deviation - epsilon max -is set to 0.001 x the parameter. by default, the parameter is set to 0.1 and the maximum deviation is also 0.1 x 1/1000 * the size of the bounding box, which is equivalent to say that, for a bouding box of 1 meter, the maximal deviation is 0.1 mm.
+ - absolute : the maximal chordal deviation is the parameter itself. eg if the parameter equals 2, the maximal chordal deviation will be 2 (mm if the point coordonates are given in mm).
+
+Following that criterion:
+ - if the chordal deviation epsilon is smaller than epsilon max, it is acceptable to remove the considered point.
+ - if the chordal deviation epsilon is greater than epsilon max, the considered mesh face should be redifined by adding a point on the curve.
+
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Yams PlugIn documentation build configuration file, created by
+# sphinx-quickstart on Wed Sep 14 11:40:32 2011.
+#
+# 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 value; values that are commented out
+# serve to show the default value.
+
+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('some/directory'))
+
+# 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']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['.templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'YAMS Plug_in'
+copyright = '2011, Pascale Noyret'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '6.4'
+# The full version, including alpha/beta/rc tags.
+release = '6.4.0'
+
+# 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 directories, that shouldn't be searched
+# for source files.
+#exclude_dirs = []
+
+# 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 style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# 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 (within the static path) 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 = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, the reST sources are included in the HTML build as _sources/<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 = 'YamsPlug-in doc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# 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', 'YAMSPlugIn.tex', 'Yams PlugIn Documentation',
+ 'Pascale Noyret', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
--- /dev/null
+.. _hypothesis-label:
+
+===========================
+How to save Yams Parameters
+===========================
+
+As Yams hypothesis are not meshing hypothesis for Salome (but hypothesis for yams), parameters
+are stored in a special file. Default file is $HOME/.yams.dat. It is strongly recommended that you
+change this name if you want to preserve the way you obtain a mesh : This file is never cleaned.
+All sets of parameters are logged in it.
+
+
+- To save the current setting, click on "Save Params" pushbutton.
+- A set of parameters is automatically written in the .yams.dat file when you run computation.
+- Restoring the default settings can be done by pushing "Default Params".
+- "Loading Params" will reload the last set of parameters
+
+
+
+**example of .yams.dat**
+
+
+.. code-block:: python
+
+ # Save intermediate params
+ # Params for mesh :
+ Optimisation ='Quality improvement Only (0)'
+ Units ='Relative'
+ Chordal_Tolerance_Deviation=1.0
+ Ridge_Detection=True
+ Split_Edge=False
+ Point_Smoothing=True
+ Geometrical_Approximation=0.04
+ Ridge_Angle=45.0
+ Maximum_Size=-2.0
+ Minimum_Size=-2.0
+ Mesh_Gradation=1.3
+ Verbosity=3
+ Memory=0
+
+
+
+ # Params for Hypothese : monHypo_Yams_0
+ # Params for mesh : Mesh_1
+ Optimisation ='Quality improvement Only (0)'
+ Units ='Relative'
+ Chordal_Tolerance_Deviation=1.0
+ Ridge_Detection=True
+ Split_Edge=False
+ Point_Smoothing=True
+ Geometrical_Approximation=0.04
+ Ridge_Angle=45.0
+ Maximum_Size=-2.0
+ Minimum_Size=-2.0
+ Mesh_Gradation=1.3
+ Verbosity=3
+ Memory=0
+
+
+
--- /dev/null
+.. Yams documentation master file, created by sphinx-quickstart on Wed Sep 14 11:40:32 2011.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+YAMS plugin documentation
+==========================
+
+This documentation covers the usage of Yams as plug-in in Salome that can be used within the Salome
+Mesh module for remeshing 2D Surface.
+
+Yams plug-in uses Distene commercial software Yams, which is an **automatic surface remeshing tool**.
+This plug_in offers only the most common functionnalities of the tool.
+
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ lct.rst
+ Mandatory_params.rst
+ Generics_params.rst
+ Advanced_params.rst
+ editHypo.rst
+
+
+
+
--- /dev/null
+Running Yams Plug-in
+=====================
+
+Yamms plug-in can be invoked via SMESH Plugin item in Mesh menu bar
+
+.. image:: images/AppelYams.png
+ :align: center
+
+
+This plug-in works only with the commercial software Yams. To obtain a license,
+visit www.distene.comm
from spadderPlugin import runSpadderPlugin
from meshcut_plugin import MeshCut
+from yamsplug_plugin import YamsLct
salome_pluginsmanager.AddFunction('PADDER mesher',
'Create a mesh with PADDER',
salome_pluginsmanager.AddFunction('MeshCut',
'Cut a tetrahedron mesh by a plane',
MeshCut)
+
+salome_pluginsmanager.AddFunction('ReMesh with Yams',
+ 'Run Yams',
+ YamsLct)