Salome HOME
Yams Plugin
authorpnoyret <pnoyret>
Thu, 11 Oct 2012 07:56:03 +0000 (07:56 +0000)
committerpnoyret <pnoyret>
Thu, 11 Oct 2012 07:56:03 +0000 (07:56 +0000)
configure.ac
src/Tools/Makefile.am
src/Tools/YamsPlug/Makefile.am [new file with mode: 0644]
src/Tools/YamsPlug/ViewText.ui [new file with mode: 0644]
src/Tools/YamsPlug/YamsPlugDialog.ui [new file with mode: 0644]
src/Tools/YamsPlug/monViewText.py [new file with mode: 0644]
src/Tools/YamsPlug/monYamsPlugDialog.py [new file with mode: 0644]
src/Tools/YamsPlug/select1.png [new file with mode: 0644]
src/Tools/YamsPlug/yamsplug_plugin.py [new file with mode: 0644]

index 7947e5db6a6705c712b4bc841c78877bb2d35f76..bbc18f64faad8a36a000ab2f9c2d6ed4fcb9ac24 100644 (file)
@@ -574,6 +574,7 @@ AC_OUTPUT([ \
   src/SMESH_PY/Makefile \
   src/Tools/Makefile \
   src/Tools/MeshCut/Makefile \
+  src/Tools/YamsPlug/Makefile \
   src/Tools/padder/Makefile \
   src/Tools/padder/meshjob/Makefile \
   src/Tools/padder/meshjob/idl/Makefile \
index cae255b859183a8ab16b0172703208f32528d082..15af73669adabbfeee1bcf5e714a77c12d7daffe 100644 (file)
@@ -25,7 +25,7 @@
 #
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
-SUBDIRS = MeshCut padder
+SUBDIRS = MeshCut padder YamsPlug
 
 salomeplugins_PYTHON = \
        smesh_plugins.py
diff --git a/src/Tools/YamsPlug/Makefile.am b/src/Tools/YamsPlug/Makefile.am
new file mode 100644 (file)
index 0000000..a94bf71
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) 2007-2012  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
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+salomeplugins_PYTHON = \
+       YamsPlugDialog.py\
+       monYamsPlugDialog.py\
+        ViewText.py\
+        monViewText.py\
+       yamsplug_plugin.py 
+
+UIPY_FILES = YamsPlugDialog.py  ViewText.py 
+
+if SMESH_ENABLE_GUI
+  nodist_salomescript_SCRIPTS = $(UIPY_FILES)
+endif
+
+CLEANFILES = $(UIPY_FILES)
+
+EXTRA_DIST += $(UIPY_FILES:%.py=%.ui)
+
+%.py : %.ui
+       $(PYUIC) $< -o $@
diff --git a/src/Tools/YamsPlug/ViewText.ui b/src/Tools/YamsPlug/ViewText.ui
new file mode 100644 (file)
index 0000000..18fa63e
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ViewExe</class>
+ <widget class="QDialog" name="ViewExe">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>469</width>
+    <height>489</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Run Yams</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" colspan="2">
+    <widget class="QTextBrowser" name="TB_Exe"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="PB_Ok">
+     <property name="text">
+      <string>Ok</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="PB_Save">
+     <property name="text">
+      <string>Save</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/Tools/YamsPlug/YamsPlugDialog.ui b/src/Tools/YamsPlug/YamsPlugDialog.ui
new file mode 100644 (file)
index 0000000..0113a1b
--- /dev/null
@@ -0,0 +1,1054 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>YamsPlugDialog</class>
+ <widget class="QWidget" name="YamsPlugDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>799</width>
+    <height>602</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Yams : Remeshing tool</string>
+  </property>
+  <property name="sizeGripEnabled" stdset="0">
+   <bool>false</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="PB_OK">
+       <property name="text">
+        <string>Compute</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Cancel">
+       <property name="text">
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_4">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Minimum</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>60</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Save">
+       <property name="text">
+        <string>Save Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Load">
+       <property name="text">
+        <string>Load Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Default">
+       <property name="text">
+        <string>Default Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>338</width>
+         <height>25</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Help">
+       <property name="font">
+        <font>
+         <pointsize>10</pointsize>
+        </font>
+       </property>
+       <property name="text">
+        <string>Help</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QTabWidget" name="TWOptions">
+     <property name="font">
+      <font>
+       <pointsize>10</pointsize>
+      </font>
+     </property>
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="simple">
+      <attribute name="title">
+       <string>Simple Remeshing Options</string>
+      </attribute>
+      <widget class="QGroupBox" name="GBOptim">
+       <property name="geometry">
+        <rect>
+         <x>20</x>
+         <y>140</y>
+         <width>741</width>
+         <height>271</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>Optimisation</string>
+       </property>
+       <widget class="QGroupBox" name="mesRB">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>611</width>
+          <height>209</height>
+         </rect>
+        </property>
+        <layout class="QVBoxLayout" name="monRBLayout">
+         <item>
+          <widget class="QRadioButton" name="RB_0">
+           <property name="toolTip">
+            <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:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;&lt;span style=&quot; font-weight:600;&quot;&gt;Quality improvement&lt;/span&gt; is done by point smoothing and edge swapping&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="text">
+            <string>Quality improvement Only (0)</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_G">
+           <property name="toolTip">
+            <string>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.</string>
+           </property>
+           <property name="text">
+            <string>Pure Geometry Enrichment (G)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_U">
+           <property name="toolTip">
+            <string>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.</string>
+           </property>
+           <property name="text">
+            <string>Uniform Subdivision(U)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_S">
+           <property name="toolTip">
+            <string>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 goemetry.</string>
+           </property>
+           <property name="text">
+            <string>Smoothing (S)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB__2">
+           <property name="toolTip">
+            <string>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</string>
+           </property>
+           <property name="text">
+            <string>Geometrical Mesh : Coarsening(-2)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_2">
+           <property name="toolTip">
+            <string>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</string>
+           </property>
+           <property name="text">
+            <string>Geometrical Mesh :Coarsening and Enrichment (2)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB__1">
+           <property name="toolTip">
+            <string>The given surface triangulation is modfied 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.</string>
+           </property>
+           <property name="text">
+            <string>Mesh for finite element computation : Coarsening (-1)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_1">
+           <property name="toolTip">
+            <string>The given surface triangulation is modfied 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  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</string>
+           </property>
+           <property name="text">
+            <string>Mesh for finite element computation : Coarsening and Enrichment  (1)</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="GBUnit">
+       <property name="geometry">
+        <rect>
+         <x>20</x>
+         <y>420</y>
+         <width>301</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <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:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&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">
+        <string>Units</string>
+       </property>
+       <widget class="QRadioButton" name="RB_Absolute">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>110</width>
+          <height>24</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>Values are expressed in the model units.</string>
+        </property>
+        <property name="text">
+         <string>Absolute</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+       <widget class="QRadioButton" name="RB_Relative">
+        <property name="geometry">
+         <rect>
+          <x>160</x>
+          <y>30</y>
+          <width>110</width>
+          <height>24</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>Values are relative to the bounding box size.</string>
+        </property>
+        <property name="text">
+         <string>Relative</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="GBTolerance_2">
+       <property name="geometry">
+        <rect>
+         <x>410</x>
+         <y>430</y>
+         <width>351</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <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:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;Set chordal deviation tolerance:&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 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;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       </property>
+       <property name="title">
+        <string>Chordal deviation Tolerance</string>
+       </property>
+       <widget class="QDoubleSpinBox" name="SP_Tolerance">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>81</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <stylestrategy>PreferDefault</stylestrategy>
+         </font>
+        </property>
+        <property name="mouseTracking">
+         <bool>true</bool>
+        </property>
+        <property name="toolTip">
+         <string>If the Units parameter is relative epsilon max correspond to 0.0001x s x tolerance parameter where s is the size of the bounding box of the domain.
+If the Units parameter is absolute, the tolerance parameter is expressed in model units :
+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>
+        </property>
+        <property name="singleStep">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.000000000000000</double>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>741</width>
+         <height>121</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>12</pointsize>
+        </font>
+       </property>
+       <property name="title">
+        <string>Original Mesh</string>
+       </property>
+       <widget class="QPushButton" name="PB_MeshFile">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>70</y>
+          <width>191</width>
+          <height>33</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+        <property name="text">
+         <string>Mesh File (GMF format)</string>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_MeshFile">
+        <property name="geometry">
+         <rect>
+          <x>240</x>
+          <y>70</y>
+          <width>481</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+       </widget>
+       <widget class="QPushButton" name="PB_MeshSmesh">
+        <property name="geometry">
+         <rect>
+          <x>190</x>
+          <y>30</y>
+          <width>41</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>
+        <property name="iconSize">
+         <size>
+          <width>18</width>
+          <height>18</height>
+         </size>
+        </property>
+        <property name="checkable">
+         <bool>false</bool>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_MeshSmesh">
+        <property name="geometry">
+         <rect>
+          <x>240</x>
+          <y>30</y>
+          <width>481</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_7">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>141</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+          <strikeout>false</strikeout>
+         </font>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::Box</enum>
+        </property>
+        <property name="text">
+         <string>Smesh mesh</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_8">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>80</y>
+          <width>31</width>
+          <height>18</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>or</string>
+        </property>
+       </widget>
+      </widget>
+      <zorder>GBUnit</zorder>
+      <zorder>GBTolerance_2</zorder>
+      <zorder>groupBox</zorder>
+      <zorder>GBOptim</zorder>
+     </widget>
+     <widget class="QWidget" name="advanced">
+      <attribute name="title">
+       <string>Advanced  Remeshing Options</string>
+      </attribute>
+      <widget class="QGroupBox" name="groupBox_2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>761</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can disable :</string>
+       </property>
+       <widget class="QCheckBox" name="CB_Ridge">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>20</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>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)  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.</string>
+        </property>
+        <property name="text">
+         <string>ridge detection</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+       <widget class="QCheckBox" name="CB_Point">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>40</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>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.</string>
+        </property>
+        <property name="text">
+         <string>point smoothing</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_5">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>100</y>
+         <width>761</width>
+         <height>321</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can control </string>
+       </property>
+       <widget class="QDoubleSpinBox" name="SP_Geomapp">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="maximum">
+         <double>0.890000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.040000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_2">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>20</y>
+          <width>631</width>
+          <height>61</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This field (as well as tolerance) enables the user to control the accuracy of the
+piecewise linear approximation of the surface. This parameter enables the user to
+control the maximal angle allowed between two adjacent faces. It can be used to 
+bound the maximal deviation of the mesh faces from the tangent planes at mesh vertices. 
+In other words, it avoids having sharp angles between faces representing a smooth curve.
+This parameter enables the user to specify the maximal chordal deviation &quot;max relatively to the curvature.
+Following that criterion:
+- if the chordal deviation epsilon  is smaller than epsilon max *r, it is acceptable to remove the considered point;
+- if the chordal deviation epsilon is greater than epsiolon max*r, the considered mesh face should be redefined 
+by adding a point on the curve.
+One can see that the smaller the radius r, the harder it is to satisfy this criterion:  
+epsilon max is a real value corresponding to a percentage, the ratio between the chordal deviation to 
+the local curvature. This field is used only for optimisation style -O values of  -1, 0 and 1.
+The default value for &quot;max is set to 0:04 which leads to angles of less than 33 degrees between two adjacent
+faces .</string>
+        </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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;-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>
+       <widget class="QLabel" name="label_4">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>70</y>
+          <width>581</width>
+          <height>71</height>
+         </rect>
+        </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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;Ridge angle:&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 angle between the normal vectors of two adjacent faces exceeds&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 value, the edge common to the faces is a ridge&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>
+       <widget class="QDoubleSpinBox" name="SP_Ridge">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>90</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="maximum">
+         <double>90.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>45.000000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_5">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>140</y>
+          <width>521</width>
+          <height>41</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter allows the user to prescribe  a maximal size hmax
+for the mesh elements i.e., the lengths of the edges with respect to the specified
+ size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+The default values are automatically set based on the surface geometry (curvature dependent) and its
+bounding box size.
+Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
+size  may be slightly bigger than the prescribed ones.</string>
+        </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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;Maximal size allowed around vertices:&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;the lengths of the edges with respect to the specified size map.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_3">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>240</y>
+          <width>591</width>
+          <height>61</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter enables the user to control the element size variation in the triangulation.
+Yams will avoid getting two adjacent edges which sizes differ by a factor bigger than this parameter. 
+To avoid rapid size variations, a size correction procedure is applied to the size map. 
+In other words: if two adjacent edges are respectively e1 and e2 long 
+if  e2 &gt; parameter * e1 then e02 the new size for the second edge will be set to  parameter* e1.
+This procedure is de-activated if yams computes a mesh for finite element with only coarsening.
+The default value is 1.3, which is the usual value set for computational meshes.</string>
+        </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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;Mesh Gradation ie the element size variation in the triangulation:&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;Yams will avoid having two adjacent edges which sizes &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;vary more than the given gradation.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_Gradation">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>250</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.300000000000000</double>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_MaxSize">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>150</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="minimum">
+         <double>-100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>-2.000000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_9">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>190</y>
+          <width>521</width>
+          <height>41</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter allows the user to prescribe  a maximal size hmax
+for the mesh elements i.e., the lengths of the edges with respect to the specified
+ size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+The default values are automatically set based on the surface geometry (curvature dependent) and its
+bounding box size.
+Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
+size  may be slightly bigger than the prescribed ones.</string>
+        </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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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;Minimal size allowed around vertices:&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;the lengths of the edges with respect to the specified size map.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_MinSize">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>200</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="minimum">
+         <double>-100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>-2.000000000000000</double>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_3">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>440</y>
+         <width>751</width>
+         <height>61</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can enable :</string>
+       </property>
+       <widget class="QCheckBox" name="CB_SplitEdge">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>20</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>if set, Yams creates new vertices placed on the curved surface and adds them to elements. 
+It means one extra vertex on edge (P2 or quadratic triangles).
+New created vertices  are saved in the .mesh file under keyword section Vertices</string>
+        </property>
+        <property name="text">
+         <string>split edge</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="generic">
+      <attribute name="title">
+       <string>Generic Options</string>
+      </attribute>
+      <widget class="QWidget" name="layoutWidget">
+       <property name="geometry">
+        <rect>
+         <x>40</x>
+         <y>160</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>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>
+       <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;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&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 
+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.
+The memory needed for mesh modification is allocated dynamically at the beginning of the procedure 
+(data reading), based on the initial triangulation size. When the program reaches the amount of maximal 
+memory allowed, it will stop inserting points and, if possible, the current mesh will be saved as it is, 
+valid and conformal, provided the input mesh was valid and conformal.
+Specify the memory if:
+- the automatically allocated memory reveals insufficient when the user asked to enrich the given mesh;
+- 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>
+      </widget>
+      <widget class="QLabel" name="label_10">
+       <property name="geometry">
+        <rect>
+         <x>40</x>
+         <y>10</y>
+         <width>391</width>
+         <height>18</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>File used to save Yams Params :</string>
+       </property>
+      </widget>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py
new file mode 100644 (file)
index 0000000..19dcd3e
--- /dev/null
@@ -0,0 +1,86 @@
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012   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
+#
+# Modules Python
+import string,types,os
+import traceback
+
+from PyQt4 import *
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+# Import des panels
+
+# ------------------------------- #
+from ViewText import Ui_ViewExe
+class MonViewText(Ui_ViewExe,QDialog):
+# ------------------------------- #
+    """
+    Classe permettant la visualisation de texte
+    """
+    def __init__(self,parent,txt):
+        QDialog.__init__(self,parent)
+        self.setupUi(self)
+        self.resize( QSize(600,600).expandedTo(self.minimumSizeHint()) )
+        self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") )
+        self.connect( self.PB_Save,SIGNAL("clicked()"), self.saveFile )
+        self.monExe=QProcess(self)
+
+
+        self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut )
+        self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr )
+      
+        # Je n arrive pas a utiliser le setEnvironment du QProcess
+        # fonctionne hors Salome mais pas dans Salome ???
+        LICENCE=os.environ['DISTENE_LICENCE_FILE_FOR_YAMS']
+        txt='export DISTENE_LICENSE_FILE='+LICENCE+';'+ txt
+        pid=self.monExe.pid()
+        nomFichier='/tmp/yam_'+str(pid)+'.py'
+        f=open(nomFichier,'w')
+        f.write(txt)
+        f.close()
+
+        maBidouille='sh  ' + nomFichier
+        self.monExe.start(maBidouille)
+        self.monExe.closeWriteChannel()
+        self.show()
+
+        
+    def saveFile(self):
+        #recuperation du nom du fichier
+        savedir=os.environ['HOME']
+        fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir)
+        if fn.isNull() : return
+        ulfile = os.path.abspath(unicode(fn))
+        try:
+           f = open(fn, 'wb')
+           f.write(str(self.TB_Exe.toPlainText()))
+           f.close()
+        except IOError, why:
+           QMessageBox.critical(self, self.trUtf8('Save File'),
+                self.trUtf8('The file <b>%1</b> could not be saved.<br>Reason: %2')
+                    .arg(unicode(fn)).arg(str(why)))
+
+    def readFromStdErr(self):
+        a=self.monExe.readAllStandardError()
+        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a))) ;
+
+    def readFromStdOut(self) :
+        a=self.monExe.readAllStandardOutput()
+        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a))) ;
diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py
new file mode 100644 (file)
index 0000000..3e995c2
--- /dev/null
@@ -0,0 +1,318 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2012   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
+#
+# Modules Python
+# Modules Eficas
+
+import os
+from YamsPlugDialog import Ui_YamsPlugDialog
+from monViewText import MonViewText
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+
+class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
+  """
+  """
+  def __init__(self):
+        QWidget.__init__(self)
+        self.setupUi(self)
+        self.connecterSignaux()
+        self.fichierIn=""
+        self.fichierOut=""
+        self.MeshIn="" 
+        self.num=1
+
+#      Ces parametres ne sont pas remis à rien par le clean
+        self.paramsFile= os.path.abspath(os.path.join(os.environ['HOME'],'.yams.dat'))
+        self.LE_ParamsFile.setText(self.paramsFile)
+        self.LE_MeshFile.setText("")
+        self.LE_MeshSmesh.setText("")
+
+  def connecterSignaux(self) :
+        self.connect(self.PB_Cancel,SIGNAL("clicked()"),self.PBCancelPressed)
+        self.connect(self.PB_Default,SIGNAL("clicked()"),self.clean)
+        self.connect(self.PB_Help,SIGNAL("clicked()"),self.PBHelpPressed)
+        self.connect(self.PB_Load,SIGNAL("clicked()"),self.PBLoadPressed)
+        self.connect(self.PB_OK,SIGNAL("clicked()"),self.PBOKPressed)
+        self.connect(self.PB_Save,SIGNAL("clicked()"),self.PBSavePressed)
+        self.connect(self.PB_MeshFile,SIGNAL("clicked()"),self.PBMeshFilePressed)
+        self.connect(self.PB_MeshSmesh,SIGNAL("clicked()"),self.PBMeshSmeshPressed)
+        self.connect(self.PB_ParamsFileExplorer,SIGNAL("clicked()"),self.setParamsFileName)
+        self.connect(self.LE_MeshFile,SIGNAL("returnPressed()"),self.meshFileNameChanged)
+        self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged)
+
+
+  def PBHelpPressed(self):
+        try :
+          maDoc=os.environ['DISTENE_YAMS_DOC_PDF']
+          commande='kpdf '+maDoc
+          os.system (commande)
+        except:
+          QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found")
+
+
+  def PBOKPressed(self):
+        if not(self.PrepareLigneCommande()) : return
+        self.PBSavePressed(NomHypo=True)
+        maFenetre=MonViewText(self,self.commande)
+        if os.path.isfile(self.fichierOut) :self.enregistreResultat()
+
+  def enregistreResultat(self):
+        import smesh
+        import SMESH
+        import salome
+        from salome.kernel import studyedit
+
+        maStudy=studyedit.getActiveStudy()
+        smesh.SetCurrentStudy(maStudy)
+        (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
+        meshname = 'yams'+str(self.num)
+        smesh.SetName(outputMesh.GetMesh(), meshname)
+        outputMesh.Compute()
+
+
+        self.editor = studyedit.getStudyEditor()    # 
+        moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
+        HypReMeshEntry = self.editor.findOrCreateItem( moduleEntry, name = 'HypoForRemesh',
+                                           comment = 'HypoForRemshing')
+        monStudyBuilder=maStudy.NewBuilder();
+        monStudyBuilder.NewCommand();
+        newStudyIter=monStudyBuilder.NewObject(HypReMeshEntry)
+        aNameAttrib=monStudyBuilder.FindOrCreateAttribute(newStudyIter,"AttributeName")
+        hypoName = 'monHypo_Yams_'+str(self.num)
+        aNameAttrib.SetValue(hypoName)
+        aCommentAttrib=monStudyBuilder.FindOrCreateAttribute(newStudyIter,"AttributeComment")
+        aCommentAttrib.SetValue(str(self.commande))
+        
+        SOMesh=maStudy.FindObjectByName(meshname ,"SMESH")[0]
+        newLink=monStudyBuilder.NewObject(SOMesh)
+        monStudyBuilder.Addreference(newLink, newStudyIter);
+        if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(0)
+        self.num+=1
+        return True
+
+  def PBSavePressed(self,NomHypo=False):
+        if NomHypo : text = '# Params for Hypothese : monHypo_Yams_'+str(self.num - 1)+"\n"
+        else :       text = '# Save intermediate params \n' 
+        text += "# Params for mesh : " +  self.LE_MeshSmesh.text() +'\n'
+        for RB in self.GBOptim.findChildren(QRadioButton,):
+            if RB.isChecked()==True:
+               text+="Optimisation ='"+RB.text()+"'\n"
+               break
+        for RB in self.GBUnit.findChildren(QRadioButton,):
+            if RB.isChecked()==True:
+               text+="Units ='"+RB.text()+"'\n"
+        text+='Chordal_Tolerance_Deviation='+str(self.SP_Tolerance.value())+'\n'
+
+        text+='Ridge_Detection=' + str(self.CB_Ridge.isChecked())+'\n'
+        text+='Split_Edge='      + str(self.CB_SplitEdge.isChecked())+'\n'
+        text+='Point_Smoothing=' + str(self.CB_Point.isChecked())+'\n'
+        text+='Geometrical_Approximation='+ str(self.SP_Geomapp.value())  +'\n'
+        text+='Ridge_Angle='              + str(self.SP_Ridge.value())    +'\n'
+        text+='Maximum_Size='             + str(self.SP_MaxSize.value())  +'\n'
+        text+='Minimum_Size='             + str(self.SP_MaxSize.value())  +'\n'
+        text+='Mesh_Gradation='           + str(self.SP_Gradation.value())+'\n'
+
+        text+='Verbosity='                + str(self.SP_Verbosity.value())+'\n'
+        text+='Memory='                   + str(self.SP_Memory.value())+'\n'
+        text+='\n\n'
+
+        try :
+           f=open(self.paramsFile,'a')
+        except :
+           QMessageBox.warning( self, "File", "Unable to open "+self.paramsFile)
+           return
+        try :
+           f.write(text)
+        except :
+           QMessageBox.warning( self, "File", "Unable to write "+self.paramsFile)
+           return
+        f.close()
+
+  def PBLoadPressed(self):
+        try :
+           f=open(self.paramsFile,'r')
+        except :
+           QMessageBox.warning( self, "File", "Unable to open "+self.paramsFile)
+           return
+        try :
+           text=f.read()
+        except :
+           QMessageBox.warning( self, "File", "Unable to read "+self.paramsFile)
+           return
+        f.close()
+        d={}
+        exec text in d
+        for RB in self.GBOptim.findChildren(QRadioButton,):
+            if d['Optimisation']== RB.text():
+               RB.setChecked(True)
+               break
+        for RB in self.GBUnit.findChildren(QRadioButton,):
+            if d['Units']== RB.text():
+               RB.setChecked(True)
+               break
+        self.SP_Tolerance.setValue(d['Chordal_Tolerance_Deviation'])
+
+        self.CB_Ridge.setChecked(d['Ridge_Detection'])
+        self.CB_Point.setChecked(d['Point_Smoothing'])
+        self.CB_SplitEdge.setChecked(d['Split_Edge'])
+        self.SP_Geomapp.setValue(d['Geometrical_Approximation'])
+        self.SP_Ridge.setValue(d['Ridge_Angle'])
+        self.SP_MaxSize.setValue(d['Maximum_Size'])
+        self.SP_MinSize.setValue(d['Minimum_Size'])
+        self.SP_Gradation.setValue(d['Mesh_Gradation'])
+
+        self.SP_Verbosity.setValue(d['Verbosity'])
+        self.SP_Memory.setValue(d['Memory'])
+
+
+  def PBCancelPressed(self):
+        self.close()
+
+  def PBMeshFilePressed(self):
+       fd = QFileDialog(self, "select an existing Mesh file", self.LE_MeshFile.text(), "Mesh-Files (*.mesh);;All Files (*)")
+       if fd.exec_():
+          infile = fd.selectedFiles()[0]
+          self.LE_MeshFile.setText(infile)
+          self.fichierIn=infile.toLatin1()
+
+  def setParamsFileName(self):
+       fd = QFileDialog(self, "select a file", self.LE_ParamsFile.text(), "dat Files (*.dat);;All Files (*)")
+       if fd.exec_():
+          infile = fd.selectedFiles()[0]
+          self.LE_ParamsFile.setText(infile)
+          self.paramsFile=infile.toLatin1()
+
+
+  def meshFileNameChanged(self):
+      self.fichierIn=self.LE_MeshFile.text()
+      if os.path.exists(self.fichierIn): return
+      QMessageBox.warning( self, "Unknown File", "File doesn't exist")
+
+  def paramsFileNameChanged(self):
+      self.paramsFile=self.LE_ParamsFile.text()
+
+  def PBMeshSmeshPressed(self):
+      import salome
+      import smesh
+      from salome.kernel import studyedit
+      from salome.smesh.smeshstudytools import SMeshStudyTools
+      from salome.gui import helper as guihelper
+      from omniORB import CORBA
+
+      mySObject, myEntry = guihelper.getSObjectSelected()
+      if CORBA.is_nil(mySObject) or mySObject==None:
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return
+      self.smeshStudyTool = SMeshStudyTools()
+      self.__selectedMesh = self.smeshStudyTool.getMeshObjectFromSObject(mySObject)
+      if CORBA.is_nil(self.__selectedMesh):
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return
+      myName = mySObject.GetName()
+      self.MeshIn=myName
+      self.LE_MeshSmesh.setText(myName)
+
+  def prepareFichier(self):
+      self.fichierIn="/tmp/PourYam_"+str(self.num)+".mesh"
+      import SMESH
+      self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn)
+
+  def PrepareLigneCommande(self):
+      self.commande="yams "
+      verbosity=str(self.SP_Verbosity.value())
+      self.commande+="-v "+verbosity
+      for obj in self.mesRB.children():
+          try :
+           if obj.isChecked():
+              self.style=obj.objectName().remove(0,3)
+              self.style.replace("_","-")
+              break
+          except :
+              pass
+      self.commande+=" -O "+self.style.toLatin1()
+      if self.fichierIn=="" and self.MeshIn=="" :
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return False
+      if self.MeshIn!="" : self.prepareFichier()
+      if not (os.path.isfile(self.fichierIn)):
+         QMessageBox.critical(self, "File", "unable to read GMF Mesh in "+str(self.fichierIn))
+         return False
+
+      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.commande+=',tolerance=%f'%self.SP_Tolerance.value()
+      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()!=-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_Gradation.value()!=1.3 : self.commande+=',gradation=%f'%self.SP_MaxSize.value()
+      if self.CB_SplitEdge.isChecked()==True : self.commande+=',splitedge=1'
+
+      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
+      return True
+
+  def clean(self):
+        self.RB_0.setChecked(True)
+        self.RB_G.setChecked(False)
+        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_Geomapp.setProperty("value", 0.04)
+        self.SP_Ridge.setProperty("value", 45.0)
+        self.SP_Gradation.setProperty("value", 1.3)
+        self.CB_Ridge.setChecked(True)
+        self.CB_Point.setChecked(True)
+        self.CB_SplitEdge.setChecked(False)
+        self.SP_MaxSize.setProperty("value", -2.0)
+        self.SP_MinSize.setProperty("value", -2.0)
+        self.SP_Verbosity.setProperty("value", 3)
+        self.SP_Memory.setProperty("value", 0)
+
+
+__dialog=None
+def getDialog():
+    """
+    This function returns a singleton instance of the plugin dialog.
+    c est obligatoire pour faire un show sans parent...
+    """
+    global __dialog
+    if __dialog is None:
+        __dialog = MonYamsPlugDialog()
+    #else :
+    #   __dialog.clean()
+    return __dialog
+
diff --git a/src/Tools/YamsPlug/select1.png b/src/Tools/YamsPlug/select1.png
new file mode 100644 (file)
index 0000000..ecb252a
Binary files /dev/null and b/src/Tools/YamsPlug/select1.png differ
diff --git a/src/Tools/YamsPlug/yamsplug_plugin.py b/src/Tools/YamsPlug/yamsplug_plugin.py
new file mode 100644 (file)
index 0000000..4e04a98
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright (C) 2006-2012  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
+#
+
+# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
+# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
+
+def YamsLct(context):
+  # get context study, studyId, salomeGui
+  study = context.study
+  studyId = context.studyId
+  sg = context.sg
+  
+  import os
+  import subprocess
+  import tempfile
+  from PyQt4 import QtCore
+  from PyQt4 import QtGui
+  from PyQt4.QtGui import QFileDialog
+  from PyQt4.QtGui import QMessageBox
+  
+  try :
+      os.environ['DISTENE_LICENCE_FILE_FOR_YAMS']
+  except:
+      QMessageBox.warning(None,"Products","Distene's products are not installed")
+      return
+  import monYamsPlugDialog
+  window=monYamsPlugDialog.getDialog() 
+  window.show()