mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
IMP: SMESH/Yams plug-in: Update to use Meshgems-SurfOpt 1.1 (new name of Yams)
This commit is contained in:
parent
88fc1bd729
commit
3ecdf53dff
@ -115,7 +115,7 @@
|
||||
<section name="smesh_help" >
|
||||
<parameter name="sub_menu" value="%1 module"/>
|
||||
<parameter name="User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/index.html"/>
|
||||
<parameter name="Plug-ins/Yams plugin User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/yams/index.html"/>
|
||||
<parameter name="Plug-ins/MGSurfOpt plugin User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/yams/index.html"/>
|
||||
<parameter name="Plug-ins/MGCleaner plugin User's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/gui/SMESH/MGCleaner/index.html"/>
|
||||
<parameter name="Developer's Guide" value="%SMESH_ROOT_DIR%/share/doc/salome/tui/SMESH/index.html"/>
|
||||
</section>
|
||||
|
@ -4,11 +4,11 @@ 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 :
|
||||
if not set (ridge detection disabled ), MeshGems-SurfOpt 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.
|
||||
When not set (point smoothing is disabled), MeshGems-SurfOpt will not try to move the initial given vertices (along an edge, a ridge or onto the surface), hence MeshGems-SurfOpt 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.
|
||||
@ -31,12 +31,12 @@ These two parameters allow the user to prescribe a Maximal/Minimal size for the
|
||||
|
||||
|
||||
- **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 paramater P controls the element size variation : MeshGems-SurfOpt 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.
|
||||
If this option is activated, MeshGems-SurfOpt creates new vertices placed on the curved surface and adds them to elements.
|
||||
It may be used to obtain higher order elements.
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
Generic Options
|
||||
=================
|
||||
|
||||
These options are not meshing options but allow the user to configure control parameters for yams.
|
||||
These options are not meshing options but allow the user to configure control parameters for MeshGems-SurfOpt.
|
||||
|
||||
|
||||
- **Verbosity Level**
|
||||
|
||||
This parameter (between 0 and 10) indicates the amount of information that Yams prints during the run.
|
||||
This parameter (between 0 and 10) indicates the amount of information that MeshGems-SurfOpt 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.
|
||||
You usually don't have to set this parameter but you can choose to limit the amount of memory used by MeshGems-SurfOpt. - 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**
|
||||
|
@ -35,8 +35,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General substitutions.
|
||||
project = 'YAMS Plug-in'
|
||||
copyright = '2011, Pascale Noyret'
|
||||
project = 'MeshGems-SurfOpt Plug-in'
|
||||
copyright = '2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE'
|
||||
|
||||
# The default replacements for |version| and |release|, also used in various
|
||||
# other places throughout the built documents.
|
||||
|
@ -1,10 +1,10 @@
|
||||
.. _hypothesis-label:
|
||||
|
||||
===========================
|
||||
How to save Yams Parameters
|
||||
How to save MeshGems-SurfOpt Parameters
|
||||
===========================
|
||||
|
||||
Yams hypothesis is not meshing hypothesis for Salome, but hypothesis for yams.
|
||||
MeshGems-SurfOpt hypothesis is not meshing hypothesis for Salome, but hypothesis for yams.
|
||||
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.
|
||||
|
@ -2,17 +2,17 @@
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
YAMS plugin documentation
|
||||
==========================
|
||||
MeshGems-SurfOpt plugin documentation
|
||||
=====================================
|
||||
|
||||
This documentation covers the usage of Yams as plug-in in Salome that can be used within the Salome
|
||||
This documentation covers the usage of MeshGems-SurfOpt 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.
|
||||
MeshGems-SurfOpt plug-in uses Distene commercial software MeshGems-SurfOpt, which is an **automatic surface remeshing tool**.
|
||||
This plug-in offers only the most common functionnalities of the tool.
|
||||
|
||||
.. note::
|
||||
for a complete documentation, see :download:`Yams whitepaper <files/YamsWhitePaper_3.2.pdf>`.
|
||||
for a complete documentation, see :download:`MeshGems-SurfOpt: The automatic surface remeshing tool of the MeshGems Suite <files/mg-surfopt_user_manual.pdf>`.
|
||||
|
||||
Contents:
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
Running Yams Plug-in
|
||||
Running MeshGems-SurfOpt Plug-in
|
||||
=====================
|
||||
|
||||
Yams plug-in can be invoked via SMESH Plugin item in Mesh menu bar
|
||||
MeshGems-SurfOpt 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,
|
||||
This plug-in works only with the commercial software MeshGems-SurfOpt. To obtain a license,
|
||||
visit www.distene.comm
|
||||
|
@ -107,7 +107,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
|
||||
except Exception:
|
||||
QMessageBox.warning(self, "Help", "Help unavailable $SMESH_ROOT_DIR not found")
|
||||
return
|
||||
maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/YamsWhitePaper_3.2.pdf"
|
||||
maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/mg-surfopt_user_manual.pdf"
|
||||
command="xdg-open "+maDoc+";"
|
||||
subprocess.call(command, shell=True)
|
||||
|
||||
@ -420,7 +420,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
|
||||
self.fichierIn=""
|
||||
|
||||
def prepareFichier(self):
|
||||
self.fichierIn="/tmp/ForYams_"+str(self.num)+".mesh"
|
||||
self.fichierIn="/tmp/ForYams_"+str(self.num)+".meshb"
|
||||
self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True)
|
||||
|
||||
def PrepareLigneCommande(self):
|
||||
@ -432,9 +432,8 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
|
||||
QMessageBox.critical(self, "File", "unable to read GMF Mesh in "+str(self.fichierIn))
|
||||
return False
|
||||
|
||||
self.commande="yams"
|
||||
verbosity=str(self.SP_Verbosity.value())
|
||||
self.commande+=" -v "+verbosity
|
||||
self.commande="mg-surfopt.exe"
|
||||
|
||||
for obj in self.GBOptim.findChildren(QRadioButton,):
|
||||
try:
|
||||
if obj.isChecked():
|
||||
@ -443,31 +442,45 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
|
||||
break
|
||||
except:
|
||||
pass
|
||||
self.commande+=" -O "+self.style.toLatin1()
|
||||
|
||||
style = self.style.toLatin1()
|
||||
# Translation of old Yams options to new MG-SurfOpt options
|
||||
if style == "0" :
|
||||
self.commande+= " --optimisation only"
|
||||
elif style == "2" :
|
||||
self.commande+= " --Hausdorff_like yes"
|
||||
elif style == "-1":
|
||||
self.commande+= " --enrich no"
|
||||
elif style == "-2":
|
||||
self.commande+= " --Hausdorff_like yes --enrich no"
|
||||
elif style == "U" :
|
||||
self.commande+= " --uniform_flat_subdivision yes"
|
||||
elif style == "S" :
|
||||
self.commande+= " --sand_paper yes"
|
||||
|
||||
deb=os.path.splitext(self.fichierIn)
|
||||
self.fichierOut=deb[0] + ".d.meshb"
|
||||
|
||||
if self.RB_Absolute.isChecked()==True :
|
||||
self.commande+=" -Dabsolute"
|
||||
else :
|
||||
self.commande+=" -Drelative"
|
||||
self.fichierOut=deb[0] + "_surfopt.meshb"
|
||||
|
||||
v=self.SP_toStr(self.SP_Tolerance)
|
||||
self.commande+=",tolerance="+v
|
||||
if self.CB_Ridge.isChecked()==False : self.commande+=",-nr"
|
||||
if self.CB_Point.isChecked()==False : self.commande+=",-ns"
|
||||
if self.SP_Geomapp.value()!=0.04 : self.commande+=",geomapp=%f"%self.SP_Geomapp.value()
|
||||
if self.SP_Ridge.value()!=45.0 : self.commande+=",ridge=%f"%self.SP_Ridge.value()
|
||||
if self.SP_MaxSize.value()!=100 : self.commande+=",maxsize=%f"%self.SP_MaxSize.value()
|
||||
if self.SP_MinSize.value()!=5 : self.commande+=",minsize=%f"%self.SP_MinSize.value()
|
||||
if self.SP_Gradation.value()!=1.3 : self.commande+=",gradation=%f"%self.SP_MaxSize.value()
|
||||
if self.CB_SplitEdge.isChecked()==True : self.commande+=",splitedge=1"
|
||||
tolerance=self.SP_toStr(self.SP_Tolerance)
|
||||
if not self.RB_Absolute.isChecked():
|
||||
tolerance+="r"
|
||||
self.commande+=" --chordal_error %s"%tolerance
|
||||
|
||||
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_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()
|
||||
if self.SP_Gradation.value() != 1.3 : self.commande+=" --gradation %f" %self.SP_MaxSize.value()
|
||||
if self.SP_Memory.value() != 0 : self.commande+=" --max_memory %d" %self.SP_Memory.value()
|
||||
if self.SP_Verbosity.value() != 3 : self.commande+=" --max_memory %d" %self.SP_Verbosity.value()
|
||||
|
||||
if self.SP_Verbosity.value()!=3 : self.commande+=" -v %d"%self.SP_Verbosity.value()
|
||||
if self.SP_Memory.value()!=0 : self.commande+=" -m %d"%self.SP_Memory.value()
|
||||
|
||||
self.commande+=" "+self.fichierIn
|
||||
self.commande+=" --in " + self.fichierIn
|
||||
self.commande+=" --out " + self.fichierOut
|
||||
|
||||
print self.commande
|
||||
return True
|
||||
|
||||
def clean(self):
|
||||
|
@ -34,7 +34,7 @@ salome_pluginsmanager.AddFunction('MeshCut',
|
||||
'Cut a tetrahedron mesh by a plane',
|
||||
MeshCut)
|
||||
|
||||
salome_pluginsmanager.AddFunction('ReMesh with Yams',
|
||||
salome_pluginsmanager.AddFunction('ReMesh with MGSurfOpt ( formerly Yams )',
|
||||
'Run Yams',
|
||||
YamsLct)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user