diff --git a/src/Tools/YamsPlug/YamsPlugDialog.ui b/src/Tools/YamsPlug/YamsPlugDialog.ui
index e34b7b7da..9b573daf4 100644
--- a/src/Tools/YamsPlug/YamsPlugDialog.ui
+++ b/src/Tools/YamsPlug/YamsPlugDialog.ui
@@ -11,7 +11,7 @@
- Yams : Remeshing tool
+ MGSurfOpt : Remeshing tool
false
@@ -19,7 +19,7 @@
-
-
-
+
-
Qt::Horizontal
@@ -34,7 +34,7 @@
-
+
-
@@ -67,12 +67,12 @@
Save
-
-
- 18
- 18
-
-
+
+
+ 18
+ 18
+
+
-
@@ -80,12 +80,12 @@
Load
-
-
- 18
- 18
-
-
+
+
+ 18
+ 18
+
+
-
@@ -120,7 +120,7 @@
- -
+
-
Qt::Horizontal
@@ -135,7 +135,7 @@
-
+
-
@@ -164,156 +164,152 @@
Optimisation
-
-
-
-
-
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Minimum
-
-
-
- 30
- 20
-
-
-
-
-
- -
-
-
-
-
-
- Quality improvement is done by point smoothing and edge swapping.
-
-
- Quality improvement Only (0)
-
-
- true
-
-
-
- -
-
-
- The given surface triangulation is enriched (no coarsening at all) in such away that the distance
+
+
-
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Minimum
+
+
+
+ 30
+ 20
+
+
+
+
+ -
+
+
-
+
+
+ Quality improvement is done by point smoothing and edge swapping.
+
+
+ Quality improvement Only
+
+
+ true
+
+
+
+ -
+
+
+ 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.
-
-
- Pure Geometry Enrichment (G)
-
-
- false
-
-
-
- -
-
-
- An uniform subdivision of the given surface triangulation is performed :
+
+
+ Pure Geometry Enrichment
+
+
+ false
+
+
+
+ -
+
+
+ An 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.
-
-
- Uniform Subdivision (U)
-
-
- false
-
-
-
- -
-
-
- A surface sandpapering without shrinkage of the given surface
+
+
+ Uniform Subdivision
+
+
+ false
+
+
+
+ -
+
+
+ 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.
This option modifies the geometry.
-
-
- Sandpapering (S)
-
-
- false
-
-
-
- -
-
-
- The given surface triangulation is modified in such a way that the distance between
+
+
+ Sandpapering
+
+
+ false
+
+
+
+ -
+
+
+ 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
-
-
- Geometrical Mesh : Coarsening (-2)
-
-
-
- -
-
-
- The given surface triangulation is modified in such a way that the distance between
+
+
+ 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 and enrich when a purely geometrical mesh is needed. (a mesh that keeps
and obeys its geometric features only.) The meshes obtained with this setting are usually not suitable
for computation because anisotropic elements may be generated
-
-
- Geometrical Mesh : Coarsening and Enrichment (2)
-
-
-
- -
-
-
- The given surface triangulation is modified in accordance to a size map.
+
+
+ Geometrical Mesh : Coarsening and Enrichment
+
+
+
+ -
+
+
+ The given surface triangulation is modified in accordance to a size map.
The latter can be either the intrinsic size map (computed automatically
and based on the surface properties, i.e. the local curvatures),
or on a given size map (which is then combined to the intrinsic size map).
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.
-
-
- Mesh for finite element computation : Coarsening (-1)
-
-
-
- -
-
-
- The given surface triangulation is modified in accordance to a size map.
+
+
+ Mesh for finite element computation : Coarsening
+
+
+
+ -
+
+
+ The given surface triangulation is modified in accordance to a size map.
The latter can be either the intrinsic size map (computed automatically
and based on the surface properties, i.e. the local curvatures),
or on a given size map (which is then combined to the intrinsic size map).
One should use this option to coarse 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
-
-
- Mesh for finite element computation : Coarsening and Enrichment (1)
-
-
-
-
-
-
-
+
+
+ Mesh for finite element computation : Coarsening and Enrichment
+
+
+
+
+
+
@@ -494,6 +490,7 @@ If the Units parameter is absolute, the tolerance parameter is expressed in mode
+ GBUnit
groupBox
GBOptim
@@ -558,7 +555,6 @@ or add vertices (refines) to change the mesh.
true
-
@@ -580,8 +576,6 @@ New created vertices are saved in the .mesh file under keyword section 'Vertices
false
-
-
@@ -595,7 +589,6 @@ New created vertices are saved in the .mesh file under keyword section 'Vertices
You can control
-##1
@@ -606,13 +599,13 @@ New created vertices are saved in the .mesh file under keyword section 'Vertices
- 0.89
+ 0.890000000000000
- 0.01
+ 0.010000000000000
- 0.04
+ 0.040000000000000
@@ -646,7 +639,6 @@ faces.
Maximum angle allowed between a face and a curve (not separated by a ridge).
-##2
@@ -657,10 +649,10 @@ Maximum angle allowed between a face and a curve (not separated by a ridge).
- 90.
+ 90.000000000000000
- 45.
+ 45.000000000000000
@@ -677,7 +669,6 @@ Maximum angle allowed between a face and a curve (not separated by a ridge).
-##3
@@ -688,16 +679,16 @@ the edge common to the faces is a ridge.
- 0.01
+ 0.010000000000000
- 100.
+ 100.000000000000000
- 0.1
+ 0.100000000000000
- 100.
+ 100.000000000000000
@@ -723,7 +714,6 @@ size may be slightly bigger than the prescribed ones.
the lengths of the edges with respect to the specified size map.
-##4
@@ -734,16 +724,16 @@ the lengths of the edges with respect to the specified size map.
- 0.
+ 0.000000000000000
- 100.
+ 100.000000000000000
- 0.1
+ 0.100000000000000
- 5.
+ 5.000000000000000
@@ -769,7 +759,6 @@ size may be slightly bigger than the prescribed ones.
the lengths of the edges with respect to the specified size map.
-##5
@@ -780,10 +769,10 @@ the lengths of the edges with respect to the specified size map.
- 0.01
+ 0.010000000000000
- 1.3
+ 1.300000000000000
@@ -827,8 +816,7 @@ Yams will avoid having two adjacent edges which sizes vary more than the given g
Yams Generic Options
-
-
+
20
@@ -837,15 +825,14 @@ Yams will avoid having two adjacent edges which sizes vary more than the given g
25
-
- 10
-
-
- 3
-
-
-
-
+
+ 10
+
+
+ 3
+
+
+
130
@@ -859,12 +846,11 @@ Yams will avoid having two adjacent edges which sizes vary more than the given g
From 0 (no detail) to 10 (very detailed).
Default is 3.
-
- Verbosity level
-
-
-
-
+
+ Verbosity level
+
+
+
20
@@ -873,16 +859,15 @@ Default is 3.
25
-
- 100000
-
-
- 0
-
-
-
-
-
+
+ 100000
+
+
+ 0
+
+
+
+
130
70
@@ -890,11 +875,8 @@ Default is 3.
30
-
- Memory size (in Mbytes)
-
-
- The program requires roughly about 370 bytes per point. It is thus possible to estimate a priori
+
+ The program requires roughly about 370 bytes per point. It is thus possible to estimate a priori
the required memory size to complete a job. As an example of memory space needed, a mesh
of 543,652 points (1,087,716 triangles) requires 182 Mbytes (about 351 bytes per point). Conversely,
a workstation having 512 Mbytes of memory can handle a mesh of about 2,750,000 points.
@@ -907,9 +889,11 @@ Specify the memory if:
- you want to limit the amount of memory used by the program.
If the input mesh size requires more memory than requested or if the allocated memory (user defined or not)
exceeds the machine capabilities, the tool will stop because of insufficient memory.
-
-
-
+
+
+ Memory size (in Mbytes)
+
+
@@ -959,8 +943,7 @@ exceeds the machine capabilities, the tool will stop because of insufficient mem
-
-
+
20
@@ -969,18 +952,17 @@ exceeds the machine capabilities, the tool will stop because of insufficient mem
31
-
- Save
-
+
+ Save
+
18
18
-
-
-
+
+
120
@@ -989,17 +971,16 @@ exceeds the machine capabilities, the tool will stop because of insufficient mem
31
-
- Load
-
+
+ Load
+
18
18
-
-
+
diff --git a/src/Tools/YamsPlug/doc/Mandatory_params.rst b/src/Tools/YamsPlug/doc/Mandatory_params.rst
index f657c1d92..9a84bdc5e 100644
--- a/src/Tools/YamsPlug/doc/Mandatory_params.rst
+++ b/src/Tools/YamsPlug/doc/Mandatory_params.rst
@@ -4,8 +4,8 @@ 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**.
+ All options, but the input mesh, have default values. however, **you have to specify these
+ simple options in order to drive MG-SurfOpt and control remeshing parameters**.
You can access Distene documentation by clicking on Help button.
@@ -22,54 +22,57 @@ simple case
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.
+This is the main remeshing Option. SurfOpt 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. SurfOpt 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.
+ If you activitate this option, SurfOpt does only quality improvement.
- It is equivalent to Yams's batch option 0.
+ It is equivalent to SurfOpt's batch option *- - optimisation only*.
- **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.
+ It is equivalent to SurfOpt'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.
+ It is equivalent to SurfOpt's batch option *- - uniform_flat_subdivision yes*.
- **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.
+ It is equivalent to SurfOpt's batch option *- - sand_paper yes*.
- **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
+ 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.
+ It is equivalent to SurfOpt's batch option *- - Hausdorff_like yes - - enrich no*.
- **Geometrical Mesh : Coarsening and Enrichment**
- Yams coarses and enrichs meshes to obtain a purely geometrical mesh. The method is the same as above.
+ SurfOpt 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.
+ It is equivalent to SurfOpt's batch option *- - Hausdorff_like yes*.
- **Mesh for finite element computation : Coarsening**
The given surface triangulation is modified 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.
+ It is equivalent to SurfOpt's batch option *- - enrich no*.
- **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.
+ It is equivalent to the default SurfOpt's behaviour (no option) .
Units parameter
@@ -92,7 +95,10 @@ This field enables the user to bound the maximal chordal deviation allowed, that
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.
+ - relative : the maximal chordal deviation - epsilon max - is set to *s x the parameter* where *s* is the size
+ of the bounding box longest diagonal.
+ By default, the parameter is set to 0.001 and the maximum deviation is then set to 0.001 x s,
+ which is equivalent to say that, for a bouding box of 1 meter, the maximal deviation is 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:
diff --git a/src/Tools/YamsPlug/doc/editHypo.rst b/src/Tools/YamsPlug/doc/editHypo.rst
index 5a53da355..3770d70c2 100644
--- a/src/Tools/YamsPlug/doc/editHypo.rst
+++ b/src/Tools/YamsPlug/doc/editHypo.rst
@@ -4,11 +4,11 @@
How to save MeshGems-SurfOpt Parameters
===========================
-MeshGems-SurfOpt hypothesis is not meshing hypothesis for Salome, but hypothesis for yams.
+MeshGems-SurfOpt hypothesis is not a meshing hypothesis for Salome, but an hypothesis for MeshGems-SurfOpt.
The current set of parameters is automatically written in the salome study object browser when you run computation.
Theses parameters could also be stored in a special file.
-Default file is $HOME/.yams.dat.
+Default file is $HOME/.MGSurfOpt.dat.
This ASCII file is appended, and never cleaned.
In frame "Plug-in Generic Options":
@@ -23,15 +23,15 @@ At the bottom of the dialog window:
- To load the default setting, click on "Default" pushbutton. .
-**example of .yams.dat**
+**example of .MGSurfOpt.dat**
.. code-block:: python
- # YAMS hypothesis parameters
+ # MGSurfOpt hypothesis parameters
# Params for mesh : Mesh_1
# Date : 23/05/13 14:23:18
- # Command : yams -v 3 -O 0 -Drelative,tolerance=0.100000,maxsize=0.010000,minsize=0.000000 /tmp/ForYams_1.mesh
+ # Command : mg-surfopt.exe --verbose 3 --chordal_error 0.1 --max_size 0.01 --minsize 0.0 --in /tmp/ForSurfOpt_1.mesh
Optimisation=Quality improvement Only (0)
Units=Relative
ChordalToleranceDeviation=0.1
diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py
index 5ea623eb5..66b7ff13f 100644
--- a/src/Tools/YamsPlug/monYamsPlugDialog.py
+++ b/src/Tools/YamsPlug/monYamsPlugDialog.py
@@ -420,7 +420,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
self.fichierIn=""
def prepareFichier(self):
- self.fichierIn="/tmp/ForYams_"+str(self.num)+".meshb"
+ self.fichierIn="/tmp/ForSurfOpt_"+str(self.num)+".meshb"
self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True)
def PrepareLigneCommande(self):
@@ -457,9 +457,11 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
self.commande+= " --uniform_flat_subdivision yes"
elif style == "S" :
self.commande+= " --sand_paper yes"
+ elif style == "G" :
+ self.commande+= " -O G" # This option has not been updated to the new option style yet
deb=os.path.splitext(self.fichierIn)
- self.fichierOut=deb[0] + "_surfopt.meshb"
+ self.fichierOut=deb[0] + "_output.meshb"
tolerance=self.SP_toStr(self.SP_Tolerance)
if not self.RB_Absolute.isChecked():
@@ -469,7 +471,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
if self.CB_Ridge.isChecked() == False : self.commande+=" --compute_ridges no"
if self.CB_Point.isChecked() == False : self.commande+=" --optimisation no"
if self.CB_SplitEdge.isChecked()== True : self.commande+=" --element_order quadratic"
- if self.SP_Geomapp.value() != 0.04 : self.commande+=" --geometric_approximation_angle %f"%self.SP_Geomapp.value()
+ if self.SP_Geomapp.value() != 15.0 : self.commande+=" --geometric_approximation_angle %f"%self.SP_Geomapp.value()
if self.SP_Ridge.value() != 45.0 : self.commande+=" --ridge_angle %f"%self.SP_Ridge.value()
if self.SP_MaxSize.value() != 100 : self.commande+=" --max_size %f" %self.SP_MaxSize.value()
if self.SP_MinSize.value() != 5 : self.commande+=" --min_size %f" %self.SP_MinSize.value()
@@ -494,8 +496,8 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
self.RB_Relative.setChecked(True)
#no need: exlusives QRadioButton
#self.RB_Absolute.setChecked(False)
- self.SP_Tolerance.setProperty("text", "10.")
- self.SP_Geomapp.setProperty("value", 0.04)
+ self.SP_Tolerance.setProperty("text", "0.001")
+ self.SP_Geomapp.setProperty("value", 15.0)
self.SP_Ridge.setProperty("value", 45.0)
self.SP_Gradation.setProperty("value", 1.3)
self.CB_Ridge.setChecked(True)