Salome HOME
Merge from V6_6_BR (V6_6_0rc2) 11/12/2012
authorvsr <vsr@opencascade.com>
Tue, 11 Dec 2012 13:23:39 +0000 (13:23 +0000)
committervsr <vsr@opencascade.com>
Tue, 11 Dec 2012 13:23:39 +0000 (13:23 +0000)
150 files changed:
configure.ac
doc/salome/gui/SMESH/CMakeLists.txt
doc/salome/gui/SMESH/images/a-creategroup.png
doc/salome/gui/SMESH/images/a-cuttingofquadrangles.png
doc/salome/gui/SMESH/images/creategroup.png
doc/salome/gui/SMESH/images/creategroup_on_filter.png
doc/salome/gui/SMESH/images/dlg_0D_on_all_nodes.png [new file with mode: 0644]
doc/salome/gui/SMESH/images/editgroup.png
doc/salome/gui/SMESH/images/image146.png
doc/salome/gui/SMESH/input/about_meshes.doc
doc/salome/gui/SMESH/input/adding_nodes_and_elements.doc
doc/salome/gui/SMESH/input/additional_hypo.doc
doc/salome/gui/SMESH/input/basic_meshing_algos.doc
doc/salome/gui/SMESH/input/colors_size.doc
doc/salome/gui/SMESH/input/constructing_meshes.doc
doc/salome/gui/SMESH/input/constructing_submeshes.doc
doc/salome/gui/SMESH/input/creating_groups.doc
doc/salome/gui/SMESH/input/cutting_quadrangles.doc
doc/salome/gui/SMESH/input/extrusion.doc
doc/salome/gui/SMESH/input/importing_exporting_meshes.doc
doc/salome/gui/SMESH/input/removing_nodes_and_elements.doc
doc/salome/gui/SMESH/input/reorient_faces.doc
doc/salome/gui/SMESH/input/selection_filter_library.doc
doc/salome/gui/SMESH/input/smeshpy_interface.doc
doc/salome/gui/SMESH/input/tui_modifying_meshes.doc
doc/salome/gui/SMESH/input/tui_use_existing_faces.doc
doc/salome/gui/SMESH/input/uniting_set_of_triangles.doc
idl/SMESH_Gen.idl
idl/SMESH_Mesh.idl
idl/SMESH_MeshEditor.idl
resources/Makefile.am
resources/StdMeshers.xml
resources/mesh_0D_elem.png [new file with mode: 0644]
resources/mesh_0D_on_all_nodes.png [new file with mode: 0644]
src/DriverGMF/DriverGMF.cxx [new file with mode: 0644]
src/DriverGMF/DriverGMF.hxx [new file with mode: 0644]
src/DriverGMF/DriverGMF_Read.cxx
src/DriverGMF/DriverGMF_Read.hxx
src/DriverGMF/DriverGMF_Write.cxx
src/DriverGMF/DriverGMF_Write.hxx
src/DriverGMF/Makefile.am
src/SMDS/SMDS_MemoryLimit.cxx
src/SMESH/SMESH_Gen.cxx
src/SMESH/SMESH_Hypothesis.cxx
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_Mesh.hxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESH/SMESH_MeshEditor.hxx
src/SMESH/SMESH_MesherHelper.cxx
src/SMESH/SMESH_subMesh.cxx
src/SMESH/SMESH_subMesh.hxx
src/SMESHGUI/Makefile.am
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h [new file with mode: 0644]
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_SelectionOp.cxx
src/SMESHGUI/SMESH_images.ts
src/SMESHGUI/SMESH_msg_en.ts
src/SMESHGUI/SMESH_msg_fr.ts
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_Gen_i.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.hxx
src/SMESH_SWIG/smeshDC.py
src/SMESH_SWIG/smesh_algorithm.py
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx
src/Tools/MeshCut/Makefile.am
src/Tools/YamsPlug/YamsPlugDialog.ui
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/padder/doc/images/SMESH_spadder_end.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_inputdialog_concrete.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_inputdialog_start.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_inputdialog_steelbar.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_menu.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_finished.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_ready.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_running.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_plugindialog_published.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_plugindialog_start.png [deleted file]
src/Tools/padder/doc/images/SMESH_spadder_start.png [deleted file]
src/Tools/padder/doc/images/padder_error_noresource.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image01.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image02.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image02bis.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image03.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image04.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image05.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image06.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image07.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image08.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image09.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image10.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image11.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image12.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_image13.png [new file with mode: 0644]
src/Tools/padder/doc/images/padder_sphererendering.png [new file with mode: 0644]
src/Tools/padder/doc/input/padder_userguide.doc
src/Tools/padder/meshjob/idl/MESHJOB.idl
src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx
src/Tools/padder/meshjob/impl/MeshJobManager_i.hxx
src/Tools/padder/resources/Makefile.am
src/Tools/padder/resources/padderexe/Makefile.am [deleted file]
src/Tools/padder/resources/padderexe/buildparticules.py [deleted file]
src/Tools/padder/resources/padderexe/envPadder.sh.in [deleted file]
src/Tools/padder/resources/padderexe/med2/REF_FinalEDMesh.med [deleted file]
src/Tools/padder/resources/padderexe/med2/REF_spheres.dat.xyz [deleted file]
src/Tools/padder/resources/padderexe/med2/concrete.med [deleted file]
src/Tools/padder/resources/padderexe/med2/data.txt [deleted file]
src/Tools/padder/resources/padderexe/med2/ferraill.med [deleted file]
src/Tools/padder/resources/padderexe/med2/ferrtran.med [deleted file]
src/Tools/padder/resources/padderexe/med2/padder.exe [deleted file]
src/Tools/padder/resources/padderexe/med3/concrete.med [deleted file]
src/Tools/padder/resources/padderexe/med3/data.txt [deleted file]
src/Tools/padder/resources/padderexe/med3/ferraill.med [deleted file]
src/Tools/padder/resources/padderexe/med3/padder.exe [deleted file]
src/Tools/padder/resources/padderexe/padder.sh [deleted file]
src/Tools/padder/resources/padderexe/particules.png [deleted file]
src/Tools/padder/resources/testdata/Makefile.am [new file with mode: 0644]
src/Tools/padder/resources/testdata/buildparticules.py [new file with mode: 0755]
src/Tools/padder/resources/testdata/concrete.med [new file with mode: 0644]
src/Tools/padder/resources/testdata/ferraill.med [new file with mode: 0644]
src/Tools/padder/resources/testdata/particules.png [new file with mode: 0644]
src/Tools/padder/resources/testdata/teststudy.hdf [new file with mode: 0644]
src/Tools/padder/spadderpy/__init__.py
src/Tools/padder/spadderpy/gui/inputdialog.py
src/Tools/padder/spadderpy/gui/plugindialog.py
src/Tools/padder/spadderpy/padder.cfg.in
src/Tools/padder/unittests/usecase_meshJobManager.py

index bbc18f64faad8a36a000ab2f9c2d6ed4fcb9ac24..e16a306a3385388725838f2db4408602a6b455da 100644 (file)
@@ -24,7 +24,7 @@
 # Modified by : Alexander BORODIN (OCN) - autotools usage
 # Created from configure.in.base
 #
-AC_INIT([Salome2 Project SMESH module], [6.5.0], [webmaster.salome@opencascade.com], [SalomeSMESH])
+AC_INIT([Salome2 Project SMESH module], [6.6.0], [webmaster.salome@opencascade.com], [SalomeSMESH])
 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
@@ -588,8 +588,7 @@ AC_OUTPUT([ \
   src/Tools/padder/resources/appligen/Makefile \
   src/Tools/padder/resources/appligen/appligen.sh \
   src/Tools/padder/resources/appligen/config_appli.xml \
-  src/Tools/padder/resources/padderexe/Makefile \
-  src/Tools/padder/resources/padderexe/envPadder.sh \
+  src/Tools/padder/resources/testdata/Makefile \
   src/Tools/padder/unittests/Makefile \
   src/Tools/padder/unittests/autotest.sh \
   src/Tools/padder/doc/Makefile \
index 36a8a4a4f5c3fe3a463ba29accadc35b5b9c42c6..b15f60980f24178e0c076bda74e27e2c4a33ac3a 100644 (file)
@@ -23,7 +23,7 @@ SET(top_builddir ${CMAKE_BINARY_DIR})
 SET(top_srcdir ${CMAKE_SOURCE_DIR})
 SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR})
 SET(builddir ${CMAKE_CURRENT_BINARY_DIR})
-SET(datadir${CMAKE_INSTALL_PREFIX}/share)
+SET(datadir ${CMAKE_INSTALL_PREFIX}/share)
 SET(docdir ${datadir}/doc/salome)
 SET(guidocdir ${docdir}/gui/SMESH)
 
@@ -32,7 +32,7 @@ SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py)
 SALOME_CONFIGURE_FILE(static/header.html.in ${builddir}/static/header.html)
 SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html)
 
-SALOME_INSTALL_SCRIPTS(collect_mesh_methods.py ${CMAKE_INSTALL_PREFIX}/bin/salome)
+SALOME_INSTALL_SCRIPTS(collect_mesh_methods.py bin/salome)
             
 SET(DOC_SMESH_MeshersList StdMeshers)
 SET(f1 "${srcdir}/collect_mesh_methods.py")
@@ -71,8 +71,8 @@ ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} smesh.py ${CMAKE_SOURCE_DIR
   COMMAND mkdir tmp && ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f1} -o tmp/smesh.py StdMeshers
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py
   COMMAND ${DOXYGEN_EXECUTABLE} doxyfile
-  COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; os.remove(r'''smesh.py'''); os.remove(r'''tmp_env.${EXT}'''); shutil.rmtree(r'''tmp''')"
-  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''')"
+  COMMAND ${PYTHON_EXECUTABLE} -c "import os, shutil; os.remove(r'''smesh.py'''); shutil.rmtree(r'''tmp''')"
+  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''', ignore=shutil.ignore_patterns('tmp_env.*', '*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SMESH''')"
   VERBATIM 
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}             
 )
index ee2b6baa4caad954d7152eddcc330c7016684ecd..734e6c82d96f0db5ab662ef5e25797201d53b093 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/a-creategroup.png and b/doc/salome/gui/SMESH/images/a-creategroup.png differ
index 6ae6ee42e03f0a4355f93552178314edb719d542..48eaf88a1da29a2b096e4e6ca7d59c99f5e6adaf 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/a-cuttingofquadrangles.png and b/doc/salome/gui/SMESH/images/a-cuttingofquadrangles.png differ
index ec24a4feda84816946bebe69c6b4f02441fa5c7f..710064bb04eae3fb9e4adbfe1e61339618caa57b 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/creategroup.png and b/doc/salome/gui/SMESH/images/creategroup.png differ
index 0a494c097961fd83740e51bbc66434229ed9fdeb..98e5a581d2706492ac0bce9ed6d3e74640ebce9d 100644 (file)
Binary files a/doc/salome/gui/SMESH/images/creategroup_on_filter.png and b/doc/salome/gui/SMESH/images/creategroup_on_filter.png differ
diff --git a/doc/salome/gui/SMESH/images/dlg_0D_on_all_nodes.png b/doc/salome/gui/SMESH/images/dlg_0D_on_all_nodes.png
new file mode 100644 (file)
index 0000000..842b3bb
Binary files /dev/null and b/doc/salome/gui/SMESH/images/dlg_0D_on_all_nodes.png differ
index fb102242e2924ca975ee51b365be98b424c56174..1a9db084f8b39fe3f8943ed1190f0937dd7e1b23 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/editgroup.png and b/doc/salome/gui/SMESH/images/editgroup.png differ
index a952f5fccfd7ba55a04905a062a33ccd3cc9912e..06c1c036781b72e265e924e0f069d6a9a0d511a1 100755 (executable)
Binary files a/doc/salome/gui/SMESH/images/image146.png and b/doc/salome/gui/SMESH/images/image146.png differ
index 411fc30b55728aa7a436d4fa71540caa326826b7..dc68cff59c883975fd4346dd52875ce32d26b764 100644 (file)
@@ -18,11 +18,11 @@ different meshing parameters than the whole mesh.
 
 Several created meshes can be \subpage building_compounds_page "combined into another mesh".
 
-The whole mesh or it's part can be \subpage copy_mesh_page "copied" into another mesh.
+The whole mesh or its part can be \subpage copy_mesh_page "copied" into another mesh.
 
 Meshing parameters of meshes and sub-meshes can be 
-\subpage editing_meshes_page "edited", then only a path of mesh
-depending on changed parameters will be re-computed.
+\subpage editing_meshes_page "edited", then only the mesh part
+depending on the changed parameters will be re-computed.
 
 Meshes can be edited using the MESH functions destined for 
 \ref modifying_meshes_page "modification" of generated meshes.
index 177f2343dd013f60826b8f4b418bdef330d2b0d7..7f4ff562e03dc93f7ee3014bae06a0ee5332f2eb 100644 (file)
@@ -7,6 +7,7 @@
 <ul>
 <li>\ref adding_nodes_anchor "Nodes"</li>
 <li>\ref adding_0delems_anchor "0D Elements"</li>
+<li>\ref adding_0delems_on_all_nodes_anchor "0D elements on Element Nodes"</li>
 <li>\ref adding_balls_anchor "Ball Elements"</li>
 <li>\ref adding_edges_anchor "Edges"</li>
 <li>\ref adding_triangles_anchor "Triangles"</li>
@@ -35,7 +36,7 @@ a node or element to the specified group or to create it anew using
 <b>Add to group</b> box, that allows choosing an existing group for
 the created node or element or giving the name to a new group. By
 default, the <b>Add to group</b> check box is switched off. If the user
-swiches this check box on, the combo box listing all currently
+switches this check box on, the combo box listing all currently
 existing groups of the corresponding type becomes available. By
 default, no group is selected. In this case, when the user presses
 <b>Apply</b> or <b>Apply & Close</b> button, the warning message box
@@ -71,21 +72,50 @@ created:
 
 \image html add0delement.png
 
-In this dialog box specify nodes which will form your 0d elements by
+In this dialog box specify nodes which will form your 0D elements by
 selecting them in the 3D viewer and click the \b Apply or
 <b>Apply and Close</b> button. Your 0D elements will be created:
 
 \image html add_0delement.png
 
+\anchor adding_0delems_on_all_nodes_anchor
+<h2>Making 0D elements on Element Nodes</h2>
+
+There is another way to create 0D elements. It is possible to create 
+0D elements on all nodes of the selected mesh, sub-mesh, or a group of elements or nodes.
+
+\image html dlg_0D_on_all_nodes.png
+
+In this dialog 
+<ul>
+  <li> The radio-buttons allow choosing the type of object to create 0D elements on.
+    <ul>
+      <li><b> Mesh, sub-mesh, group </b> -  this button allows selecting
+       a mesh, a sub-mesh or a group to create 0D elements on the nodes of its
+        elements. The name of the selected object is shown in the dialog. </li>
+      <li><b> Elements </b> - this button allows selecting elements in the
+        VTK viewer or typing their IDs in the dialog.</li>
+      <li><b> Nodes </b> - this button allows selecting nodes to create
+        0D elements on in the VTK viewer or typing their IDs in the dialog.</li>
+  </ul></li>
+  <li><b> Set Filter </b> button allows selecting elements or nodes 
+by filtering mesh elements or nodes with different criteria
+(see \ref filtering_elements "Filter usage").</li>
+<li> Switching on <b>Add to group</b> check-box allows specifying the
+  name of the group to which all created or found 0D elements  will be added. You can either select an existing group from
+  a drop-down list, or enter the name of the group to be created.</li>
+</ul>
+
+
 \anchor adding_balls_anchor
 <h2>Adding ball elements</h2>
 
 \image html addball.png
 
-In this dialog box specify nodes which will form your ball elements
-either by selecting them in the 3D viewer or by manual entering their IDs,
+In this dialog box specify the nodes, which will form your ball elements,
+either by selecting them in the 3D viewer or by manually entering their IDs,
 specify the ball diameter and click the \b Apply or <b>Apply and
-Close</b> button. Your ball elements with an equal diameter will be created:
+Close</b> button.
 
 \image html add_ball.png
 
index da2631170608b8b25cfbd01e402bfba67060c1ff..2fde9c1428e84a07da9f35f2d52355ac63a68fb2 100644 (file)
@@ -20,8 +20,8 @@ adjacent elements).
 <h2>Quadratic Mesh</h2>
 
 Quadratic Mesh hypothesis allows to build a quadratic mesh (whose
-edges are not straight but broken lines and can be defined by three
-points: first, middle and last) instead of an ordinary one.
+edges are not straight but curved lines and can be defined by three
+points: first, middle and last instead of an ordinary two).
 
 \anchor propagation_anchor
 <h2>Propagation of 1D Hypothesis on opposite edges</h2>
@@ -47,32 +47,33 @@ hypothesis, this hypothesis has one restriction on its work: the total quantity
 segments on all four sides of the face must be even (divisible by 2).
 
 \anchor viscous_layers_anchor
-<h2>Viscous Layers</h2>
-
-<b>Viscous Layers</b> additional hypothesis can be used together with
-some 3D algorithms, Hexahedron(i,j,k) for example. This
-hypothesis allows creation of layers of highly stretched prisms near
-mesh boundary, which is beneficial for high quality viscous
-computations. The prisms constructed on the quadrangular mesh faces are
-actually the hexahedrons.
+<h2>Viscous Layers and Viscous Layers 2D</h2>
 
+<b>Viscous Layers</b> and <b>Viscous Layers 2D </b> additional
+hypotheses can be used together with some 3D algorithms, for example,
+Hexahedron(i,j,k) or 2D algorithms, for example, Triangle
+(MEFISTO), correspondingly. These hypotheses allow creation of layers
+of highly stretched elements, prisms in 3D and quadrilaterals in 2D,
+near mesh boundary, which is beneficial for high quality viscous
+computations.
 
 \image html viscous_layers_hyp.png
 
 <ul>
 <li><b>Name</b> - allows to define the name of the hypothesis.</li>
-<li><b>Total thicknes</b> - gives the total thickness of prism layers.</li>
-<li><b>Number of layers</b> - defines the number of prism layers.</li>
-<li><b>Stretch factor</b> - defines the growth factor of prism height
+<li><b>Total thickness</b> - gives the total thickness of element layers.</li>
+<li><b>Number of layers</b> - defines the number of element layers.</li>
+<li><b>Stretch factor</b> - defines the growth factor of element height
 from the mesh boundary inwards.</li>
-<li><b>Faces without layers</b> - defines geometrical faces on which
-  prism layers should not be constructed. By default the prism layers
-  are not constructed on geometrical faces shared by solids.
-  \note A mesh shown in the 3D Viewer can prevent selection of faces,
-  in this case just hide the mesh. To prevent a long waiting when a
-  geometry with many faces is displayed, a number of faces shown at a time
-  is limited by the value of "Sub-shapes preview chunk size" preference
-  (in Preferences/Mesh/General tab).
+<li><b>Faces (Edges) without layers</b> - defines geometrical faces
+  (or edges in 2D) on which element layers should not be
+  constructed. By default the element layers are not constructed on
+  geometrical faces shared by solids (and edges shared by faces in 2D). 
+  \note A mesh shown in the 3D Viewer can prevent selection of faces
+  and edges, in this case just hide the mesh. To avoid a long wait when a
+  geometry with many faces (or edges) is displayed, the number of faces
+  (edges) shown at a time is limited by the value of "Sub-shapes
+  preview chunk size" preference (in Preferences/Mesh/General tab).
 </li>
 </ul>
 
index a4ebe1c8a0765b9082683f0dbc38e11c3615cd38..ff225d080245f29702cec29551278983e0a36396 100644 (file)
@@ -64,7 +64,7 @@ There is also a number of more specific algorithms:
 </ul>
 \ref use_existing_anchor "Use existing edges" and 
 \ref use_existing_anchor "Use existing faces" algorithms can be
-used to create an 1D or a 2D mesh in a python script.
+used to create a 1D or a 2D mesh in a python script.
 
 \ref constructing_meshes_page "Constructing meshes" page describes in
 detail how to apply meshing algorithms.
index c0953ff09d6aed9961a6bb52ca5acda29b338541..e777e84a186fc4ba9871df3e9d1d241d568acf65 100644 (file)
@@ -14,7 +14,7 @@ shown.
 
 - \b Nodes:
   - \b Color - color of nodes.
-  - \b Type and \b Scale - these options allow changing of the nodes
+  - \b Type and \b Scale - these options allow changing the nodes
     representation (see \subpage point_marker_page "Point Marker" page
     for more details).
 - <b>Edges / wireframe</b>:
@@ -23,13 +23,13 @@ shown.
     in wireframe mode).
 - \b Faces:
   - \b Front - surface color of face elements (seen in shading mode).
-  - \b Back - backside surface color of face elements. Use slider to
-    select this color generated on base of the \b Face color by
+  - \b Back - backside surface color of face elements. Use the slider to
+    select this color generated on the base of the \b Face color by
     changing its brightness and saturation. 
 - \b Volumes:
   - \b Normal - surface color of normal volume elements (seen in shading mode).
-  - \b Reversed - surface color of volume elements. Use slider to
-    select this color generated on base of the \b Normal color by
+  - \b Reversed - surface color of volume elements. Use the slider to
+    select this color generated on the base of the \b Normal color by
     changing its brightness and saturation. 
 - \b Outlines:
   - \b Color - color of element borders in shading mode.
index 23349d0c154d6580aba2f28cd25b7e7f55e564e6..bef709906ca7c7c817eb3d57a1e4b992ed4af6b0 100644 (file)
@@ -37,42 +37,42 @@ written in Python.
     "Create mesh" dialog box contains several tab pages titled \b 3D,
     \b 2D, \b 1D and \b 0D. The title of each page reflects the
     dimension of the CAD model (geometry) the algorithms listed on
-    this page affect to. For example, \b 3D page lists algorithms
+    this page affect. For example, \b 3D page lists the algorithms
     that affect 3D geometrical objects (solids).
 
     \note
-    - Some page(s) can be disabled if the source geometrical
+    - Some page(s) can be disabled if the source geometrical
     object does not include shapes (sub-shapes) of the corresponding
-    dimension(s). For example, if input object is a geometrical face,
+    dimension(s). For example, if the input object is a geometrical face,
     \b 3D page is disabled.
-    - Some algorithms affect on geometry of several dimensions,
-    i.e. "1D-2D" or "1D-2D-3D". If such algorithm is selected by the
-    user, dialog box pages related to the corresponding lower level
+    - Some algorithms affect the geometry of several dimensions,
+    i.e. "1D-2D" or "1D-2D-3D". If such an algorithm is selected by the
+    user, the dialog box pages related to the corresponding lower level
     dimensions are disabled.
     - \b 0D page does not refer to the 0D elements, but to 0D
     geometry (vertices). Mesh module does not provide algorithms that
     produce 0D elements. Currently \b 0D page provides only one
-    algorithm "Segments around vertex" that allows specyfing required
-    size of mesh edges about some selected vertex(vertices).
+    algorithm "Segments around vertex" that allows specyfying the required
+    size of mesh edges about the selected vertex (or vertices).
 
     For example, you need to mesh a 3D object.
 
-    First, type the name for your mesh in the \b Name box, by default,
+    First, type the name of your mesh in the \b Name box, by default,
     it is "Mesh_1". Then select the geometrical object you wish to
     mesh in the Object Browser and click "Select" button near \b Geometry
-    field (if name of the object not yet appeared in \b Geometry field).
+    field (if the name of the object has not yet appeared in \b Geometry field).
 
     \image html image120.png
     <em>"Select" button</em>
 
     Now you can define 3D Algorithm and 3D Hypotheses, which will be
-    applied to solids of your geometrical object. Click the <em>"Add
+    applied to the solids of your geometrical object. Click the <em>"Add
       Hypothesis"</em>  button to add a hypothesis.
 
     \image html image121.png
     <em>"Add Hypothesis" button</em>
 
-    Click the <em>"Edit Hypothesis"</em> button to change values for the
+    Click the <em>"Edit Hypothesis"</em> button to change the values for the
     current hypothesis.
 
     \image html image122.png
@@ -86,14 +86,14 @@ written in Python.
     will be used to mesh faces and edges of your geometry. (Note
     that any object has edges, even if their existence is not
     apparent, for example, a sphere has 4 edges). Note that the
-    choice of hypotheses and of an algorithm of lower dimension depends on
-    the algorithm. 
+    choice of hypotheses and lower dimension algorithms depends on
+    the higher dimension algorithm. 
 
-    Some algorithms generate mesh of several dimensions while others, of
-    only one dimension. In the latter case there must be one Algorithm and zero or several
+    Some algorithms generate mesh of several dimensions, while others
+    produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several
     Hypotheses for each dimension of your object, otherwise you will
     not get any mesh at all. Of course, if you wish to mesh a face,
-    which is a 2D object, you don't need to define 3D Algorithm and
+    which is a 2D object, you do not need to define a 3D Algorithm and
     Hypotheses.
 
     In the <b>Object Browser</b> the structure of the new mesh will be
@@ -122,7 +122,7 @@ written in Python.
       tags).
 
       \image html hypo_sets.png
-      List of sets of hypotheses: <em>[custom]</em>
+      List of sets of hypotheses. Tag <em>[custom]</em> is
       automatically added to the sets defined by the user
   </li>
 </ol>
@@ -164,7 +164,7 @@ Select <b>1D mesh</b> or <b>2D mesh</b> preview mode in the Preview dialog.
 <b>Compute</b> button computes the whole mesh.
 
 When the Preview dialog is closed, the question about the storage of temporarily
-created mesh elements appers:
+created mesh elements appears:
 
 \image html preview_tmp_data.png
 
@@ -185,7 +185,7 @@ Choose "Change submesh priority" from the Mesh menu or a pop-up
 menu. The opened dialog shows a list of submeshes in the order of
 their priority. 
 
-There is an example of submesh order modifications of the Mesh created on a Box
+There is an example of submesh order modifications taking a Mesh created on a Box
 shape. The main Mesh object:
 <ul>
   <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=20</li>
@@ -195,22 +195,22 @@ shape. The main Mesh object:
 The first submesh object <b>Submesh_1</b> created on <b>Face_1</b> is:
 <ul>
   <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=4</li>
-  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis<b>MaxElementArea</b>=1200</li>
+  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
 </ul>
 The second submesh object <b>Submesh_2</b> created on <b>Face_2</b> is:
 <ul>
   <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=8</li>
-  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis<b>MaxElementArea</b>=1200</li>
+  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
 </ul>
 
 And the last submesh object <b>Submesh_3</b> created on <b>Face_3</b> is:
 <ul>
   <li><i>1D</i> <b>Wire discretisation</b> with <b>Number of Segments</b>=12</li>
-  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis<b>MaxElementArea</b>=1200</li>
+  <li><i>2D</i> <b>Triangle (Mefisto)</b> with Hypothesis <b>MaxElementArea</b>=1200</li>
 </ul>
 
 The sub-meshes become concurrent if they share sub-shapes that can be
-meshed with different algorithms (or different hypothesises). In the
+meshed with different algorithms (or different hypotheses). In the
 example, we have three submeshes with concurrent algorithms, because
 they have different hypotheses.
 
@@ -289,21 +289,21 @@ visualizing in magenta the geometrical entity that causes it.
 "Mesh computation/Show a computation result notification" preference 
 to the "Never" value. This option gives the possibility to control mesh
 computation reporting. There are the following possibilities: always
-show information box, only if an error occurs or never. 
+show the information box, show only if an error occurs or never. 
 By default, the information box is always shown after mesh computation operation.
 
 <b>Publish Sub-shape</b> button publishes the sub-shape, whose meshing
-failed, in GEOM component as a child of the mesh geometry, which
+has failed, in GEOM component as a child of the mesh geometry, which
 allows analyzing the problem geometry and creating a submesh on it in
-order to locally tune hypotheses.
+order to locally tune the hypotheses.
 
-If a cause of failure is an invalid input mesh and the algorithm has
-provided information on what mesh entities are bad <b>Show bad Mesh</b> 
-button appears in the dialog. Clicked, it shows bad mesh entities in
+If the failure is caused by an invalid input mesh and the algorithm has
+found which mesh entities are bad, <b>Show bad Mesh</b> 
+button appears in the dialog. Clicked, it shows the bad mesh entities in
 the Viewer in magenta. Sometimes the shown mesh entities are too small
-or/and hidden by other mesh elements, to see them it can be helpful to
-switch the mesh to Wireframe visualization mode or to switch off
-visualization of faces and volumes (if any).
+or/and hidden by other mesh elements. They can be seen after
+switching the mesh to Wireframe visualization mode or switching off
+the visualization of faces and volumes (if any).
 
 \image html show_bad_mesh.png
 <em>Too close nodes causing meshing failure are shown in magenta using <b>Show
@@ -313,22 +313,22 @@ visualization of faces and volumes (if any).
 \anchor use_existing_anchor
 <h2>"Use existing edges" and "Use existing faces" algorithms</h2>
 
-It is possible to create an 1D or a 2D mesh in a python script
+It is possible to create a 1D or a 2D mesh in a python script
 (using <em>AddNode, AddEdge</em> and <em>AddFace</em> commands) and
 then use such sub-meshes in the construction of a 2D or a 3D mesh. For
 this, there exist two algorithms: <b>Use existing edges</b> and <b>Use
-  existing faces</b>. Scenario of their usage is following. For
-example, you want to use standard algorithms to generate 1D and 3D
+  existing faces</b>.
+For example, you want to use standard algorithms to generate 1D and 3D
 meshes and to create 2D mesh by your python code. Then you
 <ul>
-  <li> create a mesh object, assign an 1D algorithm,</li>
-  <li> invoke \b Compute command, which computes an 1D mesh,</li>
+  <li> create a mesh object, assign a 1D algorithm,</li>
+  <li> invoke \b Compute command, which computes a 1D mesh,</li>
   <li> assign <b>Use existing faces</b> and a 3D algorithm,</li>
   <li> run your python code, which creates a 2D mesh,</li>
   <li> invoke \b Compute command, which computes a 3D mesh.</li>
 </ul>
 
-Consider trying a sample script demonstrating usage of 
+Consider trying a sample script demonstrating the usage of 
 \ref tui_use_existing_faces "Use existing faces" algorithm for
 construction of a 2D mesh using Python commands.
 
index 9f6254cb2f21de45f05494dc1c16618e077c5337..060adae0319fa2d878dd446c71b4d81b5899c63a 100644 (file)
@@ -18,7 +18,9 @@ while the box is a 3D object.  <br>
  will be used. This means that an edge shared by two faces each having
  its own different sub-mesh, will be meshed using algorithms and
  hypotheses of any of the two, chosen randomly. This indeterminacy can
- be fixed by defining \ref submesh_order_anchor "Sub-mesh priority".
+ be fixed by defining \ref submesh_order_anchor "Sub-mesh priority". The
+ default sub-meshes priority is such that multi-dimensional algorithms
+ are processed first.
 <br>
 
 \n Construction of a sub-mesh consists of:
@@ -54,30 +56,32 @@ sub-mesh. You can define algorithms and hypotheses in the same way as
 in \ref constructing_meshes_page "Create mesh" menu.
 
 \par
-If the parent mesh is already computed, then you can define 
+If the parent mesh is already computed, then you can define the
 \b Geometry by picking mesh elements computed on a sub-shape of interest
-in the 3D Viewer, i.e. you don't have to extract this sub-shape
-previously in Geometry module. To start element selection, press \a
+in the 3D Viewer, i.e. you do not have to extract this sub-shape
+in Geometry module beforehand. To start element selection, press \a
 Selection button to the right of \b Geometry label. If this button is
 already down, then click it to release and then click it again. The
-following pop-up menu to choose a way of geometry definition will
+following pop-up menu allowing to choose a way of geometry definition will
 appear.
 
 \par
 \image html choose_geom_selection_way.png
 
 \par
-There the first item enables selecting the sub-shape in the Object
-Browser, the second one makes appear the following dialog.
+<b>Direct geometry selection</b> enables selecting the sub-shape in the Object
+Browser.
+<b>Find geometry by mesh element selection</b> activates the following dialog.
 
 \par
 \image html find_geom_by_mesh_elem.png
 
 \par
 In this dialog, <b> Element Type </b> defines kind of element to pick in the
-Viewer. Instead of picking an element in the Viewer, you can type its
-ID in <b> Element ID</b> field. <b> Geometry name </b> allow you
-define a name of the sub-shape with which it will be published in the Study.
+Viewer. 
+Instead of picking an element in the Viewer, you can type its
+ID in <b> Element ID</b> field. 
+<b> Geometry name </b> field allows defining a name of the sub-shape.
 
 
 \par
index 966e091fe04a83a4fd0970ab76ca81e0447ff651..95adb865585d0c07851f94fb19298d08bb290682 100644 (file)
@@ -15,6 +15,8 @@ viewer.</li>
 elements which will form your group:</li>
 <ul>
 <li><b>Nodes</b></li>
+<li><b>0D Element</b></li>
+<li><b>Ball</b></li>
 <li><b>Edges</b></li>
 <li><b>Faces</b></li>
 <li><b>Volumes</b></li>
index 2865835a582bcf73c119607f044811dca0c1c6b8..88fa5ae0567c0bf7dc6d9d67b6a32be38db9fea2 100644 (file)
@@ -28,7 +28,7 @@ the ID of this quadrangle will be added to the list. To remove a
 selected element or elements from the list click \b Remove button. <b>Sort
 list</b> button allows to sort the list of IDs. \b Filter button allows to
 apply a definite filter to the selection of quadrangles.</li>
-<li><b>Apply to all</b> radio button allows to modify the orientation of all
+<li><b>Apply to all</b> check box allows to modify the orientation of all
 quadrangles of the currently displayed mesh or sub-mesh.</li>
 <li>\b Preview - provides a preview of cutting in the viewer.</li>
 </ul>
@@ -39,8 +39,19 @@ quadrangles of the currently displayed mesh or sub-mesh.</li>
 <li><b>Use diagonal 1-3</b> and <b>Use diagonal 2-4</b> allows to
 specify the opposite corners which will be connected by the cutting
 edge.</li>
-<li><b>Use numeric factor</b> - allows to chose a quality criterion
-  optimization of which will be used to select the cutting edge.</li>
+<li><b>Use numeric functor</b> - allows to choose a quality criterion
+ which will be optimized at the outcome of the operation.
+<ul>
+<li><b>Minimum diagonal</b> - cuts by the shortest edge.</li>
+<li><b>Aspect Ratio</b> - cuts by the edge splitting the quadrangle 
+into triangles with optimal \ref aspect_ratio_page "Aspect Ratio". The reference value is 1.</li>
+<li><b>Minimum Angle</b> -  cuts by the edge splitting the quadrangle 
+into triangles with optimal  \ref minimum_angle_page "Minimum Angle". The reference value is 60 degrees.</li>
+<li><b>Skew</b> -   cuts by the edge splitting the quadrangle 
+into triangles with optimal \ref skew_page "Skew". The reference value 
+is 0.0 degrees.</li>
+</ul>
+</li>
 </ul>
 </li>
 <li><b>Select from</b> - allows to choose a sub-mesh or an existing
index 1b343808493524328d962bb8f1f856a0a017bd18..cb061b314fabd3de22c4f883875429f563aea733 100644 (file)
@@ -3,18 +3,27 @@
 \page extrusion_page Extrusion
 
 \n Extrusion is used to build mesh elements of plus one
-dimension than the input ones. Any line or planar element can be
-extruded. Line elements will extrude into quadrilateral plane elements.
-Triangular and Quadrilateral plane elements extrude into Pentahedron
-and Hexahedron solids respectively.
+dimension than the input ones. Any node, segment or 2D element can be
+extruded. Each type of elements has a corresponding type of extruded elements:
+<table>
+<tr><td><b>Extruded element</b></td><td><b> Result elements </b></td></tr>
+<tr><td>Node              </td><td> Segments </td></tr>
+<tr><td>Segment           </td><td> Quadrilaterals </td></tr>
+<tr><td>Triangle          </td><td> Pentahedrons </td></tr>
+<tr><td>Quadrilateral     </td><td> Hexahedrons </td></tr>
+<tr><td>Polygon           </td><td> Polyhedrons </td></tr>
+<tr><td>Hexagonal polygon </td><td> Hexagonal prism </td></tr>
+</table>
 
 <em>To use extrusion:</em>
 <ol>
 <li>From the \b Modification menu choose the \b Extrusion item or click
 <em>"Extrusion"</em> button in the toolbar. 
 
+<center>
 \image html image91.png
-<center><em>"Extrusion" button</em></center>
+<em>"Extrusion" button</em>
+</center>
 
 The following dialog common for line and planar elements will appear:
 
@@ -26,32 +35,36 @@ The following dialog common for line and planar elements will appear:
 
 <li>In this dialog:
 <ul>
-<li>select the type of elements which will be extruded (0D, 1D or 2D),</li>
-<li>specify the IDs of the elements which will be extruded:
-<ul>
-<li><b>Select the whole mesh, submesh or group</b> activating this
-checkbox; or</li>
-<li>choose mesh elements with the mouse in the 3D Viewer. It is
-possible to select a whole area with a mouse frame; or</li> 
-<li>input the element IDs directly in <b>ID Elements</b> field. The selected elements will be highlighted in the
-viewer; or</li>
-<li>apply Filters. <b>Set filter</b> button allows to apply a filter to the selection of elements. See more
-about filters in the \ref selection_filter_library_page "Selection filter library" page.</li>
-</ul>
-</li>
-<li>If the <b>Extrude to Distance</b> radio button is selected</li>
-<ul>
-<li>specify the distance at which the elements will be extruded,</li>
-</ul>
-<li>If the <b>Extrude Along Vector</b> radio button is selected</li>
-<ul>
-<li>specify the coordinates of the vector along which the elements will be extruded, or select the face (the normal to the face will define the vector)</li>
-<li>specify the distance of extrusion along the vector,</li>
-</ul>
-<li>specify the number of steps;</li>
-<li>activate  <b>Generate Groups</b> checkbox if it is necessary to copy the groups of
-elements of the source mesh to the newly created one. </li>
-</li>
+  <li>Select the type of elements which will be extruded (0D, 1D or 2D).</li>
+  <li>Specify the IDs of the elements which will be extruded by one
+    following means:
+    <ul>
+      <li><b>Select the whole mesh, submesh or group</b> activating this
+        checkbox.</li>
+      <li>Choose mesh elements with the mouse in the 3D Viewer. It is
+        possible to select a whole area with a mouse frame.</li> 
+      <li>Input the element IDs directly in <b>ID Elements</b>
+        field. The selected elements will be highlighted in the viewer.</li> 
+      <li>Apply Filters. <b>Set filter</b> button allows to apply a
+        filter to the selection of elements. See more about filters in
+        the \ref filtering_elements "Selection filters" page.</li> 
+    </ul>
+  </li>
+  <li>If the <b>Extrude to Distance</b> radio button is selected</li>
+  <ul>
+    <li>specify the distance at which the elements will be extruded.</li>
+  </ul>
+  <li>If the <b>Extrude Along Vector</b> radio button is selected</li>
+  <ul>
+    <li>specify the coordinates of the vector along which the elements
+      will be extruded, or select the face (the normal to the face will
+      define the vector),</li>
+    <li>specify the distance of extrusion along the vector.</li>
+  </ul>
+  <li>Specify the number of steps.</li>
+  <li>If you activate <b>Generate Groups</b> check-box, the created
+    elements contained in groups will be included into new groups named
+    by pattern "<old group name>_extruded". </li>
 </ul>
 
 <li>Click \b Apply or <b> Apply and Close</b>  button to confirm the operation.</li>
index 7c8eeb79024bb14acb97267fc0d1194b23431d00..9b0d032faea32b686e6a7a982d3258bd8232bcc2 100644 (file)
@@ -4,7 +4,7 @@
 
 \n In MESH there is a functionality allowing importation/exportation
 of meshes from/to \b MED, \b UNV (I-DEAS 10), \b DAT (simple ascii format), \b STL,
-\b GMF and \b CGNS format files. You can also export a group as a whole mesh.
+\b GMF (internal format of DISTENE products, namely BLSurf, GHS3D and Hexotic algorithms) and \b CGNS format files. You can also export a group as a whole mesh.
 
 
 <em>To import a mesh:</em>
index 0a48ee65e9f5b3c6d50504e6d41b3e133e98a4d9..63f2f3bb2b69bd9e924316adbc92af99ae453d07 100644 (file)
@@ -122,9 +122,16 @@ button in the toolbar. You can also right-click on the mesh in the
 Object Browser and select Clear Mesh Data in the pop-up menu.</li>
 </ol>
 
+<center>
 \image html mesh_clear.png
-<center><em>"Clear Mesh Data" button</em></center>
-
+<em>"Clear Mesh Data" button</em></center>
+
+\note This command works in a different way in different situations: <ul>
+  <li> if the mesh is computed on a geometry, then "Clear Mesh Data" removes
+    all elements and nodes.</li>
+  <li> if the mesh is not based on a geometry (imported, compound, created from
+    scratch etc), then "Clear Mesh Data" removes only the elements and
+    nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing.</li></ul>
 
 <br><b>See Also</b> a sample TUI Script of a 
 \ref tui_removing_nodes_and_elements "Removing Nodes and Elements" operation.  
index f637aecfda4556086ce5331232250123bde52a0e..db408ef0878332e3ef8a470def7e36eb49f443a6 100644 (file)
@@ -3,17 +3,17 @@
 \page reorient_faces_page Reorient faces by vector
 
 \n This operation allows changing orientation of a set of neighboring
-faces. The desired orientation is defined by a vector. Since direction
+faces. The desired orientation is defined by a vector. Since the direction
 of face normals in the set can be even opposite, it is necessary to
 specify a control face whose normal will be compared with the vector. This
-face can be specified either explicitly or can be found by closeness to
+face can be either specified explicitly or found by proximity to
 a given point.
 
 Orientation of a face is changed by reverting the order of its nodes.
 
 <em>To change orientation of faces:</em>
 <ol>
-<li>In the \b Modification menu select the <b>Reorient faces by
+<li>In the \b Modification menu select <b>Reorient faces by
     vector</b> item or click <em>Reorient faces by
     vector</em> button in the toolbar.
 
@@ -31,24 +31,19 @@ The following dialog box will appear:
 
 <li>In this dialog
 <ul>
-<li>Specify a way of selection of the control face: by point or
-  explicitely.</li>
-<li>Select an \b Object containing faces to reorient, either in the Object
-  Browser or in the 3D Viewer; it can be either <ul>
-    <li>group of faces,</li>
-    <li>sub-mesh of faces or</li>
-    <li>mesh.</li>
-    </ul></li>
-<li>Specify either coordinates of a \b Point by which the control face
-  will be found or the control \b Face it-self. You can easy specify the \b
-  Point by either picking a node in the 3D Viewer or by selecting a vertex
-  in the Object Browser. The \b Face can be either picked by mouse in
-  the 3D Viewer or its ID can be entered by typing.</li>
-<li>Set up a \b Direction to be compared with the normal of the
-  control face. You can either pick a node in the 3D Viewer then a \b Direction
-  from the coordinate system origin to the selected node will be set,
-  or you can pick two nodes (holding Shift button) then a \b Direction
-  from the first to the second node will be set.</li>
+<li>Specify the way of selection of the control face: by point or
+  explicitly.</li>
+<li>Select the \b Object (mesh, sub-mesh or a group of faces) containing faces to reorient in the Object Browser or in the 3D Viewer.</li>
+<li>Specify the coordinates of the \b Point by which the control face
+  will be found or of the control \b Face itself. You can easy specify the \b
+  Point by either picking a node in the 3D Viewer or selecting a vertex
+  in the Object Browser. It is possible to pick the  \b Face by mouse in
+  the 3D Viewer or enter its ID.</li>
+<li>Set up the \b Direction vector to be compared with the normal of the
+  control face. If you pick a node in the 3D Viewer then the \b Direction
+  vector will go from the coordinate system origin to the selected node.
+  If you pick two nodes (holding Shift button) then the \b Direction vector
+  will go from the first to the second node.</li>
 </ul>
 </li>
 
index 4e58dcee09fefe4ee60d516553e7508f5f582372..12aabc255166829c6c4ab4a2813e58b5a020af30 100644 (file)
@@ -15,7 +15,14 @@ load an existing filter library.
 the current study. You can \b Add or \b Delete filters.
 \n In <b>Filter name</b> box you can specify the name for your
 filter. By default it is prefixed with the corresponding entity type.
-\n Each filter can be applicable to \b Nodes, \b Edges, \b Faces or \b
+
+\anchor filtering_elements
+
+When we use filters during a group creation or another operation (by 
+clicking <b>Set Filters</b> button in the corresponding dialog), the
+menu for setting filters looks a bit differently (see the image below).
+
+Each filter can be applicable to \b Nodes, \b Edges, \b Faces or \b
 Volumes. You can combine many criteria in one filter, but they all
 must be of the same <b>Entity type</b>.
 \n The \b Add button creates a new criterion at the end of the list of
@@ -30,21 +37,18 @@ sense of a criterion using \b Unary operator Not and you should
 specify logical relations between criteria using \b Binary operators
 Or and And.
 \n Some criteria should have the additional parameter of \b Tolerance.
-
-When we create a group using filters (for this click
-<b>Set Filters</b> button in the <b>Create Group</b> dialog), the menu
-for setting filters looks a bit differently (see below). Switching
-on <b>Insert filter in viewer</b> checkbox limits selection of elements
-in the Viewer using your current filter.
+<br> 
+Switching on <b>Insert filter in viewer</b> checkbox limits
+selection of elements in the Viewer to the current filter.
 <br>
 In the \b Source field you choose if the filter will be applied to
 the whole \b Mesh, the <b>Initial Selection</b> or the <b>Current
 Group</b>. If \b Mesh is chosen, the elements satisfying the filter
 will be selected in the 3D Viewer. If <b> Initial Selection</b> is
 chosen, the filter will be applied to the selected elements and the
-elements rejected by the filter will be deseleced. If <b>Current
+elements rejected by the filter will be deselected. If <b>Current
 Group</b> is chosen, the filter will be applied to the list of
-elements in the <em>Greate Croup</em> dialog and the elements rejected
+elements in the current dialog and the elements rejected
 by the filter will be removed from the list.
 <br>
 <b>Copy from...</b> button gives you a possibility to load an
@@ -68,7 +72,7 @@ shape the algorithm works slower.
 </li><li>
 <b>Lying on Geom</b> selects entities whose at least one node
 lies on the shape defined by the <b>Threshold Value</b>.
-If the hreshold shape is a sub-shape of the main shape of the mesh the
+If the threshold shape is a sub-shape of the main shape of the mesh the
 algorithm works faster, if this is any other
 shape, the algorithm works slower.
 </li><li>
@@ -167,7 +171,7 @@ The following criteria allow selecting mesh <b>Faces</b>:
 one element of mesh only. See also a
 \ref free_edges_page "Free Edges quality control".
 </li><li>
-<b>Free faces</b> selects 2D mesh elements wich belong to less than two volumes.
+<b>Free faces</b> selects 2D mesh elements, which belong to less than two volumes.
 </li><li>
 <b>Double faces</b> selects 2D mesh elements basing on the same set of nodes.
 See also \ref filter_double_elements "Double Elements quality control".
index 29ff056b79125addfb5905f84be623cdbc22be15..b2b48795433139e409648bd3b7b45957bb352437 100644 (file)
@@ -116,6 +116,7 @@ the following links:
 
 - \subpage tui_creating_meshes_page
 - \subpage tui_cartesian_algo
+- \subpage tui_use_existing_faces
 - \subpage tui_viewing_meshes_page
 - \subpage tui_defining_hypotheses_page
 - \subpage tui_quality_controls_page
index 922d15969d2d931342831cde4f76cf5f9b998948..977ff6e86f1ca717667e514120655c425dde5690 100644 (file)
@@ -11,9 +11,9 @@
 <h3>Add Node</h3>
 
 \code
-import SMESH_mechanic
+import smesh
 
-mesh = SMESH_mechanic.mesh
+mesh = smesh.Mesh()
 
 # add node
 new_id = mesh.AddNode(50, 10, 0)
@@ -27,9 +27,9 @@ else:           print "New Node has been added with ID ", new_id
 <h3>Add 0D Element</h3>
 
 \code
-import SMESH_mechanic
+import smesh
 
-mesh = SMESH_mechanic.mesh
+mesh = smesh.Mesh()
 
 # add node
 node_id = mesh.AddNode(50, 10, 0)
@@ -42,6 +42,54 @@ if new_id == 0: print "KO node addition."
 else:           print "New 0D Element has been added with ID ", new_id
 \endcode
 
+<br>
+\anchor tui_add_0DElement_on_all_nodes
+<h3>Add 0D Element on Element Nodes</h3>
+
+\code
+import smesh, SMESH, geompy
+
+# create a geometry
+box = geompy.MakeBoxDXDYDZ( 10, 10, 10 )
+face = geompy.SubShapeAll( box, geompy.ShapeType["FACE"])[0]
+
+# make 3D mesh
+mesh = smesh.Mesh( box )
+mesh.AutomaticHexahedralization(0)
+
+# create 0D elements on all nodes of the mesh
+res = mesh.Add0DElementsToAllNodes( mesh )
+
+# find 0D elements on all nodes of the mesh, all found nodes are added to a new group
+groupName = "0Dmesh"
+res = mesh.Add0DElementsToAllNodes( mesh, groupName )
+mesh.RemoveGroupWithContents( res ) # remove all found 0D elements
+
+# create 0D elements on all nodes of a sub-mesh, with group creation
+groupName = "0Dsubmesh"
+submesh = mesh.GetSubMesh( face, "faceSM")
+res = mesh.Add0DElementsToAllNodes( submesh, groupName )
+
+# create 0D elements on all nodes of a group
+group = mesh.Group( face, "faceGroup" )
+res = mesh.Add0DElementsToAllNodes( group )
+
+# remove all 0D elements
+mesh.RemoveElements( mesh.GetIdsFromFilter( smesh.GetFilter( SMESH.ELEM0D,
+                                                             SMESH.FT_ElemGeomType,
+                                                             "=",SMESH.Geom_POINT )))
+
+# create 0D elements on all nodes of some elements
+res = mesh.Add0DElementsToAllNodes( mesh.GetElementsId() )
+
+mesh.RemoveElements( mesh.GetElementsByType( SMESH.ELEM0D ))
+
+# create 0D elements on some nodes
+nodes = range(1,10)
+res = mesh.Add0DElementsToAllNodes( mesh.GetIDSource( nodes, SMESH.NODE ))
+
+\endcode
+
 <br>
 \anchor tui_add_edge
 <h3>Add Edge</h3>
index 8b9c7325a17c80a80418160fbed90421ead4ad51..0f95ac4d4f9e070ca91e721325f8e0888e05a2b1 100644 (file)
@@ -1,6 +1,6 @@
 /*!
 
-\page tui_use_existing_faces Use existing faces
+\page tui_use_existing_faces Use existing faces algorithm
 
 This sample demonstrates how to use <b>Use existing faces</b> algorithm,
 which is actulally just a stub allowing to use your own 2D algoritm
index 74e2ab2cd0626b5a569719c7c1e8a6a33218459b..051b286c74120b6182aee2b625eac3bb136d8a8a 100644 (file)
@@ -28,8 +28,8 @@ to sort the list of IDs. The <b>Set filter</b> button allows to apply a
 definite filter to selection of triangles.</li>
 <li><b>Apply to all</b> radio button allows to modify connectivity and
 type of all triangles of the currently displayed mesh or sub-mesh.</li>
-<li>\b Criterion menu allows to chose a quality criterion
 optimization of which will be used to select triangles to unite.</li>
+<li>\b Criterion menu allows to choose a quality criterion,
which will be optimized to select triangles to unite.</li>
 <li><b>Select from</b> set of fields allows to choose a sub-mesh or an
 existing group whose triangle elements will be automatically added to
 the list.</li>
index b8d3176f2c7d32e12eb66350aff58329f8d552ae..8385a9030eb75a5095e8a3f1451c1b269b1b41b0 100644 (file)
@@ -240,8 +240,11 @@ module SMESH
 
     /*!
      * Create Mesh object importing data from given GMF file
+     *  \param theFileName - a name of file to import
+     *  \param theMakeRequiredGroups - if true, groups of required entities will be created
      */
     SMESH_Mesh CreateMeshesFromGMF( in string               theFileName,
+                                    in boolean              theMakeRequiredGroups,
                                     out SMESH::ComputeError theError)
       raises ( SALOME::SALOME_Exception );
 
index b8d2b5e63e3a822a72ad65543e9c67d750fb999d..56f465e45ecc838e7b9eddb4675c9432ac55170f 100644 (file)
@@ -663,7 +663,8 @@ module SMESH
                      in string         file,
                      in boolean        overwrite ) raises (SALOME::SALOME_Exception);
     void ExportGMF( in SMESH_IDSource  meshPart, 
-                    in string          file ) raises (SALOME::SALOME_Exception);
+                    in string          file,
+                    in boolean         withRequiredGroups) raises (SALOME::SALOME_Exception);
     void ExportPartToDAT( in SMESH_IDSource meshPart, 
                           in string         file ) raises (SALOME::SALOME_Exception);
     void ExportPartToUNV( in SMESH_IDSource meshPart, 
index 08f2b70f2c4f3f9f3ace7257c839346f83eb5ae1..3425d89e2e092b5221f33ff80f2d7236ee55cac6 100644 (file)
@@ -151,7 +151,6 @@ module SMESH
      */
     long AddPolyhedralVolume (in long_array IdsOfNodes,
                               in long_array Quantities);
-
     /*!
      *  Create volume of many faces, giving IDs of existing faces.
      *  \param IdsOfFaces List of face IDs for volume creation.
@@ -160,6 +159,19 @@ module SMESH
      */
     long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
 
+    /*!
+     * Create 0D elements on all nodes of the given object except those 
+     * nodes on which a 0D element already exists.
+     *  \param theObject object on whose nodes 0D elements will be created.
+     *  \param theGroupName optional name of a group to add 0D elements created
+     *         and/or found on nodes of \a theObject.
+     *  \return an object (a new group or a temporary SMESH_IDSource) holding
+     *          ids of new and/or found 0D elements.
+     */
+    SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
+                                              in string         theGroupName)
+      raises (SALOME::SALOME_Exception);
+
     /*!
      * \brief Bind a node to a vertex
       * \param NodeID - node ID
index dcbb70ebc7d86a72011d7119e9b72f5c4e1937d9..4cb55e8103b76d619cb8470832c3c1a61ae29cd1 100644 (file)
@@ -113,6 +113,8 @@ dist_salomeres_DATA = \
        mesh_update.png \
        mesh_vertex_n.png \
        mesh_vertex.png \
+       mesh_0D_elem.png \
+       mesh_0D_on_all_nodes.png \
        mesh_volume_3d.png \
        bare_border_volume.png \
        bare_border_face.png \
index b379d1b1f882b1b6e51b0a56e1d252e4e3356c85..59f62042116e21e6a38ee96dfb68f6f7ed168838 100644 (file)
         <algo>MEFISTO_2D=Triangle(algo=smesh.MEFISTO)</algo>
         <hypo>LengthFromEdges=LengthFromEdges()</hypo>
         <hypo>MaxElementArea=MaxElementArea(SetMaxElementArea())</hypo>
+        <hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
       </python-wrap>
     </algorithm>
 
       <python-wrap>
         <algo>Quadrangle_2D=Quadrangle(algo=smesh.QUADRANGLE)</algo>
         <hypo>QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex())</hypo>
+        <hypo>ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges())</hypo>
       </python-wrap>
     </algorithm>
 
diff --git a/resources/mesh_0D_elem.png b/resources/mesh_0D_elem.png
new file mode 100644 (file)
index 0000000..be599b5
Binary files /dev/null and b/resources/mesh_0D_elem.png differ
diff --git a/resources/mesh_0D_on_all_nodes.png b/resources/mesh_0D_on_all_nodes.png
new file mode 100644 (file)
index 0000000..8237656
Binary files /dev/null and b/resources/mesh_0D_on_all_nodes.png differ
diff --git a/src/DriverGMF/DriverGMF.cxx b/src/DriverGMF/DriverGMF.cxx
new file mode 100644 (file)
index 0000000..17ebb5e
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+// File      : DriverGMF.hxx
+// Created   : Thu Nov 15 16:45:58 2012
+// Author    : Edward AGAPOV (eap)
+
+#include "DriverGMF.hxx"
+
+#include <boost/filesystem.hpp>
+
+extern "C"
+{
+#include "libmesh5.h"
+}
+
+namespace DriverGMF
+{
+
+  //================================================================================
+  /*!
+   * \brief Closes GMF mesh at destruction
+   */
+  //================================================================================
+
+  MeshCloser::~MeshCloser()
+  {
+    if ( _gmfMeshID )
+      GmfCloseMesh( _gmfMeshID );
+  }
+
+  //================================================================================
+  /*!
+   * \brief Checks GMF file extension
+   */
+  //================================================================================
+
+  bool isExtensionCorrect( const std::string& fileName )
+  {
+    std::string ext  = boost::filesystem::extension(fileName);
+    switch ( ext.size() ) {
+    case 5: return ( ext == ".mesh" || ext == ".solb" );
+    case 6: return ( ext == ".meshb" );
+    case 4: return ( ext == ".sol" );
+    }
+    return false;
+  }
+}
diff --git a/src/DriverGMF/DriverGMF.hxx b/src/DriverGMF/DriverGMF.hxx
new file mode 100644 (file)
index 0000000..52d560f
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+// File      : DriverGMF.hxx
+// Created   : Thu Nov 15 16:45:58 2012
+// Author    : Edward AGAPOV (eap)
+
+#ifndef __DriverGMF_HXX__
+#define __DriverGMF_HXX__
+
+#include <string>
+
+namespace DriverGMF
+{
+  /*!
+   * \brief An object closing GMF mesh at destruction
+   */
+  struct MeshCloser
+  {
+    int _gmfMeshID;
+    MeshCloser( const int gmfMeshID ): _gmfMeshID(gmfMeshID) {}
+    ~MeshCloser();
+  };
+
+  bool isExtensionCorrect( const std::string& fileName );
+}
+
+#endif
index 332519b2e1a3989eda0d508082b921eb565d39f4..9cf599fee4198e0e0eb88554b1e9060ad6f66a44 100644 (file)
 // Author    : Edward AGAPOV (eap)
 
 #include "DriverGMF_Read.hxx"
-#include "DriverGMF_Write.hxx"
+#include "DriverGMF.hxx"
 
 #include "SMESHDS_Group.hxx"
 #include "SMESHDS_Mesh.hxx"
 #include "SMESH_Comment.hxx"
 
+#include <Basics_Utils.hxx>
+
 extern "C"
 {
 #include "libmesh5.h"
@@ -37,16 +39,10 @@ extern "C"
 
 #include <stdarg.h>
 
-// --------------------------------------------------------------------------------
-// Closing GMF mesh at destruction
-DriverGMF_MeshCloser::~DriverGMF_MeshCloser()
-{
-  if ( _gmfMeshID )
-    GmfCloseMesh( _gmfMeshID );
-}
 // --------------------------------------------------------------------------------
 DriverGMF_Read::DriverGMF_Read():
-  Driver_SMESHDS_Mesh()
+  Driver_SMESHDS_Mesh(),
+  _makeRequiredGroups( true )
 {
 }
 // --------------------------------------------------------------------------------
@@ -62,6 +58,8 @@ DriverGMF_Read::~DriverGMF_Read()
 
 Driver_Mesh::Status DriverGMF_Read::Perform()
 {
+  Kernel_Utils::Localizer loc;
+
   Status status = DRS_OK;
 
   int dim, version;
@@ -69,9 +67,13 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
   // open the file
   int meshID = GmfOpenMesh( myFile.c_str(), GmfRead, &version, &dim );
   if ( !meshID )
-    return addMessage( SMESH_Comment("Can't open for reading ") << myFile, /*fatal=*/true );
-
-  DriverGMF_MeshCloser aMeshCloser( meshID ); // An object closing GMF mesh at destruction
+  {
+    if ( DriverGMF::isExtensionCorrect( myFile ))
+      return addMessage( SMESH_Comment("Can't open for reading ") << myFile, /*fatal=*/true );
+    else
+      return addMessage( SMESH_Comment("Not '.mesh' or '.meshb' extension of file ") << myFile, /*fatal=*/true );
+  }
+  DriverGMF::MeshCloser aMeshCloser( meshID ); // An object closing GMF mesh at destruction
 
   // Read nodes
 
@@ -277,40 +279,43 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
 
   // Read required entities into groups
 
-  // get ids of existing groups
-  std::set< int > groupIDs;
-  const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetGroups();
-  std::set<SMESHDS_GroupBase*>::const_iterator grIter = groups.begin();
-  for ( ; grIter != groups.end(); ++grIter )
-    groupIDs.insert( (*grIter)->GetID() );
-  if ( groupIDs.empty() ) groupIDs.insert( 0 );
-
-  const int kes[4][3] = { { GmfRequiredVertices,      SMDSAbs_Node, nodeIDShift },
-                          { GmfRequiredEdges,         SMDSAbs_Edge, edgeIDShift },
-                          { GmfRequiredTriangles,     SMDSAbs_Face, triaIDShift },
-                          { GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift }};
-  const char* names[4] = { "_required_Vertices"      ,
-                           "_required_Edges"         ,
-                           "_required_Triangles"     ,
-                           "_required_Quadrilaterals" };
-  for ( int i = 0; i < 4; ++i )
+  if ( _makeRequiredGroups )
   {
-    int                 gmfKwd = kes[i][0];
-    SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
-    int                 shift  = kes[i][2];
-    if ( int nb = GmfStatKwd(meshID, gmfKwd))
-    {
-      const int newID = *groupIDs.rbegin() + 1;
-      groupIDs.insert( newID );
-      SMESHDS_Group* group = new SMESHDS_Group( newID, myMesh, entity );
-      group->SetStoreName( names[i] );
-      myMesh->AddGroup( group );
+    // get ids of existing groups
+    std::set< int > groupIDs;
+    const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetGroups();
+    std::set<SMESHDS_GroupBase*>::const_iterator grIter = groups.begin();
+    for ( ; grIter != groups.end(); ++grIter )
+      groupIDs.insert( (*grIter)->GetID() );
+    if ( groupIDs.empty() ) groupIDs.insert( 0 );
 
-      GmfGotoKwd(meshID, gmfKwd);
-      for ( int i = 0; i < nb; ++i )
+    const int kes[4][3] = { { GmfRequiredVertices,      SMDSAbs_Node, nodeIDShift },
+                            { GmfRequiredEdges,         SMDSAbs_Edge, edgeIDShift },
+                            { GmfRequiredTriangles,     SMDSAbs_Face, triaIDShift },
+                            { GmfRequiredQuadrilaterals,SMDSAbs_Face, quadIDShift }};
+    const char* names[4] = { "_required_Vertices"      ,
+                             "_required_Edges"         ,
+                             "_required_Triangles"     ,
+                             "_required_Quadrilaterals" };
+    for ( int i = 0; i < 4; ++i )
+    {
+      int                 gmfKwd = kes[i][0];
+      SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
+      int                 shift  = kes[i][2];
+      if ( int nb = GmfStatKwd(meshID, gmfKwd))
       {
-        GmfGetLin(meshID, gmfKwd, &iN[0] );
-        group->Add( shift + iN[0] );
+        const int newID = *groupIDs.rbegin() + 1;
+        groupIDs.insert( newID );
+        SMESHDS_Group* group = new SMESHDS_Group( newID, myMesh, entity );
+        group->SetStoreName( names[i] );
+        myMesh->AddGroup( group );
+
+        GmfGotoKwd(meshID, gmfKwd);
+        for ( int i = 0; i < nb; ++i )
+        {
+          GmfGetLin(meshID, gmfKwd, &iN[0] );
+          group->Add( shift + iN[0] );
+        }
       }
     }
   }
index a003804f0d6bf2077aecbc1a108933a857c36587..36226934e084be65487faf32a54ca6a53e4d61f2 100644 (file)
@@ -45,12 +45,19 @@ public:
   DriverGMF_Read();
   ~DriverGMF_Read();
 
+  void SetMakeRequiredGroups( bool theMakeRequiredGroups )
+  {
+    _makeRequiredGroups = theMakeRequiredGroups;
+  }
+
   virtual Status Perform();
 
  private:
 
   Status storeBadNodeIds(const char* gmfKwd, int elemNb, int nb, ...);
 
+  bool _makeRequiredGroups;
+
 };
 
 
index cdddd629d11af0c0ba9f1c03ccef63eb5b2f5d95..926f7f4c3a4689831557607f042cd0cd8e25ae9a 100644 (file)
 // Author    : Edward AGAPOV (eap)
 
 #include "DriverGMF_Write.hxx"
+#include "DriverGMF.hxx"
 
 #include "SMESHDS_GroupBase.hxx"
 #include "SMESHDS_Mesh.hxx"
 #include "SMESH_Comment.hxx"
 
+#include <Basics_Utils.hxx>
+
 extern "C"
 {
 #include "libmesh5.h"
@@ -57,7 +60,7 @@ extern "C"
 
 
 DriverGMF_Write::DriverGMF_Write():
-  Driver_SMESHDS_Mesh()
+  Driver_SMESHDS_Mesh(), _exportRequiredGroups( true )
 {
 }
 DriverGMF_Write::~DriverGMF_Write()
@@ -66,13 +69,20 @@ DriverGMF_Write::~DriverGMF_Write()
 
 Driver_Mesh::Status DriverGMF_Write::Perform()
 {
-  const int dim = 3, version = 3;
+  Kernel_Utils::Localizer loc;
+
+  const int dim = 3, version = sizeof(long) == 4 ? 2 : 3;
 
   int meshID = GmfOpenMesh( myFile.c_str(), GmfWrite, version, dim );
   if ( !meshID )
-    return addMessage( SMESH_Comment("Can't open for writing ") << myFile, /*fatal=*/true );
+  {
+    if ( DriverGMF::isExtensionCorrect( myFile ))
+      return addMessage( SMESH_Comment("Can't open for writing ") << myFile, /*fatal=*/true );
+    else
+      return addMessage( SMESH_Comment("Not '.mesh' or '.meshb' extension of file ") << myFile, /*fatal=*/true );
+  }
 
-  DriverGMF_MeshCloser aMeshCloser( meshID ); // An object closing GMF mesh at destruction
+  DriverGMF::MeshCloser aMeshCloser( meshID ); // An object closing GMF mesh at destruction
 
   // nodes
   std::map< const SMDS_MeshNode* , int > node2IdMap;
@@ -233,85 +243,88 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
     END_ELEM_WRITE( prism );
 
 
-  // required entities
-  SMESH_Comment badGroups;
-  const std::set<SMESHDS_GroupBase*>&      groupSet = myMesh->GetGroups();
-  std::set<SMESHDS_GroupBase*>::const_iterator grIt = groupSet.begin();
-  for ( ; grIt != groupSet.end(); ++grIt )
+  if ( _exportRequiredGroups )
   {
-    const SMESHDS_GroupBase* group = *grIt;
-    std::string          groupName = group->GetStoreName();
-    std::string::size_type     pos = groupName.find( "_required_" );
-    if ( pos == std::string::npos ) continue;
-
-    int                    gmfKwd;
-    SMDSAbs_EntityType smdsEntity;
-    std::string entity = groupName.substr( pos + strlen("_required_"));
-    if      ( entity == "Vertices" ) {
-      gmfKwd   = GmfRequiredVertices;
-      smdsEntity = SMDSEntity_Node;
-    }
-    else if ( entity == "Edges" ) {
-      gmfKwd   = GmfRequiredEdges;
-      smdsEntity = SMDSEntity_Edge;
-    }
-    else if ( entity == "Triangles" ) {
-      gmfKwd   = GmfRequiredTriangles;
-      smdsEntity = SMDSEntity_Triangle;
-    }
-    else if ( entity == "Quadrilaterals" ) {
-      gmfKwd   = GmfRequiredQuadrilaterals;
-      smdsEntity = SMDSEntity_Quadrangle;
-    }
-    else {
-      addMessage( SMESH_Comment("Invalig gmf entity name: ") << entity, /*fatal=*/false );
-      continue;
-    }
-
-    // check elem type in the group
-    int nbOkElems = 0;
-    SMDS_ElemIteratorPtr elemIt = group->GetElements();
-    while ( elemIt->more() )
-      nbOkElems += ( elemIt->next()->GetEntityType() == smdsEntity );
-
-    if ( nbOkElems != group->Extent() && nbOkElems == 0 )
+    // required entities
+    SMESH_Comment badGroups;
+    const std::set<SMESHDS_GroupBase*>&      groupSet = myMesh->GetGroups();
+    std::set<SMESHDS_GroupBase*>::const_iterator grIt = groupSet.begin();
+    for ( ; grIt != groupSet.end(); ++grIt )
     {
-      badGroups << " " << groupName;
-      continue;
-    }
-
-    // choose a TElem2IDMap
-    TElem2IDMap* elem2IDMap = 0;
-    if ( smdsEntity == SMDSEntity_Quadrangle && nbOkElems != myMesh->NbFaces() )
-      elem2IDMap = & quad2IDMap;
-    else if ( smdsEntity == SMDSEntity_Triangle && nbOkElems != myMesh->NbFaces() )
-      elem2IDMap = & tria2IDMap;
-    else if ( smdsEntity == SMDSEntity_Edge && nbOkElems != myMesh->NbEdges() )
-      elem2IDMap = & edge2IDMap;
-
-    // write the group
-    GmfSetKwd( meshID, gmfKwd, nbOkElems );
-    elemIt = group->GetElements();
-    if ( elem2IDMap )
-      for ( ; elemIt->more(); )
-      {
-        const SMDS_MeshElement* elem = elemIt->next();
-        if ( elem->GetEntityType() == smdsEntity )
-          GmfSetLin( meshID, gmfKwd, (*elem2IDMap)[ elem ] );
+      const SMESHDS_GroupBase* group = *grIt;
+      std::string          groupName = group->GetStoreName();
+      std::string::size_type     pos = groupName.find( "_required_" );
+      if ( pos == std::string::npos ) continue;
+
+      int                    gmfKwd;
+      SMDSAbs_EntityType smdsEntity;
+      std::string entity = groupName.substr( pos + strlen("_required_"));
+      if      ( entity == "Vertices" ) {
+        gmfKwd   = GmfRequiredVertices;
+        smdsEntity = SMDSEntity_Node;
       }
-    else
-      for ( int gmfID = 1; elemIt->more(); ++gmfID)
+      else if ( entity == "Edges" ) {
+        gmfKwd   = GmfRequiredEdges;
+        smdsEntity = SMDSEntity_Edge;
+      }
+      else if ( entity == "Triangles" ) {
+        gmfKwd   = GmfRequiredTriangles;
+        smdsEntity = SMDSEntity_Triangle;
+      }
+      else if ( entity == "Quadrilaterals" ) {
+        gmfKwd   = GmfRequiredQuadrilaterals;
+        smdsEntity = SMDSEntity_Quadrangle;
+      }
+      else {
+        addMessage( SMESH_Comment("Invalig gmf entity name: ") << entity, /*fatal=*/false );
+        continue;
+      }
+
+      // check elem type in the group
+      int nbOkElems = 0;
+      SMDS_ElemIteratorPtr elemIt = group->GetElements();
+      while ( elemIt->more() )
+        nbOkElems += ( elemIt->next()->GetEntityType() == smdsEntity );
+
+      if ( nbOkElems != group->Extent() && nbOkElems == 0 )
       {
-        const SMDS_MeshElement* elem = elemIt->next();
-        if ( elem->GetEntityType() == smdsEntity )
-          GmfSetLin( meshID, gmfKwd, gmfID );
+        badGroups << " " << groupName;
+        continue;
       }
 
-  } // loop on groups
+      // choose a TElem2IDMap
+      TElem2IDMap* elem2IDMap = 0;
+      if ( smdsEntity == SMDSEntity_Quadrangle && nbOkElems != myMesh->NbFaces() )
+        elem2IDMap = & quad2IDMap;
+      else if ( smdsEntity == SMDSEntity_Triangle && nbOkElems != myMesh->NbFaces() )
+        elem2IDMap = & tria2IDMap;
+      else if ( smdsEntity == SMDSEntity_Edge && nbOkElems != myMesh->NbEdges() )
+        elem2IDMap = & edge2IDMap;
+
+      // write the group
+      GmfSetKwd( meshID, gmfKwd, nbOkElems );
+      elemIt = group->GetElements();
+      if ( elem2IDMap )
+        for ( ; elemIt->more(); )
+        {
+          const SMDS_MeshElement* elem = elemIt->next();
+          if ( elem->GetEntityType() == smdsEntity )
+            GmfSetLin( meshID, gmfKwd, (*elem2IDMap)[ elem ] );
+        }
+      else
+        for ( int gmfID = 1; elemIt->more(); ++gmfID)
+        {
+          const SMDS_MeshElement* elem = elemIt->next();
+          if ( elem->GetEntityType() == smdsEntity )
+            GmfSetLin( meshID, gmfKwd, gmfID );
+        }
 
-  if ( !badGroups.empty() )
-    addMessage( SMESH_Comment("Groups of elements of inappropriate geometry:")
-                << badGroups, /*fatal=*/false );
+    } // loop on groups
+
+    if ( !badGroups.empty() )
+      addMessage( SMESH_Comment("Groups of elements of inappropriate geometry:")
+                  << badGroups, /*fatal=*/false );
+  }
 
   return DRS_OK;
 }
index fd0918d09ef2ccabcf13e596b3117799f0d36916..0e8ee4f70859786bbc7856f788b9069a3800edd2 100644 (file)
@@ -42,18 +42,16 @@ public:
   DriverGMF_Write();
   ~DriverGMF_Write();
 
+  void SetExportRequiredGroups( bool toExport )
+  {
+    _exportRequiredGroups = toExport;
+  }
+
   virtual Status Perform();
-};
 
-/*!
- * \brief An object closing GMF mesh at destruction
- */
-struct DriverGMF_MeshCloser
-{
-  int _gmfMeshID;
-  DriverGMF_MeshCloser( const int gmfMeshID ): _gmfMeshID(gmfMeshID) {}
-  ~DriverGMF_MeshCloser();
-};
+ private:
 
+  bool _exportRequiredGroups;
+};
 
 #endif
index 895c83a2f7b47299d4eede78426f3945946c83de..d2aa333621b5fd7c8e46ed351273e19f651750fe 100644 (file)
@@ -23,6 +23,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 salomeinclude_HEADERS = \
        DriverGMF_Read.hxx \
        DriverGMF_Write.hxx \
+       DriverGMF.hxx \
        SMESH_DriverGMF.hxx \
        libmesh5.h
 
@@ -31,20 +32,22 @@ lib_LTLIBRARIES = libMeshDriverGMF.la
 dist_libMeshDriverGMF_la_SOURCES = \
        DriverGMF_Read.cxx \
        DriverGMF_Write.cxx \
+       DriverGMF.cxx \
        libmesh5.c
 
 # additionnal information to compil and link file
 libMeshDriverGMF_la_CPPFLAGS = \
        $(KERNEL_CXXFLAGS) \
        $(CAS_CPPFLAGS) \
-        $(VTK_INCLUDES) \
-       $(BOOST_CPPFLAGS) \
+       $(VTK_INCLUDES) \
+       $(BOOST_CPPFLAGS) -DBOOST_SYSTEM_NO_DEPRECATED \
        -I$(srcdir)/../Driver \
        -I$(srcdir)/../SMESHUtils \
        -I$(srcdir)/../SMDS \
        -I$(srcdir)/../SMESHDS
 
 libMeshDriverGMF_la_LDFLAGS  = \
-       $(BOOST_LIBS) \
+       $(BOOST_LIBS) -lboost_filesystem \
        ../Driver/libMeshDriver.la \
-       ../SMESHUtils/libSMESHUtils.la
+       ../SMESHUtils/libSMESHUtils.la \
+       $(KERNEL_LDFLAGS) -lSALOMEBasics
index 8df52064a4a0b199e09f124e2f70c285f513f38a..2bcf1a5d4ca6acf9c3afd57e2fe7b9726ed76146 100644 (file)
@@ -22,8 +22,8 @@
 // Author    : Edward AGAPOV (eap)
 // Executable to find out a lower RAM limit (MB), i.e. at what size of freeRAM
 // reported by sysinfo, no more memory can be allocated.
-// This is not done inside a function of SALOME because allocated memory is not returned
-// to the system. (PAL16631)
+// This is not done inside a function of SALOME because allocated memory is not always
+// returned to the system. (PAL16631)
 //
 #ifndef WIN32
 #include <sys/sysinfo.h>
index c18ace19422797d527205633cda50237eff59425..95013c9d49092b18f860391c1d920a298bac4596 100644 (file)
@@ -155,7 +155,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
       // check for preview dimension limitations
       if ( aShapesId && GetShapeDim( aShType ) > (int)aDim )
       {
-        // clear compute state to not show previous compute errors
+        // clear compute state not to show previous compute errors
         //  if preview invoked less dimension less than previous
         smToCompute->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
         continue;
@@ -355,23 +355,8 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
   MEMOSTAT;
 
   SMESHDS_Mesh *myMesh = aMesh.GetMeshDS();
-  myMesh->adjustStructure();
   MESSAGE("*** compactMesh after compute");
   myMesh->compactMesh();
-  //myMesh->adjustStructure();
-  list<int> listind = myMesh->SubMeshIndices();
-  list<int>::iterator it = listind.begin();
-  int total = 0;
-  for(; it != listind.end(); ++it)
-    {
-      ::SMESHDS_SubMesh *subMesh = myMesh->MeshElements(*it);
-      total +=  subMesh->getSize();
-    }
-  MESSAGE("total elements and nodes in submesh sets:" << total);
-  MESSAGE("Number of node objects " << SMDS_MeshNode::nbNodes);
-  MESSAGE("Number of cell objects " << SMDS_MeshCell::nbCells);
-  //myMesh->dumpGrid();
-  //aMesh.GetMeshDS()->Modified();
 
   // fix quadratic mesh by bending iternal links near concave boundary
   if ( aShape.IsSame( aMesh.GetShapeToMesh() ) &&
@@ -589,6 +574,8 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh&               aMesh,
 
     if ( aLocIgnoAlgo ) // algo is hidden by a local algo of upper dim
     {
+      theErrors.push_back( SMESH_Gen::TAlgoStateError() );
+      theErrors.back().Set( SMESH_Hypothesis::HYP_HIDDEN_ALGO, algo, false );
       INFOS( "Local <" << algo->GetName() << "> is hidden by local <"
             << aLocIgnoAlgo->GetName() << ">");
     }
@@ -598,9 +585,12 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh&               aMesh,
       int dim = algo->GetDim();
       int aMaxGlobIgnoDim = ( aGlobIgnoAlgo ? aGlobIgnoAlgo->GetDim() : -1 );
 
-      if ( dim < aMaxGlobIgnoDim )
+      if ( dim < aMaxGlobIgnoDim &&
+           ( isGlobal || !aGlobIgnoAlgo->SupportSubmeshes() ))
       {
         // algo is hidden by a global algo
+        theErrors.push_back( SMESH_Gen::TAlgoStateError() );
+        theErrors.back().Set( SMESH_Hypothesis::HYP_HIDDEN_ALGO, algo, true );
         INFOS( ( isGlobal ? "Global" : "Local" )
               << " <" << algo->GetName() << "> is hidden by global <"
               << aGlobIgnoAlgo->GetName() << ">");
@@ -680,7 +670,7 @@ static bool checkMissing(SMESH_Gen*                aGen,
   }
   case SMESH_subMesh::MISSING_HYP: {
     // notify if an algo missing hyp is attached to aSubMesh
-    algo = aGen->GetAlgo( aMesh, aSubMesh->GetSubShape() );
+    algo = aSubMesh->GetAlgo();
     ASSERT( algo );
     bool IsGlobalHypothesis = aGen->IsGlobalHypothesis( algo, aMesh );
     if (!IsGlobalHypothesis || !globalChecked[ algo->GetDim() ])
@@ -731,7 +721,7 @@ static bool checkMissing(SMESH_Gen*                aGen,
   {
     bool checkNoAlgo2 = ( algo->NeedDiscreteBoundary() );
     SMESH_subMeshIteratorPtr itsub = aSubMesh->getDependsOnIterator( /*includeSelf=*/false,
-                                                                     /*complexShapeFirst=*/false);
+                                                                     /*complexShapeFirst=*/true);
     while ( itsub->more() )
     {
       // sub-meshes should not be checked further more
@@ -823,7 +813,8 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh&               theMesh,
   for (dim = 3; dim > 0; dim--)
   {
     if (aGlobAlgoArr[ dim ] &&
-        !aGlobAlgoArr[ dim ]->NeedDiscreteBoundary())
+        !aGlobAlgoArr[ dim ]->NeedDiscreteBoundary() /*&&
+        !aGlobAlgoArr[ dim ]->SupportSubmeshes()*/ )
     {
       aGlobIgnoAlgo = aGlobAlgoArr[ dim ];
       break;
@@ -880,14 +871,13 @@ bool SMESH_Gen::GetAlgoState(SMESH_Mesh&               theMesh,
     if ( smToCheck->GetSubShape().ShapeType() == TopAbs_VERTEX)
       break;
 
-    if ( aCheckedSubs.insert( smToCheck ).second ) // not yet checked
-      if (!checkMissing (this, theMesh, smToCheck, aTopAlgoDim,
-                         globalChecked, checkNoAlgo, aCheckedSubs, theErrors))
-      {
-        ret = false;
-        if (smToCheck->GetAlgoState() == SMESH_subMesh::NO_ALGO )
-          checkNoAlgo = false;
-      }
+    if (!checkMissing (this, theMesh, smToCheck, aTopAlgoDim,
+                       globalChecked, checkNoAlgo, aCheckedSubs, theErrors))
+    {
+      ret = false;
+      if (smToCheck->GetAlgoState() == SMESH_subMesh::NO_ALGO )
+        checkNoAlgo = false;
+    }
   }
 
   if ( !hasAlgo ) {
index 48f293a565c8ddba91f58dc7b02e3013922438da..fafd29b4b75a4cdacbee83d0c072862db91d2be9 100644 (file)
@@ -24,7 +24,6 @@
 //  File   : SMESH_Hypothesis.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
-//  $Header$
 //
 #include "SMESH_Hypothesis.hxx"
 #include "SMESH_Gen.hxx"
@@ -50,8 +49,6 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
   _type = PARAM_ALGO;
   _shapeType = 0; // to be set by algo with TopAbs_Enum
   _param_algo_dim = -1; // to be set by algo parameter
-  //_parameters = string();
-  //_lastParameters = string();
 }
 
 //=============================================================================
@@ -171,59 +168,3 @@ SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id)
   }
   return 0;
 }
-
-//=============================================================================
-/*!
- * 
- */
-//=============================================================================
-// void SMESH_Hypothesis::SetParameters(const char *theParameters)
-// {
-//   string aNewParameters(theParameters);
-//   if(aNewParameters.size()==0 && _parameters.size()==0)
-//     aNewParameters = " ";
-//   if(_parameters.size()>0)
-//     _parameters +="|";
-//   _parameters +=aNewParameters;
-//   SetLastParameters(theParameters);
-// }
-
-// //=============================================================================
-// /*!
-//  * 
-//  */
-// //=============================================================================
-// void SMESH_Hypothesis::ClearParameters()
-// {
-//   _parameters = string();
-// }
-
-// //=============================================================================
-// /*!
-//  * 
-//  */
-// //=============================================================================
-// char* SMESH_Hypothesis::GetParameters() const
-// {
-//   return (char*)_parameters.c_str();
-// }
-
-// //=============================================================================
-// /*!
-//  * 
-//  */
-// //=============================================================================
-// char* SMESH_Hypothesis::GetLastParameters() const
-// {
-//   return (char*)_lastParameters.c_str();
-// }
-
-// //=============================================================================
-// /*!
-//  * 
-//  */
-// //=============================================================================
-// void SMESH_Hypothesis::SetLastParameters(const char* theParameters)
-// {
-//   _lastParameters = string(theParameters);
-// }
index 0b171a6efbb293fddecff2e4c8f44059ca114d11..2616e0b5f368b3b2c58b8d576a9590f7351ca54e 100644 (file)
@@ -347,16 +347,32 @@ void SMESH_Mesh::Load()
 
 void SMESH_Mesh::Clear()
 {
-  // clear mesh data
-  _myMeshDS->ClearMesh();
+  if ( HasShapeToMesh() ) // remove all nodes and elements
+  {
+    // clear mesh data
+    _myMeshDS->ClearMesh();
 
-  // update compute state of submeshes
-  if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
+    // update compute state of submeshes
+    if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
+    {
+      sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
+      sm->ComputeSubMeshStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
+      sm->ComputeStateEngine( SMESH_subMesh::CLEAN ); // for event listeners (issue 0020918)
+      sm->ComputeSubMeshStateEngine( SMESH_subMesh::CLEAN );
+    }
+  }
+  else // remove only nodes/elements computed by algorithms
   {
-    sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
-    sm->ComputeSubMeshStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
-    sm->ComputeStateEngine( SMESH_subMesh::CLEAN ); // for event listeners (issue 0020918)
-    sm->ComputeSubMeshStateEngine( SMESH_subMesh::CLEAN );
+    if ( SMESH_subMesh *sm = GetSubMeshContaining( GetShapeToMesh() ) )
+    {
+      SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true,
+                                                               /*complexShapeFirst=*/true);
+      while ( smIt->more() )
+      {
+        sm = smIt->next();
+        sm->ComputeStateEngine( SMESH_subMesh::CLEAN );
+      }
+    }
   }
   _isModified = false;
 }
@@ -545,11 +561,13 @@ int SMESH_Mesh::CGNSToMesh(const char*  theFileName,
  */
 //================================================================================
 
-SMESH_ComputeErrorPtr SMESH_Mesh::GMFToMesh(const char* theFileName)
+SMESH_ComputeErrorPtr SMESH_Mesh::GMFToMesh(const char* theFileName,
+                                            bool        theMakeRequiredGroups)
 {
   DriverGMF_Read myReader;
   myReader.SetMesh(_myMeshDS);
   myReader.SetFile(theFileName);
+  myReader.SetMakeRequiredGroups( theMakeRequiredGroups );
   myReader.Perform();
   //theMeshName = myReader.GetMeshName();
 
@@ -1419,11 +1437,14 @@ void SMESH_Mesh::ExportCGNS(const char *        file,
 //================================================================================
 
 void SMESH_Mesh::ExportGMF(const char *        file,
-                           const SMESHDS_Mesh* meshDS)
+                           const SMESHDS_Mesh* meshDS,
+                           bool                withRequiredGroups)
 {
   DriverGMF_Write myWriter;
   myWriter.SetFile( file );
   myWriter.SetMesh( const_cast<SMESHDS_Mesh*>( meshDS ));
+  myWriter.SetExportRequiredGroups( withRequiredGroups );
+
   myWriter.Perform();
 }
 
@@ -1999,7 +2020,9 @@ void SMESH_Mesh::fillAncestorsMap(const TopoDS_Shape& theShape)
   {
     // a geom group is added. Insert it into lists of ancestors before
     // the first ancestor more complex than group members
-    int memberType = TopoDS_Iterator( theShape ).Value().ShapeType();
+    TopoDS_Iterator subIt( theShape );
+    if ( !subIt.More() ) return;
+    int memberType = subIt.Value().ShapeType();
     for ( desType = TopAbs_VERTEX; desType >= memberType; desType-- )
       for (TopExp_Explorer des( theShape, TopAbs_ShapeEnum( desType )); des.More(); des.Next())
       {
index 5bd9b9c14476db90d122ac265088b584205e1460..2b926f5dd8804c68f42a1ebe4d8dbd1bcefdd8bb 100644 (file)
@@ -122,7 +122,8 @@ public:
 
   int CGNSToMesh(const char* theFileName, const int theMeshIndex, std::string& theMeshName);
   
-  SMESH_ComputeErrorPtr GMFToMesh(const char* theFileName);
+  SMESH_ComputeErrorPtr GMFToMesh(const char* theFileName,
+                                  bool        theMakeRequiredGroups = true );
 
   SMESH_Hypothesis::Hypothesis_Status
   AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
@@ -244,7 +245,8 @@ public:
   void ExportCGNS(const char *        file,
                   const SMESHDS_Mesh* mesh);
   void ExportGMF(const char *        file,
-                 const SMESHDS_Mesh* mesh);
+                 const SMESHDS_Mesh* mesh,
+                 bool                withRequiredGroups = true );
   void ExportSAUV(const char *file, 
                   const char* theMeshName = NULL, 
                   bool theAutoGroups = true) throw(SALOME_Exception);
index 9c75f7975c357adaf2e4e243428ef8a53add488b..ce9b88f8a6fb25e5fbf684a5eea6d7ae74f13305 100644 (file)
@@ -120,6 +120,19 @@ SMESH_MeshEditor::SMESH_MeshEditor( SMESH_Mesh* theMesh )
 {
 }
 
+//================================================================================
+/*!
+ * \brief Clears myLastCreatedNodes and myLastCreatedElems
+ */
+//================================================================================
+
+void SMESH_MeshEditor::CrearLastCreated()
+{
+  myLastCreatedNodes.Clear();
+  myLastCreatedElems.Clear();
+}
+
+
 //=======================================================================
 /*!
  * \brief Add element
@@ -389,6 +402,44 @@ int SMESH_MeshEditor::Remove (const list< int >& theIDs,
   return removed;
 }
 
+//================================================================================
+/*!
+ * \brief Create 0D elements on all nodes of the given object except those
+ *        nodes on which a 0D element already exists.
+ *  \param elements - Elements on whose nodes to create 0D elements; if empty, 
+ *                    the all mesh is treated
+ *  \param all0DElems - returns all 0D elements found or created on nodes of \a elements
+ */
+//================================================================================
+
+void SMESH_MeshEditor::Create0DElementsOnAllNodes( const TIDSortedElemSet& elements,
+                                                   TIDSortedElemSet&       all0DElems )
+{
+  typedef SMDS_SetIterator<const SMDS_MeshElement*, TIDSortedElemSet::const_iterator> TSetIterator;
+  SMDS_ElemIteratorPtr elemIt;
+  if ( elements.empty() )
+    elemIt = GetMeshDS()->elementsIterator( SMDSAbs_Node );
+  else
+    elemIt = SMDS_ElemIteratorPtr( new TSetIterator( elements.begin(), elements.end() ));
+
+  while ( elemIt->more() )
+  {
+    const SMDS_MeshElement* e = elemIt->next();
+    SMDS_ElemIteratorPtr nodeIt = e->nodesIterator();
+    while ( nodeIt->more() )
+    {
+      const SMDS_MeshNode* n = cast2Node( nodeIt->next() );
+      SMDS_ElemIteratorPtr it0D = n->GetInverseElementIterator( SMDSAbs_0DElement );
+      if ( it0D->more() )
+        all0DElems.insert( it0D->next() );
+      else {
+        myLastCreatedElems.Append( GetMeshDS()->Add0DElement( n ));
+        all0DElems.insert( myLastCreatedElems.Last() );
+      }
+    }
+  }
+}
+
 //=======================================================================
 //function : FindShape
 //purpose  : Return an index of the shape theElem is on
@@ -1065,7 +1116,7 @@ bool SMESH_MeshEditor::Reorient (const SMDS_MeshElement * theElem)
  * \brief Reorient faces.
  * \param theFaces - the faces to reorient. If empty the whole mesh is meant
  * \param theDirection - desired direction of normal of \a theFace
- * \param theFace - one of \a theFaces that sould be orientated according to
+ * \param theFace - one of \a theFaces that sould be oriented according to
  *        \a theDirection and whose orientation defines orientation of other faces
  * \return number of reoriented faces.
  */
@@ -1093,7 +1144,7 @@ int SMESH_MeshEditor::Reorient2D (TIDSortedElemSet &       theFaces,
 
   // Orient other faces
 
-  set< const SMDS_MeshElement* > startFaces;
+  set< const SMDS_MeshElement* > startFaces, visitedFaces;
   TIDSortedElemSet avoidSet;
   set< SMESH_TLink > checkedLinks;
   pair< set< SMESH_TLink >::iterator, bool > linkIt_isNew;
@@ -1102,16 +1153,26 @@ int SMESH_MeshEditor::Reorient2D (TIDSortedElemSet &       theFaces,
     theFaces.erase( theFace );
   startFaces.insert( theFace );
 
+  int nodeInd1, nodeInd2;
+  const SMDS_MeshElement*           otherFace;
+  vector< const SMDS_MeshElement* > facesNearLink;
+  vector< std::pair< int, int > >   nodeIndsOfFace;
+
   set< const SMDS_MeshElement* >::iterator startFace = startFaces.begin();
-  while ( startFace != startFaces.end() )
+  while ( !startFaces.empty() )
   {
+    startFace = startFaces.begin();
     theFace = *startFace;
-    const int nbNodes = theFace->NbCornerNodes();
+    startFaces.erase( startFace );
+    if ( !visitedFaces.insert( theFace ).second )
+      continue;
 
     avoidSet.clear();
     avoidSet.insert(theFace);
 
     NLink link( theFace->GetNode( 0 ), 0 );
+
+    const int nbNodes = theFace->NbCornerNodes();
     for ( int i = 0; i < nbNodes; ++i ) // loop on links of theFace
     {
       link.second = theFace->GetNode(( i+1 ) % nbNodes );
@@ -1120,33 +1181,61 @@ int SMESH_MeshEditor::Reorient2D (TIDSortedElemSet &       theFaces,
       {
         // link has already been checked and won't be encountered more
         // if the group (theFaces) is manifold
-        checkedLinks.erase( linkIt_isNew.first );
+        //checkedLinks.erase( linkIt_isNew.first );
       }
       else
       {
-        int nodeInd1, nodeInd2;
-        const SMDS_MeshElement* otherFace = FindFaceInSet( link.first, link.second,
-                                                           theFaces, avoidSet,
-                                                           & nodeInd1, & nodeInd2);
+        facesNearLink.clear();
+        nodeIndsOfFace.clear();
+        while (( otherFace = FindFaceInSet( link.first, link.second,
+                                            theFaces, avoidSet, &nodeInd1, &nodeInd2 )))
+          if ( otherFace != theFace)
+          {
+            facesNearLink.push_back( otherFace );
+            nodeIndsOfFace.push_back( make_pair( nodeInd1, nodeInd2 ));
+            avoidSet.insert( otherFace );
+          }
+        if ( facesNearLink.size() > 1 )
+        {
+          // NON-MANIFOLD mesh shell !
+          // select a face most co-directed with theFace,
+          // other faces won't be visited this time
+          gp_XYZ NF, NOF;
+          SMESH_Algo::FaceNormal( theFace, NF, /*normalized=*/false );
+          double proj, maxProj = -1;
+          for ( size_t i = 0; i < facesNearLink.size(); ++i ) {
+            SMESH_Algo::FaceNormal( facesNearLink[i], NOF, /*normalized=*/false );
+            if (( proj = Abs( NF * NOF )) > maxProj ) {
+              maxProj = proj;
+              otherFace = facesNearLink[i];
+              nodeInd1  = nodeIndsOfFace[i].first;
+              nodeInd2  = nodeIndsOfFace[i].second;
+            }
+          }
+          // not to visit rejected faces
+          for ( size_t i = 0; i < facesNearLink.size(); ++i )
+            if ( facesNearLink[i] != otherFace && theFaces.size() > 1 )
+              visitedFaces.insert( facesNearLink[i] );
+        }
+        else if ( facesNearLink.size() == 1 )
+        {
+          otherFace = facesNearLink[0];
+          nodeInd1  = nodeIndsOfFace.back().first;
+          nodeInd2  = nodeIndsOfFace.back().second;
+        }
         if ( otherFace && otherFace != theFace)
         {
-          // link must be reversed in otherFace if orientation ot otherFace
+          // link must be reverse in otherFace if orientation ot otherFace
           // is same as that of theFace
           if ( abs(nodeInd2-nodeInd1) == 1 ? nodeInd2 > nodeInd1 : nodeInd1 > nodeInd2 )
           {
-            // cout << "Reorient " << otherFace->GetID() << " near theFace=" <<theFace->GetID()
-            //      << " \tlink( " << link.first->GetID() << " " << link.second->GetID() << endl;
             nbReori += Reorient( otherFace );
           }
           startFaces.insert( otherFace );
-          if ( theFaces.size() > 1 ) // leave 1 face to prevent finding not selected faces
-            theFaces.erase( otherFace );
         }
       }
-      std::swap( link.first, link.second );
+      std::swap( link.first, link.second ); // reverse the link
     }
-    startFaces.erase( startFace );
-    startFace = startFaces.begin();
   }
   return nbReori;
 }
@@ -1216,7 +1305,8 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet &                   theElems,
     if( !elem->IsQuadratic() ) {
 
       // split liner quadrangle
-
+      // for MaxElementLength2D functor we return minimum diagonal for splitting,
+      // because aBadRate1=2*len(diagonal 1-3); aBadRate2=2*len(diagonal 2-4)
       if ( aBadRate1 <= aBadRate2 ) {
         // tr1 + tr2 is better
         newElem1 = aMesh->AddFace( aNodes[2], aNodes[3], aNodes[0] );
@@ -1350,7 +1440,8 @@ int SMESH_MeshEditor::BestSplit (const SMDS_MeshElement*              theQuad,
     SMDS_FaceOfNodes tr3 ( aNodes[1], aNodes[2], aNodes[3] );
     SMDS_FaceOfNodes tr4 ( aNodes[3], aNodes[0], aNodes[1] );
     aBadRate2 = getBadRate( &tr3, theCrit ) + getBadRate( &tr4, theCrit );
-
+    // for MaxElementLength2D functor we return minimum diagonal for splitting,
+    // because aBadRate1=2*len(diagonal 1-3); aBadRate2=2*len(diagonal 2-4)
     if (aBadRate1 <= aBadRate2) // tr1 + tr2 is better
       return 1; // diagonal 1-3
 
@@ -3062,7 +3153,7 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet &          theElems,
     SMDS_FaceIteratorPtr fIt = aMesh->facesIterator();
     while ( fIt->more() ) {
       const SMDS_MeshElement* face = fIt->next();
-      theElems.insert( face );
+      theElems.insert( theElems.end(), face );
     }
   }
   // get all face ids theElems are on
@@ -5082,10 +5173,16 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
     if ( BRep_Tool::Degenerated( aTrackEdge ) )
       return EXTR_BAD_PATH_SHAPE;
     TopExp::Vertices( aTrackEdge, aV1, aV2 );
-    aItN = theTrack->GetSubMesh( aV1 )->GetSubMeshDS()->GetNodes();
-    const SMDS_MeshNode* aN1 = aItN->next();
-    aItN = theTrack->GetSubMesh( aV2 )->GetSubMeshDS()->GetNodes();
-    const SMDS_MeshNode* aN2 = aItN->next();
+    const SMDS_MeshNode* aN1 = 0;
+    const SMDS_MeshNode* aN2 = 0;
+    if ( theTrack->GetSubMesh( aV1 ) && theTrack->GetSubMesh( aV1 )->GetSubMeshDS() ) {
+      aItN = theTrack->GetSubMesh( aV1 )->GetSubMeshDS()->GetNodes();
+      aN1 = aItN->next();
+    }
+    if ( theTrack->GetSubMesh( aV2 ) && theTrack->GetSubMesh( aV2 )->GetSubMeshDS() ) {
+      aItN = theTrack->GetSubMesh( aV2 )->GetSubMeshDS()->GetNodes();
+      aN2 = aItN->next();
+    }
     // starting node must be aN1 or aN2
     if ( !( aN1 == theN1 || aN2 == theN1 ) )
       return EXTR_BAD_STARTING_NODE;
@@ -5115,7 +5212,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
       }
     }
     list< list<SMESH_MeshEditor_PathPoint> > LLPPs;
-    int startNid = theN1->GetID();
+    TopoDS_Vertex aVprev;
     TColStd_MapOfInteger UsedNums;
     int NbEdges = Edges.Length();
     int i = 1;
@@ -5129,17 +5226,37 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
         SMESH_subMesh* locTrack = *itLSM;
         SMESHDS_SubMesh* locMeshDS = locTrack->GetSubMeshDS();
         TopExp::Vertices( aTrackEdge, aV1, aV2 );
-        aItN = locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS()->GetNodes();
-        const SMDS_MeshNode* aN1 = aItN->next();
-        aItN = locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS()->GetNodes();
-        const SMDS_MeshNode* aN2 = aItN->next();
-        // starting node must be aN1 or aN2
-        if ( !( aN1->GetID() == startNid || aN2->GetID() == startNid ) ) continue;
+        bool aN1isOK = false, aN2isOK = false;
+        if ( aVprev.IsNull() ) {
+          // if previous vertex is not yet defined, it means that we in the beginning of wire
+          // and we have to find initial vertex corresponding to starting node theN1
+          const SMDS_MeshNode* aN1 = 0;
+          const SMDS_MeshNode* aN2 = 0;
+
+          if ( locTrack->GetFather()->GetSubMesh(aV1) && locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS() ) {
+            aItN = locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS()->GetNodes();
+            aN1 = aItN->next();
+          }
+          if ( locTrack->GetFather()->GetSubMesh(aV2) && locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS() ) {
+            aItN = locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS()->GetNodes();
+            aN2 = aItN->next();
+          }
+          // starting node must be aN1 or aN2
+          aN1isOK = ( aN1 && aN1 == theN1 );
+          aN2isOK = ( aN2 && aN2 == theN1 );
+        }
+        else {
+          // we have specified ending vertex of the previous edge on the previous iteration
+          // and we have just to check that it corresponds to any vertex in current segment
+          aN1isOK = aVprev.IsSame( aV1 );
+          aN2isOK = aVprev.IsSame( aV2 );
+        }
+        if ( !aN1isOK && !aN2isOK ) continue;
         // 2. Collect parameters on the track edge
         aPrms.clear();
         aItN = locMeshDS->GetNodes();
         while ( aItN->more() ) {
-          const SMDS_MeshNode* pNode = aItN->next();
+          const SMDS_MeshNode*     pNode = aItN->next();
           const SMDS_EdgePosition* pEPos =
             static_cast<const SMDS_EdgePosition*>( pNode->GetPosition() );
           double aT = pEPos->GetUParameter();
@@ -5147,12 +5264,12 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
         }
         list<SMESH_MeshEditor_PathPoint> LPP;
         //Extrusion_Error err =
-        MakeEdgePathPoints(aPrms, aTrackEdge,(aN1->GetID()==startNid), LPP);
+        MakeEdgePathPoints(aPrms, aTrackEdge, aN1isOK, LPP);
         LLPPs.push_back(LPP);
         UsedNums.Add(k);
         // update startN for search following egde
-        if( aN1->GetID() == startNid ) startNid = aN2->GetID();
-        else startNid = aN1->GetID();
+        if ( aN1isOK ) aVprev = aV2;
+        else           aVprev = aV1;
         break;
       }
     }
@@ -5171,8 +5288,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet &   theElements,
       SMESH_MeshEditor_PathPoint PP2 = currList.front();
       gp_Dir D1 = PP1.Tangent();
       gp_Dir D2 = PP2.Tangent();
-      gp_Dir Dnew( gp_Vec( (D1.X()+D2.X())/2, (D1.Y()+D2.Y())/2,
-                           (D1.Z()+D2.Z())/2 ) );
+      gp_Dir Dnew( ( D1.XYZ() + D2.XYZ() ) / 2 );
       PP1.SetTangent(Dnew);
       fullList.push_back(PP1);
       itPP++;
@@ -8156,6 +8272,7 @@ private:
 //purpose  : Return list of group of elements built on the same nodes.
 //           Search among theElements or in the whole mesh if theElements is empty
 //=======================================================================
+
 void SMESH_MeshEditor::FindEqualElements(TIDSortedElemSet &        theElements,
                                          TListOfListOfElementsID & theGroupsOfElementsID)
 {
index 26240938810e8f3e2e19c5d483ce0a252365569e..ce52a9c051c342ac2a049cb0fa19b1c929982b36 100644 (file)
@@ -116,6 +116,7 @@ public:
 
   const SMESH_SequenceOfElemPtr& GetLastCreatedNodes() const { return myLastCreatedNodes; }
   const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
+  void                           CrearLastCreated();
 
   SMESH_ComputeErrorPtr &        GetError() { return myError; }
 
@@ -139,6 +140,12 @@ public:
   // Remove a node or an element.
   // Modify a compute state of sub-meshes which become empty
 
+  void Create0DElementsOnAllNodes( const TIDSortedElemSet& elements,
+                                   TIDSortedElemSet&       all0DElems);
+  // Create 0D elements on all nodes of the given object except those
+  // nodes on which a 0D element already exists. \a all0DElems returns
+  // all 0D elements found or created on nodes of \a elements
+
   bool InverseDiag (const SMDS_MeshElement * theTria1,
                     const SMDS_MeshElement * theTria2 );
   // Replace two neighbour triangles with ones built on the same 4 nodes
index 60d202870cda4ff3f7ee87df0616f084a24d19b1..ab1cc9cab3dbf82c04fc99b5365ac5e9add7d794 100644 (file)
@@ -283,6 +283,18 @@ void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
             myDegenShapeIds.insert( meshDS->ShapeToIndex( v.Current() ));
         }
       }
+      if ( !myDegenShapeIds.empty() && !myParIndex ) {
+        if ( surface->IsUPeriodic() || surface->IsUClosed() ) {
+          myParIndex |= U_periodic;
+          myPar1[0] = surf.FirstUParameter();
+          myPar2[0] = surf.LastUParameter();
+        }
+        else if ( surface->IsVPeriodic() || surface->IsVClosed() ) {
+          myParIndex |= V_periodic;
+          myPar1[1] = surf.FirstVParameter();
+          myPar2[1] = surf.LastVParameter();
+        }
+      }
     }
   }
 }
@@ -3428,7 +3440,7 @@ namespace { // Structures used by FixQuadraticElements()
  */
 //=======================================================================
 
-void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& error,
+void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
                                               bool                   volumeOnly)
 {
   // setenv NO_FixQuadraticElements to know if FixQuadraticElements() is guilty of bad conversion
@@ -3462,7 +3474,8 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& error,
 #endif
         SMESH_MesherHelper h(*myMesh);
         h.SetSubShape( s.Current() );
-        h.FixQuadraticElements( error, false );
+        h.ToFixNodeParameters(true);
+        h.FixQuadraticElements( compError, false );
       }
     }
     // fix nodes on geom faces
@@ -3473,12 +3486,12 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& error,
       MSG("FIX FACE " << nbfaces-- << " #" << GetMeshDS()->ShapeToIndex(fIt.Key()));
       SMESH_MesherHelper h(*myMesh);
       h.SetSubShape( fIt.Key() );
-      h.FixQuadraticElements( error, true);
       h.ToFixNodeParameters(true);
+      h.FixQuadraticElements( compError, true);
     }
     //perf_print_all_meters(1);
-    if ( error && error->myName == EDITERR_NO_MEDIUM_ON_GEOM )
-      error->myComment = "during conversion to quadratic, "
+    if ( compError && compError->myName == EDITERR_NO_MEDIUM_ON_GEOM )
+      compError->myComment = "during conversion to quadratic, "
         "some medium nodes were not placed on geometry to avoid distorting elements";
     return;
   }
@@ -3521,7 +3534,7 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& error,
   // Issue 0020982
   // Move medium nodes to the link middle for elements whose corner nodes
   // are out of geometrical boundary to fix distorted elements.
-  force3DOutOfBoundary( *this, error );
+  force3DOutOfBoundary( *this, compError );
 
   if ( elemType == SMDSAbs_Volume )
   {
@@ -3595,7 +3608,9 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& error,
         QLink link( face->GetNode(iN), face->GetNode((iN+1)%nbN), face->GetNode(iN+nbN) );
         pLink = links.insert( link ).first;
         faceLinks[ iN ] = & *pLink;
-        if ( !isCurved )
+        if ( !isCurved &&
+             link.node1()->GetPosition()->GetTypeOfPosition() < 2 &&
+             link.node2()->GetPosition()->GetTypeOfPosition() < 2 )
           isCurved = !link.IsStraight();
       }
       // store QFace
index 4e77b3f81afa43e5a8f64d9deee7f0f31bcb1ef2..5fae7685a7366585561cef3adcfe92958d9b9de2 100644 (file)
@@ -1133,7 +1133,7 @@ bool SMESH_subMesh::IsConform(const SMESH_Algo* theAlgo)
  */
 //=============================================================================
 
-void SMESH_subMesh::setAlgoState(int state)
+void SMESH_subMesh::setAlgoState(algo_state state)
 {
   _algoState = state;
 }
@@ -2203,6 +2203,9 @@ void SMESH_subMesh::DeleteEventListener(EventListener* listener)
       delete l_d->second;
     }
     _eventListeners.erase( l_d );
+
+    if ( l_d->first && !l_d->first->IsDeletable() )
+      l_d->first->myBusySM.erase( this );
   }
 }
 
index 355107186a0bbb14d3b36fafbf5134b67337dea9..43b8349f1b032c0dae5bf02b7e49d1b9ebb7d4c8 100644 (file)
@@ -65,7 +65,7 @@ class SMESH_EXPORT SMESH_subMesh
                 const TopoDS_Shape & aSubShape);
   virtual ~ SMESH_subMesh();
 
-  int GetId() const;
+  int GetId() const; // == meshDS->ShapeToIndex( aSubShape )
 
   SMESH_Mesh* GetFather() { return _father; }
   
@@ -209,9 +209,9 @@ public:
   SMESH_Hypothesis::Hypothesis_Status
     SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis * anHyp);
 
-  int GetAlgoState() const { return _algoState; }
-  int GetComputeState() const { return _computeState; };
-  SMESH_ComputeErrorPtr& GetComputeError() { return _computeError; }
+  algo_state             GetAlgoState() const    { return _algoState; }
+  compute_state          GetComputeState() const { return _computeState; };
+  SMESH_ComputeErrorPtr& GetComputeError()       { return _computeError; }
 
   void DumpAlgoState(bool isMain);
 
@@ -275,7 +275,7 @@ protected:
   void updateSubMeshState(const compute_state theState);
   void cleanDependants();
   void cleanDependsOn();
-  void setAlgoState(int state);
+  void setAlgoState(algo_state state);
 
   /*!
    * \brief Return a shape containing all sub-shapes of the MainShape that can be
@@ -314,8 +314,8 @@ protected:
   std::map < int, SMESH_subMesh * >_mapDepend;
   bool                  _dependenceAnalysed;
 
-  int                   _algoState;
-  int                   _computeState;
+  algo_state            _algoState;
+  compute_state         _computeState;
   SMESH_ComputeErrorPtr _computeError;
 
   // allow algo->Compute() if a subshape of lower dim is meshed but
index 9bfd599b3debf59f9556f503c8623d11082f3066..e48d1e8d75670a7dc095c94ee430c2e11af42c7d 100644 (file)
@@ -97,6 +97,7 @@ salomeinclude_HEADERS = \
        SMESHGUI_PreviewDlg.h  \
        SMESHGUI_ReorientFacesDlg.h \
        SMESHGUI_PropertiesDlg.h \
+       SMESHGUI_Add0DElemsOnAllNodesDlg.h \
        SMESH_SMESHGUI.hxx
 
 # Libraries targets
@@ -173,7 +174,8 @@ dist_libSMESH_la_SOURCES = \
        SMESHGUI_FileValidator.cxx \
        SMESHGUI_PreviewDlg.cxx  \
        SMESHGUI_ReorientFacesDlg.cxx \
-       SMESHGUI_PropertiesDlg.cxx
+       SMESHGUI_PropertiesDlg.cxx \
+       SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
 
 MOC_FILES = \
        SMESHGUI_moc.cxx \
@@ -233,7 +235,8 @@ MOC_FILES = \
        SMESHGUI_MeshOrderOp_moc.cxx \
        SMESHGUI_PreviewDlg_moc.cxx \
        SMESHGUI_ReorientFacesDlg_moc.cxx \
-       SMESHGUI_PropertiesDlg_moc.cxx
+       SMESHGUI_PropertiesDlg_moc.cxx \
+       SMESHGUI_Add0DElemsOnAllNodesDlg_moc.cxx
 
 nodist_libSMESH_la_SOURCES= \
        $(MOC_FILES)
index 2cecefccb16c98640c68fe176b7c923feeb835b4..86de4f316721e8c6680303eeff1d93a7b883b749 100644 (file)
 #undef HAVE_FINITE            // VSR: avoid compilation warning on Linux : "HAVE_FINITE" redefined
 #endif
 #include "Python.h"
+
 //  SMESH includes
 #include "SMESHGUI.h"
+#include "SMESHGUI_Add0DElemsOnAllNodesDlg.h"
 #include "SMESHGUI_AddMeshElementDlg.h"
 #include "SMESHGUI_AddQuadraticElementDlg.h"
 #include "SMESHGUI_BuildCompoundDlg.h"
 #include "SMESHGUI_ClippingDlg.h"
 #include "SMESHGUI_ComputeDlg.h"
 #include "SMESHGUI_ConvToQuadOp.h"
+#include "SMESHGUI_CopyMeshDlg.h"
 #include "SMESHGUI_CreatePolyhedralVolumeDlg.h"
 #include "SMESHGUI_DeleteGroupDlg.h"
 #include "SMESHGUI_Displayer.h"
-#include "SMESHGUI_MergeDlg.h"
+#include "SMESHGUI_DuplicateNodesDlg.h"
 #include "SMESHGUI_ExtrusionAlongPathDlg.h"
 #include "SMESHGUI_ExtrusionDlg.h"
 #include "SMESHGUI_FileInfoDlg.h"
@@ -53,6 +56,7 @@
 #include "SMESHGUI_Make2DFrom3DOp.h"
 #include "SMESHGUI_MakeNodeAtPointDlg.h"
 #include "SMESHGUI_Measurements.h"
+#include "SMESHGUI_MergeDlg.h"
 #include "SMESHGUI_MeshInfo.h"
 #include "SMESHGUI_MeshOp.h"
 #include "SMESHGUI_MeshOrderOp.h"
 #include "SMESHGUI_RemoveElementsDlg.h"
 #include "SMESHGUI_RemoveNodesDlg.h"
 #include "SMESHGUI_RenumberingDlg.h"
+#include "SMESHGUI_ReorientFacesDlg.h"
 #include "SMESHGUI_RevolutionDlg.h"
 #include "SMESHGUI_RotationDlg.h"
+#include "SMESHGUI_ScaleDlg.h"
 #include "SMESHGUI_Selection.h"
 #include "SMESHGUI_SewingDlg.h"
 #include "SMESHGUI_SingleEditDlg.h"
 #include "SMESHGUI_SmoothingDlg.h"
 #include "SMESHGUI_SymmetryDlg.h"
 #include "SMESHGUI_TranslationDlg.h"
-#include "SMESHGUI_ScaleDlg.h"
 #include "SMESHGUI_TransparencyDlg.h"
-#include "SMESHGUI_DuplicateNodesDlg.h"
-#include "SMESHGUI_CopyMeshDlg.h"
-#include "SMESHGUI_ReorientFacesDlg.h"
 
-#include "SMESHGUI_Utils.h"
-#include "SMESHGUI_MeshUtils.h"
-#include "SMESHGUI_GroupUtils.h"
 #include "SMESHGUI_FilterUtils.h"
+#include "SMESHGUI_GroupUtils.h"
+#include "SMESHGUI_HypothesesUtils.h"
+#include "SMESHGUI_MeshUtils.h"
 #include "SMESHGUI_PatternUtils.h"
+#include "SMESHGUI_Utils.h"
 #include "SMESHGUI_VTKUtils.h"
-#include "SMESHGUI_HypothesesUtils.h"
 
 #include <SMESH_version.h>
 
-#include <SMESH_Client.hxx>
+#include "SMESH_ControlsDef.hxx"
 #include <SMESH_Actor.h>
-#include <SMESH_ScalarBarActor.h>
 #include <SMESH_ActorUtils.h>
+#include <SMESH_Client.hxx>
+#include <SMESH_ScalarBarActor.h>
 #include <SMESH_TypeFilter.hxx>
-#include "SMESH_ControlsDef.hxx"
 
 // SALOME GUI includes
-#include <SalomeApp_Tools.h>
-#include <SalomeApp_Study.h>
 #include <SalomeApp_Application.h>
 #include <SalomeApp_CheckFileDlg.h>
 #include <SalomeApp_DataObject.h>
+#include <SalomeApp_Study.h>
+#include <SalomeApp_Tools.h>
 
 #include <LightApp_DataOwner.h>
+#include <LightApp_NameDlg.h>
 #include <LightApp_Preferences.h>
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_UpdateFlags.h>
-#include <LightApp_NameDlg.h>
 
-#include <SVTK_ViewWindow.h>
-#include <SVTK_ViewModel.h>
 #include <SVTK_ViewManager.h>
+#include <SVTK_ViewModel.h>
+#include <SVTK_ViewWindow.h>
 
 #include <VTKViewer_Algorithm.h>
 
-#include <SUIT_MessageBox.h>
-#include <SUIT_ResourceMgr.h>
-#include <SUIT_FileDlg.h>
 #include <SUIT_Desktop.h>
+#include <SUIT_FileDlg.h>
+#include <SUIT_MessageBox.h>
 #include <SUIT_OverrideCursor.h>
+#include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 
 #include <QtxPopupMgr.h>
 #include <boost/shared_ptr.hpp>
 
 // VTK includes
-#include <vtkCamera.h>
-#include <vtkRenderer.h>
-#include <vtkPlane.h>
 #include <vtkCallbackCommand.h>
+#include <vtkCamera.h>
 #include <vtkLookupTable.h>
+#include <vtkPlane.h>
+#include <vtkRenderer.h>
 
 // SALOME KERNEL includes
-#include <SALOMEDS_Study.hxx>
-#include <SALOMEDSClient_StudyBuilder.hxx>
-#include <SALOMEDSClient_SComponent.hxx>
 #include <SALOMEDSClient_ClientFactory.hxx>
 #include <SALOMEDSClient_IParameters.hxx>
+#include <SALOMEDSClient_SComponent.hxx>
+#include <SALOMEDSClient_StudyBuilder.hxx>
+#include <SALOMEDS_Study.hxx>
 
 // OCCT includes
 #include <Standard_ErrorHandler.hxx>
 #include <Basics_Utils.hxx>
 
 //To disable automatic genericobj management, the following line should be commented.
-//Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
+//Otherwise, it should be uncommented.
+//Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
 #define WITHGENERICOBJ
 
 //namespace{
     if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
       anInitialPath = QDir::currentPath();
 
-    QStringList filenames = SUIT_FileDlg::getOpenFileNames( SMESHGUI::desktop(),
-                                                            anInitialPath,
-                                                            filter,
-                                                            QObject::tr( "SMESH_IMPORT_MESH" ) );
+    QStringList filenames;
+    bool toCreateGroups = true;
+
+    // if ( theCommandID == 118 ) { // GMF
+    //   SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg
+    //     ( SMESHGUI::desktop(), true, QObject::tr("SMESH_REQUIRED_GROUPS"), true, true );
+    //   fd->setWindowTitle( QObject::tr( "SMESH_IMPORT_MESH" ) );
+    //   fd->setNameFilters( filter );
+    //   fd->SetChecked( true );
+    //   if ( fd->exec() )
+    //     filenames << fd->selectedFile();
+    //   toCreateGroups = fd->IsChecked();
+
+    //   delete fd;
+    // }
+    // else
+    {
+      filenames = SUIT_FileDlg::getOpenFileNames( SMESHGUI::desktop(),
+                                                  anInitialPath,
+                                                  filter,
+                                                  QObject::tr( "SMESH_IMPORT_MESH" ) );
+    }
     if ( filenames.count() > 0 ) {
       SUIT_OverrideCursor wc;
       _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
               // GMF format
               SMESH::ComputeError_var res;
               aMeshes->length( 1 );
-              aMeshes[0] = theComponentMesh->CreateMeshesFromGMF( filename.toLatin1().constData(), res.out() );
+              aMeshes[0] = theComponentMesh->CreateMeshesFromGMF( filename.toLatin1().constData(),
+                                                                  toCreateGroups,
+                                                                  res.out() );
               if ( res->code != SMESH::DRS_OK ) {
                 errors.append( QString( "%1 :\n\t%2" ).arg( filename ).
                                arg( QObject::tr( QString( "SMESH_DRS_%1" ).arg( res->code ).toLatin1().data() ) ) );
       else if ( isGMF )
         aFilter = QObject::tr( "GMF_ASCII_FILES_FILTER" ) + " (*.mesh)" +
           ";;" +  QObject::tr( "GMF_BINARY_FILES_FILTER" )  + " (*.meshb)";
-      if ( anInitialPath.isEmpty() ) anInitialPath = SUIT_FileDlg::getLastVisitedPath();
+     if ( anInitialPath.isEmpty() ) anInitialPath = SUIT_FileDlg::getLastVisitedPath();
       aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(),
                                             anInitialPath + QString("/") + aMeshName,
                                             aFilter, aTitle, false);
     }
+    // else if ( isGMF )// Export to GMF
+    // {
+      // SalomeApp_CheckFileDlg* fd = new SalomeApp_CheckFileDlg
+      //   ( SMESHGUI::desktop(), false, QObject::tr("SMESH_REQUIRED_GROUPS"), true, true );
+      // QStringList filters;
+      // filters << QObject::tr( "GMF_ASCII_FILES_FILTER" ) + " (*.mesh)"
+      //         << QObject::tr( "GMF_BINARY_FILES_FILTER" )  + " (*.meshb)";
+      // fd->setWindowTitle( aTitle );
+      // fd->setNameFilters( filters );
+
+      // if ( !aMeshOrGroup->_is_equivalent( aMesh ))
+      //   toCreateGroups = false;
+      // else
+      //   toCreateGroups = ( aMesh->NbGroups() > 0 );
+
+      // fd->SetChecked( true );
+      // if ( !anInitialPath.isEmpty() )
+      //   fd->setDirectory( anInitialPath );
+      // fd->selectFile(aMeshName);
+
+      // if ( fd->exec() )
+      //   aFilename = fd->selectedFile();
+      // toCreateGroups = fd->IsChecked();
+
+      // delete fd;
+    // }
     else if ( isCGNS )// Export to CGNS
     {
       SUIT_FileDlg* fd = new SUIT_FileDlg( SMESHGUI::desktop(), false, true, true );
         }
         else if ( isGMF )
         {
-          aMesh->ExportGMF( aMeshOrGroup, aFilename.toLatin1().data() );
+          toCreateGroups = true;
+          aMesh->ExportGMF( aMeshOrGroup, aFilename.toLatin1().data(), toCreateGroups );
         }
       }
       catch (const SALOME::SALOME_Exception& S_ex){
@@ -3020,7 +3070,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       if(checkLock(aStudy)) break;
       if ( vtkwnd ) {
         EmitSignalDeactivateDialog();
-        SMDSAbs_EntityType type;
+        SMDSAbs_EntityType type = SMDSEntity_Last;
 
         switch (theCommandID) {
         case 4034:
@@ -3038,13 +3088,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
         case 4039:
           type = SMDSEntity_Quad_Penta; break;
         case 4040:
-          type = SMDSEntity_Quad_Hexa;
+          type = SMDSEntity_Quad_Hexa; break;
         case 4140:
-          type = SMDSEntity_TriQuad_Hexa;
-          break;
-        default:;
+          type = SMDSEntity_TriQuad_Hexa; break;
+        default: break;
         }
-         ( new SMESHGUI_AddQuadraticElementDlg( this, type ) )->show();
+        if ( type != SMDSEntity_Last )
+          ( new SMESHGUI_AddQuadraticElementDlg( this, type ) )->show();
       }
       else {
         SUIT_MessageBox::warning(SMESHGUI::desktop(),
@@ -3295,6 +3345,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
 
+  case 4070: // 0D_ON_ALL_NODES
+    startOperation( 4070 );
+    break;
+
   case 5105: // Library of selection filters
   {
     static QList<int> aTypes;
@@ -3645,6 +3699,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( 4067, "MESH_THROU_POINT","ICON_DLG_MOVE_NODE" );
   createSMESHAction( 4068, "SCALE",           "ICON_DLG_MESH_SCALE" );
   createSMESHAction( 4069, "DUPLICATE_NODES", "ICON_SMESH_DUPLICATE_NODES" );
+  createSMESHAction( 4070, "0D_ON_ALL_NODES", "ICON_0D_ON_ALL_NODES" );
   createSMESHAction(  407, "INV",             "ICON_DLG_MESH_DIAGONAL" );
   createSMESHAction(  408, "UNION2",          "ICON_UNION2TRI" );
   createSMESHAction(  409, "ORIENT",          "ICON_DLG_MESH_ORIENTATION" );
@@ -3807,6 +3862,7 @@ void SMESHGUI::initialize( CAM_Application* app )
 
   createMenu( 4000, addId, -1 );
   createMenu( 4009, addId, -1 );
+  createMenu( 4070, addId, -1 );
   createMenu( 4008, addId, -1 );
   createMenu( 4010, addId, -1 );
   createMenu( 4021, addId, -1 );
@@ -3932,6 +3988,7 @@ void SMESHGUI::initialize( CAM_Application* app )
 
   createTool( 4000, addRemTb );
   createTool( 4009, addRemTb );
+  createTool( 4070, addRemTb );
   createTool( 4008, addRemTb );
   createTool( 4010, addRemTb );
   createTool( 4021, addRemTb );
@@ -5130,9 +5187,12 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
     case 904: // Find element
       op = new SMESHGUI_FindElemByPointOp();
       break;
-    case 4067: // make mesh pass through point
+    case 4067: // Make mesh pass through point
       op = new SMESHGUI_MakeNodeAtPointOp();
       break;
+    case 4070: // Create 0D elements on all nodes
+      op = new SMESHGUI_Add0DElemsOnAllNodesOp();
+      break;
     default:
     break;
   }
@@ -5372,8 +5432,8 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   bool isE  = aMode & SMESH_Actor::eEdges;
                   bool isF  = aMode & SMESH_Actor::eFaces;
                   bool isV  = aMode & SMESH_Actor::eVolumes;
-                 bool is0d = aMode & SMESH_Actor::e0DElements;
-                 bool isB  = aMode & SMESH_Actor::eBallElem;
+                  bool is0d = aMode & SMESH_Actor::e0DElements;
+                  bool isB  = aMode & SMESH_Actor::eBallElem;
 
                   QString modeStr ("e");
                   modeStr += gDigitsSep; modeStr += QString::number(isE);
@@ -5395,7 +5455,7 @@ void SMESHGUI::storeVisualParameters (int savePoint)
 
                   aSmeshActor->GetSufaceColor(r, g, b, delta);
                   QStringList colorStr;
-                 colorStr << "surface";
+                  colorStr << "surface";
                   colorStr << QString::number(r);
                   colorStr << QString::number(g);
                   colorStr << QString::number(b);
@@ -5450,8 +5510,8 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   ip->setParameter(entry, param, qPrintable(colorStr.join(gDigitsSep)));
 
                   // Sizes
-                 QStringList sizeStr;
-                 sizeStr << "line";
+                  QStringList sizeStr;
+                  sizeStr << "line";
                   sizeStr << QString::number((int)aSmeshActor->GetLineWidth());
                   sizeStr << "outline";
                   sizeStr << QString::number((int)aSmeshActor->GetOutlineWidth());
@@ -5791,280 +5851,280 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
             // Displayed entities
             else if (paramNameStr == "Entities") {
               QStringList mode = val.split(gDigitsSep, QString::SkipEmptyParts);
-             int aEntityMode = SMESH_Actor::eAllEntity;
-             for ( int i = 0; i < mode.count(); i+=2 ) {
-               if ( i < mode.count()-1 ) {
-                 QString type = mode[i];
-                 bool val = mode[i+1].toInt();
-                 if      ( type == "e" && !val )
-                   aEntityMode = aEntityMode & ~SMESH_Actor::eEdges;
-                 else if ( type == "f" && !val )
-                   aEntityMode = aEntityMode & ~SMESH_Actor::eFaces;
-                 else if ( type == "v" && !val )
-                   aEntityMode = aEntityMode & ~SMESH_Actor::eVolumes;
-                 else if ( type == "0d" && !val )
-                   aEntityMode = aEntityMode & ~SMESH_Actor::e0DElements;
-                 else if ( type == "b" && !val )
-                   aEntityMode = aEntityMode & ~SMESH_Actor::eBallElem;
-               }
-             }
-             aSmeshActor->SetEntityMode( aEntityMode );
+              int aEntityMode = SMESH_Actor::eAllEntity;
+              for ( int i = 0; i < mode.count(); i+=2 ) {
+                if ( i < mode.count()-1 ) {
+                  QString type = mode[i];
+                  bool val = mode[i+1].toInt();
+                  if      ( type == "e" && !val )
+                    aEntityMode = aEntityMode & ~SMESH_Actor::eEdges;
+                  else if ( type == "f" && !val )
+                    aEntityMode = aEntityMode & ~SMESH_Actor::eFaces;
+                  else if ( type == "v" && !val )
+                    aEntityMode = aEntityMode & ~SMESH_Actor::eVolumes;
+                  else if ( type == "0d" && !val )
+                    aEntityMode = aEntityMode & ~SMESH_Actor::e0DElements;
+                  else if ( type == "b" && !val )
+                    aEntityMode = aEntityMode & ~SMESH_Actor::eBallElem;
+                }
+              }
+              aSmeshActor->SetEntityMode( aEntityMode );
             }
             // Colors
             else if (paramNameStr == "Colors") {
               QStringList colors = val.split(gDigitsSep, QString::SkipEmptyParts);
-             QColor nodeColor;
-             QColor edgeColor;
-             QColor faceColor;
-             QColor volumeColor;
-             QColor elem0dColor;
-             QColor ballColor;
-             QColor outlineColor;
-             QColor orientationColor;
-             int deltaF;
-             int deltaV;
-             QColor c;
-             double r, g, b;
-             bool bOk;
-             // below lines are required to get default values for delta coefficients
-             // of backface color for faces and color of reversed volumes
-             SMESH::GetColor( "SMESH", "fill_color",   c, deltaF, "0,170,255|-100" );
-             SMESH::GetColor( "SMESH", "volume_color", c, deltaV, "255,0,170|-100" );
-             for ( int i = 0; i < colors.count(); i++ ) {
-               QString type = colors[i];
-               if ( type == "surface" ) {
-                 // face color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 faceColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "backsurface" ) {
-                 // backface color can be defined in several ways
-                 // - in old versions, it is set as rgb triple r:g:b - this was is unsupported now
-                 // - in latest versions, it is set as delta coefficient
-                 bool rgbOk = false, deltaOk;
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 int delta = colors[i+1].toInt( &deltaOk );
-                 i++;                                 // shift index
-                 if ( i+1 < colors.count() )          // index is shifted to 1
-                   g = colors[i+1].toDouble( &rgbOk );
-                 if ( rgbOk ) i++;                    // shift index
-                 if ( rgbOk && i+1 < colors.count() ) // index is shifted to 2
-                   b = colors[i+1].toDouble( &rgbOk );
-                 if ( rgbOk ) i++;
-                 // - as currently there's no way to set directly backsurface color as it was before,
-                 // we ignore old dump where r,g,b triple was set
-                 // - also we check that delta parameter is set properly
-                 if ( !rgbOk && deltaOk )
-                   deltaF = delta;
-               }
-               else if ( type == "volume" ) {
-                 // volume color is set by 4 values r:g:b:delta, where
-                 // - r,g,b - is a normal volume rgb color components
-                 // - delta - is a reversed volume color delta coefficient
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+4 >= colors.count() ) break;                  // format error
-                 int delta = colors[i+4].toInt( &bOk );
+              QColor nodeColor;
+              QColor edgeColor;
+              QColor faceColor;
+              QColor volumeColor;
+              QColor elem0dColor;
+              QColor ballColor;
+              QColor outlineColor;
+              QColor orientationColor;
+              int deltaF;
+              int deltaV;
+              QColor c;
+              double r, g, b;
+              bool bOk;
+              // below lines are required to get default values for delta coefficients
+              // of backface color for faces and color of reversed volumes
+              SMESH::GetColor( "SMESH", "fill_color",   c, deltaF, "0,170,255|-100" );
+              SMESH::GetColor( "SMESH", "volume_color", c, deltaV, "255,0,170|-100" );
+              for ( int i = 0; i < colors.count(); i++ ) {
+                QString type = colors[i];
+                if ( type == "surface" ) {
+                  // face color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  faceColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "backsurface" ) {
+                  // backface color can be defined in several ways
+                  // - in old versions, it is set as rgb triple r:g:b - this was is unsupported now
+                  // - in latest versions, it is set as delta coefficient
+                  bool rgbOk = false, deltaOk;
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  int delta = colors[i+1].toInt( &deltaOk );
+                  i++;                                 // shift index
+                  if ( i+1 < colors.count() )          // index is shifted to 1
+                    g = colors[i+1].toDouble( &rgbOk );
+                  if ( rgbOk ) i++;                    // shift index
+                  if ( rgbOk && i+1 < colors.count() ) // index is shifted to 2
+                    b = colors[i+1].toDouble( &rgbOk );
+                  if ( rgbOk ) i++;
+                  // - as currently there's no way to set directly backsurface color as it was before,
+                  // we ignore old dump where r,g,b triple was set
+                  // - also we check that delta parameter is set properly
+                  if ( !rgbOk && deltaOk )
+                    deltaF = delta;
+                }
+                else if ( type == "volume" ) {
+                  // volume color is set by 4 values r:g:b:delta, where
+                  // - r,g,b - is a normal volume rgb color components
+                  // - delta - is a reversed volume color delta coefficient
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+4 >= colors.count() ) break;                  // format error
+                  int delta = colors[i+4].toInt( &bOk );
                   if ( !bOk ) break;                                   // format error
-                 volumeColor.setRgbF( r, g, b );
-                 deltaV = delta;
-                 i += 4;
-               }
-               else if ( type == "edge" ) {
-                 // edge color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 edgeColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "node" ) {
-                 // node color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 nodeColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "elem0d" ) {
-                 // 0d element color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 elem0dColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "ball" ) {
-                 // ball color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 ballColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "outline" ) {
-                 // outline color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 outlineColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-               else if ( type == "orientation" ) {
-                 // orientation color is set by 3 values r:g:b, where
-                 // - r,g,b - is rgb color components
-                 if ( i+1 >= colors.count() ) break;                  // format error
-                 r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= colors.count() ) break;                  // format error
-                 g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+3 >= colors.count() ) break;                  // format error
-                 b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 orientationColor.setRgbF( r, g, b );
-                 i += 3;
-               }
-             }
-             // node color
-             if ( nodeColor.isValid() )
-               aSmeshActor->SetNodeColor( nodeColor.redF(), nodeColor.greenF(), nodeColor.blueF() );
-             // edge color
-             if ( edgeColor.isValid() )
-               aSmeshActor->SetEdgeColor( edgeColor.redF(), edgeColor.greenF(), edgeColor.blueF() );
-             // face color
-             if ( faceColor.isValid() )
-               aSmeshActor->SetSufaceColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
-             // volume color
-             if ( volumeColor.isValid() )
-               aSmeshActor->SetVolumeColor( volumeColor.redF(), volumeColor.greenF(), volumeColor.blueF(), deltaV );
-             else if ( faceColor.isValid() ) // backward compatibility (no separate color for volumes)
-               aSmeshActor->SetVolumeColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
-             // 0d element color
-             if ( elem0dColor.isValid() )
-               aSmeshActor->Set0DColor( elem0dColor.redF(), elem0dColor.greenF(), elem0dColor.blueF() );
-             // ball color
-             if ( ballColor.isValid() )
-               aSmeshActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
-             // outline color
-             if ( outlineColor.isValid() )
-               aSmeshActor->SetOutlineColor( outlineColor.redF(), outlineColor.greenF(), outlineColor.blueF() );
-             // orientation color
-             if ( orientationColor.isValid() )
-               aSmeshActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
+                  volumeColor.setRgbF( r, g, b );
+                  deltaV = delta;
+                  i += 4;
+                }
+                else if ( type == "edge" ) {
+                  // edge color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  edgeColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "node" ) {
+                  // node color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  nodeColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "elem0d" ) {
+                  // 0d element color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  elem0dColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "ball" ) {
+                  // ball color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  ballColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "outline" ) {
+                  // outline color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  outlineColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+                else if ( type == "orientation" ) {
+                  // orientation color is set by 3 values r:g:b, where
+                  // - r,g,b - is rgb color components
+                  if ( i+1 >= colors.count() ) break;                  // format error
+                  r = colors[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= colors.count() ) break;                  // format error
+                  g = colors[i+2].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+3 >= colors.count() ) break;                  // format error
+                  b = colors[i+3].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  orientationColor.setRgbF( r, g, b );
+                  i += 3;
+                }
+              }
+              // node color
+              if ( nodeColor.isValid() )
+                aSmeshActor->SetNodeColor( nodeColor.redF(), nodeColor.greenF(), nodeColor.blueF() );
+              // edge color
+              if ( edgeColor.isValid() )
+                aSmeshActor->SetEdgeColor( edgeColor.redF(), edgeColor.greenF(), edgeColor.blueF() );
+              // face color
+              if ( faceColor.isValid() )
+                aSmeshActor->SetSufaceColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
+              // volume color
+              if ( volumeColor.isValid() )
+                aSmeshActor->SetVolumeColor( volumeColor.redF(), volumeColor.greenF(), volumeColor.blueF(), deltaV );
+              else if ( faceColor.isValid() ) // backward compatibility (no separate color for volumes)
+                aSmeshActor->SetVolumeColor( faceColor.redF(), faceColor.greenF(), faceColor.blueF(), deltaF );
+              // 0d element color
+              if ( elem0dColor.isValid() )
+                aSmeshActor->Set0DColor( elem0dColor.redF(), elem0dColor.greenF(), elem0dColor.blueF() );
+              // ball color
+              if ( ballColor.isValid() )
+                aSmeshActor->SetBallColor( ballColor.redF(), ballColor.greenF(), ballColor.blueF() );
+              // outline color
+              if ( outlineColor.isValid() )
+                aSmeshActor->SetOutlineColor( outlineColor.redF(), outlineColor.greenF(), outlineColor.blueF() );
+              // orientation color
+              if ( orientationColor.isValid() )
+                aSmeshActor->SetFacesOrientationColor( orientationColor.redF(), orientationColor.greenF(), orientationColor.blueF() );
             }
             // Sizes
             else if (paramNameStr == "Sizes") {
               QStringList sizes = val.split(gDigitsSep, QString::SkipEmptyParts);
-             bool bOk;
-             int lineWidth = -1;
-             int outlineWidth = -1;
-             int elem0dSize = -1;
-             int ballSize = -1;
-             double shrinkSize = -1;
-             double orientationSize = -1;
-             bool orientation3d = false;
-             for ( int i = 0; i < sizes.count(); i++ ) {
-               QString type = sizes[i];
-               if ( type == "line" ) {
-                 // line (wireframe) width is given as single integer value
-                 if ( i+1 >= sizes.count() ) break;                    // format error
-                 int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                 lineWidth = v;
-                 i++;
-               }
-               if ( type == "outline" ) {
-                 // outline width is given as single integer value
-                 if ( i+1 >= sizes.count() ) break;                    // format error
-                 int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                 outlineWidth = v;
-                 i++;
-               }
-               else if ( type == "elem0d" ) {
-                 // 0d element size is given as single integer value
-                 if ( i+1 >= sizes.count() ) break;                    // format error
-                 int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                 elem0dSize = v;
-                 i++;
-               }
-               else if ( type == "ball" ) {
-                 // ball size is given as single integer value
-                 if ( i+1 >= sizes.count() ) break;                    // format error
-                 int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
-                 ballSize = v;
-                 i++;
-               }
-               else if ( type == "shrink" ) {
-                 // shrink factor is given as single floating point value
-                 if ( i+1 >= sizes.count() ) break;                          // format error
-                 double v = sizes[i+1].toDouble( &bOk ); if ( !bOk ) break;  // format error
-                 shrinkSize = v;
-                 i++;
-               }
-               else if ( type == "orientation" ) {
-                 // orientation vectors are specified by two values size:3d, where
-                 // - size - is a floating point value specifying scale factor
-                 // - 3d - is a boolean
-                 if ( i+1 >= sizes.count() ) break;                          // format error
-                 double v1 = sizes[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
-                 if ( i+2 >= sizes.count() ) break;                          // format error
-                 int v2 = sizes[i+2].toInt( &bOk ); if ( !bOk ) break;       // format error
-                 orientationSize = v1;
-                 orientation3d = (bool)v2;
-                 i += 2;
-               }
-             }
-             // line (wireframe) width
-             if ( lineWidth > 0 )
-               aSmeshActor->SetLineWidth( lineWidth );
-             // outline width
-             if ( outlineWidth > 0 )
-               aSmeshActor->SetOutlineWidth( outlineWidth );
-             else if ( lineWidth > 0 ) // backward compatibility (no separate width for outlines)
-               aSmeshActor->SetOutlineWidth( lineWidth );
-             // 0d element size
-             if ( elem0dSize > 0 )
-               aSmeshActor->Set0DSize( elem0dSize );
-             // ball size
-             if ( ballSize > 0 )
-               aSmeshActor->SetBallSize( ballSize );
-             // shrink factor
-             if ( shrinkSize > 0 )
-               aSmeshActor->SetShrinkFactor( shrinkSize );
-             // orientation vectors
-             if ( orientationSize > 0 ) {
-               aSmeshActor->SetFacesOrientationScale( orientationSize );
-               aSmeshActor->SetFacesOrientation3DVectors( orientation3d );
-             }
+              bool bOk;
+              int lineWidth = -1;
+              int outlineWidth = -1;
+              int elem0dSize = -1;
+              int ballSize = -1;
+              double shrinkSize = -1;
+              double orientationSize = -1;
+              bool orientation3d = false;
+              for ( int i = 0; i < sizes.count(); i++ ) {
+                QString type = sizes[i];
+                if ( type == "line" ) {
+                  // line (wireframe) width is given as single integer value
+                  if ( i+1 >= sizes.count() ) break;                    // format error
+                  int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
+                  lineWidth = v;
+                  i++;
+                }
+                if ( type == "outline" ) {
+                  // outline width is given as single integer value
+                  if ( i+1 >= sizes.count() ) break;                    // format error
+                  int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
+                  outlineWidth = v;
+                  i++;
+                }
+                else if ( type == "elem0d" ) {
+                  // 0d element size is given as single integer value
+                  if ( i+1 >= sizes.count() ) break;                    // format error
+                  int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
+                  elem0dSize = v;
+                  i++;
+                }
+                else if ( type == "ball" ) {
+                  // ball size is given as single integer value
+                  if ( i+1 >= sizes.count() ) break;                    // format error
+                  int v = sizes[i+1].toInt( &bOk ); if ( !bOk ) break;  // format error
+                  ballSize = v;
+                  i++;
+                }
+                else if ( type == "shrink" ) {
+                  // shrink factor is given as single floating point value
+                  if ( i+1 >= sizes.count() ) break;                          // format error
+                  double v = sizes[i+1].toDouble( &bOk ); if ( !bOk ) break;  // format error
+                  shrinkSize = v;
+                  i++;
+                }
+                else if ( type == "orientation" ) {
+                  // orientation vectors are specified by two values size:3d, where
+                  // - size - is a floating point value specifying scale factor
+                  // - 3d - is a boolean
+                  if ( i+1 >= sizes.count() ) break;                          // format error
+                  double v1 = sizes[i+1].toDouble( &bOk ); if ( !bOk ) break; // format error
+                  if ( i+2 >= sizes.count() ) break;                          // format error
+                  int v2 = sizes[i+2].toInt( &bOk ); if ( !bOk ) break;       // format error
+                  orientationSize = v1;
+                  orientation3d = (bool)v2;
+                  i += 2;
+                }
+              }
+              // line (wireframe) width
+              if ( lineWidth > 0 )
+                aSmeshActor->SetLineWidth( lineWidth );
+              // outline width
+              if ( outlineWidth > 0 )
+                aSmeshActor->SetOutlineWidth( outlineWidth );
+              else if ( lineWidth > 0 ) // backward compatibility (no separate width for outlines)
+                aSmeshActor->SetOutlineWidth( lineWidth );
+              // 0d element size
+              if ( elem0dSize > 0 )
+                aSmeshActor->Set0DSize( elem0dSize );
+              // ball size
+              if ( ballSize > 0 )
+                aSmeshActor->SetBallSize( ballSize );
+              // shrink factor
+              if ( shrinkSize > 0 )
+                aSmeshActor->SetShrinkFactor( shrinkSize );
+              // orientation vectors
+              if ( orientationSize > 0 ) {
+                aSmeshActor->SetFacesOrientationScale( orientationSize );
+                aSmeshActor->SetFacesOrientation3DVectors( orientation3d );
+              }
             }
             // Point marker
             else if (paramNameStr == "PointMarker") {
diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
new file mode 100644 (file)
index 0000000..68b36fe
--- /dev/null
@@ -0,0 +1,495 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+// File      : SMESHGUI_Add0DElemsOnAllNodesDlg.cxx
+// Created   : Fri Oct 19 15:51:24 2012
+// Author    : Edward AGAPOV (eap)
+
+#include "SMESHGUI_Add0DElemsOnAllNodesDlg.h"
+
+#include "SMESHGUI.h"
+#include "SMESHGUI_FilterDlg.h"
+#include "SMESHGUI_MeshUtils.h"
+#include "SMESHGUI_Utils.h"
+#include "SMESHGUI_VTKUtils.h"
+#include "SMESH_LogicalFilter.hxx"
+#include "SMESH_TypeFilter.hxx"
+
+#include <LightApp_SelectionMgr.h>
+#include <SALOME_ListIO.hxx>
+#include <SUIT_MessageBox.h>
+#include <SVTK_Selector.h>
+#include <SalomeApp_Tools.h>
+
+// Qt includes
+#include <QButtonGroup>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QFrame>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QRadioButton>
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Mesh)
+#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
+
+#define SPACING 6
+#define MARGIN  11
+
+enum { SEL_OBJECT, SEL_ELEMENTS, SEL_NODES };
+
+//================================================================================
+/*!
+ * \brief Dialog Constructor
+ */
+//================================================================================
+
+SMESHGUI_Add0DElemsOnAllNodesDlg::SMESHGUI_Add0DElemsOnAllNodesDlg()
+  : SMESHGUI_Dialog( 0, false, true ),
+    myIDValidator( this )
+{
+  setWindowTitle( tr( "CAPTION" ) );
+
+  // Seletction type radio buttons
+
+  QGroupBox* selTypeGrBox = new QGroupBox( mainFrame() );
+  //
+  QRadioButton*    objBtn = new QRadioButton( tr( "SMESH_SUBMESH_GROUP"),selTypeGrBox );
+  QRadioButton*   elemBtn = new QRadioButton( tr( "SMESH_ELEMENTS" ),selTypeGrBox );
+  QRadioButton*   nodeBtn = new QRadioButton( tr( "SMESH_NODES" ),selTypeGrBox );
+  //
+  QHBoxLayout* selTypeLay = new QHBoxLayout( selTypeGrBox );
+  selTypeLay->setMargin(MARGIN);
+  selTypeLay->setSpacing(SPACING);
+  selTypeLay->addWidget( objBtn  );
+  selTypeLay->addWidget( elemBtn );
+  selTypeLay->addWidget( nodeBtn );
+  objBtn->setChecked(true);
+  //
+  mySelTypeBtnGrp         = new QButtonGroup( mainFrame() );
+  mySelTypeBtnGrp->addButton( objBtn , SEL_OBJECT );
+  mySelTypeBtnGrp->addButton( elemBtn, SEL_ELEMENTS );
+  mySelTypeBtnGrp->addButton( nodeBtn, SEL_NODES );
+
+  // Label, Select Btn, LineEdit, Filter Btn
+
+  setObjectPixmap( "SMESH", tr( "ICON_SELECT" ) );
+  createObject( tr( "SMESH_NAME" ), mainFrame(), 0 );
+
+  myFilterBtn = new QPushButton( tr( "SMESH_BUT_FILTER" ), mainFrame() );
+
+  // List of groups
+
+  myGroupBox = new QGroupBox( tr( "SMESH_ADD_TO_GROUP" ), mainFrame() );
+  myGroupBox->setCheckable( true );
+
+  myGroupLabel = new QLabel( tr( "SMESH_GROUP" ), myGroupBox );
+  myGroupListCmBox = new QComboBox( myGroupBox );
+  myGroupListCmBox->setEditable( true );
+  myGroupListCmBox->setInsertPolicy( QComboBox::NoInsert );
+
+  QHBoxLayout* groupsLayout = new QHBoxLayout( myGroupBox );
+  groupsLayout->setSpacing(SPACING);
+  groupsLayout->setMargin(MARGIN);
+  groupsLayout->addWidget( myGroupLabel );
+  groupsLayout->addWidget( myGroupListCmBox, 1 );
+
+  // Main layout
+
+  QGridLayout* aLay = new QGridLayout( mainFrame() );
+  aLay->setMargin(MARGIN);
+  aLay->setSpacing(SPACING);
+  //
+  aLay->addWidget( selTypeGrBox,          0, 0, 1, 5  );
+  //
+  aLay->addWidget( objectWg( 0, Label  ), 1, 0 );
+  aLay->addWidget( objectWg( 0, Btn    ), 1, 1 );
+  aLay->addWidget( objectWg( 0, Control), 1, 2, 1, 2 );
+  aLay->addWidget( myFilterBtn,           1, 4 );
+  //
+  aLay->addWidget( myGroupBox,            2, 0, 1, 5 );
+
+  // Signals
+
+  connect( myGroupBox,      SIGNAL( toggled( bool )),     SLOT( onGroupChecked() ));
+  connect( mySelTypeBtnGrp, SIGNAL( buttonClicked(int) ), SLOT( onSelTypeChange(int)));
+
+  onSelTypeChange( SEL_OBJECT );
+}
+
+//================================================================================
+/*!
+ * \brief SLOT to enable/disable groups
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesDlg::onGroupChecked( bool on )
+{
+  myGroupLabel->setEnabled( on );
+  myGroupListCmBox->setEnabled( on );
+}
+
+//================================================================================
+/*!
+ * \brief SLOT to enable/disable groups
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesDlg::onSelTypeChange( int selType )
+{
+  setNameIndication( 0, selType == SEL_OBJECT ? OneName : ListOfNames );
+  setReadOnly      ( 0, selType == SEL_OBJECT );
+
+  QLabel* label = qobject_cast< QLabel* >( objectWg(0, Label ));
+  switch( selType ) {
+  case SEL_OBJECT:   label->setText( tr("SMESH_NAME")); break;
+  case SEL_ELEMENTS: label->setText( tr("ELEMENT_IDS")); break;
+  case SEL_NODES:    label->setText( tr("NODE_IDS")); break;
+  default:;
+  }
+  QLineEdit* lineEdit = qobject_cast< QLineEdit* >( objectWg(0, Control ));
+  lineEdit->setText("");
+  lineEdit->setValidator( selType == SEL_OBJECT ? 0 : & myIDValidator );
+
+  myFilterBtn->setEnabled( selType != SEL_OBJECT );
+
+  emit selTypeChanged( selType );
+}
+
+//================================================================================
+/*!
+ * \brief Return type of selected object: [SEL_OBJECT, SEL_ELEMENTS, SEL_NODES]
+ */
+//================================================================================
+
+int SMESHGUI_Add0DElemsOnAllNodesDlg::getSelectionType() const
+{
+  return mySelTypeBtnGrp->checkedId();
+}
+
+//================================================================================
+/*!
+ * \brief Checks consistency of data
+ */
+//================================================================================
+
+bool SMESHGUI_Add0DElemsOnAllNodesDlg::isValid()
+{
+  if( myGroupBox->isChecked() && myGroupListCmBox->currentText().isEmpty() ) {
+    SUIT_MessageBox::warning( this, tr( "SMESH_WRN_WARNING" ), tr( "GROUP_NAME_IS_EMPTY" ) );
+    return false;
+  }
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Operation Constructor
+ */
+//================================================================================
+
+SMESHGUI_Add0DElemsOnAllNodesOp::SMESHGUI_Add0DElemsOnAllNodesOp()
+  :SMESHGUI_SelectionOp(),
+   myDlg( new SMESHGUI_Add0DElemsOnAllNodesDlg ),
+   myFilterDlg( 0 )
+{
+  myHelpFileName = "adding_nodes_and_elements_page.html#adding_0delems_on_all_nodes_anchor";
+
+  connect( myDlg,              SIGNAL( selTypeChanged(int) ), SLOT( onSelTypeChange(int)));
+  connect( myDlg->myFilterBtn, SIGNAL( clicked()),            SLOT( onSetFilter() ));
+}
+
+//================================================================================
+/*!
+ * \brief Destructor
+ */
+//================================================================================
+
+SMESHGUI_Add0DElemsOnAllNodesOp::~SMESHGUI_Add0DElemsOnAllNodesOp()
+{
+  if ( myFilterDlg ) {
+    myFilterDlg->setParent( 0 );
+    delete myFilterDlg;
+    myFilterDlg = 0;
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Start
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesOp::startOperation()
+{
+  SMESHGUI_SelectionOp::startOperation();
+
+  myDlg->myGroupBox->setChecked( false );
+  myDlg->activateObject( 0 );
+  myDlg->show();
+
+  selectionDone();
+}
+
+//================================================================================
+/*!
+ * \brief Treat changed selection
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesOp::selectionDone()
+{
+  if (myFilterDlg && myFilterDlg->isVisible()) return; // filter dgl active
+  if (!myDlg->myGroupBox->isEnabled())         return; // inactive
+
+  myIO.Nullify();
+  myDlg->setObjectText( 0, "");
+
+  SALOME_ListIO aList;
+  selectionMgr()->selectedObjects( aList );
+  if ( aList.Extent() == 1 )
+    myIO = aList.First();
+  else
+    return;
+
+  QString ids;
+  switch ( myDlg->getSelectionType() ) {
+  case SEL_OBJECT:
+    SMESHGUI_SelectionOp::selectionDone();
+    break;
+  case SEL_ELEMENTS:
+    SMESH::GetNameOfSelectedElements( selector(), myIO, ids );
+    myDlg->setObjectText( 0, ids );
+    break;
+  case SEL_NODES:
+    SMESH::GetNameOfSelectedNodes( selector(), myIO, ids );
+    myDlg->setObjectText( 0, ids );
+    break;
+  default:;
+  }
+
+  // fill the list of existing groups
+  myDlg->myGroupListCmBox->clear();
+  myDlg->myGroupListCmBox->addItem( QString() );
+  if ( !myIO.IsNull() && myIO->hasEntry()) {
+    _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+    _PTR(SObject) meshSO = aStudy->FindObjectID( myIO->getEntry() );
+    _PTR(SObject) group0DRoot;
+    if ( meshSO->FindSubObject( SMESH::Tag_0DElementsGroups, group0DRoot ))
+    {
+      _PTR(ChildIterator) group0DIter = aStudy->NewChildIterator( group0DRoot );
+      for ( ; group0DIter->More(); group0DIter->Next() )
+      {
+        _PTR(SObject) groupSO = group0DIter->Value();
+        std::string groupName = groupSO->GetName();
+        if ( !groupName.empty() )
+          myDlg->myGroupListCmBox->addItem( groupName.c_str() );
+      }
+    }
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Return a filter of objects
+ */
+//================================================================================
+
+SUIT_SelectionFilter* SMESHGUI_Add0DElemsOnAllNodesOp::createFilter( const int ) const
+{
+  if ( myDlg->getSelectionType() == SEL_OBJECT )
+  {
+    // Create a filter of objects: any IDSource except the group of 0D elements
+
+    QList<SUIT_SelectionFilter*> filters;
+    filters.push_back( new SMESH_TypeFilter( SMESH::GROUP_0D ));
+    SMESH_LogicalFilter* not0DGroup = new SMESH_LogicalFilter( filters,
+                                                               SMESH_LogicalFilter::LO_NOT,
+                                                               /*takeOwnership=*/true);
+    filters[0] = not0DGroup;
+    filters.push_back( new SMESH_TypeFilter( SMESH::IDSOURCE ));
+    return new SMESH_LogicalFilter( filters,
+                                    SMESH_LogicalFilter::LO_AND,
+                                    /*takeOwnership=*/true);
+  }
+  return 0;
+}
+
+//================================================================================
+/*!
+ * \brief Makes its main job
+ */
+//================================================================================
+
+bool SMESHGUI_Add0DElemsOnAllNodesOp::onApply()
+{
+  if ( !myDlg->isValid() )
+    return false;
+
+  // get a mesh
+  SMESH::SMESH_IDSource_var meshObject;
+  SMESH::SMESH_Mesh_var     mesh;
+  if ( !myIO.IsNull() )
+  {
+    CORBA::Object_var obj = SMESH::IObjectToObject( myIO );
+    meshObject = SMESH::SMESH_IDSource::_narrow( obj );
+    if ( !meshObject->_is_nil() )
+      mesh = meshObject->GetMesh();
+  }
+  if ( mesh->_is_nil() )
+  {
+    SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_BAD_SELECTION" ) );
+    return false;
+  }
+
+  try {
+    SMESH::SMESH_MeshEditor_var editor = mesh->GetMeshEditor();
+
+    // make SMESH_IDSource holding IDs of selected elements
+    if ( myDlg->getSelectionType() != SEL_OBJECT )
+    {
+      QString elemIDs = myDlg->objectText( 0 );
+      QStringList idList = elemIDs.split( " ", QString::SkipEmptyParts );
+      if ( idList.count() == 0 )
+      {
+        SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_BAD_SELECTION" ) );
+        return false;
+      }
+      SMESH::long_array_var idArray = new SMESH::long_array;
+      idArray->length( idList.count() );
+      QStringList::iterator idIt = idList.begin();
+      for ( int i = 0; idIt != idList.end(); ++idIt, ++i )
+        idArray[i] = idIt->toLong();
+      SMESH::ElementType elemType =
+        myDlg->getSelectionType() == SEL_NODES ? SMESH::NODE : SMESH::ALL;
+      meshObject = editor->MakeIDSource( idArray, elemType );
+    }
+
+    // Create 0D elements
+
+    int prevNb0D = mesh->Nb0DElements();
+
+    QString groupName = myDlg->myGroupListCmBox->currentText();
+    SMESH::SMESH_IDSource_var newObj =
+      editor->Create0DElementsOnAllNodes( meshObject, groupName.toLatin1().data() );
+
+    int newNb0D = mesh->Nb0DElements() - prevNb0D;
+    SUIT_MessageBox::information( myDlg, tr( "SMESH_INFORMATION" ),
+                                  tr( "NB_NEW_0D" ).arg( newNb0D ),
+                                  SUIT_MessageBox::Ok, SUIT_MessageBox::Ok);
+  }
+  catch ( const SALOME::SALOME_Exception& S_ex ) {
+    SalomeApp_Tools::QtCatchCorbaException( S_ex );
+    return false;
+  }
+  catch (...) {
+    return false;
+  }
+
+  // clear selection
+
+  if ( myDlg->getSelectionType() == SEL_OBJECT )
+  {
+    SALOME_ListIO aList;
+    selectionMgr()->setSelectedObjects( aList, /*append=*/false );
+  }
+  else
+  {
+    selector()->ClearIndex();
+  }
+  selectionDone();
+
+  SMESH::UpdateView();
+  SMESHGUI::Modified();
+
+  if ( myDlg->myGroupBox->isChecked() )
+    SMESHGUI::GetSMESHGUI()->updateObjBrowser();
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Sets selection mode
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesOp::onSelTypeChange(int selType)
+{
+  switch ( selType ) {
+  case SEL_OBJECT:   setSelectionMode( ActorSelection ); break;
+  case SEL_ELEMENTS: setSelectionMode( CellSelection );  break;
+  case SEL_NODES:    setSelectionMode( NodeSelection );  break;
+  }
+
+  if ( selType != SEL_OBJECT )
+    connect( myDlg, SIGNAL( objectChanged( int, const QStringList& )),
+             this,  SLOT  ( onTextChanged( int, const QStringList& )));
+  else
+    disconnect( myDlg, SIGNAL( objectChanged( int, const QStringList& )),
+                this,  SLOT  ( onTextChanged( int, const QStringList& )));
+
+  selectionDone();
+}
+
+//================================================================================
+/*!
+ * \brief Install 
+ * 
+ * 
+ */
+//================================================================================
+
+void SMESHGUI_Add0DElemsOnAllNodesOp::onSetFilter()
+{
+  SMESH::SMESH_Mesh_var mesh = SMESH::GetMeshByIO( myIO );
+  if ( mesh->_is_nil()) {
+    SUIT_MessageBox::critical( myDlg, tr("SMESH_ERROR"), tr("NO_MESH_SELECTED"));
+    return;
+  }
+  QList<int> types;
+  if ( myDlg->getSelectionType() == SEL_NODES ) {
+    types.push_back( SMESH::NODE );
+  }
+  else if ( myDlg->getSelectionType() == SEL_ELEMENTS ) {
+    types.push_back( SMESH::EDGE );
+    types.push_back( SMESH::FACE );
+    types.push_back( SMESH::VOLUME );
+  }
+  else
+    return;
+  if ( !myFilterDlg )
+    myFilterDlg = new SMESHGUI_FilterDlg( getSMESHGUI(), SMESH::ALL );
+
+  myFilterDlg->Init( types );
+  myFilterDlg->SetSelection();
+  myFilterDlg->SetMesh( mesh );
+  myFilterDlg->SetSourceWg( myDlg->objectWg( 0, LightApp_Dialog::Control ));
+
+  myFilterDlg->show();
+}
diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.h
new file mode 100644 (file)
index 0000000..c5a6b3f
--- /dev/null
@@ -0,0 +1,110 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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
+//
+
+// SMESH SMESHGUI : GUI for SMESH component
+
+#ifndef SMESHGUI_ADD0DELEMSONALLNODESDLG_H
+#define SMESHGUI_ADD0DELEMSONALLNODESDLG_H
+
+#include "SMESH_SMESHGUI.hxx"
+
+#include "SMESHGUI_SelectionOp.h"
+#include "SMESHGUI_Dialog.h"
+#include "SMESHGUI_IdValidator.h"
+
+class SMESHGUI_FilterDlg;
+class SMESHGUI_Add0DElemsOnAllNodesOp;
+class QButtonGroup;
+class QPushButton;
+class QGroupBox;
+class QLabel;
+class QComboBox;
+
+//---------------------------------------------------------------------------------
+/*!
+ * \brief Dialog creating 0D elements on all nodes of given elements
+ */
+class SMESHGUI_EXPORT SMESHGUI_Add0DElemsOnAllNodesDlg : public SMESHGUI_Dialog
+{ 
+  Q_OBJECT
+
+ public:
+  SMESHGUI_Add0DElemsOnAllNodesDlg();
+
+  int                            getSelectionType() const;
+  bool                           isValid();
+
+signals:
+
+  void                           selTypeChanged( int selType );
+
+
+ private slots:
+
+  void                           onGroupChecked ( bool on );
+  void                           onSelTypeChange( int selType );
+
+ private:
+
+  friend class SMESHGUI_Add0DElemsOnAllNodesOp;
+
+  QButtonGroup* mySelTypeBtnGrp;
+  QPushButton*  myFilterBtn;
+  QGroupBox*    myGroupBox;
+  QLabel*       myGroupLabel;
+  QComboBox*    myGroupListCmBox;
+
+  SMESHGUI_IdValidator myIDValidator;
+};
+
+//---------------------------------------------------------------------------------
+/*!
+ * \brief Operation creating 0D elements on all nodes of given elements
+ */
+class SMESHGUI_EXPORT SMESHGUI_Add0DElemsOnAllNodesOp : public SMESHGUI_SelectionOp
+{
+  Q_OBJECT
+
+ public:
+  SMESHGUI_Add0DElemsOnAllNodesOp();
+  ~SMESHGUI_Add0DElemsOnAllNodesOp();
+
+  virtual LightApp_Dialog*       dlg() const { return myDlg; }
+  
+ protected:
+  virtual void                   startOperation();
+  virtual void                   selectionDone();
+  virtual SUIT_SelectionFilter*  createFilter( const int ) const;
+
+ protected slots:
+  virtual bool                   onApply();
+  void                           onSelTypeChange(int);
+  void                           onSetFilter();
+
+ private:
+  SMESHGUI_Add0DElemsOnAllNodesDlg* myDlg;
+  SMESHGUI_FilterDlg*               myFilterDlg;
+  Handle(SALOME_InteractiveObject)  myIO;
+  //SUIT_SelectionFilter*             myObjectFilter;
+};
+
+#endif
index 82638364b32f185cf30d3770196a50d707bb9b7e..993f69f283d905621447ba1439af1bf0bf128f31 100644 (file)
@@ -742,14 +742,8 @@ void SMESHGUI_ClippingDlg::updateActorItem( QListWidgetItem* theItem,
         if( anItem->checkState() == Qt::Checked )
           aNbChecked++;
 
-    Qt::CheckState aCheckState = Qt::Unchecked;
-    if( aNbChecked == aNbItems )
-      aCheckState = Qt::Checked;
-    else if( aNbChecked > 0 )
-      aCheckState = Qt::PartiallyChecked;
-
     bool anIsBlocked = SelectAllCheckBox->blockSignals( true );
-    SelectAllCheckBox->setCheckState( aCheckState );
+    SelectAllCheckBox->setCheckState( aNbChecked == aNbItems ? Qt::Checked : Qt::Unchecked);
     SelectAllCheckBox->blockSignals( anIsBlocked );
   }
 
index fc44b4f71b69445734049456513ef7477ce68500..7b2c6e27a9a724b69d67c25db0c747b4d5abe498 100644 (file)
@@ -210,7 +210,7 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
 
   QList<SMESH::SMESH_GroupBase_var>::iterator anIter;
   for (anIter = myListGrp.begin(); anIter != myListGrp.end(); ++anIter) {
-    SMESH::SMESH_Mesh_ptr aMesh = (*anIter)->GetMesh();
+    SMESH::SMESH_Mesh_var aMesh = (*anIter)->GetMesh();
     if (!aMesh->_is_nil())
       aMesh->RemoveGroupWithContents(*anIter);
   }
@@ -218,6 +218,12 @@ bool SMESHGUI_DeleteGroupDlg::onApply()
   myListBox->clear();
   myListGrp.clear();
   mySelectionMgr->clearSelected();
+
+  /** Erase graphical objects **/
+  SALOME_ListIteratorOfListIO anIterIO (myListGrpIO);
+  for ( ; anIterIO.More(); anIterIO.Next())
+    SMESH::RemoveVisualObjectWithActors( anIterIO.Value()->getEntry(), /*fromAllViews=*/true );
+
   SMESH::UpdateView();
   SMESHGUI::Modified();
   mySMESHGUI->updateObjBrowser(true);
@@ -285,6 +291,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
     return;
 
   myListGrp.clear();
+  myListGrpIO.Clear();
   QStringList aNames;
 
   SALOME_ListIO aListIO;
@@ -296,6 +303,7 @@ void SMESHGUI_DeleteGroupDlg::onSelectionDone()
     if (!aGroup->_is_nil()) {
       aNames.append(aGroup->GetName());
       myListGrp.append(aGroup);
+      myListGrpIO.Append( anIter.Value() );
     }
   }
 
index 48e418417f3e83ea296b04a9ff17a393db3d5ddb..76f6bd5b012bb57a2d7a26ecc466c9cee02bdc29 100644 (file)
@@ -29,6 +29,8 @@
 // SMESH includes
 #include "SMESH_SMESHGUI.hxx"
 
+#include <SALOME_ListIO.hxx>
+
 // Qt includes
 #include <QDialog>
 
@@ -86,6 +88,7 @@ private:
   SMESHGUI*               mySMESHGUI;
   LightApp_SelectionMgr*  mySelectionMgr;
 
+  SALOME_ListIO           myListGrpIO;
   QList<SMESH::SMESH_GroupBase_var> myListGrp;
   bool                    myBlockSelection;
 
index 54c18157e8d3d2d1a33d3ca9629c2aa7502eed55..d23c6dc33b273705088091ad374b5ac5fbc17601 100644 (file)
@@ -91,6 +91,7 @@
 SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
   : SMESHGUI_PreviewDlg( theModule ),
     mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
+    myEditCurrentArgument(0),
     myFilterDlg( 0 ),
     mySelectedObject(SMESH::SMESH_IDSource::_nil())
 {
index 34947420da9c4169666e2be48e8295c4cdeef8d3..108f7bed5e24780e97ff32670d68faba6248ebfb 100755 (executable)
@@ -1002,6 +1002,17 @@ void SMESHGUI_FilterTable::Init (const QList<int>& theTypes)
 
     myLibDlg = 0;
   }
+  else
+  {
+    QList<int>::const_iterator typeIt = theTypes.begin();
+    for ( ; typeIt != theTypes.end(); ++typeIt ) {
+      if ( !myTables[ *typeIt ] ) {
+        Table* aTable = createTable(mySwitchTableGrp, *typeIt);
+        myTables[ *typeIt ] = aTable;
+        ((QVBoxLayout*)mySwitchTableGrp->layout())->addWidget(myTables[ *typeIt ]);
+      }
+    }
+  }
 
   // Hide buttons of entity types if necessary
   const QMap<int, QString>& aSupportedTypes = getSupportedTypes();
index c42a940d42b86f20858508d74fe75298c74592c3..7b10c0ff54d7e2c27b6e53bca2f5bee714af5820 100644 (file)
@@ -572,6 +572,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const
     aHelpFileName = "a2d_meshing_hypo_page.html#hypo_quad_params_anchor";
   else if ( aHypType == "ViscousLayers")
     aHelpFileName = "additional_hypo_page.html#viscous_layers_anchor";
+  else if ( aHypType == "ViscousLayers2D")
+    aHelpFileName = "additional_hypo_page.html#viscous_layers_anchor";
   else if ( aHypType == "ImportSource1D" || aHypType == "ImportSource2D")
     aHelpFileName = "import_algos_page.html";
   return aHelpFileName;
index fde2ae60951f9965bf5af25aecd8ef3f8698d3a5..2c5d1828c0d7b0081216aa87557eab4dcc60d56c 100644 (file)
@@ -74,7 +74,7 @@
 #endif
 
 #ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
 #else
 static int MYDEBUG = 0;
 #endif
@@ -420,13 +420,13 @@ namespace SMESH
         LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() );
         if (!libHandle) {
           // report any error, if occured
-          if ( MYDEBUG ) {
+          {
 #ifdef WIN32
             const char* anError = "Can't load client meshers plugin library";
 #else
             const char* anError = dlerror();      
 #endif
-            MESSAGE(anError);
+            INFOS(anError); // always display this kind of error !
           }
         }
         else {
index 819684343c6e3f006cb3b400e1f58d67a701d4cb..3b90ce6d6f63c2368028d79a10d06011fbed40bf 100644 (file)
@@ -1105,6 +1105,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
           afunctor->SetMesh( actor()->GetObject()->GetMesh() );
           myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_3D" ) ).arg( afunctor->GetValue( id ) ) );
         }
+       /*
         if( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           // separator
           myInfo->append( "" );
@@ -1121,6 +1122,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
             myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( tr( "Position" ) ).arg( shapeType ).arg( shapeID ) );
           }
         }
+       */
       }
       // separator
       if ( ids.count() > 1 ) {
@@ -1539,6 +1541,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
           diam3Item->setText( 0, tr( "MAX_ELEMENT_LENGTH_3D" ) );
           diam3Item->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );     
         }
+       /*
         if( e->GetType() >= SMDSAbs_Edge && e->GetType() <= SMDSAbs_Volume ) {
           //shapeID
           int shapeID = e->getshapeId();
@@ -1555,6 +1558,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
             shItem->setText( 1, QString( "%1 #%2" ).arg(shapeType).arg( shapeID ) );
           }
         }
+       */
       }
     }
   }
index 7a494110a0c4c88ff3e94aabdcd0dfe28b92ad0b..df085305b151244508c4ce609f8ccf6ef970fe9c 100644 (file)
@@ -1965,10 +1965,9 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
 
 //================================================================================
 /*!
- * \brief Reads parameters of edited mesh and assigns them to the dialog
+ * \brief Reads parameters of an edited mesh and assigns them to the dialog
  *
- * Reads parameters of edited mesh and assigns them to the dialog (called when
- * mesh is edited only)
+ * Called when mesh is edited only.
  */
 //================================================================================
 void SMESHGUI_MeshOp::readMesh()
@@ -2005,8 +2004,8 @@ void SMESHGUI_MeshOp::readMesh()
 
   // Get hypotheses and algorithms assigned to the mesh/sub-mesh
   QStringList anExisting;
-  const int aDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D;
-  for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ )
+  const int lastDim = ( myIsOnGeometry ) ? SMESH::DIM_0D : SMESH::DIM_3D;
+  for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim )
   {
     // get algorithm
     existingHyps( dim, Algo, pObj, anExisting, myObjHyps[ dim ][ Algo ] );
@@ -2030,7 +2029,7 @@ void SMESHGUI_MeshOp::readMesh()
 
   // get hypotheses
   bool hypWithoutAlgo = false;
-  for ( int dim = aDim; dim <= SMESH::DIM_3D; dim++ )
+  for ( int dim = SMESH::DIM_3D; dim >= lastDim; --dim )
   {
     for ( int hypType = MainHyp; hypType <= AddHyp; hypType++ )
     {
index b6aa6c3e2e34abc60f335fc596e7435a52e36bc6..b87346e6313b43ff68d03ad5c241183776a06c21 100755 (executable)
@@ -225,7 +225,7 @@ QWidget* SMESHGUI_MultiEditDlg::createMainFrame (QWidget* theParent, const bool
   myComboBoxFunctor->addItem(tr("ASPECTRATIO_ELEMENTS"));
   myComboBoxFunctor->addItem(tr("MINIMUMANGLE_ELEMENTS"));
   myComboBoxFunctor->addItem(tr("SKEW_ELEMENTS"));
-  myComboBoxFunctor->addItem(tr("AREA_ELEMENTS"));
+  //myComboBoxFunctor->addItem(tr("AREA_ELEMENTS"));
   //myComboBoxFunctor->addItem(tr("LENGTH2D_EDGES")); // for existing elements only
   //myComboBoxFunctor->addItem(tr("MULTI2D_BORDERS")); // for existing elements only
   myComboBoxFunctor->setCurrentIndex(0);
@@ -362,6 +362,8 @@ SMESH::NumericalFunctor_ptr SMESHGUI_MultiEditDlg::getNumericalFunctor()
     aNF = aFilterMgr->CreateLength2D();
   else if (myComboBoxFunctor->currentText() == tr("MULTI2D_BORDERS"))
     aNF = aFilterMgr->CreateMultiConnection2D();
+  else if (myComboBoxFunctor->currentText() == tr("MIN_DIAG_ELEMENTS"))
+    aNF = aFilterMgr->CreateMaxElementLength2D();
   else;
 
   return aNF._retn();
@@ -1153,7 +1155,8 @@ SMESHGUI_UnionOfTrianglesDlg
 {
   setWindowTitle(tr("CAPTION"));
 
-  myComboBoxFunctor->setEnabled(true);
+  myComboBoxFunctor->setEnabled(true);  
+  myComboBoxFunctor->addItem(tr("AREA_ELEMENTS"));
   myComboBoxFunctor->addItem(tr("WARP_ELEMENTS")); // for quadrangles only
   myComboBoxFunctor->addItem(tr("TAPER_ELEMENTS")); // for quadrangles only
 
@@ -1240,6 +1243,8 @@ SMESHGUI_CuttingOfQuadsDlg
 
   myCriterionGrp->show();
   myChoiceWidget->show();
+  myComboBoxFunctor->insertItem(0, tr("MIN_DIAG_ELEMENTS"));
+  myComboBoxFunctor->setCurrentIndex(0);
   myComboBoxFunctor->setEnabled(false);
 
   connect(myPreviewChk,      SIGNAL(stateChanged(int)),    this, SLOT(onPreviewChk()));
index 7e4039a3aa647b3e142ffb9dd7b45e18529e20e9..2e4c7b9c5ecc67c0709784e8a6761ffb0afb39bb 100644 (file)
@@ -491,9 +491,16 @@ void SMESHGUI_SelectionOp::onTextChanged( int, const QStringList& list )
     IdList ids; extractIds( list, ids, '\0' );
     IdList::const_iterator anIt = ids.begin(),
                            aLast = ids.end();
-    for( ; anIt!=aLast; anIt++ )
-      if( const SMDS_MeshNode * n = aMesh->FindNode( *anIt ) )
-        newIndices.Add( n->GetID() );
+    if ( selectionMode() == NodeSelection )
+      for( ; anIt!=aLast; anIt++ ) {
+        if( const SMDS_MeshNode * n = aMesh->FindNode( *anIt ) )
+          newIndices.Add( n->GetID() );
+      }
+    else 
+      for( ; anIt!=aLast; anIt++ ) {
+        if( const SMDS_MeshElement* e = aMesh->FindElement( *anIt ) )
+          newIndices.Add( e->GetID() );
+      }
 
     selector()->AddOrRemoveIndex( sel.First(), newIndices, false );
     highlight( sel.First(), true, true );
index 6012d758cd3ca8a0977f07111a95e13b2cc67f89..42874a52e68bed9b12a295002a6ca030e1c7c3a6 100644 (file)
         </message>
         <message>
             <source>ICON_DLG_ELEM0D</source>
-            <translation>mesh_vertex.png</translation>
+            <translation>mesh_0D_elem.png</translation>
+        </message>
+        <message>
+            <source>ICON_0D_ON_ALL_NODES</source>
+            <translation>mesh_0D_on_all_nodes.png</translation>
         </message>
         <message>
             <source>ICON_DLG_EDGE</source>
index c10fa0cf26cef5b2e8770a41fb40556df06a0be4..5d43fc78ac5bb2b5ccad02a69e2e5f80c4afab0f 100644 (file)
         <source>AREA_ELEMENTS</source>
         <translation>Area</translation>
     </message>
+    <message>
+        <source>MIN_DIAG_ELEMENTS</source>
+        <translation>Minimum diagonal</translation>
+    </message>
     <message>
         <source>ASPECTRATIO_3D_ELEMENTS</source>
         <translation>Aspect Ratio 3D</translation>
         <source>ELEMENT_ID</source>
         <translation>Element ID</translation>
     </message>
+    <message>
+        <source>ELEMENT_IDS</source>
+        <translation>Element IDs</translation>
+    </message>
     <message>
         <source>FREE_BORDERS</source>
         <translation>Free Borders</translation>
         <source>MEN_ELEMS0D</source>
         <translation>0D Elements</translation>
     </message>
+    <message>
+        <source>MEN_0D_ON_ALL_NODES</source>
+        <translation>0D Elements on Element Nodes</translation>
+    </message>
     <message>
         <source>MEN_BALL</source>
         <translation>Ball</translation>
@@ -1075,6 +1087,10 @@ Do you want to convert it to the standalone group?</translation>
         <source>NODE_ID</source>
         <translation>Node ID</translation>
     </message>
+    <message>
+        <source>NODE_IDS</source>
+        <translation>Node IDs</translation>
+    </message>
     <message>
         <source>NON_SMESH_OBJECTS_SELECTED</source>
         <translation>There are objects selected which do not belong to %1 component.</translation>
@@ -1257,6 +1273,10 @@ Please enter correct values and try again</translation>
         <source>SMESH_AUTO_GROUPS</source>
         <translation>Automatically create groups</translation>
     </message>
+    <message>
+        <source>SMESH_REQUIRED_GROUPS</source>
+        <translation>Create groups of required entities</translation>
+    </message>
     <message>
         <source>SMESH_AVAILABLE</source>
         <translation>Available</translation>
@@ -2435,7 +2455,11 @@ Check algorithm documentation for supported geometry</translation>
     </message>
     <message>
         <source>SMESH_SELECT_WHOLE_MESH</source>
-        <translation>Select whole mesh, submesh or group</translation>
+        <translation>Select whole mesh, sub-mesh or group</translation>
+    </message>
+    <message>
+        <source>SMESH_SUBMESH_GROUP</source>
+        <translation>Mesh, sub-mesh, group</translation>
     </message>
     <message>
         <source>SMESH_SET_COLOR</source>
@@ -2829,6 +2853,10 @@ Please check preferences of Mesh module.
         <source>STB_ELEM0D</source>
         <translation>0D Element</translation>
     </message>
+    <message>
+        <source>STB_0D_ON_ALL_NODES</source>
+        <translation>Make 0D Elements on Element Nodes</translation>
+    </message>
     <message>
         <source>STB_ELEMS0D</source>
         <translation>0D Elements</translation>
@@ -3437,6 +3465,10 @@ Please check preferences of Mesh module.
         <source>TOP_DISP_ENT</source>
         <translation>Display entity</translation>
     </message>
+    <message>
+        <source>TOP_0D_ON_ALL_NODES</source>
+        <translation>Make 0D Elements on Element Nodes</translation>
+    </message>
     <message>
         <source>TOP_ELEM0D</source>
         <translation>0D Element</translation>
@@ -4014,10 +4046,18 @@ It can&apos;t be deleted </translation>
     </message>
 </context>
 <context>
-    <name>SMESHGUI_GroupDlg</name>
+    <name>SMESHGUI_Dialog</name>
     <message>
-        <source>ALLOW_ELEM_LIST_MODIF</source>
-        <translation>Enable manual edition</translation>
+        <source>DLG_MESH</source>
+        <translation>meshes</translation>
+    </message>
+    <message>
+        <source>DLG_HYPO</source>
+        <translation>hypotheses</translation>
+    </message>
+    <message>
+        <source>DLG_ALGO</source>
+        <translation>algorithms</translation>
     </message>
 </context>
 <context>
@@ -4328,6 +4368,35 @@ Please, create VTK viewer and try again</translation>
         <translation>Sub-shapes preview chunk size</translation>
     </message>
 </context>
+<context>
+    <name>SMESHGUI_GroupDlg</name>
+    <message>
+        <source>ALLOW_ELEM_LIST_MODIF</source>
+        <translation>Enable manual edition</translation>
+    </message>
+</context>
+<context>
+    <name>SMESHGUI_Add0DElemsOnAllNodesDlg</name>
+    <message>
+        <source>CAPTION</source>
+        <translation>Make 0D Elements on Element Nodes</translation>
+    </message>
+    <message>
+        <source>OBJ_BTN</source>
+        <translation>Mesh, sub-mesh, group</translation>
+    </message>
+    <message>
+        <source>NB_NEW_0D</source>
+        <translation>%1 0D elements created</translation>
+    </message>
+</context>
+<context>
+    <name>SMESHGUI_Add0DElemsOnAllNodesOp</name>
+    <message>
+        <source>NB_NEW_0D</source>
+        <translation>%1 0D elements created</translation>
+    </message>
+</context>
 <context>
     <name>SMESHGUI_AddQuadraticElementDlg</name>
     <message>
index 80943a980872b51e79b8943365a3d488ffb70bc0..fad91d48043bbf411dfc679f75fae1a291f1d04e 100755 (executable)
@@ -3993,6 +3993,21 @@ avec le paramètre &apos;%1&apos; des préférences du module Mesh.</translation
 Il ne peut pas être supprimé.</translation>
     </message>
 </context>
+<context>
+    <name>SMESHGUI_Dialog</name>
+    <message>
+        <source>DLG_MESH</source>
+        <translation>maillages</translation>
+    </message>
+    <message>
+        <source>DLG_HYPO</source>
+        <translation>hypothèses</translation>
+    </message>
+    <message>
+        <source>DLG_ALGO</source>
+        <translation>algorithmes</translation>
+    </message>
+</context>
 <context>
     <name>SMESHGUI_GroupDlg</name>
     <message>
index fe4fc0c152f59d4fd7a8c34bd063c0ee506a1eaa..4dc84a2a15083b369efa9098fc46631bdc267555 100644 (file)
@@ -124,6 +124,31 @@ namespace {
     }
   };
 
+  //================================================================================
+  /*!
+   * \brief Map of TCollection_AsciiString initialized by C array of C strings.
+   *        Odd items of the C array are map keys, and even items are values
+   */
+  //================================================================================
+
+  struct TStringMap: public map<TCollection_AsciiString,TCollection_AsciiString>
+  {
+    /*!
+     * \brief Filling. The last string must be ""
+     */
+    void Insert(const char* names_values[]) {
+      for ( int i = 0; names_values[i][0] ; i += 2 )
+        insert( make_pair( (char*) names_values[i], names_values[i+1] ));
+    }
+    /*!
+     * \brief Check if a string is in
+     */
+    TCollection_AsciiString Value(const TCollection_AsciiString& name ) {
+      map< _AString, _AString >::iterator it = find( name );
+      return it == end() ? "" : it->second;
+    }
+  };
+
   //================================================================================
   /*!
    * \brief Returns a mesh by object
@@ -533,10 +558,14 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       groups = aCommand->GetResultValue(2);
     else if ( method == "MakeBoundaryElements")
       groups = aCommand->GetResultValue(3);
+    else if ( method == "Create0DElementsOnAllNodes" &&
+              aCommand->GetArg(2).Length() > 2 ) // group name != ''
+      groups = aCommand->GetResultValue();
 
     id_editor->second->Process( aCommand );
     id_editor->second->AddProcessedCmd( aCommand );
 
+    // create meshes
     if ( !meshID.IsEmpty() &&
          !myMeshes.count( meshID ) &&
          aCommand->IsStudyEntry( meshID ))
@@ -547,6 +576,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       aCommand->Clear();
       aCommand->GetString() = processedCommand; // discard changes made by _pyMesh
     }
+    // create groups
     if ( !groups.IsEmpty() )
     {
       if ( !aCommand->IsStudyEntry( meshID ))
@@ -730,7 +760,9 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
     myMeshes.insert( make_pair( mesh->GetID(), mesh ));
     return;
   }
-  if( method == "CreateMeshesFromMED" || method == "CreateMeshesFromSAUV")
+  if( method == "CreateMeshesFromMED" ||
+      method == "CreateMeshesFromSAUV"||
+      method == "CreateMeshesFromGMF" )
   {
     for(int ind = 0;ind<theCommand->GetNbResultValues();ind++)
     {
@@ -786,7 +818,7 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand )
     }
   }
 
-  // objects erasing creation command if no more it's commands invoked:
+  // objects erasing creation command if no more its commands invoked:
   // SMESH_Pattern, FilterManager
   if ( method == "GetPattern" ||
        method == "CreateFilterManager" ||
@@ -1503,6 +1535,33 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
     myGroups.push_back( group );
     theGen->AddObject( group );
   }
+  // update list of groups
+  else if ( method == "GetGroups" )
+  {
+    TCollection_AsciiString grIDs = theCommand->GetResultValue();
+    list< _pyID > idList = theCommand->GetStudyEntries( grIDs );
+    list< _pyID >::iterator grID = idList.begin();
+    for ( ; grID != idList.end(); ++grID )
+    {
+      Handle(_pyObject) obj = theGen->FindObject( *grID );
+      if ( obj.IsNull() )
+      {
+        Handle(_pyGroup) group = new _pyGroup( theCommand, *grID );
+        theGen->AddObject( group );
+        myGroups.push_back( group );
+      }
+    }
+  }
+  // notify a group about full removal
+  else if ( method == "RemoveGroupWithContents" )
+  {
+    if ( !theGen->IsToKeepAllCommands() ) { // snapshot mode
+      const _pyID groupID = theCommand->GetArg( 1 );
+      Handle(_pyGroup) grp = Handle(_pyGroup)::DownCast( theGen->FindObject( groupID ));
+      if ( !grp.IsNull() )
+        grp->RemovedWithContents();
+    }
+  }
   // ----------------------------------------------------------------------
   else if ( theCommand->MethodStartsFrom( "Export" ))
   {
@@ -1604,23 +1663,6 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
         subMesh->Process( theCommand ); // it moves GetSubMesh() before theCommand
     }
   }
-  // update list of groups
-  else if ( method == "GetGroups" )
-  {
-    TCollection_AsciiString grIDs = theCommand->GetResultValue();
-    list< _pyID > idList = theCommand->GetStudyEntries( grIDs );
-    list< _pyID >::iterator grID = idList.begin();
-    for ( ; grID != idList.end(); ++grID )
-    {
-      Handle(_pyObject) obj = theGen->FindObject( *grID );
-      if ( obj.IsNull() )
-      {
-        Handle(_pyGroup) group = new _pyGroup( theCommand, *grID );
-        theGen->AddObject( group );
-        myGroups.push_back( group );
-      }
-    }
-  }
   // add accessor method if necessary
   else
   {
@@ -1929,14 +1971,15 @@ _pyMeshEditor::_pyMeshEditor(const Handle(_pyCommand)& theCreationCmd):
 
 void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
 {
-  // names of SMESH_MeshEditor methods fully equal to methods of python class Mesh, so
-  // commands calling this methods are converted to calls of methods of Mesh
+  // names of SMESH_MeshEditor methods fully equal to methods of the python class Mesh, so
+  // commands calling this methods are converted to calls of Mesh methods
   static TStringSet sameMethods;
   if ( sameMethods.empty() ) {
     const char * names[] = {
       "RemoveElements","RemoveNodes","RemoveOrphanNodes","AddNode","Add0DElement","AddEdge","AddFace","AddPolygonalFace","AddBall",
       "AddVolume","AddPolyhedralVolume","AddPolyhedralVolumeByFaces","MoveNode", "MoveClosestNodeToPoint",
-      "InverseDiag","DeleteDiag","Reorient","ReorientObject","TriToQuad","SplitQuad","SplitQuadObject",
+      "InverseDiag","DeleteDiag","Reorient","ReorientObject",
+      "TriToQuad","TriToQuadObject", "SplitQuad","SplitQuadObject",
       "BestSplit","Smooth","SmoothObject","SmoothParametric","SmoothParametricObject",
       "ConvertToQuadratic","ConvertFromQuadratic","RenumberNodes","RenumberElements",
       "RotationSweep","RotationSweepObject","RotationSweepObject1D","RotationSweepObject2D",
@@ -1955,7 +1998,21 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     sameMethods.Insert( names );
   }
 
-  // names of SMESH_MeshEditor methods which differ from methods of class Mesh
+  // names of SMESH_MeshEditor commands in which only a method name must be replaced
+  TStringMap diffMethods;
+  if ( diffMethods.empty() ) {
+    const char * orig2newName[] = {
+      // original name --------------> new name
+      "ExtrusionAlongPathObjX"      , "ExtrusionAlongPathX",
+      "FindCoincidentNodesOnPartBut", "FindCoincidentNodesOnPart",
+      "ConvertToQuadraticObject"    , "ConvertToQuadratic",
+      "ConvertFromQuadraticObject"  , "ConvertFromQuadratic",
+      "Create0DElementsOnAllNodes"  , "Add0DElementsToAllNodes",
+      ""};// <- mark of the end
+    diffMethods.Insert( orig2newName );
+  }
+
+  // names of SMESH_MeshEditor methods which differ from methods of Mesh class
   // only by last two arguments
   static TStringSet diffLastTwoArgsMethods;
   if (diffLastTwoArgsMethods.empty() ) {
@@ -1967,13 +2024,21 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     diffLastTwoArgsMethods.Insert( names );
   }
 
+  // only a method name is to change?
   const TCollection_AsciiString & method = theCommand->GetMethod();
   bool isPyMeshMethod = sameMethods.Contains( method );
   if ( !isPyMeshMethod )
   {
-    //Replace SMESH_MeshEditor "MakeGroups" functions by the Mesh
-    //functions with the flag "theMakeGroups = True" like:
-    //SMESH_MeshEditor.CmdMakeGroups => Mesh.Cmd(...,True)
+    TCollection_AsciiString newMethod = diffMethods.Value( method );
+    if (( isPyMeshMethod = ( newMethod.Length() > 0 )))
+      theCommand->SetMethod( newMethod );
+  }
+
+  if ( !isPyMeshMethod )
+  {
+    // Replace SMESH_MeshEditor "*MakeGroups" functions by the Mesh
+    // functions with the flag "theMakeGroups = True" like:
+    // SMESH_MeshEditor.CmdMakeGroups => Mesh.Cmd(...,True)
     int pos = method.Search("MakeGroups");
     if( pos != -1)
     {
@@ -1998,7 +2063,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     }
   }
 
-  // ExtrusionSweep0D() -> ExtrusionSweep()
+  // ExtrusionSweep0D()       -> ExtrusionSweep()
   // ExtrusionSweepObject0D() -> ExtrusionSweepObject()
   if ( !isPyMeshMethod && ( method == "ExtrusionSweep0D"  ||
                             method == "ExtrusionSweepObject0D" ))
@@ -2008,19 +2073,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     theCommand->SetArg(theCommand->GetNbArgs()+1,"False");  //sets flag "MakeGroups = False"
     theCommand->SetArg(theCommand->GetNbArgs()+1,"True");  //sets flag "IsNode = True"
   }
-  // set "ExtrusionAlongPathX()" instead of "ExtrusionAlongPathObjX()"
-  if ( !isPyMeshMethod && method == "ExtrusionAlongPathObjX")
-  {
-    isPyMeshMethod = true;
-    theCommand->SetMethod("ExtrusionAlongPathX");
-  }
 
-  // set "FindCoincidentNodesOnPart()" instead of "FindCoincidentNodesOnPartBut()"
-  if ( !isPyMeshMethod && method == "FindCoincidentNodesOnPartBut")
-  {
-    isPyMeshMethod = true;
-    theCommand->SetMethod("FindCoincidentNodesOnPart");
-  }
   // DoubleNode...New(...) -> DoubleNode...(...,True)
   if ( !isPyMeshMethod && ( method == "DoubleNodeElemGroupNew"  ||
                             method == "DoubleNodeElemGroupsNew" ||
@@ -2045,14 +2098,6 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
       theCommand->SetResultValue( groupID );
     }
   }
-  // ConvertToQuadraticObject(bool,obj) -> ConvertToQuadratic(bool,obj)
-  // ConvertFromQuadraticObject(obj) -> ConvertFromQuadratic(obj)
-  if ( !isPyMeshMethod && ( method == "ConvertToQuadraticObject" ||
-                            method == "ConvertFromQuadraticObject" ))
-  {
-    isPyMeshMethod = true;
-    theCommand->SetMethod( method.SubString( 1, method.Length()-6));
-  }
   // FindAmongElementsByPoint(meshPart, x, y, z, elementType) ->
   // FindElementsByPoint(x, y, z, elementType, meshPart)
   if ( !isPyMeshMethod && method == "FindAmongElementsByPoint" )
@@ -2083,10 +2128,15 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
       theCommand->SetArg( 3, face );
   }
 
-  // meshes made by *MakeMesh() methods are not wrapped by _pyMesh,
-  // so let _pyMesh care of it (TMP?)
-  //     if ( theCommand->GetMethod().Search("MakeMesh") != -1 )
-  //       _pyMesh( new _pyCommand( theCommand->GetString(), 0 )); // for theGen->SetAccessorMethod()
+  if ( method == "QuadToTri" || method == "QuadToTriObject" )
+  {
+    isPyMeshMethod = true;
+    int crit_arg = theCommand->GetNbArgs();
+    const _AString& crit = theCommand->GetArg(crit_arg);
+    if (crit.Search("MaxElementLength2D") != -1)
+      theCommand->SetArg(crit_arg, "");
+  }
+
   if ( isPyMeshMethod )
   {
     theCommand->SetObject( myMesh );
@@ -2094,7 +2144,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
   else
   {
     // editor creation command is needed only if any editor function is called
-    theGen->AddMeshAccessorMethod( theCommand ); // for *Object()
+    theGen->AddMeshAccessorMethod( theCommand ); // for *Object() methods
     if ( !myCreationCmdStr.IsEmpty() ) {
       GetCreationCmd()->GetString() = myCreationCmdStr;
       myCreationCmdStr.Clear();
@@ -3766,7 +3816,7 @@ bool _pySubMesh::CanBeArgOfMethod(const _AString& theMethodName)
       "TranslateObjectMakeGroups","TranslateObjectMakeMesh","ScaleMakeGroups","ScaleMakeMesh",
       "RotateObject","RotateObjectMakeGroups","RotateObjectMakeMesh","FindCoincidentNodesOnPart",
       "FindCoincidentNodesOnPartBut","FindEqualElements","FindAmongElementsByPoint",
-      "MakeBoundaryMesh",
+      "MakeBoundaryMesh","Create0DElementsOnAllNodes",
       "" }; // <- mark of end
     methods.Insert( names );
   }
@@ -3864,6 +3914,21 @@ _pyGroup::_pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id)
   }
 }
 
+//================================================================================
+/*!
+ * \brief set myCanClearCreationCmd = true if the main action of the creation
+ *        command is discarded
+ */
+//================================================================================
+
+void _pyGroup::RemovedWithContents()
+{
+  // this code would be appropriate if Add0DElementsToAllNodes() returned only new nodes
+  // via a created group
+  //if ( GetCreationCmd()->GetMethod() == "Add0DElementsToAllNodes")
+  // myCanClearCreationCmd = true;
+}
+
 //================================================================================
 /*!
  * \brief To convert creation of a group by filter
@@ -3941,8 +4006,6 @@ void _pyGroup::Process( const Handle(_pyCommand)& theCommand)
 //================================================================================
 /*!
  * \brief Prevent clearing "DoubleNode...() command if a group created by it is removed
- * 
- * 
  */
 //================================================================================
 
index fed8d1e7e5b2562c7cb84b5234a385e83a260526..feb720f5f913d5c8d5d3a633ef4503c74827538d 100644 (file)
@@ -591,6 +591,7 @@ public:
   virtual void Process( const Handle(_pyCommand)& theCommand);
   virtual void Flush();
   virtual void Free() { myFilter.Nullify(); }
+  void RemovedWithContents();
 
   DEFINE_STANDARD_RTTI (_pyGroup)
 };
index 36fc71823b948695b28c56bd011811ba586cf1b7..ca74c6a0b834164368cd28da71311f63475d8bd7 100644 (file)
@@ -1232,6 +1232,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromCGNS( const char* theFileName,
 
 SMESH::SMESH_Mesh_ptr
 SMESH_Gen_i::CreateMeshesFromGMF( const char*             theFileName,
+                                  CORBA::Boolean          theMakeRequiredGroups,
                                   SMESH::ComputeError_out theError)
     throw ( SALOME::SALOME_Exception )
 {
@@ -1254,12 +1255,14 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char*             theFileName,
     aStudyBuilder->CommitCommand();
     if ( !aSO->_is_nil() ) {
       // Update Python script
-      TPythonDump() << "("<< aSO << ", error) = " << this << ".CreateMeshesFromGMF(r'" << theFileName << "')";
+      TPythonDump() << "("<< aSO << ", error) = " << this << ".CreateMeshesFromGMF(r'"
+                    << theFileName << "', "
+                    << theMakeRequiredGroups << " )";
     }
   }
   SMESH_Mesh_i* aServant = dynamic_cast<SMESH_Mesh_i*>( GetServant( aMesh ).in() );
   ASSERT( aServant );
-  theError = aServant->ImportGMFFile( theFileName );
+  theError = aServant->ImportGMFFile( theFileName, theMakeRequiredGroups );
   aServant->GetImpl().GetMeshDS()->Modified();
   return aMesh._retn();
 }
index def2066662489b1e94d21cb31b3cfc9707f1bd5f..746f73765029ed22d53a0120bdb47e062615a90c 100644 (file)
@@ -263,6 +263,7 @@ public:
 
   //  Create a mesh and import data from a GMF file
   SMESH::SMESH_Mesh_ptr CreateMeshesFromGMF( const char*             theFileName,
+                                             CORBA::Boolean          theMakeRequiredGroups,
                                              SMESH::ComputeError_out theError)
     throw ( SALOME::SALOME_Exception );
 
index d4545e0b6ce698cba04c7cd28011b5b4948e1b44..0709265bf2aab9c7d49509f93d010808abad7b76 100644 (file)
@@ -99,7 +99,7 @@ using namespace std;
 using SMESH::TPythonDump;
 using SMESH::TVar;
 
-namespace {
+namespace MeshEditor_I {
 
   //=============================================================================
   /*!
@@ -283,7 +283,7 @@ namespace {
       const SMDS_MeshElement * elem =
         (aType == SMDSAbs_Node ? aMesh->FindNode(ind) : aMesh->FindElement(ind));
       if ( elem && ( aType == SMDSAbs_All || elem->GetType() == aType ))
-        aMap.insert( elem );
+        aMap.insert( aMap.end(), elem );
     }
   }
   //================================================================================
@@ -419,7 +419,9 @@ namespace {
     return partIOR;
   }
 
-}
+} // namespace MeshEditor_I
+
+using namespace MeshEditor_I;
 
 //=============================================================================
 /*!
@@ -431,7 +433,9 @@ SMESH_MeshEditor_i::SMESH_MeshEditor_i(SMESH_Mesh_i* theMesh, bool isPreview):
   myMesh_i( theMesh ),
   myMesh( &theMesh->GetImpl() ),
   myEditor( myMesh ),
-  myPreviewMode ( isPreview )
+  myIsPreviewMode ( isPreview ),
+  myPreviewMesh( 0 ),
+  myPreviewEditor( 0 )
 {
 }
 
@@ -443,6 +447,9 @@ SMESH_MeshEditor_i::SMESH_MeshEditor_i(SMESH_Mesh_i* theMesh, bool isPreview):
 
 SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
 {
+  deleteAuxIDSources();
+  delete myPreviewMesh;   myPreviewMesh = 0;
+  delete myPreviewEditor; myPreviewEditor = 0;
 }
 
 //================================================================================
@@ -453,26 +460,64 @@ SMESH_MeshEditor_i::~SMESH_MeshEditor_i()
 
 void SMESH_MeshEditor_i::initData(bool deleteSearchers)
 {
-  if ( myPreviewMode ) {
-    //myPreviewData = new SMESH::MeshPreviewStruct();
+  if ( myIsPreviewMode ) {
+    if ( myPreviewMesh ) myPreviewMesh->Clear();
   }
   else {
     if ( deleteSearchers )
       TSearchersDeleter::Delete();
   }
-  myEditor.GetError().reset();
+  getEditor().GetError().reset();
+  getEditor().CrearLastCreated();
+}
+//================================================================================
+/*!
+ * \brief Return either myEditor or myPreviewEditor depending on myIsPreviewMode.
+ *        WARNING: in preview mode call getPreviewMesh() before getEditor()!
+ */
+//================================================================================
+
+::SMESH_MeshEditor& SMESH_MeshEditor_i::getEditor()
+{
+  if ( myIsPreviewMode && !myPreviewEditor ) {
+    if ( !myPreviewMesh ) getPreviewMesh();
+    myPreviewEditor = new ::SMESH_MeshEditor( myPreviewMesh );
+  }
+  return myIsPreviewMode ? *myPreviewEditor : myEditor;
 }
 
 //================================================================================
 /*!
- * \brief Now does nothing
+ * \brief Initialize and return myPreviewMesh
+ *  \param previewElements - type of elements to show in preview
+ *
+ *  WARNING: call it once par a method!
  */
 //================================================================================
 
-void SMESH_MeshEditor_i::storeResult(::SMESH_MeshEditor& )
+TPreviewMesh * SMESH_MeshEditor_i::getPreviewMesh(SMDSAbs_ElementType previewElements)
 {
+  if ( !myPreviewMesh || myPreviewMesh->myPreviewType != previewElements )
+  {
+    delete myPreviewEditor;
+    myPreviewEditor = 0;
+    delete myPreviewMesh;
+    myPreviewMesh = new TPreviewMesh( previewElements );
+  }
+  myPreviewMesh->Clear();
+  return myPreviewMesh;
 }
 
+//================================================================================
+/*!
+ * \brief Now does nothing
+ */
+//================================================================================
+
+// void SMESH_MeshEditor_i::storeResult(::SMESH_MeshEditor& )
+// {
+// }
+
 //================================================================================
 /*!
  * Return data of mesh edition preview
@@ -481,9 +526,9 @@ void SMESH_MeshEditor_i::storeResult(::SMESH_MeshEditor& )
 
 SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
 {
-  const bool hasBadElems = ( myEditor.GetError() && myEditor.GetError()->HasBadElems() );
+  const bool hasBadElems = ( getEditor().GetError() && getEditor().GetError()->HasBadElems() );
 
-  if ( myPreviewMode || hasBadElems ) { // --- MeshPreviewStruct filling ---
+  if ( myIsPreviewMode || hasBadElems ) { // --- MeshPreviewStruct filling ---
 
     list<int> aNodesConnectivity;
     typedef map<int, int> TNodesMap;
@@ -492,11 +537,11 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
     SMESHDS_Mesh* aMeshDS;
     std::auto_ptr< SMESH_MeshPartDS > aMeshPartDS;
     if ( hasBadElems ) {
-      aMeshPartDS.reset( new SMESH_MeshPartDS( myEditor.GetError()->myBadElements ));
+      aMeshPartDS.reset( new SMESH_MeshPartDS( getEditor().GetError()->myBadElements ));
       aMeshDS = aMeshPartDS.get();
     }
     else {
-      aMeshDS = myEditor.GetMeshDS();
+      aMeshDS = getEditor().GetMeshDS();
     }
     int nbEdges = aMeshDS->NbEdges();
     int nbFaces = aMeshDS->NbFaces();
@@ -507,7 +552,7 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
     
     SMDSAbs_ElementType previewType = SMDSAbs_All;
     if ( !hasBadElems )
-      if (TPreviewMesh * aPreviewMesh = dynamic_cast< TPreviewMesh* >( myEditor.GetMesh() )) {
+      if (TPreviewMesh * aPreviewMesh = dynamic_cast< TPreviewMesh* >( getEditor().GetMesh() )) {
         previewType = aPreviewMesh->myPreviewType;
         switch ( previewType ) {
         case SMDSAbs_Edge  : nbFaces = nbVolum = 0; break;
@@ -519,13 +564,10 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
 
     myPreviewData->elementTypes.length(nbEdges + nbFaces + nbVolum);
     int i = 0, j = 0;
-    SMDS_ElemIteratorPtr itMeshElems = aMeshDS->elementsIterator();
+    SMDS_ElemIteratorPtr itMeshElems = aMeshDS->elementsIterator(previewType);
 
     while ( itMeshElems->more() ) {
       const SMDS_MeshElement* aMeshElem = itMeshElems->next();
-      if ( previewType != SMDSAbs_All && aMeshElem->GetType() != previewType )
-        continue;
-
       SMDS_ElemIteratorPtr itElemNodes = aMeshElem->nodesIterator();
       while ( itElemNodes->more() ) {
         const SMDS_MeshNode* aMeshNode =
@@ -575,7 +617,7 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
 SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
 {
   SMESH::long_array_var myLastCreatedNodes = new SMESH::long_array();
-  const SMESH_SequenceOfElemPtr& aSeq = myEditor.GetLastCreatedNodes();
+  const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes();
   myLastCreatedNodes->length( aSeq.Length() );
   for (int i = 1; i <= aSeq.Length(); i++)
     myLastCreatedNodes[i-1] = aSeq.Value(i)->GetID();
@@ -592,7 +634,7 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
 SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
 {
   SMESH::long_array_var myLastCreatedElems = new SMESH::long_array();
-  const SMESH_SequenceOfElemPtr& aSeq = myEditor.GetLastCreatedElems();
+  const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems();
   myLastCreatedElems->length( aSeq.Length() );
   for ( int i = 1; i <= aSeq.Length(); i++ )
     myLastCreatedElems[i-1] = aSeq.Value(i)->GetID();
@@ -607,8 +649,8 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
 
 SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
 {
-  SMESH::ComputeError*   errOut = new SMESH::ComputeError;
-  SMESH_ComputeErrorPtr& errIn  = myEditor.GetError();
+  SMESH::ComputeError_var errOut = new SMESH::ComputeError;
+  SMESH_ComputeErrorPtr&  errIn  = getEditor().GetError();
   if ( errIn && !errIn->IsOK() )
   {
     errOut->code       = -( errIn->myName < 0 ? errIn->myName + 1: errIn->myName ); // -1 -> 0
@@ -616,7 +658,13 @@ SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
     errOut->subShapeID = -1;
     errOut->hasBadMesh = !errIn->myBadElements.empty();
   }
-  return errOut;
+  else
+  {
+    errOut->code       = 0;
+    errOut->subShapeID = -1;
+    errOut->hasBadMesh = false;
+  }
+  return errOut._retn();
 }
 
 //=======================================================================
@@ -624,7 +672,7 @@ SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
 //purpose  : Wrap a sequence of ids in a SMESH_IDSource
 //=======================================================================
 
-struct _IDSource : public POA_SMESH::SMESH_IDSource
+struct SMESH_MeshEditor_i::_IDSource : public POA_SMESH::SMESH_IDSource
 {
   SMESH::long_array     _ids;
   SMESH::ElementType    _type;
@@ -647,15 +695,28 @@ struct _IDSource : public POA_SMESH::SMESH_IDSource
 SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids,
                                                            SMESH::ElementType       type)
 {
-  _IDSource* anIDSource = new _IDSource;
-  anIDSource->_ids = ids;
-  anIDSource->_type = type;
-  anIDSource->_mesh = myMesh_i->_this();
-  SMESH::SMESH_IDSource_var anIDSourceVar = anIDSource->_this();
+  if ( myAuxIDSources.size() > 10 )
+    deleteAuxIDSources();
+
+  _IDSource* idSrc = new _IDSource;
+  idSrc->_mesh = myMesh_i->_this();
+  idSrc->_ids  = ids;
+  idSrc->_type = type;
+  myAuxIDSources.push_back( idSrc );
+
+  SMESH::SMESH_IDSource_var anIDSourceVar = idSrc->_this();
 
   return anIDSourceVar._retn();
 }
 
+void SMESH_MeshEditor_i::deleteAuxIDSources()
+{
+  std::list< _IDSource* >::iterator idSrcIt = myAuxIDSources.begin();
+  for ( ; idSrcIt != myAuxIDSources.end(); ++idSrcIt )
+    delete *idSrcIt;
+  myAuxIDSources.clear();
+}
+
 //=============================================================================
 /*!
  *
@@ -676,7 +737,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
   TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
 
   // Remove Elements
-  bool ret = myEditor.Remove( IdList, false );
+  bool ret = getEditor().Remove( IdList, false );
   myMesh->GetMeshDS()->Modified();
   if ( IDsOfElements.length() )
     myMesh->SetIsModified( true ); // issue 0020693
@@ -700,7 +761,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNo
   // Update Python script
   TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
 
-  bool ret = myEditor.Remove( IdList, true );
+  bool ret = getEditor().Remove( IdList, true );
   myMesh->GetMeshDS()->Modified();
   if ( IDsOfNodes.length() )
     myMesh->SetIsModified( true ); // issue 0020693
@@ -724,7 +785,7 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
   // Create filter to find all orphan nodes
   SMESH::Controls::Filter::TIdSequence seq;
   SMESH::Controls::PredicatePtr predicate( new SMESH::Controls::FreeNodes() );
-  SMESH::Controls::Filter::GetElementsId( GetMeshDS(), predicate, seq );
+  SMESH::Controls::Filter::GetElementsId( getMeshDS(), predicate, seq );
 
   // remove orphan nodes (if there are any)
   list< int > IdList;
@@ -732,7 +793,7 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
     IdList.push_back( seq[i] );
 
   int nbNodesBefore = myMesh->NbNodes();
-  myEditor.Remove( IdList, true );
+  getEditor().Remove( IdList, true );
   myMesh->GetMeshDS()->Modified();
   if ( IdList.size() )
     myMesh->SetIsModified( true );
@@ -752,7 +813,7 @@ CORBA::Long SMESH_MeshEditor_i::AddNode(CORBA::Double x,
 {
   initData();
 
-  const SMDS_MeshNode* N = GetMeshDS()->AddNode(x, y, z);
+  const SMDS_MeshNode* N = getMeshDS()->AddNode(x, y, z);
 
   // Update Python script
   TPythonDump() << "nodeID = " << this << ".AddNode( "
@@ -773,8 +834,8 @@ CORBA::Long SMESH_MeshEditor_i::Add0DElement(CORBA::Long IDOfNode)
 {
   initData();
 
-  const SMDS_MeshNode* aNode = GetMeshDS()->FindNode(IDOfNode);
-  SMDS_MeshElement* elem = GetMeshDS()->Add0DElement(aNode);
+  const SMDS_MeshNode* aNode = getMeshDS()->FindNode(IDOfNode);
+  SMDS_MeshElement* elem = getMeshDS()->Add0DElement(aNode);
 
   // Update Python script
   TPythonDump() << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
@@ -802,8 +863,8 @@ CORBA::Long SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diam
   if ( diameter < std::numeric_limits<double>::min() )
     THROW_SALOME_CORBA_EXCEPTION("Invalid diameter", SALOME::BAD_PARAM);
 
-  const SMDS_MeshNode* aNode = GetMeshDS()->FindNode(IDOfNode);
-  SMDS_MeshElement* elem = GetMeshDS()->AddBall(aNode, diameter);
+  const SMDS_MeshNode* aNode = getMeshDS()->FindNode(IDOfNode);
+  SMDS_MeshElement* elem = getMeshDS()->AddBall(aNode, diameter);
 
   // Update Python script
   TPythonDump() << "ballElem = "
@@ -835,7 +896,8 @@ CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
   {
     CORBA::Long index1 = IDsOfNodes[0];
     CORBA::Long index2 = IDsOfNodes[1];
-    elem = GetMeshDS()->AddEdge(GetMeshDS()->FindNode(index1), GetMeshDS()->FindNode(index2));
+    elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(index1),
+                                 getMeshDS()->FindNode(index2));
 
     // Update Python script
     TPythonDump() << "edge = " << this << ".AddEdge([ "
@@ -845,9 +907,9 @@ CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
     CORBA::Long n1 = IDsOfNodes[0];
     CORBA::Long n2 = IDsOfNodes[1];
     CORBA::Long n12 = IDsOfNodes[2];
-    elem = GetMeshDS()->AddEdge(GetMeshDS()->FindNode(n1),
-                                GetMeshDS()->FindNode(n2),
-                                GetMeshDS()->FindNode(n12));
+    elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(n1),
+                                 getMeshDS()->FindNode(n2),
+                                 getMeshDS()->FindNode(n12));
     // Update Python script
     TPythonDump() << "edgeID = " << this << ".AddEdge([ "
                   <<n1<<", "<<n2<<", "<<n12<<" ])";
@@ -878,29 +940,29 @@ CORBA::Long SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
 
   std::vector<const SMDS_MeshNode*> nodes (NbNodes);
   for (int i = 0; i < NbNodes; i++)
-    nodes[i] = GetMeshDS()->FindNode(IDsOfNodes[i]);
+    nodes[i] = getMeshDS()->FindNode(IDsOfNodes[i]);
 
   SMDS_MeshElement* elem = 0;
   if (NbNodes == 3) {
-    elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2]);
+    elem = getMeshDS()->AddFace(nodes[0], nodes[1], nodes[2]);
   }
   else if (NbNodes == 4) {
-    elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3]);
+    elem = getMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3]);
   }
   else if (NbNodes == 6) {
-    elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
+    elem = getMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
                                 nodes[4], nodes[5]);
   }
   else if (NbNodes == 8) {
-    elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
+    elem = getMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
                                 nodes[4], nodes[5], nodes[6], nodes[7]);
   }
   else if (NbNodes == 9) {
-    elem = GetMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
+    elem = getMeshDS()->AddFace(nodes[0], nodes[1], nodes[2], nodes[3],
                                 nodes[4], nodes[5], nodes[6], nodes[7], nodes[8] );
   }
   else if (NbNodes > 2) {
-    elem = GetMeshDS()->AddPolygonalFace(nodes);
+    elem = getMeshDS()->AddPolygonalFace(nodes);
   }
 
   // Update Python script
@@ -925,9 +987,9 @@ CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsO
   int NbNodes = IDsOfNodes.length();
   std::vector<const SMDS_MeshNode*> nodes (NbNodes);
   for (int i = 0; i < NbNodes; i++)
-    nodes[i] = GetMeshDS()->FindNode(IDsOfNodes[i]);
+    nodes[i] = getMeshDS()->FindNode(IDsOfNodes[i]);
 
-  const SMDS_MeshElement* elem = GetMeshDS()->AddPolygonalFace(nodes);
+  const SMDS_MeshElement* elem = getMeshDS()->AddPolygonalFace(nodes);
 
   // Update Python script
   TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
@@ -950,32 +1012,32 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
   int NbNodes = IDsOfNodes.length();
   vector< const SMDS_MeshNode*> n(NbNodes);
   for(int i=0;i<NbNodes;i++)
-    n[i]=GetMeshDS()->FindNode(IDsOfNodes[i]);
+    n[i]= getMeshDS()->FindNode(IDsOfNodes[i]);
 
   SMDS_MeshElement* elem = 0;
   switch(NbNodes)
   {
-  case 4 :elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3]); break;
-  case 5 :elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4]); break;
-  case 6 :elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5]); break;
-  case 8 :elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]); break;
-  case 10:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
+  case 4 :elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3]); break;
+  case 5 :elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4]); break;
+  case 6 :elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5]); break;
+  case 8 :elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]); break;
+  case 10:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
                                         n[6],n[7],n[8],n[9]);
     break;
-  case 12:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
+  case 12:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],
                                         n[6],n[7],n[8],n[9],n[10],n[11]);
     break;
-  case 13:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],
+  case 13:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],
                                         n[7],n[8],n[9],n[10],n[11],n[12]);
     break;
-  case 15:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],
+  case 15:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],
                                         n[9],n[10],n[11],n[12],n[13],n[14]);
     break;
-  case 20:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],
+  case 20:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],
                                         n[8],n[9],n[10],n[11],n[12],n[13],n[14],
                                         n[15],n[16],n[17],n[18],n[19]);
     break;
-  case 27:elem = GetMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],
+  case 27:elem = getMeshDS()->AddVolume(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],
                                         n[8],n[9],n[10],n[11],n[12],n[13],n[14],
                                         n[15],n[16],n[17],n[18],n[19],
                                         n[20],n[21],n[22],n[23],n[24],n[25],n[26]);
@@ -1006,7 +1068,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
   std::vector<const SMDS_MeshNode*> n (NbNodes);
   for (int i = 0; i < NbNodes; i++)
     {
-      const SMDS_MeshNode* aNode = GetMeshDS()->FindNode(IDsOfNodes[i]);
+      const SMDS_MeshNode* aNode = getMeshDS()->FindNode(IDsOfNodes[i]);
       if (!aNode) return 0;
       n[i] = aNode;
     }
@@ -1016,7 +1078,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
   for (int j = 0; j < NbFaces; j++)
     q[j] = Quantities[j];
 
-  const SMDS_MeshElement* elem = GetMeshDS()->AddPolyhedralVolume(n, q);
+  const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(n, q);
 
   // Update Python script
   TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( "
@@ -1031,6 +1093,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
  *  AddPolyhedralVolumeByFaces
  */
 //=============================================================================
+
 CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces)
 {
   initData();
@@ -1040,7 +1103,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar
   std::vector<int> quantities (NbFaces);
 
   for (int i = 0; i < NbFaces; i++) {
-    const SMDS_MeshElement* aFace = GetMeshDS()->FindElement(IdsOfFaces[i]);
+    const SMDS_MeshElement* aFace = getMeshDS()->FindElement(IdsOfFaces[i]);
     quantities[i] = aFace->NbNodes();
 
     SMDS_ElemIteratorPtr It = aFace->nodesIterator();
@@ -1049,7 +1112,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar
     }
   }
 
-  const SMDS_MeshElement* elem = GetMeshDS()->AddPolyhedralVolume(poly_nodes, quantities);
+  const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(poly_nodes, quantities);
 
   // Update Python script
   TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
@@ -1059,6 +1122,77 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar
   return elem ? ( myMesh->SetIsModified( true ), elem->GetID()) : 0;
 }
 
+//=============================================================================
+//
+// \brief Create 0D elements on all nodes of the given object except those 
+//        nodes on which a 0D element already exists.
+//  \param theObject object on whose nodes 0D elements will be created.
+//  \param theGroupName optional name of a group to add 0D elements created
+//         and/or found on nodes of \a theObject.
+//  \return an object (a new group or a temporary SMESH_IDSource) holding
+//          ids of new and/or found 0D elements.
+//
+//=============================================================================
+
+SMESH::SMESH_IDSource_ptr
+SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObject,
+                                               const char*               theGroupName)
+  throw (SALOME::SALOME_Exception)
+{
+  initData();
+
+  SMESH::SMESH_IDSource_var result;
+  TPythonDump pyDump;
+
+  TIDSortedElemSet elements, elems0D;
+  if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+    getEditor().Create0DElementsOnAllNodes( elements, elems0D );
+
+  SMESH::long_array_var newElems = new SMESH::long_array;
+  newElems->length( elems0D.size() );
+  TIDSortedElemSet::iterator eIt = elems0D.begin();
+  for ( size_t i = 0; i < elems0D.size(); ++i, ++eIt )
+    newElems[ i ] = (*eIt)->GetID();
+
+  SMESH::SMESH_GroupBase_var groupToFill;
+  if ( theGroupName && strlen( theGroupName ))
+  {
+    // Get existing group named theGroupName
+    SMESH::ListOfGroups_var groups = myMesh_i->GetGroups();
+    for (int i = 0, nbGroups = groups->length(); i < nbGroups; i++ ) {
+      SMESH::SMESH_GroupBase_var group = groups[i];
+      if ( !group->_is_nil() ) {
+        CORBA::String_var name = group->GetName();
+        if ( strcmp( name.in(), theGroupName ) == 0 && group->GetType() == SMESH::ELEM0D ) {
+          groupToFill = group;
+          break;
+        }
+      }
+    }
+    if ( groupToFill->_is_nil() )
+      groupToFill = myMesh_i->CreateGroup( SMESH::ELEM0D, theGroupName );
+    else if ( !SMESH::DownCast< SMESH_Group_i* > ( groupToFill ))
+      groupToFill = myMesh_i->ConvertToStandalone( groupToFill );
+  }
+
+  if ( SMESH_Group_i* group_i = SMESH::DownCast< SMESH_Group_i* > ( groupToFill ))
+  {
+    group_i->Add( newElems );
+    result = SMESH::SMESH_IDSource::_narrow( groupToFill );
+    pyDump << groupToFill;
+  }
+  else
+  {
+    result = MakeIDSource( newElems, SMESH::ELEM0D );
+    pyDump << "elem0DIDs";
+  }
+
+  pyDump << " = " << this << ".Create0DElementsOnAllNodes( "
+         << theObject << ", '" << theGroupName << "' )";
+
+  return result._retn();
+}
+
 //=============================================================================
 /*!
  * \brief Bind a node to a vertex
@@ -1073,7 +1207,7 @@ void SMESH_MeshEditor_i::SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexI
 {
   Unexpect aCatch(SALOME_SalomeException);
 
-  SMESHDS_Mesh * mesh = GetMeshDS();
+  SMESHDS_Mesh * mesh = getMeshDS();
   SMDS_MeshNode* node = const_cast<SMDS_MeshNode*>( mesh->FindNode(NodeID) );
   if ( !node )
     THROW_SALOME_CORBA_EXCEPTION("Invalid NodeID", SALOME::BAD_PARAM);
@@ -1106,7 +1240,7 @@ void SMESH_MeshEditor_i::SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
 {
   Unexpect aCatch(SALOME_SalomeException);
 
-  SMESHDS_Mesh * mesh = GetMeshDS();
+  SMESHDS_Mesh * mesh = getMeshDS();
   SMDS_MeshNode* node = const_cast<SMDS_MeshNode*>( mesh->FindNode(NodeID) );
   if ( !node )
     THROW_SALOME_CORBA_EXCEPTION("Invalid NodeID", SALOME::BAD_PARAM);
@@ -1145,7 +1279,7 @@ void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
 {
   Unexpect aCatch(SALOME_SalomeException);
 
-  SMESHDS_Mesh * mesh = GetMeshDS();
+  SMESHDS_Mesh * mesh = getMeshDS();
   SMDS_MeshNode* node = const_cast<SMDS_MeshNode*>( mesh->FindNode(NodeID) );
   if ( !node )
     THROW_SALOME_CORBA_EXCEPTION("Invalid NodeID", SALOME::BAD_PARAM);
@@ -1192,7 +1326,7 @@ void SMESH_MeshEditor_i::SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID
 {
   Unexpect aCatch(SALOME_SalomeException);
 
-  SMESHDS_Mesh * mesh = GetMeshDS();
+  SMESHDS_Mesh * mesh = getMeshDS();
   SMDS_MeshNode* node = const_cast<SMDS_MeshNode*>( mesh->FindNode(NodeID) );
   if ( !node )
     THROW_SALOME_CORBA_EXCEPTION("Invalid NodeID", SALOME::BAD_PARAM);
@@ -1225,7 +1359,7 @@ void SMESH_MeshEditor_i::SetMeshElementOnShape(CORBA::Long ElementID,
 {
   Unexpect aCatch(SALOME_SalomeException);
 
-  SMESHDS_Mesh * mesh = GetMeshDS();
+  SMESHDS_Mesh * mesh = getMeshDS();
   SMDS_MeshElement* elem = const_cast<SMDS_MeshElement*>(mesh->FindElement(ElementID));
   if ( !elem )
     THROW_SALOME_CORBA_EXCEPTION("Invalid ElementID", SALOME::BAD_PARAM);
@@ -1256,8 +1390,8 @@ CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
 {
   initData();
 
-  const SMDS_MeshNode * n1 = GetMeshDS()->FindNode( NodeID1 );
-  const SMDS_MeshNode * n2 = GetMeshDS()->FindNode( NodeID2 );
+  const SMDS_MeshNode * n1 = getMeshDS()->FindNode( NodeID1 );
+  const SMDS_MeshNode * n2 = getMeshDS()->FindNode( NodeID2 );
   if ( !n1 || !n2 )
     return false;
 
@@ -1266,7 +1400,7 @@ CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
                 << NodeID1 << ", " << NodeID2 << " )";
 
 
-  int ret =  myEditor.InverseDiag ( n1, n2 );
+  int ret =  getEditor().InverseDiag ( n1, n2 );
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
   return ret;
@@ -1283,8 +1417,8 @@ CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1,
 {
   initData();
 
-  const SMDS_MeshNode * n1 = GetMeshDS()->FindNode( NodeID1 );
-  const SMDS_MeshNode * n2 = GetMeshDS()->FindNode( NodeID2 );
+  const SMDS_MeshNode * n1 = getMeshDS()->FindNode( NodeID1 );
+  const SMDS_MeshNode * n2 = getMeshDS()->FindNode( NodeID2 );
   if ( !n1 || !n2 )
     return false;
 
@@ -1293,13 +1427,12 @@ CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1,
                 << NodeID1 << ", " << NodeID2 <<  " )";
 
 
-  bool stat = myEditor.DeleteDiag ( n1, n2 );
+  bool stat = getEditor().DeleteDiag ( n1, n2 );
 
   myMesh->GetMeshDS()->Modified();
   if ( stat )
     myMesh->SetIsModified( true ); // issue 0020693
 
-  storeResult(myEditor);
 
   return stat;
 }
@@ -1317,9 +1450,9 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::long_array & IDsOfEleme
   for (int i = 0; i < IDsOfElements.length(); i++)
   {
     CORBA::Long index = IDsOfElements[i];
-    const SMDS_MeshElement * elem = GetMeshDS()->FindElement(index);
+    const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
     if ( elem )
-      myEditor.Reorient( elem );
+      getEditor().Reorient( elem );
   }
   // Update Python script
   TPythonDump() << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
@@ -1375,14 +1508,14 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
   initData(/*deleteSearchers=*/false);
 
   TIDSortedElemSet elements;
-  if ( !idSourceToSet( the2Dgroup, GetMeshDS(), elements, SMDSAbs_Face, /*emptyIfIsMesh=*/1))
+  if ( !idSourceToSet( the2Dgroup, getMeshDS(), elements, SMDSAbs_Face, /*emptyIfIsMesh=*/1))
     THROW_SALOME_CORBA_EXCEPTION("No faces in given group", SALOME::BAD_PARAM);
 
 
   const SMDS_MeshElement* face = 0;
   if ( theFace > 0 )
   {
-    face = GetMeshDS()->FindElement( theFace );
+    face = getMeshDS()->FindElement( theFace );
     if ( !face )
       THROW_SALOME_CORBA_EXCEPTION("Inexistent face given", SALOME::BAD_PARAM);
     if ( face->GetType() != SMDSAbs_Face )
@@ -1424,8 +1557,7 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
   if ( dirVec.Magnitude() < std::numeric_limits< double >::min() )
     THROW_SALOME_CORBA_EXCEPTION("Zero size vector", SALOME::BAD_PARAM);
 
-  int nbReori = myEditor.Reorient2D( elements, dirVec, face );
-  storeResult(myEditor);
+  int nbReori = getEditor().Reorient2D( elements, dirVec, face );
 
   if ( nbReori ) {
     myMesh->SetIsModified( true );
@@ -1451,7 +1583,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array &   IDsOfE
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
   TIDSortedElemSet faces;
   arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face);
 
@@ -1459,7 +1591,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array &   IDsOfE
     dynamic_cast<SMESH::NumericalFunctor_i*>( SMESH_Gen_i::GetServant( Criterion ).in() );
   SMESH::Controls::NumericalFunctorPtr aCrit;
   if ( !aNumericalFunctor )
-    aCrit.reset( new SMESH::Controls::AspectRatio() );
+    aCrit.reset( new SMESH::Controls::MaxElementLength2D() );
   else
     aCrit = aNumericalFunctor->GetNumericalFunctor();
 
@@ -1468,12 +1600,11 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array &   IDsOfE
                 << IDsOfElements << ", " << aNumericalFunctor << ", " << TVar( MaxAngle ) << " )";
 
 
-  bool stat = myEditor.TriToQuad( faces, aCrit, MaxAngle );
+  bool stat = getEditor().TriToQuad( faces, aCrit, MaxAngle );
   myMesh->GetMeshDS()->Modified();
   if ( stat )
     myMesh->SetIsModified( true ); // issue 0020693
 
-  storeResult(myEditor);
 
   return stat;
 }
@@ -1515,7 +1646,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array &   IDsOfE
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
   TIDSortedElemSet faces;
   arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face);
 
@@ -1531,12 +1662,11 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array &   IDsOfE
   // Update Python script
   TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
 
-  CORBA::Boolean stat = myEditor.QuadToTri( faces, aCrit );
+  CORBA::Boolean stat = getEditor().QuadToTri( faces, aCrit );
   myMesh->GetMeshDS()->Modified();
   if ( stat )
     myMesh->SetIsModified( true ); // issue 0020693
 
-  storeResult(myEditor);
 
   return stat;
 }
@@ -1577,7 +1707,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfEle
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
   TIDSortedElemSet faces;
   arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face);
 
@@ -1585,13 +1715,12 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfEle
   TPythonDump() << "isDone = " << this << ".SplitQuad( "
                 << IDsOfElements << ", " << Diag13 << " )";
 
-  CORBA::Boolean stat = myEditor.QuadToTri( faces, Diag13 );
+  CORBA::Boolean stat = getEditor().QuadToTri( faces, Diag13 );
   myMesh->GetMeshDS()->Modified();
   if ( stat )
     myMesh->SetIsModified( true ); // issue 0020693
 
 
-  storeResult(myEditor);
 
   return stat;
 }
@@ -1630,7 +1759,7 @@ CORBA::Long SMESH_MeshEditor_i::BestSplit (CORBA::Long                 IDOfQuad,
 {
   initData();
 
-  const SMDS_MeshElement* quad = GetMeshDS()->FindElement(IDOfQuad);
+  const SMDS_MeshElement* quad = getMeshDS()->FindElement(IDOfQuad);
   if (quad && quad->GetType() == SMDSAbs_Face && quad->NbNodes() == 4)
   {
     SMESH::NumericalFunctor_i* aNumericalFunctor =
@@ -1641,7 +1770,7 @@ CORBA::Long SMESH_MeshEditor_i::BestSplit (CORBA::Long                 IDOfQuad,
     else
       aCrit.reset(new SMESH::Controls::AspectRatio());
 
-    return myEditor.BestSplit(quad, aCrit);
+    return getEditor().BestSplit(quad, aCrit);
   }
   return -1;
 }
@@ -1662,12 +1791,11 @@ void SMESH_MeshEditor_i::SplitVolumesIntoTetra (SMESH::SMESH_IDSource_ptr elems,
 
   SMESH::long_array_var anElementsId = elems->GetIDs();
   TIDSortedElemSet elemSet;
-  arrayToSet( anElementsId, GetMeshDS(), elemSet, SMDSAbs_Volume );
+  arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume );
 
-  myEditor.SplitVolumesIntoTetra( elemSet, int( methodFlags ));
+  getEditor().SplitVolumesIntoTetra( elemSet, int( methodFlags ));
   myMesh->GetMeshDS()->Modified();
 
-  storeResult(myEditor);
 
 //   if ( myLastCreatedElems.length() ) - it does not influence Compute()
 //     myMesh->SetIsModified( true ); // issue 0020693
@@ -1760,7 +1888,7 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array &              IDsOfElements,
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   TIDSortedElemSet elements;
   arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
@@ -1776,13 +1904,12 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array &              IDsOfElements,
   if ( Method != SMESH::SMESH_MeshEditor::LAPLACIAN_SMOOTH )
     method = ::SMESH_MeshEditor::CENTROIDAL;
 
-  myEditor.Smooth(elements, fixedNodes, method,
+  getEditor().Smooth(elements, fixedNodes, method,
                   MaxNbOfIterations, MaxAspectRatio, IsParametric );
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true ); // issue 0020693
 
-  storeResult(myEditor);
 
   // Update Python script
   TPythonDump() << "isDone = " << this << "."
@@ -1843,7 +1970,7 @@ void SMESH_MeshEditor_i::RenumberNodes()
   // Update Python script
   TPythonDump() << this << ".RenumberNodes()";
 
-  GetMeshDS()->Renumber( true );
+  getMeshDS()->Renumber( true );
 }
 
 
@@ -1858,7 +1985,7 @@ void SMESH_MeshEditor_i::RenumberElements()
   // Update Python script
   TPythonDump() << this << ".RenumberElements()";
 
-  GetMeshDS()->Renumber( false );
+  getMeshDS()->Renumber( false );
 }
 
 //=======================================================================
@@ -1892,32 +2019,24 @@ SMESH_MeshEditor_i::rotationSweep(const SMESH::long_array & theIDsOfElements,
   initData();
 
   TIDSortedElemSet inElements, copyElements;
-  arrayToSet(theIDsOfElements, GetMeshDS(), inElements, theElementType);
+  arrayToSet(theIDsOfElements, getMeshDS(), inElements, theElementType);
 
   TIDSortedElemSet* workElements = & inElements;
-  TPreviewMesh      tmpMesh( SMDSAbs_Face );
-  SMESH_Mesh*       mesh = 0;
   bool              makeWalls=true;
-  if ( myPreviewMode )
+  if ( myIsPreviewMode )
   {
     SMDSAbs_ElementType select = SMDSAbs_All, avoid = SMDSAbs_Volume;
-    tmpMesh.Copy( inElements, copyElements, select, avoid );
-    mesh = &tmpMesh;
+    getPreviewMesh( SMDSAbs_Face )->Copy( inElements, copyElements, select, avoid );
     workElements = & copyElements;
     //makeWalls = false;
   }
-  else
-  {
-    mesh = myMesh;
-  }
 
   gp_Ax1 Ax1 (gp_Pnt( theAxis.x,  theAxis.y,  theAxis.z ),
               gp_Vec( theAxis.vx, theAxis.vy, theAxis.vz ));
 
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.RotationSweep (*workElements, Ax1, theAngleInRadians,
-                              theNbOfSteps, theTolerance, theMakeGroups, makeWalls);
-  storeResult(myEditor);
+      getEditor().RotationSweep (*workElements, Ax1, theAngleInRadians,
+                                 theNbOfSteps, theTolerance, theMakeGroups, makeWalls);
   myMesh->GetMeshDS()->Modified();
 
   //  myMesh->SetIsModified( true ); -- it does not influence Compute()
@@ -1936,7 +2055,7 @@ void SMESH_MeshEditor_i::RotationSweep(const SMESH::long_array & theIDsOfElement
                                        CORBA::Long               theNbOfSteps,
                                        CORBA::Double             theTolerance)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".RotationSweep( "
                   << theIDsOfElements          << ", "
                   << theAxis                   << ", "
@@ -1972,7 +2091,7 @@ SMESH_MeshEditor_i::RotationSweepMakeGroups(const SMESH::long_array& theIDsOfEle
                                                theNbOfSteps,
                                                theTolerance,
                                                true);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotationSweepMakeGroups( "
                 << theIDsOfElements        << ", "
@@ -1995,7 +2114,7 @@ void SMESH_MeshEditor_i::RotationSweepObject(SMESH::SMESH_IDSource_ptr theObject
                                              CORBA::Long               theNbOfSteps,
                                              CORBA::Double             theTolerance)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".RotationSweepObject( "
                   << theObject << ", "
                   << theAxis << ", "
@@ -2023,7 +2142,7 @@ void SMESH_MeshEditor_i::RotationSweepObject1D(SMESH::SMESH_IDSource_ptr theObje
                                                CORBA::Long               theNbOfSteps,
                                                CORBA::Double             theTolerance)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".RotationSweepObject1D( "
                   << theObject                 << ", "
                   << theAxis                   << ", "
@@ -2052,7 +2171,7 @@ void SMESH_MeshEditor_i::RotationSweepObject2D(SMESH::SMESH_IDSource_ptr theObje
                                                CORBA::Long               theNbOfSteps,
                                                CORBA::Double             theTolerance)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".RotationSweepObject2D( "
                   << theObject                 << ", "
                   << theAxis                   << ", "
@@ -2091,7 +2210,7 @@ SMESH_MeshEditor_i::RotationSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr theO
                                                theNbOfSteps,
                                                theTolerance,
                                                true);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotationSweepObjectMakeGroups( "
                 << theObject << ", "
@@ -2125,7 +2244,7 @@ SMESH_MeshEditor_i::RotationSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr th
                                                theTolerance,
                                                true,
                                                SMDSAbs_Edge);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotationSweepObject1DMakeGroups( "
                 << theObject                 << ", "
@@ -2159,7 +2278,7 @@ SMESH_MeshEditor_i::RotationSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr th
                                                theTolerance,
                                                true,
                                                SMDSAbs_Face);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotationSweepObject2DMakeGroups( "
                 << theObject                 << ", "
@@ -2191,7 +2310,7 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements,
     OCC_CATCH_SIGNALS;
 #endif
     TIDSortedElemSet elements, copyElements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements, theElementType);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements, theElementType);
 
     const SMESH::PointStruct * P = &theStepVector.PS;
     gp_Vec stepVec( P->x, P->y, P->z );
@@ -2199,29 +2318,22 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements,
     TIDSortedElemSet* workElements = & elements;
 
     SMDSAbs_ElementType aType = SMDSAbs_Face;
-    //::SMESH_MeshEditor::ExtrusionFlags aFlag = ::SMESH_MeshEditor::ExtrusionFlags::EXTRUSION_FLAG_BOUNDARY;
     if (theElementType == SMDSAbs_Node)
     {
       aType = SMDSAbs_Edge;
-      //aFlag = ::SMESH_MeshEditor::ExtrusionFlags::EXTRUSION_FLAG_SEW;
     }
-    TPreviewMesh      tmpMesh( aType );
-    SMESH_Mesh* mesh = myMesh;
-
-    if ( myPreviewMode ) {
+    if ( myIsPreviewMode ) {
       SMDSAbs_ElementType select = SMDSAbs_All, avoid = SMDSAbs_Volume;
-      tmpMesh.Copy( elements, copyElements, select, avoid );
-      mesh = &tmpMesh;
+      getPreviewMesh( aType )->Copy( elements, copyElements, select, avoid );
       workElements = & copyElements;
       theMakeGroups = false;
     }
 
     TElemOfElemListMap aHystory;
     ::SMESH_MeshEditor::PGroupIDs groupIds = 
-        myEditor.ExtrusionSweep (*workElements, stepVec, theNbOfSteps, aHystory, theMakeGroups);
+        getEditor().ExtrusionSweep (*workElements, stepVec, theNbOfSteps, aHystory, theMakeGroups);
 
     myMesh->GetMeshDS()->Modified();
-    storeResult(myEditor);
 
     return theMakeGroups ? getGroups(groupIds.get()) : 0;
 
@@ -2242,7 +2354,7 @@ void SMESH_MeshEditor_i::ExtrusionSweep(const SMESH::long_array & theIDsOfElemen
                                         CORBA::Long               theNbOfSteps)
 {
   extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, false );
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".ExtrusionSweep( "
                   << theIDsOfElements << ", " << theStepVector <<", " << TVar(theNbOfSteps) << " )";
   }
@@ -2258,7 +2370,7 @@ void SMESH_MeshEditor_i::ExtrusionSweep0D(const SMESH::long_array & theIDsOfElem
                                           CORBA::Long               theNbOfSteps)
 {
   extrusionSweep (theIDsOfElements, theStepVector, theNbOfSteps, false, SMDSAbs_Node );
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".ExtrusionSweep0D( "
                   << theIDsOfElements << ", " << theStepVector <<", " << TVar(theNbOfSteps)<< " )";
   }
@@ -2275,7 +2387,7 @@ void SMESH_MeshEditor_i::ExtrusionSweepObject(SMESH::SMESH_IDSource_ptr theObjec
 {
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false );
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".ExtrusionSweepObject( "
                   << theObject << ", " << theStepVector << ", " << theNbOfSteps << " )";
   }
@@ -2292,7 +2404,7 @@ void SMESH_MeshEditor_i::ExtrusionSweepObject0D(SMESH::SMESH_IDSource_ptr theObj
 {
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false, SMDSAbs_Node );
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".ExtrusionSweepObject0D( "
                   << theObject << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
   }
@@ -2309,7 +2421,7 @@ void SMESH_MeshEditor_i::ExtrusionSweepObject1D(SMESH::SMESH_IDSource_ptr theObj
 {
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false, SMDSAbs_Edge );
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".ExtrusionSweepObject1D( "
                   << theObject << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
   }
@@ -2326,7 +2438,7 @@ void SMESH_MeshEditor_i::ExtrusionSweepObject2D(SMESH::SMESH_IDSource_ptr theObj
 {
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   extrusionSweep (anElementsId, theStepVector, theNbOfSteps, false, SMDSAbs_Face );
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".ExtrusionSweepObject2D( "
                   << theObject << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
   }
@@ -2346,7 +2458,7 @@ SMESH_MeshEditor_i::ExtrusionSweepMakeGroups(const SMESH::long_array& theIDsOfEl
 
   SMESH::ListOfGroups* aGroups = extrusionSweep(theIDsOfElements, theStepVector, theNbOfSteps, true);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepMakeGroups( " << theIDsOfElements
                 << ", " << theStepVector <<", " << TVar( theNbOfSteps ) << " )";
@@ -2368,7 +2480,7 @@ SMESH_MeshEditor_i::ExtrusionSweepMakeGroups0D(const SMESH::long_array& theIDsOf
 
   SMESH::ListOfGroups* aGroups = extrusionSweep(theIDsOfElements, theStepVector, theNbOfSteps, true,SMDSAbs_Node);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepMakeGroups0D( " << theIDsOfElements
                 << ", " << theStepVector <<", " << TVar( theNbOfSteps ) << " )";
@@ -2391,7 +2503,7 @@ SMESH_MeshEditor_i::ExtrusionSweepObjectMakeGroups(SMESH::SMESH_IDSource_ptr the
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector, theNbOfSteps, true);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepObjectMakeGroups( " << theObject
                 << ", " << theStepVector << ", " << theNbOfSteps << " )";
@@ -2414,7 +2526,7 @@ SMESH_MeshEditor_i::ExtrusionSweepObject0DMakeGroups(SMESH::SMESH_IDSource_ptr t
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
                                                  theNbOfSteps, true, SMDSAbs_Node);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepObject0DMakeGroups( " << theObject
                 << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
@@ -2437,7 +2549,7 @@ SMESH_MeshEditor_i::ExtrusionSweepObject1DMakeGroups(SMESH::SMESH_IDSource_ptr t
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
                                                  theNbOfSteps, true, SMDSAbs_Edge);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepObject1DMakeGroups( " << theObject
                 << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
@@ -2460,7 +2572,7 @@ SMESH_MeshEditor_i::ExtrusionSweepObject2DMakeGroups(SMESH::SMESH_IDSource_ptr t
   SMESH::long_array_var anElementsId = theObject->GetIDs();
   SMESH::ListOfGroups * aGroups = extrusionSweep(anElementsId, theStepVector,
                                                  theNbOfSteps, true, SMDSAbs_Face);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".ExtrusionSweepObject2DMakeGroups( " << theObject
                 << ", " << theStepVector << ", " << TVar( theNbOfSteps ) << " )";
@@ -2485,16 +2597,15 @@ SMESH_MeshEditor_i::advancedExtrusion(const SMESH::long_array & theIDsOfElements
   initData();
 
   TIDSortedElemSet elements;
-  arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+  arrayToSet(theIDsOfElements, getMeshDS(), elements);
 
   const SMESH::PointStruct * P = &theStepVector.PS;
   gp_Vec stepVec( P->x, P->y, P->z );
 
   TElemOfElemListMap aHystory;
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.ExtrusionSweep (elements, stepVec, theNbOfSteps, aHystory,
-                               theMakeGroups, theExtrFlags, theSewTolerance);
-  storeResult(myEditor);
+      getEditor().ExtrusionSweep (elements, stepVec, theNbOfSteps, aHystory,
+                                  theMakeGroups, theExtrFlags, theSewTolerance);
 
   return theMakeGroups ? getGroups(groupIds.get()) : 0;
 }
@@ -2510,7 +2621,7 @@ void SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfEle
                                            CORBA::Long               theExtrFlags,
                                            CORBA::Double             theSewTolerance)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << "stepVector = " << theStepVector;
     TPythonDump() << this << ".AdvancedExtrusion("
                   << theIDsOfElements
@@ -2538,7 +2649,7 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
                                                 CORBA::Long              theExtrFlags,
                                                 CORBA::Double            theSewTolerance)
 {
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << "stepVector = " << theStepVector;
   }
   TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
@@ -2550,7 +2661,7 @@ SMESH_MeshEditor_i::AdvancedExtrusionMakeGroups(const SMESH::long_array& theIDsO
                                                      theSewTolerance,
                                                      true);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".AdvancedExtrusionMakeGroups("
                 << theIDsOfElements
@@ -2627,7 +2738,7 @@ SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array &   theIDsOfEleme
   }
 
   TIDSortedElemSet elements;
-  arrayToSet(theIDsOfElements, GetMeshDS(), elements, theElementType);
+  arrayToSet(theIDsOfElements, getMeshDS(), elements, theElementType);
 
   list<double> angles;
   for (int i = 0; i < theAngles.length(); i++) {
@@ -2639,11 +2750,10 @@ SMESH_MeshEditor_i::extrusionAlongPath(const SMESH::long_array &   theIDsOfEleme
   int nbOldGroups = myMesh->NbGroup();
 
   ::SMESH_MeshEditor::Extrusion_Error error =
-      myEditor.ExtrusionAlongTrack( elements, aSubMesh, nodeStart,
+      getEditor().ExtrusionAlongTrack( elements, aSubMesh, nodeStart,
                                     theHasAngles, angles, false,
                                     theHasRefPoint, refPnt, theMakeGroups );
   myMesh->GetMeshDS()->Modified();
-  storeResult(myEditor);
   theError = convExtrError( error );
 
   if ( theMakeGroups ) {
@@ -2691,17 +2801,14 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array &  IDsOfElements
   }
 
   TIDSortedElemSet elements, copyElements;
-  arrayToSet(IDsOfElements, GetMeshDS(), elements, ElementType);
+  arrayToSet(IDsOfElements, getMeshDS(), elements, ElementType);
 
   TIDSortedElemSet* workElements = &elements;
-  TPreviewMesh      tmpMesh( SMDSAbs_Face );
-  SMESH_Mesh*       mesh = myMesh;
 
-  if ( myPreviewMode )
+  if ( myIsPreviewMode )
   {
     SMDSAbs_ElementType select = SMDSAbs_All, avoid = SMDSAbs_Volume;
-    tmpMesh.Copy( elements, copyElements, select, avoid );
-    mesh = &tmpMesh;
+    getPreviewMesh( SMDSAbs_Face )->Copy( elements, copyElements, select, avoid );
     workElements = & copyElements;
     MakeGroups = false;
   }
@@ -2717,9 +2824,9 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array &  IDsOfElements
       Error = SMESH::SMESH_MeshEditor::EXTR_BAD_STARTING_NODE;
       return EmptyGr;
     }
-    error = myEditor.ExtrusionAlongTrack( *workElements, &(aMeshImp->GetImpl()), aNodeStart,
-                                          HasAngles, angles, LinearVariation,
-                                          HasRefPoint, refPnt, MakeGroups );
+    error = getEditor().ExtrusionAlongTrack( *workElements, &(aMeshImp->GetImpl()), aNodeStart,
+                                             HasAngles, angles, LinearVariation,
+                                             HasRefPoint, refPnt, MakeGroups );
     myMesh->GetMeshDS()->Modified();
   }
   else if ( SMESH_subMesh_i* aSubMeshImp = SMESH::DownCast<SMESH_subMesh_i*>( Path ))
@@ -2735,9 +2842,9 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array &  IDsOfElements
     }
     SMESH_subMesh* aSubMesh =
       aMeshImp->GetImpl().GetSubMeshContaining(aSubMeshImp->GetId());
-    error = myEditor.ExtrusionAlongTrack( *workElements, aSubMesh, aNodeStart,
-                                          HasAngles, angles, LinearVariation,
-                                          HasRefPoint, refPnt, MakeGroups );
+    error = getEditor().ExtrusionAlongTrack( *workElements, aSubMesh, aNodeStart,
+                                             HasAngles, angles, LinearVariation,
+                                             HasRefPoint, refPnt, MakeGroups );
     myMesh->GetMeshDS()->Modified();
   }
   else if ( SMESH::DownCast<SMESH_Group_i*>( Path ))
@@ -2752,7 +2859,6 @@ SMESH_MeshEditor_i::extrusionAlongPathX(const SMESH::long_array &  IDsOfElements
     return EmptyGr;
   }
 
-  storeResult(myEditor);
   Error = convExtrError( error );
 
   if ( MakeGroups ) {
@@ -2781,7 +2887,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPath(const SMESH::long_array &   theIDsOfEleme
                                        const SMESH::PointStruct &  theRefPoint)
 {
   MESSAGE("ExtrusionAlongPath");
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << "error = " << this << ".ExtrusionAlongPath( "
                   << theIDsOfElements << ", "
                   << thePathMesh      << ", "
@@ -2823,7 +2929,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr   theObje
                                              CORBA::Boolean              theHasRefPoint,
                                              const SMESH::PointStruct &  theRefPoint)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject( "
                   << theObject        << ", "
                   << thePathMesh      << ", "
@@ -2866,7 +2972,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject1D(SMESH::SMESH_IDSource_ptr   theOb
                                                CORBA::Boolean              theHasRefPoint,
                                                const SMESH::PointStruct &  theRefPoint)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject1D( "
                   << theObject        << ", "
                   << thePathMesh      << ", "
@@ -2910,7 +3016,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject2D(SMESH::SMESH_IDSource_ptr   theOb
                                                CORBA::Boolean              theHasRefPoint,
                                                const SMESH::PointStruct &  theRefPoint)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject2D( "
                   << theObject        << ", "
                   << thePathMesh      << ", "
@@ -2968,7 +3074,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathMakeGroups(const SMESH::long_array&   theI
                                                        theRefPoint,
                                                        true,
                                                        Error);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << aGroups << ", error)";
@@ -3020,7 +3126,7 @@ ExtrusionAlongPathObjectMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
                                                       true,
                                                       Error);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << aGroups << ", error)";
@@ -3073,7 +3179,7 @@ ExtrusionAlongPathObject1DMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
                                                       Error,
                                                       SMDSAbs_Edge);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << aGroups << ", error)";
@@ -3126,7 +3232,7 @@ ExtrusionAlongPathObject2DMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
                                                       Error,
                                                       SMDSAbs_Face);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << aGroups << ", error)";
@@ -3182,7 +3288,7 @@ ExtrusionAlongPathObjX(SMESH::SMESH_IDSource_ptr  Object,
                                                       (SMDSAbs_ElementType)ElemType,
                                                       Error);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << *aGroups << ", error)";
@@ -3239,7 +3345,7 @@ ExtrusionAlongPathX(const SMESH::long_array&   IDsOfElements,
                                                       (SMDSAbs_ElementType)ElemType,
                                                       Error);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     bool isDumpGroups = aGroups && aGroups->length() > 0;
     if (isDumpGroups)
       aPythonDump << "(" << *aGroups << ", error)";
@@ -3371,31 +3477,26 @@ SMESH_MeshEditor_i::mirror(TIDSortedElemSet &                  theElements,
   }
 
   TIDSortedElemSet  copyElements;
-  TPreviewMesh      tmpMesh;
   TIDSortedElemSet* workElements = & theElements;
-  SMESH_Mesh*       mesh = myMesh;
 
-  if ( myPreviewMode )
+  if ( myIsPreviewMode )
   {
-    tmpMesh.Copy( theElements, copyElements);
+    TPreviewMesh * tmpMesh = getPreviewMesh();
+    tmpMesh->Copy( theElements, copyElements);
     if ( !theCopy && !theTargetMesh )
     {
       TIDSortedElemSet elemsAround, elemsAroundCopy;
-      getElementsAround( theElements, GetMeshDS(), elemsAround );
-      tmpMesh.Copy( elemsAround, elemsAroundCopy);
+      getElementsAround( theElements, getMeshDS(), elemsAround );
+      tmpMesh->Copy( elemsAround, elemsAroundCopy);
     }
-    mesh = &tmpMesh;
     workElements = & copyElements;
     theMakeGroups = false;
   }
 
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
-
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor); // store preview data or new elements
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if ( !myPreviewMode )
+  if ( theCopy && !myIsPreviewMode)
   {
     if ( theTargetMesh )
     {
@@ -3420,7 +3521,7 @@ void SMESH_MeshEditor_i::Mirror(const SMESH::long_array &           theIDsOfElem
                                 SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
                                 CORBA::Boolean                      theCopy)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".Mirror( "
                   << theIDsOfElements              << ", "
                   << theAxis                       << ", "
@@ -3430,7 +3531,7 @@ void SMESH_MeshEditor_i::Mirror(const SMESH::long_array &           theIDsOfElem
   if ( theIDsOfElements.length() > 0 )
   {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     mirror(elements, theAxis, theMirrorType, theCopy, false);
   }
 }
@@ -3446,7 +3547,7 @@ void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr           theObj
                                       SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
                                       CORBA::Boolean                      theCopy)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".MirrorObject( "
                   << theObject                     << ", "
                   << theAxis                       << ", "
@@ -3455,9 +3556,9 @@ void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr           theObj
   }
   TIDSortedElemSet elements;
 
-  bool emptyIfIsMesh = myPreviewMode ? false : true;
+  bool emptyIfIsMesh = myIsPreviewMode ? false : true;
 
-  if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
+  if (idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
     mirror(elements, theAxis, theMirrorType, theCopy, false);
 }
 
@@ -3477,10 +3578,10 @@ SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array&            theIDsO
   if ( theIDsOfElements.length() > 0 )
   {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     aGroups = mirror(elements, theMirror, theMirrorType, true, true);
   }
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".MirrorMakeGroups( "
                 << theIDsOfElements              << ", "
@@ -3504,10 +3605,10 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr           t
 
   SMESH::ListOfGroups * aGroups = 0;
   TIDSortedElemSet elements;
-  if ( idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+  if ( idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     aGroups = mirror(elements, theMirror, theMirrorType, true, true);
 
-  if (!myPreviewMode)
+  if (!myIsPreviewMode)
   {
     DumpGroupsList(aPythonDump,aGroups);
     aPythonDump << this << ".MirrorObjectMakeGroups( "
@@ -3542,13 +3643,13 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array&            theIDsOfE
     if (mesh_i && theIDsOfElements.length() > 0 )
     {
       TIDSortedElemSet elements;
-      arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+      arrayToSet(theIDsOfElements, getMeshDS(), elements);
       mirror(elements, theMirror, theMirrorType,
              false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
 
-    if (!myPreviewMode) {
+    if (!myIsPreviewMode) {
       pydump << mesh << " = " << this << ".MirrorMakeMesh( "
              << theIDsOfElements              << ", "
              << theMirror                     << ", "
@@ -3559,7 +3660,7 @@ SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array&            theIDsOfE
   }
 
   //dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -3588,13 +3689,13 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr           the
     mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
     TIDSortedElemSet elements;
     if ( mesh_i &&
-         idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+         idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     {
       mirror(elements, theMirror, theMirrorType,
              false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
-    if (!myPreviewMode) {
+    if (!myIsPreviewMode) {
       pydump << mesh << " = " << this << ".MirrorObjectMakeMesh( "
              << theObject                     << ", "
              << theMirror                     << ", "
@@ -3605,7 +3706,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeMesh(SMESH::SMESH_IDSource_ptr           the
   }
 
   //dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -3634,30 +3735,25 @@ SMESH_MeshEditor_i::translate(TIDSortedElemSet        & theElements,
 
   TIDSortedElemSet  copyElements;
   TIDSortedElemSet* workElements = &theElements;
-  TPreviewMesh      tmpMesh;
-  SMESH_Mesh*       mesh = myMesh;
 
-  if ( myPreviewMode )
+  if ( myIsPreviewMode )
   {
-    tmpMesh.Copy( theElements, copyElements);
+    TPreviewMesh * tmpMesh = getPreviewMesh();
+    tmpMesh->Copy( theElements, copyElements);
     if ( !theCopy && !theTargetMesh )
     {
       TIDSortedElemSet elemsAround, elemsAroundCopy;
-      getElementsAround( theElements, GetMeshDS(), elemsAround );
-      tmpMesh.Copy( elemsAround, elemsAroundCopy);
+      getElementsAround( theElements, getMeshDS(), elemsAround );
+      tmpMesh->Copy( elemsAround, elemsAroundCopy);
     }
-    mesh = &tmpMesh;
     workElements = & copyElements;
     theMakeGroups = false;
   }
 
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor);
-
-  if ( !myPreviewMode )
+  if ( theCopy && !myIsPreviewMode )
   {
     if ( theTargetMesh )
     {
@@ -3682,7 +3778,7 @@ void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements,
                                    const SMESH::DirStruct &  theVector,
                                    CORBA::Boolean            theCopy)
 {
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".Translate( "
                   << theIDsOfElements << ", "
                   << theVector        << ", "
@@ -3690,7 +3786,7 @@ void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements,
   }
   if (theIDsOfElements.length()) {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     translate(elements, theVector, theCopy, false);
   }
 }
@@ -3704,7 +3800,7 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
                                          const SMESH::DirStruct &  theVector,
                                          CORBA::Boolean            theCopy)
 {
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".TranslateObject( "
                   << theObject << ", "
                   << theVector << ", "
@@ -3712,9 +3808,9 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
   }
   TIDSortedElemSet elements;
 
-  bool emptyIfIsMesh = myPreviewMode ? false : true;
+  bool emptyIfIsMesh = myIsPreviewMode ? false : true;
   
-  if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
+  if (idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
     translate(elements, theVector, theCopy, false);
 }
 
@@ -3732,10 +3828,10 @@ SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElement
   SMESH::ListOfGroups * aGroups = 0;
   if (theIDsOfElements.length()) {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     aGroups = translate(elements,theVector,true,true);
   }
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".TranslateMakeGroups( "
                 << theIDsOfElements << ", "
@@ -3757,10 +3853,10 @@ SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObjec
 
   SMESH::ListOfGroups * aGroups = 0;
   TIDSortedElemSet elements;
-  if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+  if (idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     aGroups = translate(elements, theVector, true, true);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".TranslateObjectMakeGroups( "
                 << theObject << ", "
@@ -3794,12 +3890,12 @@ SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements,
     if ( mesh_i && theIDsOfElements.length() )
     {
       TIDSortedElemSet elements;
-      arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+      arrayToSet(theIDsOfElements, getMeshDS(), elements);
       translate(elements, theVector, false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
 
-    if ( !myPreviewMode ) {
+    if ( !myIsPreviewMode ) {
       pydump << mesh << " = " << this << ".TranslateMakeMesh( "
              << theIDsOfElements << ", "
              << theVector        << ", "
@@ -3809,7 +3905,7 @@ SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements,
   }
 
   //dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -3837,12 +3933,12 @@ SMESH_MeshEditor_i::TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
 
     TIDSortedElemSet elements;
     if ( mesh_i &&
-      idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+      idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     {
       translate(elements, theVector,false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
-    if ( !myPreviewMode ) {
+    if ( !myIsPreviewMode ) {
       pydump << mesh << " = " << this << ".TranslateObjectMakeMesh( "
              << theObject     << ", "
              << theVector     << ", "
@@ -3852,7 +3948,7 @@ SMESH_MeshEditor_i::TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
   }
 
   // dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -3884,29 +3980,23 @@ SMESH_MeshEditor_i::rotate(TIDSortedElemSet &        theElements,
 
   TIDSortedElemSet  copyElements;
   TIDSortedElemSet* workElements = &theElements;
-  TPreviewMesh      tmpMesh;
-  SMESH_Mesh*       mesh = myMesh;
-
-  if ( myPreviewMode ) {
-    tmpMesh.Copy( theElements, copyElements );
+  if ( myIsPreviewMode ) {
+    TPreviewMesh * tmpMesh = getPreviewMesh();
+    tmpMesh->Copy( theElements, copyElements );
     if ( !theCopy && !theTargetMesh )
     {
       TIDSortedElemSet elemsAround, elemsAroundCopy;
-      getElementsAround( theElements, GetMeshDS(), elemsAround );
-      tmpMesh.Copy( elemsAround, elemsAroundCopy);
+      getElementsAround( theElements, getMeshDS(), elemsAround );
+      tmpMesh->Copy( elemsAround, elemsAroundCopy);
     }
-    mesh = &tmpMesh;
     workElements = &copyElements;
     theMakeGroups = false;
   }
 
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
-
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if ( !myPreviewMode )
+  if ( theCopy && !myIsPreviewMode)
   {
     if ( theTargetMesh )
     {
@@ -3932,7 +4022,7 @@ void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements,
                                 CORBA::Double             theAngle,
                                 CORBA::Boolean            theCopy)
 {
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     TPythonDump() << this << ".Rotate( "
                   << theIDsOfElements << ", "
                   << theAxis          << ", "
@@ -3942,7 +4032,7 @@ void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements,
   if (theIDsOfElements.length() > 0)
   {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     rotate(elements,theAxis,theAngle,theCopy,false);
   }
 }
@@ -3957,7 +4047,7 @@ void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject,
                                       CORBA::Double             theAngle,
                                       CORBA::Boolean            theCopy)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".RotateObject( "
                   << theObject        << ", "
                   << theAxis          << ", "
@@ -3965,8 +4055,8 @@ void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject,
                   << theCopy          << " )";
   }
   TIDSortedElemSet elements;
-  bool emptyIfIsMesh = myPreviewMode ? false : true;
-  if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
+  bool emptyIfIsMesh = myIsPreviewMode ? false : true;
+  if (idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
     rotate(elements,theAxis,theAngle,theCopy,false);
 }
 
@@ -3986,10 +4076,10 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
   if (theIDsOfElements.length() > 0)
   {
     TIDSortedElemSet elements;
-    arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+    arrayToSet(theIDsOfElements, getMeshDS(), elements);
     aGroups = rotate(elements,theAxis,theAngle,true,true);
   }
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotateMakeGroups( "
                 << theIDsOfElements << ", "
@@ -4013,10 +4103,10 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
 
   SMESH::ListOfGroups * aGroups = 0;
   TIDSortedElemSet elements;
-  if (idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+  if (idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     aGroups = rotate(elements, theAxis, theAngle, true, true);
 
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".RotateObjectMakeGroups( "
                 << theObject        << ", "
@@ -4052,12 +4142,12 @@ SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
     if ( mesh_i && theIDsOfElements.length() > 0 )
     {
       TIDSortedElemSet elements;
-      arrayToSet(theIDsOfElements, GetMeshDS(), elements);
+      arrayToSet(theIDsOfElements, getMeshDS(), elements);
       rotate(elements, theAxis, theAngleInRadians,
              false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
-    if ( !myPreviewMode ) {
+    if ( !myIsPreviewMode ) {
       pydump << mesh << " = " << this << ".RotateMakeMesh( "
              << theIDsOfElements          << ", "
              << theAxis                   << ", "
@@ -4068,7 +4158,7 @@ SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements,
   }
 
   // dump "GetGroups"
-  if (!myPreviewMode && mesh_i && theIDsOfElements.length() > 0 )
+  if (!myIsPreviewMode && mesh_i && theIDsOfElements.length() > 0 )
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -4098,13 +4188,13 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
 
     TIDSortedElemSet elements;
     if (mesh_i &&
-        idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
+        idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
     {
       rotate(elements, theAxis, theAngleInRadians,
              false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
-    if ( !myPreviewMode ) {
+    if ( !myIsPreviewMode ) {
       pydump << mesh << " = " << this << ".RotateObjectMakeMesh( "
              << theObject                 << ", "
              << theAxis                   << ", "
@@ -4115,7 +4205,7 @@ SMESH_MeshEditor_i::RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr theObject,
   }
 
   // dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -4144,8 +4234,8 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr  theObject,
     theCopy = false;
 
   TIDSortedElemSet elements;
-  bool emptyIfIsMesh = myPreviewMode ? false : true;
-  if ( !idSourceToSet(theObject, GetMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
+  bool emptyIfIsMesh = myIsPreviewMode ? false : true;
+  if ( !idSourceToSet(theObject, getMeshDS(), elements, SMDSAbs_All, emptyIfIsMesh))
     return 0;
 
   double S[3] = {
@@ -4160,31 +4250,25 @@ SMESH_MeshEditor_i::scale(SMESH::SMESH_IDSource_ptr  theObject,
                    0,    0,    S[2], thePoint.z * (1-S[2]),   tol, tol);
 
   TIDSortedElemSet  copyElements;
-  TPreviewMesh      tmpMesh;
   TIDSortedElemSet* workElements = &elements;
-  SMESH_Mesh*       mesh = myMesh;
-  
-  if ( myPreviewMode )
+  if ( myIsPreviewMode )
   {
-    tmpMesh.Copy( elements, copyElements);
+    TPreviewMesh * tmpMesh = getPreviewMesh();
+    tmpMesh->Copy( elements, copyElements);
     if ( !theCopy && !theTargetMesh )
     {
       TIDSortedElemSet elemsAround, elemsAroundCopy;
-      getElementsAround( elements, GetMeshDS(), elemsAround );
-      tmpMesh.Copy( elemsAround, elemsAroundCopy);
+      getElementsAround( elements, getMeshDS(), elemsAround );
+      tmpMesh->Copy( elemsAround, elemsAroundCopy);
     }
-    mesh = &tmpMesh;
     workElements = & copyElements;
     theMakeGroups = false;
   }
 
   ::SMESH_MeshEditor::PGroupIDs groupIds =
-      myEditor.Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
-
-  if(theCopy || myPreviewMode )
-    storeResult(myEditor);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if ( !myPreviewMode )
+  if ( theCopy && !myIsPreviewMode )
   {
     if ( theTargetMesh )
     {
@@ -4210,7 +4294,7 @@ void SMESH_MeshEditor_i::Scale(SMESH::SMESH_IDSource_ptr  theObject,
                                const SMESH::double_array& theScaleFact,
                                CORBA::Boolean             theCopy)
 {
-  if ( !myPreviewMode ) {
+  if ( !myIsPreviewMode ) {
     TPythonDump() << this << ".Scale( "
                   << theObject            << ", "
                   << thePoint             << ", "
@@ -4234,7 +4318,7 @@ SMESH_MeshEditor_i::ScaleMakeGroups(SMESH::SMESH_IDSource_ptr  theObject,
   TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
 
   SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
-  if (!myPreviewMode) {
+  if (!myIsPreviewMode) {
     DumpGroupsList(aPythonDump, aGroups);
     aPythonDump << this << ".Scale("
                 << theObject            << ","
@@ -4271,7 +4355,7 @@ SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr  theObject,
       scale(theObject, thePoint, theScaleFact,false, theCopyGroups, & mesh_i->GetImpl());
       mesh_i->CreateGroupServants();
     }
-    if ( !myPreviewMode )
+    if ( !myIsPreviewMode )
       pydump << mesh << " = " << this << ".ScaleMakeMesh( "
              << theObject            << ", "
              << thePoint             << ", "
@@ -4281,7 +4365,7 @@ SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr  theObject,
   }
 
   // dump "GetGroups"
-  if (!myPreviewMode && mesh_i)
+  if (!myIsPreviewMode && mesh_i)
     mesh_i->GetGroups();
 
   return mesh._retn();
@@ -4300,7 +4384,7 @@ void SMESH_MeshEditor_i::FindCoincidentNodes (CORBA::Double                  Tol
 
   ::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
   TIDSortedNodeSet nodes; // no input nodes
-  myEditor.FindCoincidentNodes( nodes, Tolerance, aListOfListOfNodes );
+  getEditor().FindCoincidentNodes( nodes, Tolerance, aListOfListOfNodes );
 
   GroupsOfNodes = new SMESH::array_of_long_array;
   GroupsOfNodes->length( aListOfListOfNodes.size() );
@@ -4328,11 +4412,11 @@ void SMESH_MeshEditor_i::FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr
   initData();
 
   TIDSortedNodeSet nodes;
-  idSourceToNodeSet( theObject, GetMeshDS(), nodes );
+  idSourceToNodeSet( theObject, getMeshDS(), nodes );
 
   ::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
   if(!nodes.empty())
-    myEditor.FindCoincidentNodes( nodes, Tolerance, aListOfListOfNodes );
+    getEditor().FindCoincidentNodes( nodes, Tolerance, aListOfListOfNodes );
 
   GroupsOfNodes = new SMESH::array_of_long_array;
   GroupsOfNodes->length( aListOfListOfNodes.size() );
@@ -4367,19 +4451,19 @@ FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr      theObject,
   initData();
 
   TIDSortedNodeSet nodes;
-  idSourceToNodeSet( theObject, GetMeshDS(), nodes );
+  idSourceToNodeSet( theObject, getMeshDS(), nodes );
 
   for ( int i = 0; i < theExceptSubMeshOrGroups.length(); ++i )
   {
     TIDSortedNodeSet exceptNodes;
-    idSourceToNodeSet( theExceptSubMeshOrGroups[i], GetMeshDS(), exceptNodes );
+    idSourceToNodeSet( theExceptSubMeshOrGroups[i], getMeshDS(), exceptNodes );
     TIDSortedNodeSet::iterator avoidNode = exceptNodes.begin();
     for ( ; avoidNode != exceptNodes.end(); ++avoidNode)
       nodes.erase( *avoidNode );
   }
   ::SMESH_MeshEditor::TListOfListOfNodes aListOfListOfNodes;
   if(!nodes.empty())
-    myEditor.FindCoincidentNodes( nodes, theTolerance, aListOfListOfNodes );
+    getEditor().FindCoincidentNodes( nodes, theTolerance, aListOfListOfNodes );
 
   theGroupsOfNodes = new SMESH::array_of_long_array;
   theGroupsOfNodes->length( aListOfListOfNodes.size() );
@@ -4408,7 +4492,7 @@ void SMESH_MeshEditor_i::MergeNodes (const SMESH::array_of_long_array& GroupsOfN
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   TPythonDump aTPythonDump;
   aTPythonDump << this << ".MergeNodes([";
@@ -4431,7 +4515,7 @@ void SMESH_MeshEditor_i::MergeNodes (const SMESH::array_of_long_array& GroupsOfN
     if ( i > 0 ) aTPythonDump << ", ";
     aTPythonDump << aNodeGroup;
   }
-  myEditor.MergeNodes( aListOfListOfNodes );
+  getEditor().MergeNodes( aListOfListOfNodes );
 
   aTPythonDump <<  "])";
   myMesh->GetMeshDS()->Modified();
@@ -4451,10 +4535,10 @@ void SMESH_MeshEditor_i::FindEqualElements(SMESH::SMESH_IDSource_ptr      theObj
   if ( !(!group->_is_nil() && group->GetType() == SMESH::NODE) )
   {
     TIDSortedElemSet elems;
-    idSourceToSet( theObject, GetMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true);
+    idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true);
 
     ::SMESH_MeshEditor::TListOfListOfElementsID aListOfListOfElementsID;
-    myEditor.FindEqualElements( elems, aListOfListOfElementsID );
+    getEditor().FindEqualElements( elems, aListOfListOfElementsID );
 
     GroupsOfElementsID = new SMESH::array_of_long_array;
     GroupsOfElementsID->length( aListOfListOfElementsID.size() );
@@ -4504,7 +4588,7 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& GroupsO
     aTPythonDump << anElemsIDGroup;
   }
 
-  myEditor.MergeElements(aListOfListOfElementsID);
+  getEditor().MergeElements(aListOfListOfElementsID);
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
 
@@ -4520,7 +4604,7 @@ void SMESH_MeshEditor_i::MergeEqualElements()
 {
   initData();
 
-  myEditor.MergeEqualElements();
+  getEditor().MergeEqualElements();
 
   myMesh->GetMeshDS()->Modified();
 
@@ -4540,17 +4624,17 @@ CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long   NodeID,
 {
   initData(/*deleteSearchers=*/false);
 
-  const SMDS_MeshNode * node = GetMeshDS()->FindNode( NodeID );
+  const SMDS_MeshNode * node = getMeshDS()->FindNode( NodeID );
   if ( !node )
     return false;
 
   if ( theNodeSearcher )
     theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
 
-  if ( myPreviewMode ) // make preview data
+  if ( myIsPreviewMode ) // make preview data
   {
     // in a preview mesh, make edges linked to a node
-    TPreviewMesh tmpMesh;
+    TPreviewMesh& tmpMesh = *getPreviewMesh();
     TIDSortedElemSet linkedNodes;
     ::SMESH_MeshEditor::GetLinkedNodes( node, linkedNodes );
     TIDSortedElemSet::iterator nIt = linkedNodes.begin();
@@ -4564,14 +4648,13 @@ CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long   NodeID,
     if ( nodeCpy1 )
       tmpMesh.GetMeshDS()->MoveNode(nodeCpy1, x, y, z);
     // fill preview data
-    storeResult( myEditor );
   }
   else if ( theNodeSearcher ) // move node and update theNodeSearcher data accordingly
     theNodeSearcher->MoveNode(node, gp_Pnt( x,y,z ));
   else
-    GetMeshDS()->MoveNode(node, x, y, z);
+    getMeshDS()->MoveNode(node, x, y, z);
 
-  if ( !myPreviewMode )
+  if ( !myIsPreviewMode )
   {
     // Update Python script
     TPythonDump() << "isDone = " << this << ".MoveNode( "
@@ -4626,7 +4709,7 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
   theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
 
   int nodeID = theNodeID;
-  const SMDS_MeshNode* node = GetMeshDS()->FindNode( nodeID );
+  const SMDS_MeshNode* node = getMeshDS()->FindNode( nodeID );
   if ( !node ) // preview moving node
   {
     if ( !theNodeSearcher ) {
@@ -4637,10 +4720,10 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
   }
   if ( node ) {
     nodeID = node->GetID();
-    if ( myPreviewMode ) // make preview data
+    if ( myIsPreviewMode ) // make preview data
     {
       // in a preview mesh, make edges linked to a node
-      TPreviewMesh tmpMesh;
+      TPreviewMesh tmpMesh = *getPreviewMesh();
       TIDSortedElemSet linkedNodes;
       ::SMESH_MeshEditor::GetLinkedNodes( node, linkedNodes );
       TIDSortedElemSet::iterator nIt = linkedNodes.begin();
@@ -4654,7 +4737,6 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
       if ( node )
         tmpMesh.GetMeshDS()->MoveNode(node, x, y, z);
       // fill preview data
-      storeResult( myEditor );
     }
     else if ( theNodeSearcher ) // move node and update theNodeSearcher data accordingly
     {
@@ -4662,11 +4744,11 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
     }
     else
     {
-      GetMeshDS()->MoveNode(node, x, y, z);
+      getMeshDS()->MoveNode(node, x, y, z);
     }
   }
 
-  if ( !myPreviewMode )
+  if ( !myIsPreviewMode )
   {
     TPythonDump() << "nodeID = " << this
                   << ".MoveClosestNodeToPoint( "<< x << ", " << y << ", " << z
@@ -4706,7 +4788,7 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double      x,
   for ( int i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
-  if ( !myPreviewMode ) // call from tui
+  if ( !myIsPreviewMode ) // call from tui
     TPythonDump() << "res = " << this << ".FindElementsByPoint( "
                   << x << ", "
                   << y << ", "
@@ -4769,7 +4851,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
   for ( int i = 0; i < foundElems.size(); ++i )
     res[i] = foundElems[i]->GetID();
 
-  if ( !myPreviewMode ) // call from tui
+  if ( !myIsPreviewMode ) // call from tui
     TPythonDump() << "res = " << this << ".FindAmongElementsByPoint( "
                   << elementIDs << ", "
                   << x << ", "
@@ -4838,7 +4920,7 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   const SMDS_MeshNode* aBorderFirstNode  = aMesh->FindNode( FirstNodeID1  );
   const SMDS_MeshNode* aBorderSecondNode = aMesh->FindNode( SecondNodeID1 );
@@ -4867,7 +4949,7 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
                 << CreatePolyedrs<< " )";
 
   SMESH::SMESH_MeshEditor::Sew_Error error =
-    convError( myEditor.SewFreeBorder (aBorderFirstNode,
+    convError( getEditor().SewFreeBorder (aBorderFirstNode,
                                        aBorderSecondNode,
                                        aBorderLastNode,
                                        aSide2FirstNode,
@@ -4877,7 +4959,6 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
                                        CreatePolygons,
                                        CreatePolyedrs) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -4900,7 +4981,7 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   const SMDS_MeshNode* aBorderFirstNode  = aMesh->FindNode( FirstNodeID1  );
   const SMDS_MeshNode* aBorderSecondNode = aMesh->FindNode( SecondNodeID1 );
@@ -4925,7 +5006,7 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
                 << SecondNodeID2 << " )";
 
   SMESH::SMESH_MeshEditor::Sew_Error error =
-    convError( myEditor.SewFreeBorder (aBorderFirstNode,
+    convError( getEditor().SewFreeBorder (aBorderFirstNode,
                                        aBorderSecondNode,
                                        aBorderLastNode,
                                        aSide2FirstNode,
@@ -4934,7 +5015,6 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
                                        true,
                                        false, false) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -4959,7 +5039,7 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   const SMDS_MeshNode* aBorderFirstNode  = aMesh->FindNode( FirstNodeIDOnFreeBorder  );
   const SMDS_MeshNode* aBorderSecondNode = aMesh->FindNode( SecondNodeIDOnFreeBorder );
@@ -4986,7 +5066,7 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
                 << CreatePolyedrs           << ") ";
 
   SMESH::SMESH_MeshEditor::Sew_Error error =
-    convError( myEditor.SewFreeBorder (aBorderFirstNode,
+    convError( getEditor().SewFreeBorder (aBorderFirstNode,
                                        aBorderSecondNode,
                                        aBorderLastNode,
                                        aSide2FirstNode,
@@ -4996,7 +5076,6 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
                                        CreatePolygons,
                                        CreatePolyedrs) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -5020,7 +5099,7 @@ SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
 {
   initData();
 
-  SMESHDS_Mesh* aMesh = GetMeshDS();
+  SMESHDS_Mesh* aMesh = getMeshDS();
 
   const SMDS_MeshNode* aFirstNode1ToMerge  = aMesh->FindNode( NodeID1OfSide1ToMerge );
   const SMDS_MeshNode* aFirstNode2ToMerge  = aMesh->FindNode( NodeID1OfSide2ToMerge );
@@ -5047,13 +5126,12 @@ SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
                 << NodeID2OfSide2ToMerge << ")";
 
   SMESH::SMESH_MeshEditor::Sew_Error error =
-    convError( myEditor.SewSideElements (aSide1Elems, aSide2Elems,
+    convError( getEditor().SewSideElements (aSide1Elems, aSide2Elems,
                                          aFirstNode1ToMerge,
                                          aFirstNode2ToMerge,
                                          aSecondNode1ToMerge,
                                          aSecondNode2ToMerge));
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -5075,7 +5153,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
 {
   initData();
 
-  const SMDS_MeshElement* elem = GetMeshDS()->FindElement(ide);
+  const SMDS_MeshElement* elem = getMeshDS()->FindElement(ide);
   if(!elem) return false;
 
   int nbn = newIDs.length();
@@ -5083,7 +5161,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
   vector<const SMDS_MeshNode*> aNodes(nbn);
   int nbn1=-1;
   for(; i<nbn; i++) {
-    const SMDS_MeshNode* aNode = GetMeshDS()->FindNode(newIDs[i]);
+    const SMDS_MeshNode* aNode = getMeshDS()->FindNode(newIDs[i]);
     if(aNode) {
       nbn1++;
       aNodes[nbn1] = aNode;
@@ -5093,7 +5171,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
                 << ide << ", " << newIDs << " )";
 
   MESSAGE("ChangeElementNodes");
-  bool res = GetMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
+  bool res = getMeshDS()->ChangeElementNodes( elem, & aNodes[0], nbn1+1 );
 
   myMesh->GetMeshDS()->Modified();
   if ( res )
@@ -5109,7 +5187,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
 
 void SMESH_MeshEditor_i::ConvertToQuadratic(CORBA::Boolean theForce3d)
 {
-  myEditor.ConvertToQuadratic(theForce3d);
+  getEditor().ConvertToQuadratic(theForce3d);
   TPythonDump() << this << ".ConvertToQuadratic( " << theForce3d << " )";
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -5122,7 +5200,7 @@ void SMESH_MeshEditor_i::ConvertToQuadratic(CORBA::Boolean theForce3d)
 
 CORBA::Boolean SMESH_MeshEditor_i::ConvertFromQuadratic()
 {
-  CORBA::Boolean isDone = myEditor.ConvertFromQuadratic();
+  CORBA::Boolean isDone = getEditor().ConvertFromQuadratic();
   TPythonDump() << this << ".ConvertFromQuadratic()";
   myMesh->GetMeshDS()->Modified();
   if ( isDone )
@@ -5142,7 +5220,7 @@ void SMESH_MeshEditor_i::ConvertToQuadraticObject(CORBA::Boolean            theF
   Unexpect aCatch(SALOME_SalomeException);
   TPythonDump pyDump;
   TIDSortedElemSet elems;
-  if ( idSourceToSet( theObject, GetMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
+  if ( idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
   {
     if ( elems.empty() )
     {
@@ -5154,7 +5232,7 @@ void SMESH_MeshEditor_i::ConvertToQuadraticObject(CORBA::Boolean            theF
     }
     else
     {
-      myEditor.ConvertToQuadratic(theForce3d, elems);
+      getEditor().ConvertToQuadratic(theForce3d, elems);
     }
   }
   myMesh->GetMeshDS()->Modified();
@@ -5175,7 +5253,7 @@ void SMESH_MeshEditor_i::ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr th
   Unexpect aCatch(SALOME_SalomeException);
   TPythonDump pyDump;
   TIDSortedElemSet elems;
-  if ( idSourceToSet( theObject, GetMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
+  if ( idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
   {
     if ( elems.empty() )
     {
@@ -5187,7 +5265,7 @@ void SMESH_MeshEditor_i::ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr th
     }
     else
     {
-      myEditor.ConvertFromQuadratic(elems);
+      getEditor().ConvertFromQuadratic(elems);
     }
   }
   myMesh->GetMeshDS()->Modified();
@@ -5244,24 +5322,16 @@ string SMESH_MeshEditor_i::generateGroupName(const string& thePrefix)
     if (CORBA::is_nil(aGroup))
       continue;
 
-    groupNames.insert(aGroup->GetName());
+    CORBA::String_var name = aGroup->GetName();
+    groupNames.insert( name.in() );
   }
 
   // Find new name
   string name = thePrefix;
   int index = 0;
 
-  while (!groupNames.insert(name).second) {
-    if (index == 0) {
-      name += "_1";
-    }
-    else {
-      TCollection_AsciiString nbStr(index+1);
-      name.resize( name.rfind('_')+1 );
-      name += nbStr.ToCString();
-    }
-    ++index;
-  }
+  while (!groupNames.insert(name).second)
+    name = SMESH_Comment( thePrefix ) << "_" << index;
 
   return name;
 }
@@ -5292,10 +5362,9 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNode
   for ( i = 0, n = theModifiedElems.length(); i < n; i++ )
     aListOfElems.push_back( theModifiedElems[ i ] );
 
-  bool aResult = myEditor.DoubleNodes( aListOfNodes, aListOfElems );
+  bool aResult = getEditor().DoubleNodes( aListOfNodes, aListOfElems );
 
   myMesh->GetMeshDS()->Modified();
-  storeResult( myEditor) ;
   if ( aResult )
     myMesh->SetIsModified( true );
 
@@ -5459,9 +5528,8 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(const SMESH::ListOfGroups& t
     }
   }
 
-  bool aResult = myEditor.DoubleNodes( aNodes, anElems );
+  bool aResult = getEditor().DoubleNodes( aNodes, anElems );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5535,15 +5603,14 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theE
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   arrayToSet(theElems, aMeshDS, anElems, SMDSAbs_All);
   arrayToSet(theNodesNot, aMeshDS, aNodes, SMDSAbs_Node);
   arrayToSet(theAffectedElems, aMeshDS, anAffected, SMDSAbs_All);
 
-  bool aResult = myEditor.DoubleNodes( anElems, aNodes, anAffected );
+  bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5577,15 +5644,14 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_ar
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes;
   arrayToSet(theElems, aMeshDS, anElems, SMDSAbs_All);
   arrayToSet(theNodesNot, aMeshDS, aNodes, SMDSAbs_Node);
 
   TopoDS_Shape aShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theShape );
-  bool aResult = myEditor.DoubleNodesInRegion( anElems, aNodes, aShape );
+  bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5619,15 +5685,14 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroup(SMESH::SMESH_GroupBase_pt
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
   idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
   idSourceToSet( theAffectedElems, aMeshDS, anAffected, SMDSAbs_All );
 
-  bool aResult = myEditor.DoubleNodes( anElems, aNodes, anAffected );
+  bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5687,16 +5752,15 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
   idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
   idSourceToSet( theAffectedElems, aMeshDS, anAffected, SMDSAbs_All );
 
 
-  bool aResult = myEditor.DoubleNodes( anElems, aNodes, anAffected );
+  bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
 
-  storeResult( myEditor) ;
   myMesh->GetMeshDS()->Modified();
 
   TPythonDump pyDump;
@@ -5708,14 +5772,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
     // Create group with newly created elements
     CORBA::String_var elemGroupName = theElems->GetName();
     string aNewName = generateGroupName( string(elemGroupName.in()) + "_double");
-    if ( !myEditor.GetLastCreatedElems().IsEmpty() && theElemGroupNeeded )
+    if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded )
     {
       SMESH::long_array_var anIds = GetLastCreatedElems();
       SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
       aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
       aNewElemGroup->Add(anIds);
     }
-    if ( !myEditor.GetLastCreatedNodes().IsEmpty() && theNodeGroupNeeded )
+    if ( !getEditor().GetLastCreatedNodes().IsEmpty() && theNodeGroupNeeded )
     {
       SMESH::long_array_var anIds = GetLastCreatedNodes();
       aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
@@ -5766,15 +5830,14 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupInRegion(SMESH::SMESH_Grou
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   idSourceToSet( theElems, aMeshDS, anElems, SMDSAbs_All );
   idSourceToSet( theNodesNot, aMeshDS, aNodes, SMDSAbs_Node );
 
   TopoDS_Shape aShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theShape );
-  bool aResult = myEditor.DoubleNodesInRegion( anElems, aNodes, aShape );
+  bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5823,15 +5886,14 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(const SMESH::ListOfGroup
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   listOfGroupToSet(theElems, aMeshDS, anElems, false );
   listOfGroupToSet(theNodesNot, aMeshDS, aNodes, true );
   listOfGroupToSet(theAffectedElems, aMeshDS, anAffected, false );
 
-  bool aResult = myEditor.DoubleNodes( anElems, aNodes, anAffected );
+  bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -5891,15 +5953,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes, anAffected;
   listOfGroupToSet(theElems, aMeshDS, anElems, false );
   listOfGroupToSet(theNodesNot, aMeshDS, aNodes, true );
   listOfGroupToSet(theAffectedElems, aMeshDS, anAffected, false );
 
-  bool aResult = myEditor.DoubleNodes( anElems, aNodes, anAffected );
+  bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   TPythonDump pyDump;
@@ -5910,14 +5971,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems
     // Create group with newly created elements
     CORBA::String_var elemGroupName = theElems[0]->GetName();
     string aNewName = generateGroupName( string(elemGroupName.in()) + "_double");
-    if ( !myEditor.GetLastCreatedElems().IsEmpty() && theElemGroupNeeded )
+    if ( !getEditor().GetLastCreatedElems().IsEmpty() && theElemGroupNeeded )
     {
       SMESH::long_array_var anIds = GetLastCreatedElems();
       SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
       aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
       aNewElemGroup->Add(anIds);
     }
-    if ( !myEditor.GetLastCreatedNodes().IsEmpty() && theNodeGroupNeeded )
+    if ( !getEditor().GetLastCreatedNodes().IsEmpty() && theNodeGroupNeeded )
     {
       SMESH::long_array_var anIds = GetLastCreatedNodes();
       aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
@@ -5966,15 +6027,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(const SMESH::ListOfGroups& theE
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes;
   listOfGroupToSet(theElems, aMeshDS, anElems,false );
   listOfGroupToSet(theNodesNot, aMeshDS, aNodes, true );
 
   TopoDS_Shape aShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theShape );
-  bool aResult = myEditor.DoubleNodesInRegion( anElems, aNodes, aShape );
+  bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
 
-  storeResult( myEditor) ;
 
   myMesh->GetMeshDS()->Modified();
   if ( aResult )
@@ -6017,7 +6077,7 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl
 
   ::SMESH_MeshEditor aMeshEditor(myMesh);
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
   TIDSortedElemSet anElems, aNodes;
   listOfGroupToSet(theElems, aMeshDS, anElems, false);
   listOfGroupToSet(theNodesNot, aMeshDS, aNodes, true);
@@ -6026,7 +6086,6 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl
   TIDSortedElemSet anAffected;
   bool aResult = aMeshEditor.AffectedElemGroupsInRegion(anElems, aNodes, aShape, anAffected);
 
-  storeResult(aMeshEditor);
 
   myMesh->GetMeshDS()->Modified();
   TPythonDump pyDump;
@@ -6116,8 +6175,7 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D()
 {
   initData();
 
-  bool aResult = myEditor.Make2DMeshFrom3D();
-  storeResult( myEditor) ;
+  bool aResult = getEditor().Make2DMeshFrom3D();
   myMesh->GetMeshDS()->Modified();
   TPythonDump() << "isDone = " << this << ".Make2DMeshFrom3D()";
   return aResult;
@@ -6144,7 +6202,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::Li
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
 
   vector<TIDSortedElemSet> domains;
   domains.clear();
@@ -6164,10 +6222,9 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::Li
     }
   }
 
-  bool aResult = myEditor.DoubleNodesOnGroupBoundaries( domains, createJointElems );
+  bool aResult = getEditor().DoubleNodesOnGroupBoundaries( domains, createJointElems );
   // TODO publish the groups of flat elements in study
 
-  storeResult( myEditor) ;
   myMesh->GetMeshDS()->Modified();
 
   // Update Python script
@@ -6193,7 +6250,7 @@ CORBA::Boolean SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups( const SMESH:
   initData();
 
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
 
   vector<TIDSortedElemSet> faceGroups;
   faceGroups.clear();
@@ -6211,10 +6268,9 @@ CORBA::Boolean SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups( const SMESH:
     }
   }
 
-  bool aResult = myEditor.CreateFlatElementsOnFacesGroups( faceGroups );
+  bool aResult = getEditor().CreateFlatElementsOnFacesGroups( faceGroups );
   // TODO publish the groups of flat elements in study
 
-  storeResult( myEditor) ;
   myMesh->GetMeshDS()->Modified();
 
   // Update Python script
@@ -6300,7 +6356,7 @@ SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr idSource,
   if ( dim > SMESH::BND_1DFROM2D )
     THROW_SALOME_CORBA_EXCEPTION("Invalid boundary dimension", SALOME::BAD_PARAM);
 
-  SMESHDS_Mesh* aMeshDS = GetMeshDS();
+  SMESHDS_Mesh* aMeshDS = getMeshDS();
 
   SMESH::SMESH_Mesh_var mesh_var;
   SMESH::SMESH_Group_var group_var;
@@ -6328,13 +6384,12 @@ SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr idSource,
     }
 
     // do it
-    myEditor.MakeBoundaryMesh( elements,
+    getEditor().MakeBoundaryMesh( elements,
                                   ::SMESH_MeshEditor::Bnd_Dimension(dim),
                                   smesh_group,
                                   smesh_mesh,
                                   toCopyElements,
                                   toCopyExistingBondary);
-    storeResult( myEditor );
 
     if ( smesh_mesh )
       smesh_mesh->GetMeshDS()->Modified();
@@ -6472,7 +6527,7 @@ CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
       {
         SMESH::Bnd_Dimension bdim = 
           ( elemType == SMDSAbs_Volume ) ? SMESH::BND_2DFROM3D : SMESH::BND_1DFROM2D;
-        nbAdded += myEditor.MakeBoundaryMesh( elements,
+        nbAdded += getEditor().MakeBoundaryMesh( elements,
                                                  ::SMESH_MeshEditor::Bnd_Dimension(bdim),
                                                  smesh_group,
                                                  tgtMesh,
@@ -6480,20 +6535,18 @@ CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
                                                  /*toCopyExistingBondary=*/srcMesh != tgtMesh,
                                                  /*toAddExistingBondary=*/true,
                                                  /*aroundElements=*/true);
-        storeResult( myEditor );
       }
     }
   }
   else
   {
-    nbAdded += myEditor.MakeBoundaryMesh( elements,
+    nbAdded += getEditor().MakeBoundaryMesh( elements,
                                              ::SMESH_MeshEditor::Bnd_Dimension(dim),
                                              smesh_group,
                                              tgtMesh,
                                              /*toCopyElements=*/false,
                                              /*toCopyExistingBondary=*/srcMesh != tgtMesh,
                                              /*toAddExistingBondary=*/true);
-    storeResult( myEditor );
   }
   tgtMesh->GetMeshDS()->Modified();
 
index fa76be969ce7a8e391ca1114f27d6fe64d2a8e0e..a6a0e3c44b89aca9703a90ec30a099f0a9857666 100644 (file)
 
 class SMESH_Mesh_i;
 
+namespace MeshEditor_I {
+  struct TPreviewMesh;
+}
+
 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
 {
 public:
@@ -100,6 +104,19 @@ public:
                                   const SMESH::long_array & Quantities);
   CORBA::Long AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces);
 
+  /*!
+   * \brief Create 0D elements on all nodes of the given object except those 
+   *        nodes on which a 0D element already exists.
+   *  \param theObject object on whose nodes 0D elements will be created.
+   *  \param theGroupName optional name of a group to add 0D elements created
+   *         and/or found on nodes of \a theObject.
+   *  \return an object (a new group or a temporary SMESH_IDSource) holding
+   *          ids of new and/or found 0D elements.
+   */
+  SMESH::SMESH_IDSource_ptr Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObject,
+                                                       const char*               theGroupName)
+    throw (SALOME::SALOME_Exception);
+
   /*!
    * \brief Bind a node to a vertex
    * \param NodeID - node ID
@@ -822,13 +839,17 @@ public:
 
 private: //!< private methods
 
-  SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
+  ::SMESH_MeshEditor& getEditor();
+
+  SMESHDS_Mesh * getMeshDS() { return myMesh->GetMeshDS(); }
+
+  MeshEditor_I::TPreviewMesh * getPreviewMesh( SMDSAbs_ElementType previewType = SMDSAbs_All );
 
   /*!
    * \brief Update myLastCreated* or myPreviewData
    * \param anEditor - it contains edition results
    */
-  void storeResult(::SMESH_MeshEditor& anEditor);
+  //void storeResult(::SMESH_MeshEditor& anEditor);
   /*!
    * \brief Clear myLastCreated* or myPreviewData
    */
@@ -913,12 +934,19 @@ private: //!< private methods
 
 private: //!< fields
 
-  SMESH_Mesh_i*      myMesh_i;
-  SMESH_Mesh *       myMesh;
-  ::SMESH_MeshEditor myEditor;
+  SMESH_Mesh_i*                myMesh_i;
+  SMESH_Mesh *                 myMesh;
+  ::SMESH_MeshEditor           myEditor;
 
+  bool                         myIsPreviewMode;
+  MeshEditor_I::TPreviewMesh * myPreviewMesh;
+  ::SMESH_MeshEditor *         myPreviewEditor;
   SMESH::MeshPreviewStruct_var myPreviewData;
-  bool                         myPreviewMode;
+
+  // temporary IDSources
+  struct _IDSource;
+  std::list< _IDSource* >      myAuxIDSources;
+  void                         deleteAuxIDSources();
 };
 
 #endif
index 721476f831d6885c5f88a1913dd897958c9966d9..afe7656491c7ebdf32d3ab5f312796866f3377d8 100644 (file)
@@ -483,12 +483,13 @@ int SMESH_Mesh_i::ImportSTLFile( const char* theFileName )
  */
 //================================================================================
 
-SMESH::ComputeError* SMESH_Mesh_i::ImportGMFFile( const char* theFileName )
+SMESH::ComputeError* SMESH_Mesh_i::ImportGMFFile( const char* theFileName,
+                                                  bool        theMakeRequiredGroups )
   throw (SALOME::SALOME_Exception)
 {
   SMESH_ComputeErrorPtr error;
   try {
-    error = _impl->GMFToMesh( theFileName );
+    error = _impl->GMFToMesh( theFileName, theMakeRequiredGroups );
   }
   catch ( std::bad_alloc& exc ) {
     error = SMESH_ComputeError::New( Driver_Mesh::DRS_FAIL, "std::bad_alloc raised" );
@@ -1064,11 +1065,11 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup
   else
     aMeshEditor->RemoveElements( anIds );
 
+  // Update Python script (theGroup must be alive for this)
+  pyDump << _this() << ".RemoveGroupWithContents( " << theGroup << " )";
+
   // Remove group
   RemoveGroup( theGroup );
-
-  // Update Python script
-  pyDump << _this() << ".RemoveGroupWithContents( " << theGroup << " )";
 }
 
 //================================================================================
@@ -3039,7 +3040,8 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart,
 //================================================================================
 
 void SMESH_Mesh_i::ExportGMF(::SMESH::SMESH_IDSource_ptr meshPart,
-                             const char*                 file)
+                             const char*                 file,
+                             bool                        withRequiredGroups)
   throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -3049,9 +3051,12 @@ void SMESH_Mesh_i::ExportGMF(::SMESH::SMESH_IDSource_ptr meshPart,
   PrepareForWriting(file,/*overwrite=*/true);
 
   SMESH_MeshPartDS partDS( meshPart );
-  _impl->ExportGMF(file, &partDS);
+  _impl->ExportGMF(file, &partDS, withRequiredGroups);
 
-  TPythonDump() << _this() << ".ExportGMF( " << meshPart<< ", r'" << file << "')";
+  TPythonDump() << _this() << ".ExportGMF( "
+                << meshPart<< ", r'"
+                << file << "', "
+                << withRequiredGroups << ")";
 }
 
 //=============================================================================
index 0c2a3ca97c62b58a103bb9d304e007bf92f33905..ca7e1af646faa6248de9f82c6d2272215c066860 100644 (file)
@@ -198,7 +198,8 @@ public:
   int ImportSTLFile( const char* theFileName )
     throw (SALOME::SALOME_Exception);
 
-  SMESH::ComputeError* ImportGMFFile( const char* theFileName )
+  SMESH::ComputeError* ImportGMFFile( const char* theFileName,
+                                      bool        theMakeRequiredGroups)
     throw (SALOME::SALOME_Exception);
 
   /*!
@@ -249,7 +250,8 @@ public:
                   const char*               file,
                   CORBA::Boolean            overwrite) throw (SALOME::SALOME_Exception);
   void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
-                 const char*               file) throw (SALOME::SALOME_Exception);
+                 const char*               file,
+                 CORBA::Boolean            withRequiredGroups) throw (SALOME::SALOME_Exception);
 
   void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
                        const char*               file,
index e224ade4c5c8eee268352dadbe428bac06a24d30..c07bfef200d99daf6087a181285411e863bec4ae 100644 (file)
@@ -255,8 +255,7 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo):
 def AssureGeomPublished(mesh, geom, name=''):
     if not isinstance( geom, geompyDC.GEOM._objref_GEOM_Object ):
         return
-    if not geom.IsSame( mesh.geom ) and \
-           not geom.GetStudyEntry() and \
+    if not geom.GetStudyEntry() and \
            mesh.smeshpyD.GetCurrentStudy():
         ## set the study
         studyID = mesh.smeshpyD.GetCurrentStudy()._get_StudyId()
@@ -330,7 +329,6 @@ class smeshDC(SMESH._objref_SMESH_Gen):
         return Mesh(self,self.geompyD,obj,name)
 
     ## Returns a long value from enumeration
-    #  Should be used for SMESH.FunctorType enumeration
     #  @ingroup l1_controls
     def EnumToLong(self,theItem):
         return theItem._v
@@ -509,7 +507,9 @@ class smeshDC(SMESH._objref_SMESH_Gen):
     #  @return [ an instance of Mesh class, SMESH::ComputeError ]
     #  @ingroup l2_impexp
     def CreateMeshesFromGMF( self, theFileName ):
-        aSmeshMesh, error = SMESH._objref_SMESH_Gen.CreateMeshesFromGMF(self,theFileName)
+        aSmeshMesh, error = SMESH._objref_SMESH_Gen.CreateMeshesFromGMF(self,
+                                                                        theFileName,
+                                                                        True)
         if error.comment: print "*** CreateMeshesFromGMF() errors:\n", error.comment
         return Mesh(self, self.geompyD, aSmeshMesh), error
 
@@ -640,9 +640,13 @@ class smeshDC(SMESH._objref_SMESH_Gen):
             # Checks that Threshold is GEOM object
             if isinstance(aThreshold, geompyDC.GEOM._objref_GEOM_Object):
                 aCriterion.ThresholdStr = GetName(aThreshold)
-                aCriterion.ThresholdID = aThreshold.GetStudyEntry()
+                aCriterion.ThresholdID  = aThreshold.GetStudyEntry()
                 if not aCriterion.ThresholdID:
-                    raise RuntimeError, "Threshold shape must be published"
+                    name = aCriterion.ThresholdStr
+                    if not name:
+                        name = "%s_%s"%(aThreshold.GetShapeType(), id(aThreshold)%10000)
+                    aCriterion.ThresholdID = self.geompyD.addToStudy( aThreshold, name )
+                    #raise RuntimeError, "Threshold shape must be published"
             else:
                 print "Error: The Threshold should be a shape."
                 return None
@@ -768,6 +772,8 @@ class smeshDC(SMESH._objref_SMESH_Gen):
     #  @return SMESH_NumericalFunctor
     #  @ingroup l1_controls
     def GetFunctor(self,theCriterion):
+        if isinstance( theCriterion, SMESH._objref_NumericalFunctor ):
+            return theCriterion
         aFilterMgr = self.CreateFilterManager()
         if theCriterion == FT_AspectRatio:
             return aFilterMgr.CreateAspectRatio()
@@ -1002,7 +1008,8 @@ class Mesh:
         if not self.geom:
             self.geom = self.mesh.GetShapeToMesh()
 
-        self.editor = self.mesh.GetMeshEditor()
+        self.editor   = self.mesh.GetMeshEditor()
+        self.functors = [None] * SMESH.FT_Undefined._v
 
         # set self to algoCreator's
         for attrName in dir(self):
@@ -1224,9 +1231,13 @@ class Mesh:
                 elif err.state == HYP_BAD_GEOMETRY:
                     reason = ('%s %sD algorithm "%s" is assigned to mismatching'
                               'geometry' % ( glob, dim, name ))
+                elif err.state == HYP_HIDDEN_ALGO:
+                    reason = ('%s %sD algorithm "%s" is ignored due to presence of a %s '
+                              'algorithm of upper dimension generating %sD mesh'
+                              % ( glob, dim, name, glob, dim ))
                 else:
-                    reason = "For unknown reason."+\
-                             " Revise Mesh.Compute() implementation in smeshDC.py!"
+                    reason = ("For unknown reason. "
+                              "Developer, revise Mesh.Compute() implementation in smeshDC.py!")
                     pass
                 if allReasons != "":allReasons += "\n"
                 allReasons += "-  " + reason
@@ -1476,7 +1487,7 @@ class Mesh:
             meshPart = meshPart.mesh
         elif not meshPart:
             meshPart = self.mesh
-        self.mesh.ExportGMF(meshPart, f)
+        self.mesh.ExportGMF(meshPart, f, True)
 
     ## Deprecated, used only for compatibility! Please, use ExportToMEDX() method instead.
     #  Exports the mesh in a file in MED format and chooses the \a version of MED format
@@ -2334,6 +2345,24 @@ class Mesh:
     def Add0DElement(self, IDOfNode):
         return self.editor.Add0DElement(IDOfNode)
 
+    ## Create 0D elements on all nodes of the given elements except those 
+    #  nodes on which a 0D element already exists.
+    #  @param theObject an object on whose nodes 0D elements will be created.
+    #         It can be mesh, sub-mesh, group, list of element IDs or a holder
+    #         of nodes IDs created by calling mesh.GetIDSource( nodes, SMESH.NODE )
+    #  @param theGroupName optional name of a group to add 0D elements created
+    #         and/or found on nodes of \a theObject.
+    #  @return an object (a new group or a temporary SMESH_IDSource) holding
+    #          IDs of new and/or found 0D elements. IDs of 0D elements 
+    #          can be retrieved from the returned object by calling GetIDs()
+    #  @ingroup l2_modif_add
+    def Add0DElementsToAllNodes(self, theObject, theGroupName=""):
+        if isinstance( theObject, Mesh ):
+            theObject = theObject.GetMesh()
+        if isinstance( theObject, list ):
+            theObject = self.GetIDSource( theObject, SMESH.ALL )
+        return self.editor.Create0DElementsOnAllNodes( theObject, theGroupName )
+
     ## Creates a ball element on a node with given ID.
     #  @param IDOfNode the ID of node for creation of the element.
     #  @param diameter the bal diameter.
@@ -2627,30 +2656,25 @@ class Mesh:
 
     ## Fuses the neighbouring triangles into quadrangles.
     #  @param IDsOfElements The triangles to be fused,
-    #  @param theCriterion  is FT_...; used to choose a neighbour to fuse with.
+    #  @param theCriterion  is a numerical functor, in terms of enum SMESH.FunctorType, used to
+    #                       choose a neighbour to fuse with.
     #  @param MaxAngle      is the maximum angle between element normals at which the fusion
     #                       is still performed; theMaxAngle is mesured in radians.
     #                       Also it could be a name of variable which defines angle in degrees.
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_unitetri
     def TriToQuad(self, IDsOfElements, theCriterion, MaxAngle):
-        flag = False
-        if isinstance(MaxAngle,str):
-            flag = True
         MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle)
         self.mesh.SetParameters(Parameters)
         if not IDsOfElements:
             IDsOfElements = self.GetElementsId()
-        Functor = 0
-        if ( isinstance( theCriterion, SMESH._objref_NumericalFunctor ) ):
-            Functor = theCriterion
-        else:
-            Functor = self.smeshpyD.GetFunctor(theCriterion)
+        Functor = self.smeshpyD.GetFunctor(theCriterion)
         return self.editor.TriToQuad(IDsOfElements, Functor, MaxAngle)
 
     ## Fuses the neighbouring triangles of the object into quadrangles
     #  @param theObject is mesh, submesh or group
-    #  @param theCriterion is FT_...; used to choose a neighbour to fuse with.
+    #  @param theCriterion is a numerical functor, in terms of enum SMESH.FunctorType, used to
+    #         choose a neighbour to fuse with.
     #  @param MaxAngle   a max angle between element normals at which the fusion
     #                   is still performed; theMaxAngle is mesured in radians.
     #  @return TRUE in case of success, FALSE otherwise.
@@ -2658,29 +2682,42 @@ class Mesh:
     def TriToQuadObject (self, theObject, theCriterion, MaxAngle):
         MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle)
         self.mesh.SetParameters(Parameters)
-        if ( isinstance( theObject, Mesh )):
+        if isinstance( theObject, Mesh ):
             theObject = theObject.GetMesh()
-        return self.editor.TriToQuadObject(theObject, self.smeshpyD.GetFunctor(theCriterion), MaxAngle)
+        Functor = self.smeshpyD.GetFunctor(theCriterion)
+        return self.editor.TriToQuadObject(theObject, Functor, MaxAngle)
 
     ## Splits quadrangles into triangles.
+    #
     #  @param IDsOfElements the faces to be splitted.
-    #  @param theCriterion   FT_...; used to choose a diagonal for splitting.
+    #  @param theCriterion   is a numerical functor, in terms of enum SMESH.FunctorType, used to
+    #         choose a diagonal for splitting. If @a theCriterion is None, which is a default
+    #         value, then quadrangles will be split by the smallest diagonal.
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_cutquadr
-    def QuadToTri (self, IDsOfElements, theCriterion):
+    def QuadToTri (self, IDsOfElements, theCriterion = None):
         if IDsOfElements == []:
             IDsOfElements = self.GetElementsId()
-        return self.editor.QuadToTri(IDsOfElements, self.smeshpyD.GetFunctor(theCriterion))
+        if theCriterion is None:
+            theCriterion = FT_MaxElementLength2D
+        Functor = self.smeshpyD.GetFunctor(theCriterion)
+        return self.editor.QuadToTri(IDsOfElements, Functor)
 
     ## Splits quadrangles into triangles.
-    #  @param theObject  the object from which the list of elements is taken, this is mesh, submesh or group
-    #  @param theCriterion   FT_...; used to choose a diagonal for splitting.
+    #  @param theObject the object from which the list of elements is taken,
+    #         this is mesh, submesh or group
+    #  @param theCriterion is a numerical functor, in terms of enum SMESH.FunctorType, used to
+    #         choose a diagonal for splitting. If @a theCriterion is None, which is a default
+    #         value, then quadrangles will be split by the smallest diagonal.
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_cutquadr
-    def QuadToTriObject (self, theObject, theCriterion):
+    def QuadToTriObject (self, theObject, theCriterion = None):
         if ( isinstance( theObject, Mesh )):
             theObject = theObject.GetMesh()
-        return self.editor.QuadToTriObject(theObject, self.smeshpyD.GetFunctor(theCriterion))
+        if theCriterion is None:
+            theCriterion = FT_MaxElementLength2D
+        Functor = self.smeshpyD.GetFunctor(theCriterion)
+        return self.editor.QuadToTriObject(theObject, Functor)
 
     ## Splits quadrangles into triangles.
     #  @param IDsOfElements the faces to be splitted
@@ -2693,7 +2730,8 @@ class Mesh:
         return self.editor.SplitQuad(IDsOfElements, Diag13)
 
     ## Splits quadrangles into triangles.
-    #  @param theObject the object from which the list of elements is taken, this is mesh, submesh or group
+    #  @param theObject the object from which the list of elements is taken,
+    #         this is mesh, submesh or group
     #  @param Diag13    is used to choose a diagonal for splitting.
     #  @return TRUE in case of success, FALSE otherwise.
     #  @ingroup l2_modif_cutquadr
@@ -2704,7 +2742,8 @@ class Mesh:
 
     ## Finds a better splitting of the given quadrangle.
     #  @param IDOfQuad   the ID of the quadrangle to be splitted.
-    #  @param theCriterion  FT_...; a criterion to choose a diagonal for splitting.
+    #  @param theCriterion  is a numerical functor, in terms of enum SMESH.FunctorType, used to
+    #         choose a diagonal for splitting.
     #  @return 1 if 1-3 diagonal is better, 2 if 2-4
     #          diagonal is better, 0 if error occurs.
     #  @ingroup l2_modif_cutquadr
@@ -3641,6 +3680,10 @@ class Mesh:
             theObject = theObject.GetMesh()
         if ( isinstance( theObject, list )):
             theObject = self.GetIDSource(theObject, SMESH.ALL)
+        if ( isinstance( theScaleFact, float )):
+             theScaleFact = [theScaleFact]
+        if ( isinstance( theScaleFact, int )):
+             theScaleFact = [ float(theScaleFact)]
 
         self.mesh.SetParameters(thePoint.parameters)
 
@@ -3661,6 +3704,10 @@ class Mesh:
             theObject = theObject.GetMesh()
         if ( isinstance( theObject, list )):
             theObject = self.GetIDSource(theObject,SMESH.ALL)
+        if ( isinstance( theScaleFact, float )):
+             theScaleFact = [theScaleFact]
+        if ( isinstance( theScaleFact, int )):
+             theScaleFact = [ float(theScaleFact)]
 
         self.mesh.SetParameters(thePoint.parameters)
         mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact,
@@ -4038,9 +4085,16 @@ class Mesh:
     def CreateHoleSkin(self, radius, theShape, groupName, theNodesCoords):
         return self.editor.CreateHoleSkin( radius, theShape, groupName, theNodesCoords )
 
+    def _getFunctor(self, funcType ):
+        fn = self.functors[ funcType._v ]
+        if not fn:
+            fn = self.smeshpyD.GetFunctor(funcType)
+            fn.SetMesh(self.mesh)
+            self.functors[ funcType._v ] = fn
+        return fn
+
     def _valueFromFunctor(self, funcType, elemId):
-        fn = self.smeshpyD.GetFunctor(funcType)
-        fn.SetMesh(self.mesh)
+        fn = self._getFunctor( funcType )
         if fn.GetElementType() == self.GetElementType(elemId, True):
             val = fn.GetValue(elemId)
         else:
index a037dd8683c61c3ec3dd0acbb28fbcae073ec7d8..9b3acf00d61b45b9a20cbdbdef80aceb522d8927 100644 (file)
@@ -195,7 +195,7 @@ class Mesh_Algorithm:
             raise RuntimeError, "Attemp to create " + algo + " algoritm on None shape"
         self.mesh = mesh
         name = ""
-        if not geom:
+        if not geom or geom.IsSame( mesh.geom ):
             self.geom = mesh.geom
         else:
             self.geom = geom
index 6b0c68b93facfbd1f13490635d7730d58eefbac3..20283d9ca9a7b152e7b4e2e0023e519b32d429b4 100644 (file)
 
 using namespace std;
 
+#ifdef _DEBUG_
 //#define _MY_DEBUG_
+#endif
 
 #if OCC_VERSION_LARGE <= 0x06050300
-// workaround it required only for OCCT6.5.3 and older (see OCC22809)
+// workaround is required only for OCCT6.5.3 and older (see OCC22809)
 #define ELLIPSOLID_WORKAROUND
 #endif
 
index 11a3cc57ad510770b043a8c13b3690cd43b38d70..a4235d86386cc2d0b24829e5cf404bd63aefb96b 100644 (file)
 
 
 #ifdef _DEBUG_
+// #define DEB_FACES
+// #define DEB_GRID
+// #define DUMP_VERT(msg,V) \
+//   { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v);                  \
+//     cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
+#endif
 
-//#define DEB_FACES
-//#define DEB_GRID
-#define DUMP_VERT(msg,V) \
-// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v);\
-//   cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
-
-#else
-
+#ifndef DUMP_VERT
 #define DUMP_VERT(msg,v)
-
 #endif
 
 //================================================================================
@@ -715,7 +713,7 @@ bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other )
     const _FaceSide& otherSide = other.GetSide( i );
     int iMyCommon;
     if ( mySides.Contain( otherSide, &iMyCommon ) ) {
-      // check if normals of two faces are collinear at all vertices of a otherSide
+      // check if normals of two faces are collinear at all vertices of an otherSide
       const double angleTol = M_PI / 180. / 2.;
       int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
       for ( iV = 0; iV < nbV; ++iV )
@@ -740,15 +738,20 @@ bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other )
           myChildren.push_back( *this );
           myFace.Nullify();
         }
+
+        // orient new children equally
+        int otherBottomIndex = ( 4 + i - iMyCommon + 2 ) % 4;
         if ( other.IsComplex() )
-          for ( TChildIterator children = other.GetChildren(); children.more(); )
+          for ( TChildIterator children = other.GetChildren(); children.more(); ) {
             myChildren.push_back( children.next() );
-        else
+            myChildren.back().SetBottomSide( myChildren.back().GetSide( otherBottomIndex ));
+          }
+        else {
           myChildren.push_back( other );
+          myChildren.back().SetBottomSide( myChildren.back().GetSide( otherBottomIndex ));
+        }
 
         myLeftBottomChild = 0;
-        //int otherBottomIndex = ( 4 + i - iMyCommon + 2 ) % 4;
-        //myChildren.back().SetBottomSide( other.GetSide( otherBottomIndex ));
 
         // collect vertices in mySides
         if ( other.IsComplex() )
index 2b584703861133bc1b9f99f76dc8efcda615adc7..14f9961ddd7d590cf2ce688de9117f783efcc5c3 100644 (file)
@@ -396,6 +396,15 @@ bool StdMeshers_CompositeSegment_1D::Compute(SMESH_Mesh &         aMesh,
 
   // Create mesh
 
+  // compute and get nodes on extremity VERTEX'es
+  SMESH_subMesh* smVFirst = aMesh.GetSubMesh( VFirst );
+  smVFirst->SetIsAlwaysComputed( false );
+  smVFirst->ComputeStateEngine( SMESH_subMesh::COMPUTE );
+  //
+  SMESH_subMesh* smVLast = aMesh.GetSubMesh( VLast );
+  smVLast->SetIsAlwaysComputed( false );
+  smVLast->ComputeStateEngine( SMESH_subMesh::COMPUTE );
+  //
   const SMDS_MeshNode * nFirst = SMESH_Algo::VertexNode( VFirst, meshDS );
   const SMDS_MeshNode * nLast  = SMESH_Algo::VertexNode( VLast, meshDS );
   if (!nFirst)
index 8d198fe6955d095eab59464a1c4a7757004a94f6..76785fad0e64139375d4bbb51da17ac0f2eeb8a4 100644 (file)
@@ -66,6 +66,7 @@
 #include <gp_Vec.hxx>
 
 #include <numeric>
+#include <limits>
 
 using namespace std;
 
@@ -307,7 +308,7 @@ namespace {
     if ( gr1It.Value().ShapeType() == TopAbs_FACE )
     {
       // find a boundary edge of group1 to start from
-      TopoDS_Shape bndEdge = StdMeshers_ProjectionUtils::GetBoundaryEdge( theGroup1, theMesh );
+      TopoDS_Shape bndEdge = HERE::GetBoundaryEdge( theGroup1, theMesh );
       if ( bndEdge.IsNull() )
         return false;
 
@@ -377,40 +378,41 @@ namespace {
    */
   //================================================================================
 
-  TopoDS_Shape getOuterEdge( const TopoDS_Shape theShape1, SMESH_Mesh& mesh )
+  bool getOuterEdges( const TopoDS_Shape        shape,
+                      SMESH_Mesh&               mesh,
+                      std::list< TopoDS_Edge >& allBndEdges )
   {
-    TopoDS_Shape edge;
-    if ( theShape1.ShapeType() == TopAbs_COMPOUND )
+    if ( shape.ShapeType() == TopAbs_COMPOUND )
     {
-      TopoDS_Iterator it( theShape1 );
-      if ( it.Value().ShapeType() == TopAbs_FACE ) // group of FACEs
+      TopoDS_Iterator it( shape );
+      if ( it.More() && it.Value().ShapeType() == TopAbs_FACE ) // group of FACEs
       {
         // look for a boundary EDGE of a group
-        edge = StdMeshers_ProjectionUtils::GetBoundaryEdge( theShape1, mesh );
-        if ( !edge.IsNull() )
-          return edge;
+        StdMeshers_ProjectionUtils::GetBoundaryEdge( shape, mesh, &allBndEdges );
+        if ( !allBndEdges.empty() )
+          return true;
       }
     }
-    edge = theShape1;
-    TopExp_Explorer expF( theShape1, TopAbs_FACE ), expE;
+    TopExp_Explorer expF( shape, TopAbs_FACE ), expE;
     if ( expF.More() ) {
       for ( ; expF.More(); expF.Next() ) {
-        edge.Nullify();
         TopoDS_Shape wire =
           StdMeshers_ProjectionUtils::OuterShape( TopoDS::Face( expF.Current() ), TopAbs_WIRE );
-        for ( expE.Init( wire, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
+        for ( expE.Init( wire, TopAbs_EDGE ); expE.More(); expE.Next() )
           if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
-            edge = expE.Current();
-        if ( !edge.IsNull() )
-          break;
+            allBndEdges.push_back( TopoDS::Edge( expE.Current() ));
       }
-    } else if (edge.ShapeType() != TopAbs_EDGE) { // no faces
-      edge.Nullify();
-      for ( expE.Init( theShape1, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
+    }
+    else if ( shape.ShapeType() != TopAbs_EDGE) { // no faces
+      for ( expE.Init( shape, TopAbs_EDGE ); expE.More(); expE.Next() )
         if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
-          edge = expE.Current();
+          allBndEdges.push_back( TopoDS::Edge( expE.Current() ));
     }
-    return edge;
+    else if ( shape.ShapeType() == TopAbs_EDGE ) {
+      if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( shape )))
+        allBndEdges.push_back( TopoDS::Edge( shape ));
+    }
+    return !allBndEdges.empty();
   }
 
 } // namespace
@@ -1175,29 +1177,64 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
   // Find 2 closest vertices
 
   // get 2 linked vertices of shape 1 not belonging to an inner wire of a face
-  TopoDS_Shape edge = getOuterEdge( theShape1, *theMesh1 );
-  if ( edge.IsNull() || edge.ShapeType() != TopAbs_EDGE )
+  std::list< TopoDS_Edge > allBndEdges1;
+  if ( !getOuterEdges( theShape1, *theMesh1, allBndEdges1 ))
     RETURN_BAD_RESULT("Edge not found");
 
-  TopExp::Vertices( TopoDS::Edge( edge.Oriented(TopAbs_FORWARD)), VV1[0], VV1[1]);
-  if ( VV1[0].IsSame( VV1[1] ))
-    RETURN_BAD_RESULT("Only closed edges");
-
-  // find vertices closest to 2 linked vertices of shape 1
-  for ( int i1 = 0; i1 < 2; ++i1 )
+  std::list< TopoDS_Edge >::iterator edge1 = allBndEdges1.begin();
+  double minDist = std::numeric_limits<double>::max();
+  for ( int nbChecked=0; edge1 != allBndEdges1.end() && nbChecked++ < 10; ++edge1 )
   {
-    double dist2 = DBL_MAX;
-    gp_Pnt p1 = BRep_Tool::Pnt( VV1[ i1 ]);
-    p1.Translate( vec01 );
-    p1.Scale( gc[1], scale );
-    for ( int i2 = 1; i2 <= vMap2.Extent(); ++i2 )
+    TopExp::Vertices( TopoDS::Edge( edge1->Oriented(TopAbs_FORWARD)), VV1[0], VV1[1]);
+    if ( VV1[0].IsSame( VV1[1] ))
+      continue;//RETURN_BAD_RESULT("Only closed edges");
+
+    // find vertices closest to 2 linked vertices of shape 1
+    double dist2[2] = { 1e+100, 1e+100 };
+    TopoDS_Vertex edge2VV[2];
+    for ( int i1 = 0; i1 < 2; ++i1 )
     {
-      TopoDS_Vertex V2 = TopoDS::Vertex( vMap2( i2 ));
-      gp_Pnt p2 = BRep_Tool::Pnt ( V2 );
-      double d2 = p1.SquareDistance( p2 );
-      if ( d2 < dist2 && !V2.IsSame( VV2[ 0 ])) {
-        VV2[ i1 ] = V2; dist2 = d2;
+      gp_Pnt p1 = BRep_Tool::Pnt( VV1[ i1 ]);
+      p1.Scale( gc[0], scale );
+      p1.Translate( vec01 );
+      if ( !i1 ) {
+        // select a closest vertex among all ones in vMap2
+        for ( int i2 = 1; i2 <= vMap2.Extent(); ++i2 )
+        {
+          TopoDS_Vertex V2 = TopoDS::Vertex( vMap2( i2 ));
+          gp_Pnt        p2 = BRep_Tool::Pnt ( V2 );
+          double        d2 = p1.SquareDistance( p2 );
+          if ( d2 < dist2[ 0 ] && d2 < minDist ) {
+            edge2VV[ 0 ] = V2;
+            dist2  [ 0 ] = d2;
+          }
+        }
       }
+      else if ( !edge2VV[0].IsNull() ) {
+        // select a closest vertex among ends of edges meeting at edge2VV[0]
+        PShapeIteratorPtr edgeIt = SMESH_MesherHelper::GetAncestors( edge2VV[0],
+                                                                     *theMesh2, TopAbs_EDGE);
+        while ( const TopoDS_Shape* edge2 = edgeIt->next() )
+          for ( TopoDS_Iterator itV2( *edge2 ); itV2.More(); itV2.Next() )
+          {
+            if ( itV2.Value().IsSame( edge2VV[ 0 ])) continue;
+            if ( !vMap2.Contains( itV2.Value()    )) continue;
+            TopoDS_Vertex V2 = TopoDS::Vertex( itV2.Value() );
+            gp_Pnt        p2 = BRep_Tool::Pnt ( V2 );
+            double        d2 = p1.SquareDistance( p2 );
+            if ( d2 < dist2[1] && d2 < minDist ) {
+              edge2VV[ 1 ] = V2;
+              dist2  [ 1 ] = d2;
+            }
+          }
+      }
+    }
+    if ( dist2[0] + dist2[1] < minDist ) {
+      VV2[0] = edge2VV[0];
+      VV2[1] = edge2VV[1];
+      minDist = dist2[0] + dist2[1];
+      if ( minDist < 1e-10 )
+        break;
     }
   }
 
@@ -1248,8 +1285,13 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
          SMESH_Block::GetOrderedEdges( face2, VV2[0], edges2, nbEInW2, outer_wire_algo) )
       CONT_BAD_RESULT("Different number of wires in faces ");
 
-    if ( nbEInW1 != nbEInW2 )
-      CONT_BAD_RESULT("Different number of edges in faces: " <<
+    if ( nbEInW1 != nbEInW2 && outer_wire_algo == 0 &&
+         ( std::accumulate( nbEInW1.begin(), nbEInW1.end(), 0) !=
+           std::accumulate( nbEInW2.begin(), nbEInW2.end(), 0)))
+      RETURN_BAD_RESULT("Different number of edges in faces");
+
+    if ( nbEInW1.front() != nbEInW2.front() )
+      CONT_BAD_RESULT("Different number of edges in the outer wire: " <<
                       nbEInW1.front() << " != " << nbEInW2.front());
 
     i_ok_wire_algo = outer_wire_algo;
@@ -1300,6 +1342,7 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
   } // loop algos getting an outer wire
   
   // Try to orient all (if !OK) or only internal wires (issue 0020996) by UV similarity
+
   if (( !OK || nbEInW1.size() > 1 ) && i_ok_wire_algo > -1 )
   {
     // Check that Vec(VV1[0],VV1[1]) in 2D on face1 is the same
@@ -1325,44 +1368,66 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
         SMESH_Block::GetOrderedEdges( face2, VV2[0], edges2, nbEInW2, i_ok_wire_algo);
       }
       gp_XY dUV = v0f2UV.XY() - v0f1UV.XY(); // UV shift between 2 faces
+      //
       // skip edges of the outer wire (if the outer wire is OK)
-      list< int >::iterator nbEInW = nbEInW1.begin();
-      list< TopoDS_Edge >::iterator edge1Beg = edges1.begin(), edge2Beg = edges2.begin();
-      if ( OK )
-      {
-        for ( int i = 0; i < *nbEInW; ++i )
-          ++edge1Beg, ++edge2Beg;
-        ++nbEInW;
-      }
-      for ( ; nbEInW != nbEInW1.end(); ++nbEInW ) // loop on wires
+      list< int >::iterator nbE2, nbE1 = nbEInW1.begin();
+      list< TopoDS_Edge >::iterator edge2Beg, edge1Beg = edges1.begin();
+      if ( OK ) std::advance( edge1Beg, *nbE1++ );
+      // reach an end of edges of a current wire1
+      list< TopoDS_Edge >::iterator edge2End, edge1End;
+      //
+      // find corresponding wires of face2
+      for ( int iW1 = OK; nbE1 != nbEInW1.end(); ++nbE1, ++iW1 ) // loop on wires of face1
       {
-        // reach an end of edges of a current wire
-        list< TopoDS_Edge >::iterator edge1End = edge1Beg, edge2End = edge2Beg;
-        for ( int i = 0; i < *nbEInW; ++i )
-          ++edge1End, ++edge2End;
-        // rotate edges2 untill coincident with edges1 in 2D
+        // reach an end of edges of a current wire1
+        edge1End = edge1Beg;
+        std::advance( edge1End, *nbE1 );
+        // UV on face1 to find on face2
         v0f1UV = BRep_Tool::Parameters( TopExp::FirstVertex(*edge1Beg,true), face1 );
         v1f1UV = BRep_Tool::Parameters( TopExp::LastVertex (*edge1Beg,true), face1 );
         v0f1UV.ChangeCoord() += dUV;
         v1f1UV.ChangeCoord() += dUV;
-        int i = *nbEInW;
-        while ( --i > 0 && !sameVertexUV( *edge2Beg, face2, 0, v0f1UV, vTolUV ))
-          edges2.splice( edge2End, edges2, edge2Beg++ ); // move edge2Beg to place before edge2End
-        if ( sameVertexUV( *edge2Beg, face2, 0, v0f1UV, vTolUV ))
+        //
+        // look through wires of face2
+        edge2Beg = edges2.begin();
+        nbE2     = nbEInW2.begin();
+        if ( OK ) std::advance( edge2Beg, *nbE2++ );
+        for ( int iW2 = OK; nbE2 != nbEInW2.end(); ++nbE2, ++iW2 ) // loop on wires of face2
         {
-          if ( nbEInW == nbEInW1.begin() )
-            OK = true; // OK is for the first wire
-          // reverse edges2 if needed
-          if ( !sameVertexUV( *edge2Beg, face2, 1, v1f1UV, vTolUV ))
+          // reach an end of edges of a current wire2
+          edge2End = edge2Beg;
+          std::advance( edge2End, *nbE2 );
+          if ( *nbE1 == *nbE2 && iW2 >= iW1 )
           {
-            Reverse( edges2 , *nbEInW, distance( edges2.begin(),edge2Beg ));
-            // set correct edge2End
-            edge2End = edges2.begin();
-            std::advance( edge2End, std::accumulate( nbEInW1.begin(), nbEInW, *nbEInW));
+            // rotate edge2 untill coincidence with edge1 in 2D
+            int i = *nbE2;
+            while ( i-- > 0 && !sameVertexUV( *edge2Beg, face2, 0, v0f1UV, vTolUV ))
+              // move edge2Beg to place before edge2End
+              edges2.splice( edge2End, edges2, edge2Beg++ );
+
+            if ( sameVertexUV( *edge2Beg, face2, 0, v0f1UV, vTolUV ))
+            {
+              if ( iW1 == 0 ) OK = true; // OK is for the first wire
+              // reverse edges2 if needed
+              if ( !sameVertexUV( *edge2Beg, face2, 1, v1f1UV, vTolUV ))
+                Reverse( edges2 , *nbE2, std::distance( edges2.begin(),edge2Beg ));
+              // put wire2 at a right place within edges2
+              if ( iW1 != iW2 ) {
+                list< TopoDS_Edge >::iterator place2 = edges2.begin();
+                std::advance( place2, std::distance( edges1.begin(), edge1Beg ));
+                edges2.splice( place2, edges2, edge2Beg, edge2End );
+                // move nbE2 as well
+                list< int >::iterator placeNbE2 = nbEInW2.begin();
+                std::advance( placeNbE2, iW1 );
+                nbEInW2.splice( placeNbE2, nbEInW2, nbE2 );
+              }
+              break;
+            }
           }
+          // prepare to the next wire loop
+          edge2Beg = edge2End;
         }
-        // prepare to the next wire loop
-        edge1Beg = edge1End, edge2Beg = edge2End;
+        edge1Beg = edge1End;
       }
     }
   }
@@ -1370,7 +1435,7 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
   const int nbEdges = nbEInW1.front();
   if ( OK && nbEdges == 2 )
   {
-    // if a wire includes 2 edges, it's impossible to associate them using
+    // if wires include 2 edges, it's impossible to associate them using
     // topological information only. Try to use length of edges for association.
     double l1[2], l2[2];
     edgeIt = edges1.begin();
@@ -2064,8 +2129,9 @@ int StdMeshers_ProjectionUtils::Count(const TopoDS_Shape&    shape,
  */
 //================================================================================
 
-TopoDS_Edge StdMeshers_ProjectionUtils::GetBoundaryEdge(const TopoDS_Shape& edgeContainer,
-                                                        const SMESH_Mesh&   mesh)
+TopoDS_Edge StdMeshers_ProjectionUtils::GetBoundaryEdge(const TopoDS_Shape&       edgeContainer,
+                                                        const SMESH_Mesh&         mesh,
+                                                        std::list< TopoDS_Edge >* allBndEdges)
 {
   TopTools_IndexedMapOfShape facesOfEdgeContainer, facesNearEdge;
   TopExp::MapShapes( edgeContainer, TopAbs_FACE, facesOfEdgeContainer );
@@ -2080,8 +2146,12 @@ TopoDS_Edge StdMeshers_ProjectionUtils::GetBoundaryEdge(const TopoDS_Shape& edge
         if ( facesOfEdgeContainer.Contains( *face ))
           if ( facesNearEdge.Add( *face ) && facesNearEdge.Extent() > 1 )
             break;
-      if ( facesNearEdge.Extent() == 1 )
-        return edge;
+      if ( facesNearEdge.Extent() == 1 ) {
+        if ( allBndEdges )
+          allBndEdges->push_back( edge );
+        else
+          return edge;
+      }
     }
 
   return TopoDS_Edge();
index 685536a4dca7305eb2513b32d8682966c2dcf6cc..1d22b54b7e4f5d5acb1d46011676a20813b6a8d7 100644 (file)
@@ -220,8 +220,9 @@ class StdMeshers_ProjectionUtils
   /*!
    * \brief Return a boundary EDGE of edgeContainer
    */
-  static TopoDS_Edge GetBoundaryEdge(const TopoDS_Shape& edgeContainer,
-                                     const SMESH_Mesh&   mesh);
+  static TopoDS_Edge GetBoundaryEdge(const TopoDS_Shape&       edgeContainer,
+                                     const SMESH_Mesh&         mesh,
+                                     std::list< TopoDS_Edge >* allBndEdges = 0 );
 };
 
 #endif
index d5c4c9ad788c34b02eabf65666a4f478f16e3493..d75a5aac2de8c7be2bd8f4387197e17d9199ae3f 100644 (file)
@@ -831,10 +831,6 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
         }
         if (!E1.IsNull() && !E2.IsNull() && !E3.IsNull())
         {
-          if ( myProxyMesh->GetProxySubMesh( E1 ) ||
-               myProxyMesh->GetProxySubMesh( E2 ) ||
-               myProxyMesh->GetProxySubMesh( E3 ) )
-            
           quad->side.push_back(new StdMeshers_FaceSide(F, E1, &aMesh, true,
                                                        ignoreMediumNodes, myProxyMesh));
           quad->side.push_back(new StdMeshers_FaceSide(F, E2, &aMesh, true,
index 6ea520001c195e66985a5b9e329d9c9ff0e0c099..e151b794e43bf526495e8c2b0f8329032aac4ebf 100644 (file)
@@ -560,17 +560,20 @@ void StdMeshers_Regular_1D::redistributeNearVertices (SMESH_Mesh &          theM
         double Um = *itU++;
         double Lm = GCPnts_AbscissaPoint::Length( theC3d, Um, *itU);
         double L = GCPnts_AbscissaPoint::Length( theC3d, *itU, l);
-        StdMeshers_Regular_1D algo( *this );
-        algo._hypType = BEG_END_LENGTH;
-        algo._value[ BEG_LENGTH_IND ] = Lm;
-        algo._value[ END_LENGTH_IND ] = vertexLength;
+        static StdMeshers_Regular_1D* auxAlgo = 0;
+        if ( !auxAlgo ) {
+          auxAlgo = new StdMeshers_Regular_1D( _gen->GetANewId(), _studyId, _gen );
+          auxAlgo->_hypType = BEG_END_LENGTH;
+        }
+        auxAlgo->_value[ BEG_LENGTH_IND ] = Lm;
+        auxAlgo->_value[ END_LENGTH_IND ] = vertexLength;
         double from = *itU, to = l;
         if ( isEnd1 ) {
           std::swap( from, to );
-          std::swap( algo._value[ BEG_LENGTH_IND ], algo._value[ END_LENGTH_IND ]);
+          std::swap( auxAlgo->_value[ BEG_LENGTH_IND ], auxAlgo->_value[ END_LENGTH_IND ]);
         }
         list<double> params;
-        if ( algo.computeInternalParameters( theMesh, theC3d, L, from, to, params, false ))
+        if ( auxAlgo->computeInternalParameters( theMesh, theC3d, L, from, to, params, false ))
         {
           if ( isEnd1 ) params.reverse();
           while ( 1 + nHalf-- )
index f5bc7afbe576143e6adf350b3c181987a23d2b9e..a855c24a35a5a3182d9c9bcdc3f96b054ef9a581 100644 (file)
@@ -265,6 +265,7 @@ namespace VISCOUS_3D
   {
     double _r; // radius
     double _k; // factor to correct node smoothed position
+    double _h2lenRatio; // avgNormProj / (2*avgDist)
   public:
     static _Curvature* New( double avgNormProj, double avgDist )
     {
@@ -275,10 +276,12 @@ namespace VISCOUS_3D
         c->_r = avgDist * avgDist / avgNormProj;
         c->_k = avgDist * avgDist / c->_r / c->_r;
         c->_k *= ( c->_r < 0 ? 1/1.1 : 1.1 ); // not to be too restrictive
+        c->_h2lenRatio = avgNormProj / ( avgDist + avgDist );
       }
       return c;
     }
     double lenDelta(double len) const { return _k * ( _r + len ); }
+    double lenDeltaByDist(double dist) const { return dist * _h2lenRatio; }
   };
   struct _LayerEdge;
   //--------------------------------------------------------------------------------
@@ -730,27 +733,30 @@ namespace
     gp_XYZ dir(0,0,0);
     if ( !( ok = ( edges.size() > 0 ))) return dir;
     // get average dir of edges going fromV
-    gp_Vec edgeDir;
-    for ( unsigned i = 0; i < edges.size(); ++i )
-    {
-      edgeDir = getEdgeDir( edges[i], fromV );
-      double size2 = edgeDir.SquareMagnitude();
-      if ( size2 > numeric_limits<double>::min() )
-        edgeDir /= sqrt( size2 );
-      else
-        ok = false;
-      dir += edgeDir.XYZ();
-    }
+    gp_XYZ edgeDir;
+    //if ( edges.size() > 1 )
+      for ( unsigned i = 0; i < edges.size(); ++i )
+      {
+        edgeDir = getEdgeDir( edges[i], fromV );
+        double size2 = edgeDir.SquareModulus();
+        if ( size2 > numeric_limits<double>::min() )
+          edgeDir /= sqrt( size2 );
+        else
+          ok = false;
+        dir += edgeDir;
+      }
     gp_XYZ fromEdgeDir = getFaceDir( F, edges[0], node, helper, ok );
-    if ( edges.size() == 1 || dir.SquareModulus() < 1e-10)
+    if ( edges.size() == 1 )
       dir = fromEdgeDir;
+    else if ( dir.SquareModulus() < 0.1 ) // ~< 20 degrees
+      dir = fromEdgeDir + getFaceDir( F, edges[1], node, helper, ok );
     else if ( dir * fromEdgeDir < 0 )
       dir *= -1;
     if ( ok )
     {
       //dir /= edges.size();
       if ( cosin ) {
-        double angle = edgeDir.Angle( dir );
+        double angle = gp_Vec( edgeDir ).Angle( dir );
         *cosin = cos( angle );
       }
     }
@@ -1385,7 +1391,7 @@ bool _ViscousBuilder::makeLayer(_SolidData& data)
   if ( data._stepSize < 1. )
     data._epsilon *= data._stepSize;
 
-  // Put _LayerEdge's into a vector
+  // Put _LayerEdge's into the vector data._edges
 
   if ( !sortEdges( data, edgesByGeom ))
     return false;
@@ -1709,8 +1715,8 @@ bool _ViscousBuilder::setEdgeData(_LayerEdge&         edge,
     }
     case SMDS_TOP_VERTEX: {
       TopoDS_Vertex V = TopoDS::Vertex( helper.GetSubShapeByNode( node, getMeshDS()));
-      gp_Vec inFaceDir = getFaceDir( F, V, node, helper, normOK);
-      double angle = inFaceDir.Angle( edge._normal ); // [0,PI]
+      gp_XYZ inFaceDir = getFaceDir( F, V, node, helper, normOK);
+      double angle = gp_Vec( inFaceDir).Angle( edge._normal ); // [0,PI]
       edge._cosin = cos( angle );
       //cout << "Cosin on VERTEX " << edge._cosin << " node " << node->GetID() << endl;
       break;
@@ -2858,7 +2864,7 @@ bool _LayerEdge::FindIntersection( SMESH_ElementSearcher&   searcher,
     }
     if ( intFound )
     {
-      if ( dist < segLen*(1.01))
+      if ( dist < segLen*(1.01) && dist > -(_len-segLen) )
         segmentIntersected = true;
       if ( distance > dist )
         distance = dist, iFace = j;
@@ -3061,7 +3067,8 @@ bool _LayerEdge::SmoothOnEdge(Handle(Geom_Surface)& surface,
   double lenDelta = 0;
   if ( _curvature )
   {
-    lenDelta = _curvature->lenDelta( _len );
+    //lenDelta = _curvature->lenDelta( _len );
+    lenDelta = _curvature->lenDeltaByDist( dist01 );
     newPos.ChangeCoord() += _normal * lenDelta;
   }
 
index edbdf623d7bd330e6025b02f8b8d8f929c3498ae..4e4d0ed8e28e716e8e9c84a69667af733c7ecac9 100644 (file)
@@ -53,6 +53,8 @@
 #include <Bnd_B3d.hxx>
 #include <ElCLib.hxx>
 #include <GCPnts_AbscissaPoint.hxx>
+#include <Geom2dAdaptor_Curve.hxx>
+#include <Geom2dInt_GInter.hxx>
 #include <Geom2d_Circle.hxx>
 #include <Geom2d_Line.hxx>
 #include <Geom2d_TrimmedCurve.hxx>
@@ -61,6 +63,7 @@
 #include <Geom_Curve.hxx>
 #include <Geom_Line.hxx>
 #include <Geom_TrimmedCurve.hxx>
+#include <IntRes2d_IntersectionPoint.hxx>
 #include <Precision.hxx>
 #include <Standard_ErrorHandler.hxx>
 #include <TColStd_Array1OfReal.hxx>
@@ -81,7 +84,9 @@
 #include <cmath>
 #include <limits>
 
-#define __myDEBUG
+#ifdef _DEBUG_
+//#define __myDEBUG
+#endif
 
 using namespace std;
 
@@ -226,7 +231,7 @@ namespace VISCOUS_2D
 
     vector<gp_XY> _uvRefined; // divisions by layers
 
-    void SetNewLength( const double length );
+    bool SetNewLength( const double length );
   };
   //--------------------------------------------------------------------------------
   /*!
@@ -239,6 +244,7 @@ namespace VISCOUS_2D
     StdMeshers_FaceSide* _wire;
     int                  _edgeInd;     // index of my EDGE in _wire
     bool                 _advancable;  // true if there is a viscous layer on my EDGE
+    bool                 _isStraight2D;// pcurve type
     _PolyLine*           _leftLine;    // lines of neighbour EDGE's
     _PolyLine*           _rightLine;
     int                  _firstPntInd; // index in vector<UVPtStruct> of _wire
@@ -257,10 +263,19 @@ namespace VISCOUS_2D
     typedef vector< _Segment >::iterator   TSegIterator;
     typedef vector< _LayerEdge >::iterator TEdgeIterator;
 
+    TIDSortedElemSet     _newFaces; // faces generated from this line
+
     bool IsCommonEdgeShared( const _PolyLine& other );
-    size_t FirstLEdge() const { return _leftLine->_advancable ? 1 : 0; }
-    bool IsAdjacent( const _Segment& seg ) const
+    size_t FirstLEdge() const
+    {
+      return ( _leftLine->_advancable && _lEdges.size() > 2 ) ? 1 : 0;
+    }
+    bool IsAdjacent( const _Segment& seg, const _LayerEdge* LE=0 ) const
     {
+      if ( LE && seg._indexInLine < _lEdges.size() &&
+           ( seg._uv[0] == & LE->_uvIn ||
+             seg._uv[1] == & LE->_uvIn ))
+        return true;
       return ( & seg == &_leftLine->_segments.back() ||
                & seg == &_rightLine->_segments[0] );
     }
@@ -278,6 +293,7 @@ namespace VISCOUS_2D
 
     bool Compute(const _Segment& seg1, const _Segment& seg2, bool seg2IsRay = false )
     {
+      const double eps = 1e-10;
       _vec1  = seg1.p2() - seg1.p1(); 
       _vec2  = seg2.p2() - seg2.p1(); 
       _vec21 = seg1.p1() - seg2.p1(); 
@@ -285,10 +301,10 @@ namespace VISCOUS_2D
       if ( fabs(_D) < std::numeric_limits<double>::min())
         return false;
       _param1 = _vec2.Crossed(_vec21) / _D; 
-      if (_param1 < 0 || _param1 > 1 )
+      if (_param1 < -eps || _param1 > 1 + eps )
         return false;
       _param2 = _vec1.Crossed(_vec21) / _D; 
-      if (_param2 < 0 || ( !seg2IsRay && _param2 > 1 ))
+      if (_param2 < -eps || ( !seg2IsRay && _param2 > 1 + eps ))
         return false;
       return true;
     }
@@ -323,14 +339,22 @@ namespace VISCOUS_2D
     bool findEdgesWithLayers();
     bool makePolyLines();
     bool inflate();
-    double fixCollisions( const int stepNb );
+    bool fixCollisions();
     bool refine();
     bool shrink();
+    bool improve();
+    bool toShrinkForAdjacent( const TopoDS_Face& adjFace,
+                              const TopoDS_Edge& E,
+                              const TopoDS_Vertex& V);
     void setLenRatio( _LayerEdge& LE, const gp_Pnt& pOut );
+    void setLayerEdgeData( _LayerEdge&           lEdge,
+                           const double          u,
+                           Handle(Geom2d_Curve)& pcurve,
+                           const bool            reverse);
     void adjustCommonEdge( _PolyLine& LL, _PolyLine& LR );
     void calcLayersHeight(const double    totalThick,
                           vector<double>& heights);
-    void removeMeshFaces(const TopoDS_Shape& face);
+    bool removeMeshFaces(const TopoDS_Shape& face);
 
     bool              error( const string& text );
     SMESHDS_Mesh*     getMeshDS() { return _mesh->GetMeshDS(); }
@@ -369,6 +393,20 @@ namespace VISCOUS_2D
     
   };
 
+  //================================================================================
+  /*!
+   * \brief Returns StdMeshers_ViscousLayers2D for the FACE
+   */
+  const StdMeshers_ViscousLayers2D* findHyp(SMESH_Mesh&        theMesh,
+                                            const TopoDS_Face& theFace)
+  {
+    SMESH_HypoFilter hypFilter
+      ( SMESH_HypoFilter::HasName( StdMeshers_ViscousLayers2D::GetHypType() ));
+    const SMESH_Hypothesis * hyp =
+      theMesh.GetHypothesis( theFace, hypFilter, /*ancestors=*/true );
+    return dynamic_cast< const StdMeshers_ViscousLayers2D* > ( hyp );
+  }
+
 } // namespace VISCOUS_2D
 
 //================================================================================
@@ -394,10 +432,7 @@ StdMeshers_ViscousLayers2D::Compute(SMESH_Mesh&        theMesh,
 {
   SMESH_ProxyMesh::Ptr pm;
 
-  SMESH_HypoFilter hypFilter( SMESH_HypoFilter::HasName( GetHypType() ));
-  const SMESH_Hypothesis * hyp = theMesh.GetHypothesis( theFace, hypFilter, /*ancestors=*/true );
-  const StdMeshers_ViscousLayers2D* vlHyp =
-    dynamic_cast< const StdMeshers_ViscousLayers2D* > ( hyp );
+  const StdMeshers_ViscousLayers2D* vlHyp = VISCOUS_2D::findHyp( theMesh, theFace );
   if ( vlHyp )
   {
     VISCOUS_2D::_ViscousBuilder2D builder( theMesh, theFace, vlHyp );
@@ -407,6 +442,8 @@ StdMeshers_ViscousLayers2D::Compute(SMESH_Mesh&        theMesh,
       theMesh.GetSubMesh( theFace )->GetComputeError() = error;
     else if ( !pm )
       pm.reset( new SMESH_ProxyMesh( theMesh ));
+    if ( getenv("ONLY_VL2D"))
+      pm.reset();
   }
   else
   {
@@ -460,7 +497,8 @@ _ViscousBuilder2D::_ViscousBuilder2D(SMESH_Mesh&                       theMesh,
   _helper.SetSubShape( _face );
   _helper.SetElementsOnShape(true);
 
-  _surface = BRep_Tool::Surface( theFace );
+  //_face.Orientation( TopAbs_FORWARD );
+  _surface = BRep_Tool::Surface( _face );
 
   if ( _hyp )
     _fPowN = pow( _hyp->GetStretchFactor(), _hyp->GetNumberLayers() );
@@ -502,8 +540,6 @@ SMESH_ProxyMesh::Ptr _ViscousBuilder2D::Compute()
   if ( !_error->IsOK() )
     return _proxyMesh;
 
-  //PyDump debugDump;
-
   if ( !findEdgesWithLayers() ) // analysis of a shape
     return _proxyMesh;
 
@@ -513,14 +549,16 @@ SMESH_ProxyMesh::Ptr _ViscousBuilder2D::Compute()
   if ( ! inflate() ) // advance fronts
     return _proxyMesh;
 
+  // remove elements and nodes from _face
+  removeMeshFaces( _face );
+
   if ( !shrink() ) // shrink segments on edges w/o layers
     return _proxyMesh;
 
   if ( ! refine() ) // make faces
     return _proxyMesh;
 
-  //makeGroupOfLE(); // debug
-  //debugDump.Finish();
+  //improve();
 
   return _proxyMesh;
 }
@@ -534,12 +572,15 @@ SMESH_ProxyMesh::Ptr _ViscousBuilder2D::Compute()
 bool _ViscousBuilder2D::findEdgesWithLayers()
 {
   // collect all EDGEs to ignore defined by hyp
+  int nbMyEdgesIgnored = 0;
   vector<TGeomID> ids = _hyp->GetBndShapesToIgnore();
   for ( size_t i = 0; i < ids.size(); ++i )
   {
     const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[i] );
-    if ( !s.IsNull() && s.ShapeType() == TopAbs_EDGE )
+    if ( !s.IsNull() && s.ShapeType() == TopAbs_EDGE ) {
       _ignoreShapeIds.insert( ids[i] );
+      nbMyEdgesIgnored += ( _helper.IsSubShape( s, _face ));
+    }
   }
 
   // check all EDGEs of the _face
@@ -592,7 +633,7 @@ bool _ViscousBuilder2D::findEdgesWithLayers()
         }
       }
   }
-  return ( totalNbEdges > _ignoreShapeIds.size() );
+  return ( nbMyEdgesIgnored < totalNbEdges );
 }
 
 //================================================================================
@@ -619,6 +660,8 @@ bool _ViscousBuilder2D::makePolyLines()
   {
     StdMeshers_FaceSidePtr      wire = _faceSideVec[ iWire ];
     const vector<UVPtStruct>& points = wire->GetUVPtStruct();
+    if ( points.empty() && wire->NbPoints() > 0 )
+      return error("Invalid node parameters on some EDGE");
     int iPnt = 0;
     for ( int iE = 0; iE < wire->NbEdges(); ++iE )
     {
@@ -636,30 +679,30 @@ bool _ViscousBuilder2D::makePolyLines()
       while ( points[ iPnt ].normParam < lastNormPar )
         ++iPnt;
       L._lastPntInd = iPnt;
-      L._lEdges.resize( L._lastPntInd - L._firstPntInd + 1 );
+      L._lEdges.resize( Max( 3, L._lastPntInd - L._firstPntInd + 1 )); // 3 edges minimum
 
       // TODO: add more _LayerEdge's to strongly curved EDGEs
       // in order not to miss collisions
 
       Handle(Geom2d_Curve) pcurve = L._wire->Curve2d( L._edgeInd );
-      gp_Pnt2d uv; gp_Vec2d tangent;
+      const bool reverse = (( L._wire->Edge( iE ).Orientation() == TopAbs_REVERSED ) ^
+                            (_face.Orientation()                == TopAbs_REVERSED ));
       for ( int i = L._firstPntInd; i <= L._lastPntInd; ++i )
       {
         _LayerEdge& lEdge = L._lEdges[ i - L._firstPntInd ];
         const double u = ( i == L._firstPntInd ? wire->FirstU(iE) : points[ i ].param );
-        pcurve->D1( u , uv, tangent );
-        tangent.Normalize();
-        if ( L._wire->Edge( iE ).Orientation() == TopAbs_REVERSED )
-          tangent.Reverse();
-        lEdge._uvOut = lEdge._uvIn = uv.XY();
-        lEdge._normal2D.SetCoord( -tangent.Y(), tangent.X() );
-        lEdge._ray.SetLocation( lEdge._uvOut );
-        lEdge._ray.SetDirection( lEdge._normal2D );
-        lEdge._isBlocked = false;
-        lEdge._length2D  = 0;
-
+        setLayerEdgeData( lEdge, u, pcurve, reverse );
         setLenRatio( lEdge, SMESH_TNodeXYZ( points[ i ].node ) );
       }
+      if ( L._lastPntInd - L._firstPntInd + 1 < 3 ) // add 3d _LayerEdge in the middle
+      {
+        L._lEdges[2] = L._lEdges[1];
+        const double u = 0.5 * ( wire->FirstU(iE) + wire->LastU(iE) );
+        setLayerEdgeData( L._lEdges[1], u, pcurve, reverse );
+        gp_Pnt p = 0.5 * ( SMESH_TNodeXYZ( points[ L._firstPntInd ].node ) +
+                           SMESH_TNodeXYZ( points[ L._lastPntInd ].node ));
+        setLenRatio( L._lEdges[1], p );
+      }
     }
   }
 
@@ -688,13 +731,14 @@ bool _ViscousBuilder2D::makePolyLines()
     L._segTree.reset( new _SegmentTree( L._segments ));
   }
 
-  // Evaluate possible _thickness if required layers thickness seems too high
-  // -------------------------------------------------------------------------
+  // Evaluate max possible _thickness if required layers thickness seems too high
+  // ----------------------------------------------------------------------------
 
   _thickness = _hyp->GetTotalThickness();
   _SegmentTree::box_type faceBndBox2D;
   for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
     faceBndBox2D.Add( *_polyLineVec[ iPoLine]._segTree->getBox() );
+  double boxTol = 1e-3 * sqrt( faceBndBox2D.SquareExtent() );
   //
   if ( _thickness * maxLen2dTo3dRatio > sqrt( faceBndBox2D.SquareExtent() ) / 10 )
   {
@@ -704,9 +748,16 @@ bool _ViscousBuilder2D::makePolyLines()
     for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
     {
       _PolyLine& L1 = _polyLineVec[ iL1 ];
-      for ( size_t iL2 = iL1+1; iL2 < _polyLineVec.size(); ++iL2 )
+      _SegmentTree::box_type boxL1 = * L1._segTree->getBox();
+      boxL1.Enlarge( boxTol );
+      // consider case of a circle as well!
+      for ( size_t iL2 = iL1; iL2 < _polyLineVec.size(); ++iL2 )
       {
         _PolyLine& L2 = _polyLineVec[ iL2 ];
+        _SegmentTree::box_type boxL2 = * L2._segTree->getBox();
+        boxL2.Enlarge( boxTol );
+        if ( boxL1.IsOut( boxL2 ))
+          continue;
         for ( size_t iLE = 1; iLE < L1._lEdges.size(); ++iLE )
         {
           foundSegs.clear();
@@ -768,16 +819,16 @@ bool _ViscousBuilder2D::makePolyLines()
   {
     lineBoxes[ iPoLine ] = *_polyLineVec[ iPoLine ]._segTree->getBox();
     if ( _polyLineVec[ iPoLine ]._advancable )
-      lineBoxes[ iPoLine ].Enlarge( maxLen2dTo3dRatio * _thickness );
+      lineBoxes[ iPoLine ].Enlarge( maxLen2dTo3dRatio * _thickness * 2 );
   }
   // _reachableLines
   for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
   {
     _PolyLine& L1 = _polyLineVec[ iPoLine ];
-    for ( size_t i = 0; i < _polyLineVec.size(); ++i )
+    for ( size_t iL2 = 0; iL2 < _polyLineVec.size(); ++iL2 )
     {
-      _PolyLine& L2 = _polyLineVec[ i ];
-      if ( iPoLine == i || lineBoxes[ iPoLine ].IsOut( lineBoxes[ i ]))
+      _PolyLine& L2 = _polyLineVec[ iL2 ];
+      if ( iPoLine == iL2 || lineBoxes[ iPoLine ].IsOut( lineBoxes[ iL2 ]))
         continue;
       if ( !L1._advancable && ( L1._leftLine == &L2 || L1._rightLine == &L2 ))
         continue;
@@ -786,10 +837,8 @@ bool _ViscousBuilder2D::makePolyLines()
       for ( size_t iLE = 1; iLE < L1._lEdges.size(); iLE += iDelta )
       {
         _LayerEdge& LE = L1._lEdges[iLE];
-        if ( !lineBoxes[ i ].IsOut ( LE._uvOut,
-                                     LE._uvOut + LE._normal2D * _thickness * LE._len2dTo3dRatio )
-             &&
-             !L1.IsAdjacent( L2._segments[0] ))
+        if ( !lineBoxes[ iL2 ].IsOut ( LE._uvOut,
+                                       LE._uvOut + LE._normal2D *_thickness * LE._len2dTo3dRatio ))
         {
           L1._reachableLines.push_back( & L2 );
           break;
@@ -798,7 +847,8 @@ bool _ViscousBuilder2D::makePolyLines()
     }
     // add self to _reachableLines
     Geom2dAdaptor_Curve pcurve( L1._wire->Curve2d( L1._edgeInd ));
-    if ( pcurve.GetType() != GeomAbs_Line )
+    L1._isStraight2D = ( pcurve.GetType() == GeomAbs_Line );
+    if ( !L1._isStraight2D )
     {
       // TODO: check carefully
       L1._reachableLines.push_back( & L1 );
@@ -827,14 +877,17 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
   gp_XY normL    = EL._normal2D;
   gp_XY normR    = ER._normal2D;
   gp_XY tangL ( normL.Y(), -normL.X() );
-  //gp_XY tangR ( normR.Y(), -normR.X() );
-
-  gp_XY normCommon = ( normL + normR ).Normalized(); // average normal at VERTEX
 
+  // set common direction to a VERTEX _LayerEdge shared by two _PolyLine's
+  gp_XY normCommon = ( normL * int( LL._advancable ) +
+                       normR * int( LR._advancable )).Normalized();
   EL._normal2D = normCommon;
   EL._ray.SetLocation ( EL._uvOut );
   EL._ray.SetDirection( EL._normal2D );
-
+  if ( nbAdvancableL == 1 ) { // _normal2D is true normal (not average)
+    EL._isBlocked = true; // prevent intersecting with _Segments of _advancable line
+    EL._length2D  = 0;
+  }
   // update _LayerEdge::_len2dTo3dRatio according to a new direction
   const vector<UVPtStruct>& points = LL._wire->GetUVPtStruct();
   setLenRatio( EL, SMESH_TNodeXYZ( points[ LL._lastPntInd ].node ));
@@ -843,48 +896,85 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
 
   const double dotNormTang = normR * tangL;
   const bool    largeAngle = Abs( dotNormTang ) > 0.2;
-  if ( largeAngle )
+  if ( largeAngle ) // not 180 degrees
   {
     // recompute _len2dTo3dRatio to take into account angle between EDGEs
     gp_Vec2d oldNorm( LL._advancable ? normL : normR );
-    double fact = 1. / Max( 0.3, Cos( oldNorm.Angle(  normCommon )));
-    EL._len2dTo3dRatio *= fact;
+    double angleFactor  = 1. / Max( 0.3, Cos( oldNorm.Angle( normCommon )));
+    EL._len2dTo3dRatio *= angleFactor;
     ER._len2dTo3dRatio  = EL._len2dTo3dRatio;
 
+    gp_XY normAvg = ( normL + normR ).Normalized(); // average normal at VERTEX
+
     if ( dotNormTang < 0. ) // ---------------------------- CONVEX ANGLE
     {
-      // Remove _LayerEdge's intersecting the normCommon
+      // Remove _LayerEdge's intersecting the normAvg to avoid collisions
+      // during inflate().
       //
+      // find max length of the VERTEX based _LayerEdge whose direction is normAvg
+      double maxLen2D       = _thickness * EL._len2dTo3dRatio;
       const gp_XY& pCommOut = ER._uvOut;
-      gp_XY pCommIn( pCommOut + normCommon * _thickness * EL._len2dTo3dRatio );
+      gp_XY        pCommIn  = pCommOut + normAvg * maxLen2D;
       _Segment segCommon( pCommOut, pCommIn );
       _SegmentIntersection intersection;
+      vector< const _Segment* > foundSegs;
+      for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
+      {
+        _PolyLine& L1 = _polyLineVec[ iL1 ];
+        const _SegmentTree::box_type* boxL1 = L1._segTree->getBox();
+        if ( boxL1->IsOut ( pCommOut, pCommIn ))
+          continue;
+        for ( size_t iLE = 1; iLE < L1._lEdges.size(); ++iLE )
+        {
+          foundSegs.clear();
+          L1._segTree->GetSegmentsNear( segCommon, foundSegs );
+          for ( size_t i = 0; i < foundSegs.size(); ++i )
+            if ( intersection.Compute( *foundSegs[i], segCommon ) &&
+                 intersection._param2 > 1e-10 )
+            {
+              double len2D = intersection._param2 * maxLen2D / ( 2 + L1._advancable );
+              if ( len2D < maxLen2D ) {
+                maxLen2D = len2D;
+                pCommIn  = pCommOut + normAvg * maxLen2D; // here length of segCommon changes
+              }
+            }
+        }
+      }
+
+      // remove _LayerEdge's intersecting segCommon
       for ( int isR = 0; isR < 2; ++isR ) // loop on [ LL, LR ]
       {
         _PolyLine&                 L = isR ? LR : LL;
         _PolyLine::TEdgeIterator eIt = isR ? L._lEdges.begin()+1 : L._lEdges.end()-2;
         int                      dIt = isR ? +1 : -1;
-        // at least 2 _LayerEdge's should remain in a _PolyLine (if _advancable)
-        if ( L._lEdges.size() < 3 ) continue;
+        if ( nbAdvancableL == 1 && L._advancable && normL * normR > -0.01 )
+          continue;  // obtuse internal angle
+        // at least 3 _LayerEdge's should remain in a _PolyLine
+        if ( L._lEdges.size() < 4 ) continue;
         size_t iLE = 1;
+        _SegmentIntersection lastIntersection;
         for ( ; iLE < L._lEdges.size(); ++iLE, eIt += dIt )
         {
           gp_XY uvIn = eIt->_uvOut + eIt->_normal2D * _thickness * eIt->_len2dTo3dRatio;
           _Segment segOfEdge( eIt->_uvOut, uvIn );
           if ( !intersection.Compute( segCommon, segOfEdge ))
             break;
+          lastIntersection._param1 = intersection._param1;
+          lastIntersection._param2 = intersection._param2;
         }
         if ( iLE >= L._lEdges.size () - 1 )
         {
           // all _LayerEdge's intersect the segCommon, limit inflation
           // of remaining 2 _LayerEdge's
-          vector< _LayerEdge > newEdgeVec( );
+          vector< _LayerEdge > newEdgeVec( Min( 3, L._lEdges.size() ));
           newEdgeVec.front() = L._lEdges.front();
           newEdgeVec.back()  = L._lEdges.back();
+          if ( newEdgeVec.size() == 3 )
+            newEdgeVec[1] = L._lEdges[ L._lEdges.size() / 2 ];
           L._lEdges.swap( newEdgeVec );
-          if ( !isR ) std::swap( intersection._param1 , intersection._param2 );
-          L._lEdges.front()._len2dTo3dRatio *= intersection._param1;
-          L._lEdges.back ()._len2dTo3dRatio *= intersection._param2;
+          if ( !isR ) std::swap( lastIntersection._param1 , lastIntersection._param2 );
+          L._lEdges.front()._len2dTo3dRatio *= lastIntersection._param1; // ??
+          L._lEdges.back ()._len2dTo3dRatio *= lastIntersection._param2;
         }
         else if ( iLE != 1 )
         {
@@ -893,6 +983,9 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
             LR._lEdges.erase( LR._lEdges.begin()+1, eIt );
           else
             LL._lEdges.erase( eIt, --LL._lEdges.end() );
+          // eIt = isR ? L._lEdges.begin()+1 : L._lEdges.end()-2;
+          // for ( size_t i = 1; i < iLE; ++i, eIt += dIt )
+          //   eIt->_isBlocked = true;
         }
       }
     }
@@ -900,14 +993,44 @@ void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
     {
       if ( nbAdvancableL == 1 )
       {
-        // make that the _LayerEdge at VERTEX is not shared by LL and LR
+        // make that the _LayerEdge at VERTEX is not shared by LL and LR:
+        // different normals is a sign that they are not shared
         _LayerEdge& notSharedEdge = LL._advancable ? LR._lEdges[0] : LL._lEdges.back();
+        _LayerEdge&    sharedEdge = LR._advancable ? LR._lEdges[0] : LL._lEdges.back();
+
         notSharedEdge._normal2D.SetCoord( 0.,0. );
+        sharedEdge._normal2D     = normAvg;
+        sharedEdge._isBlocked    = false;
+        notSharedEdge._isBlocked = true;
       }
     }
   }
 }
 
+//================================================================================
+/*!
+ * \brief initialize data of a _LayerEdge
+ */
+//================================================================================
+
+void _ViscousBuilder2D::setLayerEdgeData( _LayerEdge&           lEdge,
+                                          const double          u,
+                                          Handle(Geom2d_Curve)& pcurve,
+                                          const bool            reverse)
+{
+  gp_Pnt2d uv; gp_Vec2d tangent;
+  pcurve->D1( u, uv, tangent );
+  tangent.Normalize();
+  if ( reverse )
+    tangent.Reverse();
+  lEdge._uvOut = lEdge._uvIn = uv.XY();
+  lEdge._normal2D.SetCoord( -tangent.Y(), tangent.X() );
+  lEdge._ray.SetLocation( lEdge._uvOut );
+  lEdge._ray.SetDirection( lEdge._normal2D );
+  lEdge._isBlocked = false;
+  lEdge._length2D  = 0;
+}
+
 //================================================================================
 /*!
  * \brief Compute and set _LayerEdge::_len2dTo3dRatio
@@ -937,7 +1060,7 @@ bool _ViscousBuilder2D::inflate()
 {
   // Limit size of inflation step by geometry size found by
   // itersecting _LayerEdge's with _Segment's
-  double minStepSize = _thickness;
+  double minSize = _thickness, maxSize = 0;
   vector< const _Segment* > foundSegs;
   _SegmentIntersection intersection;
   for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
@@ -951,24 +1074,30 @@ bool _ViscousBuilder2D::inflate()
         foundSegs.clear();
         L2._segTree->GetSegmentsNear( L1._lEdges[iLE]._ray, foundSegs );
         for ( size_t i = 0; i < foundSegs.size(); ++i )
-          if ( ! L1.IsAdjacent( *foundSegs[i] ) &&
+          if ( ! L1.IsAdjacent( *foundSegs[i], & L1._lEdges[iLE] ) &&
                intersection.Compute( *foundSegs[i], L1._lEdges[iLE]._ray ))
           {
             double distToL2 = intersection._param2 / L1._lEdges[iLE]._len2dTo3dRatio;
-            double     step = distToL2 / ( 1 + L1._advancable + L2._advancable );
-            if ( step < minStepSize )
-              minStepSize = step;
+            double     size = distToL2 / ( 1 + L1._advancable + L2._advancable );
+            if ( size < minSize )
+              minSize = size;
+            if ( size > maxSize )
+              maxSize = size;
           }
       }
     }
   }
+  if ( minSize > maxSize ) // no collisions possible
+    maxSize = _thickness;
 #ifdef __myDEBUG
-  cout << "-- minStepSize = " << minStepSize << endl;
+  cout << "-- minSize = " << minSize << ", maxSize = " << maxSize << endl;
 #endif
 
-  double curThick = 0, stepSize = minStepSize;
+  double curThick = 0, stepSize = minSize;
   int nbSteps = 0;
-  while ( curThick < _thickness )
+  if ( maxSize > _thickness )
+    maxSize = _thickness;
+  while ( curThick < maxSize )
   {
     curThick += stepSize * 1.25;
     if ( curThick > _thickness )
@@ -979,52 +1108,101 @@ bool _ViscousBuilder2D::inflate()
     {
       _PolyLine& L = _polyLineVec[ iL ];
       if ( !L._advancable ) continue;
-      //dumpFunction(SMESH_Comment("inflate")<<data._index<<"_step"<<nbSteps); // debug
+      bool lenChange = false;
       for ( size_t iLE = L.FirstLEdge(); iLE < L._lEdges.size(); ++iLE )
-        L._lEdges[iLE].SetNewLength( curThick );
+        lenChange |= L._lEdges[iLE].SetNewLength( curThick );
       // for ( int k=0; k<L._segments.size(); ++k)
       //   cout << "( " << L._segments[k].p1().X() << ", " <<L._segments[k].p1().Y() << " ) "
       //        << "( " << L._segments[k].p2().X() << ", " <<L._segments[k].p2().Y() << " ) "
       //        << endl;
-      L._segTree.reset( new _SegmentTree( L._segments ));
-      //dumpFunctionEnd();
+      if ( lenChange )
+        L._segTree.reset( new _SegmentTree( L._segments ));
     }
 
     // Avoid intersection of _Segment's
-    minStepSize = fixCollisions( nbSteps );
-
-#ifdef __myDEBUG
-  cout << "-- minStepSize = " << minStepSize << endl;
-#endif
-    if ( minStepSize <= 0 )
+    bool allBlocked = fixCollisions();
+    if ( allBlocked )
     {
       break; // no more inflating possible
     }
-    stepSize = minStepSize;
+    stepSize = Max( stepSize , _thickness / 10. );
     nbSteps++;
   }
 
-  if (nbSteps == 0 )
-    return error("failed at the very first inflation step");
+  // if (nbSteps == 0 )
+  //   return error("failed at the very first inflation step");
+
+
+  // remove _LayerEdge's of one line intersecting with each other
+  for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
+  {
+    _PolyLine& L = _polyLineVec[ iL ];
+    if ( !L._advancable ) continue;
 
+    // replace an inactive (1st) _LayerEdge with an active one of a neighbour _PolyLine
+    if ( /*!L._leftLine->_advancable &&*/ L.IsCommonEdgeShared( *L._leftLine ) ) {
+      L._lEdges[0] = L._leftLine->_lEdges.back();
+    }
+    if ( !L._rightLine->_advancable && L.IsCommonEdgeShared( *L._rightLine ) ) {
+      L._lEdges.back() = L._rightLine->_lEdges[0];
+    }
+
+    _SegmentIntersection intersection;
+    for ( int isR = 0; ( isR < 2 && L._lEdges.size() > 2 ); ++isR )
+    {
+      int nbRemove = 0, deltaIt = isR ? -1 : +1;
+      _PolyLine::TEdgeIterator eIt = isR ? L._lEdges.end()-1 : L._lEdges.begin();
+      if ( eIt->_length2D == 0 ) continue;
+      _Segment seg1( eIt->_uvOut, eIt->_uvIn );
+      for ( eIt += deltaIt; nbRemove < L._lEdges.size()-1; eIt += deltaIt )
+      {
+        _Segment seg2( eIt->_uvOut, eIt->_uvIn );
+        if ( !intersection.Compute( seg1, seg2 ))
+          break;
+        ++nbRemove;
+      }
+      if ( nbRemove > 0 ) {
+        if ( nbRemove == L._lEdges.size()-1 ) // 1st and last _LayerEdge's intersect
+        {
+          --nbRemove;
+          _LayerEdge& L0 = L._lEdges.front();
+          _LayerEdge& L1 = L._lEdges.back();
+          L0._length2D *= intersection._param1 * 0.5;
+          L1._length2D *= intersection._param2 * 0.5;
+          L0._uvIn = L0._uvOut + L0._normal2D * L0._length2D;
+          L1._uvIn = L1._uvOut + L1._normal2D * L1._length2D;
+          if ( L.IsCommonEdgeShared( *L._leftLine ))
+            L._leftLine->_lEdges.back() = L0;
+        }
+        if ( isR )
+          L._lEdges.erase( L._lEdges.end()-nbRemove-1,
+                           L._lEdges.end()-nbRemove );
+        else
+          L._lEdges.erase( L._lEdges.begin()+1,
+                           L._lEdges.begin()+1+nbRemove );
+      }
+    }
+  }
   return true;
 }
 
 //================================================================================
 /*!
  * \brief Remove intersection of _PolyLine's
- *  \param stepNb - current step nb
- *  \retval double - next step size
  */
 //================================================================================
 
-double _ViscousBuilder2D::fixCollisions( const int stepNb )
+bool _ViscousBuilder2D::fixCollisions()
 {
   // look for intersections of _Segment's by intersecting _LayerEdge's with
   // _Segment's
-  double newStep = 1e+100;
+  //double maxStep = 0, minStep = 1e+100;
   vector< const _Segment* > foundSegs;
   _SegmentIntersection intersection;
+
+  list< pair< _LayerEdge*, double > > edgeLenLimitList;
+  list< _LayerEdge* >                 blockedEdgesList;
+
   for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
   {
     _PolyLine& L1 = _polyLineVec[ iL1 ];
@@ -1035,10 +1213,12 @@ double _ViscousBuilder2D::fixCollisions( const int stepNb )
       for ( size_t iLE = L1.FirstLEdge(); iLE < L1._lEdges.size(); ++iLE )
       {
         _LayerEdge& LE1 = L1._lEdges[iLE];
+        if ( LE1._isBlocked ) continue;
         foundSegs.clear();
         L2._segTree->GetSegmentsNear( LE1._ray, foundSegs );
         for ( size_t i = 0; i < foundSegs.size(); ++i )
-          if ( ! L1.IsAdjacent( *foundSegs[i] ) &&
+        {
+          if ( ! L1.IsAdjacent( *foundSegs[i], &LE1 ) &&
                intersection.Compute( *foundSegs[i], LE1._ray ))
           {
             const double dist2DToL2 = intersection._param2;
@@ -1047,11 +1227,12 @@ double _ViscousBuilder2D::fixCollisions( const int stepNb )
             {
               if ( newLen2D < LE1._length2D )
               {
+                blockedEdgesList.push_back( &LE1 );
                 if ( L1._advancable )
                 {
-                  LE1.SetNewLength( newLen2D / LE1._len2dTo3dRatio );
-                  L2._lEdges[ foundSegs[i]->_indexInLine     ]._isBlocked = true;
-                  L2._lEdges[ foundSegs[i]->_indexInLine + 1 ]._isBlocked = true;
+                  edgeLenLimitList.push_back( make_pair( &LE1, newLen2D ));
+                  blockedEdgesList.push_back( &L2._lEdges[ foundSegs[i]->_indexInLine     ]);
+                  blockedEdgesList.push_back( &L2._lEdges[ foundSegs[i]->_indexInLine + 1 ]);
                 }
                 else // here dist2DToL2 < 0 and LE1._length2D == 0
                 {
@@ -1061,26 +1242,42 @@ double _ViscousBuilder2D::fixCollisions( const int stepNb )
                   intersection.Compute( outSeg2, LE1._ray );
                   newLen2D = intersection._param2 / 2;
 
-                  LE2[0].SetNewLength( newLen2D / LE2[0]._len2dTo3dRatio );
-                  LE2[0]._isBlocked = true;
-                  LE2[1].SetNewLength( newLen2D / LE2[1]._len2dTo3dRatio );
-                  LE2[1]._isBlocked = true;
+                  edgeLenLimitList.push_back( make_pair( &LE2[0], newLen2D ));
+                  edgeLenLimitList.push_back( make_pair( &LE2[1], newLen2D ));
                 }
               }
-              LE1._isBlocked = true; // !! after SetNewLength()
-            }
-            else
-            {
-              double step2D = newLen2D - LE1._length2D;
-              double step   = step2D / LE1._len2dTo3dRatio;
-              if ( step < newStep )
-                newStep = step;
             }
           }
+        }
       }
     }
   }
-  return newStep;
+
+  // set limited length to _LayerEdge's
+  list< pair< _LayerEdge*, double > >::iterator edge2Len = edgeLenLimitList.begin();
+  for ( ; edge2Len != edgeLenLimitList.end(); ++edge2Len )
+  {
+    _LayerEdge* LE = edge2Len->first;
+    LE->SetNewLength( edge2Len->second / LE->_len2dTo3dRatio );
+    LE->_isBlocked = true;
+  }
+
+  // block inflation of _LayerEdge's
+  list< _LayerEdge* >::iterator edge = blockedEdgesList.begin();
+  for ( ; edge != blockedEdgesList.end(); ++edge )
+    (*edge)->_isBlocked = true;
+
+  // find a not blocked _LayerEdge
+  for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
+  {
+    _PolyLine& L = _polyLineVec[ iL ];
+    if ( !L._advancable ) continue;
+    for ( size_t iLE = L.FirstLEdge(); iLE < L._lEdges.size(); ++iLE )
+      if ( !L._lEdges[ iLE ]._isBlocked )
+        return false;
+  }
+
+  return true;
 }
 
 //================================================================================
@@ -1092,7 +1289,7 @@ double _ViscousBuilder2D::fixCollisions( const int stepNb )
 
 bool _ViscousBuilder2D::shrink()
 {
-  gp_Pnt2d uv; gp_Vec2d tangent;
+  gp_Pnt2d uv; //gp_Vec2d tangent;
   _SegmentIntersection intersection;
   double sign;
 
@@ -1101,7 +1298,8 @@ bool _ViscousBuilder2D::shrink()
     _PolyLine& L = _polyLineVec[ iL1 ]; // line with no layers
     if ( L._advancable )
       continue;
-    if ( !L._rightLine->_advancable && !L._leftLine->_advancable )
+    const int nbAdvancable = ( L._rightLine->_advancable + L._leftLine->_advancable );
+    if ( nbAdvancable == 0 )
       continue;
 
     const TopoDS_Edge&        E = L._wire->Edge      ( L._edgeInd );
@@ -1116,67 +1314,66 @@ bool _ViscousBuilder2D::shrink()
 
     // Check a FACE adjacent to _face by E
     bool existingNodesFound = false;
+    TopoDS_Face adjFace;
     PShapeIteratorPtr faceIt = _helper.GetAncestors( E, *_mesh, TopAbs_FACE );
     while ( const TopoDS_Shape* f = faceIt->next() )
       if ( !_face.IsSame( *f ))
       {
-        SMESH_ProxyMesh::Ptr pm = _ProxyMeshHolder::FindProxyMeshOfFace( *f, *_mesh );
+        adjFace = TopoDS::Face( *f );
+        SMESH_ProxyMesh::Ptr pm = _ProxyMeshHolder::FindProxyMeshOfFace( adjFace, *_mesh );
         if ( !pm || pm->NbProxySubMeshes() == 0 )
         {
           // There are no viscous layers on an adjacent FACE, clear it's 2D mesh
-          removeMeshFaces( *f );
+          removeMeshFaces( adjFace );
         }
         else
         {
-          // There are viscous layers on the adjacent FACE;
-          // look for already shrinked segments on E
-          const SMESH_ProxyMesh::SubMesh* adjEdgeSM = pm->GetProxySubMesh( E );
-          if ( adjEdgeSM && adjEdgeSM->NbElements() > 0 )
+          // There are viscous layers on the adjacent FACE; shrink must be already done;
+          //
+          // copy layer nodes
+          //
+          const vector<UVPtStruct>& points = L._wire->GetUVPtStruct();
+          int iPFrom = L._firstPntInd, iPTo = L._lastPntInd;
+          if ( L._leftLine->_advancable )
           {
-            existingNodesFound = true;
-
-            // copy data of moved nodes to my _ProxyMeshOfFace
-            const UVPtStructVec& adjNodeData = adjEdgeSM->GetUVPtStructVec();
-            UVPtStructVec nodeDataVec( adjNodeData.size() );
-            for ( size_t iP = 0, iAdj = adjNodeData.size(); iP < nodeDataVec.size(); ++iP )
-            {
-              nodeDataVec[ iP ] = adjNodeData[ --iAdj ];
-              gp_Pnt2d uv = pcurve->Value( nodeDataVec[ iP ].param );
-              nodeDataVec[iP].u = uv.X();
-              nodeDataVec[iP].v = uv.Y();
-              nodeDataVec[iP].normParam = 1 - nodeDataVec[iP].normParam;
+            vector<gp_XY>& uvVec = L._lEdges.front()._uvRefined;
+            for ( int i = 0; i < _hyp->GetNumberLayers(); ++i ) {
+              const UVPtStruct& uvPt = points[ iPFrom + i + 1 ];
+              L._leftNodes.push_back( uvPt.node );
+              uvVec.push_back ( pcurve->Value( uvPt.param ).XY() );
             }
-            _ProxyMeshOfFace::_EdgeSubMesh* myEdgeSM = getProxyMesh()->GetEdgeSubMesh( edgeID );
-            myEdgeSM->SetUVPtStructVec( nodeDataVec );
-
-            // copy layer nodes
-            map< double, const SMDS_MeshNode* > u2layerNodes;
-            SMESH_Algo::GetSortedNodesOnEdge( getMeshDS(), E, /*skipMedium=*/true, u2layerNodes );
-            // u2layerNodes includes nodes on vertices, layer nodes and shrinked nodes
-            vector< std::pair< double, const SMDS_MeshNode* > > layerUNodes;
-            layerUNodes.resize( u2layerNodes.size() - 2 ); // skip vertex nodes
-            map< double, const SMDS_MeshNode* >::iterator u2n = u2layerNodes.begin();
-            size_t iBeg = 0, iEnd = layerUNodes.size() - 1, *pIndex = edgeReversed ? &iEnd : &iBeg;
-            for ( ++u2n; iBeg < u2layerNodes.size()-2; ++u2n, ++iBeg, --iEnd ) {
-              layerUNodes[ *pIndex ] = *u2n;
-            }
-            if ( L._leftLine->_advancable && layerUNodes.size() >= _hyp->GetNumberLayers() )
-            {
-              vector<gp_XY>& uvVec = L._lEdges.front()._uvRefined;
-              for ( int i = 0; i < _hyp->GetNumberLayers(); ++i ) {
-                L._leftNodes.push_back( layerUNodes[i].second );
-                uvVec.push_back ( pcurve->Value( layerUNodes[i].first ).XY() );
-              }
-            }
-            if ( L._rightLine->_advancable && layerUNodes.size() >= 2*_hyp->GetNumberLayers() )
-            {
-              vector<gp_XY>& uvVec = L._lEdges.back()._uvRefined;
-              for ( int i = 0, j = layerUNodes.size()-1; i < _hyp->GetNumberLayers(); ++i, --j ) {
-                L._rightNodes.push_back( layerUNodes[j].second );
-                uvVec.push_back ( pcurve->Value( layerUNodes[j].first ).XY() );
-              }
+          }
+          if ( L._rightLine->_advancable )
+          {
+            vector<gp_XY>& uvVec = L._lEdges.back()._uvRefined;
+            for ( int i = 0; i < _hyp->GetNumberLayers(); ++i ) {
+              const UVPtStruct& uvPt = points[ iPTo - i - 1 ];
+              L._rightNodes.push_back( uvPt.node );
+              uvVec.push_back ( pcurve->Value( uvPt.param ).XY() );
             }
           }
+          // make proxy sub-mesh data of present nodes
+          //
+          if ( L._leftLine->_advancable )  iPFrom += _hyp->GetNumberLayers();
+          if ( L._rightLine->_advancable ) iPTo   -= _hyp->GetNumberLayers();
+          UVPtStructVec nodeDataVec( & points[ iPFrom ], & points[ iPTo + 1 ]);
+
+          double normSize = nodeDataVec.back().normParam - nodeDataVec.front().normParam;
+          for ( int iP = nodeDataVec.size()-1; iP >= 0 ; --iP )
+            nodeDataVec[iP].normParam =
+              ( nodeDataVec[iP].normParam - nodeDataVec[0].normParam ) / normSize;
+
+          const SMDS_MeshNode* n = nodeDataVec.front().node;
+          if ( n->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+            nodeDataVec.front().param = L._wire->FirstU( L._edgeInd );
+          n = nodeDataVec.back().node;
+          if ( n->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX )
+            nodeDataVec.back().param = L._wire->LastU( L._edgeInd );
+
+          _ProxyMeshOfFace::_EdgeSubMesh* myEdgeSM = getProxyMesh()->GetEdgeSubMesh( edgeID );
+          myEdgeSM->SetUVPtStructVec( nodeDataVec );
+
+          existingNodesFound = true;
         }
       } // loop on FACEs sharing E
 
@@ -1186,10 +1383,21 @@ bool _ViscousBuilder2D::shrink()
     double u1 = L._wire->FirstU( L._edgeInd ), uf = u1;
     double u2 = L._wire->LastU ( L._edgeInd ), ul = u2;
 
-    // Get length of existing segments (from edge start to node) and their nodes
+    // a ratio to pass 2D <--> 1D
+    const double len1D = 1e-3;
+    const double len2D = pcurve->Value(uf).Distance( pcurve->Value(uf+len1D));
+    double len1dTo2dRatio = len1D / len2D;
+
+    // create a vector of proxy nodes
     const vector<UVPtStruct>& points = L._wire->GetUVPtStruct();
-    UVPtStructVec   nodeDataVec( & points[ L._firstPntInd ],
-                                 & points[ L._lastPntInd + 1 ]);
+    UVPtStructVec nodeDataVec( & points[ L._firstPntInd ],
+                               & points[ L._lastPntInd + 1 ]);
+    nodeDataVec.front().param = u1; // U on vertex is correct on only one of shared edges
+    nodeDataVec.back ().param = u2;
+    nodeDataVec.front().normParam = 0;
+    nodeDataVec.back ().normParam = 1;
+
+    // Get length of existing segments (from an edge start to a node) and their nodes
     vector< double > segLengths( nodeDataVec.size() - 1 );
     BRepAdaptor_Curve curve( E );
     for ( size_t iP = 1; iP < nodeDataVec.size(); ++iP )
@@ -1198,6 +1406,9 @@ bool _ViscousBuilder2D::shrink()
       segLengths[ iP-1 ] = len;
     }
 
+    // Move first and last parameters on EDGE (U of n1) according to layers' thickness
+    // and create nodes of layers on EDGE ( -x-x-x )
+
     // Before
     //  n1    n2    n3    n4
     //  x-----x-----x-----x-----
@@ -1208,49 +1419,89 @@ bool _ViscousBuilder2D::shrink()
     //  x-x-x-x-----x-----x----
     //  | | | |  e1    e2    e3
 
-    // Move first and last parameters on EDGE (U of n1) according to layers' thickness
-    // and create nodes of layers on EDGE ( -x-x-x )
+    int isRShrinkedForAdjacent;
+    UVPtStructVec nodeDataForAdjacent;
     for ( int isR = 0; isR < 2; ++isR )
     {
       _PolyLine* L2 = isR ? L._rightLine : L._leftLine; // line with layers
-      if ( !L2->_advancable ) continue;
+      if ( !L2->_advancable &&
+           !toShrinkForAdjacent( adjFace, E, L._wire->FirstVertex( L._edgeInd + isR )))
+        continue;
 
       double & u = isR ? u2 : u1; // param to move
       double  u0 = isR ? ul : uf; // init value of the param to move
       int  iPEnd = isR ? nodeDataVec.size() - 1 : 0;
 
+      _LayerEdge& nearLE = isR ? L._lEdges.back() : L._lEdges.front();
+      _LayerEdge&  farLE = isR ? L._lEdges.front() : L._lEdges.back();
+
       // try to find length of advancement along L by intersecting L with
       // an adjacent _Segment of L2
 
-      double length2D;
+      double& length2D = nearLE._length2D;
+      double  length1D = 0;
       sign = ( isR ^ edgeReversed ) ? -1. : 1.;
-      pcurve->D1( u, uv, tangent );
-
-      gp_Ax2d      edgeRay( uv, tangent * sign );
-      const _Segment& seg2( isR ? L2->_segments.front() : L2->_segments.back() );
-      // make an elongated seg2
-      gp_XY seg2Vec( seg2.p2() - seg2.p1() );
-      gp_XY longSeg2p1 = seg2.p1() - 1000 * seg2Vec;
-      gp_XY longSeg2p2 = seg2.p2() + 1000 * seg2Vec;
-      _Segment longSeg2( longSeg2p1, longSeg2p2 );
-      if ( intersection.Compute( longSeg2, edgeRay )) // convex VERTEX
+
+      bool isConvex = false;
+      if ( L2->_advancable )
       {
-        length2D = intersection._param2; // |L  seg2     
-                                         // |  o---o--- 
-                                         // | /    |    
-                                         // |/     |  L2
-                                         // x------x--- 
+        const uvPtStruct& tang2P1 = points[ isR ? L2->_firstPntInd   : L2->_lastPntInd ];
+        const uvPtStruct& tang2P2 = points[ isR ? L2->_firstPntInd+1 : L2->_lastPntInd-1 ];
+        gp_XY seg2Dir( tang2P2.u - tang2P1.u,
+                       tang2P2.v - tang2P1.v );
+        int iFSeg2 = isR ? 0 : L2->_segments.size() - 1;
+        int iLSeg2 = isR ? 1 : L2->_segments.size() - 2;
+        gp_XY uvLSeg2In  = L2->_lEdges[ iLSeg2 ]._uvIn;
+        Handle(Geom2d_Line) seg2Line = new Geom2d_Line( uvLSeg2In, seg2Dir );
+
+        Geom2dAdaptor_Curve edgeCurve( pcurve, Min( uf, ul ), Max( uf, ul ));
+        Geom2dAdaptor_Curve seg2Curve( seg2Line );
+        Geom2dInt_GInter     curveInt( edgeCurve, seg2Curve, 1e-7, 1e-7 );
+        isConvex = ( curveInt.IsDone() && !curveInt.IsEmpty() );
+        if ( isConvex ) {
+          /*                   convex VERTEX */
+          length1D = Abs( u - curveInt.Point( 1 ).ParamOnFirst() );
+          double maxDist2d = 2 * L2->_lEdges[ iLSeg2 ]._length2D;
+          isConvex = ( length1D < maxDist2d * len1dTo2dRatio );
+                                                  /*  |L  seg2     
+                                                   *  |  o---o--- 
+                                                   *  | /    |    
+                                                   *  |/     |  L2
+                                                   *  x------x---      */
+        }
+        if ( !isConvex ) { /* concave VERTEX */   /*  o-----o--- 
+                                                   *   \    |    
+                                                   *    \   |  L2
+                                                   *     x--x--- 
+                                                   *    /        
+                                                   * L /               */
+          length2D = L2->_lEdges[ iFSeg2 ]._length2D;
+          //if ( L2->_advancable ) continue;
+        }
       }
-      else  // concave VERTEX            //  o-----o--- 
-      {                                  //   \    |    
-                                         //    \   |  L2
-                                         //     x--x--- 
-                                         //    /        
-                                         // L /         
-        length2D = ( isR ? L2->_lEdges.front() : L2->_lEdges.back() )._length2D;
+      else // L2 is advancable but in the face adjacent by L
+      {
+        length2D = farLE._length2D;
+        if ( length2D == 0 ) {
+          _LayerEdge& neighborLE =
+            ( isR ? L._leftLine->_lEdges.back() : L._rightLine->_lEdges.front() );
+          length2D = neighborLE._length2D;
+          if ( length2D == 0 )
+            length2D = _thickness * nearLE._len2dTo3dRatio;
+        }
       }
-       // move u to the internal boundary of layers
-      u += length2D * sign;
+
+      // move u to the internal boundary of layers
+      //  u --> u
+      //  x-x-x-x-----x-----x----
+      double maxLen3D = Min( _thickness, edgeLen / ( 1 + nbAdvancable ));
+      double maxLen2D = maxLen3D * nearLE._len2dTo3dRatio;
+      if ( !length2D ) length2D = length1D / len1dTo2dRatio;
+      if ( Abs( length2D ) > maxLen2D )
+        length2D = maxLen2D;
+      nearLE._uvIn = nearLE._uvOut + nearLE._normal2D * length2D;
+
+      u += length2D * len1dTo2dRatio * sign;
       nodeDataVec[ iPEnd ].param = u;
 
       gp_Pnt2d newUV = pcurve->Value( u );
@@ -1266,6 +1517,7 @@ bool _ViscousBuilder2D::shrink()
         params[ i ] = u0 + heights[ i ];
 
       // create nodes of layers and edges between them
+      //  x-x-x-x---
       vector< const SMDS_MeshNode* >& layersNode = isR ? L._rightNodes : L._leftNodes;
       vector<gp_XY>& nodeUV = ( isR ? L._lEdges.back() : L._lEdges[0] )._uvRefined;
       nodeUV.resize    ( _hyp->GetNumberLayers() );
@@ -1281,6 +1533,24 @@ bool _ViscousBuilder2D::shrink()
         prevNode = layersNode[ i ];
       }
 
+      // store data of layer nodes made for adjacent FACE
+      if ( !L2->_advancable )
+      {
+        isRShrinkedForAdjacent = isR;
+        nodeDataForAdjacent.resize( _hyp->GetNumberLayers() );
+
+        size_t iFrw = 0, iRev = nodeDataForAdjacent.size()-1, *i = isR ? &iRev : &iFrw;
+        nodeDataForAdjacent[ *i ] = points[ isR ? L._lastPntInd : L._firstPntInd ];
+        nodeDataForAdjacent[ *i ].param     = u0;
+        nodeDataForAdjacent[ *i ].normParam = isR;
+        for ( ++iFrw, --iRev; iFrw < layersNode.size(); ++iFrw, --iRev )
+        {
+          nodeDataForAdjacent[ *i ].node  = layersNode[ iFrw - 1 ];
+          nodeDataForAdjacent[ *i ].u     = nodeUV    [ iFrw - 1 ].X();
+          nodeDataForAdjacent[ *i ].v     = nodeUV    [ iFrw - 1 ].Y();
+          nodeDataForAdjacent[ *i ].param = params    [ iFrw - 1 ];
+        }
+      }
       // replace a node on vertex by a node of last (most internal) layer
       // in a segment on E
       SMDS_ElemIteratorPtr segIt = vertexNode->GetInverseElementIterator( SMDSAbs_Edge );
@@ -1305,8 +1575,8 @@ bool _ViscousBuilder2D::shrink()
 
     // Shrink edges to fit in between the layers at EDGE ends
 
-    const double newLength = GCPnts_AbscissaPoint::Length( curve, u1, u2 );
-    const double lenRatio  = newLength / edgeLen * ( edgeReversed ? -1. : 1. );
+    double newLength = GCPnts_AbscissaPoint::Length( curve, u1, u2 );
+    double lenRatio  = newLength / edgeLen * ( edgeReversed ? -1. : 1. );
     for ( size_t iP = 1; iP < nodeDataVec.size()-1; ++iP )
     {
       const SMDS_MeshNode* oldNode = nodeDataVec[iP].node;
@@ -1330,8 +1600,93 @@ bool _ViscousBuilder2D::shrink()
       nodeDataVec[iP].u         = newUV.X();
       nodeDataVec[iP].v         = newUV.Y();
       nodeDataVec[iP].normParam = segLengths[iP-1] / edgeLen;
-      nodeDataVec[iP].x         = segLengths[iP-1] / edgeLen;
-      nodeDataVec[iP].y         = segLengths[iP-1] / edgeLen;
+      // nodeDataVec[iP].x         = segLengths[iP-1] / edgeLen;
+      // nodeDataVec[iP].y         = segLengths[iP-1] / edgeLen;
+    }
+
+    // Add nodeDataForAdjacent to nodeDataVec
+
+    if ( !nodeDataForAdjacent.empty() )
+    {
+      const double par1      = isRShrinkedForAdjacent ? u2 : uf;
+      const double par2      = isRShrinkedForAdjacent ? ul : u1;
+      const double shrinkLen = GCPnts_AbscissaPoint::Length( curve, par1, par2 );
+
+      // compute new normParam for nodeDataVec
+      for ( size_t iP = 0; iP < nodeDataVec.size()-1; ++iP )
+        nodeDataVec[iP+1].normParam = segLengths[iP] / ( edgeLen + shrinkLen );
+      double normDelta = 1 - nodeDataVec.back().normParam;
+      if ( !isRShrinkedForAdjacent )
+        for ( size_t iP = 0; iP < nodeDataVec.size(); ++iP )
+          nodeDataVec[iP].normParam += normDelta;
+
+      // compute new normParam for nodeDataForAdjacent
+      const double deltaR = isRShrinkedForAdjacent ? nodeDataVec.back().normParam : 0;
+      for ( size_t iP = !isRShrinkedForAdjacent; iP < nodeDataForAdjacent.size(); ++iP )
+      {
+        double lenFromPar1 =
+          GCPnts_AbscissaPoint::Length( curve, par1, nodeDataForAdjacent[iP].param );
+        nodeDataForAdjacent[iP].normParam = deltaR + normDelta * lenFromPar1 / shrinkLen;
+      }
+      // concatenate nodeDataVec and nodeDataForAdjacent
+      nodeDataVec.insert(( isRShrinkedForAdjacent ? nodeDataVec.end() : nodeDataVec.begin() ),
+                          nodeDataForAdjacent.begin(), nodeDataForAdjacent.end() );
+    }
+
+    // Extend nodeDataVec by a node located at the end of not shared _LayerEdge
+    /*      n - to add to nodeDataVec
+     *      o-----o--- 
+     *      |\    |    
+     *      | o---o---
+     *      | |x--x--- L2
+     *      | /        
+     *      |/ L
+     *      x
+     *     /    */
+    for ( int isR = 0; isR < 2; ++isR )
+    {
+      _PolyLine& L2 = *( isR ? L._rightLine : L._leftLine ); // line with layers
+      if ( ! L2._advancable || L.IsCommonEdgeShared( L2 ) )
+        continue;
+      vector< const SMDS_MeshNode* >& layerNodes2 = isR ? L2._leftNodes : L2._rightNodes;
+      _LayerEdge& LE2 = isR ? L2._lEdges.front() : L2._lEdges.back();
+      if ( layerNodes2.empty() )
+      {
+        // refine the not shared _LayerEdge
+        vector<double> layersHeight;
+        calcLayersHeight( LE2._length2D, layersHeight );
+
+        vector<gp_XY>& nodeUV2 = LE2._uvRefined;
+        nodeUV2.resize    ( _hyp->GetNumberLayers() );
+        layerNodes2.resize( _hyp->GetNumberLayers() );
+        for ( size_t i = 0; i < layersHeight.size(); ++i )
+        {
+          gp_XY uv = LE2._uvOut + LE2._normal2D * layersHeight[i];
+          gp_Pnt p = _surface->Value( uv.X(), uv.Y() );
+          nodeUV2    [ i ] = uv;
+          layerNodes2[ i ] = _helper.AddNode( p.X(), p.Y(), p.Z(), /*id=*/0, uv.X(), uv.Y() );
+        }
+      }
+      UVPtStruct ptOfNode;
+      ptOfNode.u         = LE2._uvRefined.back().X();
+      ptOfNode.v         = LE2._uvRefined.back().Y();
+      ptOfNode.node      = layerNodes2.back();
+      ptOfNode.param     = isR ? ul : uf;
+      ptOfNode.normParam = isR ? 1 : 0;
+
+      nodeDataVec.insert(( isR ? nodeDataVec.end() : nodeDataVec.begin() ), ptOfNode );
+
+      // recompute normParam of nodes in nodeDataVec
+      newLength = GCPnts_AbscissaPoint::Length( curve, 
+                                                nodeDataVec.front().param,
+                                                nodeDataVec.back().param);
+      for ( size_t iP = 1; iP < nodeDataVec.size(); ++iP )
+      {
+        const double len = GCPnts_AbscissaPoint::Length( curve,
+                                                         nodeDataVec.front().param,
+                                                         nodeDataVec[iP].param );
+        nodeDataVec[iP].normParam = len / newLength;
+      }
     }
 
     // create a proxy sub-mesh containing the moved nodes
@@ -1347,6 +1702,37 @@ bool _ViscousBuilder2D::shrink()
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Returns true if there will be a shrinked mesh on EDGE E of FACE adjFace
+ *        near VERTEX V
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::toShrinkForAdjacent( const TopoDS_Face&   adjFace,
+                                             const TopoDS_Edge&   E,
+                                             const TopoDS_Vertex& V)
+{
+  if ( const StdMeshers_ViscousLayers2D* vlHyp = findHyp( *_mesh, adjFace ))
+  {
+    VISCOUS_2D::_ViscousBuilder2D builder( *_mesh, adjFace, vlHyp );
+    builder._faceSideVec = StdMeshers_FaceSide::GetFaceWires( adjFace, *_mesh, true, _error );
+    builder.findEdgesWithLayers();
+
+    PShapeIteratorPtr edgeIt = _helper.GetAncestors( V, *_mesh, TopAbs_EDGE );
+    while ( const TopoDS_Shape* edgeAtV = edgeIt->next() )
+    {
+      if ( !edgeAtV->IsSame( E ) &&
+           _helper.IsSubShape( *edgeAtV, adjFace ) &&
+           !builder._ignoreShapeIds.count( getMeshDS()->ShapeToIndex( *edgeAtV )))
+      {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+  
 //================================================================================
 /*!
  * \brief Make faces
@@ -1355,9 +1741,6 @@ bool _ViscousBuilder2D::shrink()
 
 bool _ViscousBuilder2D::refine()
 {
-  // remove elements and nodes from _face
-  removeMeshFaces( _face );
-
   // store a proxyMesh in a sub-mesh
   // make faces on each _PolyLine
   vector< double > layersHeight;
@@ -1367,20 +1750,59 @@ bool _ViscousBuilder2D::refine()
     _PolyLine& L = _polyLineVec[ iL ];
     if ( !L._advancable ) continue;
 
-    //if ( L._leftLine->_advancable ) L._lEdges[0] = L._leftLine->_lEdges.back();
-
-    // calculate intermediate UV on _LayerEdge's ( _LayerEdge::_uvRefined )
+    // replace an inactive (1st) _LayerEdge with an active one of a neighbour _PolyLine
     size_t iLE = 0, nbLE = L._lEdges.size();
-    if ( /*!L._leftLine->_advancable &&*/ L.IsCommonEdgeShared( *L._leftLine ))
+    const bool leftEdgeShared  = L.IsCommonEdgeShared( *L._leftLine );
+    const bool rightEdgeShared = L.IsCommonEdgeShared( *L._rightLine );
+    if ( /*!L._leftLine->_advancable &&*/ leftEdgeShared )
     {
       L._lEdges[0] = L._leftLine->_lEdges.back();
       iLE += int( !L._leftLine->_advancable );
     }
-    if ( !L._rightLine->_advancable && L.IsCommonEdgeShared( *L._rightLine ))
+    if ( !L._rightLine->_advancable && rightEdgeShared )
     {
       L._lEdges.back() = L._rightLine->_lEdges[0];
       --nbLE;
     }
+
+    // limit length of neighbour _LayerEdge's to avoid sharp change of layers thickness
+    vector< double > segLen( L._lEdges.size() );
+    segLen[0] = 0.0;
+    for ( size_t i = 1; i < segLen.size(); ++i )
+    {
+      // accumulate length of segments
+      double sLen = (L._lEdges[i-1]._uvOut - L._lEdges[i]._uvOut ).Modulus();
+      segLen[i] = segLen[i-1] + sLen;
+    }
+    for ( int isR = 0; isR < 2; ++isR )
+    {
+      size_t iF = 0, iL = L._lEdges.size()-1;
+      size_t *i = isR ? &iL : &iF;
+      //size_t iRef = *i;
+      _LayerEdge* prevLE = & L._lEdges[ *i ];
+      double weight = 0;
+      for ( ++iF, --iL; iF < L._lEdges.size()-1; ++iF, --iL )
+      {
+        _LayerEdge& LE = L._lEdges[*i];
+        if ( prevLE->_length2D > 0 ) {
+          gp_XY tangent ( LE._normal2D.Y(), -LE._normal2D.X() );
+          weight += Abs( tangent * ( prevLE->_uvIn - LE._uvIn )) / segLen.back();
+          gp_XY prevTang = ( LE._uvOut - prevLE->_uvOut );
+          gp_XY prevNorm    = gp_XY( -prevTang.Y(), prevTang.X() );
+          double prevProj   = prevNorm * ( prevLE->_uvIn - prevLE->_uvOut );
+          if ( prevProj > 0 ) {
+            prevProj /= prevTang.Modulus();
+            if ( LE._length2D < prevProj )
+              weight += 0.75 * ( 1 - weight ); // length decrease is more preferable
+            LE._length2D  = weight * LE._length2D + ( 1 - weight ) * prevProj;
+            LE._uvIn = LE._uvOut + LE._normal2D * LE._length2D;
+          }
+        }
+        prevLE = & LE;
+      }
+    }
+
+    // calculate intermediate UV on _LayerEdge's ( _LayerEdge::_uvRefined )
     for ( ; iLE < nbLE; ++iLE )
     {
       _LayerEdge& LE = L._lEdges[iLE];
@@ -1413,13 +1835,15 @@ bool _ViscousBuilder2D::refine()
 
     // Create layers of faces
 
-    int hasLeftNode  = ( !L._leftLine->_rightNodes.empty() );
-    int hasRightNode = ( !L._rightLine->_leftNodes.empty() );
-    size_t iS, iN0 = hasLeftNode, nbN = innerNodes.size() - hasRightNode;
-    L._leftNodes .resize( _hyp->GetNumberLayers() );
-    L._rightNodes.resize( _hyp->GetNumberLayers() );
-    vector< double > segLen( L._lEdges.size() );
-    segLen[0] = 0.0;
+    bool hasLeftNode  = ( !L._leftLine->_rightNodes.empty() && leftEdgeShared  );
+    bool hasRightNode = ( !L._rightLine->_leftNodes.empty() && rightEdgeShared );
+    bool hasOwnLeftNode  = ( !L._leftNodes.empty() );
+    bool hasOwnRightNode = ( !L._rightNodes.empty() );
+    size_t iS,
+      iN0 = ( hasLeftNode || hasOwnLeftNode || _polyLineVec.size() == 1 ),
+      nbN = innerNodes.size() - ( hasRightNode || hasOwnRightNode );
+    L._leftNodes .reserve( _hyp->GetNumberLayers() );
+    L._rightNodes.reserve( _hyp->GetNumberLayers() );
     for ( int iF = 0; iF < _hyp->GetNumberLayers(); ++iF ) // loop on layers of faces
     {
       // get accumulated length of intermediate segments
@@ -1432,7 +1856,7 @@ bool _ViscousBuilder2D::refine()
       for ( iS = 1; iS < segLen.size(); ++iS )
         segLen[iS] /= segLen.back();
 
-      // create innerNodes
+      // create innerNodes of a current layer
       iS = 0;
       for ( size_t i = iN0; i < nbN; ++i )
       {
@@ -1443,19 +1867,42 @@ bool _ViscousBuilder2D::refine()
         gp_Pnt p = _surface->Value( uv.X(), uv.Y() );
         innerNodes[i] = _helper.AddNode( p.X(), p.Y(), p.Z(), /*id=*/0, uv.X(), uv.Y() );
       }
-      if ( hasLeftNode ) innerNodes.front() = L._leftLine->_rightNodes[ iF ];
-      if ( hasRightNode ) innerNodes.back() = L._rightLine->_leftNodes[ iF ];
-      L._rightNodes[ iF ] = innerNodes.back();
-      L._leftNodes [ iF ] = innerNodes.front();
+      // use nodes created for adjacent _PolyLine's
+      if ( hasOwnLeftNode )    innerNodes.front() = L._leftNodes [ iF ];
+      else if ( hasLeftNode )  innerNodes.front() = L._leftLine->_rightNodes[ iF ];
+      if ( hasOwnRightNode )   innerNodes.back()  = L._rightNodes[ iF ];
+      else if ( hasRightNode ) innerNodes.back()  = L._rightLine->_leftNodes[ iF ];
+      if ( _polyLineVec.size() == 1 ) innerNodes.front() = innerNodes.back(); // circle
+      if ( !hasOwnLeftNode )  L._leftNodes.push_back( innerNodes.front() );
+      if ( !hasOwnRightNode ) L._rightNodes.push_back( innerNodes.back() );
 
       // create faces
       // TODO care of orientation
       for ( size_t i = 1; i < innerNodes.size(); ++i )
-        _helper.AddFace( outerNodes[ i-1 ], outerNodes[ i ],
-                         innerNodes[ i ],   innerNodes[ i-1 ]);
+        if ( SMDS_MeshElement* f = _helper.AddFace( outerNodes[ i-1 ], outerNodes[ i ],
+                                                    innerNodes[ i ],   innerNodes[ i-1 ]))
+          L._newFaces.insert( L._newFaces.end(), f );
 
       outerNodes.swap( innerNodes );
     }
+    // faces between not shared _LayerEdge's (at concave VERTEX)
+    for ( int isR = 0; isR < 2; ++isR )
+    {
+      if ( isR ? rightEdgeShared : leftEdgeShared )
+        continue;
+      vector< const SMDS_MeshNode* > &
+        lNodes = (isR ? L._rightNodes : L._leftLine->_rightNodes ),
+        rNodes = (isR ? L._rightLine->_leftNodes : L._leftNodes );
+      if ( lNodes.empty() || rNodes.empty() || lNodes.size() != rNodes.size() )
+        continue;
+
+      for ( size_t i = 1; i < lNodes.size(); ++i )
+        _helper.AddFace( lNodes[ i-1 ], rNodes[ i-1 ],
+                         rNodes[ i ],   lNodes[ i ]);
+
+      const UVPtStruct& ptOnVertex = points[ isR ? L._lastPntInd : L._firstPntInd ];
+      _helper.AddFace( ptOnVertex.node, rNodes[ 0 ], lNodes[ 0 ]);
+    }
 
     // Fill the _ProxyMeshOfFace
 
@@ -1483,23 +1930,79 @@ bool _ViscousBuilder2D::refine()
   return true;
 }
 
+//================================================================================
+/*!
+ * \brief Improve quality of the created mesh elements
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::improve()
+{
+  if ( !_proxyMesh )
+    return false;
+
+  // fixed nodes on EDGE's
+  std::set<const SMDS_MeshNode*> fixedNodes;
+  for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
+  {
+    StdMeshers_FaceSidePtr      wire = _faceSideVec[ iWire ];
+    const vector<UVPtStruct>& points = wire->GetUVPtStruct();
+    for ( size_t i = 0; i < points.size(); ++i )
+      fixedNodes.insert( fixedNodes.end(), points[i].node );
+  }
+  // fixed proxy nodes
+  for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
+  {
+    _PolyLine&         L = _polyLineVec[ iL ];
+    const TopoDS_Edge& E = L._wire->Edge( L._edgeInd );
+    if ( const SMESH_ProxyMesh::SubMesh* sm = _proxyMesh->GetProxySubMesh( E ))
+    {
+      const UVPtStructVec& points = sm->GetUVPtStructVec();
+      for ( size_t i = 0; i < points.size(); ++i )
+        fixedNodes.insert( fixedNodes.end(), points[i].node );
+    }
+    for ( size_t i = 0; i < L._rightNodes.size(); ++i )
+      fixedNodes.insert( fixedNodes.end(), L._rightNodes[i] );
+  }
+
+  // smoothing
+  SMESH_MeshEditor editor( _mesh );
+  for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
+  {
+    _PolyLine& L = _polyLineVec[ iL ];
+    if ( L._isStraight2D ) continue;
+    // SMESH_MeshEditor::SmoothMethod how =
+    //   L._isStraight2D ? SMESH_MeshEditor::LAPLACIAN : SMESH_MeshEditor::CENTROIDAL;
+    //editor.Smooth( L._newFaces, fixedNodes, how, /*nbIt = */3 );
+    //editor.Smooth( L._newFaces, fixedNodes, SMESH_MeshEditor::LAPLACIAN, /*nbIt = */1 );
+    editor.Smooth( L._newFaces, fixedNodes, SMESH_MeshEditor::CENTROIDAL, /*nbIt = */3 );
+  }
+  return true;
+}
+
 //================================================================================
 /*!
  * \brief Remove elements and nodes from a face
  */
 //================================================================================
 
-void _ViscousBuilder2D::removeMeshFaces(const TopoDS_Shape& face)
+bool _ViscousBuilder2D::removeMeshFaces(const TopoDS_Shape& face)
 {
   // we don't use SMESH_subMesh::ComputeStateEngine() because of a listener
   // which clears EDGEs together with _face.
-  if ( SMESHDS_SubMesh* sm = getMeshDS()->MeshElements( face ))
+  bool thereWereElems = false;
+  SMESH_subMesh* sm = _mesh->GetSubMesh( face );
+  if ( SMESHDS_SubMesh* smDS = sm->GetSubMeshDS() )
   {
-    SMDS_ElemIteratorPtr eIt = sm->GetElements();
-    while ( eIt->more() ) getMeshDS()->RemoveFreeElement( eIt->next(), sm );
-    SMDS_NodeIteratorPtr nIt = sm->GetNodes();
-    while ( nIt->more() ) getMeshDS()->RemoveFreeNode( nIt->next(), sm );
+    SMDS_ElemIteratorPtr eIt = smDS->GetElements();
+    thereWereElems = eIt->more();
+    while ( eIt->more() ) getMeshDS()->RemoveFreeElement( eIt->next(), smDS );
+    SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
+    while ( nIt->more() ) getMeshDS()->RemoveFreeNode( nIt->next(), smDS );
   }
+  sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
+
+  return thereWereElems;
 }
 
 //================================================================================
@@ -1552,13 +2055,14 @@ void _ViscousBuilder2D::calcLayersHeight(const double    totalThick,
  */
 //================================================================================
 
-void _LayerEdge::SetNewLength( const double length3D )
+bool _LayerEdge::SetNewLength( const double length3D )
 {
-  if ( _isBlocked ) return;
+  if ( _isBlocked ) return false;
 
   //_uvInPrev = _uvIn;
   _length2D = length3D * _len2dTo3dRatio;
   _uvIn     = _uvOut + _normal2D * _length2D;
+  return true;
 }
 
 //================================================================================
index d09c3bb2a7a50f7a4ee80443267716ed92d13495..9efb896a6c470eb6ee5e129ae9e49e1c0bd97f68 100644 (file)
@@ -40,7 +40,7 @@ MeshCut_SOURCES = \
 
 MeshCut_CPPFLAGS =  $(MED3_INCLUDES)
 
-MeshCut_LDFLAGS =  $(MED3_LIBS) $(HDF5_LIBS)
+MeshCut_LDFLAGS =  $(MED3_LIBS_C_ONLY) $(HDF5_LIBS)
 
 salomeplugins_PYTHON = \
        meshcut_plugin.py
index b2bc9a6eb76bf8480518d0be03a4a9aa71d18eb4..df7721e9fa9553972a495f57209e0745c996712d 100644 (file)
       </font>
      </property>
      <property name="currentIndex">
-      <number>1</number>
+      <number>0</number>
      </property>
      <widget class="QWidget" name="simple">
       <attribute name="title">
index 653644e21337bd83efdf2203fbc3976ff0a67228..c92765d78c8c7b739a31766545cd43d2d4581d5e 100644 (file)
@@ -62,10 +62,13 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
   def PBHelpPressed(self):
         try :
           maDoc=os.environ['DISTENE_YAMS_DOC_PDF']
-          commande='kpdf '+maDoc
-          os.system (commande)
-        except:
+        except Exception:
           QMessageBox.warning( self, "Help unavailable", str(maDoc) + " not found")
+        old_ld=os.getenv("LD_LIBRARY_PATH")
+        command="unset LD_LIBRARY_PATH;"
+        command+="xdg-open "+maDoc+";"
+        command+="export LD_LIBRARY_PATH=%s"%old_ld
+        os.system(command)
 
 
   def PBOKPressed(self):
@@ -233,7 +236,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
   def prepareFichier(self):
       self.fichierIn="/tmp/PourYam_"+str(self.num)+".mesh"
       import SMESH
-      self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn)
+      self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn, True)
 
   def PrepareLigneCommande(self):
       self.commande="yams "
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_end.png b/src/Tools/padder/doc/images/SMESH_spadder_end.png
deleted file mode 100644 (file)
index 12e2b7c..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_end.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_concrete.png b/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_concrete.png
deleted file mode 100644 (file)
index ed0a8a7..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_concrete.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_start.png b/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_start.png
deleted file mode 100644 (file)
index 8725d71..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_start.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_steelbar.png b/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_steelbar.png
deleted file mode 100644 (file)
index 8e692dc..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_inputdialog_steelbar.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_menu.png b/src/Tools/padder/doc/images/SMESH_spadder_menu.png
deleted file mode 100644 (file)
index e891406..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_menu.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_finished.png b/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_finished.png
deleted file mode 100644 (file)
index e29cf56..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_finished.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_ready.png b/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_ready.png
deleted file mode 100644 (file)
index f86790b..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_ready.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_running.png b/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_running.png
deleted file mode 100644 (file)
index b3c9ef1..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_compute_running.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_published.png b/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_published.png
deleted file mode 100644 (file)
index 19e1ae7..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_published.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_start.png b/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_start.png
deleted file mode 100644 (file)
index 45ba1a0..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_plugindialog_start.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/SMESH_spadder_start.png b/src/Tools/padder/doc/images/SMESH_spadder_start.png
deleted file mode 100644 (file)
index 160da9d..0000000
Binary files a/src/Tools/padder/doc/images/SMESH_spadder_start.png and /dev/null differ
diff --git a/src/Tools/padder/doc/images/padder_error_noresource.png b/src/Tools/padder/doc/images/padder_error_noresource.png
new file mode 100644 (file)
index 0000000..41261e0
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_error_noresource.png differ
diff --git a/src/Tools/padder/doc/images/padder_image01.png b/src/Tools/padder/doc/images/padder_image01.png
new file mode 100644 (file)
index 0000000..fa7e118
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image01.png differ
diff --git a/src/Tools/padder/doc/images/padder_image02.png b/src/Tools/padder/doc/images/padder_image02.png
new file mode 100644 (file)
index 0000000..06a0dda
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image02.png differ
diff --git a/src/Tools/padder/doc/images/padder_image02bis.png b/src/Tools/padder/doc/images/padder_image02bis.png
new file mode 100644 (file)
index 0000000..20eb6e0
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image02bis.png differ
diff --git a/src/Tools/padder/doc/images/padder_image03.png b/src/Tools/padder/doc/images/padder_image03.png
new file mode 100644 (file)
index 0000000..4b94a53
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image03.png differ
diff --git a/src/Tools/padder/doc/images/padder_image04.png b/src/Tools/padder/doc/images/padder_image04.png
new file mode 100644 (file)
index 0000000..05290f5
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image04.png differ
diff --git a/src/Tools/padder/doc/images/padder_image05.png b/src/Tools/padder/doc/images/padder_image05.png
new file mode 100644 (file)
index 0000000..2e486f3
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image05.png differ
diff --git a/src/Tools/padder/doc/images/padder_image06.png b/src/Tools/padder/doc/images/padder_image06.png
new file mode 100644 (file)
index 0000000..167f456
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image06.png differ
diff --git a/src/Tools/padder/doc/images/padder_image07.png b/src/Tools/padder/doc/images/padder_image07.png
new file mode 100644 (file)
index 0000000..0bd6eec
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image07.png differ
diff --git a/src/Tools/padder/doc/images/padder_image08.png b/src/Tools/padder/doc/images/padder_image08.png
new file mode 100644 (file)
index 0000000..cfbe845
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image08.png differ
diff --git a/src/Tools/padder/doc/images/padder_image09.png b/src/Tools/padder/doc/images/padder_image09.png
new file mode 100644 (file)
index 0000000..121b536
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image09.png differ
diff --git a/src/Tools/padder/doc/images/padder_image10.png b/src/Tools/padder/doc/images/padder_image10.png
new file mode 100644 (file)
index 0000000..7de92b7
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image10.png differ
diff --git a/src/Tools/padder/doc/images/padder_image11.png b/src/Tools/padder/doc/images/padder_image11.png
new file mode 100644 (file)
index 0000000..0e3dd49
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image11.png differ
diff --git a/src/Tools/padder/doc/images/padder_image12.png b/src/Tools/padder/doc/images/padder_image12.png
new file mode 100644 (file)
index 0000000..6012d36
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image12.png differ
diff --git a/src/Tools/padder/doc/images/padder_image13.png b/src/Tools/padder/doc/images/padder_image13.png
new file mode 100644 (file)
index 0000000..c196622
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_image13.png differ
diff --git a/src/Tools/padder/doc/images/padder_sphererendering.png b/src/Tools/padder/doc/images/padder_sphererendering.png
new file mode 100644 (file)
index 0000000..a1b97ec
Binary files /dev/null and b/src/Tools/padder/doc/images/padder_sphererendering.png differ
index d92f85ef61b6835d041a64cc9e082f9266144b91..a44b10eb05a134a3f582b2c12a4ffde9afa24131 100644 (file)
 -# \ref S2_PADDER
 -# \ref S3_PADDER
 
-\section S1_PADDER The PADDER Algorithm
-
-PADDER is an algorithm that creates a set of particules called a "discrete mesh".
-The particules are characterized by a location in space and a weight that can be considered
-as the radius of a sphere whose center is the location of the particule.
-
-Discrete meshes are typically used to modelize civil components in rapid dynamic
-computation problems (seisms, chocs). These components consists in concrete parts
-embedding steal bares for reinforcement. These parts are input to the algorithm
-as standard finite elements meshes. The cells of theses meshes drive the location
-and sizing of particules.
-
-In the med representation, a discrete mesh is described as MED_BALL elements.
-A MED_BALL element is defined by a location and a radius.
-
-\section S2_PADDER The PADDER SALOME plugin
-
-The PADDER algoritm is integrated in the module SMESH as a SALOME
-plugin. This section illustrates how to use this plugin to create a
-discrete mesh.
-
-In this example, we suppose that two standard meshes (Finite Elements
-Meshes) have been created and publish in the study to modelize the
-concrete part (here with the name "concrete") and the steal bars part
-(here with the name "ferrail"):
-
-\image html SMESH_spadder_start.png
-
-The PADDER plugin can be invoked from the SMESH plugins menu, as
-illustrated on the figure below:
-
-\image html SMESH_spadder_menu.png
-
-When you clic on the "PADDER mesher" item, the graphical interface of
-the PADDER plugin appears:
-
-\image html SMESH_spadder_plugindialog_start.png
-
-This interface invites you to specify input data by pressing the button
-"Input". This command opens the Input dialog box to specify the list
-of meshes and the type of the selected meshes (to be choosen between
-"concrete" or "steelbar" using the combobox on the right side of the
-input line):
-
-\image html SMESH_spadder_inputdialog_start.png
+\section S1_PADDER The SpherePadder Algorithm
+
+SpherePadder is a geometric algorithm that creates a set of rigid
+spherical particles of different sizes called a "discrete element
+mesh". The centroid positions of particles are randomly generated by a
+"disordering" technique described in [1] that provides a polydisperse
+assembly with a particular size distribution. The spheres are
+positioned or “padded” into a tetrahedral mesh, which must be
+generated first. As illustrated below, SpherePadder creates a Discrete
+Element (DE) assembly in seven steps (see [1] for details):
+
+\image html padder_image01.png
+
+In order to increase the density of the whole packing and to fill
+spheres in the gaps close to the mesh boundaries (created by removing
+boundary spheres), SpherePadder detect `void spaces' where new spheres
+could be added by applying a particular geometric procedure, using
+tetrahedra resulting from a tridimensional Delaunay triangulation
+built with the sphere centers. That triangulation is generated by
+using the CGAL library [2]. 
+
+DE meshes generated by SpherePadder algorithm are used in EUROPLEXUS
+fast dynamics software simulations [3] to model the discontinuous
+behaviour (fractures, fragmentation) of reinforced concrete structures
+under severe dynamic loads such as impacts or explosions. The
+characteristic size of elements does not have to be representative of
+concrete constituents, such as granulars or cement matrix, since the
+aim is to reproduce the dynamic behaviour of the simulated material at
+the macroscopic scale. 
+
+To generate DE mesh for a reinforced concrete structure, one should
+supply a single tetrahedral mesh for concrete and as many segment-type
+1D meshes as groups of steel reinforcement bars of different
+diameters. The size (length) of segment-type steel reinforcement
+elements should correspond to the modelled bar’s
+diameter. SpherePadder algorithm will create steel discrete elements
+by using the segment’s length as the DE diameter.
+
+Warning: The User should control that all steel bars of a given
+diameter in a mesh belong to the same mesh group, and that different
+steel bar groups do not use the same diameter.
+
+\image html padder_image02.png
+
+If steel mesh is not provided, a pure concrete DE mesh is generated.
+
+In MED representation, DE meshes are described by using MED_BALL type
+structural elements. Each MED_BALL element is defined by its centroid
+location and a diameter. 
+
+Written in C++, SpherePadder is free software licensed under the terms
+of the GNU General Public License. 
+
+Bibliography:
+- [1] J.-F.Jerier, V.Richefeu, D.Imbault, F.-V. Donzé, “Packing spherical discrete elements for large scale simulations”, Computer Methods in Applied Mechanics and Engineering 199 (2010) 1668–1676.
+- [2] CGAL, Computational Geometry Algorithms Library. https://gforge.inria.fr.
+- [3] EUROPLEXUS: a computer program for the finite element simulation of fluid–structure systems under transient dynamic loading. http://europlexus.jrc.ec.europa.eu, (User’s Manual).
+
+\section S2_PADDER The SpherePadder SALOME plugin
+
+The SpherePadder algorithm is implemented as an external software
+program. This external program is integrated in the SMESH module as a
+SALOME plugin that manage the execution of the SpherePadder program
+from within the SALOME framework. This section illustrates how to use
+this plugin to create a discrete element mesh.
+
+In this example, we consider a concrete piece with a single
+reinforcement bars group. Thus, two standard (Finite Element type)
+meshes have been created and published in the study, the first one
+named “concrete”, and second one named "ferrail", for the steel bars
+part: 
+
+\image html padder_image03.png
+
+The SpherePadder plugin can be activated in the SMESH plugins menu, as
+illustrated on the figure below: 
+
+\image html padder_image04.png
+
+When clicking on the "PADDER mesher" item, the graphical interface of
+the SpherePadder plugin appears:
+
+\image html padder_image05.png
+
+This interface invites you to specify input data by pressing the
+button "Input". This command opens the Input dialog box allowing to
+specify the list and the type of selected meshes (to be chosen between
+"concrete" and "steelbar" using the combobox on the right side of the
+input line): 
+
+\image html padder_image06.png
 
 In the figure below, the mesh with name "concrete" has been selected
-in the study and added in the list of input file as a "concrete
-mesh". You have to input the mesh in the dialog using the rounded
-arrow icon, then specify a group name (the name of the group of
-MED_BALL created for this mesh in the resulting mesh), and finnaly
-clic on the "Add" icon:
+in the study and added to the list of the input file as a "concrete
+mesh". First, you have to choose the mesh in the dialog box using the
+rounded arrow icon, then specify for this mesh a group name which will
+be published in the final DE mesh, and finally click on the "Add"
+icon: 
 
-\image html SMESH_spadder_inputdialog_concrete.png
+\image html padder_image07.png
 
 Then, the mesh with name "ferrail" is selected and added to the list
-as a "steelbar mesh":
+as a "steelbar mesh": 
 
-\image html SMESH_spadder_inputdialog_steelbar.png
+\image html padder_image08.png
 
-The input dialog box can be validated toreturn to the main plugin
-interface. The "Compute" button is now enable, indicating that the
-problem is ready to be computed:
+The input dialog box has to be validated to return to the main plugin
+interface. The "Compute" button is now enabled, indicating that the
+problem is ready to be computed: 
 
-\image html SMESH_spadder_plugindialog_compute_ready.png
+\image html padder_image09.png
 
-The command "Compute" start the job. The progression can be requested
-using the command "Refresh". In the figure below, the job is still
-running:
+The command "Compute" starts the job run. The progression can be
+requested using the command "Refresh". In the figure below, the job is
+still running: 
 
-\image html SMESH_spadder_plugindialog_compute_running.png
+\image html padder_image10.png
 
 Finally, the job is finished and the result is ready to be published
-in the SALOME study:
+in the SALOME study: 
+
+\image html padder_image11.png
+
+Click on the button "Publish" to import the resulting MED file into
+SMESH and publish the resulting mesh in the SALOME study: 
 
-\image html SMESH_spadder_plugindialog_compute_finished.png
+\image html padder_image12.png
 
-Clic on the command "Publish" to explicitly import the resulting med
-file in SMESH and published the resulting mesh in the SALOME study:
+Note that the final ED mesh contains as many groups as the input
+meshes. Their names have been specified in the input dialog. For the
+moment, the DE mesh is shown as a set of points of equal size:
 
-\image html SMESH_spadder_plugindialog_published.png
+\image html padder_image13.png
 
-Note that this mesh contains one group for each of the input mesh. A
-group with the name specified in the input dialog has been defined for
-the set of MED_BALL created from the corresponding input mesh:
+In the next version, the PointSprite (sphere-like) mode will be used
+to show the MED_BALL elements with their real diameters. Then the
+above example should look like on the following capture (realized in
+module GEOM for illustration):
 
-\image html SMESH_spadder_end.png
+\image html padder_sphererendering.png
 
-\section S3_PADDER Configuring the plugin
+\section S3_PADDER Configuring the SpherePadder SALOME plugin
 
 The configuration of the plugin consists in specifying the location of
-the padder executable program for each of the SALOME resource (at
-least for the localhost resource). This specification is done in the
-file padder.cfg, located in the plugin installation folder
-(i.e. <SMESH_ROOT_DIR>/plugins):
+the padder executable program (padder.exe) and its runtime environment
+file (padder.env). This configuration is automatically done at
+installation process of the SALOME plateform, on the basis of the
+environment variable PADDERHOME that localizes the installation root
+of the SpherePadder external program. This installation process
+creates a configuration file padder.cfg located in the folder
+<SMESH_ROOT_DIR>/share/salome/plugins/smesh, where <SMESH_ROOT_DIR> is
+the installation root directory of the SMESH module.
+
+In the case where you have to specify a different configuration than
+the generated configuration, you must edit the file padder.cfg. This
+file defines a list of computing resources, and at least a local
+resource (a padder program working on your local host), and a remote
+resource (a padder program working on a remote host):
 
 \code
 # This section specify the configurations to be used respectively for
@@ -135,5 +198,39 @@ binpath = /usr/local/bin/padder.exe
 envpath = /usr/local/share/envPadder.sh
 \endcode
 
-*/
+The resource labels (localhost and nepal in the above example) must
+correspond to existing computing resources of SALOME. These resources
+are specified in the SALOME configuration CatalogResources.xml,
+located at the root directory of your SALOME application. The
+resources catalog is supposed to contain at least the localhost
+resource of type 'ssh' defined as follow:
+
+\code
+<!DOCTYPE ResourcesCatalog>
+<resources>
+
+   <!-- Generic configuration that should works on every workstation -->
+   <machine name="localhost" hostname="localhost"
+            protocol="ssh" batch="ssh_batch"
+            memInMB="500" CPUFreqMHz="0" nbOfNodes="1" nbOfProcPerNode="1"/>
+
+</resources>
+\endcode
+
+Note that these SALOME computing resources can be graphically edited
+using the JOBMANAGER module (see JOBMANAGER documentation).
 
+The typical error message when trying to use the padder plugin while
+the localhost resource is not correctly defined is :
+
+\code
+ERR: the job with jobid = 0 can't be started
+ERR: No batchmanager for that cluster - Bad batch description of the resource"
+\endcode
+
+This error message is display in the graphical interface of the plugin
+when you request a computing of your mesh:
+
+\image html padder_error_noresource.png
+
+*/
index a5559cd77e8ee537e3a3d08daad65c90072e646e..895fbd7cd0b5c162c6dc866328a2a22705dd83d8 100644 (file)
@@ -119,6 +119,8 @@ module MESHJOB
     MeshJobPaths getPaths(in long jobId)
       raises (SALOME::SALOME_Exception);
 
+    /*! Returns the last error message (for user display) */
+    string getLastErrorMessage();
   };
 
 };
index 72520fbabf811486d528ea35cb196834f4779948..612906070fcc2cea2670c78ce35a77d85f553742 100644 (file)
@@ -67,6 +67,21 @@ static bool myStartsWith(const std::string& text,const std::string& token){
   return (text.compare(0, token.length(), token) == 0);
 }
 
+/*!
+ * This function returns true if the file exists on the local file
+ * system.
+ */
+#include <iostream>
+#include <fstream>
+static bool fexists(const char *filename)
+{
+  std::ifstream ifile(filename);
+  if ((bool)ifile && ifile.good()) {
+    return true;
+  }
+  return false;
+}
+
 //
 // ====================================================================
 // Constructor/Destructor
@@ -94,6 +109,8 @@ MeshJobManager_i::MeshJobManager_i(CORBA::ORB_ptr orb,
     LOG("The SALOME resource manager can't be reached ==> STOP");
     throw KERNEL::createSalomeException("The SALOME resource manager can't be reached");
   }
+
+  _lastErrorMessage = "";
 }
 
 MeshJobManager_i::~MeshJobManager_i() {
@@ -132,7 +149,16 @@ static std::string REMOTE_WORKDIR("/tmp/spadder.remote.workdir."+USER);
  * input data (list of filenames and groupnames) and returns the path
  * of the created file. This function is the one that knows the format
  * of the padder input file. If the input file format changes, then
- * this function (and only this one) should be updated.
+ * this function (and only this one) should be updated. The file
+ * format is the following ([] means that the variable is optional):
+ *
+ * [<concreteMeshFile>   <concreteGroupName>]
+ * nbSteelBarMeshes <N>
+ * <steelBarMeshFile_1>   <steelBarGroupName_1>
+ * <steelBarMeshFile_2>   <steelBarGroupName_2>
+ * ...
+ * <steelBarMeshFile_N>   <steelBarGroupName_N>
+ * <outputMedFile>
  */
 const char * MeshJobManager_i::_writeDataFile(std::vector<MESHJOB::MeshJobParameter> listConcreteMesh,
                                               std::vector<MESHJOB::MeshJobParameter> listSteelBarMesh) {
@@ -145,27 +171,29 @@ const char * MeshJobManager_i::_writeDataFile(std::vector<MESHJOB::MeshJobParame
   // Make it static so that it's allocated once (constant name)
   static std::string * dataFilename = new std::string(LOCAL_INPUTDIR+"/"+DATAFILE);
   std::ofstream dataFile(dataFilename->c_str());
-  
-  // We first specify the concrete mesh data (filename and groupname)
+
+  // Note that we use here the basename of the files because the files
+  // are supposed to be copied in the REMOTE_WORKDIR for execution.
   std::string line;
+
+  // We first specify the concrete mesh data (filename and groupname)
+  if ( listConcreteMesh.size() > 0 ) {
 #ifdef WIN32
-  char fname[ _MAX_FNAME ];
-  _splitpath( listConcreteMesh[0].file_name, NULL, NULL, fname, NULL );
-  char* bname = &fname[0];
+    char fname[ _MAX_FNAME ];
+    _splitpath( listConcreteMesh[0].file_name, NULL, NULL, fname, NULL );
+    char* bname = &fname[0];
 #else
-  char* bname = basename(listConcreteMesh[0].file_name);
+    char* bname = basename(listConcreteMesh[0].file_name);
 #endif
-  line = std::string(bname) + " " + std::string(listConcreteMesh[0].group_name);
-  dataFile << line.c_str() << std::endl;
-  // Note that we use here the basename because the files are supposed
-  // to be copied in the REMOTE_WORKDIR for execution.
-  
-  // The, we can specify the steelbar mesh data, starting by the
+    line = std::string(bname) + " " + std::string(listConcreteMesh[0].group_name);
+    dataFile << line.c_str() << std::endl;
+  }
+  // Then, we can specify the steelbar mesh data, starting by the
   // number of meshes
-  int nbSteelBarMesh=listSteelBarMesh.size();
-  line = std::string("nbSteelbarMesh") + SEPARATOR + ToString(nbSteelBarMesh);
+  int nbSteelBarMeshes=listSteelBarMesh.size();
+  line = std::string("nbSteelBarMeshes") + SEPARATOR + ToString(nbSteelBarMeshes);
   dataFile << line.c_str() << std::endl;
-  for (int i=0; i<nbSteelBarMesh; i++) {
+  for (int i=0; i<nbSteelBarMeshes; i++) {
 #ifdef WIN32
         char fname[ _MAX_FNAME ];
         _splitpath( listSteelBarMesh[i].file_name, NULL, NULL, fname, NULL );
@@ -250,9 +278,6 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
                                          const char * configId)
 {
   beginService("MeshJobManager_i::initialize");
-  std::cerr << "##################################### initialize" << std::endl;
-  std::cerr << "#####################################" << std::endl;
-
   //
   // We first analyse the CORBA sequence to store data in C++ vectors
   //
@@ -268,14 +293,21 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
       listSteelBarMesh.push_back(currentMesh);
       break;
     default:
-      LOG("The type of the file is not recognized");
+      _lastErrorMessage =
+       std::string("The type of the file ")+
+       std::string(currentMesh.file_name)+
+       std::string(" is not recognized");
+      LOG(_lastErrorMessage);
       return JOBID_UNDEFINED;
     }
   }
   
-  if ( listConcreteMesh.size() != 1 ) {
+  // It is not possible to specify more than one concrete
+  // file. Converselly, it is possible to specify no concrete file.
+  if ( listConcreteMesh.size() > 1 ) {
     // Not consistent with the specification
-    LOG("You specify more than one concrete mesh");
+    _lastErrorMessage = std::string("You specify more than one concrete mesh (not authorized)");
+    LOG(_lastErrorMessage);
     return JOBID_UNDEFINED;
   }
   
@@ -341,24 +373,37 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
   // We specify the input files that are required to execute the
   // job_file. If basenames are specified, then the files are supposed
   // to be located in local_directory.
-  int nbFiles = listSteelBarMesh.size()+2;
+  int nbcmesh = listConcreteMesh.size();
+  int nbsmesh = listSteelBarMesh.size();
+  int nbFiles = nbsmesh+nbcmesh+1;
   // The number of input file is: 
   //   (nb. of steelbar meshfile)
-  // + (1 concrete meshfile)
+  // + (1 or 0 concrete meshfile)
   // + (1 padder input file)
-  // = nb steelbar meshfile + 2
   jobParameters->in_files.length(nbFiles);
-  jobParameters->in_files[0] = CORBA::string_dup(listConcreteMesh[0].file_name);
-  for (int i=0; i<listSteelBarMesh.size(); i++) {
-    jobParameters->in_files[1+i] = CORBA::string_dup(listSteelBarMesh[i].file_name);
+  for (int i=0; i<nbcmesh; i++) {
+    jobParameters->in_files[i] = CORBA::string_dup(listConcreteMesh[i].file_name);
+  }
+  for (int i=0; i<nbsmesh; i++) {
+    jobParameters->in_files[nbcmesh+i] = CORBA::string_dup(listSteelBarMesh[i].file_name);
   }
-  jobParameters->in_files[1+listSteelBarMesh.size()] = CORBA::string_dup(dataFilename);
+  jobParameters->in_files[nbcmesh+nbsmesh] = CORBA::string_dup(dataFilename);
   // Note that all these input files will be copied in the
-  // REMOTE_WORKDIR on the remote host
-  
-  // Then, we have to specify the existance of an output
-  // filenames. The path is supposed to be a path on the remote
-  // resource, i.e. where the job is executed.
+  // REMOTE_WORKDIR on the remote host. At this step, they should
+  // all exist, so we can check their presence on the local
+  // filesystem.
+  for (int i=0; i<nbFiles; i++) {
+    if ( fexists(jobParameters->in_files[i]) != true ) {
+      _lastErrorMessage = std::string("The input file ") + std::string(jobParameters->in_files[i]);
+      _lastErrorMessage+= std::string(" does not exists. Can't initialize the job");
+      LOG(_lastErrorMessage);
+      return JOBID_UNDEFINED;      
+    }
+  }
+
+  // Then, we have to specify the existance of an output filename. The
+  // path is supposed to be a path on the remote resource, i.e. where
+  // the job is executed.
   jobParameters->out_files.length(1);
   std::string outputfile_name = std::string(jobPaths->remote_workdir)+"/"+OUTPUTFILE;
   jobParameters->out_files[0] = CORBA::string_dup(outputfile_name.c_str());
@@ -383,7 +428,17 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
   //const char * resourceName = "boulant@claui2p1";
   //const char * resourceName = "nepal@nepal";
   const char * resourceName = _configMap[configId].resname;
-  Engines::ResourceDefinition * resourceDefinition = _resourcesManager->GetResourceDefinition(resourceName);
+  
+  Engines::ResourceDefinition * resourceDefinition;
+  try {
+    resourceDefinition = _resourcesManager->GetResourceDefinition(resourceName);
+  }
+  catch (const CORBA::SystemException& ex) {
+    _lastErrorMessage = std::string("We can not access to the ressource ") + std::string(resourceName);
+    _lastErrorMessage+= std::string("(check the file CatalogResource.xml)");
+    LOG(_lastErrorMessage);
+    return JOBID_UNDEFINED;
+  }
   // CAUTION: This resource should have been defined in the
   // CatalogResource.xml associated to the SALOME application.
   //
@@ -413,29 +468,22 @@ CORBA::Long MeshJobManager_i::initialize(const MESHJOB::MeshJobParameterList & m
   //
   // So, even in the case of a simple test shell script, you should
   // set this value at least to a standard threshold as 500MB
-
   int jobId = JOBID_UNDEFINED;
   try {
-    std::cerr << "#####################################" << std::endl;
-    std::cerr << "#####################################" << std::endl;
-    std::cerr << "jobUndef = " << JOBID_UNDEFINED << std::endl;
     jobId = _salomeLauncher->createJob(jobParameters);
-    std::cerr << "#####################################" << std::endl;
-    std::cerr << "#####################################" << std::endl;
-    std::cerr << "#####################################" << std::endl;
-    std::cerr << "jobId = " << jobId << std::endl;
     // We register the datetime tag of this job
     _jobDateTimeMap[jobId]=jobDatetimeTag;
     _jobPathsMap[jobId] = jobPaths;
   }
   catch (const SALOME::SALOME_Exception & ex) {
-    LOG("SALOME Exception in createJob !" <<ex.details.text.in());
-    //LOG(ex.details.text.in());
+    LOG("SALOME Exception at initialization step !" <<ex.details.text.in());
+    _lastErrorMessage = ex.details.text.in();
     return JOBID_UNDEFINED;
   }
   catch (const CORBA::SystemException& ex) {
     LOG("Receive SALOME System Exception: "<<ex);
     LOG("Check SALOME servers...");
+    _lastErrorMessage = "Check the SALOME servers (or try to restart SALOME)";
     return JOBID_UNDEFINED;
   }
   
@@ -452,12 +500,13 @@ bool MeshJobManager_i::start(CORBA::Long jobId) {
   }
   catch (const SALOME::SALOME_Exception & ex) {
     LOG("SALOME Exception in launchjob !" <<ex.details.text.in());
-    //LOG(ex.details.text.in());
+    _lastErrorMessage = ex.details.text.in();
     return false;
   }
   catch (const CORBA::SystemException& ex) {
     LOG("Receive SALOME System Exception: "<<ex);
     LOG("Check SALOME servers...");
+    _lastErrorMessage = "Check the SALOME servers (or try to restart SALOME)";
     return false;
   }
 
@@ -477,6 +526,7 @@ char* MeshJobManager_i::getState(CORBA::Long jobId) {
   catch (const SALOME::SALOME_Exception & ex)
   {
     LOG("SALOME Exception in getJobState !");
+    _lastErrorMessage = ex.details.text.in();
     state = ex.details.text;
   }
   catch (const CORBA::SystemException& ex)
@@ -525,6 +575,7 @@ MESHJOB::MeshJobResults * MeshJobManager_i::finalize(CORBA::Long jobId) {
   {
     LOG("SALOME Exception in getResults !");
     result->status = "SALOME Exception in getResults !";
+    _lastErrorMessage = ex.details.text.in();
   }
   catch (const CORBA::SystemException& ex)
   {
@@ -610,6 +661,11 @@ std::vector<std::string> * MeshJobManager_i::_getResourceNames() {
   return resourceNames;
 }
 
+char* MeshJobManager_i::getLastErrorMessage() {
+  beginService("MeshJobManager_i::getState");
+  endService("MeshJobManager_i::getState");
+  return CORBA::string_dup(_lastErrorMessage.c_str());
+}
 
 //
 // ==========================================================================
index 283a92d7adac9ea52b8b532345b3fc36bfe06419..f53d7aa34888ce4f4b12fa44e2a81a0b1719cfd2 100644 (file)
@@ -51,6 +51,8 @@ public:
   MESHJOB::MeshJobPaths *   getPaths(CORBA::Long jobId);
   bool           clean      (CORBA::Long jobId);
 
+  char*          getLastErrorMessage();
+
   static long JOBID_UNDEFINED;
 
 private:
@@ -75,6 +77,8 @@ private:
 
   std::vector<std::string> * _getResourceNames();
 
+  std::string _lastErrorMessage;
+
 };
 
 #endif
index 207faadadd34c0d1be49881a85319ef214fcf9c4..36d17c672cf511bfacd8d9ed356212a78e2d8878 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SUBDIRS = appligen padderexe
+SUBDIRS = appligen testdata
 
 include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
diff --git a/src/Tools/padder/resources/padderexe/Makefile.am b/src/Tools/padder/resources/padderexe/Makefile.am
deleted file mode 100644 (file)
index 1388ede..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 2011-2012  CEA/DEN, 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
-
-mysalomeresdir=$(salomeresdir)/padderexe
-
-version=med3
-notinstall_version=med2
-
-# We install the padder.exe program and the files required for testing
-# the execution from within the installation directory
-dist_mysalomeres_SCRIPTS =    \
-       $(version)/padder.exe \
-       padder.sh
-
-nodist_mysalomeres_SCRIPTS =         \
-       envPadder.sh
-
-dist_mysalomeres_DATA =         \
-       $(version)/data.txt     \
-       $(version)/concrete.med \
-       $(version)/ferraill.med
-
-NOT_USED_FILES = buildparticules.py particules.png
-EXTRA_DIST += $(notinstall_version) $(NOT_USED_FILES)
diff --git a/src/Tools/padder/resources/padderexe/buildparticules.py b/src/Tools/padder/resources/padderexe/buildparticules.py
deleted file mode 100755 (executable)
index 04035f1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2011-2012  CEA/DEN, 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
-#
-
-import geompy
-import salome
-salome.salome_init()
-theStudy = salome.myStudy
-geompy.init_geom(theStudy)
-
-filename="/home/gboulant/development/projets/salome/SPADDER/spadder/resources/padderexe/REF_spheres.dat.xyz"
-file=open(filename,'rb')
-
-import csv
-datalines = csv.reader(file, delimiter=' ')
-i=0
-for row in datalines:
-    x=float(row[0])
-    y=float(row[1])
-    z=float(row[2])
-    rayon=float(row[3])/2.
-
-    centre = geompy.MakeVertex(x, y, z)
-    particule = geompy.MakeSpherePntR(centre, rayon)
-    geompy.addToStudy( particule, 'p'+str(i) )
-    i+=1
diff --git a/src/Tools/padder/resources/padderexe/envPadder.sh.in b/src/Tools/padder/resources/padderexe/envPadder.sh.in
deleted file mode 100644 (file)
index 90848a9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2011-2012  CEA/DEN, 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
-#
-
-# This script defines the shell extension required for executing the
-# padder executable program on the localhost (for test purposes)
-
-MED_ROOT="@MED3HOME@"
-HDF_ROOT="@HDF5HOME@"
-CGAL_ROOT="@CGALHOME@"
-export LD_LIBRARY_PATH="$MED_ROOT/lib:$HDF_ROOT/lib:$CGAL_ROOT/lib:$LD_LIBRARY_PATH"
diff --git a/src/Tools/padder/resources/padderexe/med2/REF_FinalEDMesh.med b/src/Tools/padder/resources/padderexe/med2/REF_FinalEDMesh.med
deleted file mode 100644 (file)
index 0072943..0000000
Binary files a/src/Tools/padder/resources/padderexe/med2/REF_FinalEDMesh.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med2/REF_spheres.dat.xyz b/src/Tools/padder/resources/padderexe/med2/REF_spheres.dat.xyz
deleted file mode 100644 (file)
index d511c38..0000000
+++ /dev/null
@@ -1,4097 +0,0 @@
-0.00782971 0.00837862 0.188345 0.00802045 1 0
-0.0154087 0.00912149 0.0068625 0.00705037 1 0
-0.00853443 0.191571 0.191485 0.00877202 1 0
-0.00831246 0.192152 0.00532739 0.00567024 1 0
-0.392373 0.0103119 0.19108 0.00782777 1 0
-0.382012 0.00642122 0.00627707 0.00662885 1 0
-0.393074 0.19203 0.194472 0.00590232 1 0
-0.387096 0.187644 0.0151337 0.0125061 1 0
-0.0107355 0.00843302 0.0669608 0.00880526 1 0
-0.0130229 0.0100937 0.135407 0.0113355 1 0
-0.0066941 0.0661207 0.191646 0.00802792 1 0
-0.0103253 0.133553 0.192494 0.00822172 1 0
-0.0101874 0.193228 0.0665758 0.00716313 1 0
-0.0128864 0.189676 0.134999 0.0115899 1 0
-0.00969349 0.0657247 0.00859538 0.00955034 1 0
-0.00859049 0.132642 0.00899122 0.00969975 1 0
-0.385203 0.00809838 0.0668407 0.00880575 1 0
-0.386131 0.0107039 0.135508 0.0115306 1 0
-0.393588 0.0665381 0.191132 0.00775488 1 0
-0.386598 0.134808 0.191052 0.0102175 1 0
-0.389949 0.190842 0.0653571 0.00998665 1 0
-0.389353 0.192011 0.133631 0.00881068 1 0
-0.392783 0.067271 0.00660849 0.00698802 1 0
-0.388304 0.134196 0.0104575 0.0117876 1 0
-0.078446 0.0111886 0.00562685 0.00698503 1 0
-0.15933 0.010178 0.0071953 0.00782222 1 0
-0.239408 0.0117814 0.00838242 0.00902724 1 0
-0.319266 0.0104094 0.0109799 0.0115214 1 0
-0.0801022 0.00839366 0.191955 0.009342 1 0
-0.158855 0.0101758 0.190771 0.00985613 1 0
-0.240059 0.008372 0.19268 0.00811281 1 0
-0.319477 0.00952385 0.189827 0.0109663 1 0
-0.080239 0.184554 0.0107232 0.0118692 1 0
-0.158896 0.189543 0.0104515 0.0111914 1 0
-0.239206 0.192295 0.0114336 0.00824166 1 0
-0.321165 0.189065 0.0198378 0.011684 1 0
-0.0784293 0.189358 0.189415 0.0114984 1 0
-0.158102 0.183775 0.186583 0.0140474 1 0
-0.240505 0.191585 0.192095 0.00878636 1 0
-0.320737 0.187137 0.173616 0.0136636 1 0
-0.0102439 0.0601788 0.110611 0.011165 1 0
-0.00632993 0.0606389 0.0501703 0.00699327 1 0
-0.00886816 0.118481 0.073089 0.00961398 1 0
-0.0084637 0.130613 0.129338 0.0092135 1 0
-0.390636 0.0614183 0.111012 0.010272 1 0
-0.391413 0.0615332 0.0505572 0.0092585 1 0
-0.392479 0.119396 0.0733079 0.00827305 1 0
-0.389389 0.131268 0.129331 0.0113393 1 0
-0.274388 0.0076649 0.0575634 0.00842627 1 0
-0.134941 0.00959236 0.0653354 0.0105187 1 0
-0.0651853 0.00803465 0.0661969 0.00886309 1 0
-0.110295 0.00934566 0.133492 0.010401 1 0
-0.185332 0.0137269 0.132579 0.0147265 1 0
-0.331786 0.0104332 0.0984378 0.0115849 1 0
-0.207876 0.0106516 0.0633744 0.0116242 1 0
-0.261527 0.00924836 0.126979 0.0103371 1 0
-0.274177 0.19319 0.0574857 0.00758089 1 0
-0.135692 0.189732 0.0648955 0.0112128 1 0
-0.0663 0.187677 0.0661222 0.0131058 1 0
-0.109855 0.18853 0.132715 0.0125194 1 0
-0.185773 0.18914 0.131535 0.0118814 1 0
-0.332133 0.189017 0.0978282 0.0121498 1 0
-0.207852 0.192331 0.0632991 0.00864703 1 0
-0.261572 0.192711 0.126344 0.00840316 1 0
-0.0697814 0.106226 0.00960134 0.0108828 1 0
-0.131623 0.0598217 0.0086532 0.00941678 1 0
-0.266788 0.0652192 0.0102618 0.0112281 1 0
-0.340609 0.0648565 0.00796636 0.00886868 1 0
-0.291252 0.132331 0.011155 0.0121409 1 0
-0.215098 0.131697 0.0133923 0.0143177 1 0
-0.19535 0.0639082 0.0075357 0.00848584 1 0
-0.141228 0.128178 0.0122679 0.0132652 1 0
-0.0684398 0.10719 0.184859 0.0147587 1 0
-0.131467 0.0598993 0.189562 0.0112022 1 0
-0.267697 0.0654378 0.191161 0.00979633 1 0
-0.340927 0.0652784 0.190301 0.0106229 1 0
-0.291838 0.133337 0.1901 0.0109407 1 0
-0.216095 0.132971 0.190766 0.0102258 1 0
-0.194717 0.0641122 0.187867 0.0130967 1 0
-0.141036 0.129092 0.188982 0.0120216 1 0
-0.0669682 0.0665113 0.0941136 0.0147587 1 0
-0.0833322 0.143862 0.12175 0.0147587 1 0
-0.189807 0.104641 0.118969 0.0147587 1 0
-0.344502 0.0601456 0.0998379 0.0141213 1 0
-0.274144 0.081421 0.098988 0.0147587 1 0
-0.329187 0.144678 0.0830052 0.0143816 1 0
-0.243586 0.146288 0.0866495 0.0147193 1 0
-0.132914 0.0731836 0.103217 0.0147587 1 0
-0.0428272 0.119038 0.052029 0.0119519 1 0
-0.261979 0.150932 0.146194 0.0117141 1 0
-0.102115 0.140291 0.0526524 0.0147587 1 0
-0.0340305 0.101951 0.155062 0.0129279 1 0
-0.357144 0.101091 0.153465 0.0134399 1 0
-0.187456 0.162108 0.0494275 0.0113731 1 0
-0.232702 0.0552718 0.0430421 0.0140424 1 0
-0.171625 0.0519527 0.049372 0.0140307 1 0
-0.369195 0.0892426 0.0427442 0.0106064 1 0
-0.282643 0.107185 0.149494 0.0143329 1 0
-0.301665 0.113049 0.0909966 0.0106702 1 0
-0.310165 0.138814 0.141503 0.0130046 1 0
-0.343165 0.122885 0.118235 0.0109302 1 0
-0.315644 0.0912562 0.126227 0.0126514 1 0
-0.324143 0.117021 0.176733 0.0108517 1 0
-0.241903 0.0991953 0.191196 0.00904411 1 0
-0.205529 0.0985492 0.193468 0.00687593 1 0
-0.231275 0.0648555 0.192248 0.00804733 1 0
-0.192501 0.0845542 0.159484 0.0113254 1 0
-0.203006 0.118545 0.159484 0.0112056 1 0
-0.228532 0.0851619 0.159484 0.0128027 1 0
-0.0076378 0.159507 0.0697794 0.00794379 1 0
-0.00797419 0.124577 0.101219 0.00825663 1 0
-0.00724401 0.165552 0.0978756 0.0074128 1 0
-0.0416661 0.137341 0.125342 0.0105815 1 0
-0.0416661 0.131346 0.0975119 0.0124504 1 0
-0.0416661 0.171931 0.0942084 0.0143232 1 0
-0.0327151 0.00826481 0.0665097 0.00864515 1 0
-0.0663095 0.0332556 0.0799531 0.00903774 1 0
-0.0334841 0.0332556 0.0803902 0.0122868 1 0
-0.0573668 0.0559547 0.065866 0.00791185 1 0
-0.0567081 0.0226991 0.0517055 0.00704303 1 0
-0.0238827 0.0226991 0.0521425 0.00900202 1 0
-0.342522 0.0625798 0.149919 0.0125448 1 0
-0.350823 0.0806185 0.126652 0.00858079 1 0
-0.348843 0.0830528 0.176733 0.00764718 1 0
-0.363749 0.071594 0.15777 0.00763325 1 0
-0.357428 0.051121 0.130956 0.008721 1 0
-0.355448 0.0535553 0.181037 0.00667593 1 0
-0.0681372 0.08677 0.147057 0.0141747 1 0
-0.0504993 0.0842312 0.124588 0.00972722 1 0
-0.0516683 0.10449 0.177531 0.00716934 1 0
-0.0399296 0.0726263 0.156605 0.00748802 1 0
-0.0563985 0.0549064 0.12613 0.00891438 1 0
-0.0575674 0.0751651 0.179073 0.00997186 1 0
-0.0329075 0.194096 0.0663952 0.00629114 1 0
-0.054239 0.159519 0.0589108 0.0106545 1 0
-0.0214136 0.159519 0.0593479 0.0115942 1 0
-0.0444173 0.141073 0.0412066 0.00615021 1 0
-0.0558291 0.181554 0.0480883 0.00684724 1 0
-0.0230037 0.181554 0.0485254 0.00865493 1 0
-0.305829 0.166343 0.00930025 0.00968747 1 0
-0.310165 0.138814 0.0415026 0.0115073 1 0
-0.294382 0.156927 0.0589093 0.0106354 1 0
-0.275359 0.151063 0.0174067 0.007417 1 0
-0.289788 0.184588 0.0174067 0.00953043 1 0
-0.00594911 0.0607854 0.0803628 0.0061939 1 0
-0.00479756 0.0897179 0.0617091 0.00502066 1 0
-0.00616272 0.0895967 0.0918222 0.00633686 1 0
-0.0334841 0.0926703 0.0836937 0.0109375 1 0
-0.0334841 0.0638087 0.072279 0.0100164 1 0
-0.0334841 0.0638137 0.10221 0.0086386 1 0
-0.38987 0.00500221 0.0329115 0.0052469 1 0
-0.393944 0.0306307 0.0587043 0.00630491 1 0
-0.381303 0.0482723 0.0447202 0.00584722 1 0
-0.381303 0.0177192 0.0528313 0.0073099 1 0
-0.100494 0.0834848 0.190271 0.00999289 1 0
-0.136589 0.094439 0.188634 0.0116715 1 0
-0.10535 0.11814 0.185976 0.0143114 1 0
-0.137312 0.100876 0.151609 0.013982 1 0
-0.132467 0.0667472 0.151609 0.0122049 1 0
-0.10111 0.0901062 0.151609 0.0133919 1 0
-0.196804 0.00564298 0.0979846 0.00597401 1 0
-0.234676 0.00734643 0.0952439 0.0075486 1 0
-0.223513 0.00751701 0.129666 0.00783969 1 0
-0.267589 0.0407105 0.112875 0.0108776 1 0
-0.241081 0.0407105 0.0814703 0.0138234 1 0
-0.230019 0.0407105 0.115571 0.0123786 1 0
-0.395052 0.090127 0.0918997 0.00512988 1 0
-0.394346 0.124977 0.101082 0.00594888 1 0
-0.394125 0.0960045 0.119809 0.00606523 1 0
-0.372251 0.0954827 0.114386 0.0118067 1 0
-0.372251 0.0894874 0.0865558 0.0106283 1 0
-0.372251 0.0606309 0.105072 0.00706064 1 0
-0.240956 0.194533 0.060616 0.00571904 1 0
-0.225802 0.173144 0.0753011 0.00853777 1 0
-0.258741 0.173144 0.0722814 0.00850498 1 0
-0.251581 0.157732 0.0607315 0.00735967 1 0
-0.233797 0.184588 0.049383 0.00834547 1 0
-0.266736 0.184588 0.0463634 0.00513679 1 0
-0.00936532 0.0328331 0.190733 0.00954134 1 0
-0.03956 0.0329435 0.190241 0.00993531 1 0
-0.0229144 0.0549841 0.179073 0.00828957 1 0
-0.223628 0.194435 0.129147 0.00587496 1 0
-0.25231 0.173144 0.106706 0.00865879 1 0
-0.214741 0.173144 0.109401 0.011377 1 0
-0.230868 0.156087 0.11999 0.00925117 1 0
-0.239592 0.182943 0.140046 0.00761219 1 0
-0.202023 0.182943 0.142742 0.00643796 1 0
-0.360114 0.190042 0.16695 0.0101415 1 0
-0.324593 0.172339 0.141503 0.0102159 1 0
-0.364593 0.172339 0.108169 0.0128744 1 0
-0.344574 0.149581 0.121034 0.010329 1 0
-0.37998 0.177242 0.146199 0.00823187 1 0
-0.0750501 0.153331 0.00691301 0.00725809 1 0
-0.0857105 0.12366 0.0263262 0.00879905 1 0
-0.0740611 0.1517 0.0415182 0.00806666 1 0
-0.0576568 0.135069 0.0151921 0.008488 1 0
-0.0630037 0.181554 0.0151921 0.00733111 1 0
-0.100334 0.00507726 0.0657085 0.00540601 1 0
-0.101348 0.0332556 0.0799218 0.0124732 1 0
-0.0888629 0.0482426 0.0678241 0.00969621 1 0
-0.0882042 0.0149869 0.0536635 0.00741779 1 0
-0.123242 0.0149869 0.0536322 0.00573819 1 0
-0.366088 0.00696468 0.116037 0.00721858 1 0
-0.366109 0.00552948 0.0824399 0.00579393 1 0
-0.338439 0.0300728 0.0991444 0.00767144 1 0
-0.372251 0.0300728 0.116586 0.0110535 1 0
-0.372251 0.0300728 0.0832523 0.0110382 1 0
-0.203006 0.118545 0.0594845 0.0120352 1 0
-0.211255 0.0799562 0.0810055 0.0125263 1 0
-0.224453 0.0938606 0.021521 0.0112369 1 0
-0.202163 0.0536123 0.046207 0.00768668 1 0
-0.180716 0.0782967 0.0841705 0.0111456 1 0
-0.193914 0.0922011 0.024686 0.0130531 1 0
-0.394528 0.0305532 0.122124 0.00575726 1 0
-0.385177 0.0516063 0.13619 0.00782689 1 0
-0.385177 0.0210482 0.147704 0.0073708 1 0
-0.0751502 0.105187 0.107932 0.0104693 1 0
-0.0763192 0.125446 0.160875 0.010952 1 0
-0.108123 0.108523 0.112484 0.0110378 1 0
-0.0999413 0.0698475 0.0986656 0.00836315 1 0
-0.165758 0.116605 0.159484 0.0121527 1 0
-0.160914 0.0824757 0.159484 0.013619 1 0
-0.161361 0.0889121 0.111093 0.00836142 1 0
-0.294009 0.0323892 0.189614 0.01061 1 0
-0.304296 0.0653391 0.191657 0.00865693 1 0
-0.330471 0.0324018 0.19251 0.00785154 1 0
-0.302412 0.0509357 0.177837 0.0115737 1 0
-0.26577 0.0512702 0.177837 0.00661967 1 0
-0.187851 0.15232 0.125561 0.0120432 1 0
-0.216697 0.125464 0.102809 0.00941345 1 0
-0.215521 0.154198 0.0680385 0.00864791 1 0
-0.188632 0.133375 0.0841982 0.0112806 1 0
-0.186676 0.181054 0.0907904 0.0113755 1 0
-0.257158 0.00634884 0.0286278 0.00661142 1 0
-0.24115 0.00797505 0.0605706 0.00822542 1 0
-0.223999 0.00751144 0.0314485 0.00773857 1 0
-0.22036 0.0276359 0.0534973 0.00800536 1 0
-0.253299 0.0276359 0.0504777 0.00881505 1 0
-0.0994942 0.063411 0.0470568 0.014322 1 0
-0.132467 0.0667472 0.0516087 0.0130026 1 0
-0.121836 0.0515788 0.072376 0.00981294 1 0
-0.121389 0.0451423 0.0207672 0.00695694 1 0
-0.199897 0.192878 0.195143 0.00502548 1 0
-0.213141 0.191335 0.165953 0.0089279 1 0
-0.17265 0.189447 0.165926 0.0108864 1 0
-0.2707 0.0735521 0.049494 0.0125585 1 0
-0.28673 0.0582431 0.0706498 0.00967816 1 0
-0.283286 0.0503742 0.0211558 0.00766029 1 0
-0.266009 0.0451685 0.0426768 0.00870186 1 0
-0.253423 0.0683464 0.071015 0.0092965 1 0
-0.249979 0.0604775 0.021521 0.0070212 1 0
-0.227566 0.166162 0.00927722 0.00964504 1 0
-0.23789 0.150813 0.0174067 0.0083311 1 0
-0.249788 0.184588 0.0174067 0.00630637 1 0
-0.20183 0.147279 0.0247137 0.00805173 1 0
-0.21747 0.0316523 0.190068 0.010193 1 0
-0.229739 0.0506625 0.177837 0.0108254 1 0
-0.186798 0.0522662 0.181595 0.00590615 1 0
-0.231976 0.0930308 0.108978 0.011216 1 0
-0.245174 0.106935 0.049494 0.00991656 1 0
-0.258865 0.113855 0.0928188 0.00909479 1 0
-0.229895 0.139369 0.0433248 0.0114901 1 0
-0.309323 0.0707833 0.099413 0.00918863 1 0
-0.30326 0.0407105 0.0987195 0.0125128 1 0
-0.269214 0.0591391 0.127331 0.00909719 1 0
-0.304393 0.0485014 0.127756 0.0125593 1 0
-0.298329 0.0184286 0.127063 0.0120348 1 0
-0.342522 0.0625798 0.049919 0.0125044 1 0
-0.353554 0.047792 0.069417 0.00851466 1 0
-0.351574 0.0502263 0.019498 0.00671085 1 0
-0.365901 0.0623405 0.0408701 0.00679192 1 0
-0.356848 0.0746941 0.0712911 0.0085842 1 0
-0.354868 0.0771284 0.0213721 0.00710973 1 0
-0.393665 0.0612623 0.0805882 0.00656835 1 0
-0.372251 0.0606259 0.0751412 0.00928767 1 0
-0.00800775 0.00481281 0.0330032 0.00501284 1 0
-0.00493794 0.0302994 0.058471 0.0051964 1 0
-0.0238827 0.0532522 0.0440314 0.0064865 1 0
-0.388819 0.00982632 0.167372 0.0110774 1 0
-0.359782 0.0103331 0.167339 0.0105166 1 0
-0.360202 0.00555297 0.194979 0.00521289 1 0
-0.307343 0.0732175 0.149494 0.0100654 1 0
-0.297242 0.00716979 0.112559 0.0074196 1 0
-0.262658 0.0184286 0.141219 0.00586963 1 0
-0.252783 0.14861 0.116422 0.00781161 1 0
-0.261506 0.175466 0.136478 0.00659803 1 0
-0.240065 0.158409 0.149762 0.00585704 1 0
-0.280059 0.00504557 0.194484 0.00529663 1 0
-0.291028 0.0109082 0.163718 0.0111851 1 0
-0.250706 0.00816308 0.163779 0.0085333 1 0
-0.251026 0.191692 0.163287 0.00868018 1 0
-0.0742247 0.0530447 0.190726 0.00951869 1 0
-0.105992 0.0295004 0.189733 0.0105254 1 0
-0.121557 0.0494515 0.179666 0.00632887 1 0
-0.0902001 0.0728104 0.179666 0.0112387 1 0
-0.0400163 0.189738 0.166964 0.0104471 1 0
-0.0416661 0.171931 0.127542 0.0126428 1 0
-0.0611786 0.149062 0.142927 0.00777122 1 0
-0.0195125 0.177131 0.148718 0.00844259 1 0
-0.280463 0.194149 0.194111 0.00609663 1 0
-0.30581 0.166488 0.193747 0.00663919 1 0
-0.265709 0.166873 0.191652 0.00860795 1 0
-0.276561 0.141941 0.173097 0.00797356 1 0
-0.118638 0.186606 0.187079 0.0130349 1 0
-0.149567 0.165601 0.18603 0.0143514 1 0
-0.110778 0.164928 0.189958 0.0102913 1 0
-0.112521 0.136216 0.160875 0.0123521 1 0
-0.168005 0.0965757 0.192944 0.00723432 1 0
-0.178652 0.13081 0.193931 0.00640298 1 0
-0.332251 0.0300728 0.149919 0.0103012 1 0
-0.325711 0.00860382 0.149657 0.00892666 1 0
-0.0548977 0.0927747 0.0730713 0.00893812 1 0
-0.0214136 0.118934 0.0626514 0.00597593 1 0
-0.0214136 0.0900721 0.0512367 0.00900762 1 0
-0.321909 0.0476054 0.0710748 0.0096664 1 0
-0.319929 0.0500397 0.0211558 0.00827911 1 0
-0.267936 0.00808185 0.0922081 0.00836643 1 0
-0.27402 0.0407105 0.0784506 0.0113994 1 0
-0.370562 0.0994924 0.193807 0.00632978 1 0
-0.378572 0.117212 0.176733 0.00887554 1 0
-0.378572 0.0838791 0.176733 0.00900273 1 0
-0.0170152 0.0815337 0.132684 0.00868612 1 0
-0.0229144 0.0522088 0.134226 0.00857542 1 0
-0.00714838 0.192871 0.0328516 0.00736289 1 0
-0.0329743 0.189293 0.0327432 0.0108652 1 0
-0.0230037 0.181554 0.0151921 0.00829238 1 0
-0.280033 0.194371 0.00546809 0.00575251 1 0
-0.265391 0.166364 0.00786568 0.00811157 1 0
-0.336844 0.102412 0.0914216 0.0109427 1 0
-0.364593 0.137749 0.10597 0.0106918 1 0
-0.378572 0.115956 0.1412 0.00720476 1 0
-0.160389 0.00646817 0.0988948 0.0067168 1 0
-0.17157 0.00638728 0.0645314 0.00668162 1 0
-0.189822 0.0259764 0.0566623 0.00813572 1 0
-0.17876 0.0259764 0.0907627 0.0123462 1 0
-0.153676 0.0259764 0.057551 0.00815413 1 0
-0.147479 0.00853593 0.0323513 0.00887264 1 0
-0.183736 0.00755407 0.0314761 0.0077984 1 0
-0.378572 0.0811038 0.131886 0.00909792 1 0
-0.00591154 0.132048 0.1648 0.00629393 1 0
-0.0195125 0.142541 0.146519 0.0071908 1 0
-0.0195125 0.143797 0.182052 0.00712555 1 0
-0.0365277 0.128106 0.159583 0.00666505 1 0
-0.0170152 0.116386 0.141999 0.00646397 1 0
-0.0170152 0.117642 0.177531 0.00806451 1 0
-0.370844 0.0324118 0.191016 0.00912187 1 0
-0.134768 0.188691 0.166564 0.0115827 1 0
-0.148015 0.19024 0.132253 0.0100692 1 0
-0.134614 0.171931 0.126952 0.0146729 1 0
-0.097124 0.171931 0.127505 0.00794981 1 0
-0.392841 0.0977101 0.0250466 0.00727379 1 0
-0.394032 0.126426 0.0363921 0.00628753 1 0
-0.384597 0.104036 0.058009 0.00656267 1 0
-0.384597 0.0751744 0.0465943 0.00530318 1 0
-0.384597 0.111288 0.0213721 0.00858782 1 0
-0.390129 0.167151 0.0101153 0.0100334 1 0
-0.360693 0.166517 0.0106686 0.0108482 1 0
-0.361679 0.190338 0.013115 0.00979974 1 0
-0.364593 0.139006 0.0415026 0.0137119 1 0
-0.325829 0.188443 0.149303 0.0118787 1 0
-0.366315 0.193143 0.115659 0.00709951 1 0
-0.330781 0.172339 0.0907281 0.00719079 1 0
-0.393701 0.16717 0.194106 0.00622614 1 0
-0.389212 0.189767 0.166773 0.0104671 1 0
-0.37998 0.143909 0.179532 0.00763044 1 0
-0.119432 0.00577778 0.0058474 0.00598998 1 0
-0.107374 0.00697596 0.0325843 0.00717186 1 0
-0.0953788 0.0149869 0.0207672 0.00746824 1 0
-0.392788 0.0332226 0.193286 0.00688538 1 0
-0.385177 0.0543815 0.181037 0.00675563 1 0
-0.13657 0.124252 0.12036 0.0141879 1 0
-0.227045 0.070749 0.137322 0.0133981 1 0
-0.165758 0.116605 0.0594845 0.010786 1 0
-0.137312 0.100876 0.0516087 0.0146835 1 0
-0.117515 0.106738 0.0779349 0.0111866 1 0
-0.145961 0.122466 0.0858107 0.0144476 1 0
-0.121912 0.13443 0.0263262 0.00836417 1 0
-0.303644 0.0655245 0.00637762 0.0067013 1 0
-0.307343 0.0732175 0.049494 0.0112366 1 0
-0.0898928 0.0528545 0.0188092 0.0112597 1 0
-0.100339 0.0835407 0.00719202 0.00745889 1 0
-0.0681372 0.08677 0.0470568 0.0128114 1 0
-0.0845416 0.103401 0.073383 0.011455 1 0
-0.117068 0.100301 0.0263262 0.0125396 1 0
-0.227947 0.166669 0.192156 0.00820954 1 0
-0.239091 0.141691 0.173097 0.00912766 1 0
-0.217177 0.149168 0.176665 0.00718058 1 0
-0.359991 0.00561588 0.00622086 0.00588961 1 0
-0.330111 0.0325816 0.00548694 0.00583707 1 0
-0.370436 0.0326136 0.00785919 0.00799892 1 0
-0.187721 0.166242 0.0085089 0.00875112 1 0
-0.17892 0.13031 0.0061861 0.00650468 1 0
-0.150608 0.164404 0.0088986 0.00927567 1 0
-0.164583 0.145339 0.0247137 0.0094048 1 0
-0.163348 0.0622665 0.195283 0.0049871 1 0
-0.184104 0.0723527 0.14108 0.0098866 1 0
-0.155211 0.0501878 0.181595 0.00782231 1 0
-0.0323044 0.00983341 0.0328972 0.00998101 1 0
-0.286387 0.145483 0.0848274 0.0107116 1 0
-0.295583 0.147805 0.114599 0.0115574 1 0
-0.268062 0.116176 0.122591 0.0106126 1 0
-0.286606 0.0175326 0.0501124 0.00575424 1 0
-0.393607 0.159806 0.0697236 0.00670458 1 0
-0.392433 0.165936 0.0977602 0.00773155 1 0
-0.364593 0.131754 0.0781394 0.00950111 1 0
-0.364593 0.172339 0.0748359 0.0114168 1 0
-0.370471 0.0987242 0.00887783 0.00900479 1 0
-0.334864 0.104846 0.0415026 0.0144509 1 0
-0.349191 0.11696 0.0628747 0.00991734 1 0
-0.391274 0.191165 0.0995132 0.00895533 1 0
-0.394266 0.165746 0.131262 0.0061074 1 0
-0.212893 0.00607632 0.166473 0.00634648 1 0
-0.225089 0.0184286 0.143914 0.0112197 1 0
-0.0100767 0.166711 0.0104198 0.0102409 1 0
-0.0401862 0.166512 0.0109898 0.0111838 1 0
-0.0402255 0.193994 0.00591644 0.00621158 1 0
-0.0230037 0.148221 0.0151921 0.00783265 1 0
-0.381303 0.0510526 0.019498 0.00780039 1 0
-0.384597 0.0779546 0.0213721 0.00716514 1 0
-0.00795073 0.100327 0.191944 0.00820322 1 0
-0.00729948 0.0984007 0.164901 0.00747012 1 0
-0.0170152 0.0843089 0.177531 0.00831272 1 0
-0.309658 0.0175326 0.0211558 0.00733963 1 0
-0.144786 0.1512 0.0510399 0.0110181 1 0
-0.0398287 0.0100308 0.167135 0.0102105 1 0
-0.0956244 0.00846175 0.166819 0.00882322 1 0
-0.0553841 0.00785993 0.133774 0.00819954 1 0
-0.0783722 0.0216507 0.145704 0.0102551 1 0
-0.0229144 0.0216507 0.14574 0.00846962 1 0
-0.122004 0.0558879 0.131275 0.00867966 1 0
-0.0125628 0.192161 0.168294 0.00802027 1 0
-0.37998 0.142652 0.143999 0.00692701 1 0
-0.234711 0.192608 0.0948239 0.00758701 1 0
-0.267805 0.192014 0.0920019 0.00827455 1 0
-0.141191 0.0409633 0.0454532 0.00814838 1 0
-0.303395 0.00577704 0.0780608 0.00607367 1 0
-0.315845 0.0175326 0.0703813 0.00924845 1 0
-0.00557333 0.165517 0.131393 0.00595387 1 0
-0.134321 0.0365918 0.0844737 0.0102843 1 0
-0.15227 0.0625682 0.0762948 0.00870398 1 0
-0.00610125 0.1259 0.0362767 0.00640747 1 0
-0.0214136 0.126186 0.0260145 0.00861099 1 0
-0.203979 0.135263 0.13615 0.00946628 1 0
-0.0541656 0.130645 0.182052 0.00832584 1 0
-0.0586813 0.122907 0.138406 0.00909749 1 0
-0.0733752 0.190249 0.0328107 0.0100889 1 0
-0.0838829 0.170146 0.0592225 0.00889822 1 0
-0.253452 0.132342 0.00666335 0.00698182 1 0
-0.267364 0.139619 0.0433248 0.0124672 1 0
-0.122838 0.00676448 0.099532 0.00706562 1 0
-0.088942 0.0332556 0.113687 0.0111015 1 0
-0.121915 0.0365918 0.118239 0.010264 1 0
-0.120406 0.00711212 0.193704 0.00641037 1 0
-0.135269 0.00862405 0.166962 0.00889347 1 0
-0.111005 0.0192961 0.146296 0.00582169 1 0
-0.297338 0.00779496 0.0287033 0.00808652 1 0
-0.325794 0.00845973 0.0487937 0.00864908 1 0
-0.187851 0.0523203 0.125561 0.0131926 1 0
-0.182148 0.0200324 0.147672 0.00640389 1 0
-0.10101 0.193895 0.065773 0.00643011 1 0
-0.0885172 0.194105 0.0997932 0.00613151 1 0
-0.123113 0.194109 0.099166 0.00619423 1 0
-0.0744915 0.171931 0.0937713 0.0101514 1 0
-0.10953 0.171931 0.09374 0.0118815 1 0
-0.13666 0.0941074 0.00611892 0.00642099 1 0
-0.156667 0.0902607 0.024686 0.0119912 1 0
-0.303258 0.19412 0.0778613 0.00617833 1 0
-0.297043 0.193387 0.112406 0.00685793 1 0
-0.29511 0.172339 0.104884 0.0122603 1 0
-0.301542 0.172339 0.0704592 0.00991179 1 0
-0.145949 0.0298672 0.194806 0.00545143 1 0
-0.169201 0.0200324 0.181595 0.00717934 1 0
-0.0346919 0.119789 0.0059911 0.0062676 1 0
-0.0560667 0.113033 0.0260145 0.00745023 1 0
-0.39462 0.0641305 0.0251582 0.00571618 1 0
-0.358552 0.127788 0.156265 0.00671995 1 0
-0.22384 0.19136 0.0315576 0.00886931 1 0
-0.197737 0.181054 0.05669 0.00568653 1 0
-0.31648 0.0993063 0.190149 0.010111 1 0
-0.196881 0.194663 0.0976769 0.00566597 1 0
-0.0927236 0.142077 0.0872012 0.00896175 1 0
-0.325551 0.143717 0.179532 0.0103648 1 0
-0.293068 0.0329148 0.00869786 0.00893395 1 0
-0.145887 0.0300695 0.00590849 0.0061642 1 0
-0.163592 0.0622743 0.00591676 0.00618727 1 0
-0.177744 0.0321437 0.00757873 0.00778291 1 0
-0.18341 0.0582102 0.024686 0.00701536 1 0
-0.151823 0.0561318 0.024686 0.00798044 1 0
-0.148058 0.190384 0.0324284 0.00993649 1 0
-0.171705 0.193063 0.0644836 0.0072308 1 0
-0.183703 0.191741 0.0316221 0.00850022 1 0
-0.161592 0.181054 0.0575787 0.00827033 1 0
-0.0334841 0.0332556 0.113723 0.0127761 1 0
-0.177315 0.0318544 0.193179 0.00702079 1 0
-0.00742114 0.00649798 0.100794 0.00672344 1 0
-0.0327225 0.00713169 0.100056 0.00728828 1 0
-0.00670312 0.0301976 0.122088 0.00698302 1 0
-0.360594 0.166754 0.190849 0.00932946 1 0
-0.360458 0.194671 0.1947 0.00561391 1 0
-0.187984 0.166822 0.189677 0.0105794 1 0
-0.0890311 0.0525517 0.126723 0.0104433 1 0
-0.279526 0.0994358 0.191957 0.00838132 1 0
-0.2707 0.0735521 0.149494 0.0128078 1 0
-0.395059 0.132156 0.164748 0.00532758 1 0
-0.0630797 0.13145 0.0868896 0.010546 1 0
-0.297324 0.192975 0.0285702 0.00731488 1 0
-0.256988 0.193627 0.0285966 0.00663241 1 0
-0.159405 0.0365918 0.117685 0.0118586 1 0
-0.148494 0.0192961 0.145743 0.0110561 1 0
-0.155658 0.0566242 0.133204 0.0102794 1 0
-0.347491 0.0177192 0.0687235 0.00944119 1 0
-0.253944 0.133117 0.19163 0.00868888 1 0
-0.160668 0.192288 0.0983666 0.00794803 1 0
-0.162767 0.15232 0.0923495 0.011823 1 0
-0.118921 0.170146 0.0591912 0.00871951 1 0
-0.393862 0.0306371 0.0888131 0.00630879 1 0
-0.0342825 0.0868882 0.194405 0.00582405 1 0
-0.0724711 0.129665 0.0523407 0.00787313 1 0
-0.0114266 0.193846 0.10058 0.00631329 1 0
-0.00798199 0.0330447 0.00607383 0.00636767 1 0
-0.0238827 0.0560324 0.0188092 0.00805161 1 0
-0.225893 0.127786 0.132581 0.011245 1 0
-0.0878774 0.00698675 0.0995188 0.00723216 1 0
-0.359861 0.0100027 0.0325919 0.0101839 1 0
-0.00634885 0.0635272 0.15549 0.00666141 1 0
-0.198913 0.0523203 0.0914608 0.0110048 1 0
-0.316316 0.0979592 0.0127506 0.0129877 1 0
-0.279109 0.0990261 0.00597457 0.00631869 1 0
-0.282643 0.107185 0.049494 0.0141105 1 0
-0.0948512 0.190047 0.166682 0.0103369 1 0
-0.0557363 0.192315 0.133729 0.0080218 1 0
-0.345858 0.133694 0.191225 0.00911709 1 0
-0.291379 0.188532 0.163401 0.0117574 1 0
-0.147955 0.00690015 0.132871 0.00722402 1 0
-0.392977 0.0637462 0.155599 0.00734253 1 0
-0.205744 0.0981554 0.00574847 0.0060839 1 0
-0.213949 0.0598698 0.021521 0.00722832 1 0
-0.119829 0.194369 0.00555227 0.00581835 1 0
-0.110214 0.164362 0.00948955 0.00975918 1 0
-0.241564 0.0986453 0.00619258 0.0064188 1 0
-0.231155 0.0649184 0.00722361 0.00752111 1 0
-0.072516 0.00571679 0.032973 0.00607668 1 0
-0.0398795 0.0325987 0.0100453 0.0102223 1 0
-0.0749134 0.0529824 0.0074804 0.00770916 1 0
-0.034637 0.0863996 0.00611601 0.00636006 1 0
-0.0585358 0.0762134 0.0188092 0.00941862 1 0
-0.0452963 0.0822181 0.0448237 0.00939987 1 0
-0.0328906 0.192731 0.1 0.0074275 1 0
-0.00681689 0.00655054 0.166864 0.00687372 1 0
-0.00498748 0.0997191 0.00470913 0.00492065 1 0
-0.00722114 0.0969544 0.024775 0.00732295 1 0
-0.0214136 0.0928524 0.0260145 0.0106683 1 0
-0.00611892 0.0301864 0.0885671 0.00629176 1 0
-0.00549623 0.0956741 0.119829 0.00569037 1 0
-0.0334841 0.0986656 0.111524 0.0123951 1 0
-0.0742482 0.153988 0.191585 0.0087894 1 0
-0.346052 0.132703 0.0081435 0.00845818 1 0
-0.172624 0.00676555 0.166485 0.00710748 1 0
-0.105188 0.117628 0.00615975 0.0064399 1 0
-0.10855 0.190097 0.0325934 0.0101185 1 0
-0.168432 0.096057 0.00759595 0.00777318 1 0
-0.10551 0.0300778 0.00791612 0.00819381 1 0
-0.253178 0.0328009 0.00693181 0.00723025 1 0
-0.217325 0.0321298 0.00770683 0.00796454 1 0
-0.199642 0.193449 0.00648802 0.00669564 1 0
-0.19968 0.0060719 0.193867 0.00628404 1 0
-0.245174 0.106935 0.149494 0.0121355 1 0
-0.360308 0.190453 0.0326889 0.00972258 1 0
-0.326158 0.191821 0.0485561 0.00837765 1 0
-0.366278 0.195066 0.0822926 0.0051992 1 0
-0.392933 0.100219 0.00558497 0.00577655 1 0
-0.0342897 0.120289 0.194417 0.00586501 1 0
-0.0109856 0.167283 0.18869 0.0111292 1 0
-0.0394183 0.167057 0.191843 0.00833159 1 0
-0.390892 0.190956 0.0327244 0.0093067 1 0
-0.253763 0.0323933 0.190427 0.00989013 1 0
-0.279981 0.00552827 0.00540814 0.00558839 1 0
-0.390994 0.0986796 0.165026 0.00917001 1 0
-0.199351 0.00925291 0.00631537 0.00641028 1 0
-0.339858 0.0978656 0.116162 0.0143915 1 0
-0.291051 0.0839952 0.134791 0.0143838 1 0
-0.0230061 0.123341 0.115559 0.014715 1 0
-0.0519932 0.0216838 0.0700086 0.0118849 1 0
-0.0659504 0.0385772 0.0588947 0.0126856 1 0
-0.0384246 0.0355656 0.0575836 0.0111628 1 0
-0.0413681 0.0154344 0.0520067 0.00993293 1 0
-0.355919 0.0796688 0.144359 0.00987007 1 0
-0.353269 0.0664527 0.133592 0.00738205 1 0
-0.352004 0.0664607 0.170429 0.0103816 1 0
-0.359379 0.058104 0.157686 0.00654738 1 0
-0.0439492 0.0842267 0.143609 0.0103898 1 0
-0.0555715 0.0700535 0.136294 0.00934517 1 0
-0.0493466 0.0863296 0.163824 0.0106386 1 0
-0.0534492 0.0726907 0.152056 0.00677646 1 0
-0.0386384 0.178144 0.0651692 0.0144339 1 0
-0.0476738 0.170827 0.0475964 0.00663684 1 0
-0.0327376 0.19314 0.0513751 0.00696728 1 0
-0.308907 0.158592 0.0460618 0.0088282 1 0
-0.0166338 0.0802439 0.0709789 0.0135577 1 0
-0.0185188 0.0796215 0.097997 0.0135333 1 0
-0.017346 0.0603505 0.0840744 0.0102698 1 0
-0.385086 0.0340574 0.0498343 0.00972602 1 0
-0.388393 0.106695 0.102392 0.0116154 1 0
-0.38536 0.0845969 0.101285 0.00968738 1 0
-0.387865 0.0846269 0.118425 0.00763409 1 0
-0.387009 0.093955 0.0898924 0.00514799 1 0
-0.241671 0.181504 0.0670229 0.0112165 1 0
-0.226608 0.172233 0.0583028 0.00850386 1 0
-0.255964 0.172978 0.0541895 0.00979963 1 0
-0.249612 0.189723 0.0511142 0.00837173 1 0
-0.022717 0.0142507 0.190427 0.00962286 1 0
-0.0407331 0.0149915 0.192019 0.00699943 1 0
-0.235776 0.18609 0.115207 0.0139961 1 0
-0.248867 0.166126 0.126089 0.0122412 1 0
-0.22212 0.171399 0.131059 0.0115699 1 0
-0.229005 0.186785 0.133425 0.0054521 1 0
-0.0851153 0.146493 0.022762 0.0143185 1 0
-0.0669041 0.130177 0.0330515 0.0122099 1 0
-0.063305 0.151289 0.0168905 0.00877187 1 0
-0.0815405 0.0205122 0.0716063 0.012504 1 0
-0.0780966 0.038364 0.0727091 0.00571037 1 0
-0.0957399 0.0321352 0.0575695 0.010599 1 0
-0.105371 0.0143381 0.0549332 0.0098079 1 0
-0.353367 0.0167339 0.0905831 0.0132159 1 0
-0.385155 0.0166265 0.0999075 0.0139561 1 0
-0.210662 0.0770846 0.015566 0.0112815 1 0
-0.389953 0.0388172 0.108549 0.0102772 1 0
-0.374346 0.0517042 0.120709 0.011067 1 0
-0.370621 0.037495 0.137735 0.0114201 1 0
-0.390558 0.0348163 0.13853 0.00953474 1 0
-0.0614848 0.104058 0.127071 0.013075 1 0
-0.0841309 0.110185 0.141854 0.0146546 1 0
-0.313814 0.0452291 0.190212 0.00980316 1 0
-0.292761 0.0517713 0.19146 0.00875362 1 0
-0.21056 0.154445 0.121274 0.0111641 1 0
-0.206882 0.165797 0.0859801 0.014397 1 0
-0.185081 0.158987 0.101408 0.0131654 1 0
-0.240847 0.0199757 0.0656529 0.0122568 1 0
-0.106587 0.047547 0.0623922 0.00885443 1 0
-0.103367 0.0560932 0.0794102 0.0104592 1 0
-0.116016 0.0593138 0.0591628 0.00656649 1 0
-0.117395 0.0483294 0.048068 0.00910673 1 0
-0.191796 0.19261 0.178099 0.00739796 1 0
-0.190262 0.1898 0.155824 0.010507 1 0
-0.202655 0.189878 0.185887 0.00756968 1 0
-0.284667 0.0527579 0.0492684 0.0124918 1 0
-0.267685 0.0562034 0.0643551 0.0104832 1 0
-0.252363 0.0623362 0.0534503 0.00929825 1 0
-0.217215 0.109656 0.118837 0.0131045 1 0
-0.320736 0.0555155 0.0908827 0.0116948 1 0
-0.292623 0.0664634 0.113613 0.013154 1 0
-0.288493 0.0359165 0.11613 0.0108148 1 0
-0.306189 0.0324051 0.116388 0.00722874 1 0
-0.361999 0.0517455 0.0533655 0.0100488 1 0
-0.35477 0.0616834 0.0642386 0.00636022 1 0
-0.353108 0.0627607 0.0302231 0.00985696 1 0
-0.357697 0.0745456 0.0429063 0.00805419 1 0
-0.388473 0.0786088 0.0762144 0.0115309 1 0
-0.371176 0.0763511 0.0756446 0.00648226 1 0
-0.384953 0.0606811 0.0905716 0.0106986 1 0
-0.0133713 0.0395707 0.0482004 0.0112632 1 0
-0.377054 0.00985857 0.185869 0.00990833 1 0
-0.358234 0.00751157 0.184997 0.00687113 1 0
-0.322977 0.0666139 0.132647 0.0138483 1 0
-0.290648 0.0596014 0.144794 0.0119843 1 0
-0.318269 0.0522183 0.156885 0.0147333 1 0
-0.298642 0.0225801 0.107366 0.00809767 1 0
-0.275372 0.0400522 0.134644 0.0122502 1 0
-0.277295 0.0139269 0.111945 0.0142065 1 0
-0.243332 0.158549 0.107592 0.00849985 1 0
-0.242569 0.143772 0.132518 0.0118557 1 0
-0.250115 0.170904 0.148051 0.0102692 1 0
-0.270953 0.0113225 0.178894 0.0113339 1 0
-0.29312 0.0104373 0.185275 0.010733 1 0
-0.231865 0.191675 0.150453 0.0083346 1 0
-0.0363854 0.187793 0.145368 0.0117962 1 0
-0.037714 0.16799 0.147599 0.00817705 1 0
-0.286593 0.17804 0.189411 0.0105941 1 0
-0.293143 0.15599 0.186423 0.0120585 1 0
-0.264356 0.185135 0.187138 0.0121549 1 0
-0.164858 0.117047 0.185871 0.0144117 1 0
-0.177516 0.0986111 0.17122 0.0123366 1 0
-0.184805 0.120304 0.171268 0.0105479 1 0
-0.311233 0.0306946 0.142974 0.0118427 1 0
-0.304212 0.0102483 0.147532 0.0102694 1 0
-0.318374 0.0131916 0.133019 0.00952195 1 0
-0.0386367 0.0873516 0.0632239 0.0108306 1 0
-0.0346314 0.0785248 0.0759995 0.005206 1 0
-0.0129629 0.103031 0.0634684 0.0107145 1 0
-0.337932 0.040181 0.0586026 0.0119534 1 0
-0.32304 0.0510643 0.0458029 0.0104974 1 0
-0.250929 0.00828934 0.0790767 0.00830518 1 0
-0.279563 0.033216 0.0976184 0.0099148 1 0
-0.259255 0.0237673 0.0795199 0.0110999 1 0
-0.387591 0.0867004 0.191347 0.00868954 1 0
-0.380134 0.100613 0.182544 0.00878057 1 0
-0.363045 0.0756534 0.186215 0.0109639 1 0
-0.391256 0.0917194 0.178525 0.00601633 1 0
-0.0314241 0.0759766 0.119374 0.0117015 1 0
-0.029587 0.0691096 0.140595 0.0106787 1 0
-0.0388408 0.0552642 0.118268 0.0103264 1 0
-0.0157146 0.193858 0.0469593 0.00617142 1 0
-0.277481 0.181533 0.00721478 0.00724873 1 0
-0.271742 0.191377 0.0181054 0.00864813 1 0
-0.357203 0.0992801 0.0980791 0.010705 1 0
-0.346708 0.113725 0.102435 0.00767388 1 0
-0.363235 0.116484 0.111255 0.0112617 1 0
-0.36471 0.092865 0.133798 0.00918174 1 0
-0.179094 0.00946046 0.0850337 0.0094677 1 0
-0.199891 0.0155986 0.0842305 0.0120848 1 0
-0.172 0.021775 0.0668766 0.0128311 1 0
-0.161145 0.0142864 0.0849849 0.00957009 1 0
-0.16531 0.0124429 0.0443094 0.0124479 1 0
-0.0225446 0.0474814 0.0663094 0.0105236 1 0
-0.0363874 0.056185 0.0541821 0.00983428 1 0
-0.365501 0.08116 0.123471 0.00644773 1 0
-0.385763 0.0960578 0.128605 0.00781636 1 0
-0.0139599 0.147592 0.164164 0.0119845 1 0
-0.0193222 0.126877 0.155769 0.0110009 1 0
-0.0212865 0.132071 0.173446 0.00752773 1 0
-0.00730761 0.117082 0.165563 0.00740949 1 0
-0.355834 0.0185177 0.191414 0.00859597 1 0
-0.348607 0.0383027 0.189035 0.0111529 1 0
-0.132639 0.191841 0.11779 0.00827679 1 0
-0.131246 0.18865 0.14727 0.0116651 1 0
-0.116957 0.175433 0.141497 0.00846987 1 0
-0.393127 0.106986 0.048055 0.0069068 1 0
-0.386686 0.0899624 0.0516342 0.00902786 1 0
-0.394727 0.112683 0.030698 0.00538644 1 0
-0.387084 0.104472 0.0346597 0.00655158 1 0
-0.345148 0.184789 0.0466062 0.0120454 1 0
-0.356736 0.19091 0.0990343 0.0093597 1 0
-0.127682 0.00939457 0.0200367 0.00940051 1 0
-0.132097 0.0106245 0.0400132 0.0108593 1 0
-0.114843 0.0126578 0.0419875 0.00632081 1 0
-0.116248 0.014684 0.0122303 0.00542048 1 0
-0.170733 0.133505 0.170743 0.00875461 1 0
-0.218872 0.06169 0.160269 0.0125913 1 0
-0.246232 0.0513181 0.190082 0.0100493 1 0
-0.143967 0.127614 0.0582512 0.0136594 1 0
-0.301316 0.0589064 0.0296002 0.0140002 1 0
-0.305269 0.053935 0.0508793 0.00820659 1 0
-0.306264 0.0475953 0.00980291 0.00981875 1 0
-0.0837573 0.0439635 0.0525451 0.00697184 1 0
-0.0834765 0.0514769 0.0414608 0.00642183 1 0
-0.076722 0.0672725 0.0328524 0.0127936 1 0
-0.0658256 0.110332 0.0584587 0.013466 1 0
-0.0942477 0.102218 0.0133943 0.0136546 1 0
-0.225715 0.148708 0.162646 0.00924061 1 0
-0.221432 0.176832 0.188792 0.00785824 1 0
-0.348751 0.0206444 0.0108774 0.0108922 1 0
-0.354084 0.00754641 0.0149245 0.00773943 1 0
-0.16887 0.150891 0.0104275 0.0104412 1 0
-0.184389 0.138255 0.0194275 0.0122844 1 0
-0.170477 0.0770973 0.185021 0.0141745 1 0
-0.179787 0.0643972 0.161671 0.0126068 1 0
-0.178077 0.0813081 0.167517 0.00536716 1 0
-0.171908 0.0530528 0.187151 0.0100066 1 0
-0.0215599 0.00758453 0.0470124 0.00758974 1 0
-0.295725 0.0372936 0.0668884 0.013429 1 0
-0.257832 0.038671 0.0651608 0.00964449 1 0
-0.375459 0.123248 0.09362 0.0112366 1 0
-0.378156 0.157402 0.0583142 0.0146607 1 0
-0.361717 0.112088 0.0437565 0.0134527 1 0
-0.354214 0.0947525 0.0274061 0.0115302 1 0
-0.343699 0.127706 0.046363 0.0105342 1 0
-0.375771 0.093816 0.0209501 0.0109917 1 0
-0.387431 0.179191 0.116619 0.012603 1 0
-0.38242 0.153218 0.1108 0.0133994 1 0
-0.378499 0.187674 0.094636 0.0118575 1 0
-0.231756 0.00691231 0.151275 0.00691899 1 0
-0.241288 0.00968751 0.13274 0.0100394 1 0
-0.224111 0.0114066 0.159899 0.00626691 1 0
-0.0229603 0.185685 0.00743012 0.00747811 1 0
-0.037411 0.185073 0.00917614 0.00771211 1 0
-0.0152978 0.169501 0.00788204 0.0080064 1 0
-0.365584 0.0584976 0.015229 0.0101092 1 0
-0.377674 0.064919 0.0295789 0.00972316 1 0
-0.371345 0.0763962 0.0124227 0.00890194 1 0
-0.00607016 0.113737 0.183234 0.00610793 1 0
-0.0177482 0.106556 0.166576 0.00753866 1 0
-0.0173924 0.101126 0.188401 0.0116203 1 0
-0.320855 0.0376444 0.0116917 0.00734364 1 0
-0.165208 0.137354 0.0720785 0.0134923 1 0
-0.144079 0.135267 0.0312902 0.014367 1 0
-0.165475 0.13543 0.0466744 0.011986 1 0
-0.0745623 0.00883203 0.149173 0.00893237 1 0
-0.0535073 0.0116626 0.173585 0.00612253 1 0
-0.130865 0.0425638 0.145565 0.0127738 1 0
-0.0174239 0.190396 0.172379 0.00967554 1 0
-0.0419233 0.185353 0.185353 0.0108033 1 0
-0.36587 0.143274 0.129383 0.0133985 1 0
-0.38734 0.15923 0.145213 0.0112514 1 0
-0.250941 0.192171 0.0787188 0.00784625 1 0
-0.240426 0.178773 0.0903638 0.0123165 1 0
-0.26236 0.182441 0.0879309 0.0100541 1 0
-0.115378 0.0852737 0.0465421 0.0127064 1 0
-0.135265 0.0258461 0.0546071 0.0104916 1 0
-0.289878 0.0375387 0.0857934 0.00636108 1 0
-0.294878 0.0501245 0.0832888 0.00741146 1 0
-0.296897 0.0125443 0.0631942 0.0116219 1 0
-0.0319177 0.15258 0.137429 0.0111748 1 0
-0.0461303 0.13768 0.146997 0.011531 1 0
-0.0124959 0.159635 0.144886 0.0107932 1 0
-0.121417 0.0316553 0.0691049 0.0103816 1 0
-0.142505 0.0474971 0.0650048 0.0125079 1 0
-0.136531 0.0567854 0.0846523 0.0100307 1 0
-0.00947917 0.146002 0.0490215 0.00949669 1 0
-0.0189339 0.126393 0.0464796 0.0120048 1 0
-0.0138137 0.140396 0.0740045 0.0136698 1 0
-0.211644 0.133981 0.118885 0.00946723 1 0
-0.203399 0.154344 0.1416 0.0103861 1 0
-0.37496 0.0650114 0.17113 0.0110079 1 0
-0.368208 0.0574165 0.187213 0.00801593 1 0
-0.0599565 0.140497 0.16553 0.0117625 1 0
-0.0649543 0.135088 0.147747 0.00748528 1 0
-0.0507607 0.119256 0.166314 0.0113964 1 0
-0.0611788 0.126711 0.156142 0.00496128 1 0
-0.071849 0.165862 0.0484098 0.00783746 1 0
-0.232227 0.15496 0.0381257 0.0051099 1 0
-0.26539 0.153878 0.0308856 0.00655751 1 0
-0.254226 0.148364 0.010579 0.00954279 1 0
-0.0872335 0.0210381 0.0948407 0.0114235 1 0
-0.105355 0.0511996 0.109046 0.0136553 1 0
-0.116522 0.0454841 0.0897557 0.00935573 1 0
-0.1186 0.0229352 0.0978742 0.0144792 1 0
-0.114751 0.0094733 0.178 0.00947644 1 0
-0.124719 0.0129115 0.190021 0.00698671 1 0
-0.307064 0.0130512 0.042066 0.0118309 1 0
-0.31323 0.00918472 0.0581303 0.00580519 1 0
-0.211591 0.0479259 0.138481 0.0141896 1 0
-0.192181 0.0566818 0.146392 0.00852602 1 0
-0.106678 0.190419 0.0861648 0.00958831 1 0
-0.0908359 0.178847 0.108707 0.0130443 1 0
-0.111001 0.188553 0.106954 0.00940378 1 0
-0.0909946 0.179291 0.086244 0.00942362 1 0
-0.134588 0.0840325 0.0312592 0.0118727 1 0
-0.12406 0.109313 0.00937685 0.00950764 1 0
-0.152886 0.0799858 0.0459999 0.0119702 1 0
-0.162111 0.101123 0.0443798 0.0111489 1 0
-0.367244 0.0678647 0.0600582 0.00817559 1 0
-0.379698 0.0622769 0.0475206 0.00852458 1 0
-0.382411 0.0656188 0.0628647 0.00741194 1 0
-0.00530947 0.148284 0.152208 0.00533782 1 0
-0.288341 0.189851 0.092671 0.0101512 1 0
-0.309853 0.189503 0.10137 0.0106376 1 0
-0.302921 0.179146 0.0872126 0.00822421 1 0
-0.296218 0.186488 0.0765203 0.00637589 1 0
-0.12987 0.0269885 0.191541 0.00851021 1 0
-0.155532 0.0360994 0.188404 0.00782845 1 0
-0.0410591 0.123946 0.0199892 0.0120594 1 0
-0.0498383 0.139312 0.0286472 0.00764205 1 0
-0.031696 0.141924 0.030251 0.01066 1 0
-0.0422405 0.140611 0.0091657 0.00922523 1 0
-0.322469 0.0178805 0.146835 0.00563141 1 0
-0.353699 0.0281999 0.149582 0.011231 1 0
-0.393307 0.0473753 0.0129008 0.0067172 1 0
-0.39101 0.0521887 0.0335625 0.00922384 1 0
-0.387535 0.0310431 0.0114009 0.00871386 1 0
-0.352823 0.136375 0.117279 0.00568851 1 0
-0.371019 0.129497 0.146528 0.00919033 1 0
-0.23975 0.193302 0.0389499 0.00670009 1 0
-0.21322 0.183876 0.0473552 0.012344 1 0
-0.290996 0.0840484 0.162816 0.0136415 1 0
-0.325332 0.0739599 0.153491 0.00837755 1 0
-0.216003 0.193165 0.107949 0.00683835 1 0
-0.208824 0.186868 0.0957084 0.0088923 1 0
-0.0847779 0.120989 0.0918488 0.0140475 1 0
-0.345015 0.130383 0.172191 0.0143434 1 0
-0.312653 0.0320914 0.00504478 0.00513512 1 0
-0.160375 0.0435024 0.012158 0.0121629 1 0
-0.167644 0.0655224 0.0186183 0.0113927 1 0
-0.153084 0.0234026 0.0132979 0.00819621 1 0
-0.165403 0.190889 0.0441825 0.00911561 1 0
-0.180966 0.183623 0.0569599 0.011283 1 0
-0.0703895 0.0374811 0.129595 0.0136996 1 0
-0.0388652 0.0422696 0.134182 0.0102187 1 0
-0.392038 0.0743685 0.0348702 0.00826804 1 0
-0.196846 0.143226 0.0628502 0.0136246 1 0
-0.013777 0.012867 0.0881742 0.0129082 1 0
-0.0326336 0.0202219 0.096746 0.00864434 1 0
-0.0196705 0.0323884 0.0967388 0.00913384 1 0
-0.0212244 0.0499256 0.104219 0.00999515 1 0
-0.0168423 0.0335269 0.131134 0.0113103 1 0
-0.36748 0.185207 0.190326 0.00919273 1 0
-0.352104 0.181131 0.189058 0.00676397 1 0
-0.356398 0.190294 0.182063 0.00553682 1 0
-0.189141 0.142776 0.181993 0.0147268 1 0
-0.209487 0.139272 0.155345 0.0109017 1 0
-0.0562426 0.155027 0.00555774 0.005627 1 0
-0.107317 0.0430345 0.132072 0.0108538 1 0
-0.296461 0.0860378 0.187312 0.0126963 1 0
-0.277728 0.103706 0.177365 0.0141811 1 0
-0.299084 0.0636102 0.162844 0.00833912 1 0
-0.385162 0.120121 0.157934 0.0112558 1 0
-0.37038 0.132965 0.168166 0.0108392 1 0
-0.385632 0.140025 0.158284 0.00865763 1 0
-0.0482981 0.19129 0.0831739 0.00916622 1 0
-0.0612524 0.15544 0.0821634 0.0139729 1 0
-0.0367202 0.15469 0.0757918 0.0113843 1 0
-0.161624 0.0198379 0.103776 0.0100296 1 0
-0.15685 0.0402778 0.0923543 0.0138665 1 0
-0.15098 0.0378477 0.137264 0.00949224 1 0
-0.149986 0.0504614 0.149848 0.0083531 1 0
-0.169736 0.0424577 0.135879 0.00987065 1 0
-0.345062 0.0342228 0.0782216 0.00975469 1 0
-0.33098 0.0194967 0.0588677 0.00986929 1 0
-0.327716 0.0304708 0.0735557 0.00859503 1 0
-0.246079 0.154124 0.191715 0.00829122 1 0
-0.257018 0.141833 0.182154 0.0109571 1 0
-0.0909553 0.0358688 0.131503 0.00701734 1 0
-0.0721281 0.060405 0.134812 0.00987482 1 0
-0.129253 0.179824 0.102862 0.0112379 1 0
-0.164382 0.176216 0.10136 0.0137664 1 0
-0.140089 0.149112 0.0760627 0.0145271 1 0
-0.140634 0.172744 0.0614462 0.013265 1 0
-0.180291 0.151694 0.0809075 0.00911506 1 0
-0.386181 0.0416112 0.0904011 0.00841162 1 0
-0.0516717 0.0525541 0.184848 0.0140982 1 0
-0.0722764 0.0624285 0.179007 0.00948518 1 0
-0.0348474 0.0734227 0.181379 0.0129312 1 0
-0.0506055 0.100507 0.0440875 0.00965794 1 0
-0.0706543 0.0913602 0.0671509 0.00795337 1 0
-0.0816734 0.117759 0.0433435 0.00965938 1 0
-0.0483573 0.188757 0.112117 0.0111442 1 0
-0.00970976 0.0470906 0.0128571 0.00973229 1 0
-0.0123456 0.0550317 0.0325287 0.00990198 1 0
-0.00980577 0.0280851 0.0111555 0.00741917 1 0
-0.2282 0.155122 0.0560451 0.00882879 1 0
-0.213943 0.16944 0.0663647 0.00676659 1 0
-0.232681 0.136413 0.112038 0.0120468 1 0
-0.243686 0.114589 0.120711 0.0138871 1 0
-0.0564921 0.0924674 0.105065 0.0122932 1 0
-0.0498239 0.190957 0.0181107 0.00905355 1 0
-0.238506 0.150955 0.00679354 0.00687541 1 0
-0.106056 0.00804251 0.0861211 0.0080478 1 0
-0.0994817 0.0132035 0.11266 0.0115751 1 0
-0.142361 0.143467 0.102546 0.0126466 1 0
-0.346896 0.0103949 0.0502715 0.0104187 1 0
-0.337578 0.00615697 0.0647539 0.00632648 1 0
-0.365415 0.0149719 0.0720151 0.008988 1 0
-0.0131234 0.045257 0.15088 0.0119557 1 0
-0.0127507 0.0623101 0.141517 0.00750223 1 0
-0.304444 0.185815 0.0513571 0.0136452 1 0
-0.281936 0.176296 0.0604795 0.0124403 1 0
-0.179508 0.0471838 0.102471 0.0118902 1 0
-0.178001 0.0538737 0.0770514 0.0144384 1 0
-0.187521 0.0410831 0.0886018 0.00525026 1 0
-0.174998 0.0847604 0.0147851 0.00955679 1 0
-0.290064 0.084341 0.0344495 0.0142315 1 0
-0.290002 0.0844431 0.0611749 0.0124942 1 0
-0.376134 0.0463674 0.191537 0.00625324 1 0
-0.0513784 0.191572 0.152027 0.00853012 1 0
-0.0678098 0.176773 0.12328 0.0142848 1 0
-0.344998 0.153703 0.184615 0.0120791 1 0
-0.362316 0.140492 0.185516 0.00972086 1 0
-0.18804 0.169771 0.146387 0.0119031 1 0
-0.308172 0.180009 0.1575 0.00797814 1 0
-0.308458 0.182891 0.125762 0.0146732 1 0
-0.323046 0.0647415 0.0612375 0.0101253 1 0
-0.314683 0.0935818 0.0994618 0.0142316 1 0
-0.30898 0.0979252 0.0495522 0.0135253 1 0
-0.347456 0.0862242 0.0563558 0.0124924 1 0
-0.139757 0.0240381 0.124471 0.0124244 1 0
-0.119083 0.0265038 0.135206 0.00967716 1 0
-0.131047 0.00950555 0.13885 0.00995462 1 0
-0.390467 0.0463886 0.154038 0.00872832 1 0
-0.379006 0.0613228 0.150385 0.0104481 1 0
-0.382075 0.0448445 0.00657943 0.00658226 1 0
-0.22257 0.14715 0.140927 0.0101008 1 0
-0.283228 0.192355 0.18211 0.00772919 1 0
-0.251721 0.184881 0.157569 0.00671726 1 0
-0.272656 0.0531788 0.149365 0.0076595 1 0
-0.209222 0.0940953 0.0136833 0.00589358 1 0
-0.199062 0.0655167 0.031442 0.0115316 1 0
-0.193577 0.0745342 0.0173387 0.00608358 1 0
-0.132108 0.179284 0.00894548 0.0089664 1 0
-0.139169 0.152455 0.0124863 0.0115774 1 0
-0.226438 0.0840168 0.00791548 0.00792328 1 0
-0.231146 0.0678308 0.0205716 0.0117466 1 0
-0.242263 0.0852114 0.0147031 0.00970349 1 0
-0.151372 0.0795723 0.192909 0.00712179 1 0
-0.0541621 0.009468 0.0191585 0.00949259 1 0
-0.0663788 0.0137363 0.0309331 0.00688294 1 0
-0.0387704 0.0148417 0.0112337 0.00865432 1 0
-0.353335 0.0998197 0.0757791 0.0119344 1 0
-0.362165 0.119893 0.187596 0.010984 1 0
-0.0728923 0.0772205 0.190884 0.00967805 1 0
-0.288715 0.00701357 0.0926238 0.00701559 1 0
-0.0506495 0.0549668 0.0138225 0.0138284 1 0
-0.0708841 0.0519034 0.0203875 0.00783806 1 0
-0.0365921 0.0763735 0.0199077 0.0125531 1 0
-0.365386 0.0868869 0.0713017 0.00630041 1 0
-0.054346 0.0732162 0.0601268 0.0105279 1 0
-0.05443 0.0886831 0.0309235 0.00844493 1 0
-0.057257 0.0690964 0.0416356 0.00863903 1 0
-0.364393 0.0328048 0.0626499 0.0111804 1 0
-0.262206 0.12561 0.144205 0.0136869 1 0
-0.0690483 0.193069 0.111205 0.00699695 1 0
-0.0517508 0.17195 0.111857 0.00600386 1 0
-0.0317408 0.00808948 0.183343 0.00727501 1 0
-0.0448126 0.132295 0.0726416 0.012636 1 0
-0.0105125 0.0861309 0.00983185 0.0100961 1 0
-0.0124964 0.104975 0.0414812 0.0109114 1 0
-0.00883058 0.0853637 0.0392147 0.00906131 1 0
-0.0142786 0.1082 0.011511 0.0115812 1 0
-0.0377934 0.0960012 0.182614 0.00987213 1 0
-0.0166288 0.068417 0.167964 0.0102407 1 0
-0.306593 0.0605586 0.0743283 0.0106548 1 0
-0.0219073 0.0146401 0.00836378 0.00841415 1 0
-0.00810007 0.0434991 0.0724525 0.00811193 1 0
-0.0221052 0.0452536 0.0887114 0.00622461 1 0
-0.0164182 0.0888751 0.117519 0.0081728 1 0
-0.0358909 0.0913123 0.129594 0.00726122 1 0
-0.0149256 0.101493 0.132387 0.0113841 1 0
-0.0064834 0.0180904 0.106134 0.00649126 1 0
-0.327023 0.0779322 0.11252 0.00959491 1 0
-0.0792518 0.136865 0.0706925 0.0129743 1 0
-0.0720758 0.152592 0.0579455 0.00850425 1 0
-0.0861308 0.159992 0.0801141 0.0114014 1 0
-0.103346 0.171842 0.0714987 0.0112036 1 0
-0.3503 0.125144 0.0244213 0.0125217 1 0
-0.154271 0.00658848 0.154326 0.00659142 1 0
-0.145609 0.0129631 0.162101 0.00672077 1 0
-0.105485 0.124246 0.0203198 0.0118756 1 0
-0.385248 0.0794694 0.158897 0.0105453 1 0
-0.372667 0.0773341 0.146586 0.0071862 1 0
-0.343365 0.0431501 0.146365 0.00722527 1 0
-0.063767 0.142112 0.0487261 0.00773984 1 0
-0.0938688 0.184927 0.0594656 0.00894189 1 0
-0.152705 0.0619648 0.0546286 0.00801086 1 0
-0.39375 0.146995 0.0492081 0.00626239 1 0
-0.383045 0.130686 0.0581556 0.0124989 1 0
-0.167215 0.0563811 0.117252 0.00942078 1 0
-0.171844 0.0640991 0.131713 0.0076115 1 0
-0.152281 0.0794524 0.0082892 0.00831509 1 0
-0.175193 0.0796253 0.0358228 0.0120995 1 0
-0.140635 0.090329 0.0145581 0.00697231 1 0
-0.286716 0.16251 0.0756719 0.00862372 1 0
-0.248275 0.0833534 0.144199 0.0122316 1 0
-0.126338 0.0206836 0.00730592 0.00730955 1 0
-0.0404216 0.100268 0.0163574 0.0119049 1 0
-0.0378094 0.0911662 0.0329799 0.00722532 1 0
-0.235829 0.0443444 0.0110074 0.0110097 1 0
-0.248735 0.0314925 0.0141296 0.00612448 1 0
-0.208742 0.178494 0.0101585 0.0101662 1 0
-0.196251 0.189903 0.0181036 0.0101298 1 0
-0.0887479 0.0103276 0.0365731 0.0103767 1 0
-0.0975155 0.00563253 0.0489598 0.0056578 1 0
-0.0158431 0.106378 0.0939756 0.0136557 1 0
-0.0502105 0.113761 0.109082 0.0102676 1 0
-0.0436462 0.104431 0.0946859 0.00809977 1 0
-0.202061 0.187687 0.0791138 0.00904632 1 0
-0.201503 0.0132524 0.0433349 0.0106019 1 0
-0.191637 0.0115332 0.178539 0.0115424 1 0
-0.204607 0.0138582 0.167907 0.00543025 1 0
-0.194779 0.0189619 0.192232 0.00777998 1 0
-0.168729 0.189848 0.0818483 0.010209 1 0
-0.129854 0.190782 0.0210644 0.00923197 1 0
-0.26258 0.110366 0.161066 0.00904576 1 0
-0.262803 0.106419 0.146864 0.00569588 1 0
-0.36782 0.188057 0.0582292 0.0121309 1 0
-0.363468 0.18552 0.0857521 0.00573485 1 0
-0.355917 0.173687 0.0582736 0.00732894 1 0
-0.14095 0.00809392 0.111729 0.00810161 1 0
-0.139403 0.0520251 0.158761 0.00557152 1 0
-0.391256 0.0859491 0.00909444 0.00878231 1 0
-0.388958 0.10046 0.0129862 0.00578511 1 0
-0.229216 0.108846 0.136684 0.00841708 1 0
-0.252786 0.0911588 0.168619 0.0137994 1 0
-0.0620011 0.109176 0.0885769 0.0118184 1 0
-0.341706 0.111231 0.188779 0.0112243 1 0
-0.035336 0.135001 0.185697 0.0113418 1 0
-0.0334853 0.114705 0.182273 0.00932439 1 0
-0.0245974 0.185509 0.191853 0.00818761 1 0
-0.204741 0.0577915 0.0675464 0.0142103 1 0
-0.206424 0.179996 0.192712 0.00729287 1 0
-0.370418 0.00789946 0.0151283 0.00793645 1 0
-0.297334 0.10541 0.0705256 0.0116052 1 0
-0.289761 0.133647 0.0548894 0.0134367 1 0
-0.26159 0.111988 0.191384 0.00862492 1 0
-0.378576 0.0868718 0.00681008 0.00500929 1 0
-0.0298629 0.0738766 0.05118 0.00925954 1 0
-0.197723 0.039046 0.0100464 0.01024 1 0
-0.273033 0.0212788 0.192444 0.00756068 1 0
-0.271806 0.0218552 0.0091431 0.00915288 1 0
-0.282277 0.0111852 0.0121297 0.00665603 1 0
-0.0912619 0.1637 0.00873324 0.00896896 1 0
-0.187463 0.109838 0.010696 0.0107031 1 0
-0.211959 0.150836 0.0463463 0.0100119 1 0
-0.276616 0.00726373 0.0208333 0.00726634 1 0
-0.269059 0.00801338 0.0365432 0.00799643 1 0
-0.350892 0.112417 0.0889808 0.00647615 1 0
-0.382318 0.104857 0.167515 0.00698831 1 0
-0.391578 0.112555 0.1718 0.00579373 1 0
-0.0383565 0.118252 0.13661 0.0118309 1 0
-0.347168 0.106342 0.0103183 0.0103355 1 0
-0.0531425 0.147131 0.189814 0.0101934 1 0
-0.0600396 0.165464 0.190941 0.00934447 1 0
-0.154216 0.190864 0.116273 0.00922074 1 0
-0.179424 0.193204 0.0949906 0.00683883 1 0
-0.212951 0.124659 0.145298 0.00716684 1 0
-0.204603 0.0185068 0.00721977 0.0072496 1 0
-0.188898 0.0204287 0.0133955 0.00869768 1 0
-0.390733 0.0440608 0.0726776 0.00928055 1 0
-0.375987 0.0444276 0.0718798 0.00765274 1 0
-0.369288 0.114453 0.0681617 0.0110147 1 0
-0.0346381 0.104006 0.194264 0.0058219 1 0
-0.276533 0.149359 0.0667189 0.0102655 1 0
-0.215694 0.192892 0.0133808 0.00725409 1 0
-0.240383 0.0400749 0.0586261 0.00904036 1 0
-0.0898222 0.0384868 0.00728664 0.00748467 1 0
-0.0845856 0.0737115 0.0110843 0.0113386 1 0
-0.315825 0.189883 0.0295578 0.0104679 1 0
-0.37166 0.193887 0.0984797 0.00613497 1 0
-0.0122528 0.0828442 0.152275 0.0115181 1 0
-0.0158326 0.0667114 0.152824 0.00501628 1 0
-0.227332 0.0458339 0.193588 0.00644537 1 0
-0.0277894 0.19127 0.0808528 0.00878933 1 0
-0.392151 0.0865789 0.141861 0.00786235 1 0
-0.168763 0.151455 0.190798 0.0092146 1 0
-0.204381 0.00966975 0.0216306 0.00967165 1 0
-0.0243094 0.150481 0.0968196 0.013393 1 0
-0.0336358 0.0203736 0.0661439 0.00692063 1 0
-0.361559 0.0637907 0.145559 0.00702253 1 0
-0.0619236 0.074084 0.16276 0.00694743 1 0
-0.0382627 0.160366 0.0558773 0.00562937 1 0
-0.0275376 0.0718734 0.0836242 0.00512013 1 0
-0.228784 0.0149795 0.112927 0.0135174 1 0
-0.395161 0.0898583 0.106136 0.00496068 1 0
-0.25985 0.18758 0.0639603 0.00819434 1 0
-0.0299818 0.0347722 0.183721 0.0061519 1 0
-0.21549 0.186948 0.122246 0.00749354 1 0
-0.361217 0.177099 0.150076 0.0109281 1 0
-0.067308 0.149657 0.0302269 0.00524767 1 0
-0.0991941 0.0200913 0.0677805 0.00556428 1 0
-0.367458 0.0270138 0.0999109 0.00656395 1 0
-0.382911 0.0385284 0.126089 0.00554315 1 0
-0.15259 0.102064 0.170509 0.0103504 1 0
-0.204226 0.159285 0.105587 0.00643247 1 0
-0.106211 0.0611613 0.0650592 0.00502375 1 0
-0.200173 0.191619 0.170332 0.00501194 1 0
-0.271079 0.0587953 0.0365451 0.00707767 1 0
-0.311446 0.0565969 0.10969 0.0084572 1 0
-0.375804 0.0736045 0.0865151 0.00564715 1 0
-0.374788 0.00974941 0.169654 0.00494595 1 0
-0.307617 0.0594108 0.141521 0.0052979 1 0
-0.282294 0.0255418 0.127101 0.00550773 1 0
-0.270122 0.0111254 0.154309 0.0114169 1 0
-0.278578 0.161938 0.192902 0.00495567 1 0
-0.185316 0.109793 0.154663 0.00911126 1 0
-0.293049 0.024156 0.145083 0.00759668 1 0
-0.0265287 0.096412 0.0693108 0.00547116 1 0
-0.241683 0.0191683 0.0860944 0.0082177 1 0
-0.368118 0.0918938 0.184249 0.00616362 1 0
-0.0420928 0.0663928 0.129828 0.00604567 1 0
-0.272006 0.172145 0.0138445 0.00574495 1 0
-0.358694 0.104248 0.124013 0.00698951 1 0
-0.172924 0.0295833 0.0470859 0.00846439 1 0
-0.0390121 0.0491533 0.0682909 0.00614668 1 0
-0.375885 0.0784083 0.117374 0.00590407 1 0
-0.129273 0.172145 0.145903 0.00501788 1 0
-0.391118 0.093988 0.0385701 0.00534297 1 0
-0.105125 0.00750422 0.0121776 0.0078184 1 0
-0.245577 0.0643043 0.163627 0.0144505 1 0
-0.133484 0.113119 0.0700113 0.00774841 1 0
-0.292684 0.0677731 0.0443244 0.00523317 1 0
-0.0766266 0.0592614 0.0541753 0.00998487 1 0
-0.0920868 0.096747 0.0403876 0.0139767 1 0
-0.355631 0.0369208 0.00910917 0.00678582 1 0
-0.187383 0.152005 0.00844206 0.00556809 1 0
-0.18167 0.0620785 0.179408 0.00537936 1 0
-0.0159403 0.00601645 0.0343362 0.00609946 1 0
-0.273759 0.040202 0.0598429 0.00721707 1 0
-0.383771 0.152815 0.084718 0.0127205 1 0
-0.365547 0.1106 0.0219998 0.00868864 1 0
-0.382057 0.169898 0.0993032 0.0068623 1 0
-0.381343 0.0643481 0.0134882 0.00679037 1 0
-0.0639149 0.00754483 0.168317 0.00764772 1 0
-0.0255336 0.192066 0.158187 0.00553389 1 0
-0.373082 0.165629 0.128448 0.0101101 1 0
-0.252547 0.191844 0.100086 0.00835748 1 0
-0.0965972 0.0845669 0.0638608 0.0128504 1 0
-0.14744 0.0175978 0.0433787 0.00617132 1 0
-0.284139 0.0201847 0.081076 0.0116354 1 0
-0.0265165 0.16914 0.138529 0.00627887 1 0
-0.137475 0.0306754 0.0699326 0.00572817 1 0
-0.0227494 0.144802 0.0482607 0.00688008 1 0
-0.379247 0.0677962 0.188607 0.00720059 1 0
-0.261495 0.142099 0.0245236 0.00738447 1 0
-0.106169 0.0378184 0.09608 0.00499535 1 0
-0.310725 0.0197461 0.0571708 0.00509167 1 0
-0.19151 0.0413327 0.142497 0.00732389 1 0
-0.139872 0.105686 0.0266184 0.0108939 1 0
-0.373959 0.0564584 0.0614421 0.00513291 1 0
-0.146353 0.0271243 0.18695 0.00509141 1 0
-0.0298808 0.136673 0.014959 0.0056102 1 0
-0.340704 0.0146383 0.141235 0.00932259 1 0
-0.366728 0.120761 0.130942 0.00918468 1 0
-0.221367 0.186752 0.102372 0.00531139 1 0
-0.0996498 0.0980634 0.092229 0.0132821 1 0
-0.170107 0.0277319 0.0112926 0.00509826 1 0
-0.168886 0.177023 0.0442298 0.0074665 1 0
-0.0497445 0.0241692 0.132148 0.0109974 1 0
-0.389449 0.0608805 0.0214952 0.00511992 1 0
-0.188863 0.129071 0.0421877 0.012663 1 0
-0.168 0.0388015 0.189779 0.00500258 1 0
-0.0361613 0.0111184 0.0808431 0.0100163 1 0
-0.0330297 0.027338 0.131563 0.00602515 1 0
-0.380836 0.174758 0.191983 0.00805852 1 0
-0.191985 0.140342 0.160274 0.0073124 1 0
-0.0475619 0.155101 0.0135935 0.00636649 1 0
-0.089078 0.0771357 0.130195 0.0143848 1 0
-0.386624 0.131859 0.169841 0.00552843 1 0
-0.163404 0.0272597 0.139457 0.00697779 1 0
-0.317549 0.0334651 0.0588785 0.00950924 1 0
-0.251437 0.157781 0.182183 0.00593932 1 0
-0.0862738 0.0444398 0.144012 0.00885247 1 0
-0.144082 0.165439 0.105567 0.0095987 1 0
-0.162451 0.163006 0.0706732 0.0123462 1 0
-0.377191 0.0348654 0.0993471 0.00595367 1 0
-0.0292483 0.0558257 0.19181 0.00845751 1 0
-0.0731428 0.104323 0.0409557 0.00643389 1 0
-0.0198718 0.17265 0.11226 0.0139851 1 0
-0.236318 0.163423 0.0677451 0.00765444 1 0
-0.229331 0.119425 0.108368 0.00565285 1 0
-0.0618705 0.108585 0.148216 0.00855224 1 0
-0.0472707 0.190341 0.0339418 0.00579053 1 0
-0.252217 0.157224 0.00623357 0.00624238 1 0
-0.0962091 0.0159385 0.081255 0.00563935 1 0
-0.00817874 0.0253714 0.146558 0.0083663 1 0
-0.291538 0.171609 0.0445923 0.00670552 1 0
-0.192874 0.0346911 0.0760032 0.00985719 1 0
-0.186361 0.103634 0.0473216 0.0134073 1 0
-0.0741433 0.188066 0.14553 0.0114578 1 0
-0.337023 0.158487 0.194499 0.00550687 1 0
-0.314179 0.0840405 0.072824 0.014068 1 0
-0.133116 0.0246177 0.141414 0.00578305 1 0
-0.394011 0.0446063 0.149989 0.00599448 1 0
-0.37493 0.0385825 0.0159213 0.0066536 1 0
-0.22654 0.143138 0.126695 0.00520927 1 0
-0.268222 0.192866 0.175692 0.00715241 1 0
-0.283563 0.0645575 0.16196 0.00723602 1 0
-0.212596 0.0829564 0.0372903 0.0113053 1 0
-0.123976 0.161412 0.0117908 0.00607324 1 0
-0.162715 0.0962505 0.18281 0.00660952 1 0
-0.0501585 0.00739969 0.0403256 0.00761423 1 0
-0.338479 0.102953 0.0632961 0.00772136 1 0
-0.210651 0.0578669 0.112459 0.0136824 1 0
-0.0662949 0.0647975 0.151469 0.0083119 1 0
-0.289129 0.0209543 0.0975938 0.00563666 1 0
-0.031921 0.0468844 0.0111795 0.00631896 1 0
-0.374995 0.0812476 0.0630345 0.00757385 1 0
-0.240684 0.182445 0.153056 0.00545292 1 0
-0.052213 0.0903392 0.0549818 0.00533031 1 0
-0.371036 0.0137309 0.0852819 0.00547397 1 0
-0.286823 0.129083 0.131978 0.0140184 1 0
-0.063446 0.182761 0.102616 0.0076676 1 0
-0.020394 0.00826111 0.173178 0.00829914 1 0
-0.0312729 0.139892 0.0824798 0.00574432 1 0
-0.00863994 0.083511 0.0249144 0.00519484 1 0
-0.0488243 0.0851716 0.190139 0.00732035 1 0
-0.021921 0.0320327 0.0063651 0.00619372 1 0
-0.0320102 0.0409486 0.0967865 0.0058844 1 0
-0.319167 0.0835592 0.143631 0.00670174 1 0
-0.0782541 0.146147 0.0872911 0.00606958 1 0
-0.225196 0.0554171 0.125535 0.00602916 1 0
-0.128068 0.159785 0.0950072 0.0103182 1 0
-0.335086 0.144369 0.0208107 0.0122591 1 0
-0.309413 0.0449647 0.0811385 0.00659358 1 0
-0.139213 0.00758794 0.153068 0.00558374 1 0
-0.112588 0.0974011 0.00905504 0.00553724 1 0
-0.354749 0.0447492 0.15183 0.00550329 1 0
-0.0586951 0.146078 0.0365589 0.00602574 1 0
-0.250268 0.0762195 0.0341256 0.0131473 1 0
-0.0961069 0.193018 0.0469953 0.00699127 1 0
-0.144597 0.0535251 0.0484729 0.00521266 1 0
-0.383755 0.143112 0.0443475 0.00609051 1 0
-0.177372 0.0558999 0.142282 0.0068624 1 0
-0.149436 0.0717535 0.0217132 0.00809978 1 0
-0.0869359 0.175095 0.0724519 0.00555306 1 0
-0.279529 0.172596 0.089291 0.00978439 1 0
-0.250355 0.0597187 0.137615 0.0123911 1 0
-0.119589 0.0328563 0.0105656 0.00746041 1 0
-0.133067 0.163118 0.0460139 0.006435 1 0
-0.230063 0.025654 0.00788834 0.00633899 1 0
-0.0355784 0.114217 0.101586 0.00617914 1 0
-0.217434 0.184185 0.0825201 0.00708441 1 0
-0.335162 0.0848649 0.0984859 0.0080474 1 0
-0.113069 0.114581 0.144575 0.0147412 1 0
-0.174078 0.166055 0.0859442 0.00708755 1 0
-0.274922 0.125237 0.164978 0.0106713 1 0
-0.346199 0.184401 0.0697786 0.0111541 1 0
-0.142237 0.0228484 0.102594 0.00962491 1 0
-0.14345 0.0678292 0.0349685 0.00696443 1 0
-0.394852 0.0819298 0.0230254 0.00518911 1 0
-0.232323 0.0944074 0.142046 0.0072955 1 0
-0.044562 0.116355 0.0848029 0.00741468 1 0
-0.353889 0.109415 0.17346 0.00846082 1 0
-0.0355702 0.125228 0.171647 0.00577467 1 0
-0.0219492 0.169303 0.194138 0.00592133 1 0
-0.189144 0.0431386 0.0602557 0.00839812 1 0
-0.210267 0.167803 0.187758 0.00653748 1 0
-0.371833 0.0125051 0.0272674 0.00523647 1 0
-0.235904 0.0268693 0.129898 0.00839309 1 0
-0.00800912 0.0936409 0.106956 0.00614546 1 0
-0.152239 0.0664404 0.148093 0.00787896 1 0
-0.0727944 0.116542 0.0759453 0.00635603 1 0
-0.256759 0.110831 0.177046 0.00796748 1 0
-0.0171044 0.142267 0.0374209 0.00560163 1 0
-0.388409 0.15406 0.161688 0.00604898 1 0
-0.212628 0.0445981 0.0184521 0.00840461 1 0
-0.287804 0.0212483 0.00898011 0.00524894 1 0
-0.103648 0.142195 0.00915061 0.00918398 1 0
-0.0249615 0.0944006 0.00999414 0.00581314 1 0
-0.17413 0.101717 0.0223372 0.0090261 1 0
-0.221216 0.134036 0.0650604 0.0125142 1 0
-0.204726 0.070397 0.144764 0.0101323 1 0
-0.283783 0.00667192 0.0360334 0.00686949 1 0
-0.307041 0.163873 0.140303 0.00930808 1 0
-0.372003 0.107226 0.0994053 0.00614495 1 0
-0.0436736 0.10863 0.12283 0.00579659 1 0
-0.34477 0.108323 0.0249005 0.00519196 1 0
-0.0377104 0.15348 0.184693 0.00731607 1 0
-0.121077 0.183774 0.11724 0.0057677 1 0
-0.185975 0.191251 0.0741351 0.00816562 1 0
-0.229029 0.132523 0.15296 0.00991017 1 0
-0.190654 0.0233533 0.00723081 0.00727075 1 0
-0.36508 0.126326 0.0566512 0.0060488 1 0
-0.118158 0.188182 0.158422 0.00502799 1 0
-0.0271665 0.103701 0.1749 0.00535086 1 0
-0.279837 0.149124 0.0515643 0.00524692 1 0
-0.207288 0.192364 0.0321903 0.00772377 1 0
-0.23098 0.0647793 0.0732639 0.0135387 1 0
-0.214176 0.0155511 0.163247 0.00500672 1 0
-0.0209887 0.072175 0.0348169 0.00943272 1 0
-0.0305213 0.134868 0.138194 0.00660834 1 0
-0.0777922 0.0430145 0.0142222 0.0049973 1 0
-0.250382 0.186598 0.0369264 0.00617653 1 0
-0.369015 0.0664313 0.1323 0.00841746 1 0
-0.163825 0.0656479 0.0972373 0.0128942 1 0
-0.0139643 0.101756 0.151244 0.00749925 1 0
-0.105723 0.0334557 0.118016 0.00623026 1 0
-0.0242189 0.0717604 0.155129 0.00504056 1 0
-0.244405 0.0437342 0.178231 0.00539913 1 0
-0.0868532 0.0275435 0.013115 0.00530271 1 0
-0.238417 0.118837 0.138676 0.00530997 1 0
-0.248809 0.0411882 0.0203365 0.00538804 1 0
-0.271743 0.164873 0.0723046 0.00690452 1 0
-0.259549 0.0164941 0.0393869 0.00505907 1 0
-0.0336293 0.184633 0.106557 0.00512952 1 0
-0.0961337 0.069566 0.0259228 0.00794518 1 0
-0.261421 0.0946635 0.0449094 0.0109537 1 0
-0.16721 0.147574 0.178979 0.0079243 1 0
-0.162571 0.0175805 0.15751 0.00737101 1 0
-0.0681521 0.156908 0.15673 0.00858295 1 0
-0.371311 0.188827 0.17645 0.0056506 1 0
-0.382051 0.0326958 0.0660182 0.00679611 1 0
-0.370883 0.097932 0.0722141 0.00607098 1 0
-0.189375 0.0100781 0.0223039 0.00496697 1 0
-0.293977 0.128725 0.155733 0.0107931 1 0
-0.294931 0.106278 0.116439 0.0147434 1 0
-0.319684 0.118009 0.126407 0.0144058 1 0
-0.333114 0.100453 0.142545 0.0129627 1 0
-0.233056 0.0821008 0.185284 0.0135691 1 0
-0.222491 0.107745 0.186574 0.0136897 1 0
-0.205985 0.0856081 0.180974 0.0140664 1 0
-0.209378 0.0980333 0.160304 0.0102888 1 0
-0.0183493 0.171206 0.088728 0.00963997 1 0
-0.0138642 0.130553 0.0946587 0.0092099 1 0
-0.00880729 0.14103 0.109349 0.00910086 1 0
-0.0455904 0.15159 0.109242 0.0112735 1 0
-0.0248175 0.0292809 0.0651985 0.00564902 1 0
-0.051736 0.0417432 0.0745267 0.00867866 1 0
-0.34206 0.0568584 0.130516 0.00768926 1 0
-0.351697 0.0751907 0.157835 0.00494477 1 0
-0.0670896 0.0864491 0.169068 0.00786377 1 0
-0.0512748 0.0963263 0.151133 0.0056313 1 0
-0.0507137 0.0645705 0.163841 0.00779486 1 0
-0.0223355 0.190893 0.0607357 0.00673162 1 0
-0.0467381 0.191243 0.0507055 0.00669401 1 0
-0.299576 0.14876 0.0144156 0.008239 1 0
-0.323826 0.152206 0.0430153 0.00768271 1 0
-0.00617829 0.0719664 0.0851172 0.00587751 1 0
-0.00679986 0.0963776 0.0785689 0.00696181 1 0
-0.0420936 0.072806 0.0881394 0.0101486 1 0
-0.392841 0.0130103 0.0241736 0.00733186 1 0
-0.392432 0.0186516 0.0607261 0.00636687 1 0
-0.374975 0.0243043 0.043706 0.00560077 1 0
-0.0871383 0.0936887 0.187415 0.0112409 1 0
-0.142323 0.107156 0.187424 0.0100812 1 0
-0.145518 0.0811453 0.142775 0.0091413 1 0
-0.215674 0.0140729 0.108765 0.0140781 1 0
-0.222644 0.016739 0.0890476 0.011201 1 0
-0.249043 0.0290925 0.103992 0.0127402 1 0
-0.393134 0.1016 0.0826434 0.00716053 1 0
-0.366581 0.0771724 0.102847 0.0105666 1 0
-0.22542 0.187068 0.0617098 0.00676333 1 0
-0.245887 0.16773 0.0766569 0.00611283 1 0
-0.0157395 0.037729 0.189653 0.0105725 1 0
-0.0536306 0.0208592 0.191866 0.00717096 1 0
-0.214248 0.187878 0.137434 0.00777375 1 0
-0.231408 0.167212 0.109112 0.00631698 1 0
-0.370209 0.186792 0.131924 0.0115277 1 0
-0.348265 0.188219 0.175274 0.00525853 1 0
-0.357703 0.16075 0.122765 0.00699528 1 0
-0.348719 0.169077 0.156321 0.00518334 1 0
-0.0777636 0.163008 0.0142156 0.00567678 1 0
-0.0703331 0.140071 0.0105286 0.00591555 1 0
-0.107597 0.0123506 0.0706847 0.00622383 1 0
-0.0858999 0.00550219 0.062506 0.00576121 1 0
-0.369151 0.00818008 0.0940423 0.00506689 1 0
-0.380448 0.0115654 0.123048 0.0101947 1 0
-0.361218 0.00529068 0.0991335 0.00545717 1 0
-0.21127 0.107896 0.037595 0.0136718 1 0
-0.19285 0.098723 0.0741582 0.0146363 1 0
-0.208754 0.0675954 0.0481468 0.00789315 1 0
-0.190332 0.0714759 0.0516261 0.0112526 1 0
-0.386695 0.0279839 0.124866 0.0057263 1 0
-0.391511 0.0471853 0.123585 0.00691367 1 0
-0.362912 0.0409177 0.12372 0.00493753 1 0
-0.0819763 0.098613 0.165435 0.0117008 1 0
-0.0732932 0.088342 0.117281 0.00888556 1 0
-0.0762444 0.12042 0.121165 0.00973858 1 0
-0.109151 0.0843392 0.112748 0.0131693 1 0
-0.157145 0.101235 0.154726 0.00609758 1 0
-0.156414 0.0947529 0.141875 0.00831439 1 0
-0.141156 0.0819152 0.157509 0.0062447 1 0
-0.311691 0.0225125 0.189756 0.0105256 1 0
-0.277398 0.0425153 0.191083 0.00918601 1 0
-0.31954 0.0655847 0.185438 0.0122109 1 0
-0.199689 0.169705 0.103668 0.00509297 1 0
-0.202364 0.140992 0.101095 0.011787 1 0
-0.222034 0.150856 0.0986253 0.010356 1 0
-0.195383 0.149282 0.0816558 0.00618624 1 0
-0.234882 0.00824154 0.0210247 0.00850376 1 0
-0.227894 0.00967124 0.0485354 0.00981243 1 0
-0.119952 0.0603646 0.0313592 0.0116434 1 0
-0.0929176 0.0649489 0.0678022 0.00749513 1 0
-0.119362 0.0624182 0.0864577 0.00812881 1 0
-0.103313 0.0438392 0.0487169 0.00568792 1 0
-0.189872 0.191278 0.190833 0.00620737 1 0
-0.218556 0.191504 0.183794 0.0088616 1 0
-0.256878 0.0572496 0.0376613 0.00725023 1 0
-0.272126 0.0751648 0.0726282 0.0106756 1 0
-0.251638 0.0481765 0.0465315 0.00647808 1 0
-0.226605 0.183384 0.0126504 0.0076126 1 0
-0.22612 0.155581 0.0104955 0.00612659 1 0
-0.225868 0.00918519 0.182376 0.00962794 1 0
-0.217444 0.0456945 0.187116 0.00535896 1 0
-0.216067 0.126527 0.0469773 0.00773177 1 0
-0.225386 0.109266 0.0975421 0.00970786 1 0
-0.243769 0.106338 0.0993678 0.00899614 1 0
-0.227952 0.126064 0.0859668 0.0108525 1 0
-0.316443 0.042169 0.113368 0.00724812 1 0
-0.326654 0.0517949 0.108777 0.00751662 1 0
-0.301954 0.0583803 0.0999651 0.00524896 1 0
-0.29274 0.0347683 0.132402 0.0060409 1 0
-0.343566 0.0597269 0.018211 0.005781 1 0
-0.352622 0.0502169 0.0402065 0.00618205 1 0
-0.369643 0.0714826 0.0475044 0.00510766 1 0
-0.394229 0.0737736 0.0944807 0.0059695 1 0
-0.394376 0.0620919 0.0670473 0.00591046 1 0
-0.394948 0.0939468 0.076593 0.00516962 1 0
-0.367544 0.0646222 0.0903772 0.00715182 1 0
-0.00818188 0.0126094 0.0228858 0.00838371 1 0
-0.0147844 0.0120618 0.0580327 0.00618432 1 0
-0.31466 0.0730897 0.166658 0.00859344 1 0
-0.319997 0.0525574 0.119828 0.00540728 1 0
-0.300218 0.0662144 0.131142 0.0059512 1 0
-0.282304 0.0498985 0.104559 0.00836055 1 0
-0.251758 0.18354 0.132704 0.00661005 1 0
-0.256939 0.160326 0.111173 0.00568273 1 0
-0.247454 0.15754 0.141038 0.00505592 1 0
-0.236481 0.165237 0.140116 0.00649243 1 0
-0.249384 0.00719792 0.180125 0.00758229 1 0
-0.285711 0.0124466 0.191211 0.0059783 1 0
-0.21456 0.186543 0.153079 0.00793122 1 0
-0.226593 0.180792 0.150642 0.00562627 1 0
-0.083875 0.0293033 0.189486 0.0110144 1 0
-0.0897915 0.0688272 0.191879 0.00823789 1 0
-0.106315 0.053566 0.188127 0.0119741 1 0
-0.111229 0.0439213 0.176073 0.00592557 1 0
-0.0550361 0.190197 0.174822 0.00669825 1 0
-0.0652126 0.164537 0.14202 0.00824646 1 0
-0.267189 0.18792 0.191085 0.00915243 1 0
-0.301131 0.171959 0.186846 0.00580245 1 0
-0.275044 0.14871 0.191894 0.00855422 1 0
-0.0975724 0.182156 0.191598 0.00897754 1 0
-0.117908 0.145176 0.184706 0.0136715 1 0
-0.10357 0.157952 0.149551 0.01374 1 0
-0.202562 0.121477 0.182416 0.0104515 1 0
-0.186167 0.0940157 0.190579 0.00955469 1 0
-0.185097 0.109625 0.185197 0.00700597 1 0
-0.193167 0.106857 0.167044 0.00584006 1 0
-0.325806 0.0498837 0.176862 0.00674515 1 0
-0.327219 0.0434707 0.135695 0.009877 1 0
-0.306853 0.00505278 0.129738 0.00514724 1 0
-0.284301 0.00970246 0.141233 0.00973076 1 0
-0.279911 0.024517 0.14259 0.00577992 1 0
-0.0139161 0.0761074 0.0511881 0.00684258 1 0
-0.0193503 0.0978804 0.0773104 0.00537681 1 0
-0.0312895 0.104381 0.0594031 0.008106 1 0
-0.338556 0.0576895 0.071032 0.00952752 1 0
-0.345385 0.0400912 0.0418604 0.00637311 1 0
-0.259771 0.012368 0.0639415 0.00821059 1 0
-0.234281 0.00979121 0.078925 0.00571495 1 0
-0.261934 0.0151467 0.0961373 0.00781128 1 0
-0.259949 0.0384556 0.0902831 0.00712307 1 0
-0.391538 0.0733979 0.181127 0.00823926 1 0
-0.386642 0.103587 0.194456 0.0057173 1 0
-0.353589 0.0933042 0.189377 0.00930854 1 0
-0.368799 0.0965009 0.17087 0.00800324 1 0
-0.0172555 0.065784 0.127555 0.00757448 1 0
-0.0482225 0.0691234 0.119297 0.00644119 1 0
-0.0294276 0.0847632 0.137985 0.00519188 1 0
-0.0442468 0.0580953 0.140519 0.00765787 1 0
-0.0114241 0.186249 0.0561499 0.0059827 1 0
-0.262791 0.180463 0.0104332 0.00712933 1 0
-0.294967 0.180725 0.00756748 0.00765309 1 0
-0.285215 0.168706 0.0109914 0.00819881 1 0
-0.381007 0.113507 0.121441 0.00943741 1 0
-0.356667 0.0880347 0.110332 0.00593489 1 0
-0.351332 0.127097 0.103414 0.00650858 1 0
-0.361994 0.107448 0.135957 0.00580829 1 0
-0.155172 0.0084073 0.0683292 0.00890522 1 0
-0.188438 0.012146 0.0976326 0.00587874 1 0
-0.188594 0.00995718 0.0690544 0.00765734 1 0
-0.164749 0.0103023 0.0215641 0.0106028 1 0
-0.148297 0.0125693 0.0549953 0.00651599 1 0
-0.181856 0.00865314 0.0566887 0.00648529 1 0
-0.18013 0.0188051 0.0511475 0.00512225 1 0
-0.0135713 0.0284825 0.0616517 0.00617028 1 0
-0.0168143 0.0550432 0.0534702 0.00544081 1 0
-0.0409675 0.0512215 0.0813284 0.00719788 1 0
-0.0315788 0.0446527 0.0458322 0.00519363 1 0
-0.385172 0.0707297 0.121669 0.00688846 1 0
-0.374496 0.103002 0.129779 0.00547061 1 0
-0.36727 0.0697245 0.118015 0.00634524 1 0
-0.00772959 0.129551 0.178176 0.00705005 1 0
-0.00816046 0.138058 0.150509 0.00565004 1 0
-0.0289621 0.137907 0.164141 0.00587197 1 0
-0.0308662 0.118011 0.16402 0.00573116 1 0
-0.369926 0.0178553 0.192356 0.00551679 1 0
-0.340425 0.0223486 0.192848 0.00726053 1 0
-0.11975 0.194485 0.158475 0.00575396 1 0
-0.123894 0.160886 0.143244 0.00774069 1 0
-0.38433 0.118675 0.0362219 0.00799993 1 0
-0.383284 0.102965 0.0460323 0.00553318 1 0
-0.375325 0.156401 0.0123866 0.00920127 1 0
-0.357718 0.185092 0.00968631 0.00792417 1 0
-0.347141 0.186821 0.121368 0.0135055 1 0
-0.326057 0.18231 0.153424 0.00539424 1 0
-0.350309 0.194901 0.11039 0.0056395 1 0
-0.346212 0.166812 0.115758 0.00776566 1 0
-0.386697 0.192126 0.181588 0.00799521 1 0
-0.391156 0.161996 0.18664 0.00904983 1 0
-0.390692 0.174385 0.154308 0.00550439 1 0
-0.0981993 0.0080985 0.00848544 0.00689311 1 0
-0.130053 0.00832591 0.00885153 0.00577159 1 0
-0.394383 0.0239477 0.190847 0.00572692 1 0
-0.134318 0.12667 0.172249 0.0140221 1 0
-0.120571 0.140802 0.136533 0.0136934 1 0
-0.153977 0.137668 0.159255 0.0119829 1 0
-0.238908 0.0637111 0.182828 0.00588483 1 0
-0.217927 0.0660372 0.181256 0.00886203 1 0
-0.213215 0.0882626 0.14329 0.00970245 1 0
-0.23219 0.049967 0.161982 0.00523379 1 0
-0.150521 0.116093 0.0410209 0.0080791 1 0
-0.171537 0.113958 0.0821499 0.0127537 1 0
-0.14791 0.109908 0.0683858 0.00711928 1 0
-0.119181 0.11991 0.0577099 0.0123017 1 0
-0.280074 0.0657231 0.0256561 0.00865399 1 0
-0.315154 0.0634001 0.0129531 0.00810922 1 0
-0.284546 0.0676017 0.0591255 0.00532716 1 0
-0.287665 0.0444101 0.0328449 0.00617395 1 0
-0.103511 0.0542246 0.0293572 0.00602015 1 0
-0.0695044 0.04998 0.0409961 0.00763791 1 0
-0.0777995 0.108209 0.0272184 0.0085827 1 0
-0.105089 0.0831391 0.0281576 0.00846905 1 0
-0.085815 0.0790746 0.0487101 0.00653949 1 0
-0.0968583 0.116976 0.0358279 0.00730169 1 0
-0.23678 0.180027 0.189891 0.00785738 1 0
-0.227769 0.143544 0.185132 0.00749987 1 0
-0.374033 0.01768 0.00744475 0.0059995 1 0
-0.339686 0.00677261 0.00975196 0.00758317 1 0
-0.345282 0.0433209 0.00911013 0.00944693 1 0
-0.172435 0.170777 0.00790899 0.0071469 1 0
-0.164953 0.130355 0.0128714 0.00969678 1 0
-0.158948 0.0614367 0.187529 0.00543337 1 0
-0.189978 0.0716632 0.177366 0.00746771 1 0
-0.178238 0.0797084 0.15281 0.00515117 1 0
-0.165762 0.0528525 0.170612 0.00763925 1 0
-0.0212608 0.0094604 0.0249075 0.00532478 1 0
-0.0403634 0.0072238 0.0517658 0.00747519 1 0
-0.272598 0.106078 0.104539 0.0105631 1 0
-0.287075 0.128572 0.101641 0.0131448 1 0
-0.267112 0.132629 0.0860788 0.01249 1 0
-0.268691 0.137384 0.115787 0.0116689 1 0
-0.27002 0.0257179 0.0636094 0.00820884 1 0
-0.273264 0.0592573 0.0810021 0.00733734 1 0
-0.28318 0.0354773 0.0531312 0.00527753 1 0
-0.389817 0.174931 0.080054 0.0106338 1 0
-0.384445 0.132558 0.0788915 0.00836827 1 0
-0.378701 0.139814 0.0972384 0.00602715 1 0
-0.368813 0.141861 0.0898128 0.00650638 1 0
-0.375492 0.110279 0.0315041 0.00507147 1 0
-0.357443 0.0867631 0.00909228 0.00870971 1 0
-0.375897 0.17125 0.088069 0.00602091 1 0
-0.393984 0.161636 0.116134 0.00619005 1 0
-0.373611 0.161616 0.0966576 0.00525879 1 0
-0.238039 0.00638372 0.171919 0.00666163 1 0
-0.216858 0.00703131 0.152268 0.00513398 1 0
-0.248589 0.00675868 0.148564 0.00687499 1 0
-0.250447 0.0211514 0.146636 0.00776452 1 0
-0.0113154 0.182689 0.00817339 0.00538843 1 0
-0.0238939 0.157768 0.00645951 0.00671657 1 0
-0.0526952 0.185282 0.00720097 0.00766273 1 0
-0.352161 0.0664096 0.0153645 0.00547242 1 0
-0.366475 0.0528956 0.0311387 0.00678152 1 0
-0.365266 0.0710618 0.0239861 0.00520902 1 0
-0.00559995 0.0871335 0.18492 0.00598431 1 0
-0.0112576 0.123259 0.187933 0.00508419 1 0
-0.00679544 0.114603 0.150888 0.00721419 1 0
-0.331843 0.0232473 0.0106033 0.00564219 1 0
-0.332571 0.0501213 0.0120277 0.00731454 1 0
-0.163805 0.12126 0.0301393 0.0098536 1 0
-0.183228 0.124309 0.0663082 0.00949033 1 0
-0.16112 0.149977 0.0571642 0.00646968 1 0
-0.0363436 0.00966209 0.145313 0.0101949 1 0
-0.0688378 0.00717589 0.182349 0.00732408 1 0
-0.0901335 0.00996526 0.15139 0.00727241 1 0
-0.0971279 0.0886962 0.172203 0.0076308 1 0
-0.123389 0.0696746 0.17629 0.0142557 1 0
-0.124882 0.0519842 0.162996 0.00792356 1 0
-0.0127854 0.18895 0.187874 0.0060405 1 0
-0.0175302 0.185317 0.159172 0.0049817 1 0
-0.0525532 0.194899 0.185444 0.00556042 1 0
-0.293887 0.136954 0.174997 0.0101556 1 0
-0.292423 0.15219 0.135484 0.0100152 1 0
-0.282663 0.14629 0.152378 0.0103683 1 0
-0.38584 0.172299 0.134702 0.0055863 1 0
-0.382557 0.152871 0.130059 0.00586379 1 0
-0.357948 0.153628 0.110573 0.00712653 1 0
-0.370099 0.157471 0.142381 0.00630911 1 0
-0.231197 0.192268 0.0787137 0.0079133 1 0
-0.255548 0.165874 0.0866424 0.00790485 1 0
-0.104601 0.0696791 0.0710747 0.0055276 1 0
-0.121347 0.0793999 0.0725771 0.0138937 1 0
-0.107036 0.102437 0.0568728 0.00899351 1 0
-0.283468 0.0231189 0.0642061 0.005501 1 0
-0.302915 0.0162019 0.0810346 0.00755809 1 0
-0.0142963 0.174362 0.133416 0.00796007 1 0
-0.0146243 0.145628 0.132304 0.00815538 1 0
-0.0505912 0.153131 0.131263 0.00849822 1 0
-0.0272526 0.160361 0.151105 0.00523692 1 0
-0.13311 0.0181588 0.0707926 0.00755563 1 0
-0.127461 0.0404578 0.0564505 0.00617569 1 0
-0.151748 0.0383447 0.0530821 0.00513729 1 0
-0.00679267 0.169096 0.0536077 0.00703579 1 0
-0.00651555 0.128824 0.0595809 0.00620981 1 0
-0.199676 0.173535 0.126518 0.0114282 1 0
-0.355852 0.0615542 0.189935 0.00529508 1 0
-0.363794 0.0772269 0.169744 0.00559938 1 0
-0.0653017 0.125566 0.174107 0.00626643 1 0
-0.0706548 0.124027 0.145934 0.00508993 1 0
-0.0437616 0.136513 0.163371 0.00505446 1 0
-0.0403833 0.118787 0.153449 0.00513884 1 0
-0.0668814 0.177731 0.0527361 0.00573733 1 0
-0.0839827 0.158633 0.0492808 0.00631288 1 0
-0.244283 0.130233 0.0206647 0.0134639 1 0
-0.248042 0.142193 0.0542112 0.00985963 1 0
-0.127496 0.0235248 0.0806035 0.00495716 1 0
-0.112549 0.0236483 0.117163 0.00574903 1 0
-0.102698 0.0328561 0.104551 0.00541704 1 0
-0.121179 0.0419633 0.103427 0.00550955 1 0
-0.0949815 0.00750083 0.183421 0.00782525 1 0
-0.134652 0.00614998 0.184862 0.00637881 1 0
-0.116839 0.0088601 0.154427 0.00920183 1 0
-0.31655 0.00700799 0.0248976 0.00751269 1 0
-0.290853 0.00645499 0.0473027 0.00643783 1 0
-0.198169 0.0451707 0.154014 0.00652276 1 0
-0.202753 0.0641795 0.129688 0.00629429 1 0
-0.231726 0.0501635 0.148392 0.00836477 1 0
-0.0806751 0.186693 0.0947945 0.00588621 1 0
-0.0980923 0.193862 0.114456 0.00659301 1 0
-0.0927057 0.166659 0.0945026 0.00576554 1 0
-0.131037 0.0979195 0.0154893 0.00529982 1 0
-0.119759 0.0958302 0.0614018 0.00604038 1 0
-0.117254 0.105551 0.0450691 0.00692544 1 0
-0.180049 0.0968475 0.0963658 0.0110648 1 0
-0.147055 0.0681246 0.0888777 0.00600637 1 0
-0.165325 0.0730319 0.0647813 0.0116055 1 0
-0.356389 0.0605846 0.0771528 0.00670138 1 0
-0.0090253 0.146891 0.178321 0.00943242 1 0
-0.00766876 0.177799 0.147082 0.00803472 1 0
-0.284654 0.182165 0.0777849 0.00603437 1 0
-0.317912 0.188593 0.0821801 0.010196 1 0
-0.31526 0.170622 0.0967369 0.00954165 1 0
-0.157011 0.0204114 0.191012 0.00814343 1 0
-0.0246857 0.126178 0.0110075 0.00674863 1 0
-0.0583965 0.11981 0.0136165 0.00686965 1 0
-0.0423734 0.131397 0.0355498 0.00524297 1 0
-0.359164 0.0155869 0.1297 0.0124649 1 0
-0.346991 0.00989893 0.149958 0.00993081 1 0
-0.335926 0.0173156 0.11971 0.0128885 1 0
-0.351904 0.0330754 0.118387 0.00959278 1 0
-0.394389 0.0194257 0.0160663 0.00555908 1 0
-0.379919 0.129378 0.133306 0.00674795 1 0
-0.343983 0.13786 0.10791 0.00727759 1 0
-0.353387 0.128435 0.141138 0.00927701 1 0
-0.360604 0.139797 0.147167 0.0054718 1 0
-0.210437 0.166175 0.0492754 0.00567761 1 0
-0.333137 0.0762092 0.17059 0.0105529 1 0
-0.304235 0.104976 0.172225 0.0128493 1 0
-0.335688 0.0988857 0.167769 0.0124404 1 0
-0.202789 0.187561 0.113687 0.00783417 1 0
-0.216769 0.19414 0.0854304 0.0061718 1 0
-0.226591 0.167311 0.0969075 0.00680436 1 0
-0.0790982 0.1003 0.091185 0.00741713 1 0
-0.0916304 0.108721 0.10674 0.00642763 1 0
-0.124019 0.099056 0.0987964 0.0119762 1 0
-0.099967 0.113614 0.0782024 0.00766243 1 0
-0.322068 0.132654 0.161504 0.0110719 1 0
-0.328964 0.137853 0.116072 0.00981602 1 0
-0.347629 0.119456 0.153756 0.00724557 1 0
-0.343041 0.14108 0.150765 0.00968606 1 0
-0.308067 0.0305676 0.014255 0.00749486 1 0
-0.288222 0.0486479 0.00726165 0.00755659 1 0
-0.322953 0.0477624 0.00519321 0.00532254 1 0
-0.163145 0.0244185 0.00512858 0.00531505 1 0
-0.143503 0.0521922 0.0141325 0.00602348 1 0
-0.176407 0.0560466 0.00779385 0.00804853 1 0
-0.171945 0.0484305 0.027348 0.00827547 1 0
-0.170499 0.19428 0.0274052 0.00537 1 0
-0.156708 0.193111 0.0620835 0.0071917 1 0
-0.185673 0.194117 0.0511677 0.00612124 1 0
-0.0331075 0.0116814 0.124277 0.0112441 1 0
-0.0663881 0.017704 0.134001 0.00695376 1 0
-0.0509858 0.0401183 0.121398 0.00752897 1 0
-0.0536159 0.0388033 0.139584 0.00586791 1 0
-0.377357 0.0513898 0.0351915 0.00492737 1 0
-0.379201 0.0777361 0.037615 0.00548177 1 0
-0.205056 0.128243 0.0246036 0.0112558 1 0
-0.194766 0.119397 0.0757122 0.00618427 1 0
-0.181175 0.145115 0.0499636 0.00675236 1 0
-0.148696 0.0473235 0.193751 0.00638771 1 0
-0.1805 0.0491506 0.19158 0.00866147 1 0
-0.0218087 0.0143186 0.108466 0.00836723 1 0
-0.0478675 0.0219623 0.0896958 0.00823181 1 0
-0.0512223 0.0421287 0.0966569 0.0133643 1 0
-0.0207695 0.021881 0.119874 0.00535858 1 0
-0.0215509 0.0467649 0.120322 0.00641871 1 0
-0.0360928 0.0484112 0.104878 0.00496479 1 0
-0.0326386 0.0525415 0.145065 0.00598976 1 0
-0.381427 0.190418 0.194281 0.00586092 1 0
-0.373734 0.16649 0.18837 0.00498055 1 0
-0.205452 0.154565 0.177984 0.00579418 1 0
-0.194448 0.131231 0.149231 0.00721404 1 0
-0.0229852 0.137984 0.00566485 0.00616599 1 0
-0.0607551 0.169837 0.00924403 0.00965325 1 0
-0.0609532 0.142705 0.00515321 0.00524266 1 0
-0.0845293 0.0785676 0.161161 0.00895357 1 0
-0.0760292 0.0631132 0.116189 0.00934452 1 0
-0.109096 0.0662653 0.125401 0.0088934 1 0
-0.0992344 0.0589427 0.143979 0.0105978 1 0
-0.273636 0.0785978 0.180015 0.0113957 1 0
-0.31771 0.0863584 0.178826 0.00966627 1 0
-0.29521 0.110289 0.191138 0.00918946 1 0
-0.381769 0.130907 0.179692 0.00549505 1 0
-0.384951 0.132232 0.147066 0.00501827 1 0
-0.368263 0.120297 0.157834 0.00564419 1 0
-0.372344 0.141301 0.154623 0.00518439 1 0
-0.015366 0.18067 0.0718755 0.00991698 1 0
-0.0571934 0.17713 0.0784465 0.00840477 1 0
-0.0608721 0.163181 0.103517 0.00874349 1 0
-0.0402299 0.146705 0.0580912 0.00834893 1 0
-0.254209 0.193453 0.0136025 0.00692331 1 0
-0.293146 0.193828 0.00583723 0.00565197 1 0
-0.273439 0.190697 0.0328814 0.00943147 1 0
-0.148158 0.0224957 0.0751162 0.0086904 1 0
-0.169855 0.0328631 0.104474 0.00539417 1 0
-0.161211 0.0397703 0.0704683 0.00845554 1 0
-0.14024 0.0469873 0.122983 0.010578 1 0
-0.336735 0.0202872 0.0803728 0.00662079 1 0
-0.331173 0.0418264 0.0836408 0.00698085 1 0
-0.248925 0.170773 0.189235 0.0074251 1 0
-0.262339 0.153703 0.191569 0.00510053 1 0
-0.228363 0.152946 0.194167 0.00555304 1 0
-0.253545 0.153824 0.172184 0.00501869 1 0
-0.085673 0.0219495 0.128863 0.00810289 1 0
-0.0787165 0.0476022 0.114194 0.00652346 1 0
-0.0980547 0.0314382 0.144821 0.00871123 1 0
-0.0709612 0.0486933 0.147475 0.00741279 1 0
-0.146003 0.180965 0.107392 0.00615155 1 0
-0.151935 0.175908 0.116585 0.00590186 1 0
-0.131311 0.156841 0.111757 0.006995 1 0
-0.156763 0.164613 0.0522469 0.00700493 1 0
-0.166162 0.131633 0.0940256 0.00920817 1 0
-0.169708 0.159475 0.0531444 0.00695105 1 0
-0.391928 0.014103 0.0938668 0.00815456 1 0
-0.391359 0.0211293 0.117583 0.00530946 1 0
-0.375048 0.0429505 0.106888 0.00530811 1 0
-0.0461391 0.0699646 0.193821 0.00627914 1 0
-0.0622147 0.0345418 0.191454 0.00898645 1 0
-0.0593306 0.0684257 0.192418 0.00508167 1 0
-0.0397629 0.0590945 0.170099 0.00595525 1 0
-0.0661161 0.112209 0.0346864 0.00584907 1 0
-0.0797103 0.0967227 0.0580186 0.00598094 1 0
-0.0568741 0.114675 0.041708 0.00601682 1 0
-0.0822935 0.121589 0.0590197 0.00649001 1 0
-0.0084868 0.184703 0.0965632 0.0086322 1 0
-0.00581197 0.179899 0.124047 0.00594827 1 0
-0.0193344 0.15123 0.117751 0.00813427 1 0
-0.0373418 0.165335 0.111805 0.00496009 1 0
-0.0069464 0.0203693 0.00957193 0.00729029 1 0
-0.0114912 0.0644476 0.0186047 0.00692857 1 0
-0.23016 0.15093 0.070759 0.00659564 1 0
-0.239476 0.169123 0.048159 0.00817471 1 0
-0.216925 0.162977 0.0570597 0.00494897 1 0
-0.256492 0.108796 0.106756 0.00592031 1 0
-0.239834 0.122034 0.101258 0.0072955 1 0
-0.250444 0.134166 0.118395 0.00695265 1 0
-0.0669046 0.0202201 0.0606514 0.00578 1 0
-0.0667976 0.109972 0.163301 0.00737749 1 0
-0.0647391 0.0862293 0.128114 0.00507807 1 0
-0.0730489 0.126344 0.135373 0.0059837 1 0
-0.0487948 0.104113 0.14207 0.00657197 1 0
-0.028089 0.193995 0.0135611 0.00631276 1 0
-0.0674378 0.193956 0.0187955 0.00627478 1 0
-0.0560479 0.192898 0.040999 0.00736616 1 0
-0.262174 0.14737 0.00768132 0.00782649 1 0
-0.110871 0.0181432 0.0802059 0.00539194 1 0
-0.0877005 0.00667963 0.0836161 0.00686255 1 0
-0.104632 0.00847264 0.10825 0.00872388 1 0
-0.0824788 0.0353326 0.0842433 0.00699519 1 0
-0.14732 0.10401 0.105935 0.0128921 1 0
-0.131004 0.0929942 0.120441 0.0115619 1 0
-0.124891 0.124973 0.0770648 0.00850322 1 0
-0.367253 0.00909377 0.0543428 0.00926423 1 0
-0.341448 0.00752611 0.0337154 0.00700713 1 0
-0.353185 0.00671947 0.0658624 0.00679685 1 0
-0.360068 0.0192233 0.0458931 0.00610856 1 0
-0.00526509 0.0409069 0.136276 0.00535184 1 0
-0.00810634 0.0521513 0.169336 0.00845315 1 0
-0.00898223 0.0516547 0.135279 0.00540738 1 0
-0.0272917 0.0344396 0.154164 0.00617013 1 0
-0.28683 0.192156 0.0542309 0.00529478 1 0
-0.306074 0.167622 0.0566469 0.00537123 1 0
-0.19755 0.0334298 0.0932068 0.00801512 1 0
-0.189077 0.0691788 0.103897 0.0121385 1 0
-0.191992 0.113584 0.0278815 0.0086521 1 0
-0.162067 0.106234 0.0287016 0.00534139 1 0
-0.179901 0.11 0.0638109 0.00541145 1 0
-0.17278 0.0881559 0.0541978 0.00830241 1 0
-0.288755 0.0755487 0.0109192 0.0110888 1 0
-0.308569 0.0795913 0.0189497 0.01037 1 0
-0.296556 0.0983438 0.0125803 0.0125357 1 0
-0.383772 0.0259801 0.193385 0.00537695 1 0
-0.386942 0.0526887 0.193606 0.00647137 1 0
-0.365199 0.047121 0.19492 0.0052279 1 0
-0.0519969 0.181546 0.139662 0.00596041 1 0
-0.073405 0.189449 0.169333 0.0107301 1 0
-0.0877081 0.173817 0.141113 0.00870525 1 0
-0.341047 0.169722 0.193253 0.00654535 1 0
-0.330376 0.150117 0.192594 0.00496002 1 0
-0.114133 0.161206 0.130073 0.00865552 1 0
-0.303032 0.188236 0.140302 0.0117671 1 0
-0.315833 0.195507 0.114557 0.00504126 1 0
-0.284501 0.189967 0.127885 0.0104032 1 0
-0.312477 0.161431 0.113936 0.0101568 1 0
-0.327634 0.0793802 0.0481969 0.0100093 1 0
-0.324448 0.0752109 0.0906867 0.0083484 1 0
-0.31356 0.104172 0.0805245 0.00749451 1 0
-0.327746 0.101416 0.0747659 0.00806205 1 0
-0.121771 0.0134248 0.122837 0.00852373 1 0
-0.159631 0.0150029 0.128638 0.00980085 1 0
-0.392511 0.0522317 0.169404 0.00783913 1 0
-0.395162 0.0501463 0.134408 0.00498903 1 0
-0.272107 0.170806 0.116229 0.013434 1 0
-0.281281 0.155885 0.101404 0.0095132 1 0
-0.266574 0.153585 0.107595 0.00660862 1 0
-0.264709 0.153674 0.119585 0.00552586 1 0
-0.38681 0.0562555 0.00638283 0.00528748 1 0
-0.365455 0.0437473 0.0107899 0.00529517 1 0
-0.210022 0.123308 0.12934 0.00556125 1 0
-0.250494 0.193287 0.180336 0.00706519 1 0
-0.258499 0.192009 0.147804 0.00855534 1 0
-0.281498 0.0581577 0.178437 0.0105608 1 0
-0.303242 0.0692587 0.176297 0.00683264 1 0
-0.279185 0.0677835 0.134067 0.00571929 1 0
-0.283695 0.0478234 0.161373 0.00950883 1 0
-0.201343 0.0885042 0.00865546 0.00499766 1 0
-0.217247 0.0657974 0.0338116 0.00681007 1 0
-0.184647 0.0707221 0.0238142 0.00558769 1 0
-0.109721 0.184804 0.00937792 0.00961705 1 0
-0.329991 0.0107204 0.0287114 0.0058961 1 0
-0.324986 0.00709674 0.065553 0.00544047 1 0
-0.320655 0.0241156 0.0465631 0.00626207 1 0
-0.246404 0.0691349 0.00781767 0.00828671 1 0
-0.222941 0.103933 0.0111598 0.011335 1 0
-0.216109 0.0696221 0.00799544 0.00826141 1 0
-0.157528 0.0899447 0.191168 0.00507421 1 0
-0.155537 0.100229 0.191591 0.00540953 1 0
-0.177525 0.0943671 0.150699 0.00861897 1 0
-0.0348592 0.00813347 0.015002 0.00828149 1 0
-0.0512365 0.0192255 0.0153088 0.00517423 1 0
-0.342655 0.0798171 0.0361204 0.00926937 1 0
-0.3391 0.0812289 0.0784261 0.0116296 1 0
-0.338672 0.111785 0.0750774 0.00700406 1 0
-0.330466 0.129438 0.187166 0.00655636 1 0
-0.361513 0.120336 0.171651 0.00498052 1 0
-0.205291 0.0302313 0.114125 0.0145174 1 0
-0.20977 0.0267413 0.0944394 0.00597039 1 0
-0.205971 0.0681862 0.0953955 0.00680038 1 0
-0.233346 0.0592739 0.0989024 0.0127908 1 0
-0.0729556 0.0741033 0.169157 0.00580497 1 0
-0.0687666 0.0753065 0.130455 0.00601045 1 0
-0.0846709 0.0567052 0.156714 0.00887761 1 0
-0.0667951 0.0521266 0.1623 0.00836534 1 0
-0.29608 0.0149178 0.0917873 0.00524784 1 0
-0.283962 0.0466343 0.0910075 0.00567696 1 0
-0.0622957 0.0349496 0.0106501 0.0110784 1 0
-0.0495625 0.0756888 0.00622606 0.00642553 1 0
-0.386469 0.0770333 0.0583167 0.00552774 1 0
-0.387526 0.0946109 0.0661314 0.00621954 1 0
-0.362512 0.0757967 0.0849561 0.00624904 1 0
-0.241755 0.185676 0.178927 0.00544206 1 0
-0.234978 0.173823 0.150145 0.00528781 1 0
-0.0631754 0.100075 0.0342654 0.00630015 1 0
-0.0490861 0.10025 0.0597905 0.00612054 1 0
-0.0448321 0.0676857 0.0483798 0.00556852 1 0
-0.357979 0.0272896 0.0764568 0.00501178 1 0
-0.278958 0.131248 0.150856 0.00519829 1 0
-0.280979 0.110705 0.130202 0.00534803 1 0
-0.302751 0.12933 0.116301 0.00833201 1 0
-0.27393 0.140098 0.141054 0.00521546 1 0
-0.0373405 0.191358 0.126653 0.00727957 1 0
-0.0677841 0.191625 0.0901428 0.00869273 1 0
-0.0844209 0.191969 0.124443 0.00855905 1 0
-0.0775465 0.162201 0.109099 0.0082593 1 0
-0.0207555 0.0053754 0.188771 0.00547368 1 0
-0.0455209 0.00928189 0.181845 0.00561126 1 0
-0.0245158 0.167059 0.0749526 0.00601204 1 0
-0.0568859 0.143012 0.0981434 0.00673649 1 0
-0.0311157 0.142002 0.0668341 0.00512793 1 0
-0.00911201 0.111889 0.0105822 0.00952419 1 0
-0.0289019 0.0987202 0.0405127 0.00667252 1 0
-0.0153248 0.0709797 0.185047 0.00708259 1 0
-0.0468106 0.0975161 0.194603 0.00576613 1 0
-0.0330428 0.088288 0.168913 0.00655303 1 0
-0.0319882 0.0658179 0.164622 0.00569154 1 0
-0.327932 0.0661663 0.0347492 0.00884639 1 0
-0.325235 0.0611186 0.0757851 0.00502571 1 0
-0.301791 0.0719827 0.0647257 0.00502249 1 0
-0.140444 0.0208043 0.00857616 0.00554489 1 0
-0.13206 0.0531746 0.0191259 0.00650001 1 0
-0.0227459 0.0405526 0.0137735 0.00512675 1 0
-0.0139517 0.0311413 0.0791735 0.00739728 1 0
-0.00812655 0.0462816 0.0920372 0.00831147 1 0
-0.0100434 0.0603263 0.0679059 0.00747143 1 0
-0.0330852 0.0595645 0.0875891 0.00587617 1 0
-0.01453 0.0759006 0.120222 0.00521403 1 0
-0.0151535 0.103402 0.114357 0.0067483 1 0
-0.0287214 0.0951057 0.139099 0.00523436 1 0
-0.0133948 0.0273098 0.111089 0.00733124 1 0
-0.00839056 0.0392552 0.105564 0.00674924 1 0
-0.0335484 0.0517292 0.0957753 0.00505228 1 0
-0.321536 0.0865347 0.161924 0.00723207 1 0
-0.336144 0.0797876 0.125265 0.00618701 1 0
-0.306447 0.0747709 0.124501 0.0063047 1 0
-0.338491 0.0802498 0.140048 0.00809261 1 0
-0.0724714 0.172504 0.0723751 0.00867382 1 0
-0.077077 0.155879 0.0945479 0.00612652 1 0
-0.0603146 0.142855 0.064314 0.00788684 1 0
-0.0873398 0.153674 0.0624092 0.00743584 1 0
-0.0837064 0.168728 0.18948 0.00889523 1 0
-0.0796081 0.136161 0.182522 0.013425 1 0
-0.0984236 0.143756 0.174245 0.00848882 1 0
-0.090862 0.139998 0.157997 0.00982194 1 0
-0.120833 0.0169722 0.0755527 0.00566548 1 0
-0.0890771 0.0475762 0.0844198 0.00691428 1 0
-0.111386 0.0351207 0.0575203 0.0053293 1 0
-0.220659 0.0305815 0.129607 0.00729992 1 0
-0.20806 0.0804905 0.123909 0.0118058 1 0
-0.238003 0.061297 0.120152 0.00905688 1 0
-0.233536 0.0524825 0.134068 0.00625855 1 0
-0.246734 0.133539 0.040288 0.00658618 1 0
-0.261156 0.116553 0.0379597 0.0120144 1 0
-0.253954 0.128533 0.0491202 0.00587193 1 0
-0.0659653 0.0123689 0.0890542 0.0122615 1 0
-0.0753169 0.0123982 0.113778 0.0125732 1 0
-0.0701547 0.0311356 0.0969636 0.00853032 1 0
-0.124168 0.167553 0.0768115 0.00984731 1 0
-0.154698 0.126665 0.106738 0.00861596 1 0
-0.114986 0.142254 0.0860121 0.0133329 1 0
-0.346007 0.153192 0.00795461 0.00800824 1 0
-0.318942 0.148861 0.0113152 0.0115475 1 0
-0.318348 0.0348712 0.0863439 0.00785672 1 0
-0.303844 0.0561051 0.0899067 0.0052354 1 0
-0.313022 0.0358319 0.074224 0.00541661 1 0
-0.152268 0.0076484 0.173852 0.00786869 1 0
-0.13011 0.0144056 0.154271 0.00585279 1 0
-0.165082 0.0119672 0.144377 0.00713006 1 0
-0.0871026 0.125344 0.0093217 0.0096307 1 0
-0.122601 0.0934845 0.0107429 0.00534686 1 0
-0.390935 0.0680353 0.16854 0.00545651 1 0
-0.391784 0.0660705 0.137733 0.0081494 1 0
-0.368876 0.0851037 0.157602 0.00681751 1 0
-0.3435 0.0532953 0.184997 0.0059137 1 0
-0.0678451 0.116635 0.0213229 0.00572971 1 0
-0.0831903 0.134643 0.0428236 0.0073013 1 0
-0.315142 0.019002 0.154585 0.00509271 1 0
-0.318834 0.0287574 0.124498 0.0082297 1 0
-0.331325 0.0384706 0.118156 0.00881685 1 0
-0.257485 0.0774816 0.0149607 0.00737033 1 0
-0.243986 0.105343 0.0208968 0.0114293 1 0
-0.250893 0.0810976 0.056506 0.00976706 1 0
-0.241362 0.071397 0.0497077 0.00543699 1 0
-0.0951764 0.190812 0.0352198 0.005069 1 0
-0.105909 0.1918 0.0552695 0.0055431 1 0
-0.0838705 0.19237 0.0559887 0.00778471 1 0
-0.0909871 0.168167 0.046449 0.00585127 1 0
-0.138129 0.0547823 0.0314965 0.00737256 1 0
-0.133008 0.0625234 0.0701167 0.00598886 1 0
-0.131467 0.0487513 0.0499509 0.0050972 1 0
-0.392729 0.17308 0.0543232 0.00762244 1 0
-0.390069 0.140352 0.0309828 0.00894587 1 0
-0.392483 0.144524 0.0675016 0.00668198 1 0
-0.365541 0.139541 0.0628607 0.00767386 1 0
-0.181917 0.072989 0.122854 0.00848093 1 0
-0.151607 0.0618207 0.010758 0.00684657 1 0
-0.170956 0.0743141 0.00515087 0.00535107 1 0
-0.151276 0.100927 0.0089466 0.00913301 1 0
-0.159422 0.0740842 0.0305408 0.00543141 1 0
-0.115667 0.180416 0.0794904 0.0058022 1 0
-0.0994465 0.155809 0.0923839 0.00718233 1 0
-0.0999845 0.154006 0.0694851 0.00705776 1 0
-0.273075 0.179113 0.0764238 0.0060175 1 0
-0.273414 0.182999 0.100381 0.00660443 1 0
-0.294461 0.167567 0.0871492 0.00611654 1 0
-0.267046 0.169424 0.0821706 0.00493232 1 0
-0.263157 0.0743531 0.166745 0.00603747 1 0
-0.236311 0.0883744 0.127816 0.00866709 1 0
-0.262038 0.0760561 0.129225 0.00937597 1 0
-0.260806 0.0583165 0.152129 0.00554879 1 0
-0.127913 0.0401208 0.0105813 0.0108419 1 0
-0.139949 0.188361 0.0447094 0.00963688 1 0
-0.156756 0.175254 0.0466356 0.00502514 1 0
-0.0182403 0.0775134 0.0207589 0.00585374 1 0
-0.049628 0.0861852 0.0125484 0.00534557 1 0
-0.0386586 0.104817 0.0341019 0.00649825 1 0
-0.0504136 0.0672162 0.0286269 0.00617965 1 0
-0.241949 0.0263184 0.0058993 0.00573091 1 0
-0.252068 0.0556234 0.00921361 0.00637274 1 0
-0.22369 0.0526726 0.0183509 0.0052916 1 0
-0.232494 0.0511763 0.0241064 0.00533218 1 0
-0.19112 0.181137 0.00602503 0.00537962 1 0
-0.202486 0.159753 0.0127104 0.00927223 1 0
-0.0752446 0.00953644 0.0199405 0.00785062 1 0
-0.0762035 0.00765303 0.0478329 0.00785765 1 0
-0.0933209 0.00532339 0.0221773 0.00561959 1 0
-0.103481 0.0147954 0.0398048 0.00544491 1 0
-0.0277912 0.120626 0.096511 0.00511143 1 0
-0.0426447 0.126149 0.114312 0.00516252 1 0
-0.196674 0.18675 0.102437 0.0049966 1 0
-0.211756 0.1794 0.0726919 0.00523377 1 0
-0.223498 0.175543 0.0884482 0.00502362 1 0
-0.200843 0.175993 0.0680288 0.00711302 1 0
-0.342708 0.0784478 0.109096 0.0064675 1 0
-0.301046 0.0851749 0.11395 0.00736852 1 0
-0.326322 0.112953 0.104599 0.00894385 1 0
-0.33831 0.112264 0.129564 0.00533993 1 0
-0.146632 0.119854 0.155857 0.00758345 1 0
-0.113839 0.124127 0.123163 0.00871534 1 0
-0.147431 0.104285 0.128928 0.0101026 1 0
-0.130699 0.107509 0.132492 0.00730589 1 0
-0.110278 0.121507 0.179754 0.0116856 1 0
-0.0956274 0.122005 0.158534 0.00879957 1 0
-0.119865 0.0920174 0.138423 0.00961322 1 0
-0.219451 0.0418365 0.0510078 0.00644042 1 0
-0.173338 0.00866538 0.177793 0.00550045 1 0
-0.211117 0.00543773 0.18246 0.00561183 1 0
-0.187216 0.00837054 0.155071 0.00872445 1 0
-0.1664 0.17484 0.0827415 0.00501124 1 0
-0.177999 0.143392 0.0931468 0.00585077 1 0
-0.109717 0.192946 0.0137512 0.00724742 1 0
-0.14143 0.184762 0.0195865 0.00684492 1 0
-0.122259 0.190175 0.0476535 0.0102463 1 0
-0.0667361 0.169401 0.0599992 0.00531496 1 0
-0.082868 0.146826 0.0508342 0.00564837 1 0
-0.0552552 0.154891 0.0433447 0.00561681 1 0
-0.310689 0.151778 0.181469 0.00665367 1 0
-0.330094 0.152012 0.136954 0.0113277 1 0
-0.345349 0.156333 0.145413 0.00664196 1 0
-0.251394 0.126454 0.166924 0.0114056 1 0
-0.267385 0.108622 0.136848 0.00553662 1 0
-0.263938 0.13864 0.160479 0.00723252 1 0
-0.360484 0.188651 0.0759512 0.00497759 1 0
-0.331221 0.188418 0.0363829 0.00560804 1 0
-0.331933 0.192602 0.0717644 0.00779763 1 0
-0.347752 0.165414 0.0682079 0.00796147 1 0
-0.136251 0.00928 0.0920064 0.00859638 1 0
-0.129956 0.0161276 0.112292 0.00509584 1 0
-0.152579 0.0159942 0.115424 0.00520984 1 0
-0.136703 0.036157 0.110096 0.00662378 1 0
-0.100961 0.00493377 0.154156 0.00544695 1 0
-0.13546 0.0669218 0.0237618 0.0068288 1 0
-0.142736 0.0815677 0.0644031 0.00910591 1 0
-0.155592 0.0620349 0.0396216 0.00727139 1 0
-0.23071 0.0941707 0.0424577 0.0106171 1 0
-0.231904 0.080267 0.0565854 0.00924055 1 0
-0.136849 0.055555 0.169806 0.00630133 1 0
-0.13647 0.0580592 0.135486 0.00654245 1 0
-0.150866 0.0539106 0.165846 0.00803573 1 0
-0.394575 0.07269 0.0171423 0.0055546 1 0
-0.39486 0.110574 0.0118853 0.00550496 1 0
-0.387951 0.0869387 0.0294716 0.00538716 1 0
-0.254035 0.0737726 0.183436 0.00907811 1 0
-0.227242 0.108008 0.16302 0.0103512 1 0
-0.22171 0.101723 0.147955 0.0068841 1 0
-0.246732 0.0983579 0.13288 0.00662683 1 0
-0.0335488 0.109202 0.0863888 0.00581296 1 0
-0.0513091 0.0948092 0.0875527 0.00611939 1 0
-0.05679 0.122306 0.0980262 0.00517686 1 0
-0.052778 0.114593 0.0733525 0.00678807 1 0
-0.377528 0.112721 0.191255 0.00636142 1 0
-0.323421 0.118747 0.192828 0.00747939 1 0
-0.0202821 0.127857 0.185543 0.00532221 1 0
-0.0456882 0.121297 0.189231 0.00619298 1 0
-0.0278125 0.163137 0.185644 0.00614243 1 0
-0.0407269 0.184969 0.19302 0.00713734 1 0
-0.202317 0.0380069 0.0635513 0.0061186 1 0
-0.196048 0.0690914 0.0860807 0.00683945 1 0
-0.214552 0.0556608 0.0504908 0.00558046 1 0
-0.187018 0.0565114 0.0598651 0.00514824 1 0
-0.192447 0.179866 0.191769 0.00552928 1 0
-0.382976 0.00933654 0.00800821 0.00624409 1 0
-0.379462 0.00880123 0.0393308 0.00900867 1 0
-0.228739 0.0357554 0.140074 0.00689897 1 0
-0.253924 0.0245816 0.129793 0.00977247 1 0
-0.254756 0.0552683 0.117164 0.0089968 1 0
-0.244956 0.0366762 0.141704 0.00942559 1 0
-0.284401 0.126071 0.0301732 0.0129644 1 0
-0.280462 0.111896 0.0848258 0.0114435 1 0
-0.294088 0.127276 0.0774395 0.0103921 1 0
-0.280271 0.135028 0.0733615 0.0059669 1 0
-0.00563921 0.0823402 0.11215 0.00596405 1 0
-0.00684844 0.11187 0.11031 0.0057838 1 0
-0.0379734 0.0850477 0.0989356 0.00668566 1 0
-0.148048 0.0673697 0.16165 0.00634128 1 0
-0.16632 0.0802059 0.13652 0.0100819 1 0
-0.153832 0.0715793 0.136283 0.00509827 1 0
-0.164782 0.0570918 0.149821 0.00786055 1 0
-0.0708317 0.0947185 0.0813214 0.00661075 1 0
-0.0669437 0.121838 0.0984773 0.00499761 1 0
-0.0644455 0.124797 0.0716368 0.00615064 1 0
-0.090339 0.120408 0.0696529 0.00689617 1 0
-0.262019 0.0920942 0.188904 0.00850721 1 0
-0.266705 0.121891 0.180648 0.00733623 1 0
-0.243492 0.119364 0.185346 0.00985739 1 0
-0.265228 0.0970171 0.153937 0.00631729 1 0
-0.386732 0.186006 0.0490056 0.0075897 1 0
-0.391645 0.153252 0.0174181 0.00874731 1 0
-0.0164142 0.169571 0.0469836 0.00510672 1 0
-0.0162801 0.146559 0.0269116 0.00578039 1 0
-0.0336765 0.137425 0.0465965 0.00640884 1 0
-0.0352034 0.153494 0.042736 0.00671905 1 0
-0.393189 0.145792 0.170589 0.00703241 1 0
-0.393971 0.175462 0.142844 0.00637997 1 0
-0.393145 0.142807 0.143542 0.006247 1 0
-0.378366 0.151838 0.156955 0.00527381 1 0
-0.381775 0.0767982 0.00497851 0.00506417 1 0
-0.384389 0.110274 0.00625307 0.00656743 1 0
-0.0501918 0.0651677 0.0751153 0.00698474 1 0
-0.0522839 0.0587165 0.0514569 0.00649157 1 0
-0.217106 0.0220904 0.0114196 0.00546845 1 0
-0.20051 0.0538623 0.0172405 0.0068967 1 0
-0.222733 0.0473342 0.0279354 0.00572104 1 0
-0.261327 0.0222179 0.186737 0.00551997 1 0
-0.300809 0.0175195 0.00825984 0.0083 1 0
-0.278985 0.0387736 0.00632486 0.00651096 1 0
-0.0868131 0.14207 0.00723754 0.00730909 1 0
-0.111635 0.139991 0.0197633 0.00503765 1 0
-0.103829 0.139937 0.0308627 0.00710114 1 0
-0.0486418 0.113671 0.00631207 0.00680382 1 0
-0.0276864 0.110959 0.0271024 0.00789287 1 0
-0.189698 0.0844834 0.00680689 0.00718779 1 0
-0.165699 0.11211 0.0107286 0.00868968 1 0
-0.213054 0.136856 0.0377959 0.00641269 1 0
-0.205379 0.128465 0.0764922 0.00779672 1 0
-0.210352 0.14347 0.0803363 0.00847115 1 0
-0.19583 0.147316 0.0427877 0.00687583 1 0
-0.203294 0.0652706 0.173102 0.00790694 1 0
-0.195976 0.0856479 0.140561 0.00794527 1 0
-0.198447 0.0571985 0.161029 0.00740396 1 0
-0.271409 0.00778163 0.00978963 0.0049704 1 0
-0.294126 0.00627609 0.01453 0.00645502 1 0
-0.28841 0.183894 0.158858 0.00510762 1 0
-0.269919 0.183373 0.131083 0.00614539 1 0
-0.29785 0.164485 0.122122 0.00688027 1 0
-0.377503 0.106226 0.0875702 0.00694416 1 0
-0.386703 0.127112 0.110159 0.00913205 1 0
-0.357162 0.124419 0.0912405 0.00725182 1 0
-0.0095061 0.116134 0.0277109 0.0070637 1 0
-0.00773396 0.0931842 0.051083 0.0050224 1 0
-0.00649546 0.115939 0.0538062 0.00667849 1 0
-0.0282208 0.110772 0.0450519 0.00622384 1 0
-0.394226 0.100204 0.186616 0.00590458 1 0
-0.390406 0.111207 0.183462 0.0060037 1 0
-0.371822 0.111796 0.16477 0.00589004 1 0
-0.320528 0.0880744 0.0322957 0.00945677 1 0
-0.298506 0.108633 0.0320131 0.00953935 1 0
-0.27853 0.09926 0.0699264 0.00818781 1 0
-0.31458 0.122673 0.0613605 0.0144611 1 0
-0.0293974 0.107606 0.126394 0.00543034 1 0
-0.0588922 0.124193 0.121338 0.00801985 1 0
-0.0424652 0.102032 0.131962 0.00553475 1 0
-0.364571 0.122046 0.00864333 0.0089966 1 0
-0.327554 0.121654 0.0148372 0.0124066 1 0
-0.333016 0.124314 0.0330948 0.00683507 1 0
-0.105421 0.0127092 0.192345 0.00790702 1 0
-0.137771 0.0134939 0.193549 0.00659779 1 0
-0.122142 0.0399081 0.190873 0.00657837 1 0
-0.0360628 0.14824 0.195135 0.00498531 1 0
-0.0487747 0.130945 0.194461 0.00520711 1 0
-0.0114236 0.190122 0.0171162 0.00624084 1 0
-0.00719424 0.185625 0.043441 0.00751635 1 0
-0.150284 0.191552 0.11361 0.00847748 1 0
-0.113937 0.170589 0.114578 0.00946019 1 0
-0.157242 0.195396 0.0739888 0.004951 1 0
-0.187169 0.191199 0.104521 0.0057037 1 0
-0.191458 0.179219 0.0751372 0.00509441 1 0
-0.179449 0.177476 0.0741934 0.00707689 1 0
-0.220758 0.131729 0.172635 0.0110727 1 0
-0.235641 0.14715 0.150809 0.00628522 1 0
-0.174845 0.0173726 0.00679136 0.00715132 1 0
-0.389 0.0262074 0.0765676 0.00740518 1 0
-0.385725 0.0576259 0.0716836 0.00494275 1 0
-0.369562 0.0489367 0.0886258 0.00875958 1 0
-0.389473 0.125925 0.0240515 0.00707116 1 0
-0.384935 0.114117 0.0640126 0.00517591 1 0
-0.358025 0.129177 0.065102 0.00532288 1 0
-0.380652 0.114116 0.0493804 0.00640348 1 0
-0.0925978 0.185847 0.176284 0.00817487 1 0
-0.103581 0.173693 0.138901 0.00526595 1 0
-0.169338 0.185191 0.144271 0.0124284 1 0
-0.190417 0.142733 0.141853 0.00703344 1 0
-0.0145455 0.0827114 0.192269 0.00671582 1 0
-0.0201515 0.118411 0.19059 0.00538755 1 0
-0.0447295 0.10804 0.190066 0.00589401 1 0
-0.372658 0.186009 0.0342008 0.00586944 1 0
-0.341111 0.193211 0.0297643 0.00725038 1 0
-0.291381 0.145337 0.0695375 0.00537388 1 0
-0.262009 0.149087 0.0586692 0.0063418 1 0
-0.272672 0.157725 0.0471531 0.00678475 1 0
-0.177522 0.191702 0.0151077 0.00871947 1 0
-0.195951 0.192488 0.042442 0.0075691 1 0
-0.223972 0.0441119 0.066088 0.00943428 1 0
-0.216549 0.0621694 0.0881533 0.00736065 1 0
-0.248009 0.0605968 0.0849173 0.00751538 1 0
-0.222064 0.056697 0.058959 0.005155 1 0
-0.204322 0.00865878 0.149084 0.00905007 1 0
-0.0179466 0.0646345 0.0477057 0.00580657 1 0
-0.0279603 0.0870887 0.0391257 0.00507917 1 0
-0.0583118 0.138382 0.13237 0.0075169 1 0
-0.0310013 0.14362 0.151161 0.00524737 1 0
-0.0781885 0.0332649 0.0108671 0.00532103 1 0
-0.0690375 0.0649554 0.0147177 0.00651158 1 0
-0.104554 0.0463637 0.00797568 0.00810448 1 0
-0.291221 0.19255 0.0657017 0.00699412 1 0
-0.314641 0.193615 0.0665849 0.00653856 1 0
-0.322512 0.174957 0.0655721 0.0117791 1 0
-0.246221 0.191961 0.0279806 0.00505252 1 0
-0.26026 0.192866 0.0414315 0.0063595 1 0
-0.226439 0.194878 0.0503368 0.0053088 1 0
-0.381734 0.0627377 0.129848 0.00505232 1 0
-0.359458 0.0626474 0.123117 0.00536539 1 0
-0.368474 0.0544648 0.140028 0.00583783 1 0
-0.371952 0.186986 0.0786659 0.00541608 1 0
-0.373149 0.188049 0.110842 0.00521248 1 0
-0.348782 0.174456 0.0904933 0.0109357 1 0
-0.370339 0.0202183 0.145735 0.00762078 1 0
-0.353047 0.036823 0.134046 0.00654898 1 0
-0.173665 0.0688826 0.112392 0.00546214 1 0
-0.00601937 0.0813715 0.168923 0.00635341 1 0
-0.00602729 0.0869847 0.136085 0.00609493 1 0
-0.0184638 0.0953948 0.160977 0.0049687 1 0
-0.0871605 0.0551548 0.11149 0.00512355 1 0
-0.121243 0.0613418 0.116861 0.00674977 1 0
-0.0104101 0.0605892 0.180056 0.00544866 1 0
-0.0264487 0.0799943 0.162158 0.00601263 1 0
-0.0255322 0.0594446 0.155259 0.00734574 1 0
-0.236368 0.0362734 0.192409 0.00762552 1 0
-0.220529 0.0553839 0.190136 0.00524858 1 0
-0.251545 0.0452632 0.169149 0.00625398 1 0
-0.258667 0.0495091 0.076911 0.0063627 1 0
-0.0844778 0.0171772 0.0142944 0.00539746 1 0
-0.104986 0.0472937 0.020959 0.00496815 1 0
-0.234017 0.123122 0.165273 0.00636487 1 0
-0.215883 0.114482 0.137351 0.00607392 1 0
-0.255968 0.107054 0.134688 0.00618773 1 0
-0.242199 0.129011 0.143615 0.00661564 1 0
-0.254621 0.0204878 0.0150463 0.0063895 1 0
-0.260334 0.046401 0.00768789 0.00812479 1 0
-0.247893 0.0462226 0.0316245 0.00700558 1 0
-0.221421 0.134262 0.0282345 0.00655456 1 0
-0.180824 0.0228593 0.187996 0.00638733 1 0
-0.213041 0.0133159 0.19237 0.00780685 1 0
-0.194998 0.0338827 0.189502 0.0106018 1 0
-0.272619 0.189084 0.0698362 0.00594189 1 0
-0.302616 0.154225 0.0769161 0.00934855 1 0
-0.264127 0.154008 0.0797161 0.00829343 1 0
-0.269698 0.168629 0.0506287 0.0050404 1 0
-0.254899 0.0132178 0.0246547 0.00566253 1 0
-0.262937 0.0114562 0.0492763 0.00654525 1 0
-0.0232101 0.185494 0.094236 0.00642635 1 0
-0.0189702 0.190582 0.104327 0.00564361 1 0
-0.394705 0.0831134 0.171396 0.0056949 1 0
-0.384951 0.0759243 0.143572 0.00518763 1 0
-0.391195 0.109337 0.137347 0.00919292 1 0
-0.377732 0.0936121 0.147022 0.00939294 1 0
-0.0611988 0.0576605 0.0342762 0.00552004 1 0
-0.132409 0.152308 0.0376554 0.00724506 1 0
-0.257384 0.0913827 0.0213397 0.00792487 1 0
-0.273538 0.105342 0.0198757 0.0126039 1 0
-0.249536 0.115752 0.00706078 0.00712634 1 0
-0.273484 0.0906132 0.0559532 0.00589563 1 0
-0.00905115 0.0140949 0.160302 0.00928439 1 0
-0.195107 0.12811 0.194695 0.00562069 1 0
-0.170111 0.136759 0.187004 0.00585134 1 0
-0.17994 0.131085 0.156562 0.00832547 1 0
-0.164357 0.0123431 0.173025 0.00531164 1 0
-0.17351 0.0145689 0.152659 0.00496858 1 0
-0.0701793 0.171675 0.188997 0.00495742 1 0
-0.0748005 0.143099 0.15452 0.00690164 1 0
-0.374541 0.189631 0.155372 0.00811457 1 0
-0.380585 0.0188822 0.0672238 0.00714736 1 0
-0.382836 0.0435632 0.061077 0.00516762 1 0
-0.364107 0.0429161 0.0770429 0.00538829 1 0
-0.37229 0.041059 0.0512871 0.00493193 1 0
-0.355692 0.0860349 0.0875009 0.00631317 1 0
-0.349618 0.116454 0.0780361 0.00525851 1 0
-0.364768 0.0981785 0.0596607 0.00789483 1 0
-0.179002 0.0116066 0.0194827 0.00589101 1 0
-0.216723 0.0137037 0.0181508 0.00529219 1 0
-0.198619 0.00990967 0.0413414 0.0101715 1 0
-0.186634 0.0338454 0.044727 0.00608557 1 0
-0.4 0.03 0.03 0.01 2 0
-0 0.03 0.03 0.01 2 0
-0.4 0.03 0.17 0.01 2 0
-0 0.03 0.17 0.01 2 0
-0.4 0.17 0.03 0.01 2 0
-0 0.17 0.03 0.01 2 0
-0.4 0.17 0.17 0.01 2 0
-0 0.17 0.17 0.01 2 0
-0.02 0.03 0.03 0.01 2 0
-0.04 0.03 0.03 0.01 2 0
-0.06 0.03 0.03 0.01 2 0
-0.08 0.03 0.03 0.01 2 0
-0.1 0.03 0.03 0.01 2 0
-0.12 0.03 0.03 0.01 2 0
-0.14 0.03 0.03 0.01 2 0
-0.16 0.03 0.03 0.01 2 0
-0.18 0.03 0.03 0.01 2 0
-0.2 0.03 0.03 0.01 2 0
-0.22 0.03 0.03 0.01 2 0
-0.24 0.03 0.03 0.01 2 0
-0.26 0.03 0.03 0.01 2 0
-0.28 0.03 0.03 0.01 2 0
-0.3 0.03 0.03 0.01 2 0
-0.32 0.03 0.03 0.01 2 0
-0.34 0.03 0.03 0.01 2 0
-0.36 0.03 0.03 0.01 2 0
-0.38 0.03 0.03 0.01 2 0
-0.02 0.03 0.17 0.01 2 0
-0.04 0.03 0.17 0.01 2 0
-0.06 0.03 0.17 0.01 2 0
-0.08 0.03 0.17 0.01 2 0
-0.1 0.03 0.17 0.01 2 0
-0.12 0.03 0.17 0.01 2 0
-0.14 0.03 0.17 0.01 2 0
-0.16 0.03 0.17 0.01 2 0
-0.18 0.03 0.17 0.01 2 0
-0.2 0.03 0.17 0.01 2 0
-0.22 0.03 0.17 0.01 2 0
-0.24 0.03 0.17 0.01 2 0
-0.26 0.03 0.17 0.01 2 0
-0.28 0.03 0.17 0.01 2 0
-0.3 0.03 0.17 0.01 2 0
-0.32 0.03 0.17 0.01 2 0
-0.34 0.03 0.17 0.01 2 0
-0.36 0.03 0.17 0.01 2 0
-0.38 0.03 0.17 0.01 2 0
-0.02 0.17 0.03 0.01 2 0
-0.04 0.17 0.03 0.01 2 0
-0.06 0.17 0.03 0.01 2 0
-0.08 0.17 0.03 0.01 2 0
-0.1 0.17 0.03 0.01 2 0
-0.12 0.17 0.03 0.01 2 0
-0.14 0.17 0.03 0.01 2 0
-0.16 0.17 0.03 0.01 2 0
-0.18 0.17 0.03 0.01 2 0
-0.2 0.17 0.03 0.01 2 0
-0.22 0.17 0.03 0.01 2 0
-0.24 0.17 0.03 0.01 2 0
-0.26 0.17 0.03 0.01 2 0
-0.28 0.17 0.03 0.01 2 0
-0.3 0.17 0.03 0.01 2 0
-0.32 0.17 0.03 0.01 2 0
-0.34 0.17 0.03 0.01 2 0
-0.36 0.17 0.03 0.01 2 0
-0.38 0.17 0.03 0.01 2 0
-0.02 0.17 0.17 0.01 2 0
-0.04 0.17 0.17 0.01 2 0
-0.06 0.17 0.17 0.01 2 0
-0.08 0.17 0.17 0.01 2 0
-0.1 0.17 0.17 0.01 2 0
-0.12 0.17 0.17 0.01 2 0
-0.14 0.17 0.17 0.01 2 0
-0.16 0.17 0.17 0.01 2 0
-0.18 0.17 0.17 0.01 2 0
-0.2 0.17 0.17 0.01 2 0
-0.22 0.17 0.17 0.01 2 0
-0.24 0.17 0.17 0.01 2 0
-0.26 0.17 0.17 0.01 2 0
-0.28 0.17 0.17 0.01 2 0
-0.3 0.17 0.17 0.01 2 0
-0.32 0.17 0.17 0.01 2 0
-0.34 0.17 0.17 0.01 2 0
-0.36 0.17 0.17 0.01 2 0
-0.38 0.17 0.17 0.01 2 0
-0.347522 0.0798775 0.189345 0.00542525 1 0
-0.0978862 0.0443223 0.157324 0.00881265 1 0
-0.392662 0.0990343 0.149296 0.00665244 1 0
-0.27 0.186275 0.156019 0.00669684 1 0
-0.356951 0.162534 0.138065 0.00842663 1 0
-0.282853 0.0239922 0.154694 0.00641626 1 0
-0.03 0.152792 0.169299 0.005642 1 0
-0.102813 0.149965 0.130103 0.0072981 1 0
-0.246362 0.124006 0.0878291 0.00776572 1 0
-0.134712 0.0782273 0.00486166 0.00518048 1 0
-0.145202 0.0420336 0.160607 0.00612731 1 0
-0.1331 0.191055 0.13096 0.00492461 1 0
-0.178568 0.0439534 0.0151785 0.00628492 1 0
-0.0369389 0.0587979 0.0362255 0.00831987 1 0
-0.324462 0.104118 0.060766 0.00656953 1 0
-0.242014 0.156239 0.0521801 0.00555918 1 0
-0.347445 0.0793337 0.0940084 0.00614759 1 0
-0.176037 0.0328676 0.119084 0.00524276 1 0
-0.203878 0.107329 0.173163 0.00650472 1 0
-0.275532 0.0453966 0.0313616 0.00608947 1 0
-0.26178 0.155021 0.0948649 0.00706965 1 0
-0.39 0.158236 0.172488 0.00563869 1 0
-0.105644 0.0790286 0.176016 0.00580547 1 0
-0.20005 0.0366356 0.0493124 0.0083647 1 0
-0.0185075 0.160973 0.130327 0.00501499 1 0
-0.300174 0.155686 0.0955826 0.00747518 1 0
-0.113642 0.0321054 0.151243 0.00816062 1 0
-0.0507885 0.15975 0.145708 0.00739224 1 0
-0.271194 0.0350138 0.151904 0.00620918 1 0
-0.201468 0.195442 0.130678 0.00505288 1 0
-0.188726 0.172934 0.0671716 0.0054132 1 0
-0.370376 0.156378 0.178879 0.00812185 1 0
-0.212651 0.051505 0.0344394 0.00698105 1 0
-0.0728915 0.0702816 0.0670054 0.00733578 1 0
-0.27 0.0222001 0.0413285 0.00700511 1 0
-0.209838 0.078913 0.158632 0.00692605 1 0
-0.0313396 0.169454 0.0453461 0.00637858 1 0
-0.380556 0.0338425 0.153157 0.00728474 1 0
-0.327886 0.154734 0.118663 0.00729678 1 0
-0.35 0.157495 0.0225033 0.00747683 1 0
-0.0649327 0.050875 0.110639 0.00808269 1 0
-0.152733 0.0857879 0.179473 0.00634748 1 0
-0.288763 0.147693 0.0341985 0.0094579 1 0
-0.11 0.0433635 0.0307431 0.00670737 1 0
-0.361312 0.0139639 0.152203 0.00512422 1 0
-0.220006 0.095739 0.171783 0.00552227 1 0
-0.339671 0.181996 0.18433 0.00656595 1 0
-0.267395 0.194784 0.109548 0.00565878 1 0
-0.308662 0.0124479 0.173343 0.00896394 1 0
-0.253811 0.0926573 0.109213 0.0106235 1 0
-0.392837 0.123744 0.178331 0.00689455 1 0
-0.220257 0.0991966 0.0646123 0.0143061 1 0
-0.149942 0.0119581 0.0950768 0.00568721 1 0
-0.021108 0.192638 0.0225377 0.00513947 1 0
-0.202093 0.121861 0.111158 0.00779051 1 0
-0.364844 0.0434614 0.0223083 0.00624303 1 0
-0.0816671 0.141038 0.0995708 0.00766147 1 0
-0.356446 0.160479 0.0471579 0.00994152 1 0
-0.0450777 0.18198 0.0420726 0.0054801 1 0
-0.359875 0.0893131 0.177108 0.00504329 1 0
-0.0983642 0.130066 0.170333 0.00574947 1 0
-0.0337275 0.0454853 0.184088 0.00520309 1 0
-0.260472 0.183642 0.0225082 0.00557063 1 0
-0.320423 0.153275 0.0290202 0.00675951 1 0
-0.142201 0.152845 0.144419 0.0122891 1 0
-0.236239 0.12794 0.17545 0.00511185 1 0
-0.253457 0.0513097 0.0973065 0.00889881 1 0
-0.292661 0.0883479 0.0835194 0.0103442 1 0
-0.29 0.019008 0.0211345 0.00730379 1 0
-0.206797 0.109716 0.0158543 0.00644442 1 0
-0.00485992 0.157468 0.0570503 0.00495699 1 0
-0.151719 0.0532074 0.109485 0.00820095 1 0
-0.207828 0.170978 0.14269 0.00686123 1 0
-0.207725 0.0420149 0.179824 0.00733632 1 0
-0.270731 0.14459 0.099749 0.0060311 1 0
-0.184316 0.122176 0.187476 0.00577481 1 0
-0.140387 0.0445274 0.0230222 0.00612092 1 0
-0.160369 0.1527 0.0415237 0.00674556 1 0
-0.300792 0.147145 0.15994 0.00929333 1 0
-0.0525256 0.0915602 0.179181 0.00589334 1 0
-0.129693 0.175565 0.0426627 0.00688964 1 0
-0.299318 0.0291523 0.0845295 0.00620838 1 0
-0.00962742 0.0170789 0.119014 0.00614714 1 0
-0.26608 0.0134887 0.0245473 0.0055224 1 0
-0.359626 0.145645 0.018462 0.00831556 1 0
-0.264127 0.048321 0.0226428 0.00742254 1 0
-0.296538 0.081742 0.100029 0.00744197 1 0
-0.345111 0.0473617 0.172251 0.00823776 1 0
-0.0868119 0.108331 0.0569456 0.00585534 1 0
-0.174245 0.131957 0.0322579 0.00524247 1 0
-0.12388 0.118941 0.0234175 0.00751806 1 0
-0.334458 0.0902555 0.188535 0.0100815 1 0
-0.195442 0.0683869 0.120811 0.00520101 1 0
-0.33765 0.0317681 0.0132248 0.00499725 1 0
-0.0139264 0.0661681 0.057607 0.00498931 1 0
-0.366444 0.176412 0.0907763 0.00508473 1 0
-0.251406 0.18165 0.175613 0.00552709 1 0
-0.0480855 0.0204338 0.179939 0.00598943 1 0
-0.342488 0.0409397 0.10765 0.00671023 1 0
-0.172764 0.118587 0.043688 0.00660758 1 0
-0.33 0.0380642 0.179743 0.0061229 1 0
-0.177923 0.116745 0.0232329 0.00649864 1 0
-0.0434834 0.147828 0.0215313 0.0051462 1 0
-0.130758 0.0473001 0.0975034 0.00695327 1 0
-0.272865 0.0192001 0.132966 0.00589323 1 0
-0.265019 0.150946 0.168352 0.00741564 1 0
-0.24418 0.0141703 0.0369479 0.00778553 1 0
-0.336748 0.170515 0.077577 0.0071526 1 0
-0.184562 0.178649 0.112849 0.00958207 1 0
-0.362317 0.110098 0.0861787 0.00522559 1 0
-0.157402 0.116345 0.119616 0.00810692 1 0
-0.208746 0.0329015 0.0825929 0.00742124 1 0
-0.0497274 0.0591842 0.0861661 0.00559058 1 0
-0.01 0.0185565 0.177554 0.00697095 1 0
-0.0728359 0.0892859 0.0249654 0.00991388 1 0
-0.00664008 0.149212 0.0165518 0.00717416 1 0
-0.214491 0.0193724 0.180289 0.00578476 1 0
-0.277068 0.191227 0.0809189 0.00619127 1 0
-0.0424533 0.104161 0.0716172 0.00799191 1 0
-0.31 0.0402308 0.0232237 0.00582996 1 0
-0.27754 0.184929 0.172891 0.00540447 1 0
-0.252694 0.158786 0.0735484 0.00554851 1 0
-0.3085 0.0988447 0.149485 0.0110854 1 0
-0.146358 0.0654075 0.176887 0.00852953 1 0
-0.15028 0.0850435 0.124902 0.0097613 1 0
-0.331544 0.04829 0.19056 0.00819168 1 0
-0.351251 0.101156 0.135048 0.00589803 1 0
-0.186782 0.165407 0.083592 0.00584857 1 0
-0.325097 0.166509 0.185233 0.00643767 1 0
-0.0918322 0.180427 0.0413606 0.00745013 1 0
-0.160433 0.0312632 0.152793 0.00725904 1 0
-0.17575 0.0105614 0.189975 0.00706232 1 0
-0.11 0.0178155 0.165291 0.00645094 1 0
-0.209597 0.178443 0.177733 0.00493965 1 0
-0.0474925 0.152649 0.157478 0.00674388 1 0
-0.0970484 0.187071 0.0748803 0.00561971 1 0
-0.127766 0.16398 0.184554 0.00756034 1 0
-0.138599 0.0762437 0.189021 0.00663846 1 0
-0.091639 0.0976758 0.118241 0.00951811 1 0
-0.37809 0.0472335 0.165234 0.0079822 1 0
-0.09 0.155653 0.166236 0.0078889 1 0
-0.222052 0.0741071 0.101548 0.00603959 1 0
-0.360558 0.156651 0.0895007 0.0104342 1 0
-0.0209121 0.156322 0.178298 0.00574117 1 0
-0.275085 0.0433949 0.176447 0.00565728 1 0
-0.132939 0.151075 0.159076 0.00513916 1 0
-0.338449 0.0869435 0.0180735 0.00838531 1 0
-0.255873 0.0180861 0.178487 0.00519845 1 0
-0.19 0.178801 0.0412054 0.0074073 1 0
-0.24197 0.150359 0.0663884 0.00600992 1 0
-0.366987 0.0483655 0.151525 0.00651083 1 0
-0.258204 0.0950625 0.0787748 0.0143746 1 0
-0.313156 0.0696813 0.0855558 0.00515003 1 0
-0.0224121 0.161022 0.017894 0.00526373 1 0
-0.378217 0.181987 0.0709204 0.0053618 1 0
-0.336389 0.151644 0.165116 0.00933514 1 0
-0.265528 0.039234 0.181998 0.00611775 1 0
-0.0774819 0.181246 0.0528093 0.0054311 1 0
-0.366662 0.0219018 0.158378 0.00565348 1 0
-0.159721 0.0359766 0.0451912 0.00632694 1 0
-0.153264 0.142666 0.0149768 0.00576333 1 0
-0.267688 0.0789297 0.0281816 0.00545798 1 0
-0.359133 0.041135 0.10209 0.00997302 1 0
-0.27 0.156557 0.179664 0.00615902 1 0
-0.157162 0.0928317 0.0624114 0.00930508 1 0
-0.24382 0.0682745 0.191382 0.00498369 1 0
-0.030824 0.119874 0.0824092 0.00589828 1 0
-0.0607368 0.0719771 0.121373 0.006561 1 0
-0.182555 0.0870453 0.131754 0.00758449 1 0
-0.249288 0.171861 0.00902276 0.00894261 1 0
-0.128277 0.140272 0.0478176 0.00904013 1 0
-0.39 0.0408851 0.179636 0.00764493 1 0
-0.344839 0.0246951 0.0561511 0.00517938 1 0
-0.374681 0.124486 0.022 0.00793192 1 0
-0.172293 0.0940976 0.0800211 0.00723459 1 0
-0.189986 0.15199 0.152309 0.0069387 1 0
-0.0808306 0.0847432 0.0775252 0.00801434 1 0
-0.35 0.0244296 0.180218 0.00534406 1 0
-0.29128 0.068629 0.089716 0.00854914 1 0
-0.370536 0.00948985 0.15318 0.00517375 1 0
-0.138975 0.029358 0.0148715 0.0051768 1 0
-0.229972 0.163942 0.156787 0.0076274 1 0
-0.0458068 0.0745883 0.105977 0.00800304 1 0
-0.387971 0.13337 0.0972578 0.005263 1 0
-0.267418 0.123144 0.103298 0.00717081 1 0
-0.289479 0.116327 0.166929 0.00597564 1 0
-0.0076274 0.0163704 0.0386944 0.00763753 1 0
-0.168509 0.182954 0.0239459 0.006639 1 0
-0.15 0.176936 0.0391289 0.00521332 1 0
-0.37 0.158822 0.0381978 0.00639058 1 0
-0.393535 0.192952 0.0828301 0.0070797 1 0
-0.220561 0.152147 0.0267704 0.0081512 1 0
-0.0723325 0.16431 0.182063 0.00538414 1 0
-0.334911 0.0744686 0.0606515 0.00522857 1 0
-0.235834 0.026813 0.0458702 0.00671452 1 0
-0.195435 0.0170165 0.162842 0.00551265 1 0
-0.269892 0.0607274 0.109486 0.00883171 1 0
-0.343501 0.0709899 0.0209709 0.0057976 1 0
-0.222355 0.0915619 0.123518 0.00627954 1 0
-0.14512 0.0672658 0.124313 0.00713699 1 0
-0.0789361 0.0122478 0.165528 0.00833777 1 0
-0.303859 0.120825 0.105216 0.00568384 1 0
-0.0668885 0.187978 0.0470427 0.0057157 1 0
-0.0474666 0.176518 0.156891 0.00643413 1 0
-0.0546208 0.00894538 0.0542628 0.00499468 1 0
-0.163881 0.165255 0.0156245 0.00562792 1 0
-0.264941 0.0352942 0.0524973 0.00526542 1 0
-0.0682807 0.131748 0.126804 0.00521273 1 0
-0.31 0.0414694 0.0383149 0.00734023 1 0
-0.293551 0.0411853 0.146535 0.00674033 1 0
-0.259371 0.101169 0.0300947 0.00535567 1 0
-0.0236936 0.19498 0.117863 0.00556218 1 0
-0.194553 0.0960323 0.00662746 0.00534121 1 0
-0.144031 0.00765253 0.0145084 0.00790903 1 0
-0.387286 0.0283025 0.183463 0.00540204 1 0
-0.190849 0.085665 0.042132 0.0058276 1 0
-0.337163 0.0493615 0.0297166 0.00957028 1 0
-0.0702921 0.0508055 0.0761078 0.00887061 1 0
-0.363204 0.079317 0.031058 0.00585507 1 0
-0.0239026 0.0171388 0.0732999 0.00558563 1 0
-0.31 0.171377 0.0410328 0.00495384 1 0
-0.242897 0.0431399 0.157876 0.00764433 1 0
-0.0232279 0.0625859 0.0569853 0.00499752 1 0
-0.308419 0.154837 0.0283139 0.00536722 1 0
-0.351596 0.0296902 0.0490809 0.00580207 1 0
-0.00724216 0.107479 0.173821 0.0052565 1 0
-0.320234 0.110807 0.157754 0.00760032 1 0
-0.10993 0.17569 0.0450187 0.00888243 1 0
-0.0556015 0.0166924 0.153296 0.0118053 1 0
-0.255539 0.0102831 0.109715 0.00796557 1 0
-0.146502 0.158052 0.0927089 0.00542645 1 0
-0.105747 0.0703886 0.184545 0.00523508 1 0
-0.32732 0.123906 0.044966 0.00633809 1 0
-0.167621 0.160837 0.179697 0.00536462 1 0
-0.156603 0.15324 0.169971 0.00710102 1 0
-0.308484 0.164311 0.181512 0.00539052 1 0
-0.0635922 0.181646 0.183508 0.00623565 1 0
-0.0488876 0.155546 0.17358 0.00734124 1 0
-0.05 0.161337 0.0228354 0.00504587 1 0
-0.333482 0.115593 0.0639115 0.00588445 1 0
-0.311958 0.0137062 0.111868 0.00852586 1 0
-0.07 0.0223539 0.18273 0.00591058 1 0
-0.00719179 0.070529 0.0416848 0.00606667 1 0
-0.101032 0.0195252 0.155612 0.00685467 1 0
-0.0254764 0.0434224 0.0366104 0.00593267 1 0
-0.0697503 0.14859 0.103677 0.00703194 1 0
-0.0853097 0.164886 0.121862 0.00635816 1 0
-0.261932 0.182529 0.103209 0.0052298 1 0
-0.287308 0.151721 0.168501 0.00726717 1 0
-0.0169782 0.15904 0.0805994 0.0050559 1 0
-0.14364 0.0674591 0.13787 0.0055179 1 0
-0.231317 0.120206 0.0514386 0.00936835 1 0
-0.0573314 0.122786 0.19436 0.00603971 1 0
-0.0281059 0.0184631 0.021398 0.00499663 1 0
-0.263591 0.0639061 0.174787 0.00656042 1 0
-0.0581201 0.184798 0.163389 0.00631669 1 0
-0.179217 0.044415 0.158281 0.00766895 1 0
-0.0731051 0.0881463 0.180648 0.00529527 1 0
-0.09 0.0359271 0.0194755 0.0049713 1 0
-0.23 0.157473 0.178684 0.0080108 1 0
-0.341498 0.194203 0.0117522 0.00650448 1 0
-0.391166 0.10602 0.0685237 0.0059928 1 0
-0.358029 0.0186959 0.108716 0.00560939 1 0
-0.329772 0.17071 0.121833 0.00909976 1 0
-0.335608 0.0574737 0.173582 0.0057023 1 0
-0.331246 0.159417 0.103862 0.0085865 1 0
-0.0563992 0.0102386 0.185024 0.00576244 1 0
-0.213145 0.0479381 0.170198 0.00519868 1 0
-0.0938822 0.161259 0.0546349 0.00524396 1 0
-0.264021 0.027745 0.0944503 0.00506959 1 0
-0.140928 0.0777212 0.176066 0.00495326 1 0
-0.161296 0.115551 0.0985767 0.00666958 1 0
-0.280353 0.130673 0.178957 0.00528118 1 0
-0.156516 0.136071 0.178792 0.00753372 1 0
-0.251158 0.0395676 0.121355 0.00764725 1 0
-0.326188 0.034959 0.0461858 0.00591718 1 0
-0.217008 0.055159 0.00923339 0.0062824 1 0
-0.24511 0.0178481 0.0217576 0.00554719 1 0
-0.192659 0.033758 0.130776 0.00667871 1 0
-0.134313 0.00674791 0.123773 0.00571604 1 0
-0.25894 0.00798155 0.142322 0.00527416 1 0
-0.0989189 0.138211 0.188624 0.00693057 1 0
-0.188807 0.154195 0.0314249 0.00814928 1 0
-0.0465999 0.0158036 0.0306726 0.00566998 1 0
-0.21 0.178166 0.16205 0.00516225 1 0
-0.103462 0.0747507 0.162656 0.00566988 1 0
-0.232491 0.186303 0.165265 0.00743411 1 0
-0.0948224 0.0458309 0.0355574 0.00719834 1 0
-0.137066 0.0453262 0.182442 0.00595659 1 0
-0.0606057 0.0509872 0.139644 0.00577137 1 0
-0.118997 0.0803134 0.0169132 0.00963772 1 0
-0.0648667 0.150087 0.129484 0.00620631 1 0
-0.13 0.168638 0.0183636 0.00540324 1 0
-0.328037 0.00816448 0.0789749 0.00836521 1 0
-0.261785 0.0674796 0.0860459 0.00765607 1 0
-0.265839 0.12281 0.0595413 0.0109387 1 0
-0.125226 0.108533 0.114202 0.00615113 1 0
-0.215342 0.155261 0.153166 0.0062645 1 0
-0.189995 0.0465725 0.0353405 0.00970266 1 0
-0.0885535 0.0561785 0.184883 0.00626981 1 0
-0.121939 0.169556 0.15395 0.00617321 1 0
-0.11 0.174743 0.0199283 0.00496436 1 0
-0.331276 0.142067 0.0574075 0.0114335 1 0
-0.0469555 0.0789318 0.0751397 0.00502226 1 0
-0.20313 0.095668 0.132944 0.0065325 1 0
-0.0264725 0.182658 0.163376 0.00525103 1 0
-0.0549236 0.0830398 0.0891248 0.0062925 1 0
-0.309388 0.0495779 0.0630322 0.00534495 1 0
-0.234442 0.182998 0.0358474 0.00529841 1 0
-0.206371 0.159944 0.0584285 0.00581264 1 0
-0.306901 0.125028 0.0251801 0.010106 1 0
-0.101812 0.0251804 0.129384 0.00802216 1 0
-0.369995 0.173609 0.181455 0.00562445 1 0
-0.349316 0.114621 0.138382 0.00538571 1 0
-0.330089 0.129989 0.143439 0.00887266 1 0
-0.115997 0.191979 0.0698904 0.00832214 1 0
-0.177899 0.0857562 0.112367 0.00852281 1 0
-0.072263 0.030518 0.111296 0.00596901 1 0
-0.352759 0.136596 0.0576396 0.00644424 1 0
-0.230748 0.0966892 0.17339 0.00538032 1 0
-0.0458287 0.0433015 0.158147 0.00874561 1 0
-0.0980732 0.171347 0.0552498 0.00569654 1 0
-0.305693 0.155839 0.127417 0.00593698 1 0
-0.335309 0.126327 0.0706772 0.00693509 1 0
-0.314188 0.143696 0.103088 0.0107034 1 0
-0.142819 0.173227 0.0858479 0.0112391 1 0
-0.31 0.0348089 0.180252 0.00510729 1 0
-0.15 0.0436508 0.0331577 0.00721381 1 0
-0.19796 0.0280548 0.148822 0.00873619 1 0
-0.287608 0.0440149 0.181191 0.00508972 1 0
-0.234242 0.0276053 0.0936894 0.00535566 1 0
-0.200447 0.0930969 0.0415927 0.00509391 1 0
-0.33 0.0395939 0.0215398 0.00504401 1 0
-0.108655 0.0741489 0.140021 0.00772278 1 0
-0.23 0.0336803 0.155098 0.00832 1 0
-0.05 0.0465513 0.0365519 0.0095876 1 0
-0.102633 0.158261 0.0806719 0.00520046 1 0
-0.30296 0.116641 0.142802 0.00871556 1 0
-0.146636 0.0086573 0.0811116 0.00646753 1 0
-0.248061 0.150212 0.159558 0.00759468 1 0
-0.0511742 0.126609 0.00468162 0.00493993 1 0
-0.160765 0.14026 0.105735 0.00630499 1 0
-0.203703 0.132457 0.169937 0.00620977 1 0
-0.287417 0.086656 0.114549 0.00635341 1 0
-0.0993595 0.191428 0.098834 0.00507766 1 0
-0.313624 0.145026 0.121706 0.00796975 1 0
-0.122538 0.15124 0.154183 0.00635657 1 0
-0.0604078 0.0152021 0.123458 0.00542286 1 0
-0.0223381 0.125728 0.135981 0.00585759 1 0
-0.315672 0.149159 0.0607302 0.00602484 1 0
-0.3332 0.164513 0.0123964 0.00965288 1 0
-0.37582 0.172889 0.0147571 0.00606757 1 0
-0.052553 0.0588091 0.110053 0.00604681 1 0
-0.140355 0.0965998 0.0802462 0.0122419 1 0
-0.0973348 0.00627142 0.0760289 0.00540746 1 0
-0.279178 0.0296219 0.185108 0.00513539 1 0
-0.00445371 0.0476518 0.120346 0.00494855 1 0
-0.0644919 0.191953 0.00716455 0.00588954 1 0
-0.0869399 0.0810823 0.10593 0.0102924 1 0
-0.340655 0.171237 0.140926 0.00589336 1 0
-0.237862 0.110315 0.0055321 0.00579299 1 0
-0.320733 0.173027 0.0827873 0.00563505 1 0
-0.144934 0.0258788 0.0882664 0.00526551 1 0
-0.101809 0.0163963 0.176675 0.00526074 1 0
-0.107666 0.0199858 0.0178321 0.00611792 1 0
-0.0498234 0.0372418 0.0210861 0.00511295 1 0
-0.110865 0.0949012 0.0684746 0.0052638 1 0
-0.38057 0.176806 0.0552643 0.00512958 1 0
-0.197033 0.114059 0.138863 0.0084076 1 0
-0.249194 0.109915 0.166191 0.00529529 1 0
-0.0862794 0.154898 0.17898 0.00540933 1 0
-0.27033 0.12531 0.0158457 0.00713187 1 0
-0.32917 0.0623616 0.0191554 0.00725251 1 0
-0.0834931 0.060607 0.0794537 0.00790831 1 0
-0.00791223 0.0940613 0.176638 0.00505783 1 0
-0.0787373 0.191473 0.104354 0.00497613 1 0
-0.354648 0.0809409 0.165555 0.00512381 1 0
-0.195343 0.0213989 0.0684254 0.00535459 1 0
-0.202165 0.116979 0.091119 0.011077 1 0
-0.183385 0.12038 0.10588 0.0066955 1 0
-0.100627 0.181147 0.150607 0.00892321 1 0
-0.184063 0.182109 0.0222756 0.00492635 1 0
-0.269945 0.0508076 0.0970386 0.00613515 1 0
-0.223061 0.0442632 0.164099 0.00573653 1 0
-0.379559 0.149125 0.1674 0.00558254 1 0
-0.166691 0.0981379 0.126571 0.0102523 1 0
-0.146453 0.178477 0.0102732 0.00546206 1 0
-0.250081 0.139208 0.105752 0.00666326 1 0
-0.0828624 0.049343 0.0991538 0.00917406 1 0
-0.114047 0.157075 0.0674288 0.00748147 1 0
-0.325864 0.0379841 0.102682 0.00760018 1 0
-0.0865448 0.0333339 0.154956 0.00674158 1 0
-0.179765 0.0194648 0.159028 0.00521305 1 0
-0.158754 0.0550893 0.0664386 0.00526478 1 0
-0.268519 0.0975019 0.126336 0.00843922 1 0
-0.0780719 0.0491939 0.0311838 0.00541201 1 0
-0.333234 0.187204 0.0596276 0.00554904 1 0
-0.209764 0.108087 0.146589 0.0067205 1 0
-0.184083 0.128664 0.130131 0.0123429 1 0
-0.286562 0.0698164 0.19439 0.0059234 1 0
-0.03 0.167223 0.158687 0.00535208 1 0
-0.0905275 0.0637841 0.115981 0.00517076 1 0
-0.0903216 0.0828469 0.0253702 0.00656234 1 0
-0.21 0.181115 0.0256308 0.00557701 1 0
-0.392997 0.123522 0.0881469 0.00713771 1 0
-0.27 0.177572 0.0390839 0.00548721 1 0
-0.341463 0.070823 0.130651 0.00521516 1 0
-0.0368654 0.0432709 0.0217789 0.00592252 1 0
-0.19 0.0188588 0.0323655 0.00515657 1 0
-0.11 0.0373125 0.019389 0.00609366 1 0
-0.102 0.0568128 0.166768 0.00737801 1 0
-0.37 0.16207 0.157379 0.0079496 1 0
-0.372113 0.105287 0.140051 0.00531965 1 0
-0.00599721 0.0650202 0.0947234 0.00597836 1 0
-0.24746 0.0529289 0.0668096 0.00629904 1 0
-0.0104065 0.136024 0.0294409 0.00654423 1 0
-0.231698 0.130363 0.18604 0.00628433 1 0
-0.29 0.0290446 0.044384 0.00754462 1 0
-0.028435 0.130973 0.0597217 0.00492464 1 0
-0.367429 0.109044 0.174486 0.00512261 1 0
-0.262766 0.0628471 0.0261988 0.00537886 1 0
-0.258736 0.100411 0.00488452 0.00494719 1 0
-0.321904 0.12017 0.085994 0.0113597 1 0
-0.262991 0.0494983 0.190873 0.00682598 1 0
-0.03 0.0189616 0.177748 0.00507591 1 0
-0.0587581 0.0997631 0.159554 0.00614663 1 0
-0.0638137 0.00656929 0.0414673 0.00611381 1 0
-0.11821 0.026267 0.0533042 0.00661779 1 0
-0.33 0.0415766 0.169184 0.005005 1 0
-0.345193 0.112954 0.163829 0.00498868 1 0
-0.392254 0.0472032 0.0473154 0.0054577 1 0
-0.0286494 0.11133 0.0760248 0.0049874 1 0
-0.27 0.0365696 0.0170355 0.00686145 1 0
-0.13948 0.0741076 0.165953 0.00537703 1 0
-0.152228 0.180271 0.0220904 0.00511481 1 0
-0.11 0.159652 0.175278 0.0053276 1 0
-0.130342 0.0749803 0.127891 0.00794283 1 0
-0.37 0.0455926 0.178018 0.007069 1 0
-0.174904 0.15232 0.159484 0.0097671 1 0
-0.258567 0.142183 0.0704392 0.00773136 1 0
-0.221933 0.0370084 0.0950801 0.00995903 1 0
-0.273527 0.0201031 0.0938819 0.00499655 1 0
-0.374264 0.12754 0.119256 0.00628468 1 0
-0.118483 0.012984 0.0645129 0.00630568 1 0
-0.241122 0.0152128 0.15513 0.00617623 1 0
-0.0291186 0.0337872 0.0429776 0.00617698 1 0
-0.333775 0.066065 0.0826432 0.00498637 1 0
-0.37 0.181074 0.0233665 0.00632907 1 0
-0.223202 0.18819 0.0923402 0.00498807 1 0
-0.346015 0.0269364 0.134661 0.00559914 1 0
-0.07 0.0416623 0.178629 0.00762019 1 0
-0.280236 0.0510122 0.119443 0.00670719 1 0
-0.261681 0.0470373 0.126408 0.005187 1 0
-0.307872 0.125585 0.172237 0.00807778 1 0
-0.37691 0.0493025 0.0547169 0.00512084 1 0
-0.199809 0.142591 0.11782 0.00520728 1 0
-0.290256 0.175235 0.122551 0.00533184 1 0
-0.359318 0.162337 0.0625626 0.00527138 1 0
-0.266254 0.130207 0.0276945 0.00581197 1 0
-0.216126 0.102205 0.136049 0.00568307 1 0
-0.305954 0.165733 0.085845 0.00559505 1 0
-0.194504 0.103429 0.179534 0.00548175 1 0
-0.0595778 0.17011 0.0454706 0.00547673 1 0
-0.120786 0.149805 0.0197906 0.00838019 1 0
-0.226249 0.0744244 0.115243 0.00828741 1 0
-0.229092 0.0811134 0.0322316 0.0060468 1 0
-0.0234179 0.155289 0.0264939 0.00512035 1 0
-0.0953025 0.0401542 0.182022 0.00642255 1 0
-0.24542 0.121912 0.0445354 0.0058618 1 0
-0.250948 0.153357 0.027401 0.00830815 1 0
-0.14512 0.0114577 0.184325 0.00537055 1 0
-0.229495 0.0740694 0.0408994 0.00512964 1 0
-0.245814 0.0900784 0.0454943 0.00532297 1 0
-0.3414 0.125404 0.0907135 0.00854917 1 0
-0.0809721 0.133603 0.142928 0.00715165 1 0
-0.01 0.0400683 0.175232 0.00512425 1 0
-0.175861 0.00960354 0.101807 0.0076149 1 0
-0.110409 0.0662879 0.0110968 0.00780684 1 0
-0.068644 0.126408 0.0158185 0.00551588 1 0
-0.341462 0.0416071 0.0919578 0.00625069 1 0
-0.237534 0.0419936 0.0999316 0.00501946 1 0
-0.0621255 0.0923219 0.0886774 0.0050362 1 0
-0.219184 0.0495255 0.0811933 0.00731089 1 0
-0.387963 0.0545049 0.0624941 0.00501702 1 0
-0.139508 0.0367064 0.0988393 0.00498963 1 0
-0.11 0.0189772 0.0326292 0.00511339 1 0
-0.266344 0.0950372 0.139461 0.00509116 1 0
-0.307471 0.185989 0.0714464 0.00500287 1 0
-0.181953 0.0950166 0.00545282 0.0055711 1 0
-0.118734 0.0115042 0.0312841 0.00512618 1 0
-0.15 0.160336 0.0231105 0.00551957 1 0
-0.22619 0.0202691 0.0185718 0.00623608 1 0
-0.276323 0.0724613 0.123032 0.00660369 1 0
-0.220569 0.076601 0.172806 0.00492155 1 0
-0.100232 0.131322 0.143208 0.00639902 1 0
-0.394782 0.0236983 0.13031 0.00492271 1 0
-0.382281 0.0185517 0.0169469 0.00592855 1 0
-0.22683 0.0322293 0.0166972 0.00511889 1 0
-0.0489981 0.170903 0.18261 0.0055178 1 0
-0.349467 0.075473 0.0104567 0.00518068 1 0
-0.139219 0.109415 0.0104712 0.00569116 1 0
-0.240757 0.104913 0.175124 0.00559638 1 0
-0.0937754 0.0174482 0.140284 0.00660599 1 0
-0.218027 0.187273 0.070854 0.00499785 1 0
-0.246405 0.0970869 0.0365274 0.00607323 1 0
-0.287901 0.18408 0.0332955 0.00647807 1 0
-0.376126 0.100972 0.0352068 0.00496434 1 0
-0.209984 0.155755 0.164863 0.00661049 1 0
-0.0273352 0.180617 0.179068 0.00577195 1 0
-0.175007 0.0219339 0.0183149 0.00505085 1 0
-0.0228989 0.0946957 0.170487 0.00554807 1 0
-0.0314103 0.0460342 0.165143 0.00751195 1 0
-0.370248 0.0450066 0.0410144 0.00626097 1 0
-0.27816 0.0123399 0.0452198 0.00530145 1 0
-0.39 0.176178 0.18115 0.00620133 1 0
-0.256466 0.186298 0.11359 0.00675823 1 0
-0.357651 0.140973 0.158994 0.00677486 1 0
-0.33 0.176801 0.161228 0.00494019 1 0
-0.28369 0.16306 0.0484567 0.00552614 1 0
-0.209807 0.0179606 0.135153 0.00640212 1 0
-0.374754 0.113029 0.0121099 0.00503982 1 0
-0.0743218 0.0220835 0.0127212 0.00599074 1 0
-0.18094 0.170539 0.128215 0.00762202 1 0
-0.09 0.0187735 0.176421 0.00634823 1 0
-0.05 0.181269 0.0284853 0.00514207 1 0
-0.382123 0.104338 0.155546 0.00499356 1 0
-0.32331 0.0201479 0.0853821 0.0060223 1 0
-0.21477 0.166049 0.0164699 0.00503424 1 0
-0.360868 0.0609557 0.111799 0.00616562 1 0
-0.18085 0.0321406 0.14269 0.00675333 1 0
-0.376028 0.1525 0.195405 0.00500279 1 0
-0.23225 0.024593 0.184328 0.00716327 1 0
-0.101793 0.10075 0.0728653 0.00600643 1 0
-0.12091 0.179599 0.0179687 0.00541848 1 0
-0.0640294 0.159891 0.0402461 0.00494685 1 0
-0.154054 0.185061 0.159621 0.00923332 1 0
-0.132175 0.0181216 0.17936 0.0067317 1 0
-0.23 0.180445 0.0248208 0.00535967 1 0
-0.11 0.15442 0.0350109 0.00917913 1 0
-0.156521 0.0697386 0.118669 0.00582222 1 0
-0.309131 0.137733 0.184422 0.00778363 1 0
-0.366573 0.021133 0.181724 0.00603386 1 0
-0.358072 0.127979 0.121924 0.005249 1 0
-0.12069 0.108055 0.166835 0.00967485 1 0
-0.35182 0.095704 0.174893 0.00547524 1 0
-0.27 0.167186 0.0407491 0.00494861 1 0
-0.13 0.0433101 0.031196 0.00669101 1 0
-0.0081316 0.173136 0.0422839 0.00506157 1 0
-0.122184 0.140332 0.0098268 0.00543885 1 0
-0.0236819 0.0581298 0.119657 0.0051633 1 0
-0.07 0.0351198 0.155468 0.00836856 1 0
-0.10544 0.111304 0.04461 0.00622339 1 0
-0.31127 0.0701473 0.114328 0.0058661 1 0
-0.354215 0.0480357 0.0842499 0.00633501 1 0
-0.0804859 0.0484113 0.171363 0.0068126 1 0
-0.172237 0.115855 0.106807 0.00537165 1 0
-0.0455084 0.160394 0.0412336 0.00577368 1 0
-0.202462 0.0695508 0.160314 0.00511081 1 0
-0.127363 0.189716 0.0842867 0.00989146 1 0
-0.0967372 0.10246 0.175354 0.00649448 1 0
-0.29834 0.054986 0.0621569 0.00507099 1 0
-0.339449 0.0122872 0.0219697 0.00582351 1 0
-0.339266 0.172422 0.0589719 0.00640596 1 0
-0.33 0.0206983 0.181778 0.00636567 1 0
-0.266732 0.100053 0.0608677 0.00607784 1 0
-0.380859 0.0514983 0.1034 0.00560041 1 0
-0.335886 0.0528022 0.0844396 0.00499071 1 0
-0.35 0.0212422 0.0391845 0.00539966 1 0
-0.381987 0.173518 0.0456676 0.00511331 1 0
-0.271273 0.161918 0.0586698 0.00555117 1 0
-0.0925863 0.183631 0.132173 0.00543901 1 0
-0.258335 0.12838 0.125804 0.00532049 1 0
-0.332545 0.139745 0.1934 0.00566671 1 0
-0.269576 0.0853788 0.0088008 0.00833053 1 0
-0.230941 0.017388 0.16918 0.00554991 1 0
-0.339962 0.0828962 0.156992 0.00606685 1 0
-0.289594 0.099299 0.0979231 0.0057516 1 0
-0.140955 0.193737 0.0954806 0.00640935 1 0
-0.118922 0.195137 0.118187 0.00530406 1 0
-0.0591231 0.0998853 0.0219789 0.00663882 1 0
-0.319005 0.15718 0.158883 0.00699831 1 0
-0.127877 0.155594 0.057736 0.00769139 1 0
-0.318294 0.16287 0.129378 0.0064074 1 0
-0.36565 0.0218976 0.0162911 0.00645217 1 0
-0.00566143 0.076938 0.179819 0.00541591 1 0
-0.293948 0.0438732 0.017724 0.00529041 1 0
-0.0624557 0.0779759 0.0326174 0.00502421 1 0
-0.376266 0.00748401 0.0779648 0.00547678 1 0
-0.0682995 0.172801 0.154954 0.00740985 1 0
-0.0594805 0.127945 0.0586856 0.00525666 1 0
-0.347452 0.0663356 0.119742 0.0069306 1 0
-0.184045 0.0231649 0.0428077 0.00507048 1 0
-0.316409 0.118177 0.0351041 0.0052505 1 0
-0.351999 0.141379 0.092419 0.00731385 1 0
-0.09 0.0212043 0.159808 0.00506732 1 0
-0.0585221 0.017857 0.0399701 0.00578099 1 0
-0.155197 0.00481838 0.142725 0.00492107 1 0
-0.30678 0.0953303 0.0300757 0.00624598 1 0
-0.393444 0.136023 0.0439173 0.00510526 1 0
-0.125353 0.0507762 0.110233 0.00638261 1 0
-0.351042 0.145311 0.0675031 0.00682948 1 0
-0.254195 0.0381235 0.0413503 0.00511698 1 0
-0.01 0.180899 0.0322408 0.00495998 1 0
-0.0483639 0.0473283 0.0625009 0.00500291 1 0
-0.194708 0.0966212 0.170253 0.00499734 1 0
-0.187264 0.183601 0.170186 0.00542055 1 0
-0.222129 0.115037 0.148178 0.00643828 1 0
-0.0430709 0.0295178 0.149118 0.0066055 1 0
-0.128507 0.0100832 0.0801202 0.00561299 1 0
-0.233596 0.122146 0.0371903 0.00519093 1 0
-0.0971237 0.130173 0.0772085 0.00719146 1 0
-0.00891847 0.0214366 0.052843 0.00603167 1 0
-0.333253 0.0299159 0.0869719 0.00556045 1 0
-0.139007 0.146844 0.179856 0.00804221 1 0
-0.0889269 0.120896 0.17275 0.0069551 1 0
-0.076424 0.0383375 0.0433011 0.00610034 1 0
-0.115177 0.0947907 0.177942 0.00848365 1 0
-0.0519639 0.0337147 0.182047 0.00495052 1 0
-0.280811 0.147314 0.124882 0.00644796 1 0
-0.175351 0.0993935 0.0629356 0.00616285 1 0
-0.232532 0.140507 0.00982939 0.00553772 1 0
-0.3443 0.0707592 0.0655399 0.00521791 1 0
-0.148259 0.169095 0.147212 0.005276 1 0
-0.0806145 0.0696028 0.148441 0.00697314 1 0
-0.377057 0.0938253 0.0614691 0.00526754 1 0
-0.176727 0.163044 0.0167244 0.00534095 1 0
-0.3747 0.183974 0.167391 0.00517088 1 0
-0.116467 0.129337 0.00737408 0.00584774 1 0
-0.265312 0.0469076 0.162889 0.00895888 1 0
-0.210312 0.136884 0.0516481 0.0050044 1 0
-0.382313 0.188611 0.0781563 0.00508364 1 0
-0.256426 0.156039 0.0443755 0.00729046 1 0
-0.110251 0.153492 0.110863 0.00841988 1 0
-0.153164 0.18907 0.0510826 0.00505197 1 0
-0.135832 0.105832 0.171815 0.00641906 1 0
-0.215764 0.0305541 0.0723022 0.00525438 1 0
-0.310033 0.142274 0.171375 0.00606043 1 0
-0.15 0.164059 0.0410785 0.00606329 1 0
-0.372926 0.0870483 0.194764 0.00526985 1 0
-0.277151 0.166751 0.184336 0.00497332 1 0
-0.233981 0.116093 0.174304 0.00507903 1 0
-0.170618 0.0208526 0.19461 0.00533624 1 0
-0.31 0.176127 0.0200096 0.00540617 1 0
-0.101048 0.0762601 0.0845436 0.00718604 1 0
-0.0542891 0.0249088 0.109028 0.00805957 1 0
-0.124952 0.117632 0.0917484 0.00791336 1 0
-0.347463 0.0241088 0.106902 0.00563985 1 0
-0.0329361 0.150373 0.120633 0.00579599 1 0
-0.0245338 0.0119199 0.158341 0.00647275 1 0
-0.172233 0.146717 0.0576079 0.00512017 1 0
-0.0883143 0.156751 0.100443 0.00659294 1 0
-0.214205 0.160449 0.179897 0.00492494 1 0
-0.135415 0.0877608 0.169698 0.00815181 1 0
-0.170844 0.0282051 0.128725 0.00611538 1 0
-0.153428 0.110489 0.144807 0.00597814 1 0
-0.193851 0.0220132 0.0994787 0.00552583 1 0
-0.323255 0.167198 0.0474381 0.00795909 1 0
-0.179707 0.164925 0.0747548 0.005482 1 0
-0.0511664 0.13624 0.0541774 0.00719237 1 0
-0.338068 0.176277 0.153188 0.00581013 1 0
-0.364839 0.0856002 0.0571979 0.00492247 1 0
-0.245009 0.190734 0.148366 0.00500709 1 0
-0.208114 0.0832033 0.0596652 0.00637513 1 0
-0.295831 0.116129 0.0184326 0.0056183 1 0
-0.34496 0.165245 0.132476 0.00507771 1 0
-0.0531677 0.18774 0.096376 0.00534642 1 0
-0.382862 0.132041 0.0397941 0.00514877 1 0
-0.322868 0.132797 0.0297669 0.00680391 1 0
-0.345811 0.139817 0.0350729 0.00615701 1 0
-0.0995122 0.174468 0.0147702 0.00587915 1 0
-0.24042 0.0930751 0.0560819 0.0061489 1 0
-0.35639 0.0526969 0.14479 0.00524043 1 0
-0.288497 0.168296 0.150794 0.0110711 1 0
-0.337262 0.163029 0.0517847 0.00558953 1 0
-0.261944 0.0256295 0.116649 0.00566127 1 0
-0.251957 0.095516 0.0101884 0.0049549 1 0
-0.0698836 0.0221234 0.0433974 0.00682977 1 0
-0.0137647 0.149326 0.195047 0.00556836 1 0
-0.250432 0.074121 0.109003 0.00821935 1 0
-0.179564 0.047218 0.171751 0.006094 1 0
-0.0331699 0.0224626 0.0413483 0.00523962 1 0
-0.329789 0.137961 0.0388322 0.00571604 1 0
-0.249914 0.140583 0.151655 0.00499878 1 0
-0.319055 0.0264271 0.106152 0.0062552 1 0
-0.0386856 0.0573807 0.156485 0.00602484 1 0
-0.35 0.177304 0.0190771 0.00651221 1 0
-0.255732 0.0438077 0.179543 0.00496818 1 0
-0.23 0.01902 0.0359562 0.00600114 1 0
-0.29 0.0182661 0.035311 0.00630612 1 0
-0.190535 0.0462154 0.167995 0.00554567 1 0
-0.226768 0.173457 0.0439585 0.00508207 1 0
-0.195773 0.086384 0.0930442 0.00811178 1 0
-0.25161 0.0879304 0.126099 0.0067339 1 0
-0.244441 0.0160123 0.172747 0.00493063 1 0
-0.043296 0.151548 0.0918601 0.00625959 1 0
-0.307593 0.0272495 0.0769788 0.0051061 1 0
-0.00725937 0.181249 0.160883 0.00619715 1 0
-0.175231 0.00533157 0.147991 0.00552298 1 0
-0.0631338 0.0584774 0.0477833 0.00496594 1 0
-0.0472304 0.0284223 0.0444217 0.00620969 1 0
-0.0937202 0.0200306 0.00855072 0.00585216 1 0
-0.00876345 0.191816 0.153383 0.00684825 1 0
-0.317627 0.0683682 0.0252238 0.00535805 1 0
-0.0717525 0.130556 0.107098 0.00817232 1 0
-0.146068 0.0287704 0.0437635 0.00509176 1 0
-0.274603 0.0963645 0.03542 0.00537813 1 0
-0.190315 0.0552909 0.0503652 0.00498143 1 0
-0.34227 0.0424943 0.128558 0.00680922 1 0
-0.224546 0.0717756 0.0894152 0.0052022 1 0
-0.16485 0.144163 0.116683 0.00601526 1 0
-0.31 0.0264071 0.159299 0.00508062 1 0
-0.337475 0.0525507 0.117738 0.00655369 1 0
-0.223739 0.0170824 0.0614024 0.00560669 1 0
-0.299231 0.0440644 0.161454 0.00647538 1 0
-0.0335832 0.0789404 0.0370472 0.00503675 1 0
-0.167133 0.07712 0.119504 0.00701539 1 0
-0.222646 0.152381 0.0815839 0.00666112 1 0
-0.256102 0.122997 0.109313 0.00494815 1 0
-0.217144 0.136513 0.0915481 0.0051836 1 0
-0.248134 0.0112451 0.0967474 0.00654313 1 0
-0.13 0.024322 0.0192746 0.00572495 1 0
-0.269567 0.00820065 0.0760283 0.00789579 1 0
-0.221619 0.0680395 0.0552225 0.00679536 1 0
-0.33895 0.13243 0.132953 0.00507055 1 0
-0.119456 0.0226494 0.183848 0.00514542 1 0
-0.31 0.16474 0.156743 0.00495294 1 0
-0.333612 0.104095 0.0213189 0.0057855 1 0
-0.157879 0.174185 0.130036 0.00890416 1 0
-0.300888 0.122424 0.0414241 0.00732578 1 0
-0.365243 0.103443 0.182958 0.00526612 1 0
-0.052821 0.0599626 0.150999 0.00601089 1 0
-0.389875 0.0408276 0.0233581 0.00608927 1 0
-0.00600313 0.18337 0.178389 0.00501887 1 0
-0.34897 0.111007 0.128003 0.00550693 1 0
-0.294398 0.161156 0.0182559 0.00573325 1 0
-0.181712 0.0226184 0.108846 0.00628206 1 0
-0.232003 0.0810735 0.0908776 0.00680589 1 0
-0.192502 0.0130733 0.0573592 0.00506112 1 0
-0.0286125 0.0500802 0.0806136 0.00523027 1 0
-0.0493994 0.121428 0.149163 0.00518747 1 0
-0.08476 0.158288 0.0380256 0.00497445 1 0
-0.0951523 0.159668 0.111227 0.0065057 1 0
-0.112207 0.191503 0.168551 0.00718012 1 0
-0.114836 0.191245 0.149378 0.00508199 1 0
-0.0904455 0.160321 0.133842 0.00686734 1 0
-0.118465 0.0969585 0.152407 0.00528396 1 0
-0.325616 0.136625 0.131179 0.00570646 1 0
-0.170373 0.171284 0.0552724 0.00506681 1 0
-0.279831 0.0253967 0.0541884 0.00539711 1 0
-0.204186 0.100462 0.0951556 0.00604524 1 0
-0.241027 0.140553 0.188586 0.00632563 1 0
-0.01 0.0305452 0.158786 0.00503532 1 0
-0.154831 0.106833 0.0213084 0.00502078 1 0
-0.356808 0.00512252 0.0769753 0.00500051 1 0
-0.148342 0.0586842 0.18959 0.0057163 1 0
-0.171288 0.0323468 0.182402 0.00533673 1 0
-0.277129 0.149936 0.137827 0.00562111 1 0
-0.172076 0.136966 0.111224 0.00555198 1 0
-0.285579 0.118203 0.066372 0.00625782 1 0
-0.0164121 0.194575 0.0894871 0.00544476 1 0
-0.375279 0.142649 0.0228584 0.00808403 1 0
-0.15 0.0391444 0.176967 0.00523655 1 0
-0.154845 0.0844059 0.0919995 0.00855174 1 0
-0.114847 0.0530955 0.17119 0.00507901 1 0
-0.161215 0.0463565 0.158803 0.00658422 1 0
-0.244294 0.0749789 0.127429 0.00693151 1 0
-0.201621 0.169863 0.056274 0.00539321 1 0
-0.115581 0.0706966 0.056733 0.00508092 1 0
-0.106464 0.112311 0.0671209 0.00524916 1 0
-0.291234 0.0553339 0.0958209 0.00526472 1 0
-0.316176 0.00764799 0.0855426 0.0052024 1 0
-0.275018 0.050031 0.0102281 0.0060469 1 0
-0.150034 0.0206415 0.178561 0.0061308 1 0
-0.263767 0.191992 0.0760477 0.00525599 1 0
-0.130293 0.116906 0.0351914 0.00604257 1 0
-0.186688 0.0872507 0.0579731 0.0061373 1 0
-0.230104 0.106871 0.03155 0.00613509 1 0
-0.173996 0.0709171 0.0506331 0.00512285 1 0
-0.0207845 0.0177262 0.0390978 0.0052981 1 0
-0.0211481 0.0258574 0.0156478 0.00498216 1 0
-0.332627 0.115789 0.15882 0.00579958 1 0
-0.263268 0.157899 0.0664981 0.00551224 1 0
-0.337952 0.0433085 0.15956 0.006886 1 0
-0.34815 0.131308 0.0763117 0.00704923 1 0
-0.115767 0.0923186 0.0853965 0.00514234 1 0
-0.39 0.0189152 0.0358037 0.00601733 1 0
-0.136347 0.131356 0.149812 0.00898847 1 0
-0.34661 0.147226 0.136929 0.00586783 1 0
-0.295703 0.0581534 0.0112684 0.00518624 1 0
-0.0870268 0.00678368 0.0133139 0.00534889 1 0
-0.047278 0.0610762 0.0980137 0.0060369 1 0
-0.178609 0.136398 0.0584243 0.0056634 1 0
-0.202349 0.1576 0.189478 0.00649183 1 0
-0.270943 0.132336 0.191526 0.00832911 1 0
-0.110306 0.122519 0.0741579 0.00656935 1 0
-0.114864 0.0526981 0.143973 0.00623323 1 0
-0.293011 0.0684381 0.183414 0.00565701 1 0
-0.274135 0.0932081 0.160943 0.00563774 1 0
-0.303815 0.140585 0.0694233 0.00626015 1 0
-0.302754 0.191723 0.0147281 0.00550898 1 0
-0.127051 0.00535971 0.111888 0.0055462 1 0
-0.16405 0.0356627 0.0568418 0.00542532 1 0
-0.216114 0.15051 0.19106 0.00731595 1 0
-0.0585163 0.0784101 0.193673 0.00501427 1 0
-0.164093 0.159871 0.117253 0.00903389 1 0
-0.171427 0.150318 0.145285 0.00498805 1 0
-0.01 0.178751 0.0212145 0.00593001 1 0
-0.126596 0.135693 0.0659915 0.00700331 1 0
-0.142394 0.0700104 0.010219 0.00549211 1 0
-0.28283 0.0597229 0.012684 0.00496416 1 0
-0.346125 0.065843 0.0811333 0.00549911 1 0
-0.0192994 0.155884 0.0432481 0.00504566 1 0
-0.0620351 0.177468 0.141743 0.00507261 1 0
-0.395852 0.0603702 0.179532 0.00498008 1 0
-0.196962 0.184654 0.0324529 0.0051657 1 0
-0.279714 0.0566011 0.19426 0.005438 1 0
-0.33 0.0204775 0.0218146 0.00605239 1 0
-0.166458 0.103195 0.147391 0.00591854 1 0
-0.0617074 0.043718 0.0241343 0.00501687 1 0
-0.193501 0.0107412 0.111082 0.00846357 1 0
-0.196351 0.0464952 0.106671 0.00548262 1 0
-0.075906 0.0671244 0.160934 0.00537679 1 0
-0.309361 0.00933187 0.0990245 0.0052889 1 0
-0.0627181 0.0634413 0.168156 0.00501112 1 0
-0.046994 0.112873 0.0364355 0.00532616 1 0
-0.183407 0.0707565 0.00836969 0.00530652 1 0
-0.232014 0.188669 0.181532 0.00507663 1 0
-0.0555723 0.144624 0.121058 0.00569052 1 0
-0.0343206 0.0954366 0.0503161 0.0050001 1 0
-0.0290338 0.173999 0.187396 0.00492787 1 0
-0.309574 0.0839854 0.160007 0.00514783 1 0
-0.0969705 0.169712 0.184873 0.00518084 1 0
-0.0658485 0.150003 0.179707 0.0062944 1 0
-0.108433 0.119435 0.163223 0.00507743 1 0
-0.206247 0.0766513 0.105902 0.0066949 1 0
-0.0864436 0.0643843 0.103629 0.00657068 1 0
-0.182244 0.133136 0.104595 0.00617659 1 0
-0.0471952 0.00624242 0.0945309 0.00649479 1 0
-0.0527607 0.0109981 0.11591 0.00611499 1 0
-0.10993 0.119343 0.0931493 0.0072709 1 0
-0.103207 0.0969803 0.129359 0.00654085 1 0
-0.170271 0.0187429 0.167282 0.00512471 1 0
-0.164726 0.0409384 0.179983 0.00554499 1 0
-0.326465 0.0283705 0.135593 0.00524226 1 0
-0.140623 0.0711734 0.0772951 0.00581126 1 0
-0.0850976 0.191205 0.0768463 0.00685597 1 0
-0.09 0.183533 0.0269557 0.00709967 1 0
-0.375296 0.139669 0.0715155 0.00536797 1 0
-0.156343 0.119418 0.0174718 0.00496351 1 0
-0.201745 0.155548 0.03555 0.00549744 1 0
-0.283227 0.187762 0.109832 0.00782879 1 0
-0.0651253 0.0846026 0.00611225 0.00671016 1 0
-0.165103 0.164994 0.0433823 0.00517184 1 0
-0.230469 0.142552 0.0262646 0.00565048 1 0
-0.0644654 0.0126289 0.0524089 0.00567865 1 0
-0.193453 0.160545 0.0700145 0.00542249 1 0
-0.169417 0.181557 0.0684874 0.00516442 1 0
-0.334088 0.127733 0.102483 0.00550088 1 0
-0.0956108 0.121131 0.123297 0.00975789 1 0
-0.123709 0.127416 0.188492 0.00539229 1 0
-0.0979571 0.108096 0.156332 0.00547353 1 0
-0.251707 0.016391 0.19019 0.00624543 1 0
-0.0661633 0.179022 0.041344 0.00492435 1 0
-0.355416 0.193746 0.0841065 0.00589224 1 0
-0.347893 0.18288 0.0297822 0.00510758 1 0
-0.136844 0.0199226 0.083017 0.00534729 1 0
-0.39235 0.147579 0.183273 0.00580378 1 0
-0.01 0.0411491 0.0267012 0.00533574 1 0
-0.0588663 0.13177 0.102265 0.00539944 1 0
-0.0978903 0.11469 0.0541935 0.00643746 1 0
-0.308283 0.122379 0.18741 0.00743573 1 0
-0.381485 0.00477065 0.0532761 0.0053672 1 0
-0.274681 0.123917 0.0450574 0.00494249 1 0
-0.274508 0.141622 0.0266256 0.00580575 1 0
-0.170151 0.0674314 0.143951 0.00518518 1 0
-0.158682 0.0638484 0.15911 0.0051452 1 0
-0.378616 0.181401 0.180389 0.00548654 1 0
-0.0459767 0.150753 0.0466611 0.00506987 1 0
-0.0454381 0.151814 0.0341858 0.00532984 1 0
-0.188361 0.0534292 0.0140177 0.00568027 1 0
-0.217714 0.125165 0.0343887 0.00503698 1 0
-0.110836 0.126499 0.0383373 0.00694862 1 0
-0.096231 0.130024 0.0342919 0.0058512 1 0
-0.201951 0.139456 0.0361176 0.00511319 1 0
-0.191894 0.0976474 0.14744 0.00647568 1 0
-0.35 0.171579 0.181703 0.00547433 1 0
-0.30885 0.0795745 0.0344666 0.00514951 1 0
-0.296265 0.116872 0.0586386 0.00494227 1 0
-0.314284 0.103333 0.0673027 0.00555231 1 0
-0.092611 0.0159843 0.19321 0.0053434 1 0
-0.13 0.0210197 0.163043 0.00513412 1 0
-0.027443 0.148809 0.189908 0.00511117 1 0
-0.121856 0.159182 0.118894 0.00508099 1 0
-0.156883 0.181267 0.0743892 0.0062106 1 0
-0.363206 0.0564425 0.0982633 0.00501058 1 0
-0.00889184 0.161165 0.0418842 0.00670472 1 0
-0.39 0.156352 0.032948 0.00717421 1 0
-0.196193 0.191986 0.0554252 0.00542604 1 0
-0.212932 0.0369344 0.0594619 0.00530686 1 0
-0.246057 0.0820164 0.0902824 0.00684233 1 0
-0.262212 0.194978 0.0528194 0.005386 1 0
-0.349212 0.161169 0.102484 0.00696689 1 0
-0.0212278 0.053785 0.165676 0.00526682 1 0
-0.25 0.0222123 0.160308 0.00595556 1 0
-0.13 0.0338003 0.0415081 0.00571234 1 0
-0.251398 0.0134418 0.052878 0.00555353 1 0
-0.283035 0.0380155 0.017362 0.00527007 1 0
-0.256399 0.00663239 0.0405731 0.00536133 1 0
-0.277872 0.0151422 0.0301644 0.00501034 1 0
-0.29 0.0331873 0.156387 0.00535195 1 0
-0.310051 0.159968 0.0644506 0.00626058 1 0
-0.23 0.0400195 0.0252136 0.00494321 1 0
-0.00597915 0.192857 0.113782 0.00614966 1 0
-0.26478 0.0856209 0.0621084 0.0058759 1 0
-0.170888 0.0249568 0.149919 0.00528423 1 0
-0.0862489 0.178614 0.156334 0.00675943 1 0
-0.0765856 0.148868 0.166939 0.00690831 1 0
-0.0769549 0.152726 0.14279 0.00842565 1 0
-0.374428 0.101105 0.0515387 0.00506034 1 0
-0.208821 0.0315649 0.0177298 0.00519243 1 0
-0.213451 0.0158765 0.0324657 0.00576198 1 0
-0.2004 0.0441061 0.0243762 0.00519107 1 0
-0.21 0.0282458 0.0431743 0.00602494 1 0
-0.258037 0.0375442 0.0171449 0.00503405 1 0
-0.13 0.0397069 0.163478 0.00538679 1 0
-0.341736 0.0212705 0.157989 0.00494933 1 0
-0.33 0.0107095 0.169753 0.00926678 1 0
-0.39 0.0244424 0.159316 0.00565326 1 0
-0.123273 0.184883 0.0328546 0.00550323 1 0
-0.0582003 0.154851 0.0294708 0.00526422 1 0
-0.0687158 0.163556 0.0197289 0.0049326 1 0
-0.343047 0.152234 0.0418529 0.00666205 1 0
-0.260138 0.181753 0.0392608 0.00496383 1 0
-0.323838 0.181046 0.0401489 0.00548408 1 0
-0.39 0.17758 0.03934 0.00564262 1 0
-0.0114031 0.169948 0.157271 0.00536005 1 0
-0.105449 0.182977 0.175277 0.00503166 1 0
-0.181274 0.184416 0.182946 0.0067919 1 0
-0.17 0.174714 0.158959 0.00562471 1 0
-0.243437 0.155565 0.17436 0.0054662 1 0
-0.198594 0.177974 0.183018 0.00533083 1 0
-0.357939 0.155902 0.154586 0.00588195 1 0
-0.0678736 0.0194877 0.193962 0.00587428 1 0
-0.261094 0.031613 0.143196 0.00641111 1 0
-0.0544616 0.0115973 0.103615 0.00631154 1 0
-0.300243 0.18462 0.180876 0.00679718 1 0
-0.381482 0.00919082 0.15216 0.00582408 1 0
-0.3597 0.172902 0.127903 0.00513018 1 0
-0.27607 0.152288 0.115059 0.00497727 1 0
-0.33 0.165643 0.156947 0.00701088 1 0
-0.168644 0.0373118 0.1599 0.00517157 1 0
-0.110805 0.0247741 0.0426208 0.00646617 1 0
-0.277394 0.0310717 0.04549 0.00527087 1 0
-0.370097 0.00686026 0.142097 0.00622595 1 0
-0.10914 0.070801 0.0234014 0.00536059 1 0
-0.062817 0.0164829 0.177108 0.00493717 1 0
-0.340361 0.121672 0.136124 0.00623336 1 0
-0.177069 0.166193 0.116547 0.00541707 1 0
-0.0717111 0.0222557 0.159741 0.00529445 1 0
-0.173048 0.126401 0.105637 0.00526965 1 0
-0.370588 0.141092 0.00823424 0.00735295 1 0
-0.311732 0.112762 0.10386 0.00566651 1 0
-0.224861 0.0108757 0.0111513 0.00580825 1 0
-0.282403 0.0378644 0.150256 0.00501103 1 0
-0.183624 0.0128695 0.0433923 0.00525007 1 0
-0.342352 0.149326 0.0994858 0.00704412 1 0
-0.23 0.164717 0.0399481 0.00506231 1 0
-0.342001 0.179746 0.00588706 0.0062753 1 0
-0.198251 0.0879786 0.0521409 0.00683441 1 0
-0.0955366 0.15961 0.122925 0.00519878 1 0
-0.00593014 0.161319 0.084341 0.00603019 1 0
-0.18029 0.154792 0.145996 0.00496599 1 0
-0.0281417 0.143236 0.173569 0.0049881 1 0
-0.352748 0.152499 0.0343066 0.00563147 1 0
-0.260024 0.10054 0.0972566 0.00498755 1 0
-0.159265 0.0614676 0.177132 0.00496797 1 0
-0.273013 0.066809 0.168266 0.00526 1 0
-0.0961053 0.158912 0.0425576 0.00541757 1 0
-0.38805 0.112274 0.0864649 0.00526447 1 0
-0.264119 0.0605599 0.0966643 0.00523095 1 0
-0.329591 0.159137 0.176464 0.00586786 1 0
-0.0730028 0.0412287 0.106009 0.00531919 1 0
-0.264012 0.178833 0.14807 0.00573042 1 0
-0.263282 0.135521 0.013621 0.00547357 1 0
-0.0967876 0.145384 0.10407 0.00751144 1 0
-0.230225 0.160641 0.0228926 0.00528607 1 0
-0.325794 0.0266551 0.0951936 0.00597996 1 0
-0.149199 0.0800426 0.0786346 0.00659869 1 0
-0.238664 0.165512 0.184353 0.00509723 1 0
-0.21 0.0406293 0.1602 0.00757887 1 0
-0.187799 0.0417546 0.177593 0.00538602 1 0
-0.0331917 0.0228511 0.156774 0.0065044 1 0
-0.216288 0.0735893 0.0648644 0.00554062 1 0
-0.19795 0.00662434 0.163804 0.00522254 1 0
-0.332126 0.00415627 0.0198734 0.0051572 1 0
-0.205507 0.0201568 0.158537 0.00588187 1 0
-0.170897 0.173902 0.120927 0.00523435 1 0
-0.248516 0.014429 0.120122 0.005256 1 0
-0.0361242 0.15799 0.157262 0.00581867 1 0
-0.138548 0.147702 0.123506 0.00907352 1 0
-0.149799 0.0372451 0.151687 0.00499184 1 0
-0.177965 0.159118 0.180328 0.00514079 1 0
-0.392538 0.0189895 0.180817 0.00561277 1 0
-0.382243 0.101195 0.0750976 0.00609491 1 0
-0.0836357 0.0219441 0.00512935 0.00496743 1 0
-0.33 0.161926 0.0377196 0.00499244 1 0
-0.336211 0.177032 0.132754 0.00506622 1 0
-0.0532224 0.134385 0.114407 0.0055477 1 0
-0.276116 0.156167 0.163396 0.0058125 1 0
-0.0348003 0.115308 0.0677341 0.00607577 1 0
-0.0440233 0.146143 0.166868 0.00519442 1 0
-0.120917 0.0561351 0.0994865 0.00526409 1 0
-0.256449 0.107859 0.061902 0.00687425 1 0
-0.171845 0.0215487 0.117558 0.00692348 1 0
-0.255654 0.161876 0.0169731 0.00532026 1 0
-0.144031 0.154944 0.170114 0.00558662 1 0
-0.145005 0.0179794 0.0223569 0.00509841 1 0
-0.128038 0.0977233 0.174511 0.00514635 1 0
-0.201338 0.0257893 0.133051 0.00532102 1 0
-0.166681 0.100641 0.0706421 0.00550443 1 0
-0.12131 0.166423 0.0453309 0.00579703 1 0
-0.0658001 0.154509 0.11645 0.00642682 1 0
-0.0572581 0.165887 0.155183 0.0056194 1 0
-0.187662 0.191443 0.00509992 0.00542144 1 0
-0.0944134 0.0383697 0.0973631 0.0068424 1 0
-0.318418 0.111156 0.144915 0.00537137 1 0
-0.286851 0.123289 0.175289 0.00521646 1 0
-0.161594 0.113297 0.134391 0.00755107 1 0
-0.18948 0.156254 0.0181854 0.00526632 1 0
-0.177931 0.155843 0.0650242 0.00562178 1 0
-0.100584 0.0462843 0.173604 0.00525411 1 0
-0.169914 0.139955 0.1501 0.00653871 1 0
-0.263616 0.116388 0.0769037 0.00648812 1 0
-0.31668 0.128179 0.105431 0.00518582 1 0
-0.100492 0.0735251 0.0144766 0.00492659 1 0
-0.132923 0.17577 0.18249 0.00547233 1 0
-0.34078 0.0083426 0.186336 0.00818907 1 0
-0.29936 0.142034 0.0951274 0.00620868 1 0
-0.269367 0.0277092 0.18182 0.00525473 1 0
-0.325954 0.0773823 0.00821037 0.00871461 1 0
-0.385832 0.013629 0.080827 0.0053703 1 0
-0.271175 0.194405 0.138624 0.00629957 1 0
-0.176297 0.1553 0.0249634 0.00597416 1 0
-0.367395 0.155817 0.0259312 0.00650447 1 0
-0.242305 0.045509 0.129572 0.00581364 1 0
-0.170596 0.167333 0.189563 0.00681678 1 0
-0.143312 0.0364464 0.184318 0.0050612 1 0
-0.0838401 0.0723796 0.0732097 0.00542222 1 0
-0.164174 0.164756 0.146673 0.00878473 1 0
-0.343979 0.0134402 0.16495 0.00576487 1 0
-0.296169 0.0723779 0.0760541 0.00519839 1 0
-0.343016 0.131144 0.0620836 0.00527033 1 0
-0.176588 0.144532 0.0358948 0.0059744 1 0
-0.257508 0.0394345 0.133334 0.00567279 1 0
-0.0289996 0.142579 0.113386 0.00555155 1 0
-0.11092 0.182559 0.0602423 0.00608611 1 0
-0.0607705 0.0760141 0.076644 0.00607164 1 0
-0.16066 0.0425497 0.147777 0.00509363 1 0
-0.0715801 0.0833763 0.104049 0.00535127 1 0
-0.15 0.170787 0.157919 0.00570278 1 0
-0.327064 0.164185 0.0820805 0.00526258 1 0
-0.317055 0.15458 0.171205 0.00574498 1 0
-0.347806 0.153938 0.0778674 0.00703853 1 0
-0.293947 0.171232 0.133718 0.00556929 1 0
-0.156684 0.149419 0.111223 0.00512589 1 0
-0.252732 0.131396 0.0968162 0.00549874 1 0
-0.01425 0.0215658 0.0708055 0.00532287 1 0
-0.0763223 0.156665 0.176082 0.00511058 1 0
-0.124446 0.127437 0.039473 0.00674084 1 0
-0.359546 0.118236 0.0804413 0.00511047 1 0
-0.0887918 0.0346958 0.0417275 0.00539093 1 0
-0.177854 0.108789 0.142292 0.00537027 1 0
-0.0968535 0.0707884 0.111793 0.00515489 1 0
-0.302334 0.145584 0.0277289 0.00572278 1 0
-0.3148 0.0091965 0.159974 0.00610153 1 0
-0.0650404 0.077735 0.111273 0.00583579 1 0
-0.35 0.157852 0.167876 0.00587751 1 0
-0.0687925 0.0473 0.0986019 0.00505409 1 0
-0.351393 0.00584318 0.10956 0.00633544 1 0
-0.250902 0.0661362 0.0970678 0.00614813 1 0
-0.199256 0.151144 0.160893 0.00572317 1 0
-0.081642 0.174244 0.0457985 0.00526858 1 0
-0.21976 0.170596 0.149192 0.00673337 1 0
-0.310973 0.131476 0.0090823 0.00770685 1 0
-0.171225 0.0350769 0.148616 0.00492495 1 0
-0.0422254 0.0146582 0.108313 0.00714824 1 0
-0.25391 0.150461 0.103458 0.00533219 1 0
-0.328306 0.142198 0.15002 0.00511059 1 0
-0.382755 0.00781137 0.0192031 0.00505643 1 0
-0.127577 0.145161 0.167248 0.0062849 1 0
-0.0600214 0.130019 0.0487371 0.0049201 1 0
-0.110918 0.0619143 0.156475 0.00676531 1 0
-0.293273 0.158535 0.00771861 0.00518306 1 0
-0.1195 0.145898 0.0623842 0.0059389 1 0
-0.109317 0.0465481 0.165315 0.00531158 1 0
-0.315361 0.10605 0.0312039 0.007184 1 0
-0.0817801 0.153306 0.155881 0.00553843 1 0
-0.0487354 0.0470424 0.0517937 0.005316 1 0
-0.37 0.0372783 0.160129 0.0058242 1 0
-0.0778138 0.0743938 0.0561003 0.00531565 1 0
-0.346521 0.143338 0.049699 0.00569743 1 0
-0.307383 0.11418 0.156362 0.00575875 1 0
-0.277046 0.158534 0.144477 0.00524865 1 0
-0.13 0.0361391 0.180559 0.00578534 1 0
-0.206529 0.0269038 0.0694898 0.00506644 1 0
-0.358316 0.0430172 0.177113 0.00492916 1 0
-0.00654987 0.0696918 0.0295163 0.00614741 1 0
-0.0899527 0.0570072 0.172679 0.00604206 1 0
-0.202863 0.180004 0.154309 0.00552596 1 0
-0.148523 0.177151 0.140333 0.00532119 1 0
-0.13307 0.0630071 0.121302 0.00599325 1 0
-0.0780002 0.0448977 0.160222 0.00513026 1 0
-0.238688 0.0248954 0.150031 0.0050339 1 0
-0.33353 0.0754906 0.0249002 0.00582627 1 0
-0.256402 0.0357335 0.152655 0.00492271 1 0
-0.234174 0.0957673 0.0900119 0.00807268 1 0
-0.192198 0.127593 0.100147 0.00505887 1 0
-0.00825974 0.126987 0.0225671 0.00501073 1 0
-0.13 0.174395 0.159837 0.00492019 1 0
-0.367878 0.149816 0.162361 0.00544743 1 0
-0.274419 0.0773807 0.019342 0.00563982 1 0
-0.262616 0.0135154 0.193305 0.00545901 1 0
-0.306531 0.148053 0.0546813 0.00499252 1 0
-0.0517323 0.176959 0.0189973 0.00510163 1 0
-0.237788 0.0894483 0.0749374 0.00714378 1 0
-0.0893069 0.189382 0.152218 0.00516745 1 0
-0.0323866 0.126165 0.0357112 0.00522841 1 0
-0.314882 0.0714174 0.0349756 0.00500877 1 0
-0.33603 0.1587 0.0660504 0.00571842 1 0
-0.108816 0.151105 0.169317 0.00516 1 0
-0.364708 0.051628 0.167371 0.00626463 1 0
-0.100349 0.108523 0.130208 0.0053807 1 0
-0.170666 0.0892365 0.068069 0.0057705 1 0
-0.0999165 0.142379 0.0745268 0.00561466 1 0
-0.0597816 0.185221 0.027062 0.0055033 1 0
-0.238633 0.179517 0.0175771 0.005709 1 0
-0.107246 0.085266 0.131911 0.00559302 1 0
-0.0861326 0.0451846 0.187098 0.00520339 1 0
-0.0637139 0.192531 0.157391 0.00495527 1 0
-0.267139 0.069563 0.0327794 0.00499077 1 0
-0.0864614 0.191535 0.0401115 0.0049512 1 0
-0.0237336 0.120119 0.0736767 0.00535296 1 0
-0.211425 0.00508826 0.0340575 0.00523903 1 0
-0.0575627 0.0483748 0.151254 0.00577812 1 0
-0.243244 0.0831797 0.102024 0.00528776 1 0
-0.261577 0.0796649 0.114792 0.00550874 1 0
-0.103909 0.0607845 0.0205837 0.00494194 1 0
-0.227431 0.195448 0.0180965 0.00494513 1 0
-0.29699 0.120724 0.180025 0.00600489 1 0
-0.122431 0.0146929 0.166487 0.00531487 1 0
-0.356335 0.0460945 0.0299408 0.00548702 1 0
-0.25 0.165995 0.040633 0.0051361 1 0
-0.245868 0.116582 0.0693421 0.00872676 1 0
-0.215962 0.117685 0.0750916 0.0073751 1 0
-0.0934349 0.0583919 0.0966913 0.00495829 1 0
-0.359399 0.151389 0.059909 0.00510121 1 0
-0.259602 0.143109 0.0989046 0.00502089 1 0
-0.0356892 0.0457494 0.032632 0.00527195 1 0
-0.180834 0.0330256 0.1308 0.0051692 1 0
-0.0631825 0.193286 0.183238 0.00541475 1 0
-0.343546 0.167816 0.0445428 0.00512738 1 0
-0.239506 0.0748118 0.116467 0.00503154 1 0
-0.365153 0.133028 0.0180349 0.0054654 1 0
-0.214868 0.00513958 0.006055 0.00538041 1 0
-0.0779447 0.00933514 0.133271 0.00725011 1 0
-0.37 0.171148 0.0439746 0.00681272 1 0
-0.106816 0.139283 0.119261 0.00843925 1 0
-0.394734 0.0786798 0.128928 0.00549414 1 0
-0.096486 0.153221 0.187963 0.00829006 1 0
-0.17 0.156997 0.0352682 0.00551604 1 0
-0.0556346 0.033688 0.15095 0.0053515 1 0
-0.226596 0.0350846 0.043546 0.00590146 1 0
-0.0777909 0.165915 0.148506 0.00597243 1 0
-0.340627 0.165863 0.150643 0.00521091 1 0
-0.393511 0.111386 0.0591638 0.00504775 1 0
-0.324017 0.170214 0.108676 0.00527019 1 0
-0.278548 0.116772 0.191291 0.00493263 1 0
-0.208638 0.131575 0.0885691 0.00509302 1 0
-0.24394 0.127435 0.0543049 0.00545812 1 0
-0.233082 0.0215367 0.159692 0.00502445 1 0
-0.0802463 0.0952664 0.128303 0.00587113 1 0
-0.35373 0.142419 0.0794802 0.00578166 1 0
-0.332804 0.119654 0.0538804 0.00495888 1 0
-0.14254 0.0523675 0.0987686 0.00593462 1 0
-0.238221 0.0238557 0.0159596 0.005277 1 0
-0.276343 0.155965 0.0355368 0.00552434 1 0
-0.389898 0.166025 0.0423102 0.00628806 1 0
-0.20734 0.0934415 0.107873 0.00881958 1 0
-0.113326 0.0465527 0.155473 0.00531565 1 0
-0.287784 0.152427 0.0201663 0.0053834 1 0
-0.19 0.174441 0.0195105 0.00515748 1 0
-0.0933412 0.0662663 0.0868433 0.0056423 1 0
-0.0535527 0.170707 0.140558 0.00502638 1 0
-0.056345 0.0447936 0.167543 0.00543527 1 0
-0.319714 0.173203 0.0138602 0.00532904 1 0
-0.318993 0.159075 0.14688 0.00515332 1 0
-0.132172 0.073621 0.0140572 0.00541312 1 0
-0.186738 0.0355362 0.152613 0.00527402 1 0
-0.354687 0.148664 0.144741 0.00546032 1 0
-0.143956 0.0873215 0.111676 0.00507434 1 0
-0.33 0.0263341 0.0406133 0.00503598 1 0
-0.239281 0.184703 0.0268573 0.00494154 1 0
-0.317241 0.121443 0.147915 0.0054086 1 0
-0.0155774 0.155562 0.0334974 0.00539621 1 0
-0.0467048 0.164738 0.157204 0.0051868 1 0
-0.0907433 0.128642 0.136023 0.00580039 1 0
-0.226558 0.0050429 0.0680593 0.00546214 1 0
-0.160818 0.101567 0.0900302 0.00542622 1 0
-0.0578329 0.0527018 0.0826996 0.00535188 1 0
-0.190631 0.0849595 0.120363 0.00498892 1 0
-0.0855674 0.0739422 0.0906115 0.00557382 1 0
-0.079236 0.0838242 0.173243 0.00524543 1 0
-0.317096 0.134697 0.0196558 0.00492943 1 0
-0.22179 0.164076 0.0472665 0.005254 1 0
-0.035521 0.024448 0.141908 0.00500036 1 0
-0.121423 0.153796 0.0454467 0.00630561 1 0
-0.243375 0.157456 0.0401662 0.0056814 1 0
-0.216065 0.156221 0.0151389 0.00496757 1 0
-0.288644 0.161478 0.0391054 0.00517417 1 0
-0.305165 0.129215 0.093237 0.00602047 1 0
-0.326572 0.0931579 0.0556699 0.0057005 1 0
-0.142905 0.188128 0.00832213 0.00500349 1 0
-0.303122 0.183253 0.0234914 0.0050918 1 0
-0.0513195 0.131298 0.0421085 0.00585023 1 0
-0.137058 0.141451 0.159999 0.00536984 1 0
-0.257599 0.0941042 0.134262 0.00512517 1 0
-0.19656 0.0472216 0.181399 0.0050835 1 0
-0.133371 0.0855867 0.135726 0.00558747 1 0
-0.297211 0.148201 0.0460843 0.00513294 1 0
-0.27 0.18092 0.166627 0.00518641 1 0
-0.117472 0.0642168 0.142115 0.00572231 1 0
-0.37979 0.152412 0.0390155 0.0053394 1 0
-0.21 0.0393582 0.0384033 0.00606831 1 0
-0.227068 0.0301736 0.0720983 0.00605722 1 0
-0.341191 0.0251477 0.0454776 0.00610949 1 0
-0.364764 0.147722 0.152537 0.00496601 1 0
-0.331248 0.0630576 0.114729 0.00602514 1 0
-0.187503 0.160421 0.160779 0.00526709 1 0
-0.0607547 0.036431 0.111339 0.00504444 1 0
-0.0249341 0.140233 0.059008 0.00500066 1 0
-0.277753 0.0891442 0.0799665 0.00500209 1 0
-0.241637 0.138237 0.158558 0.00502118 1 0
-0.107164 0.192643 0.156784 0.00567281 1 0
-0.121535 0.112179 0.124726 0.00558203 1 0
-0.12679 0.109329 0.188589 0.00564646 1 0
-0.192212 0.116073 0.195068 0.00500692 1 0
-0.176887 0.14295 0.103954 0.00502218 1 0
-0.200576 0.118743 0.0119407 0.00519626 1 0
-0.179161 0.124561 0.0950849 0.00562769 1 0
-0.101414 0.125129 0.0662452 0.00561635 1 0
-0.252938 0.0644826 0.194418 0.00534798 1 0
-0.241464 0.0230279 0.194617 0.00567851 1 0
-0.14585 0.154364 0.0333299 0.0049201 1 0
-0.13 0.162097 0.15985 0.00629393 1 0
-0.374508 0.0444107 0.028399 0.00521957 1 0
-0.163322 0.111215 0.109167 0.00495191 1 0
-0.325752 0.186974 0.117146 0.00507565 1 0
-0.235053 0.112389 0.0399197 0.0050449 1 0
-0.310614 0.134246 0.0798435 0.00715402 1 0
-0.337052 0.175091 0.108946 0.00633609 1 0
-0.258904 0.122522 0.0117143 0.00533354 1 0
-0.119023 0.128715 0.105223 0.0094116 1 0
-0.0621116 0.0146283 0.00623177 0.00653622 1 0
-0.0110308 0.159897 0.123493 0.00517159 1 0
-0.106056 0.161993 0.0567978 0.00669773 1 0
-0.319037 0.128427 0.186393 0.00494375 1 0
-0.0707372 0.138259 0.1358 0.00492486 1 0
-0.0951466 0.0410084 0.194366 0.00577235 1 0
-0.215184 0.0511051 0.0949013 0.00567067 1 0
-0.152345 0.15892 0.128689 0.00738893 1 0
-0.116686 0.0767524 0.0309955 0.00507058 1 0
-0.208835 0.142381 0.170932 0.00500633 1 0
-0.0834147 0.087441 0.0911852 0.00614729 1 0
-0.113349 0.0109536 0.0221073 0.00516509 1 0
-0.00816041 0.155564 0.108356 0.00548171 1 0
-0.0962057 0.0661762 0.15883 0.0061964 1 0
-0.327568 0.116904 0.148792 0.00548791 1 0
-0.164068 0.082941 0.0800338 0.00662652 1 0
-0.244047 0.0375086 0.0431852 0.00521327 1 0
-0.141397 0.176393 0.154309 0.00518206 1 0
-0.178245 0.168578 0.0633801 0.00529997 1 0
-0.160227 0.051309 0.0342094 0.00494937 1 0
-0.170286 0.124796 0.116129 0.00569779 1 0
-0.203984 0.106266 0.184599 0.0049814 1 0
-0.325401 0.161488 0.0918087 0.00496851 1 0
-0.306247 0.00665273 0.089148 0.00540779 1 0
-0.316238 0.015265 0.0931219 0.0055432 1 0
-0.240079 0.145881 0.0296839 0.00507972 1 0
-0.32467 0.132036 0.0980336 0.00576958 1 0
-0.157623 0.132844 0.122606 0.00866231 1 0
-0.169955 0.15008 0.108074 0.00561139 1 0
-0.194824 0.187497 0.0649106 0.00515682 1 0
-0.239326 0.0150519 0.181313 0.00509233 1 0
-0.318191 0.159187 0.0564939 0.00514918 1 0
-0.0792881 0.016866 0.180201 0.00517011 1 0
-0.260323 0.0685592 0.11658 0.00542457 1 0
-0.239286 0.106852 0.0810619 0.00706377 1 0
-0.334289 0.0982624 0.0122789 0.00499393 1 0
-0.226025 0.118987 0.0279885 0.00713664 1 0
-0.344845 0.189664 0.0855549 0.00553181 1 0
-0.253551 0.0766101 0.0827654 0.00506928 1 0
-0.345822 0.188583 0.154599 0.00880407 1 0
-0.0827703 0.0235384 0.0445821 0.00618839 1 0
-0.333985 0.040954 0.0412785 0.00507434 1 0
-0.278721 0.0594964 0.0952742 0.00546562 1 0
-0.019205 0.0449667 0.0239296 0.00500779 1 0
-0.149741 0.117969 0.0247541 0.00497227 1 0
-0.148458 0.0655767 0.112763 0.00500424 1 0
-0.185581 0.113329 0.0951075 0.00636539 1 0
-0.314931 0.172481 0.184316 0.00538804 1 0
-0.151307 0.191604 0.0841679 0.00742714 1 0
-0.215391 0.0778268 0.0526149 0.00509487 1 0
-0.116938 0.0537562 0.0111887 0.00632439 1 0
-0.123704 0.145119 0.105583 0.0063281 1 0
-0.349979 0.189299 0.0221952 0.00504719 1 0
-0.373207 0.0786809 0.0262685 0.00511944 1 0
-0.119987 0.0826799 0.127211 0.00497848 1 0
-0.119432 0.0344412 0.044668 0.00533614 1 0
-0.125114 0.0259125 0.148706 0.00512049 1 0
-0.0491786 0.102561 0.165362 0.00540046 1 0
-0.187451 0.00754914 0.195216 0.00498253 1 0
-0.0993061 0.0379254 0.016514 0.00499695 1 0
-0.134012 0.118456 0.140878 0.00687643 1 0
-0.274864 0.191863 0.165327 0.00519948 1 0
-0.338764 0.184065 0.0196136 0.00661261 1 0
-0.30909 0.155887 0.1521 0.00508481 1 0
-0.281038 0.179616 0.0434301 0.00495262 1 0
-0.284824 0.0573723 0.0853284 0.00514923 1 0
-0.152 0.0776878 0.110776 0.0062575 1 0
-0.352751 0.0402944 0.0504634 0.00495409 1 0
-0.06202 0.039623 0.0415275 0.00515143 1 0
-0.253638 0.0493509 0.152362 0.00593247 1 0
-0.17658 0.177998 0.016944 0.00513947 1 0
-0.315916 0.152921 0.0712626 0.00516184 1 0
-0.222567 0.157874 0.0384202 0.00498412 1 0
-0.178055 0.0404681 0.180863 0.00497207 1 0
-0.0640356 0.136959 0.117493 0.00598804 1 0
-0.269722 0.170038 0.152649 0.00571176 1 0
-0.252802 0.16212 0.0986709 0.00499185 1 0
-0.209844 0.0545797 0.177965 0.00554082 1 0
-0.13029 0.0507768 0.0401549 0.00497506 1 0
-0.366953 0.146216 0.0774128 0.00517086 1 0
-0.371563 0.0342949 0.0441009 0.00496373 1 0
-0.27 0.178611 0.0224494 0.00494871 1 0
-0.26675 0.138843 0.061017 0.00518781 1 0
-0.114366 0.178677 0.155083 0.0057361 1 0
-0.221864 0.0366978 0.0793678 0.00501016 1 0
-0.207612 0.0444648 0.193214 0.00627639 1 0
-0.271776 0.149236 0.0896579 0.00512745 1 0
-0.121741 0.14519 0.0354793 0.00576319 1 0
-0.262546 0.0115259 0.0141798 0.00560513 1 0
-0.300685 0.155898 0.0352115 0.00504962 1 0
-0.174803 0.111176 0.0338426 0.00552079 1 0
-0.104673 0.128424 0.132813 0.00527037 1 0
-0.315444 0.160233 0.189164 0.00572812 1 0
-0.251209 0.129378 0.074338 0.00601193 1 0
-0.190451 0.192302 0.115137 0.00546215 1 0
-0.249307 0.185526 0.00612246 0.00502701 1 0
-0.203934 0.0225659 0.18315 0.0051549 1 0
-0.302241 0.100337 0.134276 0.00542858 1 0
-0.347415 0.0902788 0.136673 0.00554412 1 0
-0.0795558 0.105547 0.122701 0.00494732 1 0
-0.301311 0.0235448 0.154751 0.00513585 1 0
-0.114762 0.0984224 0.124566 0.00605229 1 0
-0.0258172 0.13008 0.0854701 0.00587416 1 0
-0.192188 0.0787302 0.129962 0.00526632 1 0
-0.24031 0.16392 0.0162384 0.00504816 1 0
-0.173767 0.182968 0.0343716 0.00503739 1 0
-0.187492 0.121202 0.145904 0.00543631 1 0
-0.121307 0.0911066 0.163532 0.00760362 1 0
-0.306121 0.039887 0.0508405 0.00586732 1 0
-0.0313969 0.187535 0.116287 0.00526618 1 0
-0.205244 0.0530181 0.00474848 0.00533448 1 0
-0.318555 0.0988328 0.162645 0.00544252 1 0
-0.384049 0.150213 0.18977 0.00506271 1 0
-0.35882 0.0705367 0.0071012 0.00591425 1 0
-0.374241 0.107337 0.150027 0.0050843 1 0
-0.0585332 0.133693 0.194195 0.00493436 1 0
-0.0855199 0.118215 0.184505 0.0055736 1 0
-0.158235 0.138137 0.19419 0.00609273 1 0
-0.122416 0.07642 0.139554 0.0062318 1 0
-0.00479918 0.192651 0.081544 0.00545332 1 0
-0.27634 0.123768 0.072765 0.00597458 1 0
-0.0486482 0.0469649 0.145052 0.00514093 1 0
-0.19 0.0254881 0.159743 0.00501905 1 0
-0.37864 0.120691 0.00630193 0.00533048 1 0
-0.25 0.162741 0.161173 0.0051858 1 0
-0.0566476 0.069124 0.110854 0.00507997 1 0
-0.0116925 0.0406675 0.11733 0.0050623 1 0
-0.315558 0.141102 0.0689741 0.00550287 1 0
-0.180223 0.0123022 0.113459 0.00511602 1 0
-0.273171 0.138287 0.0113356 0.00504578 1 0
-0.26461 0.0518817 0.0868252 0.00543732 1 0
-0.229094 0.159702 0.0881235 0.00508333 1 0
-0.26882 0.0938501 0.113402 0.00500452 1 0
-0.349178 0.0540905 0.119842 0.00543585 1 0
-0.0760557 0.0196645 0.0539054 0.00560242 1 0
-0.242801 0.116421 0.034328 0.00532604 1 0
-0.313923 0.155856 0.0894238 0.00559722 1 0
-0.195836 0.105589 0.190249 0.00495681 1 0
-0.0559161 0.179048 0.149599 0.00500992 1 0
-0.252497 0.141266 0.0333844 0.00527091 1 0
-0.0868643 0.111262 0.116764 0.0049587 1 0
-0.350233 0.0345982 0.092011 0.00497733 1 0
-0.09 0.0412077 0.171813 0.00512945 1 0
-0.155742 0.155361 0.0307641 0.00526499 1 0
-0.15503 0.153165 0.0171135 0.00496063 1 0
-0.275704 0.0855324 0.120332 0.0067578 1 0
-0.102093 0.142054 0.139593 0.00507751 1 0
-0.239529 0.0907062 0.0290642 0.00558211 1 0
-0.206284 0.164971 0.15529 0.00676775 1 0
-0.033003 0.0442111 0.152608 0.00525452 1 0
-0.0275063 0.0428424 0.176527 0.0049388 1 0
-0.35862 0.149303 0.170872 0.00662706 1 0
-0.07 0.0215284 0.0227742 0.00496596 1 0
-0.115516 0.132417 0.0702031 0.00529467 1 0
-0.366673 0.153534 0.191388 0.00523087 1 0
-0.0213304 0.141411 0.194224 0.00541128 1 0
-0.106137 0.148663 0.0220844 0.00548936 1 0
-0.295259 0.0650414 0.0597985 0.0057072 1 0
-0.116732 0.150019 0.00547719 0.0057373 1 0
-0.298718 0.00847115 0.0998693 0.00542173 1 0
-0.103477 0.0980706 0.184761 0.00544981 1 0
-0.380526 0.154388 0.0254918 0.00504119 1 0
-0.270214 0.0877797 0.0223453 0.00543992 1 0
-0.314709 0.146188 0.157199 0.00492299 1 0
-0.0183423 0.184847 0.028443 0.00502048 1 0
-0.0872812 0.109532 0.177678 0.00554028 1 0
-0.104323 0.10894 0.166694 0.00671663 1 0
-0.310986 0.115453 0.0435155 0.0051215 1 0
-0.261494 0.0451588 0.14497 0.00564139 1 0
-0.214052 0.0206624 0.0755293 0.00529037 1 0
-0.106893 0.081013 0.0946225 0.00539707 1 0
-0.298594 0.155871 0.148747 0.00506892 1 0
-0.2684 0.0265539 0.125613 0.00542403 1 0
-0.271924 0.155568 0.128731 0.00627654 1 0
-0.190981 0.0881231 0.1063 0.00609074 1 0
-0.317668 0.162075 0.0759067 0.00525105 1 0
-0.161501 0.138712 0.135025 0.00560976 1 0
-0.275306 0.11263 0.0685627 0.0056332 1 0
-0.224296 0.141754 0.0863415 0.00509894 1 0
-0.162671 0.187559 0.127827 0.00547326 1 0
-0.215382 0.0994359 0.0865149 0.00813389 1 0
-0.175097 0.141131 0.121027 0.00551912 1 0
-0.142482 0.0456714 0.17182 0.00515071 1 0
-0.0871426 0.193219 0.0885682 0.00521211 1 0
-0.1382 0.120316 0.0420877 0.00498942 1 0
-0.182786 0.0783669 0.0664189 0.0067264 1 0
-0.139911 0.136595 0.136115 0.00610351 1 0
-0.153271 0.127392 0.136792 0.00714609 1 0
-0.134296 0.0259236 0.153496 0.00523579 1 0
-0.177675 0.144073 0.138335 0.00625251 1 0
-0.307612 0.0216726 0.0937214 0.00521856 1 0
-0.23 0.179957 0.176114 0.0053792 1 0
-0.190162 0.128682 0.112774 0.00604757 1 0
-0.0763513 0.183133 0.0817355 0.00601091 1 0
-0.202471 0.162916 0.0429757 0.0049886 1 0
-0.059156 0.0903555 0.0147954 0.00529511 1 0
-0.0774759 0.0907105 0.00848086 0.0064719 1 0
-0.104679 0.12904 0.107042 0.00505079 1 0
-0.156928 0.0667936 0.168618 0.00496171 1 0
-0.109435 0.114802 0.0340654 0.00526307 1 0
-0.202898 0.0988148 0.144118 0.00507812 1 0
-0.247038 0.0932036 0.0948382 0.00527664 1 0
-0.25441 0.0812233 0.0986122 0.00498023 1 0
-0.207974 0.0236615 0.0530072 0.00501154 1 0
-0.216544 0.0188464 0.0440366 0.0054604 1 0
-0.347109 0.15848 0.157316 0.00508872 1 0
-0.275296 0.175117 0.141214 0.00660876 1 0
-0.00496755 0.1067 0.119988 0.00513157 1 0
-0.297911 0.040944 0.040722 0.00499771 1 0
-0.159434 0.0956141 0.0793437 0.00573121 1 0
-0.283499 0.191069 0.14746 0.0062051 1 0
-0.0369525 0.147064 0.159164 0.00530303 1 0
-0.22607 0.161718 0.14422 0.00523933 1 0
-0.108679 0.0368119 0.0413441 0.00582451 1 0
-0.160892 0.158663 0.1593 0.00561418 1 0
-0.117058 0.136609 0.0401125 0.0050545 1 0
-0.307358 0.147503 0.0894396 0.00502678 1 0
-0.245616 0.147308 0.0379248 0.0049501 1 0
-0.392621 0.0111457 0.151269 0.00552043 1 0
-0.236105 0.110368 0.0613037 0.00536382 1 0
-0.245302 0.0805854 0.0785322 0.0050188 1 0
-0.0652638 0.0836976 0.083807 0.00535354 1 0
-0.32297 0.0769884 0.0234433 0.00493859 1 0
-0.0138609 0.156448 0.0232398 0.0050417 1 0
-0.360794 0.0355947 0.0448732 0.00591051 1 0
-0.178974 0.0989185 0.137006 0.00588317 1 0
-0.175662 0.152784 0.0430227 0.00496919 1 0
-0.0770389 0.0916468 0.0998569 0.00500567 1 0
-0.130172 0.156197 0.173118 0.0064809 1 0
-0.357743 0.0473451 0.116656 0.00592238 1 0
-0.195747 0.0966667 0.101135 0.00497218 1 0
-0.00530248 0.149842 0.121771 0.00585836 1 0
-0.306338 0.116316 0.00953368 0.00781098 1 0
-0.244299 0.0236894 0.182913 0.00500193 1 0
-0.215106 0.0280928 0.153081 0.00542675 1 0
-0.361435 0.15433 0.070999 0.00655125 1 0
-0.0932397 0.190976 0.141447 0.00640936 1 0
-0.153466 0.0468423 0.0457411 0.00518046 1 0
-0.191824 0.0385899 0.160921 0.00493513 1 0
-0.115354 0.154888 0.0550774 0.00509607 1 0
-0.0862296 0.163467 0.155967 0.00555456 1 0
-0.328104 0.185124 0.128874 0.00534291 1 0
-0.34386 0.153777 0.0544861 0.00600231 1 0
-0.162034 0.132633 0.144444 0.00561354 1 0
-0.360377 0.177149 0.0473056 0.00500698 1 0
-0.236277 0.19483 0.0243622 0.00525474 1 0
-0.118413 0.11688 0.0402421 0.0054435 1 0
-0.305835 0.155644 0.170986 0.00552785 1 0
-0.129544 0.141282 0.114632 0.00510482 1 0
-0.376786 0.018156 0.156706 0.00527047 1 0
-0.147745 0.185436 0.146696 0.00515421 1 0
-0.272266 0.15953 0.0903589 0.00520212 1 0
-0.22723 0.104227 0.0822697 0.00533343 1 0
-0.385255 0.175893 0.0649707 0.00515363 1 0
-0.23857 0.129915 0.0724236 0.00678225 1 0
-0.0351287 0.115887 0.0370834 0.00515281 1 0
-0.23379 0.0768889 0.102961 0.00529133 1 0
-0.311395 0.182793 0.00742186 0.00531421 1 0
-0.35 0.0342712 0.0193649 0.00502089 1 0
-0.163462 0.0941723 0.0980868 0.00582487 1 0
-0.220885 0.0883698 0.0979634 0.0050954 1 0
-0.381986 0.112109 0.0779516 0.00518927 1 0
-0.349757 0.149435 0.160687 0.00492043 1 0
-0.163168 0.149353 0.150924 0.00505876 1 0
-0.320919 0.180746 0.109715 0.00575719 1 0
-0.335675 0.0176508 0.0384298 0.00556491 1 0
-0.126986 0.115883 0.105086 0.00569101 1 0
-0.325076 0.0168704 0.0376704 0.0050906 1 0
-0.145427 0.117636 0.136501 0.00537628 1 0
-0.236591 0.177699 0.00704534 0.00517186 1 0
-0.149068 0.155496 0.116311 0.00586574 1 0
-0.155506 0.124715 0.148408 0.00498151 1 0
-0.170478 0.112538 0.118343 0.00557105 1 0
-0.25196 0.095997 0.0590623 0.00538771 1 0
-0.363179 0.151149 0.00658791 0.00524601 1 0
-0.333096 0.138546 0.101435 0.0054084 1 0
-0.0678159 0.156327 0.170413 0.0051171 1 0
-0.110907 0.0718823 0.0908004 0.00528436 1 0
-0.0145692 0.194365 0.0779644 0.0050922 1 0
-0.0956187 0.0132816 0.129183 0.00509384 1 0
-0.165112 0.161259 0.132262 0.00607402 1 0
-0.209558 0.0908923 0.0945273 0.00494699 1 0
-0.251909 0.00908388 0.014914 0.00533323 1 0
-0.261593 0.118391 0.0209312 0.00511847 1 0
-0.196188 0.0813525 0.0631632 0.00502461 1 0
-0.0258493 0.18743 0.124911 0.00498865 1 0
-0.360149 0.042735 0.161188 0.00548699 1 0
-0.35 0.0403613 0.161944 0.004963 1 0
-0.309527 0.124847 0.154487 0.00528182 1 0
-0.244683 0.101301 0.0655127 0.0055659 1 0
-0.325279 0.155186 0.066466 0.00559949 1 0
-0.226617 0.195266 0.00806071 0.00512528 1 0
-0.169953 0.0999186 0.108535 0.00504286 1 0
-0.137916 0.186472 0.184189 0.0064584 1 0
-0.0972162 0.134765 0.110854 0.00509749 1 0
-0.303273 0.0299333 0.0454584 0.00580123 1 0
-0.279745 0.0864832 0.0184272 0.0049462 1 0
-0.116074 0.0774425 0.154193 0.00638064 1 0
-0.248656 0.176256 0.0414543 0.00524495 1 0
-0.11719 0.0834206 0.0961585 0.00528837 1 0
-0.229539 0.118874 0.0684492 0.00511033 1 0
-0.173123 0.195374 0.111901 0.00501602 1 0
-0.136327 0.0396209 0.195201 0.0051349 1 0
-0.158862 0.147049 0.127001 0.00625819 1 0
-0.0991766 0.0235319 0.0445431 0.00538577 1 0
-0.201657 0.0487937 0.17149 0.00500199 1 0
-0.312662 0.0232805 0.0848822 0.00508772 1 0
-0.35945 0.135313 0.00927028 0.00523795 1 0
-0.104058 0.068495 0.17199 0.00518088 1 0
-0.037409 0.146655 0.174523 0.00493557 1 0
-0.148805 0.153965 0.160534 0.0051623 1 0
-0.328463 0.160841 0.0579076 0.00514102 1 0
-0.0221549 0.157353 0.194761 0.00500206 1 0
-0.322146 0.13593 0.192839 0.00542503 1 0
-0.286297 0.149768 0.00908993 0.00610423 1 0
-0.280655 0.166453 0.133761 0.00601319 1 0
-0.169994 0.185952 0.11743 0.00584323 1 0
-0.132045 0.045301 0.172359 0.00530653 1 0
-0.0777551 0.161616 0.131273 0.00552788 1 0
-0.199873 0.172401 0.0460262 0.00510947 1 0
-0.272171 0.0594096 0.160745 0.00532387 1 0
-0.165046 0.00600323 0.109875 0.00521884 1 0
-0.142337 0.0812874 0.0878795 0.00498215 1 0
-0.0924792 0.0732765 0.150215 0.00557322 1 0
-0.056255 0.16237 0.117474 0.00507203 1 0
-0.175249 0.16002 0.136546 0.00500027 1 0
-0.155973 0.175395 0.149447 0.00493138 1 0
-0.118544 0.152403 0.165247 0.00546414 1 0
-0.343404 0.159514 0.0899321 0.00495426 1 0
-0.128004 0.141325 0.154959 0.0049926 1 0
-0.244713 0.0307325 0.155689 0.00508441 1 0
-0.181902 0.141143 0.112709 0.00522801 1 0
-0.307729 0.138997 0.0192935 0.00507574 1 0
-0.331633 0.0900834 0.00664554 0.00528612 1 0
-0.216766 0.0824641 0.108869 0.00568365 1 0
-0.211694 0.10536 0.101931 0.00519168 1 0
-0.179299 0.0286834 0.154585 0.00503082 1 0
-0.00631072 0.147677 0.0345265 0.00543485 1 0
-0.332261 0.0910282 0.0655754 0.00591895 1 0
-0.326055 0.0639492 0.104676 0.00532498 1 0
-0.104297 0.0712327 0.152123 0.0049905 1 0
-0.337664 0.118813 0.146655 0.00500696 1 0
-0.16796 0.0880324 0.0899783 0.00520396 1 0
-0.151126 0.144095 0.117993 0.0051249 1 0
-0.167151 0.122918 0.127015 0.00578551 1 0
-0.347149 0.181876 0.140827 0.00657185 1 0
-0.353949 0.191197 0.140731 0.00496706 1 0
-0.28435 0.189917 0.0435792 0.00586862 1 0
-0.222213 0.0143369 0.0721368 0.00557794 1 0
-0.279042 0.0945755 0.11326 0.00519755 1 0
-0.210267 0.0545971 0.188648 0.00515023 1 0
-0.317678 0.147377 0.193662 0.00621996 1 0
-0.250707 0.128303 0.0628843 0.00550307 1 0
-0.0200183 0.12112 0.083305 0.00501581 1 0
-0.177239 0.118432 0.146594 0.00520612 1 0
-0.111327 0.0824235 0.166339 0.00591941 1 0
-0.155479 0.146328 0.186009 0.0050508 1 0
-0.0919961 0.140076 0.142581 0.00563671 1 0
-0.269316 0.144037 0.131719 0.00560771 1 0
-0.150699 0.139069 0.133101 0.00536768 1 0
-0.209042 0.108432 0.0794174 0.00496219 1 0
-0.216699 0.112429 0.0861932 0.00492981 1 0
-0.101038 0.133943 0.0973033 0.00644403 1 0
-0.0966487 0.120678 0.107036 0.00523101 1 0
-0.202327 0.02737 0.0603728 0.0049831 1 0
-0.193253 0.0784818 0.0730075 0.00564155 1 0
-0.0868005 0.12796 0.110006 0.00531148 1 0
-0.238097 0.139762 0.0654122 0.00531521 1 0
-0.154478 0.00735788 0.109484 0.00544259 1 0
-0.103283 0.128144 0.0876139 0.0050692 1 0
-0.270558 0.16535 0.0986312 0.00505513 1 0
-0.157723 0.105315 0.0744188 0.00528203 1 0
-0.169762 0.151644 0.135452 0.00507249 1 0
-0.125053 0.149402 0.11914 0.00521138 1 0
-0.268898 0.165729 0.134488 0.00578782 1 0
-0.170716 0.13527 0.138964 0.00498681 1 0
-0.171308 0.127188 0.14667 0.00536928 1 0
-0.277086 0.157709 0.00506657 0.00534523 1 0
-0.1712 0.00837622 0.119438 0.00530001 1 0
-0.355425 0.144238 0.00571681 0.00517774 1 0
-0.166652 0.083414 0.0995339 0.00524142 1 0
-0.119505 0.139675 0.114664 0.00506236 1 0
-0.204039 0.110165 0.106515 0.00494264 1 0
-0.39225 0.188542 0.150983 0.00565893 1 0
-0.148649 0.136782 0.143078 0.00506248 1 0
-0.22953 0.112953 0.0768692 0.0051831 1 0
-0.0694713 0.0871968 0.0941546 0.00546271 1 0
-0.259241 0.149048 0.128677 0.00604828 1 0
-0.170321 0.17059 0.134922 0.00493746 1 0
-0.275538 0.146728 0.00487594 0.00536114 1 0
-0.169881 0.149538 0.125133 0.00519197 1 0
-0.159116 0.151902 0.139595 0.00532538 1 0
-0.165307 0.125014 0.137586 0.00514797 1 0
-0.187238 0.105113 0.140191 0.00492454 1 0
-0.0980079 0.195089 0.151294 0.00527918 1 0
-0.0896188 0.149924 0.139441 0.00497002 1 0
-0.109522 0.139505 0.105479 0.0049669 1 0
-0.168901 0.107365 0.101898 0.00498716 1 0
-0.0467424 0.143688 0.176425 0.00504098 1 0
-0.258472 0.137915 0.130327 0.00523309 1 0
-0.264116 0.173093 0.0996929 0.00507272 1 0
-0.175687 0.0787602 0.0994242 0.00492242 1 0
-0.190441 0.0686624 0.0757399 0.00493151 1 0
diff --git a/src/Tools/padder/resources/padderexe/med2/concrete.med b/src/Tools/padder/resources/padderexe/med2/concrete.med
deleted file mode 100644 (file)
index 3b39b27..0000000
Binary files a/src/Tools/padder/resources/padderexe/med2/concrete.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med2/data.txt b/src/Tools/padder/resources/padderexe/med2/data.txt
deleted file mode 100644 (file)
index f7a6b44..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-concrete.med concrete
-nbSteelFiles 2
-ferrtran.med ferrtran
-ferraill.med ferraill
-output.med
diff --git a/src/Tools/padder/resources/padderexe/med2/ferraill.med b/src/Tools/padder/resources/padderexe/med2/ferraill.med
deleted file mode 100644 (file)
index 79cda88..0000000
Binary files a/src/Tools/padder/resources/padderexe/med2/ferraill.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med2/ferrtran.med b/src/Tools/padder/resources/padderexe/med2/ferrtran.med
deleted file mode 100644 (file)
index 0a86670..0000000
Binary files a/src/Tools/padder/resources/padderexe/med2/ferrtran.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med2/padder.exe b/src/Tools/padder/resources/padderexe/med2/padder.exe
deleted file mode 100755 (executable)
index 8591550..0000000
Binary files a/src/Tools/padder/resources/padderexe/med2/padder.exe and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med3/concrete.med b/src/Tools/padder/resources/padderexe/med3/concrete.med
deleted file mode 100644 (file)
index 3b39b27..0000000
Binary files a/src/Tools/padder/resources/padderexe/med3/concrete.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med3/data.txt b/src/Tools/padder/resources/padderexe/med3/data.txt
deleted file mode 100644 (file)
index 04cabc7..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-concrete.med concrete
-nbSteelbarMesh= 1
-ferraill.med ferraill
-FinalEDMesh.med
diff --git a/src/Tools/padder/resources/padderexe/med3/ferraill.med b/src/Tools/padder/resources/padderexe/med3/ferraill.med
deleted file mode 100644 (file)
index 79cda88..0000000
Binary files a/src/Tools/padder/resources/padderexe/med3/ferraill.med and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/med3/padder.exe b/src/Tools/padder/resources/padderexe/med3/padder.exe
deleted file mode 100755 (executable)
index 3eca741..0000000
Binary files a/src/Tools/padder/resources/padderexe/med3/padder.exe and /dev/null differ
diff --git a/src/Tools/padder/resources/padderexe/padder.sh b/src/Tools/padder/resources/padderexe/padder.sh
deleted file mode 100755 (executable)
index d68b561..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2011-2012  CEA/DEN, 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
-#
-
-# This script emulates the launcher script that will be generated by
-# the padder SALOME component and give as the "job file" to the SALOME
-# launcher to execute the padder job.
-# The script is supposed to be executed where the data are located.
-
-here=$(dirname $0)
-
-# >>> This part should be written by the component
-binpath=$here/padder.exe
-envpath=$here/envPadder.sh
-# <<<
-
-. $envpath
-$binpath $here/data.txt
diff --git a/src/Tools/padder/resources/padderexe/particules.png b/src/Tools/padder/resources/padderexe/particules.png
deleted file mode 100644 (file)
index a1b97ec..0000000
Binary files a/src/Tools/padder/resources/padderexe/particules.png and /dev/null differ
diff --git a/src/Tools/padder/resources/testdata/Makefile.am b/src/Tools/padder/resources/testdata/Makefile.am
new file mode 100644 (file)
index 0000000..77c74fa
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 2011-2012  CEA/DEN, 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
+
+mysalomeresdir=$(salomeresdir)/padderdata
+
+dist_mysalomeres_DATA =  \
+       concrete.med     \
+       ferraill.med     \
+       teststudy.hdf
+
+NOT_USED_FILES = buildparticules.py particules.png
+EXTRA_DIST += $(NOT_USED_FILES)
diff --git a/src/Tools/padder/resources/testdata/buildparticules.py b/src/Tools/padder/resources/testdata/buildparticules.py
new file mode 100755 (executable)
index 0000000..04035f1
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# Copyright (C) 2011-2012  CEA/DEN, 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
+#
+
+import geompy
+import salome
+salome.salome_init()
+theStudy = salome.myStudy
+geompy.init_geom(theStudy)
+
+filename="/home/gboulant/development/projets/salome/SPADDER/spadder/resources/padderexe/REF_spheres.dat.xyz"
+file=open(filename,'rb')
+
+import csv
+datalines = csv.reader(file, delimiter=' ')
+i=0
+for row in datalines:
+    x=float(row[0])
+    y=float(row[1])
+    z=float(row[2])
+    rayon=float(row[3])/2.
+
+    centre = geompy.MakeVertex(x, y, z)
+    particule = geompy.MakeSpherePntR(centre, rayon)
+    geompy.addToStudy( particule, 'p'+str(i) )
+    i+=1
diff --git a/src/Tools/padder/resources/testdata/concrete.med b/src/Tools/padder/resources/testdata/concrete.med
new file mode 100644 (file)
index 0000000..3b39b27
Binary files /dev/null and b/src/Tools/padder/resources/testdata/concrete.med differ
diff --git a/src/Tools/padder/resources/testdata/ferraill.med b/src/Tools/padder/resources/testdata/ferraill.med
new file mode 100644 (file)
index 0000000..79cda88
Binary files /dev/null and b/src/Tools/padder/resources/testdata/ferraill.med differ
diff --git a/src/Tools/padder/resources/testdata/particules.png b/src/Tools/padder/resources/testdata/particules.png
new file mode 100644 (file)
index 0000000..a1b97ec
Binary files /dev/null and b/src/Tools/padder/resources/testdata/particules.png differ
diff --git a/src/Tools/padder/resources/testdata/teststudy.hdf b/src/Tools/padder/resources/testdata/teststudy.hdf
new file mode 100644 (file)
index 0000000..24e6b83
Binary files /dev/null and b/src/Tools/padder/resources/testdata/teststudy.hdf differ
index 911cf5b96a9c534a6f23bbe1fbd3f59d7326d922..f50546b050bfe9d3ec8b19ca8dc27f6f8509ab12 100644 (file)
@@ -31,10 +31,24 @@ def getRootDir():
 
 def getTestDataDir():
     '''
-    This function gives the absolute path to the directory containing
-    the data files for test (realistic med files).
+    This function gives the absolute path to the SMESH directory
+    containing the data files for the padder plugin test (realistic
+    med files).
     '''
-    datadir=os.path.join(getRootDir(),"share/salome/resources/smesh/padderexe")
+    datadir = os.path.join(getRootDir(),"share/salome/resources/smesh/padderdata")
+    return datadir
+
+def getTestPadderDataDir():
+    """
+    This function gives the absolute path to the PADDER directory
+    containing the data files for the padder plugin test. WARNING:
+    this directory is a directory of the external program SpherePadder
+    that is wrapped by the padder plugin. We use the shell variable
+    PADDERHOME (defined by the SALOME environment) to localize this
+    folder. 
+    """
+    PADDERHOME = os.environ['PADDERHOME']
+    datadir = os.path.join(PADDERHOME,"tests")
     return datadir
 
 import MESHJOB # to get the enum constant values
index c9d8ae618cb9bcca0cbde8a6ce73112be00f5b77..a8ea8283bc772e3357b8ee149aaca80d2c3a2a77 100644 (file)
@@ -312,8 +312,8 @@ class InputDialog(GenericDialog):
         This function checks if the data are valid, from the dialog
         window point of view.
         """
-        if self.__nbConcreteMesh < 1:
-            self.checkDataMessage = "You must define at least one CONCRETE mesh"
+        if self.__nbConcreteMesh == 0 and self.__nbSteelbarMesh == 0:
+            self.checkDataMessage = "You must define at least one mesh (CONCRETE or STEELBAR)"
             return False        
         if self.__nbConcreteMesh > 1:
             self.checkDataMessage  = "You define multiple CONCRETE meshes."
@@ -321,9 +321,7 @@ class InputDialog(GenericDialog):
             # just warn the user, but don't block
             QMessageBox.information(self, "Info", self.checkDataMessage)
             return True
-        if self.__nbSteelbarMesh < 1:
-            self.checkDataMessage = "You must define at least one STEELBAR mesh"
-            return False
+
         return True
 
 
index 2cf4c15d89811ddbfb796e309d5cac59ed5f9126..e62d7fdad5d5375c4fcb18c6af6ecfe3060a535c 100644 (file)
@@ -287,12 +287,14 @@ class PluginDialog(QDialog):
         self.__jobid = jobManager.initialize(meshJobParameterList, self.__configId)
         if self.__jobid < 0:
             self.__log("ERR: the job can't be initialized")
+            self.__log("ERR: %s"%jobManager.getLastErrorMessage())
             return
         self.__log("INF: the job has been initialized with jobid = "+str(self.__jobid))
         
         startOk = jobManager.start(self.__jobid)
         if not startOk:
             self.__log("ERR: the job with jobid = "+str(self.__jobid)+" can't be started")
+            self.__log("ERR: %s"%jobManager.getLastErrorMessage())
             return
         self.__log("INF: the job "+str(self.__jobid)+" has been started")
         self.__ui.lblStatusBar.setText("Submission OK")
@@ -334,11 +336,13 @@ class PluginDialog(QDialog):
 
         if state not in end_states:
             self.__log("ERR: jobid = "+str(self.__jobid)+" ended abnormally with state="+str(state))
+            self.__log("ERR: %s"%jobManager.getLastErrorMessage())
             return
 
         meshJobResults = jobManager.finalize(self.__jobid)
         if state == "ERROR":
             self.__log("ERR: jobid = "+str(self.__jobid)+" ended with error: "+meshJobResults.status)
+            self.__log("ERR: %s"%jobManager.getLastErrorMessage())
             return
 
         logsdirname = os.path.join(meshJobResults.results_dirname, "logs")
index 4962a336a05314a23fc54549cb53c177d4295613..e872230a02517946a9f0034961faf5c93ec69eea 100644 (file)
@@ -33,3 +33,9 @@ envpath = /usr/local/share/envPadder.sh
 resname = nepal@nepal
 binpath = /usr/local/bin/padder.exe
 envpath = /usr/local/share/envPadder.sh
+
+[devel]
+resname = localhost
+binpath = /opt/programs/padder/subversion/trunk/padder.exe
+envpath = /opt/programs/padder/subversion/trunk/padder.env
+
index 09a8c09ea18dc63fcda77614c94a1a166a6c2fbf..fadfd403f99f3c05f699f8b8dbafab6fd45893a6 100644 (file)
 #
 
 # This script illustrates the standard use case of the component
-# MeshJobManager from within a SALOME script.
-
+# MeshJobManager from within a SALOME script. It could be used as a
+# unit test of the component.
 
 #
+# =======================================================================
 # Preparing the configuration parameters
+# =======================================================================
 #
+import sys
 import os
+import time
 from salome.smesh.spadder.configreader import ConfigReader, printConfig
 
 configReader = ConfigReader()
@@ -35,15 +39,13 @@ defaultConfig = configReader.getDefaultConfig()
 printConfig(defaultConfig)
 
 from salome.smesh import spadder
-file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
-file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
 
 import salome
 import MESHJOB
 
 #
-# Setup the configuration in the component. When first have to load
-# the catalog of SPADDER components, then load the component
+# Setup the configuration in the component. We first have to load the
+# catalog of SPADDER components, then load the component
 # MeshJobManager, and finally configure this component.
 #
 spadder.loadSpadderCatalog()
@@ -53,27 +55,134 @@ component = salome.lcc.FindOrLoadComponent("FactoryServer","MeshJobManager")
 config = MESHJOB.ConfigParameter(resname=defaultConfig.resname,
                                  binpath=defaultConfig.binpath,
                                  envpath=defaultConfig.envpath)
-component.configure("localhost",config)
+
+configId = "localhost"
+component.configure(configId,config)
+
+
+#
+# =======================================================================
+# Define several datasets for the different use cases
+# =======================================================================
+#
+
+# We define several functions that create each a dataset of med files
+# for testing the component. The test function number corresponds to
+# the number of the test defined in the SpherePadder installation
+# directory.
+
+def test00_parameters():
+    """Test using a concrete mesh and a single steelbar mesh""" 
+    file_concrete=os.path.join(spadder.getTestDataDir(),"concrete.med")
+    file_steelbar=os.path.join(spadder.getTestDataDir(),"ferraill.med")
+
+    meshJobParameterList = []
+    param = MESHJOB.MeshJobParameter(file_name=file_concrete,
+                                     file_type=MESHJOB.MED_CONCRETE,
+                                     group_name="concrete")
+    meshJobParameterList.append(param)
+
+    param = MESHJOB.MeshJobParameter(file_name=file_steelbar,
+                                     file_type=MESHJOB.MED_STEELBAR,
+                                     group_name="steelbar")
+    meshJobParameterList.append(param)
+    return meshJobParameterList
+
+def test01_parameters():
+    """One concrete mesh and two steelbar meshes"""
+    datadir = os.path.join(spadder.getTestPadderDataDir(),"test01")
+    meshJobParameterList = []
+
+    medfile = os.path.join(datadir,"concrete.med")
+    param = MESHJOB.MeshJobParameter(file_name=medfile,
+                                     file_type=MESHJOB.MED_CONCRETE,
+                                     group_name="concrete")
+    meshJobParameterList.append(param)
+    
+    medfile = os.path.join(datadir,"ferraill.med")
+    param = MESHJOB.MeshJobParameter(file_name=medfile,
+                                     file_type=MESHJOB.MED_STEELBAR,
+                                     group_name="ferraill")
+    meshJobParameterList.append(param)
+
+    medfile = os.path.join(datadir,"ferrtran.med")
+    param = MESHJOB.MeshJobParameter(file_name=medfile,
+                                     file_type=MESHJOB.MED_STEELBAR,
+                                     group_name="ferrtran")
+    meshJobParameterList.append(param)
+    
+    return meshJobParameterList
+
+def test02_parameters():
+    """One steelbar mesh only, without a concrete mesh"""
+    datadir = os.path.join(spadder.getTestPadderDataDir(),"test02")
+    meshJobParameterList = []
+
+    medfile = os.path.join(datadir,"cadreef.med")
+    param = MESHJOB.MeshJobParameter(file_name=medfile,
+                                     file_type=MESHJOB.MED_STEELBAR,
+                                     group_name="cadre")
+    meshJobParameterList.append(param)
+    return meshJobParameterList
+
+def test03_parameters():
+    """One concrete mesh only, without a steelbar mesh"""
+    datadir = os.path.join(spadder.getTestPadderDataDir(),"test03")
+    meshJobParameterList = []
+
+    medfile = os.path.join(datadir,"concrete.med")
+    param = MESHJOB.MeshJobParameter(file_name=medfile,
+                                     file_type=MESHJOB.MED_CONCRETE,
+                                     group_name="concrete")
+    meshJobParameterList.append(param)
+    return meshJobParameterList
 
 #
+# =======================================================================
 # Prepare the job parameters and initialize the job
+# =======================================================================
+#
+
+# Choose here the use case
+#meshJobParameterList = test00_parameters()
+#meshJobParameterList = test01_parameters()
+#meshJobParameterList = test02_parameters()
+meshJobParameterList = test03_parameters()
+
 #
-meshJobParameterList = []
-param = MESHJOB.MeshJobParameter(file_name=file_concrete,
-                                 file_type=MESHJOB.MED_CONCRETE,
-                                 group_name="concrete")
-meshJobParameterList.append(param)
+# Prepare, start and follow-up the job
+#
+jobid = component.initialize(meshJobParameterList, configId)
+if jobid<0:
+    msg = component.getLastErrorMessage()
+    print "ERR: %s"%msg
+    sys.exit(1)
+    
+created = False
+nbiter  = 0
+while not created:
+    state = component.getState(jobid)
+    print "MeshJobManager ["+str(nbiter)+"] : state = "+str(state)
+    if state == "CREATED":
+        created = True
+    time.sleep(0.5)
+    nbiter+=1
 
-param = MESHJOB.MeshJobParameter(file_name=file_steelbar,
-                                 file_type=MESHJOB.MED_STEELBAR,
-                                 group_name="steelbar")
-meshJobParameterList.append(param)
-jobid = component.initialize(meshJobParameterList, "localhost")
 
+#
+# =======================================================================
+# Submit the job and start the supervision
+# =======================================================================
 #
 # Start the execution of the job identified by its job id.
 #
 ok=component.start(jobid)
+if not ok:
+    msg = component.getLastErrorMessage()
+    print "ERR: %s"%msg
+    sys.exit(1)
+
+print "job started: %s"%ok
 
 #
 # This part illustrates how you can follow the execution of the job.
@@ -84,7 +193,6 @@ all_states = run_states+end_states;
 
 ended  = False
 nbiter = 0
-import time
 while not ended:
     state = component.getState(jobid)
     print "MeshJobManager ["+str(nbiter)+"] : state = "+str(state)
@@ -95,6 +203,8 @@ while not ended:
         
 if state not in end_states:
     print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)
+    msg = component.getLastErrorMessage()
+    print "ERR: %s"%msg    
 else:
     print "OK:  jobid = "+str(jobid)+" ended with state="+str(state)
     meshJobResults = component.finalize(jobid)