Salome HOME
Merge from V6_main 12/11/2012 V6_6_0b1
authorvsr <vsr@opencascade.com>
Mon, 12 Nov 2012 14:50:52 +0000 (14:50 +0000)
committervsr <vsr@opencascade.com>
Mon, 12 Nov 2012 14:50:52 +0000 (14:50 +0000)
16 files changed:
src/Tools/YamsPlug/Tolerance.png [new file with mode: 0644]
src/Tools/YamsPlug/YamsPlugDialog.ui
src/Tools/YamsPlug/doc/Advanced_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/Generics_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/Mandatory_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/conf.py [new file with mode: 0644]
src/Tools/YamsPlug/doc/editHypo.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Advanced.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/AppelYams.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Generic.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Simple.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Tolerance.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/index.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/lct.rst [new file with mode: 0644]
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/smesh_plugins.py

diff --git a/src/Tools/YamsPlug/Tolerance.png b/src/Tools/YamsPlug/Tolerance.png
new file mode 100644 (file)
index 0000000..d8fb162
Binary files /dev/null and b/src/Tools/YamsPlug/Tolerance.png differ
index 0113a1bb16943c941547d3fd5fd2c42f54b46647..b2bc9a6eb76bf8480518d0be03a4a9aa71d18eb4 100644 (file)
       </font>
      </property>
      <property name="currentIndex">
-      <number>0</number>
+      <number>1</number>
      </property>
      <widget class="QWidget" name="simple">
       <attribute name="title">
@@ -349,17 +349,10 @@ p, li { white-space: pre-wrap; }
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This parameter enables the user to bound the maximal chordal deviation allowed,&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;that is, the maximal distance allowed between the detected curve and the plane P&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;of the corresponding mesh face.&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;il faut mettre ici le png&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-style:italic;&quot;&gt;Definitions: chordal deviation epsilon; curvature r; bounding box s; angles alpha and beta&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;In other words, it avoids having faces too far away from the curve &lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;they represent (or should represent).&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This parameter enables the user to specify the maximal chordal deviation epsilon max.&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Following that criterion:&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- if the chordal deviation epsilon is smaller than epsilon max, it is acceptable &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;  to remove the considered point.&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- if the chordal deviation epsilon is greater than epsilon max, the considered mesh face should be &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;  redifined by adding a point on the curve.&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
        </property>
        <property name="title">
@@ -388,13 +381,13 @@ If the Units parameter is absolute, the tolerance parameter is expressed in mode
 if P=2 and point coordinaters are givin in millimetre, it menas that the maximal chordal deviation is 2 mm </string>
         </property>
         <property name="maximum">
-         <double>10000.000000000000000</double>
+         <double>100000.000000000000000</double>
         </property>
         <property name="singleStep">
          <double>1.000000000000000</double>
         </property>
         <property name="value">
-         <double>1.000000000000000</double>
+         <double>0.100000000000000</double>
         </property>
        </widget>
       </widget>
@@ -664,7 +657,7 @@ p, li { white-space: pre-wrap; }
 &lt;tr&gt;
 &lt;td style=&quot;border: none;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Geometrical approximation :  Maximum angle allowed between a face and a curve &lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(not separated by a ridge). &lt;/span&gt;0.04 corresponds to 16.26 degrees  (arccos(1-0.04))&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(not separated by a ridge).&lt;/span&gt;)&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
         </property>
        </widget>
@@ -794,13 +787,16 @@ p, li { white-space: pre-wrap; }
          </rect>
         </property>
         <property name="minimum">
-         <double>-100.000000000000000</double>
+         <double>0.010000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
         </property>
         <property name="singleStep">
-         <double>0.010000000000000</double>
+         <double>0.100000000000000</double>
         </property>
         <property name="value">
-         <double>-2.000000000000000</double>
+         <double>100.000000000000000</double>
         </property>
        </widget>
        <widget class="QLabel" name="label_9">
@@ -843,13 +839,16 @@ p, li { white-space: pre-wrap; }
          </rect>
         </property>
         <property name="minimum">
-         <double>-100.000000000000000</double>
+         <double>0.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
         </property>
         <property name="singleStep">
-         <double>0.010000000000000</double>
+         <double>0.100000000000000</double>
         </property>
         <property name="value">
-         <double>-2.000000000000000</double>
+         <double>5.000000000000000</double>
         </property>
        </widget>
       </widget>
@@ -892,68 +891,80 @@ New created vertices  are saved in the .mesh file under keyword section Vertices
       <attribute name="title">
        <string>Generic Options</string>
       </attribute>
-      <widget class="QWidget" name="layoutWidget">
+      <widget class="QGroupBox" name="groupBox_4">
        <property name="geometry">
         <rect>
-         <x>40</x>
-         <y>160</y>
-         <width>441</width>
-         <height>27</height>
+         <x>10</x>
+         <y>30</y>
+         <width>741</width>
+         <height>131</height>
         </rect>
        </property>
-       <layout class="QHBoxLayout" name="horizontalLayout_3">
-        <item>
-         <widget class="QLabel" name="label">
-          <property name="text">
-           <string>Verbosity Level</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer_2">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>28</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item>
-         <widget class="QSpinBox" name="SP_Verbosity">
-          <property name="maximum">
-           <number>10</number>
-          </property>
-          <property name="value">
-           <number>3</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="layoutWidget_2">
-       <property name="geometry">
-        <rect>
-         <x>40</x>
-         <y>210</y>
-         <width>441</width>
-         <height>27</height>
-        </rect>
+       <property name="title">
+        <string>Yams Generic Options</string>
        </property>
-       <layout class="QHBoxLayout" name="horizontalLayout_4">
-        <item>
-         <widget class="QLabel" name="label_6">
-          <property name="minimumSize">
-           <size>
-            <width>225</width>
-            <height>25</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+       <widget class="QWidget" name="layoutWidget">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>441</width>
+          <height>27</height>
+         </rect>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Verbosity Level</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>28</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="SP_Verbosity">
+           <property name="maximum">
+            <number>10</number>
+           </property>
+           <property name="value">
+            <number>7</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="layoutWidget_2">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>70</y>
+          <width>441</width>
+          <height>27</height>
+         </rect>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
+         <item>
+          <widget class="QLabel" name="label_6">
+           <property name="minimumSize">
+            <size>
+             <width>225</width>
+             <height>25</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
@@ -961,26 +972,26 @@ p, li { white-space: pre-wrap; }
 &lt;tr&gt;
 &lt;td style=&quot;border: none;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory size (in Mbytes)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <spacer name="horizontalSpacer_3">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>28</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item>
-         <widget class="QSpinBox" name="SP_Memory">
-          <property name="toolTip">
-           <string>The program requires roughly about 370 bytes per point. It is thus possible to estimate a priori 
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>28</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="SP_Memory">
+           <property name="toolTip">
+            <string>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.
@@ -993,56 +1004,70 @@ 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.</string>
-          </property>
-          <property name="maximum">
-           <number>100000</number>
-          </property>
-          <property name="value">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QPushButton" name="PB_ParamsFileExplorer">
-       <property name="geometry">
-        <rect>
-         <x>40</x>
-         <y>40</y>
-         <width>30</width>
-         <height>31</height>
-        </rect>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="icon">
-        <iconset>
-         <normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</iconset>
-       </property>
-      </widget>
-      <widget class="QLineEdit" name="LE_ParamsFile">
-       <property name="geometry">
-        <rect>
-         <x>80</x>
-         <y>40</y>
-         <width>661</width>
-         <height>31</height>
-        </rect>
-       </property>
+           </property>
+           <property name="maximum">
+            <number>100000</number>
+           </property>
+           <property name="value">
+            <number>0</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
       </widget>
-      <widget class="QLabel" name="label_10">
+      <widget class="QGroupBox" name="groupBox_6">
        <property name="geometry">
         <rect>
-         <x>40</x>
-         <y>10</y>
-         <width>391</width>
-         <height>18</height>
+         <x>10</x>
+         <y>230</y>
+         <width>741</width>
+         <height>141</height>
         </rect>
        </property>
-       <property name="text">
-        <string>File used to save Yams Params :</string>
+       <property name="title">
+        <string>Plug-In Generic Options</string>
        </property>
+       <widget class="QLabel" name="label_10">
+        <property name="geometry">
+         <rect>
+          <x>20</x>
+          <y>40</y>
+          <width>391</width>
+          <height>18</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>File used to save Yams Params :</string>
+        </property>
+       </widget>
+       <widget class="QPushButton" name="PB_ParamsFileExplorer">
+        <property name="geometry">
+         <rect>
+          <x>20</x>
+          <y>70</y>
+          <width>30</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</iconset>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_ParamsFile">
+        <property name="geometry">
+         <rect>
+          <x>60</x>
+          <y>70</y>
+          <width>661</width>
+          <height>31</height>
+         </rect>
+        </property>
+       </widget>
       </widget>
      </widget>
     </widget>
diff --git a/src/Tools/YamsPlug/doc/Advanced_params.rst b/src/Tools/YamsPlug/doc/Advanced_params.rst
new file mode 100644 (file)
index 0000000..3c83be1
--- /dev/null
@@ -0,0 +1,42 @@
+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.
+
diff --git a/src/Tools/YamsPlug/doc/Generics_params.rst b/src/Tools/YamsPlug/doc/Generics_params.rst
new file mode 100644 (file)
index 0000000..32b31b1
--- /dev/null
@@ -0,0 +1,22 @@
+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
+
diff --git a/src/Tools/YamsPlug/doc/Mandatory_params.rst b/src/Tools/YamsPlug/doc/Mandatory_params.rst
new file mode 100644 (file)
index 0000000..c752c69
--- /dev/null
@@ -0,0 +1,101 @@
+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.
+
diff --git a/src/Tools/YamsPlug/doc/conf.py b/src/Tools/YamsPlug/doc/conf.py
new file mode 100644 (file)
index 0000000..e3d5776
--- /dev/null
@@ -0,0 +1,179 @@
+# -*- 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
diff --git a/src/Tools/YamsPlug/doc/editHypo.rst b/src/Tools/YamsPlug/doc/editHypo.rst
new file mode 100644 (file)
index 0000000..414d8ad
--- /dev/null
@@ -0,0 +1,60 @@
+.. _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
+
+
+
diff --git a/src/Tools/YamsPlug/doc/images/Advanced.png b/src/Tools/YamsPlug/doc/images/Advanced.png
new file mode 100644 (file)
index 0000000..bd91a17
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Advanced.png differ
diff --git a/src/Tools/YamsPlug/doc/images/AppelYams.png b/src/Tools/YamsPlug/doc/images/AppelYams.png
new file mode 100644 (file)
index 0000000..a18b9ef
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/AppelYams.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Generic.png b/src/Tools/YamsPlug/doc/images/Generic.png
new file mode 100644 (file)
index 0000000..fb37ab4
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Generic.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Simple.png b/src/Tools/YamsPlug/doc/images/Simple.png
new file mode 100644 (file)
index 0000000..98cf1b9
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Simple.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Tolerance.png b/src/Tools/YamsPlug/doc/images/Tolerance.png
new file mode 100644 (file)
index 0000000..6df0c80
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Tolerance.png differ
diff --git a/src/Tools/YamsPlug/doc/index.rst b/src/Tools/YamsPlug/doc/index.rst
new file mode 100644 (file)
index 0000000..8640446
--- /dev/null
@@ -0,0 +1,28 @@
+.. 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
+   
+   
+
+
diff --git a/src/Tools/YamsPlug/doc/lct.rst b/src/Tools/YamsPlug/doc/lct.rst
new file mode 100644 (file)
index 0000000..6f3bc51
--- /dev/null
@@ -0,0 +1,11 @@
+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
index 3e995c21ac1f9c65703ed408bc571b1f5a898f4a..653644e21337bd83efdf2203fbc3976ff0a67228 100644 (file)
@@ -268,8 +268,8 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
       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()!=-2 : self.commande+=',maxsize=%f'%self.SP_MaxSize.value()
-      if self.SP_MinSize.value()!=-2 : self.commande+=',minsize=%f'%self.SP_MinSize.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'
 
@@ -285,12 +285,10 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
         self.RB_U.setChecked(False)
         self.RB_S.setChecked(False)
         self.RB_2.setChecked(False)
-        self.RB__2.setChecked(False)
         self.RB_1.setChecked(False)
-        self.RB__1.setChecked(False)
         self.RB_Absolute.setChecked(False)
         self.RB_Relative.setChecked(True)
-        self.SP_Tolerance.setProperty("value", 1.0)
+        self.SP_Tolerance.setProperty("value", 0.1)
         self.SP_Geomapp.setProperty("value", 0.04)
         self.SP_Ridge.setProperty("value", 45.0)
         self.SP_Gradation.setProperty("value", 1.3)
index 612e0faa889885f25214c768e6e4c392b03348cc..ebea5765048c944da6b3d53db10a3b17d65d5214 100644 (file)
@@ -23,6 +23,7 @@ import salome_pluginsmanager
 
 from spadderPlugin import runSpadderPlugin
 from meshcut_plugin import MeshCut
+from yamsplug_plugin import YamsLct
 
 salome_pluginsmanager.AddFunction('PADDER mesher',
                                   'Create a mesh with PADDER',
@@ -31,3 +32,7 @@ salome_pluginsmanager.AddFunction('PADDER mesher',
 salome_pluginsmanager.AddFunction('MeshCut',
                                   'Cut a tetrahedron mesh by a plane',
                                   MeshCut)
+
+salome_pluginsmanager.AddFunction('ReMesh with Yams',
+                                  'Run Yams',
+                                  YamsLct)