Salome HOME
Merge from V6_main 13/12/2012 BR_KERNEL_REFACTORING V7_1_0_pre
authorvsr <vsr@opencascade.com>
Thu, 13 Dec 2012 11:41:29 +0000 (11:41 +0000)
committervsr <vsr@opencascade.com>
Thu, 13 Dec 2012 11:41:29 +0000 (11:41 +0000)
245 files changed:
configure.ac
doc/salome/gui/SMESH/CMakeLists.txt [new file with mode: 0644]
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/mesh_preferences.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_BasicHypothesis.idl
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/Controls/SMESH_Controls.cxx
src/Controls/SMESH_ControlsDef.hxx
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/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/DriverSTL/DriverSTL_R_SMDS_Mesh.cxx
src/DriverSTL/DriverSTL_W_SMDS_Mesh.cxx
src/DriverSTL/Makefile.am
src/OBJECT/SMESH_PreviewActorsCollection.cxx
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_ProxyMesh.cxx
src/SMESH/SMESH_ProxyMesh.hxx
src/SMESH/SMESH_subMesh.cxx
src/SMESH/SMESH_subMesh.hxx
src/SMESHDS/SMESHDS_Mesh.cxx
src/SMESHDS/SMESHDS_SubMesh.hxx
src/SMESHFiltersSelection/SMESH_Type.h
src/SMESHFiltersSelection/SMESH_TypeFilter.cxx
src/SMESHFiltersSelection/SMESH_TypeFilter.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_AddMeshElementDlg.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_ClippingDlg.cxx
src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx
src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx
src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h
src/SMESHGUI/SMESHGUI_Dialog.cxx
src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx
src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.cxx
src/SMESHGUI/SMESHGUI_GroupDlg.h
src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx
src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.h
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx
src/SMESHGUI/SMESHGUI_Measurements.cxx
src/SMESHGUI/SMESHGUI_MergeDlg.cxx
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx
src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx
src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx
src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx
src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_Selection.cxx
src/SMESHGUI/SMESHGUI_SelectionOp.cxx
src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESH_images.ts
src/SMESHGUI/SMESH_msg_en.ts
src/SMESHGUI/SMESH_msg_fr.ts
src/SMESHUtils/Makefile.am
src/SMESHUtils/SMESH_Octree.cxx
src/SMESHUtils/SMESH_Octree.hxx
src/SMESHUtils/SMESH_OctreeNode.cxx
src/SMESHUtils/SMESH_OctreeNode.hxx
src/SMESHUtils/SMESH_Quadtree.cxx [new file with mode: 0644]
src/SMESHUtils/SMESH_Quadtree.hxx [new file with mode: 0644]
src/SMESHUtils/SMESH_Tree.hxx [new file with mode: 0644]
src/SMESHUtils/SMESH_TypeDefs.hxx
src/SMESH_I/Makefile.am
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/Makefile.am
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx
src/StdMeshers/StdMeshers_FaceSide.cxx
src/StdMeshers/StdMeshers_FaceSide.hxx
src/StdMeshers/StdMeshers_MEFISTO_2D.cxx
src/StdMeshers/StdMeshers_MEFISTO_2D.hxx
src/StdMeshers/StdMeshers_Prism_3D.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx
src/StdMeshers/StdMeshers_Projection_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.hxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshers/StdMeshers_ViscousLayers.cxx
src/StdMeshers/StdMeshers_ViscousLayers.hxx
src/StdMeshers/StdMeshers_ViscousLayers2D.cxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_ViscousLayers2D.hxx [new file with mode: 0644]
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx
src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.h
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
src/StdMeshersGUI/StdMeshers_msg_en.ts
src/StdMeshersGUI/StdMeshers_msg_fr.ts
src/StdMeshers_I/Makefile.am
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx
src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx
src/StdMeshers_I/StdMeshers_i.cxx
src/Tools/Makefile.am
src/Tools/MeshCut/Makefile.am
src/Tools/YamsPlug/Makefile.am [new file with mode: 0644]
src/Tools/YamsPlug/Tolerance.png [new file with mode: 0644]
src/Tools/YamsPlug/ViewText.ui [new file with mode: 0644]
src/Tools/YamsPlug/YamsPlugDialog.ui [new file with mode: 0644]
src/Tools/YamsPlug/doc/Advanced_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/Generics_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/Mandatory_params.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/conf.py [new file with mode: 0644]
src/Tools/YamsPlug/doc/editHypo.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Advanced.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/AppelYams.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Generic.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Simple.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/images/Tolerance.png [new file with mode: 0644]
src/Tools/YamsPlug/doc/index.rst [new file with mode: 0644]
src/Tools/YamsPlug/doc/lct.rst [new file with mode: 0644]
src/Tools/YamsPlug/monViewText.py [new file with mode: 0644]
src/Tools/YamsPlug/monYamsPlugDialog.py [new file with mode: 0644]
src/Tools/YamsPlug/select1.png [new file with mode: 0644]
src/Tools/YamsPlug/yamsplug_plugin.py [new file with mode: 0644]
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
src/Tools/smesh_plugins.py

index 51899e35e1e63be7c097f3ba3b628800d9c9f16f..c45c59f18cbc99bca270feb7652dfb9ae35b8cfd 100644 (file)
@@ -574,6 +574,7 @@ AC_OUTPUT([ \
   src/SMESH_PY/Makefile \
   src/Tools/Makefile \
   src/Tools/MeshCut/Makefile \
+  src/Tools/YamsPlug/Makefile \
   src/Tools/padder/Makefile \
   src/Tools/padder/meshjob/Makefile \
   src/Tools/padder/meshjob/idl/Makefile \
@@ -587,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 \
diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b15f609
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# 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(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+
+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(docdir ${datadir}/doc/salome)
+SET(guidocdir ${docdir}/gui/SMESH)
+
+SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
+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 bin/salome)
+            
+SET(DOC_SMESH_MeshersList StdMeshers)
+SET(f1 "${srcdir}/collect_mesh_methods.py")
+SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
+IF(WINDOWS)
+  STRING(REPLACE "/" "\\" f ${f})
+  STRING(REPLACE "/" "\\" f1 ${f1})
+  STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%
+  @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python\;%PYTHONPATH%
+  @SET PATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PATH%
+  @SET PATH=$ENV{KERNEL_ROOT_DIR}/lib/salome\;%PATH%
+  @SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/bin/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=$ENV{MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=$ENV{MED_ROOT_DIR}/bin/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/bin/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH%
+  @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome\;%PYTHONPATH%
+  @SET SMESH_MeshersList=${DOC_SMESH_MeshersList}
+  ")
+  SET(EXT "bat")
+  SET(CALL_STR "call")
+ELSE(WINDOWS)
+  SET(DOC_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/bin/salome:${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome:${MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages")
+  SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:${PYTHONPATH}
+  export SMESH_MeshersList=${DOC_SMESH_MeshersList}
+  ")
+  SET(EXT "sh")
+  SET(CALL_STR ".")
+ENDIF(WINDOWS)
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
+
+ADD_CUSTOM_TARGET(usr_docs ${PYTHON_EXECUTABLE} ${f} smesh.py ${CMAKE_SOURCE_DIR}/src/SMESH_SWIG/smeshDC.py smesh
+  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'''); 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 a51bbdde45ccb820873ab4457f35723a87a0f0bf..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>
 <li>Select your mesh in the Object Browser or in the 3D viewer.</li>
 
 <li>From the \b Modification menu choose the \b Add item, the
-following associated submenu will appear:</li>
+following associated sub-menu will appear:</li>
 
 \image html image146.png
 
-From this submenu select the type of element which you would like to add to your mesh.
+From this sub-menu select the type of element which you would like to add to your mesh.
 
-\note All dialogs for new node or element adding to the mesh (except for
-the dialog for 0D elements) provide the possibility to automatically add
-a node or element to the specified group or to create the anew using
+\note All dialogs for new node or element adding to the mesh provide
+the possibility to automatically add
+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 the node which will form your 0d element by
-selecting it in the 3D viewer and click the \b Apply or
-<b>Apply and Close</b> button. Your 0D element will be created:
+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 the node which will form your ball element
-either by selecting it in the 3D viewer or by manual entering its ID,
-specify a ball diameter and click the \b Apply or <b>Apply and
-Close</b> button. Your ball element will be created:
+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.
 
 \image html add_ball.png
 
index 61ac4800c1334d0566057e76e651872aed9e965d..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,27 +47,34 @@ 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.</li>
+<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>
 
 \image html viscous_layers_mesh.png A group containing viscous layer prisms.
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 1b1b2f96ce9d56290aa6bb939b995cdce7bc8f1b..d2a6eb41fad65a18e0a72404da2ba8a6e3ec52fc 100644 (file)
@@ -98,6 +98,12 @@ number of segments on each edge</li>
 <li><b>Area precision</b> - allows to adjust input precision of mesh element area.</li>
 <li><b>Volume precision</b> - allows to adjust input precision of mesh element volume.</li>
 </ul>
+<li><b>Preview</b></li>
+<ul>
+<li><b>Sub-shapes preview chunk size</b> - allows to limit the number
+of preview sub-shapes shown in the hypotheses creation dialog boxes,
+for example "Reverse Edges" parameter of \ref number_of_segments_anchor "Number of segments" hypothesis. 
+</ul>
 <li><b>Python Dump</b></li>
 <ul>
 <li><b>Historical python dump</b> checkbox allows switching between 
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 5ec9ebbf0273e389a3dc267098a03f6c1f67ff35..2a08129a09785be9c8e2836ab4bf8e8b17d69217 100644 (file)
@@ -861,6 +861,39 @@ module StdMeshers
     double GetStretchFactor();
   };
 
+  /*!
+   * interface of "Viscous Layers 2D" hypothesis.
+   * This hypothesis specifies parameters of layers of quadrilaterals to build
+   * near mesh boundary. This hypothesis can be used by several 2D algorithms:
+   * Mefisto, Quadrangle (mapping), NETGEN, BLSURF
+   */
+  interface StdMeshers_ViscousLayers2D : SMESH::SMESH_Hypothesis
+  {
+    /*!
+     * Set edges to exclude from treatment
+     */
+    void SetIgnoreEdges(in SMESH::long_array edgeIDs) raises (SALOME::SALOME_Exception);
+    SMESH::long_array GetIgnoreEdges();
+
+    /*!
+     * Set total thickness of layers of prisms
+     */
+    void SetTotalThickness(in double thickness) raises (SALOME::SALOME_Exception);
+    double GetTotalThickness();
+
+    /*!
+     * Set number of layers of prisms
+     */
+    void SetNumberLayers(in short nb) raises (SALOME::SALOME_Exception);
+    short GetNumberLayers();
+
+    /*!
+     * Set factor (>1.0) of growth of layer thickness towards inside of mesh
+     */
+    void SetStretchFactor(in double factor) raises (SALOME::SALOME_Exception);
+    double GetStretchFactor();
+  };
+
   /*!
    * interface of "Body fitting Parameters" hypothesis.
    * This hypothesis specifies 
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 b82d6a441b1a8bd4090379e523cffc169da03044..59f62042116e21e6a38ee96dfb68f6f7ed168838 100644 (file)
                gui-lib="StdMeshersGUI">
   <hypotheses>
 
-    <hypothesis type="SegmentLengthAroundVertex"
-                label-id="Length Near Vertex"
-                icon-id="mesh_hypo_length.png"
-                dim="0"/>
-
-    <hypothesis type="LocalLength"
-                label-id="Local Length"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="MaxLength"
-                label-id="Max Size"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="Arithmetic1D"
-                label-id="Arithmetic 1D"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="FixedPoints1D"
-                label-id="Fixed Points 1D"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="StartEndLength"
-                label-id="Start and End Length"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="NumberOfSegments"
-                label-id="Nb. Segments"
-                icon-id="mesh_hypo_segment.png"
-                dim="1"/>
-
-    <hypothesis type="Deflection1D"
-                label-id="Deflection 1D"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="Propagation"
-                label-id="Propagation of 1D Hyp. on Opposite Edges"
-                icon-id="mesh_hypo_length.png"
-                dim="1"
+    <hypothesis type     ="SegmentLengthAroundVertex"
+                label-id ="Length Near Vertex"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="0"/>
+
+    <hypothesis type     ="LocalLength"
+                label-id ="Local Length"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="MaxLength"
+                label-id ="Max Size"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="Arithmetic1D"
+                label-id ="Arithmetic 1D"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="FixedPoints1D"
+                label-id ="Fixed Points 1D"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="StartEndLength"
+                label-id ="Start and End Length"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="NumberOfSegments"
+                label-id ="Nb. Segments"
+                icon-id  ="mesh_hypo_segment.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="Deflection1D"
+                label-id ="Deflection 1D"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="Propagation"
+                label-id ="Propagation of 1D Hyp. on Opposite Edges"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"
                 auxiliary="true"/>
 
-    <hypothesis type="AutomaticLength"
-                label-id="Automatic Length"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
+    <hypothesis type     ="AutomaticLength"
+                label-id ="Automatic Length"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
 
-    <hypothesis type="LengthFromEdges"
-                label-id="Length From Edges"
-                icon-id="mesh_hypo_length.png"
-                dim="2"/>
+    <hypothesis type     ="LengthFromEdges"
+                label-id ="Length From Edges"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="2"/>
 
-    <hypothesis type="QuadranglePreference"
-                label-id="Quadrangle Preference"
-                icon-id="mesh_algo_quad.png"
+    <hypothesis type     ="QuadranglePreference"
+                label-id ="Quadrangle Preference"
+                icon-id  ="mesh_algo_quad.png"
                 auxiliary="true"
-                dim="2"/>
+                dim      ="2"/>
 
-    <hypothesis type="QuadraticMesh"
-                label-id="Quadratic Mesh"
-                icon-id="mesh_algo_quad.png"
-                dim="1"
+    <hypothesis type     ="QuadraticMesh"
+                label-id ="Quadratic Mesh"
+                icon-id  ="mesh_algo_quad.png"
+                dim      ="1"
                 auxiliary="true"/>                
 
-    <hypothesis type="MaxElementArea"
-                label-id="Max. Element Area"
-                icon-id="mesh_hypo_area.png"
-                dim="2"/>
+    <hypothesis type     ="MaxElementArea"
+                label-id ="Max. Element Area"
+                icon-id  ="mesh_hypo_area.png"
+                dim      ="2"/>
                 
-    <hypothesis type="NotConformAllowed"
-                label-id="Not Conform Mesh Allowed"
-                icon-id="mesh_hypo_length.png"
-                dim="1,2,3"
+    <hypothesis type     ="NotConformAllowed"
+                label-id ="Not Conform Mesh Allowed"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1,2,3"
                 auxiliary="true"/>                
 
-    <hypothesis type="MaxElementVolume"
-                label-id="Max. Element Volume"
-                icon-id="mesh_hypo_volume.png"
-                dim="3"/>
-
-    <hypothesis type="ProjectionSource3D"
-                label-id="Source Shape 3D"
-                icon-id="mesh_hypo_volume.png"
-                dim="3"/>
-
-    <hypothesis type="ProjectionSource2D"
-                label-id="Source Face"
-                icon-id="mesh_hypo_area.png"
-                dim="2"/>
-
-    <hypothesis type="ProjectionSource1D"
-                label-id="Source Edge"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="ImportSource2D"
-                label-id="Source Faces"
-                icon-id="mesh_hypo_area.png"
-                dim="2"/>
-
-    <hypothesis type="ImportSource1D"
-                label-id="Source Edges"
-                icon-id="mesh_hypo_length.png"
-                dim="1"/>
-
-    <hypothesis type="NumberOfLayers"
-                label-id="Number of Layers"
-                icon-id="mesh_hypo_length.png"
-                dim="3"/>
-
-    <hypothesis type="LayerDistribution"
-                label-id="Distribution of Layers"
-                icon-id="mesh_hypo_length.png"
-                dim="3"/>
-
-    <hypothesis type="ViscousLayers"
-                label-id="Viscous Layers"
-                icon-id="mesh_algo_quad.png"
+    <hypothesis type     ="MaxElementVolume"
+                label-id ="Max. Element Volume"
+                icon-id  ="mesh_hypo_volume.png"
+                dim      ="3"/>
+
+    <hypothesis type     ="ProjectionSource3D"
+                label-id ="Source Shape 3D"
+                icon-id  ="mesh_hypo_volume.png"
+                dim      ="3"/>
+
+    <hypothesis type     ="ProjectionSource2D"
+                label-id ="Source Face"
+                icon-id  ="mesh_hypo_area.png"
+                dim      ="2"/>
+
+    <hypothesis type     ="ProjectionSource1D"
+                label-id ="Source Edge"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="ImportSource2D"
+                label-id ="Source Faces"
+                icon-id  ="mesh_hypo_area.png"
+                dim      ="2"/>
+
+    <hypothesis type     ="ImportSource1D"
+                label-id ="Source Edges"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="1"/>
+
+    <hypothesis type     ="NumberOfLayers"
+                label-id ="Number of Layers"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="3"/>
+
+    <hypothesis type     ="LayerDistribution"
+                label-id ="Distribution of Layers"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="3"/>
+
+    <hypothesis type     ="ViscousLayers2D"
+                label-id ="Viscous Layers 2D"
+                icon-id  ="mesh_algo_quad.png"
                 auxiliary="true"
-                dim="3"/>
+                dim      ="2"/>
 
-    <hypothesis type="NumberOfLayers2D"
-                label-id="Number of Layers"
-                icon-id="mesh_hypo_length.png"
-                dim="2"/>
+    <hypothesis type     ="ViscousLayers"
+                label-id ="Viscous Layers"
+                icon-id  ="mesh_algo_quad.png"
+                auxiliary="true"
+                dim      ="3"/>
+
+    <hypothesis type     ="NumberOfLayers2D"
+                label-id ="Number of Layers"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="2"/>
 
-    <hypothesis type="LayerDistribution2D"
-                label-id="Distribution of Layers"
-                icon-id="mesh_hypo_length.png"
-                dim="2"/>
+    <hypothesis type     ="LayerDistribution2D"
+                label-id ="Distribution of Layers"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="2"/>
 
-    <hypothesis type="QuadrangleParams"
-                label-id="Quadrangle Parameters"
-                icon-id="mesh_hypo_length.png"
-                dim="2"/>
+    <hypothesis type     ="QuadrangleParams"
+                label-id ="Quadrangle Parameters"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="2"/>
 
-    <hypothesis type="CartesianParameters3D"
-                label-id="Body Fitting Parameters"
-                icon-id="mesh_hypo_length.png"
-                dim="3"/>
+    <hypothesis type     ="CartesianParameters3D"
+                label-id ="Body Fitting Parameters"
+                icon-id  ="mesh_hypo_length.png"
+                dim      ="3"/>
 
   </hypotheses>
 
   <algorithms>
 
-    <algorithm type="SegmentAroundVertex_0D"
-              label-id="Segments around Vertex"
-              icon-id="mesh_algo_regular.png"
-               hypos="SegmentLengthAroundVertex"
-               output="VERTEX"
-               dim="0"/>
-
-    <algorithm type="Regular_1D"
-              label-id="Wire Discretisation"
-              icon-id="mesh_algo_regular.png"
-               hypos="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
+    <algorithm type     ="SegmentAroundVertex_0D"
+              label-id ="Segments around Vertex"
+              icon-id  ="mesh_algo_regular.png"
+               hypos    ="SegmentLengthAroundVertex"
+               output   ="VERTEX"
+               dim      ="0"/>
+
+    <algorithm type     ="Regular_1D"
+              label-id ="Wire Discretisation"
+              icon-id  ="mesh_algo_regular.png"
+               hypos    ="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
                opt-hypos="Propagation,QuadraticMesh"
-               input="VERTEX"
-               output="EDGE"
-               dim="1">
+               input    ="VERTEX"
+               output   ="EDGE"
+               dim      ="1">
       <python-wrap>
         <algo>Regular_1D=Segment()</algo>
         <hypo>LocalLength=LocalLength(SetLength(1),,SetPrecision(1))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="CompositeSegment_1D"
-              label-id="Composite Side Discretisation"
-              icon-id="mesh_algo_regular.png"
-               hypos="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
+    <algorithm type     ="CompositeSegment_1D"
+              label-id ="Composite Side Discretisation"
+              icon-id  ="mesh_algo_regular.png"
+               hypos    ="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
                opt-hypos="Propagation,QuadraticMesh"
-               input="VERTEX"
-               output="EDGE"
-               dim="1">
+               input    ="VERTEX"
+               output   ="EDGE"
+               dim      ="1">
       <python-wrap>
         <algo>CompositeSegment_1D=Segment(algo=smesh.COMPOSITE)</algo>
         <hypo>LocalLength=LocalLength(SetLength(), ,SetPrecision())</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="MEFISTO_2D"
-              label-id="Triangle (Mefisto)"
-              icon-id="mesh_algo_mefisto.png"
-               hypos="LengthFromEdges,MaxElementArea"
-               input="EDGE"
-               output="TRIA"
-               dim="2">
+    <algorithm type      ="MEFISTO_2D"
+              label-id  ="Triangle (Mefisto)"
+              icon-id   ="mesh_algo_mefisto.png"
+               hypos     ="LengthFromEdges,MaxElementArea"
+               opt-hypos ="ViscousLayers2D"
+               input     ="EDGE"
+               output    ="TRIA"
+               dim       ="2">
       <python-wrap>
         <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>
 
-    <algorithm type="Quadrangle_2D"
-               label-id="Quadrangle (Mapping)"
-               icon-id="mesh_algo_quad.png"
-               hypos="QuadrangleParams"
-               input="EDGE"
-               output="QUAD"
-               dim="2">
+    <algorithm type     ="Quadrangle_2D"
+               label-id ="Quadrangle (Mapping)"
+               icon-id  ="mesh_algo_quad.png"
+               hypos    ="QuadrangleParams"
+               opt-hypos="ViscousLayers2D"
+               input    ="EDGE"
+               output   ="QUAD"
+               dim      ="2">
       <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>
 
-    <algorithm type="Hexa_3D"
-               label-id="Hexahedron (i,j,k)"
-               icon-id="mesh_algo_hexa.png"
-               input="QUAD"
+    <algorithm type     ="Hexa_3D"
+               label-id ="Hexahedron (i,j,k)"
+               icon-id  ="mesh_algo_hexa.png"
+               input    ="QUAD"
               need-geom="false"
                opt-hypos="ViscousLayers"
-               dim="3">
+               dim      ="3">
       <python-wrap>
         <algo>Hexa_3D=Hexahedron(algo=smesh.Hexa)</algo>
         <hypo>ViscousLayers=ViscousLayers(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreFaces())</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Projection_1D"
+    <algorithm type    ="Projection_1D"
                label-id="Projection 1D"
-               icon-id="mesh_algo_regular.png"
-               hypos="ProjectionSource1D"
-               output="EDGE"
-               dim="1">
+               icon-id ="mesh_algo_regular.png"
+               hypos   ="ProjectionSource1D"
+               output  ="EDGE"
+               dim     ="1">
       <python-wrap>
         <algo>Projection_1D=Projection1D()</algo>
         <hypo>ProjectionSource1D=SourceEdge(SetSourceEdge(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Projection_2D"
+    <algorithm type    ="Projection_2D"
                label-id="Projection 2D"
-               icon-id="mesh_algo_quad.png"
-               input="EDGE"
-               hypos="ProjectionSource2D"
-               output="QUAD,TRIA"
-               dim="2">
+               icon-id ="mesh_algo_quad.png"
+               input   ="EDGE"
+               hypos   ="ProjectionSource2D"
+               output  ="QUAD,TRIA"
+               dim     ="2">
       <python-wrap>
         <algo>Projection_2D=Projection2D()</algo>
         <hypo>ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Projection_1D2D"
+    <algorithm type    ="Projection_1D2D"
                label-id="Projection 1D-2D"
-               icon-id="mesh_algo_quad.png"
-               input=""
-               hypos="ProjectionSource2D"
-               output="QUAD,TRIA"
-               dim="2">
+               icon-id ="mesh_algo_quad.png"
+               hypos   ="ProjectionSource2D"
+               output  ="QUAD,TRIA"
+               dim     ="2">
       <python-wrap>
         <algo>Projection_1D2D=Projection1D2D()</algo>
         <hypo>ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2),SetVertexAssociation(3),SetVertexAssociation(4))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Projection_3D"
+    <algorithm type    ="Projection_3D"
                label-id="Projection 3D"
-               icon-id="mesh_algo_hexa.png"
-               hypos="ProjectionSource3D"
-               input="QUAD,TRIA"
-               dim="3">
+               icon-id ="mesh_algo_hexa.png"
+               hypos   ="ProjectionSource3D"
+               input   ="QUAD,TRIA"
+               dim     ="3">
       <python-wrap>
         <algo>Projection_3D=Projection3D()</algo>
         <hypo>ProjectionSource3D=SourceShape3D(SetSource3DShape(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Import_1D"
+    <algorithm type    ="Import_1D"
                label-id="Use Existing 1D Elements"
-               icon-id="mesh_algo_regular.png"
-               hypos="ImportSource1D"
-               output="EDGE"
-               dim="1">
+               icon-id ="mesh_algo_regular.png"
+               hypos   ="ImportSource1D"
+               output  ="EDGE"
+               dim     ="1">
       <python-wrap>
         <algo>Import_1D=UseExisting1DElements()</algo>
         <hypo>ImportSource1D=SourceEdges(SetSourceEdges(),SetCopySourceMesh(1),SetCopySourceMesh(2))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Import_1D2D"
-               label-id="Use Existing 2D Elements"
-               icon-id="mesh_algo_quad.png"
-               hypos="ImportSource2D"
-               output="QUAD,TRIA"
+    <algorithm type             ="Import_1D2D"
+               label-id         ="Use Existing 2D Elements"
+               icon-id          ="mesh_algo_quad.png"
+               hypos            ="ImportSource2D"
+               output           ="QUAD,TRIA"
                support-submeshes="false"
-               dim="2">
+               dim              ="2">
       <python-wrap>
         <algo>Import_1D2D=UseExisting2DElements()</algo>
         <hypo>ImportSource2D=SourceFaces(SetSourceFaces(),SetCopySourceMesh(1),SetCopySourceMesh(2))</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Prism_3D"
+    <algorithm type    ="Prism_3D"
                label-id="3D Extrusion"
-               icon-id="mesh_algo_hexa.png"
-               input="QUAD,TRIA"
-               dim="3">
+               icon-id ="mesh_algo_hexa.png"
+               input   ="QUAD,TRIA"
+               dim     ="3">
       <python-wrap>
         <algo>Prism_3D=Prism()</algo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="RadialPrism_3D"
+    <algorithm type    ="RadialPrism_3D"
                label-id="Radial Prism 3D"
-               icon-id="mesh_algo_hexa.png"
-               hypos="NumberOfLayers, LayerDistribution"
-               input="QUAD,TRIA"
-               dim="3">
+               icon-id ="mesh_algo_hexa.png"
+               hypos   ="NumberOfLayers, LayerDistribution"
+               input   ="QUAD,TRIA"
+               dim     ="3">
       <python-wrap>
         <algo>RadialPrism_3D=Prism('RadialPrism_3D')</algo>
         <hypo>NumberOfLayers=NumberOfLayers(SetNumberOfLayers())</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="UseExisting_1D"
+    <algorithm type    ="UseExisting_1D"
                label-id="Use Existing Edges"
-               icon-id="mesh_algo_regular.png"
-               input="VERTEX"
-               output="EDGE"
-               dim="1">
+               icon-id ="mesh_algo_regular.png"
+               input   ="VERTEX"
+               output  ="EDGE"
+               dim     ="1">
       <python-wrap>
         <algo>UseExisting_1D=UseExistingSegments()</algo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="UseExisting_2D"
+    <algorithm type    ="UseExisting_2D"
                label-id="Use Existing Faces"
-               icon-id="mesh_algo_quad.png"
-               input="EDGE"
-               output="QUAD,TRIA"
-               dim="2">
+               icon-id ="mesh_algo_quad.png"
+               input   ="EDGE"
+               output  ="QUAD,TRIA"
+               dim     ="2">
       <python-wrap>
         <algo>UseExisting_2D=UseExistingFaces()</algo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="RadialQuadrangle_1D2D"
+    <algorithm type    ="RadialQuadrangle_1D2D"
                label-id="Radial Quadrangle 1D2D"
-               icon-id="mesh_algo_quad.png"
-               hypos="NumberOfLayers2D, LayerDistribution2D"
-               input="EDGE"
-               output="QUAD,TRIA"
-               dim="2">
+               icon-id ="mesh_algo_quad.png"
+               hypos   ="NumberOfLayers2D, LayerDistribution2D"
+               input   ="EDGE"
+               output  ="QUAD,TRIA"
+               dim     ="2">
       <python-wrap>
         <algo>RadialQuadrangle_1D2D=Quadrangle(algo=smesh.RADIAL_QUAD)</algo>
         <hypo>NumberOfLayers2D=NumberOfLayers(SetNumberOfLayers())</hypo>
       </python-wrap>
     </algorithm>
 
-    <algorithm type="Cartesian_3D"
-               label-id="Body Fitting"
-               icon-id="mesh_algo_hexa.png"
-               hypos="CartesianParameters3D"
+    <algorithm type             ="Cartesian_3D"
+               label-id         ="Body Fitting"
+               icon-id          ="mesh_algo_hexa.png"
+               hypos            ="CartesianParameters3D"
                support-submeshes="false"
-               dim="3">
+               dim              ="3">
       <python-wrap>
         <algo>Cartesian_3D=BodyFitted()</algo>
       </python-wrap>
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
index 66601f3dfd478a4841ff615dab6905aadd3d2b16..3e44afe282f09f0a2c53c05b5466a46986c87f9d 100644 (file)
                             AUXILIARY METHODS
 */
 
-namespace{
+namespace {
+
+  const double theEps = 1e-100;
+  const double theInf = 1e+100;
 
   inline gp_XYZ gpXYZ(const SMDS_MeshNode* aNode )
   {
@@ -231,7 +234,11 @@ bool NumericalFunctor::GetPoints(const int theId,
   if ( myMesh == 0 )
     return false;
 
-  return GetPoints( myMesh->FindElement( theId ), theRes );
+  const SMDS_MeshElement* anElem = myMesh->FindElement( theId );
+  if ( !anElem || anElem->GetType() != this->GetType() )
+    return false;
+
+  return GetPoints( anElem, theRes );
 }
 
 bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
@@ -239,7 +246,7 @@ bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
 {
   theRes.clear();
 
-  if ( anElem == 0)
+  if ( anElem == 0 )
     return false;
 
   theRes.reserve( anElem->NbNodes() );
@@ -424,66 +431,60 @@ SMDSAbs_ElementType Volume::GetType() const
   return SMDSAbs_Volume;
 }
 
-
+//=======================================================================
 /*
   Class       : MaxElementLength2D
   Description : Functor calculating maximum length of 2D element
 */
+double MaxElementLength2D::GetValue( const TSequenceOfXYZ& P )
+{
+  if(P.size() == 0)
+    return 0.;
+  double aVal = 0;
+  int len = P.size();
+  if( len == 3 ) { // triangles
+    double L1 = getDistance(P( 1 ),P( 2 ));
+    double L2 = getDistance(P( 2 ),P( 3 ));
+    double L3 = getDistance(P( 3 ),P( 1 ));
+    aVal = Max(L1,Max(L2,L3));
+  }
+  else if( len == 4 ) { // quadrangles
+    double L1 = getDistance(P( 1 ),P( 2 ));
+    double L2 = getDistance(P( 2 ),P( 3 ));
+    double L3 = getDistance(P( 3 ),P( 4 ));
+    double L4 = getDistance(P( 4 ),P( 1 ));
+    double D1 = getDistance(P( 1 ),P( 3 ));
+    double D2 = getDistance(P( 2 ),P( 4 ));
+    aVal = Max(Max(Max(L1,L2),Max(L3,L4)),Max(D1,D2));
+  }
+  else if( len == 6 ) { // quadratic triangles
+    double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
+    double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
+    double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 1 ));
+    aVal = Max(L1,Max(L2,L3));
+  }
+  else if( len == 8 || len == 9 ) { // quadratic quadrangles
+    double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
+    double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
+    double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 7 ));
+    double L4 = getDistance(P( 7 ),P( 8 )) + getDistance(P( 8 ),P( 1 ));
+    double D1 = getDistance(P( 1 ),P( 5 ));
+    double D2 = getDistance(P( 3 ),P( 7 ));
+    aVal = Max(Max(Max(L1,L2),Max(L3,L4)),Max(D1,D2));
+  }
+
+  if( myPrecision >= 0 )
+  {
+    double prec = pow( 10., (double)myPrecision );
+    aVal = floor( aVal * prec + 0.5 ) / prec;
+  }
+  return aVal;
+}
 
 double MaxElementLength2D::GetValue( long theElementId )
 {
   TSequenceOfXYZ P;
-  if( GetPoints( theElementId, P ) ) {
-    double aVal = 0;
-    const SMDS_MeshElement* aElem = myMesh->FindElement( theElementId );
-    SMDSAbs_ElementType aType = aElem->GetType();
-    int len = P.size();
-    switch( aType ) {
-    case SMDSAbs_Face:
-      if( len == 3 ) { // triangles
-        double L1 = getDistance(P( 1 ),P( 2 ));
-        double L2 = getDistance(P( 2 ),P( 3 ));
-        double L3 = getDistance(P( 3 ),P( 1 ));
-        aVal = Max(L1,Max(L2,L3));
-        break;
-      }
-      else if( len == 4 ) { // quadrangles
-        double L1 = getDistance(P( 1 ),P( 2 ));
-        double L2 = getDistance(P( 2 ),P( 3 ));
-        double L3 = getDistance(P( 3 ),P( 4 ));
-        double L4 = getDistance(P( 4 ),P( 1 ));
-        double D1 = getDistance(P( 1 ),P( 3 ));
-        double D2 = getDistance(P( 2 ),P( 4 ));
-        aVal = Max(Max(Max(L1,L2),Max(L3,L4)),Max(D1,D2));
-        break;
-      }
-      else if( len == 6 ) { // quadratic triangles
-        double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
-        double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
-        double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 1 ));
-        aVal = Max(L1,Max(L2,L3));
-        break;
-      }
-      else if( len == 8 || len == 9 ) { // quadratic quadrangles
-        double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
-        double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
-        double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 7 ));
-        double L4 = getDistance(P( 7 ),P( 8 )) + getDistance(P( 8 ),P( 1 ));
-        double D1 = getDistance(P( 1 ),P( 5 ));
-        double D2 = getDistance(P( 3 ),P( 7 ));
-        aVal = Max(Max(Max(L1,L2),Max(L3,L4)),Max(D1,D2));
-        break;
-      }
-    }
-
-    if( myPrecision >= 0 )
-    {
-      double prec = pow( 10., (double)myPrecision );
-      aVal = floor( aVal * prec + 0.5 ) / prec;
-    }
-    return aVal;
-  }
-  return 0.;
+  return GetPoints( theElementId, P ) ? GetValue(P) : 0.0;
 }
 
 double MaxElementLength2D::GetBadRate( double Value, int /*nbNodes*/ ) const
@@ -496,6 +497,7 @@ SMDSAbs_ElementType MaxElementLength2D::GetType() const
   return SMDSAbs_Face;
 }
 
+//=======================================================================
 /*
   Class       : MaxElementLength3D
   Description : Functor calculating maximum length of 3D element
@@ -670,7 +672,7 @@ SMDSAbs_ElementType MaxElementLength3D::GetType() const
   return SMDSAbs_Volume;
 }
 
-
+//=======================================================================
 /*
   Class       : MinimumAngle
   Description : Functor for calculation of minimum angle
@@ -761,8 +763,8 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
     double maxLen = Max( aLen[ 0 ], Max( aLen[ 1 ], aLen[ 2 ] ) );
     double half_perimeter = ( aLen[0] + aLen[1] + aLen[2] ) / 2.;
     double anArea = getArea( P( 1 ), P( 2 ), P( 3 ) );
-    if ( anArea <= Precision::Confusion() )
-      return 0.;
+    if ( anArea <= theEps  )
+      return theInf;
     return alfa * maxLen * half_perimeter / anArea;
   }
   else if ( nbNodes == 6 ) { // quadratic triangles
@@ -781,8 +783,8 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
     double maxLen = Max( aLen[ 0 ], Max( aLen[ 1 ], aLen[ 2 ] ) );
     double half_perimeter = ( aLen[0] + aLen[1] + aLen[2] ) / 2.;
     double anArea = getArea( P(1), P(3), P(5) );
-    if ( anArea <= Precision::Confusion() )
-      return 0.;
+    if ( anArea <= theEps )
+      return theInf;
     return alfa * maxLen * half_perimeter / anArea;
   }
   else if( nbNodes == 4 ) { // quadrangle
@@ -825,8 +827,8 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
     double C2 = Min( anArea[ 0 ],
                   Min( anArea[ 1 ],
                     Min( anArea[ 2 ], anArea[ 3 ] ) ) );
-    if ( C2 <= Precision::Confusion() )
-      return 0.;
+    if ( C2 <= theEps )
+      return theInf;
     return alpha * L * C1 / C2;
   }
   else if( nbNodes == 8 || nbNodes == 9 ) { // nbNodes==8 - quadratic quadrangle
@@ -869,8 +871,8 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
     double C2 = Min( anArea[ 0 ],
                   Min( anArea[ 1 ],
                     Min( anArea[ 2 ], anArea[ 3 ] ) ) );
-    if ( C2 <= Precision::Confusion() )
-      return 0.;
+    if ( C2 <= theEps )
+      return theInf;
     return alpha * L * C1 / C2;
   }
   return 0;
@@ -1288,8 +1290,8 @@ double Warping::ComputeA( const gp_XYZ& thePnt1,
   double aLen1 = gp_Pnt( thePnt1 ).Distance( gp_Pnt( thePnt2 ) );
   double aLen2 = gp_Pnt( thePnt2 ).Distance( gp_Pnt( thePnt3 ) );
   double L = Min( aLen1, aLen2 ) * 0.5;
-  if ( L < Precision::Confusion())
-    return 0.;
+  if ( L < theEps )
+    return theInf;
 
   gp_XYZ GI = ( thePnt2 + thePnt1 ) / 2. - theG;
   gp_XYZ GJ = ( thePnt3 + thePnt2 ) / 2. - theG;
@@ -1334,8 +1336,8 @@ double Taper::GetValue( const TSequenceOfXYZ& P )
   double J4 = getArea( P( 3 ), P( 4 ), P( 1 ) ) / 2.;
 
   double JA = 0.25 * ( J1 + J2 + J3 + J4 );
-  if ( JA <= Precision::Confusion() )
-    return 0.;
+  if ( JA <= theEps )
+    return theInf;
 
   double T1 = fabs( ( J1 - JA ) / JA );
   double T2 = fabs( ( J2 - JA ) / JA );
@@ -1401,8 +1403,8 @@ double Skew::GetValue( const TSequenceOfXYZ& P )
       ? 0. : fabs( PI2 - v1.Angle( v2 ) );
 
     //BUG SWP12743
-    if ( A < Precision::Angular() )
-      return 0.;
+    if ( A < theEps )
+      return theInf;
 
     return A * 180. / M_PI;
   }
@@ -2645,43 +2647,7 @@ bool ElemGeomType::IsSatisfy( long theId )
   const SMDSAbs_ElementType anElemType = anElem->GetType();
   if ( myType != SMDSAbs_All && anElemType != myType )
     return false;
-  const int aNbNode = anElem->NbNodes();
-  bool isOk = false;
-  switch( anElemType )
-  {
-  case SMDSAbs_Node:
-    isOk = (myGeomType == SMDSGeom_POINT);
-    break;
-
-  case SMDSAbs_Edge:
-    isOk = (myGeomType == SMDSGeom_EDGE);
-    break;
-
-  case SMDSAbs_Face:
-    if ( myGeomType == SMDSGeom_TRIANGLE )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3));
-    else if ( myGeomType == SMDSGeom_QUADRANGLE )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? ( aNbNode == 8 || aNbNode == 9 ) : aNbNode == 4));
-    else if ( myGeomType == SMDSGeom_POLYGON )
-      isOk = anElem->IsPoly();
-    break;
-
-  case SMDSAbs_Volume:
-    if ( myGeomType == SMDSGeom_TETRA )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4));
-    else if ( myGeomType == SMDSGeom_PYRAMID )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5));
-    else if ( myGeomType == SMDSGeom_PENTA )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6));
-    else if ( myGeomType == SMDSGeom_HEXA )
-      isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? ( aNbNode == 20 || aNbNode == 27 ): aNbNode == 8));
-    else if ( myGeomType == SMDSGeom_HEXAGONAL_PRISM )
-      isOk = (anElem->GetEntityType() == SMDSEntity_Hexagonal_Prism );
-     else if ( myGeomType == SMDSGeom_POLYHEDRA )
-      isOk = anElem->IsPoly();
-    break;
-    default: break;
-  }
+  bool isOk = ( anElem->GetGeomType() == myGeomType );
   return isOk;
 }
 
@@ -3565,7 +3531,6 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
 
 ElementsOnSurface::ElementsOnSurface()
 {
-  myMesh = 0;
   myIds.Clear();
   myType = SMDSAbs_All;
   mySurf.Nullify();
@@ -3575,15 +3540,13 @@ ElementsOnSurface::ElementsOnSurface()
 
 ElementsOnSurface::~ElementsOnSurface()
 {
-  myMesh = 0;
 }
 
 void ElementsOnSurface::SetMesh( const SMDS_Mesh* theMesh )
 {
-  if ( myMesh == theMesh )
-    return;
-  myMesh = theMesh;
-  process();
+  myMeshModifTracer.SetMesh( theMesh );
+  if ( myMeshModifTracer.IsMeshModified())
+    process();
 }
 
 bool ElementsOnSurface::IsSatisfy( long theElementId )
@@ -3638,32 +3601,14 @@ void ElementsOnSurface::process()
   if ( mySurf.IsNull() )
     return;
 
-  if ( myMesh == 0 )
+  if ( !myMeshModifTracer.GetMesh() )
     return;
 
-  if ( myType == SMDSAbs_Face || myType == SMDSAbs_All )
-  {
-    myIds.ReSize( myMesh->NbFaces() );
-    SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
-    for(; anIter->more(); )
-      process( anIter->next() );
-  }
-
-  if ( myType == SMDSAbs_Edge || myType == SMDSAbs_All )
-  {
-    myIds.ReSize( myIds.Extent() + myMesh->NbEdges() );
-    SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
-    for(; anIter->more(); )
-      process( anIter->next() );
-  }
+  myIds.ReSize( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
 
-  if ( myType == SMDSAbs_Node )
-  {
-    myIds.ReSize( myMesh->NbNodes() );
-    SMDS_NodeIteratorPtr anIter = myMesh->nodesIterator();
-    for(; anIter->more(); )
-      process( anIter->next() );
-  }
+  SMDS_ElemIteratorPtr anIter = myMeshModifTracer.GetMesh()->elementsIterator( myType );
+  for(; anIter->more(); )
+    process( anIter->next() );
 }
 
 void ElementsOnSurface::process( const SMDS_MeshElement* theElemPtr )
@@ -3782,26 +3727,7 @@ void ElementsOnShape::SetShape (const TopoDS_Shape&       theShape,
   
   if ( !myMesh ) return;
 
-  switch (myType)
-  {
-  case SMDSAbs_All:
-    myIds.ReSize(myMesh->NbEdges() + myMesh->NbFaces() + myMesh->NbVolumes());
-    break;
-  case SMDSAbs_Node:
-    myIds.ReSize(myMesh->NbNodes());
-    break;
-  case SMDSAbs_Edge:
-    myIds.ReSize(myMesh->NbEdges());
-    break;
-  case SMDSAbs_Face:
-    myIds.ReSize(myMesh->NbFaces());
-    break;
-  case SMDSAbs_Volume:
-    myIds.ReSize(myMesh->NbVolumes());
-    break;
-  default:
-    break;
-  }
+  myIds.ReSize( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
 
   myShapesMap.Clear();
   addShape(myShape);
index 0609c99e79595753e5b3109d572b155b2a5aa9ae..587f5b6d609bf79b6c09b933764aaaf81758953b 100644 (file)
@@ -162,6 +162,7 @@ namespace SMESH{
     class SMESHCONTROLS_EXPORT MaxElementLength2D: public virtual NumericalFunctor{
     public:
       virtual double GetValue( long theElementId );
+      virtual double GetValue( const TSequenceOfXYZ& P );
       virtual double GetBadRate( double Value, int nbNodes ) const;
       virtual SMDSAbs_ElementType GetType() const;
     };
@@ -783,7 +784,7 @@ namespace SMESH{
       bool    isOnSurface( const SMDS_MeshNode* theNode );
 
     private:
-      const SMDS_Mesh*      myMesh;
+      TMeshModifTracer      myMeshModifTracer;
       TColStd_MapOfInteger  myIds;
       SMDSAbs_ElementType   myType;
       //Handle(Geom_Surface)  mySurf;
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 9d1bf4adf7461c8b7c0c4482b1013f5bb82bb133..7ce94744beafead58cbc73c3d9b0bd384d847cf6 100644 (file)
@@ -50,7 +50,9 @@ DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh():
   myDoGroupOfNodes (false),
   myDoGroupOfEdges (false),
   myDoGroupOfFaces (false),
-  myDoGroupOfVolumes (false)
+  myDoGroupOfVolumes (false),
+  myDoGroupOf0DElems(false),
+  myDoGroupOfBalls(false)
 {}
 
 void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, 
index 2687363db2af85b6a697870f5dbec728d56e99d0..e5d260feb6c97bed9ab2f2afa64c5b841a713fdd 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <stdio.h>
 #include <gp_Pnt.hxx>
+#include <Basics_Utils.hxx>
+
 //=======================================================================
 //function : HashCode
 //purpose  : 
@@ -104,6 +106,8 @@ void DriverSTL_R_SMDS_Mesh::SetIsCreateFaces( const bool theIsCreate )
 
 Driver_Mesh::Status DriverSTL_R_SMDS_Mesh::Perform()
 {
+  Kernel_Utils::Localizer loc;
+
   Status aResult = DRS_OK;
 
   TCollection_AsciiString aFileName( (char *)myFile.c_str() );
index e4e27004259164bd0051490ab9138ac52c490eed..cf893a3271c69c732263714392fb3380d383d9cc 100644 (file)
 #include "SMESH_TypeDefs.hxx"
 
 #include <OSD_File.hxx>
-//#include <OSD_FromWhere.hxx>
 #include <OSD_Path.hxx>
 #include <OSD_Protection.hxx>
-//#include <OSD_SingleProtection.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <gp_XYZ.hxx>
+#include <Basics_Utils.hxx>
 
 #include "utilities.h"
 
@@ -59,6 +58,8 @@ void DriverSTL_W_SMDS_Mesh::SetIsAscii( const bool theIsAscii )
 
 Driver_Mesh::Status DriverSTL_W_SMDS_Mesh::Perform()
 {
+  Kernel_Utils::Localizer loc;
+
   Status aResult = DRS_OK;
 
   if ( !myMesh ) {
index 426538639b1ec091582033a0c2c2d3cb72b6b937..709da5f90554452562d7add2ecd1306b1790b422 100644 (file)
@@ -60,6 +60,7 @@ libMeshDriverSTL_la_CPPFLAGS = \
 libMeshDriverSTL_la_LDFLAGS  = \
        ../Driver/libMeshDriver.la \
        ../SMDS/libSMDS.la \
+       $(KERNEL_LDFLAGS) -lSALOMEBasics \
        $(CAS_LDPATH) -lTKernel -lTKSTL -lTKTopAlgo -lTKMesh
 
 STL_Test_CPPFLAGS = \
index b5e145cc5513398218277e5249196c9a52f4e8d9..9fecefb1866a3065443bf54b40f061aaeec9b994 100644 (file)
@@ -77,7 +77,7 @@ bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape,
   myMapOfShapes.Clear();
   myIndices.clear();
   myCurrentChunk = 0;
-  myChunkSize = mgr->integerValue( "SMESH", "preview_actor_chunk_size", 100 );
+  myChunkSize = qMax(1, mgr->integerValue( "SMESH", "preview_actor_chunk_size", 100 ) );
 
   if ( theShape.IsNull() )
     return false;
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 9a821ab80c4e221cc4b32ccaad50fca18265b09d..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++;
@@ -5891,7 +6007,7 @@ SMESH_MeshEditor::generateGroups(const SMESH_SequenceOfElemPtr& nodeGens,
   vector< TOldNewGroup* > orderedOldNewGroups; // in order of old groups
   // group names
   set< string > groupNames;
-  
+
   SMESH_Mesh::GroupIteratorPtr groupIt = GetMesh()->GetGroups();
   if ( !groupIt->more() ) return newGroupIDs;
 
@@ -6103,7 +6219,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
         }
         else if ( tree->NbNodes() ) // put a tree to the treeMap
         {
-          const Bnd_B3d& box = tree->getBox();
+          const Bnd_B3d& box = *tree->getBox();
           double sqDist = thePnt.SquareDistance( 0.5 * ( box.CornerMin() + box.CornerMax() ));
           pair<TDistTreeMap::iterator,bool> it_in = treeMap.insert( make_pair( sqDist, tree ));
           if ( !it_in.second ) // not unique distance to box center
@@ -6115,7 +6231,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
       TDistTreeMap::iterator sqDist_tree = treeMap.begin();
       if ( treeMap.size() > 5 ) {
         SMESH_OctreeNode* closestTree = sqDist_tree->second;
-        const Bnd_B3d& box = closestTree->getBox();
+        const Bnd_B3d& box = *closestTree->getBox();
         double limit = sqrt( sqDist_tree->first ) + sqrt ( box.SquareExtent() );
         sqLimit = limit * limit;
       }
@@ -6200,7 +6316,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
 
   protected:
     ElementBndBoxTree():_size(0) {}
-    SMESH_Octree* allocateOctreeChild() const { return new ElementBndBoxTree; }
+    SMESH_Octree* newChild() const { return new ElementBndBoxTree; }
     void          buildChildrenData();
     Bnd_B3d*      buildRootBox();
   private:
@@ -6222,7 +6338,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
   //================================================================================
 
   ElementBndBoxTree::ElementBndBoxTree(const SMDS_Mesh& mesh, SMDSAbs_ElementType elemType, SMDS_ElemIteratorPtr theElemIt, double tolerance)
-    :SMESH_Octree( new SMESH_Octree::Limit( MaxLevel, /*minSize=*/0. ))
+    :SMESH_Octree( new SMESH_TreeLimit( MaxLevel, /*minSize=*/0. ))
   {
     int nbElems = mesh.GetMeshInfo().NbElements( elemType );
     _elements.reserve( nbElems );
@@ -6273,7 +6389,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
     {
       for (int j = 0; j < 8; j++)
       {
-        if ( !_elements[i]->IsOut( myChildren[j]->getBox() ))
+        if ( !_elements[i]->IsOut( *myChildren[j]->getBox() ))
         {
           _elements[i]->_refCount++;
           ((ElementBndBoxTree*)myChildren[j])->_elements.push_back( _elements[i]);
@@ -6304,7 +6420,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
   void ElementBndBoxTree::getElementsNearPoint( const gp_Pnt&     point,
                                                 TIDSortedElemSet& foundElems)
   {
-    if ( getBox().IsOut( point.XYZ() ))
+    if ( getBox()->IsOut( point.XYZ() ))
       return;
 
     if ( isLeaf() )
@@ -6329,7 +6445,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
   void ElementBndBoxTree::getElementsNearLine( const gp_Ax1&     line,
                                                TIDSortedElemSet& foundElems)
   {
-    if ( getBox().IsOut( line ))
+    if ( getBox()->IsOut( line ))
       return;
 
     if ( isLeaf() )
@@ -6355,7 +6471,7 @@ namespace // Utils used in SMESH_ElementSearcherImpl::FindElementsByPoint()
                                                 const double      radius,
                                                 TIDSortedElemSet& foundElems)
   {
-    if ( getBox().IsOut( center, radius ))
+    if ( getBox()->IsOut( center, radius ))
       return;
 
     if ( isLeaf() )
@@ -6657,7 +6773,7 @@ void SMESH_ElementSearcherImpl::findOuterBoundary(const SMDS_MeshElement* outerF
  * \brief Find elements of given type where the given point is IN or ON.
  *        Returns nb of found elements and elements them-selves.
  *
- * 'ALL' type means elements of any type excluding nodes, balls and 0D elements 
+ * 'ALL' type means elements of any type excluding nodes, balls and 0D elements
  */
 //=======================================================================
 
@@ -6734,13 +6850,13 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
     }
     TIDSortedElemSet suspectElems;
     _ebbTree->getElementsNearPoint( point, suspectElems );
-    
+
     if ( suspectElems.empty() && _ebbTree->maxSize() > 0 )
     {
-      gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox().CornerMin() +
-                                 _ebbTree->getBox().CornerMax() );
+      gp_Pnt boxCenter = 0.5 * ( _ebbTree->getBox()->CornerMin() +
+                                 _ebbTree->getBox()->CornerMax() );
       double radius;
-      if ( _ebbTree->getBox().IsOut( point.XYZ() ))
+      if ( _ebbTree->getBox()->IsOut( point.XYZ() ))
         radius = point.Distance( boxCenter ) - 0.5 * _ebbTree->maxSize();
       else
         radius = _ebbTree->maxSize() / pow( 2., _ebbTree->getHeight()) / 2;
@@ -7242,7 +7358,7 @@ namespace
                       POS_ALL = POS_LEFT | POS_RIGHT | POS_VERTEX };
   struct PointPos
   {
-    PositionName _name; 
+    PositionName _name;
     int          _index; // index of vertex or segment
 
     PointPos( PositionName n, int i=-1 ): _name(n), _index(i) {}
@@ -8156,32 +8272,29 @@ 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(set<const SMDS_MeshElement*> & theElements,
-                                         TListOfListOfElementsID &      theGroupsOfElementsID)
+
+void SMESH_MeshEditor::FindEqualElements(TIDSortedElemSet &        theElements,
+                                         TListOfListOfElementsID & theGroupsOfElementsID)
 {
   myLastCreatedElems.Clear();
   myLastCreatedNodes.Clear();
 
-  typedef set<const SMDS_MeshElement*> TElemsSet;
   typedef map< SortableElement, int > TMapOfNodeSet;
   typedef list<int> TGroupOfElems;
 
-  TElemsSet elems;
   if ( theElements.empty() )
   { // get all elements in the mesh
     SMDS_ElemIteratorPtr eIt = GetMeshDS()->elementsIterator();
     while ( eIt->more() )
-      elems.insert( elems.end(), eIt->next());
+      theElements.insert( theElements.end(), eIt->next());
   }
-  else
-    elems = theElements;
 
   vector< TGroupOfElems > arrayOfGroups;
   TGroupOfElems groupOfElems;
   TMapOfNodeSet mapOfNodeSet;
 
-  TElemsSet::iterator elemIt = elems.begin();
-  for ( int i = 0, j=0; elemIt != elems.end(); ++elemIt, ++j ) {
+  TIDSortedElemSet::iterator elemIt = theElements.begin();
+  for ( int i = 0, j=0; elemIt != theElements.end(); ++elemIt, ++j ) {
     const SMDS_MeshElement* curElem = *elemIt;
     SortableElement SE(curElem);
     int ind = -1;
@@ -8254,8 +8367,8 @@ void SMESH_MeshEditor::MergeElements(TListOfListOfElementsID & theGroupsOfElemen
 
 void SMESH_MeshEditor::MergeEqualElements()
 {
-  set<const SMDS_MeshElement*> aMeshElements; /* empty input -
-                                                 to merge equal elements in the whole mesh */
+  TIDSortedElemSet aMeshElements; /* empty input ==
+                                     to merge equal elements in the whole mesh */
   TListOfListOfElementsID aGroupsOfElementsID;
   FindEqualElements(aMeshElements, aGroupsOfElementsID);
   MergeElements(aGroupsOfElementsID);
@@ -11779,8 +11892,11 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
       groupDS = group->GetGroupDS();
       if ( !groupDS || groupDS->IsEmpty() ) continue;
       std::string grpName = group->GetName();
+      //MESSAGE("grpName=" << grpName);
       if (grpName == groupName)
         break;
+      else
+        groupDS = 0;
     }
 
   bool isNodeGroup = false;
@@ -11794,6 +11910,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius,
 
   if (nodesCoords.size() > 0)
     isNodeCoords = true; // a list o nodes given by their coordinates
+  //MESSAGE("---" << isNodeGroup << " " << isNodeCoords);
 
   // --- define groups to build
 
index 1874360a79fdda983309e0359d18dea871d32e7e..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
@@ -350,15 +357,6 @@ public:
                        SMESH_Mesh*        theTargetMesh=0);
   // Move or copy theElements applying theTrsf to their nodes
 
-
-  typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
-
-  void FindCoincidentNodes (TIDSortedNodeSet &   theNodes,
-                            const double         theTolerance,
-                            TListOfListOfNodes & theGroupsOfNodes);
-  // Return list of group of nodes close to each other within theTolerance.
-  // Search among theNodes or in the whole mesh if theNodes is empty.
-
   /*!
    * \brief Return SMESH_NodeSearcher. The caller is responsible for deleteing it
    */
@@ -369,18 +367,14 @@ public:
    */
   SMESH_ElementSearcher* GetElementSearcher();
   SMESH_ElementSearcher* GetElementSearcher( SMDS_ElemIteratorPtr elemIt );
-  /*!
-   * \brief Return true if the point is IN or ON of the element
-   */
-  static bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
 
-  static double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
+  typedef std::list< std::list< const SMDS_MeshNode* > > TListOfListOfNodes;
 
-  int SimplifyFace (const std::vector<const SMDS_MeshNode *> faceNodes,
-                    std::vector<const SMDS_MeshNode *>&      poly_nodes,
-                    std::vector<int>&                        quantities) const;
-  // Split face, defined by <faceNodes>, into several faces by repeating nodes.
-  // Is used by MergeNodes()
+  void FindCoincidentNodes (TIDSortedNodeSet &   theNodes,
+                            const double         theTolerance,
+                            TListOfListOfNodes & theGroupsOfNodes);
+  // Return list of group of nodes close to each other within theTolerance.
+  // Search among theNodes or in the whole mesh if theNodes is empty.
 
   void MergeNodes (TListOfListOfNodes & theNodeGroups);
   // In each group, the cdr of nodes are substituted by the first one
@@ -388,8 +382,8 @@ public:
 
   typedef std::list< std::list< int > > TListOfListOfElementsID;
 
-  void FindEqualElements(std::set<const SMDS_MeshElement*> & theElements,
-                         TListOfListOfElementsID &           theGroupsOfElementsID);
+  void FindEqualElements(TIDSortedElemSet &        theElements,
+                         TListOfListOfElementsID & theGroupsOfElementsID);
   // Return list of group of elements build on the same nodes.
   // Search among theElements or in the whole mesh if theElements is empty.
 
@@ -400,6 +394,19 @@ public:
   // Remove all but one of elements built on the same nodes.
   // Return nb of successfully merged groups.
 
+  /*!
+   * \brief Return true if the point is IN or ON of the element
+   */
+  static bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
+
+  static double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
+
+  int SimplifyFace (const std::vector<const SMDS_MeshNode *> faceNodes,
+                    std::vector<const SMDS_MeshNode *>&      poly_nodes,
+                    std::vector<int>&                        quantities) const;
+  // Split face, defined by <faceNodes>, into several faces by repeating nodes.
+  // Is used by MergeNodes()
+
   static bool CheckFreeBorderNodes(const SMDS_MeshNode* theNode1,
                                    const SMDS_MeshNode* theNode2,
                                    const SMDS_MeshNode* theNode3 = 0);
index ffca47e6aa48d5dc3a864f35b634f2bbde2707d7..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();
+        }
+      }
     }
   }
 }
@@ -329,7 +341,7 @@ bool SMESH_MesherHelper::IsMedium(const SMDS_MeshNode*      node,
 TopoDS_Shape SMESH_MesherHelper::GetSubShapeByNode(const SMDS_MeshNode* node,
                                                    const SMESHDS_Mesh*  meshDS)
 {
-  int shapeID = node->getshapeId();
+  int shapeID = node ? node->getshapeId() : 0;
   if ( 0 < shapeID && shapeID <= meshDS->MaxShapeIndex() )
     return meshDS->IndexToShape( shapeID );
   else
@@ -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 a4e4f5998b9c114fbddd472efb2cc778772b2290..29c01abd9fbac0e8d1674435b0cf25cf2ea40f8d 100644 (file)
@@ -178,6 +178,21 @@ const SMDS_MeshNode* SMESH_ProxyMesh::GetProxyNode( const SMDS_MeshNode* node )
   return proxy;
 }
 
+//================================================================================
+/*!
+ * \brief Returns number of proxy sub-meshes
+ */
+//================================================================================
+
+int SMESH_ProxyMesh::NbProxySubMeshes() const
+{
+  int nb = 0;
+  for ( size_t i = 0; i < _subMeshes.size(); ++i )
+    nb += bool( _subMeshes[i] );
+
+  return nb;
+}
+
 namespace
 {
   //================================================================================
@@ -329,7 +344,7 @@ SMESH_ProxyMesh::SubMesh* SMESH_ProxyMesh::getProxySubMesh(int index)
   if ( int(_subMeshes.size()) <= index )
     _subMeshes.resize( index+1, 0 );
   if ( !_subMeshes[index] )
-    _subMeshes[index] = new SubMesh( index );
+    _subMeshes[index] = newSubmesh( index );
   return _subMeshes[index];
 }
 
@@ -408,24 +423,24 @@ void SMESH_ProxyMesh::takeTmpElemsInMesh( SMESH_ProxyMesh* proxyMesh )
 
 //================================================================================
 /*!
- * \brief Removes tmp faces from the _mesh
+ * \brief Removes tmp elements from the _mesh
  */
 //================================================================================
 
-void SMESH_ProxyMesh::removeTmpElement( const SMDS_MeshElement* face )
+void SMESH_ProxyMesh::removeTmpElement( const SMDS_MeshElement* elem )
 {
-  if ( face && face->GetID() > 0 )
+  if ( elem && elem->GetID() > 0 )
   {
-    set< const SMDS_MeshElement* >::iterator i =  _elemsInMesh.find( face );
+    set< const SMDS_MeshElement* >::iterator i =  _elemsInMesh.find( elem );
     if ( i != _elemsInMesh.end() )
     {
-      GetMeshDS()->RemoveFreeElement( face, 0 );
+      GetMeshDS()->RemoveFreeElement( elem, 0 );
       _elemsInMesh.erase( i );
     }
   }
   else
   {
-    delete face;
+    delete elem;
   }
 }
 
@@ -435,9 +450,9 @@ void SMESH_ProxyMesh::removeTmpElement( const SMDS_MeshElement* face )
  */
 //================================================================================
 
-void SMESH_ProxyMesh::storeTmpElement( const SMDS_MeshElement* face )
+void SMESH_ProxyMesh::storeTmpElement( const SMDS_MeshElement* elem )
 {
-  _elemsInMesh.insert( face );
+  _elemsInMesh.insert( elem );
 }
 
 //================================================================================
@@ -499,18 +514,20 @@ void SMESH_ProxyMesh::SubMesh::Clear()
 
 //================================================================================
 /*!
- * \brief Return number of elements in a proxy submesh
+ * \brief Return number of elements in a proxy sub-mesh. The method is meaningful
+ *        for a sub-mesh containing tmp faces.
  */
 //================================================================================
 
 int SMESH_ProxyMesh::SubMesh::NbElements() const
 {
-  return _elements.size();
+  return _uvPtStructVec.empty() ? _elements.size() : _uvPtStructVec.size() - 1;
 }
 
 //================================================================================
 /*!
- * \brief Return elements of a proxy submesh
+ * \brief Return elements of a proxy sub-mesh. The method is meaningful
+ *        for a sub-mesh containing tmp faces.
  */
 //================================================================================
 
@@ -520,6 +537,39 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::SubMesh::GetElements() const
     ( new SMDS_ElementVectorIterator( _elements.begin(), _elements.end() ));
 }
 
+//================================================================================
+/*!
+ * \brief Return number of nodes in a proxy sub-mesh. The method is meaningful
+ *        for a sub-mesh containing nodes of 2D viscous layer.
+ */
+//================================================================================
+
+int SMESH_ProxyMesh::SubMesh::NbNodes() const
+{
+  return _uvPtStructVec.size();
+}
+
+//================================================================================
+/*!
+ * \brief Return nodes of a proxy sub-mesh. The method is meaningful
+ *        for a sub-mesh containing nodes of 2D viscous layer.
+ */
+//================================================================================
+
+SMDS_NodeIteratorPtr SMESH_ProxyMesh::SubMesh::GetNodes() const
+{
+  if ( !_uvPtStructVec.empty() )
+    return SMDS_NodeIteratorPtr ( new SMDS_SetIterator
+                                  < SMDS_pNode,
+                                  UVPtStructVec::const_iterator,
+                                  UVPtStruct::NodeAccessor >
+                                  ( _uvPtStructVec.begin(), _uvPtStructVec.end() ));
+
+  return SMDS_NodeIteratorPtr
+    ( new SMDS_SetIterator< SMDS_pNode, std::vector< SMDS_pElement >::const_iterator>
+      ( _elements.begin(), _elements.end() ));
+}
+
 //================================================================================
 /*!
  * \brief Store an element
index faf67734f17e79ac4a29bef20508df608289d810..1c5d93592fc491b4bb9b6df8c6d9d1c225d95362 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "SMDS_MeshElement.hxx"
 #include "SMESHDS_SubMesh.hxx"
+#include "SMESH_TypeDefs.hxx"
 
 #include <TopoDS_Shape.hxx>
 
@@ -40,7 +41,8 @@ class SMESHDS_Mesh;
 class SMESH_Mesh;
 
 /*!
- * \brief Container of mesh faces substituting other faces in the input mesh of 3D algorithm
+ * \brief Container of xD mesh elements substituting other ones in the
+ *        input mesh of an (x+1)D algorithm
  */
 class SMESH_EXPORT SMESH_ProxyMesh
 {
@@ -54,32 +56,35 @@ public:
   /*!
    * \brief Proxy sub-mesh
    */
-  class SubMesh : public SMESHDS_SubMesh
+  class SMESH_EXPORT SubMesh : public SMESHDS_SubMesh
   {
   public:
 
-    const TN2NMap* GetNodeNodeMap() const { return _n2n; }
+    const TN2NMap*       GetNodeNodeMap() const { return _n2n; }
     const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* n ) const;
-    virtual void AddElement(const SMDS_MeshElement * e);
-    virtual int NbElements() const;
+    const UVPtStructVec& GetUVPtStructVec() const { return _uvPtStructVec; }
+    virtual void         AddElement(const SMDS_MeshElement * e);
+    virtual int          NbElements() const;
+    virtual int          NbNodes() const;
     virtual SMDS_ElemIteratorPtr GetElements() const;
-    virtual void Clear();
-    virtual bool Contains(const SMDS_MeshElement * ME) const;
+    virtual SMDS_NodeIteratorPtr GetNodes() const;
+    virtual void         Clear();
+    virtual bool         Contains(const SMDS_MeshElement * ME) const;
 
     template< class ITERATOR >
     void ChangeElements( ITERATOR it, ITERATOR end )
     {
-      // change SubMesh contents without deleting tmp faces
+      // change SubMesh contents without deleting tmp elements
       // for which the caller is responsible
-      _elements.clear();
-      while ( it != end ) _elements.push_back( *it++ );
+      _elements.assign( it, end );
     }
     SubMesh(int index=0):SMESHDS_SubMesh(0,index),_n2n(0) {}
-    ~SubMesh() { Clear(); }
+    virtual ~SubMesh() { Clear(); }
 
-  private:
+  protected:
     std::vector<const SMDS_MeshElement *> _elements;
     TN2NMap*                              _n2n;
+    UVPtStructVec                         _uvPtStructVec; // for SubMesh of EDGE
     friend class SMESH_ProxyMesh;
   };
   //--------------------------------------------------------------------------------
@@ -90,40 +95,45 @@ public:
   SMESH_ProxyMesh(const SMESH_Mesh& mesh) { _mesh = &mesh; }
   virtual ~SMESH_ProxyMesh();
 
-  // Returns the submesh of a face; it can be a proxy sub-mesh
-  const SMESHDS_SubMesh* GetSubMesh(const TopoDS_Shape& face) const;
+  // Returns the submesh of a shape; it can be a proxy sub-mesh
+  const SMESHDS_SubMesh* GetSubMesh(const TopoDS_Shape& shape) const;
 
-  // Returns the proxy sub-mesh of a face; it can be NULL
-  const SubMesh* GetProxySubMesh(const TopoDS_Shape& face) const;
+  // Returns the proxy sub-mesh of a shape; it can be NULL
+  const SubMesh*         GetProxySubMesh(const TopoDS_Shape& shape) const;
 
   // Returns the proxy node of a node; the input node is returned if no proxy exists
-  const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* node ) const;
+  const SMDS_MeshNode*   GetProxyNode( const SMDS_MeshNode* node ) const;
 
-  // Returns iterator on all faces of the mesh taking into account substitutions
+  // Returns number of proxy sub-meshes
+  int                    NbProxySubMeshes() const;
+
+  // Returns iterator on all faces of the mesh taking into account substitutions.
   // To be used in case of mesh without shape
-  SMDS_ElemIteratorPtr GetFaces() const;
+  SMDS_ElemIteratorPtr   GetFaces() const;
 
   // Returns iterator on all faces on the face taking into account substitutions
-  SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const;
+  SMDS_ElemIteratorPtr   GetFaces(const TopoDS_Shape& face) const;
 
   // Return total nb of faces taking into account substitutions
-  int NbFaces() const;
+  int                    NbFaces() const;
 
-  bool IsTemporary(const SMDS_MeshElement* elem ) const;
+  bool                   IsTemporary(const SMDS_MeshElement* elem ) const;
 
 
 
-  const SMESH_Mesh* GetMesh() const { return _mesh; }
+  SMESH_Mesh*            GetMesh() const { return const_cast<SMESH_Mesh*>( _mesh ); }
 
-  SMESHDS_Mesh* GetMeshDS() const;
+  SMESHDS_Mesh*          GetMeshDS() const;
 
   //--------------------------------------------------------------------------------
   // Interface for descendants
  protected:
 
-  void setMesh(const SMESH_Mesh& mesh) { _mesh = &mesh; }
+  void     setMesh(const SMESH_Mesh& mesh) { _mesh = &mesh; }
+
+  int      shapeIndex(const TopoDS_Shape& shape) const;
 
-  int shapeIndex(const TopoDS_Shape& shape) const;
+  virtual SubMesh* newSubmesh(int index=0) const { return new SubMesh(index); }
 
   // returns a proxy sub-mesh; zero index is for the case of mesh w/o shape
   SubMesh* findProxySubMesh(int shapeIndex=0) const;
@@ -135,21 +145,21 @@ public:
   SubMesh* getProxySubMesh(const TopoDS_Shape& shape=TopoDS_Shape());
 
   // move proxy sub-mesh from other proxy mesh to this, returns true if sub-mesh found
-  bool takeProxySubMesh( const TopoDS_Shape& shape, SMESH_ProxyMesh* proxyMesh );
+  bool     takeProxySubMesh( const TopoDS_Shape& shape, SMESH_ProxyMesh* proxyMesh );
 
   // move tmp elements residing the _mesh from other proxy mesh to this
-  void takeTmpElemsInMesh( SMESH_ProxyMesh* proxyMesh );
+  void     takeTmpElemsInMesh( SMESH_ProxyMesh* proxyMesh );
 
-  // removes tmp faces from the _mesh
-  void removeTmpElement( const SMDS_MeshElement* face );
+  // removes tmp element from the _mesh
+  void     removeTmpElement( const SMDS_MeshElement* elem );
 
   // stores tmp element residing the _mesh
-  void storeTmpElement( const SMDS_MeshElement* face );
+  void     storeTmpElement( const SMDS_MeshElement* elem );
 
   // store node-node correspondence
-  void setNode2Node(const SMDS_MeshNode* srcNode,
-                    const SMDS_MeshNode* proxyNode,
-                    const SubMesh*       subMesh);
+  void     setNode2Node(const SMDS_MeshNode* srcNode,
+                        const SMDS_MeshNode* proxyNode,
+                        const SubMesh*       subMesh);
 
   // types of elements needed to implement NbFaces() and GetFaces();
   // if _allowedTypes is empty, only elements from _subMeshes are returned,
index d048ce2b084f84c50483b021403bae449e92e6b0..5fae7685a7366585561cef3adcfe92958d9b9de2 100644 (file)
@@ -149,6 +149,17 @@ SMESHDS_SubMesh * SMESH_subMesh::GetSubMeshDS()
  */
 //=============================================================================
 
+const SMESHDS_SubMesh * SMESH_subMesh::GetSubMeshDS() const
+{
+  return ((SMESH_subMesh*) this )->GetSubMeshDS();
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
 SMESHDS_SubMesh* SMESH_subMesh::CreateSubMeshDS()
 {
   if ( !GetSubMeshDS() ) {
@@ -1122,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;
 }
@@ -1258,7 +1269,19 @@ static void cleanSubMesh( SMESH_subMesh * subMesh )
 
 bool SMESH_subMesh::ComputeStateEngine(int event)
 {
-  _computeError.reset();
+  switch ( event ) {
+  case MODIF_ALGO_STATE:
+  case COMPUTE:
+    //case COMPUTE_CANCELED:
+  case CLEAN:
+    //case SUBMESH_COMPUTED:
+    //case SUBMESH_RESTORED:
+    //case SUBMESH_LOADED:
+    //case MESH_ENTITY_REMOVED:
+    //case CHECK_COMPUTE_STATE:
+    _computeError.reset(); break;
+  default:;
+  }
 
   //MESSAGE("SMESH_subMesh::ComputeStateEngine");
   //SCRUTE(_computeState);
@@ -2066,7 +2089,8 @@ void SMESH_subMesh::SetEventListener(EventListener*     listener,
  */
 //================================================================================
 
-void SMESH_subMesh::setEventListener(EventListener* listener, EventListenerData* data)
+void SMESH_subMesh::setEventListener(EventListener*     listener,
+                                     EventListenerData* data)
 {
   map< EventListener*, EventListenerData* >::iterator l_d =
     _eventListeners.find( listener );
@@ -2076,8 +2100,21 @@ void SMESH_subMesh::setEventListener(EventListener* listener, EventListenerData*
       delete curData;
     l_d->second = data;
   }
-  else 
+  else
+  {
+    for ( l_d = _eventListeners.begin(); l_d != _eventListeners.end(); ++l_d )
+      if ( listener->GetName() == l_d->first->GetName() )
+      {
+        EventListenerData* curData = l_d->second;
+        if ( curData && curData != data && curData->IsDeletable() )
+          delete curData;
+        if ( l_d->first->IsDeletable() )
+          delete l_d->first;
+        _eventListeners.erase( l_d );
+        break;
+      }
     _eventListeners.insert( make_pair( listener, data ));
+  }
 }
 
 //================================================================================
@@ -2128,16 +2165,18 @@ void SMESH_subMesh::notifyListenersOnEvent( const int         event,
                                             SMESH_Hypothesis* hyp)
 {
   map< EventListener*, EventListenerData* >::iterator l_d = _eventListeners.begin();
-  for ( ; l_d != _eventListeners.end(); ++l_d )
+  for ( ; l_d != _eventListeners.end();  )
   {
-    std::pair< EventListener*, EventListenerData* > li_da = *l_d; /* copy to enable removal
-                                                                     of a listener from
-                                                                     _eventListeners by
-                                                                     its ProcessEvent() */
+    std::pair< EventListener*, EventListenerData* > li_da = *l_d++; /* copy to enable removal
+                                                                       of a listener from
+                                                                       _eventListeners by
+                                                                       its ProcessEvent() */
     if ( li_da.first->myBusySM.insert( this ).second )
     {
+      const size_t nbListenersBefore = _eventListeners.size();
       li_da.first->ProcessEvent( event, eventType, this, li_da.second, hyp );
-      li_da.first->myBusySM.erase( this );
+      if ( nbListenersBefore == _eventListeners.size() )
+        li_da.first->myBusySM.erase( this ); // a listener hopefully not removed
     }
   }
 }
@@ -2164,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 057f532a7d3fb13db34481171e98c15bcd048f39..43b8349f1b032c0dae5bf02b7e49d1b9ebb7d4c8 100644 (file)
@@ -59,15 +59,18 @@ typedef boost::shared_ptr< SMDS_Iterator<SMESH_subMesh*> > SMESH_subMeshIterator
 class SMESH_EXPORT SMESH_subMesh
 {
  public:
-  SMESH_subMesh(int Id, SMESH_Mesh * father, SMESHDS_Mesh * meshDS,
+  SMESH_subMesh(int                  Id,
+                SMESH_Mesh *         father,
+                SMESHDS_Mesh *       meshDS,
                 const TopoDS_Shape & aSubShape);
   virtual ~ SMESH_subMesh();
 
-  int GetId() const;
+  int GetId() const; // == meshDS->ShapeToIndex( aSubShape )
 
   SMESH_Mesh* GetFather() { return _father; }
   
-  SMESHDS_SubMesh * GetSubMeshDS();
+  SMESHDS_SubMesh *       GetSubMeshDS();
+  const SMESHDS_SubMesh * GetSubMeshDS() const;
 
   SMESHDS_SubMesh* CreateSubMeshDS();
   // Explicit SMESHDS_SubMesh creation method, required for persistence mechanism
@@ -206,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);
 
@@ -272,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
@@ -311,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 a42b9acc0f07774b9dacb630d577ffd27d18ad30..75e83be01d99bd8e12cf38120c31072de4e81e38 100644 (file)
@@ -823,7 +823,7 @@ static void removeFromContainers (map<int,SMESHDS_SubMesh*>&     theSubMeshes,
   // Element should belong to only one sub-mesh
   if ( !theSubMeshes.empty() )
   {
-    SMESHDS_Mesh* mesh = theSubMeshes.begin()->second->getParent();
+    SMESHDS_Mesh* mesh = theSubMeshes.begin()->second->GetParent();
     list<const SMDS_MeshElement *>::iterator elIt = theElems.begin();
     if ( isNode ) {
       for ( ; elIt != theElems.end(); ++elIt )
index 049c73e33b19e0cd4e4482fcff7d1f713b400770..a9feca8b32cfe314ce9470c465753210bf1d2ce7 100644 (file)
@@ -73,7 +73,8 @@ class SMESHDS_EXPORT SMESHDS_SubMesh
   int getSize();
   void compactList();
 
-  inline SMESHDS_Mesh *getParent() {return myParent; };
+  SMESHDS_Mesh *GetParent()   { return myParent; }
+  int           GetID() const { return myIndex; }
 
  private:
   SMESHDS_Mesh * myParent;
index e29c918a07dced71801bf5fa6631161bfda1e1d6..ceb41923e66016c75113eceed54f157847986c81 100644 (file)
  #define SMESHFILTERSSELECTION_EXPORT
 #endif
 
-enum MeshObjectType {
-  HYPOTHESIS,
-  ALGORITHM,
-  MESH,
-  SUBMESH,
-  MESHorSUBMESH,
-  SUBMESH_VERTEX,
-  SUBMESH_EDGE,
-  SUBMESH_FACE,
-  SUBMESH_SOLID,
-  SUBMESH_COMPOUND,
-  GROUP,
-  GROUP_NODE,
-  GROUP_EDGE,
-  GROUP_FACE,
-  GROUP_VOLUME,
-  GROUP_0D,
-  GROUP_BALL,
-  COMPONENT,
-  IDSOURCE
+namespace SMESH{
+  enum MeshObjectType {
+    HYPOTHESIS,
+    ALGORITHM,
+    MESH,
+    SUBMESH,
+    MESHorSUBMESH,
+    SUBMESH_VERTEX,
+    SUBMESH_EDGE,
+    SUBMESH_FACE,
+    SUBMESH_SOLID,
+    SUBMESH_COMPOUND,
+    GROUP,
+    GROUP_NODE,
+    GROUP_EDGE,
+    GROUP_FACE,
+    GROUP_VOLUME,
+    GROUP_0D,
+    GROUP_BALL,
+    COMPONENT,
+    IDSOURCE
+  };
 };
-
 #endif
index e9b83166c25add1125c1dc2b2298a27f95208d5d..9df3ed861ebc83c2ecb3bda035f79302d1c7308f 100644 (file)
@@ -30,7 +30,7 @@
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SMESH_Gen)
 
-SMESH_TypeFilter::SMESH_TypeFilter (MeshObjectType theType)
+SMESH_TypeFilter::SMESH_TypeFilter (SMESH::MeshObjectType theType)
 {
   myType = theType;
 }
@@ -88,7 +88,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
 
     switch (myType)
     {
-      case HYPOTHESIS:
+      case SMESH::HYPOTHESIS:
         {
           if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
             // hypo definition
@@ -101,7 +101,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
             Ok = true;
           break;
         }
-      case ALGORITHM:
+      case SMESH::ALGORITHM:
         {
           if      (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
             // algo definition
@@ -114,13 +114,13 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
             Ok = true;
           break;
         }
-      case MESH:
+      case SMESH::MESH:
         {
           if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
             Ok = true;
           break;
         }
-      case SUBMESH:
+      case SMESH::SUBMESH:
         {
           // see SMESH_Gen_i.cxx for tag numbers
           if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
@@ -128,7 +128,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
             Ok = true;
           break;
         }
-      case MESHorSUBMESH:
+      case SMESH::MESHorSUBMESH:
         {
           if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
             Ok = true; // mesh
@@ -137,82 +137,82 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
             Ok = true;
           break;
         }
-      case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
+      case SMESH::SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
             Ok = true;
           break;
         }
-      case SUBMESH_EDGE:
+      case SMESH::SUBMESH_EDGE:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
             Ok = true;
           break;
         }
-      case SUBMESH_FACE:
+      case SMESH::SUBMESH_FACE:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
             Ok = true;
           break;
         }
-      case SUBMESH_SOLID:
+      case SMESH::SUBMESH_SOLID:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
             Ok = true;
           break;
         }
-      case SUBMESH_COMPOUND:
+      case SMESH::SUBMESH_COMPOUND:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
             Ok = true;
           break;
         }
-      case GROUP:
+      case SMESH::GROUP:
         {
           if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
             Ok = true;
           break;
         }
-      case GROUP_NODE:
+      case SMESH::GROUP_NODE:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_NodeGroups))
             Ok = true;
           break;
         }
-      case GROUP_EDGE:
+      case SMESH::GROUP_EDGE:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_EdgeGroups))
             Ok = true;
           break;
         }
-      case GROUP_FACE:
+      case SMESH::GROUP_FACE:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_FaceGroups))
             Ok = true;
           break;
         }
-      case GROUP_VOLUME:
+      case SMESH::GROUP_VOLUME:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_VolumeGroups))
             Ok = true;
           break;
         }
-      case GROUP_0D:
+      case SMESH::GROUP_0D:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_0DElementsGroups))
             Ok = true;
           break;
         }
-      case GROUP_BALL:
+      case SMESH::GROUP_BALL:
         {
           if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_BallElementsGroups))
             Ok = true;
           break;
         }
-      case IDSOURCE:
+      case SMESH::IDSOURCE:
         {
-          Ok = ( SMESH_TypeFilter(MESHorSUBMESH).isOk( theDataOwner ) ||
-                 SMESH_TypeFilter(GROUP)        .isOk( theDataOwner ));
+          Ok = ( SMESH_TypeFilter(SMESH::MESHorSUBMESH).isOk( theDataOwner ) ||
+                 SMESH_TypeFilter(SMESH::GROUP)        .isOk( theDataOwner ));
           break;
         }
     }
@@ -220,7 +220,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const
   return Ok;
 }
 
-MeshObjectType SMESH_TypeFilter::type() const
+SMESH::MeshObjectType SMESH_TypeFilter::type() const
 {
   return myType;
 }
index 0821917d03a2404d97adb84b99d23f192ea65b46..7daf9b11913c337b776291984c3b0478b447697c 100644 (file)
@@ -34,14 +34,14 @@ class SUIT_DataOwner;
 class SMESHFILTERSSELECTION_EXPORT SMESH_TypeFilter : public SUIT_SelectionFilter
 {
 public:
-  SMESH_TypeFilter (MeshObjectType theType);
+  SMESH_TypeFilter (SMESH::MeshObjectType theType);
   ~SMESH_TypeFilter();
 
   virtual bool isOk (const SUIT_DataOwner*) const;
-  MeshObjectType type() const;
+  SMESH::MeshObjectType type() const;
 
 protected:
-  MeshObjectType myType;
+  SMESH::MeshObjectType myType;
 };
 
 #endif
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 28df5fdbfaef7aff9e6b8a3a28e154cd365ad5f6..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 <NCollection_DataMap.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{
     std::string myExtension;
 
     if ( theCommandID == 113 ) {
-      filter.append( QObject::tr( "MED_FILES_FILTER" ) + " (*.med)" );
+      filter.append( QObject::tr( "MED_FILES_FILTER" ) + " (*.*med)" );
       filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" );
     }
     else if ( theCommandID == 112 ) {
       filter.append( QObject::tr( "DAT_FILES_FILTER" ) + " (*.dat)" );
     }
     else if ( theCommandID == 115 ) {
-      filter.append( QObject::tr( "STL_ASCII_FILES_FILTER" ) + " (*.stl)" );
+      filter.append( QObject::tr( "STL_FILES_FILTER" ) + " (*.stl)" );
     }
     else if ( theCommandID == 116 ) {
       filter.append( QObject::tr( "CGNS_FILES_FILTER" ) + " (*.cgns)" );
     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){
 
 
   bool CheckOIType(const Handle(SALOME_InteractiveObject) & theIO,
-                   MeshObjectType                           theType,
+                   SMESH::MeshObjectType                           theType,
                    const QString                            theInTypeName,
                    QString &                                theOutTypeName)
   {
 
     QString aTypeName;
     if (
-        CheckOIType ( theIO, HYPOTHESIS,    "Hypothesis", aTypeName ) ||
-        CheckOIType ( theIO, ALGORITHM,     "Algorithm",  aTypeName ) ||
-        CheckOIType ( theIO, MESH,          "Mesh",       aTypeName ) ||
-        CheckOIType ( theIO, SUBMESH,       "SubMesh",    aTypeName ) ||
-        CheckOIType ( theIO, GROUP,         "Group",      aTypeName )
+        CheckOIType ( theIO, SMESH::HYPOTHESIS,    "Hypothesis", aTypeName ) ||
+        CheckOIType ( theIO, SMESH::ALGORITHM,     "Algorithm",  aTypeName ) ||
+        CheckOIType ( theIO, SMESH::MESH,          "Mesh",       aTypeName ) ||
+        CheckOIType ( theIO, SMESH::SUBMESH,       "SubMesh",    aTypeName ) ||
+        CheckOIType ( theIO, SMESH::GROUP,         "Group",      aTypeName )
         )
       return aTypeName;
 
@@ -3018,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:
@@ -3036,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(),
@@ -3293,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;
@@ -3493,12 +3549,8 @@ void SMESHGUI::createPopupItem( const int id,
                                 const QString& theRule,
                                 const int pId )
 {
-  int parentId = pId;
-  if( pId!=-1 )
-    parentId = popupMgr()->actionId( action( pId ) );
-
   if( !popupMgr()->contains( popupMgr()->actionId( action( id ) ) ) )
-    popupMgr()->insert( action( id ), parentId, 0 );
+    popupMgr()->insert( action( id ), pId, 0 );
 
   QString lc = "$";        // VSR : instead of QtxPopupSelection::defEquality();
   QString dc = "selcount"; // VSR : insetad of QtxPopupSelection::defSelCountParam()
@@ -3549,13 +3601,13 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction(  142, "CGNS");
   createSMESHAction(  144, "SAUV");
   createSMESHAction(  146, "GMF" );
-  createSMESHAction(  124, "EXPORT_DAT" );
-  createSMESHAction(  125, "EXPORT_MED" );
-  createSMESHAction(  126, "EXPORT_UNV" );
-  createSMESHAction(  141, "EXPORT_STL" );
-  createSMESHAction(  143, "EXPORT_CGNS");
-  createSMESHAction(  145, "EXPORT_SAUV");
-  createSMESHAction(  147, "EXPORT_GMF" );
+  createSMESHAction(  124, "DAT" );
+  createSMESHAction(  125, "MED" );
+  createSMESHAction(  126, "UNV" );
+  createSMESHAction(  141, "STL" );
+  createSMESHAction(  143, "CGNS");
+  createSMESHAction(  145, "SAUV");
+  createSMESHAction(  147, "GMF" );
   createSMESHAction(  150, "FILE_INFO" );
   createSMESHAction(   33, "DELETE",          "ICON_DELETE", Qt::Key_Delete );
   createSMESHAction( 5105, "SEL_FILTER_LIB" );
@@ -3647,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" );
@@ -3809,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 );
@@ -3934,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 );
@@ -3999,17 +4054,17 @@ void SMESHGUI::initialize( CAM_Application* app )
   QString OB = "'ObjectBrowser'",
           View = "'" + SVTK_Viewer::Type() + "'",
           pat = "'%1'",
-          mesh    = pat.arg( SMESHGUI_Selection::typeName( MESH ) ),
-          group   = pat.arg( SMESHGUI_Selection::typeName( GROUP ) ),
-          hypo    = pat.arg( SMESHGUI_Selection::typeName( HYPOTHESIS ) ),
-          algo    = pat.arg( SMESHGUI_Selection::typeName( ALGORITHM ) ),
+          mesh    = pat.arg( SMESHGUI_Selection::typeName( SMESH::MESH ) ),
+          group   = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
+          hypo    = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
+          algo    = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
           elems   = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH_VERTEX ) ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH_EDGE ) ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH_FACE ) ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH_SOLID ) ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH_COMPOUND ) ).
-                       arg( SMESHGUI_Selection::typeName( SUBMESH ) ),
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_FACE ) ).
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_SOLID ) ).
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_COMPOUND ) ).
+                       arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH ) ),
           subMesh = elems,
           mesh_part = mesh + " " + subMesh + " " + group,
           mesh_group = mesh + " " + group,
@@ -4065,14 +4120,16 @@ void SMESHGUI::initialize( CAM_Application* app )
   QString multiple_non_empty = QString( " && %1>0 && numberOfNodes>0" ).arg( dc );
   QString only_one_2D        = only_one_non_empty + " && dim>1";
 
-  createPopupItem( 125, OB, mesh_group, multiple_non_empty );   // EXPORT_MED
-  createPopupItem( 126, OB, mesh_group, only_one_non_empty );   // EXPORT_UNV
-  createPopupItem( 141, OB, mesh_group, only_one_2D );          // EXPORT_STL
+  int anId = popupMgr()->insert( tr( "MEN_EXPORT" ), -1, -1 );        // EXPORT submenu
+  createPopupItem( 125, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_MED
+  createPopupItem( 126, OB, mesh_group, only_one_non_empty, anId );   // EXPORT_UNV
+  createPopupItem( 141, OB, mesh_group, only_one_2D, anId );          // EXPORT_STL
 #ifdef WITH_CGNS
-  createPopupItem( 143, OB, mesh_group, multiple_non_empty );   // EXPORT_CGNS
+  createPopupItem( 143, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_CGNS
 #endif
-  createPopupItem( 145, OB, mesh_group, multiple_non_empty );   // EXPORT_SAUV
-  createPopupItem( 147, OB, mesh_group, multiple_non_empty );   // EXPORT_GMF
+  createPopupItem( 145, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_SAUV
+  createPopupItem( 147, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_GMF
+  createPopupItem( 124, OB, mesh_group, multiple_non_empty, anId );   // EXPORT_DAT
   createPopupItem(  33, OB, mesh_part + " " + hyp_alg );        // DELETE
   createPopupItem( 813, OB, group );                            // DEL_GROUP with contents
   popupMgr()->insert( separator(), -1, 0 );
@@ -4092,7 +4149,6 @@ void SMESHGUI::initialize( CAM_Application* app )
   createPopupItem( 1137, OB + " " + View, mesh, "&& isAutoColor" );       // DISABLE_AUTO_COLOR
   popupMgr()->insert( separator(), -1, 0 );
 
-  int anId;
   QString aClient = QString( "%1client in {%2}" ).arg( lc ).arg( "'VTKViewer'" );
   QString aType = QString( "%1type in {%2}" ).arg( lc );
   aType = aType.arg( mesh_part );
@@ -4752,7 +4808,7 @@ void SMESHGUI::createPreferences()
   int previewGroup = addPreference( tr( "SMESH_PREF_GROUP_PREVIEW" ), genTab );
   setPreferenceProperty( previewGroup, "columns", 2 );
   int chunkSize = addPreference( tr( "PREF_PREVIEW_CHUNK_SIZE" ), previewGroup, LightApp_Preferences::IntSpin, "SMESH", "preview_actor_chunk_size" );
-  setPreferenceProperty( chunkSize, "min",  0 );
+  setPreferenceProperty( chunkSize, "min",  1 );
   setPreferenceProperty( chunkSize, "max",  1000 );
   setPreferenceProperty( chunkSize, "step", 50 );
 
@@ -5131,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;
   }
@@ -5215,9 +5274,9 @@ SALOMEDS::Color SMESHGUI::getUniqueColor( const QList<SALOMEDS::Color>& theReser
   return aSColor;
 }
 
-const char gSeparator = '_'; // character used to separate parameter names
-const char gDigitsSep = ':'; // character used to separate numeric parameter values (color = r:g:b)
-const char gPathSep   = '|'; // character used to separate paths
+const char* gSeparator = "_"; // character used to separate parameter names
+const char* gDigitsSep = ":"; // character used to separate numeric parameter values (color = r:g:b)
+const char* gPathSep   = "|"; // character used to separate paths
 
 /*!
  * \brief Store visual parameters
@@ -5227,6 +5286,9 @@ const char gPathSep   = '|'; // character used to separate paths
  */
 void SMESHGUI::storeVisualParameters (int savePoint)
 {
+  // localizing
+  Kernel_Utils::Localizer loc;
+
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(application()->activeStudy());
   if (!appStudy || !appStudy->studyDS())
     return;
@@ -5367,9 +5429,11 @@ void SMESHGUI::storeVisualParameters (int savePoint)
 
                   // Displayed entities
                   unsigned int aMode = aSmeshActor->GetEntityMode();
-                  bool isE = aMode & SMESH_Actor::eEdges;
-                  bool isF = aMode & SMESH_Actor::eFaces;
-                  bool isV = aMode & SMESH_Actor::eVolumes;
+                  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;
 
                   QString modeStr ("e");
                   modeStr += gDigitsSep; modeStr += QString::number(isE);
@@ -5377,53 +5441,92 @@ void SMESHGUI::storeVisualParameters (int savePoint)
                   modeStr += gDigitsSep; modeStr += QString::number(isF);
                   modeStr += gDigitsSep; modeStr += "v";
                   modeStr += gDigitsSep; modeStr += QString::number(isV);
+                  modeStr += gDigitsSep; modeStr += "0d";
+                  modeStr += gDigitsSep; modeStr += QString::number(is0d);
+                  modeStr += gDigitsSep; modeStr += "b";
+                  modeStr += gDigitsSep; modeStr += QString::number(isB);
 
                   param = vtkParam + "Entities";
                   ip->setParameter(entry, param, modeStr.toLatin1().data());
 
-                  // Colors (surface:edge:)
+                  // Colors
                   vtkFloatingPointType r, g, b;
                   int delta;
 
                   aSmeshActor->GetSufaceColor(r, g, b, delta);
-                  QString colorStr ("surface");
-                  colorStr += gDigitsSep; colorStr += QString::number(r);
-                  colorStr += gDigitsSep; colorStr += QString::number(g);
-                  colorStr += gDigitsSep; colorStr += QString::number(b);
-
-                  colorStr += gDigitsSep; colorStr += "backsurface";
-                  colorStr += gDigitsSep; colorStr += QString::number(delta);
-
+                  QStringList colorStr;
+                  colorStr << "surface";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
+
+                  colorStr << "backsurface";
+                  colorStr << QString::number(delta);
+
+                  aSmeshActor->GetVolumeColor(r, g, b, delta);
+                  colorStr << "volume";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
+                  colorStr << QString::number(delta);
 
                   aSmeshActor->GetEdgeColor(r, g, b);
-                  colorStr += gDigitsSep; colorStr += "edge";
-                  colorStr += gDigitsSep; colorStr += QString::number(r);
-                  colorStr += gDigitsSep; colorStr += QString::number(g);
-                  colorStr += gDigitsSep; colorStr += QString::number(b);
+                  colorStr << "edge";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
 
                   aSmeshActor->GetNodeColor(r, g, b);
-                  colorStr += gDigitsSep; colorStr += "node";
-                  colorStr += gDigitsSep; colorStr += QString::number(r);
-                  colorStr += gDigitsSep; colorStr += QString::number(g);
-                  colorStr += gDigitsSep; colorStr += QString::number(b);
+                  colorStr << "node";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
 
                   aSmeshActor->GetOutlineColor(r, g, b);
-                  colorStr += gDigitsSep; colorStr += "outline";
-                  colorStr += gDigitsSep; colorStr += QString::number(r);
-                  colorStr += gDigitsSep; colorStr += QString::number(g);
-                  colorStr += gDigitsSep; colorStr += QString::number(b);
+                  colorStr << "outline";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
+
+                  aSmeshActor->Get0DColor(r, g, b);
+                  colorStr << "elem0d";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
+
+                  aSmeshActor->GetBallColor(r, g, b);
+                  colorStr << "ball";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
+
+                  aSmeshActor->GetFacesOrientationColor(r, g, b);
+                  colorStr << "orientation";
+                  colorStr << QString::number(r);
+                  colorStr << QString::number(g);
+                  colorStr << QString::number(b);
 
                   param = vtkParam + "Colors";
-                  ip->setParameter(entry, param, colorStr.toLatin1().data());
-
-                  // Sizes of lines and points
-                  QString sizeStr ("line");
-                  sizeStr += gDigitsSep; sizeStr += QString::number((int)aSmeshActor->GetLineWidth());
-                  sizeStr += gDigitsSep; sizeStr += "shrink";
-                  sizeStr += gDigitsSep; sizeStr += QString::number(aSmeshActor->GetShrinkFactor());
+                  ip->setParameter(entry, param, qPrintable(colorStr.join(gDigitsSep)));
+
+                  // Sizes
+                  QStringList sizeStr;
+                  sizeStr << "line";
+                  sizeStr << QString::number((int)aSmeshActor->GetLineWidth());
+                  sizeStr << "outline";
+                  sizeStr << QString::number((int)aSmeshActor->GetOutlineWidth());
+                  sizeStr << "elem0d";
+                  sizeStr << QString::number((int)aSmeshActor->Get0DSize());
+                  sizeStr << "ball";
+                  sizeStr << QString::number((int)aSmeshActor->GetBallSize());
+                  sizeStr << "shrink";
+                  sizeStr << QString::number(aSmeshActor->GetShrinkFactor());
+                  sizeStr << "orientation";
+                  sizeStr << QString::number(aSmeshActor->GetFacesOrientationScale());
+                  sizeStr << QString::number(aSmeshActor->GetFacesOrientation3DVectors());
 
                   param = vtkParam + "Sizes";
-                  ip->setParameter(entry, param, sizeStr.toLatin1().data());
+                  ip->setParameter(entry, param, qPrintable(sizeStr.join(gDigitsSep)));
 
                   // Point marker
                   QString markerStr;
@@ -5509,6 +5612,9 @@ typedef std::map<int, TPlaneInfoList> TPlaneInfoMap;
  */
 void SMESHGUI::restoreVisualParameters (int savePoint)
 {
+  // localizing
+  Kernel_Utils::Localizer loc;
+
   SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(application()->activeStudy());
   if (!appStudy || !appStudy->studyDS())
     return;
@@ -5745,95 +5851,279 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
             // Displayed entities
             else if (paramNameStr == "Entities") {
               QStringList mode = val.split(gDigitsSep, QString::SkipEmptyParts);
-              if (mode.count() == 6) {
-                if (mode[0] != "e" || mode[2]  != "f" || mode[4] != "v") {
-                  MESSAGE("Invalid order of data in Entities, must be: "
-                          "e:0/1:f:0/1:v:0/1");
-                }
-                else {
-                  unsigned int aMode = aSmeshActor->GetEntityMode();
-                  unsigned int aNewMode =
-                    (int(SMESH_Actor::eEdges  ) * mode[1].toInt()) |
-                    (int(SMESH_Actor::eFaces  ) * mode[3].toInt()) |
-                    (int(SMESH_Actor::eVolumes) * mode[5].toInt());
-                  if (aNewMode != aMode)
-                    aSmeshActor->SetEntityMode(aNewMode);
+              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);
-              if (colors.count() == 16 || colors.count() == 18 ) {
-                if (colors[0] != "surface" || colors[4]  != "backsurface" ||
-                    (colors[8] != "edge" && colors[6] != "edge" ) || (colors[12] != "node" && colors[10] != "node") ||
-                    (colors.count() == 18 && colors[14] != "outline")) {
-                  MESSAGE("Invalid order of data in Colors, must be: "
-                          "surface:r:g:b:backsurface:r:g:b:edge:r:g:b:node:r:g:b or surface:r:g:b:backsurface:delta:edge:r:g:b:node:r:g:b:outline:r:g:b");
+              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 {
-                  int delta = 0;
-                  float er,eg,eb;
-                  float nr,ng,nb;
-                  vtkFloatingPointType otr,otg,otb;
-                  //Old case backsurface color is independent
-                  if( colors.count() == 16 ) {
-                    QColor ffc;
-                    SMESH::GetColor( "SMESH", "fill_color", ffc, delta, "0,170,255|-100" ) ;
-                    er = colors[9].toFloat();
-                    eg = colors[10].toFloat();
-                    eb = colors[11].toFloat();
-
-                    nr = colors[13].toFloat();
-                    ng = colors[14].toFloat();
-                    nb = colors[15].toFloat();
-                    SMESH::GetColor("SMESH", "outline_color", otr, otg, otb, QColor( 0, 70, 0 ) );
-                  } else {
-                    //New case backsurface color depends on surface color
-                    delta = colors[5].toInt();
-
-                    er = colors[7].toFloat();
-                    eg = colors[8].toFloat();
-                    eb = colors[9].toFloat();
-
-                    nr = colors[11].toFloat();
-                    ng = colors[12].toFloat();
-                    nb = colors[13].toFloat();
-
-                    otr = colors[15].toFloat();
-                    otg = colors[16].toFloat();
-                    otb = colors[17].toFloat();
-                  }
-                  aSmeshActor->SetSufaceColor(colors[1].toFloat(), colors[2].toFloat(), colors[3].toFloat(), delta);
-                  aSmeshActor->SetEdgeColor(er,eg,eb);
-                  aSmeshActor->SetNodeColor(nr,ng,nb);
-                  aSmeshActor->SetOutlineColor(otr,otg,otb);
+                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() );
             }
-            // Sizes of lines and points
+            // Sizes
             else if (paramNameStr == "Sizes") {
               QStringList sizes = val.split(gDigitsSep, QString::SkipEmptyParts);
-              if (sizes.count() == 4) {
-                if (sizes[0] != "line" || sizes[2] != "shrink") {
-                  MESSAGE("Invalid order of data in Sizes, must be: "
-                          "line:int:shrink:float");
+              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++;
                 }
-                else {
-                  aSmeshActor->SetLineWidth(sizes[1].toInt());
-                  aSmeshActor->SetShrinkFactor(sizes[3].toFloat());
+                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 (sizes.count() == 6) { // just to support old format
-                if (sizes[0] != "line" || sizes[2]  != "node" || sizes[4] != "shrink") {
-                  MESSAGE("Invalid order of data in Sizes, must be: "
-                          "line:int:node:int:shrink:float");
+                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 {
-                  aSmeshActor->SetLineWidth(sizes[1].toInt());
-                  //aSmeshActor->SetNodeSize(sizes[3].toInt()); // made obsolete
-                  aSmeshActor->SetShrinkFactor(sizes[5].toFloat());
+                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
@@ -6166,11 +6456,11 @@ bool SMESHGUI::renameAllowed( const QString& entry) const {
 
   // check type to prevent renaming of inappropriate objects
   int aType = SMESHGUI_Selection::type(qPrintable(entry), SMESH::GetActiveStudyDocument());
-  if (aType == MESH || aType == GROUP ||
-      aType == SUBMESH || aType == SUBMESH_COMPOUND ||
-      aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
-      aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
-      aType == HYPOTHESIS || aType == ALGORITHM)
+  if (aType == SMESH::MESH || aType == SMESH::GROUP ||
+      aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
+      aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
+      aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
+      aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM)
     return true;
 
   return false;
@@ -6213,11 +6503,11 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) {
       aName = anAttr;
       // check type to prevent renaming of inappropriate objects
       int aType = SMESHGUI_Selection::type( qPrintable(entry), SMESH::GetActiveStudyDocument() );
-      if (aType == MESH || aType == GROUP ||
-          aType == SUBMESH || aType == SUBMESH_COMPOUND ||
-          aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
-          aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
-          aType == HYPOTHESIS || aType == ALGORITHM) {
+      if (aType == SMESH::MESH || aType == SMESH::GROUP ||
+          aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
+          aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
+          aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
+          aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM) {
         if ( !name.isEmpty() ) {
           SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
 
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 4ce7522d50e5119983024405cc66cf8be3f79c8e..8d77bc3570d17188e308151b07321e079a77323e 100644 (file)
@@ -343,7 +343,8 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI*          theMo
   SelectButtonC1A1 = new QPushButton(GroupC1);
   SelectButtonC1A1->setIcon(image1);
   LineEditC1A1 = new QLineEdit(GroupC1);
-  LineEditC1A1->setValidator(new SMESHGUI_IdValidator(this, myIsPoly ? 1000 : myNbNodes));
+  LineEditC1A1->setValidator
+    (new SMESHGUI_IdValidator(this, ( myIsPoly || myNbNodes == 1 ) ? 1000 : myNbNodes));
 
   Reverse = (myElementType == SMDSAbs_Face || myElementType == SMDSAbs_Volume ) ? new QCheckBox(tr("SMESH_REVERSE"), GroupC1) : 0;
 
@@ -439,21 +440,21 @@ void SMESHGUI_AddMeshElementDlg::Init()
   myActor = 0;
 
   /* signals and slots connections */
-  connect(buttonOk, SIGNAL(clicked()),     SLOT(ClickOnOk()));
-  connect(buttonCancel, SIGNAL(clicked()), SLOT(ClickOnCancel()));
-  connect(buttonApply, SIGNAL(clicked()),  SLOT(ClickOnApply()));
-  connect(buttonHelp, SIGNAL(clicked()),   SLOT(ClickOnHelp()));
-
-  connect(SelectButtonC1A1, SIGNAL(clicked()), SLOT(SetEditCurrentArgument()));
-  connect(LineEditC1A1, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
-  connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
-  connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(SelectionIntoArgument()));
+  connect(buttonOk,        SIGNAL(clicked()),                     SLOT(ClickOnOk()));
+  connect(buttonCancel,    SIGNAL(clicked()),                     SLOT(ClickOnCancel()));
+  connect(buttonApply,     SIGNAL(clicked()),                     SLOT(ClickOnApply()));
+  connect(buttonHelp,      SIGNAL(clicked()),                     SLOT(ClickOnHelp()));
+
+  connect(SelectButtonC1A1,SIGNAL(clicked()),                     SLOT(SetEditCurrentArgument()));
+  connect(LineEditC1A1,    SIGNAL(textChanged(const QString&)),   SLOT(onTextChange(const QString&)));
+  connect(mySMESHGUI,      SIGNAL(SignalDeactivateActiveDialog()),SLOT(DeactivateActiveDialog()));
+  connect(mySelectionMgr,  SIGNAL(currentSelectionChanged()),     SLOT(SelectionIntoArgument()));
   /* to close dialog if study frame change */
-  connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
-  connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), SLOT(ClickOnCancel()));    
+  connect(mySMESHGUI,      SIGNAL(SignalStudyFrameChanged()),     SLOT(ClickOnCancel()));
+  connect(mySMESHGUI,      SIGNAL(SignalCloseAllDialogs()),       SLOT(ClickOnCancel()));    
 
   if (Reverse)
-    connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
+    connect(Reverse,       SIGNAL(stateChanged(int)),             SLOT(CheckBox(int)));
 
   // set selection mode
   SMESH::SetPointRepresentation(true);
@@ -477,9 +478,9 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
 
   if (myNbOkNodes && !mySMESHGUI->isActiveStudyLocked()) {
     myBusy = true;
-    SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
-    anArrayOfIndices->length(myNbNodes);
     QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
+    SMESH::long_array_var anArrayOfIndices = new SMESH::long_array;
+    anArrayOfIndices->length(aListId.count());
     const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
     if ( Reverse && Reverse->isChecked() && !revIndex.empty() )
       for (int i = 0; i < aListId.count(); i++)
@@ -515,28 +516,38 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
       }
     }
 
-    long anElemId = -1;
     SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
+    SMESH::long_array_var anIdList = new SMESH::long_array;
+    anIdList->length( 1 );
+    anIdList[0] = -1;
+
     switch (myElementType) {
     case SMDSAbs_0DElement:
-      anElemId = aMeshEditor->Add0DElement(anArrayOfIndices[0]); break;
+      anIdList->length( anArrayOfIndices->length() );
+      for ( size_t i = 0; i < anArrayOfIndices->length(); ++i )
+        anIdList[i] = aMeshEditor->Add0DElement(anArrayOfIndices[i]);
+      break;
     case SMDSAbs_Ball:
-      if ( myGeomType == SMDSEntity_Ball )
-        anElemId = aMeshEditor->AddBall(anArrayOfIndices[0],
-                                        DiameterSpinBox->GetValue()); break;
+      if ( myGeomType == SMDSEntity_Ball ) {
+        anIdList->length( anArrayOfIndices->length() );
+        for ( size_t i = 0; i < anArrayOfIndices->length(); ++i )
+          anIdList[i] = aMeshEditor->AddBall(anArrayOfIndices[i],
+                                             DiameterSpinBox->GetValue());
+      }
+      break;
     case SMDSAbs_Edge:
-      anElemId = aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
+      anIdList[0] = aMeshEditor->AddEdge(anArrayOfIndices.inout()); break;
     case SMDSAbs_Face:
       if ( myIsPoly )
-        anElemId = aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
+        anIdList[0] = aMeshEditor->AddPolygonalFace(anArrayOfIndices.inout());
       else
-        anElemId = aMeshEditor->AddFace(anArrayOfIndices.inout());
+        anIdList[0] = aMeshEditor->AddFace(anArrayOfIndices.inout());
       break;
     default:
-      anElemId = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
+      anIdList[0] = aMeshEditor->AddVolume(anArrayOfIndices.inout()); break;
     }
 
-    if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
+    if ( anIdList[0] > 0 && addToGroup && !aGroupName.isEmpty() ) {
       SMESH::SMESH_Group_var aGroupUsed;
       if ( aGroup->_is_nil() ) {
         // create new group 
@@ -559,12 +570,8 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
           aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
       }
 
-      if ( !aGroupUsed->_is_nil() ) {
-        SMESH::long_array_var anIdList = new SMESH::long_array;
-        anIdList->length( 1 );
-        anIdList[0] = anElemId;
+      if ( !aGroupUsed->_is_nil() )
         aGroupUsed->Add( anIdList.inout() );
-      }
     }
 
     SALOME_ListIO aList; aList.Append( myActor->getIO() );
@@ -676,7 +683,7 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->highlight( myActor->getIO(), true, true );
 
-    myNbOkNodes = ( allOk && myNbNodes == aListId.count() );
+    myNbOkNodes = ( allOk && ( myNbNodes == aListId.count() || myNbNodes == 1 ));
 
     if (myIsPoly)
       {
@@ -766,7 +773,7 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
   myBusy = false;
   if (myIsPoly && myElementType == SMDSAbs_Face && nbNodes >= 3 ) {
     myNbNodes = nbNodes;
-  } else if (myNbNodes != nbNodes) {
+  } else if (myNbNodes != nbNodes && myNbNodes != 1) {
     return;
   }
 
index edee4cecbda29c16d215f47a606bab0bdb28bf3e..51e19437060dbbf5f05c1ae0899ba9ae0d94b7a4 100644 (file)
@@ -206,7 +206,7 @@ void SMESHGUI_BuildCompoundDlg::Init()
 
   myMesh = SMESH::SMESH_Mesh::_nil();
 
-  myMeshFilter = new SMESH_TypeFilter (MESH);
+  myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
 
   myMeshArray = new SMESH::mesh_array();
 
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 a5575b8797bae2cfc2667da3d4755df98ca9817e..eac1ae86cf4903fd1670db4b1109c56fbca87ca4 100644 (file)
@@ -193,7 +193,7 @@ void SMESHGUI_ConvToQuadOp::selectionDone()
 SUIT_SelectionFilter* SMESHGUI_ConvToQuadOp::createFilter( const int theId ) const
 {
   if ( theId == 0 )
-    return new SMESH_TypeFilter( MESHorSUBMESH );
+    return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
   else
     return 0;
 }
index 7c3d1d62c74519145ddec26d54b877f7df059c40..dab7a224c7c4dcbfb7c5ece96d8b56d23b74d766 100644 (file)
@@ -219,7 +219,7 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( SMESHGUI* theModule )
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Selection filter
-  myIdSourceFilter = new SMESH_TypeFilter( IDSOURCE );
+  myIdSourceFilter = new SMESH_TypeFilter( SMESH::IDSOURCE );
 
   myHelpFileName = "copy_mesh_page.html";
 
index ac5a1c686b0bfbba699b15325f67e154384246e5..7b2c6e27a9a724b69d67c25db0c747b4d5abe498 100644 (file)
@@ -176,7 +176,7 @@ void SMESHGUI_DeleteGroupDlg::Init ()
   connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
 
   // set selection mode
-  mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+  mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
   onSelectionDone();
@@ -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() );
     }
   }
 
@@ -323,7 +331,7 @@ void SMESHGUI_DeleteGroupDlg::enterEvent (QEvent*)
   setEnabled(true);
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
-  mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+  mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
 }
 
 //=================================================================================
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 958f609ffecba6ab305279fed245d0506c02bb48..4669dadf90ef1b5eb05ee146739ceddf4c06f316 100644 (file)
@@ -46,9 +46,9 @@ SMESHGUI_Dialog::SMESHGUI_Dialog( QWidget* parent, const bool modal,
 : LightApp_Dialog( parent == 0 ? desktop() : parent, "", modal, allowResize, flags )
 {
   int pr = prefix( "SMESH" );
-  typeName( pr + MESH ) = tr( "DLG_MESH" );
-  typeName( pr + HYPOTHESIS ) = tr( "DLG_HYPO" );
-  typeName( pr + ALGORITHM ) = tr( "DLG_ALGO" );
+  typeName( pr + SMESH::MESH ) = tr( "DLG_MESH" );
+  typeName( pr + SMESH::HYPOTHESIS ) = tr( "DLG_HYPO" );
+  typeName( pr + SMESH::ALGORITHM ) = tr( "DLG_ALGO" );
   setButtonText(1, tr("SMESH_BUT_APPLY_AND_CLOSE")); //rename OK to Apply and Close
   if ( flags & Close )
     setButtonPosition( Right, Close );
index e49250afe0f51aaa60079cedcbe390defd6209ea..1ee5ab8c9af6dc321ffc7a2398c707d2932ed009 100644 (file)
@@ -249,7 +249,7 @@ void SMESHGUI_DuplicateNodesDlg::Init()
   myGroups3.clear();
   
   // Set selection mode
-  mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+  mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
   
@@ -571,7 +571,7 @@ void SMESHGUI_DuplicateNodesDlg::enterEvent (QEvent*)
     // Set selection mode
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(ActorSelection);
-    mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+    mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
   }
 }
 
index 4ec84dce95e8c3384d93871a4497acd0daa5bd3d..f7bd76f7fe8474fe05cde8084087207b46e50f04 100644 (file)
@@ -323,16 +323,16 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
   mySMESHGUI->SetActiveDialogBox(this);
 
   // Costruction of the logical filter for the elements: mesh/sub-mesh/group
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
   if (aSmeshGroupFilter)    aListOfFilters.append(aSmeshGroupFilter);
 
   myElementsFilter = new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
-  //myPathMeshFilter = new SMESH_TypeFilter (MESH);
-  myPathMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
+  //myPathMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
+  myPathMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
 
   myHelpFileName = "extrusion_along_path_page.html";
 
@@ -978,8 +978,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::SetEditCurrentArgument (QToolButton* button
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(NodeSelection);
 
-    SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
-    SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter(GROUP);
+    SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
+    SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter(SMESH::GROUP);
     SMESH_NumberFilter* aVertexFilter      = new SMESH_NumberFilter ("GEOM", TopAbs_SHAPE,
                                                                      -1, TopAbs_VERTEX);
     QList<SUIT_SelectionFilter*> aListOfFilters;
index fa367fd510ea421b7f88718e342b4df85053d1cd..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())
 {
@@ -281,19 +282,19 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule)
 
   // Costruction of the logical filter for the elements: mesh/sub-mesh/group
   QList<SUIT_SelectionFilter*> aListOfFilters;
-  aListOfFilters.append(new SMESH_TypeFilter (MESH));
-  aListOfFilters.append(new SMESH_TypeFilter (SUBMESH_VERTEX));
-  aListOfFilters.append(new SMESH_TypeFilter (GROUP_NODE));
+  aListOfFilters.append(new SMESH_TypeFilter (SMESH::MESH));
+  aListOfFilters.append(new SMESH_TypeFilter (SMESH::SUBMESH_VERTEX));
+  aListOfFilters.append(new SMESH_TypeFilter (SMESH::GROUP_NODE));
   myMeshOrSubMeshOrGroupFilter0D =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
-  aListOfFilters[0] = new SMESH_TypeFilter (MESH);
-  aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_EDGE);
-  aListOfFilters[2] = new SMESH_TypeFilter (GROUP_EDGE);
+  aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
+  aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_EDGE);
+  aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_EDGE);
   myMeshOrSubMeshOrGroupFilter1D =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
-  aListOfFilters[0] = new SMESH_TypeFilter (MESH);
-  aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_FACE);
-  aListOfFilters[2] = new SMESH_TypeFilter (GROUP_FACE);
+  aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
+  aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_FACE);
+  aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_FACE);
   myMeshOrSubMeshOrGroupFilter2D =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
 
index d29ae2c82a064b9d19c6b322ac2adb369bfc9851..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();
@@ -1743,6 +1754,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con
     aTable->blockSignals( isSignalsBlocked );
   }
 
+  // set Compare and enable/desable Threshold
   if ((aType == SMESH::NODE && (aCriterionType == SMESH::FT_FreeNodes               ||
                                 aCriterionType == SMESH::FT_EqualNodes ))           ||
       (aType == SMESH::EDGE && (aCriterionType == SMESH::FT_FreeBorders             ||
@@ -1970,6 +1982,7 @@ const QMap<int, QString>& SMESHGUI_FilterTable::getSupportedTypes() const
   if (aTypes.isEmpty())
   {
     aTypes[ SMESH::NODE   ] = tr("NODES");
+    aTypes[ SMESH::ELEM0D ] = tr("ELEM0D");
     aTypes[ SMESH::BALL   ] = tr("BALLS");
     aTypes[ SMESH::EDGE   ] = tr("EDGES");
     aTypes[ SMESH::FACE   ] = tr("FACES");
@@ -2106,6 +2119,20 @@ const QMap<int, QString>& SMESHGUI_FilterTable::getCriteria (const int theType)
     }
     return aCriteria;
   }
+  else if (theType == SMESH::ELEM0D)
+  {
+    static QMap<int, QString> aCriteria;
+    if (aCriteria.isEmpty())
+    {
+      aCriteria[ SMESH::FT_RangeOfIds         ] = tr("RANGE_OF_IDS");
+      aCriteria[ SMESH::FT_BelongToGeom       ] = tr("BELONG_TO_GEOM");
+      aCriteria[ SMESH::FT_BelongToPlane      ] = tr("BELONG_TO_PLANE");
+      aCriteria[ SMESH::FT_BelongToCylinder   ] = tr("BELONG_TO_CYLINDER");
+      aCriteria[ SMESH::FT_BelongToGenSurface ] = tr("BELONG_TO_GENSURFACE");
+      aCriteria[ SMESH::FT_GroupColor         ] = tr("GROUP_COLOR");
+    }
+    return aCriteria;
+  }
   else // SMESH::ALL
   {
     static QMap<int, QString> aCriteria;
@@ -2673,6 +2700,8 @@ void SMESHGUI_FilterDlg::Init (const QList<int>& theTypes, const bool setInViewe
   {
     int aType = theTypes.first();
     if      (aType == SMESH::NODE  ) setWindowTitle(tr("NODES_TLT"));
+    else if (aType == SMESH::ELEM0D) setWindowTitle(tr("ELEM0D_TLT"));
+    else if (aType == SMESH::BALL  ) setWindowTitle(tr("BALL_TLT"));
     else if (aType == SMESH::EDGE  ) setWindowTitle(tr("EDGES_TLT"));
     else if (aType == SMESH::FACE  ) setWindowTitle(tr("FACES_TLT"));
     else if (aType == SMESH::VOLUME) setWindowTitle(tr("VOLUMES_TLT"));
@@ -2879,6 +2908,8 @@ Selection_Mode SMESHGUI_FilterDlg::getSelMode (const int theType) const
   switch (theType)
   {
     case SMESH::NODE   : return NodeSelection;
+    case SMESH::ELEM0D : return Elem0DSelection;
+    case SMESH::BALL   : return BallSelection;
     case SMESH::EDGE   : return EdgeSelection;
     case SMESH::FACE   : return FaceSelection;
     case SMESH::VOLUME : return VolumeSelection;
index 89515cad680d0f4f2ac47ea4e9d91b8e547251cf..3936eea86d8c23acaecca085a4b54acba4041e39 100644 (file)
@@ -242,8 +242,8 @@ SMESHGUI_FindElemByPointOp::SMESHGUI_FindElemByPointOp()
   myHelpFileName = "find_element_by_point_page.html";
 
   QList<SUIT_SelectionFilter*> filters;
-  filters.append( new SMESH_TypeFilter( MESH ) );
-  filters.append( new SMESH_TypeFilter( GROUP ) );
+  filters.append( new SMESH_TypeFilter( SMESH::MESH ) );
+  filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
   myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
 
   myPreview = new SMESH::MeshPreviewStruct();
index 668681496edb16bd69f4842a2bd94fbadc20c4c1..f6d02c232a452648b4efcad933a2488a07b0b51a 100644 (file)
 enum grpSelectionMode {
   grpNoSelection       = -1,
   grpNodeSelection     = 0,
-  grpBallSelection     = 1,
-  grpEdgeSelection     = 2,
-  grpFaceSelection     = 3,
-  grpVolumeSelection   = 4,
-  grpSubMeshSelection  = 5,
-  grpGroupSelection    = 6,
-  grpMeshSelection     = 7,
-  grpGeomSelection     = 8,
-  grpAllSelection      = 9,
+  grp0DSelection       = 1,
+  grpBallSelection     = 2,
+  grpEdgeSelection     = 3,
+  grpFaceSelection     = 4,
+  grpVolumeSelection   = 5,
+  grpSubMeshSelection  = 6,
+  grpGroupSelection    = 7,
+  grpMeshSelection     = 8,
+  grpGeomSelection     = 9,
+  grpAllSelection      = 10,
 };
 
 //=================================================================================
@@ -214,6 +215,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
 
   QStringList types;
   types.append( tr( "MESH_NODE" ) );
+  types.append( tr( "SMESH_ELEM0D" ) );
   types.append( tr( "SMESH_BALL_ELEM" ) );
   types.append( tr( "SMESH_EDGE" ) );
   types.append( tr( "SMESH_FACE" ) );
@@ -444,7 +446,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
   mySMESHGUI->SetState(800);
 
   mySelectionMode = grpNoSelection;
-  myMeshFilter = new SMESH_TypeFilter(MESH);
+  myMeshFilter = new SMESH_TypeFilter(SMESH::MESH);
   mySubMeshFilter = new SMESH_LogicalFilter(QList<SUIT_SelectionFilter*>(),
                                             SMESH_LogicalFilter::LO_OR,
                                             /*takeOwnership=*/true);
@@ -521,6 +523,22 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation)
   return aName;
 }
 
+void  SMESHGUI_GroupDlg::setDefaultName() const
+{
+  QString aResName;
+  _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+  int i=1;
+  QString aPrefix ="Group_";
+  _PTR(SObject) anObj;
+  do
+  {
+    aResName = aPrefix + QString::number( i++ );
+    anObj = aStudy->FindObject( aResName.toLatin1().data() );
+  }
+  while ( anObj );
+  myName->setText(aResName); 
+}
+
 //=================================================================================
 // function : Init()
 // purpose  :
@@ -543,6 +561,8 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_Mesh_ptr theMesh)
   SetAppropriateActor();
 
   setDefaultGroupColor();
+  setDefaultName();
+
 
   SALOME_ListIO aList;
   mySelectionMgr->selectedObjects( aList );
@@ -583,11 +603,12 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
 
   int aType = 0;
   switch(theGroup->GetType()) {
-  case SMESH::NODE:   aType = 0; break;
-  case SMESH::BALL:   aType = 1; break;
-  case SMESH::EDGE:   aType = 2; break;
-  case SMESH::FACE:   aType = 3; break;
-  case SMESH::VOLUME: aType = 4; break;
+  case SMESH::NODE:   aType = grpNodeSelection;   break;
+  case SMESH::ELEM0D: aType = grp0DSelection;     break;
+  case SMESH::BALL:   aType = grpBallSelection;   break;
+  case SMESH::EDGE:   aType = grpEdgeSelection;   break;
+  case SMESH::FACE:   aType = grpFaceSelection;   break;
+  case SMESH::VOLUME: aType = grpVolumeSelection; break;
   }
   myTypeGroup->button(aType)->setChecked(true);
 
@@ -807,6 +828,9 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
     case grpBallSelection:
       if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : BallSelection);
       break;
+    case grp0DSelection:
+      if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : Elem0DSelection);
+      break;
     case grpFaceSelection:
       if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : FaceSelection);
       break;
@@ -817,15 +841,15 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
 
       SMESH_TypeFilter* f = 0;
       switch (myTypeId) {
-      case grpNodeSelection:   f = new SMESH_TypeFilter(SUBMESH); break;
-      case grpEdgeSelection:   f = new SMESH_TypeFilter(SUBMESH_EDGE); break;
-      case grpFaceSelection:   f = new SMESH_TypeFilter(SUBMESH_FACE); break;
-      case grpVolumeSelection: f = new SMESH_TypeFilter(SUBMESH_SOLID); break;
-      default:                 f = new SMESH_TypeFilter(SUBMESH);
+      case grpNodeSelection:   f = new SMESH_TypeFilter(SMESH::SUBMESH); break;
+      case grpEdgeSelection:   f = new SMESH_TypeFilter(SMESH::SUBMESH_EDGE); break;
+      case grpFaceSelection:   f = new SMESH_TypeFilter(SMESH::SUBMESH_FACE); break;
+      case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_SOLID); break;
+      default:                 f = new SMESH_TypeFilter(SMESH::SUBMESH);
       }
       QList<SUIT_SelectionFilter*> filtList;
       filtList.append( f );
-      filtList.append( new SMESH_TypeFilter(SUBMESH_COMPOUND));
+      filtList.append( new SMESH_TypeFilter(SMESH::SUBMESH_COMPOUND));
       mySubMeshFilter->setFilters( filtList );
 
       mySelectionMgr->installFilter( mySubMeshFilter );
@@ -837,12 +861,13 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
 
       SMESH_TypeFilter* f = 0;
       switch (myTypeId) {
-      case grpNodeSelection:   f = new SMESH_TypeFilter(GROUP_NODE); break;
-      case grpBallSelection:   f = new SMESH_TypeFilter(GROUP_BALL); break;
-      case grpEdgeSelection:   f = new SMESH_TypeFilter(GROUP_EDGE); break;
-      case grpFaceSelection:   f = new SMESH_TypeFilter(GROUP_FACE); break;
-      case grpVolumeSelection: f = new SMESH_TypeFilter(GROUP_VOLUME); break;
-      default:                 f = new SMESH_TypeFilter(GROUP);
+      case grpNodeSelection:   f = new SMESH_TypeFilter(SMESH::GROUP_NODE);   break;
+      case grp0DSelection:     f = new SMESH_TypeFilter(SMESH::GROUP_0D);     break;
+      case grpBallSelection:   f = new SMESH_TypeFilter(SMESH::GROUP_BALL);   break;
+      case grpEdgeSelection:   f = new SMESH_TypeFilter(SMESH::GROUP_EDGE);   break;
+      case grpFaceSelection:   f = new SMESH_TypeFilter(SMESH::GROUP_FACE);   break;
+      case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_VOLUME); break;
+      default:                 f = new SMESH_TypeFilter(SMESH::GROUP);
       }
       QList<SUIT_SelectionFilter*> filtList;
       filtList.append( f );
@@ -883,10 +908,11 @@ bool SMESHGUI_GroupDlg::onApply()
 
   SMESH::ElementType aType = SMESH::ALL;
   switch (myTypeId) {
-  case grpNodeSelection:   aType = SMESH::NODE; break;
-  case grpBallSelection:   aType = SMESH::BALL; break;
-  case grpEdgeSelection:   aType = SMESH::EDGE; break;
-  case grpFaceSelection:   aType = SMESH::FACE; break;
+  case grpNodeSelection:   aType = SMESH::NODE;   break;
+  case grp0DSelection:     aType = SMESH::ELEM0D; break;
+  case grpBallSelection:   aType = SMESH::BALL;   break;
+  case grpEdgeSelection:   aType = SMESH::EDGE;   break;
+  case grpFaceSelection:   aType = SMESH::FACE;   break;
   case grpVolumeSelection: aType = SMESH::VOLUME; break;
   }
 
@@ -1112,7 +1138,7 @@ bool SMESHGUI_GroupDlg::onApply()
       SMESH::setFileType ( aMeshGroupSO, "COULEURGROUP" );
 
       /* init for the next operation */
-      myName->setText( "" );
+      setDefaultName();
       myElements->clear();
       myGroup         = SMESH::SMESH_Group::_nil();
       myGroupOnGeom   = SMESH::SMESH_GroupOnGeom::_nil();
@@ -1126,21 +1152,22 @@ bool SMESHGUI_GroupDlg::onApply()
       if ( aMeshGroupSO )
         if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
           anActor->setName(myName->text().toLatin1().data());
-         QColor c;
-         int delta;
+          QColor c;
+          int delta;
           switch ( myTypeId ) {
           case grpNodeSelection:   anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
+          case grp0DSelection:     anActor->Set0DColor  ( aColor.R, aColor.G, aColor.B ); break;
           case grpBallSelection:   anActor->SetBallColor( aColor.R, aColor.G, aColor.B ); break;
           case grpEdgeSelection:   anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
           case grpVolumeSelection: 
               SMESH::GetColor("SMESH", "volume_color", c , delta, "255,0,170|-100");
               anActor->SetVolumeColor( aColor.R, aColor.G, aColor.B, delta ); break;          
-             break;
+              break;
           case grpFaceSelection:   
           default:
               SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
               anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;          
-             break;
+              break;
           }
         }
     }
@@ -1673,10 +1700,11 @@ void SMESHGUI_GroupDlg::setFilters()
   SMESH::ElementType aType = SMESH::ALL;
   switch ( myTypeId )
   {
-    case grpNodeSelection:   aType = SMESH::NODE; break;
-    case grpBallSelection:   aType = SMESH::BALL; break;
-    case grpEdgeSelection:   aType = SMESH::EDGE; break;
-    case grpFaceSelection:   aType = SMESH::FACE; break;
+    case grpNodeSelection:   aType = SMESH::NODE;   break;
+    case grp0DSelection:     aType = SMESH::ELEM0D; break;
+    case grpBallSelection:   aType = SMESH::BALL;   break;
+    case grpEdgeSelection:   aType = SMESH::EDGE;   break;
+    case grpFaceSelection:   aType = SMESH::FACE;   break;
     case grpVolumeSelection: aType = SMESH::VOLUME; break;
     default:                 return;
   }
@@ -1765,6 +1793,10 @@ void SMESHGUI_GroupDlg::onAdd()
     aType = SMESH::BALL;
     mySelector->SetSelectionMode(BallSelection);
     break;
+  case grp0DSelection:
+    aType = SMESH::ELEM0D;
+    mySelector->SetSelectionMode(Elem0DSelection);
+    break;
   case grpEdgeSelection:
     aType = SMESH::EDGE;
     mySelector->SetSelectionMode(EdgeSelection);
@@ -2004,10 +2036,11 @@ void SMESHGUI_GroupDlg::onRemove()
 
     SMESH::ElementType aType = SMESH::ALL;
     switch(myTypeId) {
-    case grpNodeSelection:   aType = SMESH::NODE; break;
-    case grpBallSelection:   aType = SMESH::BALL; break;
-    case grpEdgeSelection:   aType = SMESH::EDGE; break;
-    case grpFaceSelection:   aType = SMESH::FACE; break;
+    case grpNodeSelection:   aType = SMESH::NODE;   break;
+    case grp0DSelection:     aType = SMESH::ELEM0D; break;
+    case grpBallSelection:   aType = SMESH::BALL;   break;
+    case grpEdgeSelection:   aType = SMESH::EDGE;   break;
+    case grpFaceSelection:   aType = SMESH::FACE;   break;
     case grpVolumeSelection: aType = SMESH::VOLUME; break;
     }
 
@@ -2565,11 +2598,12 @@ void SMESHGUI_GroupDlg::setShowEntityMode()
       if (!myStoredShownEntity)
         myStoredShownEntity = actor->GetEntityMode();
       switch ( myTypeId ) {
-      case grpNodeSelection:   restoreShowEntityMode(); break;
-      case grpBallSelection:   actor->SetEntityMode( SMESH_Actor::eBallElem ); break;
-      case grpEdgeSelection:   actor->SetEntityMode( SMESH_Actor::eEdges ); break;
-      case grpFaceSelection:   actor->SetEntityMode( SMESH_Actor::eFaces ); break;
-      case grpVolumeSelection: actor->SetEntityMode( SMESH_Actor::eVolumes ); break;
+      case grpNodeSelection:   restoreShowEntityMode();                          break;
+      case grp0DSelection:     actor->SetEntityMode( SMESH_Actor::e0DElements ); break;
+      case grpBallSelection:   actor->SetEntityMode( SMESH_Actor::eBallElem );   break;
+      case grpEdgeSelection:   actor->SetEntityMode( SMESH_Actor::eEdges );      break;
+      case grpFaceSelection:   actor->SetEntityMode( SMESH_Actor::eFaces );      break;
+      case grpVolumeSelection: actor->SetEntityMode( SMESH_Actor::eVolumes );    break;
       }
     }
   }
index 2592f4dc491dcfdeb9efe43cd81d501b1f90b357..f3cb58f0fe5e90730c2bec23c4228438a8bc3773 100644 (file)
@@ -141,7 +141,7 @@ private:
   
   void                          setGroupQColor( const QColor& );
   QColor                        getGroupQColor() const;
-  
+  void                          setDefaultName() const;
   void                          setDefaultGroupColor();
 
   void                          setIsApplyAndClose( const bool theFlag );
index e62b015c2f53d0b0221642f1294a0cc3dbb6fc61..f4cde4f1b1c3c2323cd9a07ece977c49dbab32ac 100644 (file)
@@ -419,7 +419,7 @@ SUIT_SelectionFilter* SMESHGUI_GroupOnShapeOp::createFilter( const int theId ) c
   if ( theId == _ELEM_GEOM || theId == _NODE_GEOM )
     return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
   else if ( theId == _MESH )
-    return new SMESH_TypeFilter( MESH );
+    return new SMESH_TypeFilter( SMESH::MESH );
   else
     return ( SUIT_SelectionFilter*) 0;
 }
index 8588a3c563b2c9208beed71bc45676552fed8d29..87b3ed7cdac8c2f29395f43ba5695b6a455037d1 100644 (file)
@@ -233,7 +233,7 @@ void SMESHGUI_GroupOpDlg::Init()
   // set selection mode
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
-  mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+  mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
 }
 
 /*!
@@ -464,7 +464,7 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*)
   setEnabled(true);
   if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
     aViewWindow->SetSelectionMode(ActorSelection);
-  mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+  mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
 }
 
 /*!
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 c15484b84b3accbdf1891af22217c485ddf49273..bb5d9f8ac01c5e4d86aa97a1216cfe53e8f99d9d 100644 (file)
@@ -78,14 +78,17 @@ signals:
 protected:
   struct StdParam
   {
-    QString   myName;
-    QVariant  myValue;
-    bool      isVariable;
-    QString   myText;
-    StdParam(){
+    QString    myName;
+    QVariant   myValue;
+    bool       isVariable;
+    QString    myText;
+    QByteArray myTextAsBytes;
+    StdParam() {
       isVariable = false;
     }
-    const char* text() const { return myText.toLatin1().constData(); }
+    const char* text() const {
+      ((QByteArray&) myTextAsBytes) = myText.toLatin1(); return myTextAsBytes.constData();
+    }
   };
 
   typedef QList<StdParam>      ListOfStdParams;
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 8cdc5b0ec3968c2a0f4d7b39e89bc7b1cfcbe425..3ef76bb2dfee32ea57ae91693bc4a5593bb412a3 100644 (file)
@@ -217,8 +217,8 @@ void SMESHGUI_Make2DFrom3DDlg::onGroupChecked()
 
 SMESHGUI_Make2DFrom3DOp::SMESHGUI_Make2DFrom3DOp()
   : SMESHGUI_SelectionOp(),
-    myMeshFilter(MESH),
-    myGroupFilter(GROUP)
+    myMeshFilter(SMESH::MESH),
+    myGroupFilter(SMESH::GROUP)
 {
 }
 
index 4e94217ed96c33d046b0feb3c723858f019c40c4..ff9394490d5982e07b2b8f9d5bc1abd4f11a2bea 100644 (file)
@@ -190,8 +190,8 @@ SMESHGUI_MinDistance::SMESHGUI_MinDistance( QWidget* parent )
   connect( mySecondTgt, SIGNAL( textEdited( QString ) ), this, SLOT( secondEdited() ) );
 
   QList<SUIT_SelectionFilter*> filters;
-  filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
-  filters.append( new SMESH_TypeFilter( GROUP ) );
+  filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
+  filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
   myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
 
   mySecondTgt->setEnabled( mySecond->checkedId() != OriginTgt );
@@ -706,8 +706,8 @@ SMESHGUI_BoundingBox::SMESHGUI_BoundingBox( QWidget* parent )
   connect( mySource,     SIGNAL( textEdited( QString ) ), this, SLOT( sourceEdited() ) );
 
   QList<SUIT_SelectionFilter*> filters;
-  filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
-  filters.append( new SMESH_TypeFilter( GROUP ) );
+  filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
+  filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
   myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
 
   clear();
index 7446b54b2d58ba9ac8c33bb122f14c71c1d8856b..877d6b6d42f7869a2ad1bdfd71fedf115319c790 100644 (file)
@@ -1291,8 +1291,8 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
     SMESH::UpdateView();
 
     // Costruction of the logical filter
-    SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-    SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+    SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+    SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
     
     QList<SUIT_SelectionFilter*> aListOfFilters;
     if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index 25ee42a9a2fed54b7a64af2d5f9e320c3e8ef57d..3b90ce6d6f63c2368028d79a10d06011fbed40bf 100644 (file)
@@ -34,6 +34,7 @@
 #include "SMDS_BallElement.hxx"
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
+#include "SMESH_ControlsDef.hxx"
 
 #include <LightApp_SelectionMgr.h>
 #include <SUIT_OverrideCursor.h>
@@ -886,6 +887,9 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
   
   if ( actor() ) {
     int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
+    int cprecision = -1;
+    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) ) 
+      cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
     foreach ( long id, ids ) {
       if ( !isElements() ) {
         //
@@ -934,6 +938,7 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
         // show element info
         // 
         const SMDS_MeshElement* e = actor()->GetObject()->GetMesh()->FindElement( id );
+        SMESH::Controls::NumericalFunctorPtr afunctor;
         if ( !e ) return;
         
         // element ID && type
@@ -1040,6 +1045,84 @@ void SMESHGUI_SimpleElemInfo::information( const QList<long>& ids )
             myInfo->append( QString( "<b>%1</b>" ).arg( tr( "FREE_NODE" ) ).arg( id ) );
           }
         }
+        // separator
+        myInfo->append( "" );
+        //controls
+        myInfo->append( QString( "<b>%1:</b>" ).arg( tr( "MEN_CTRL" ) ) );
+        //Length
+        if ( e->GetType() == SMDSAbs_Edge ) {    
+          afunctor.reset( new SMESH::Controls::Length() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "LENGTH_EDGES" ) ).arg( afunctor->GetValue( id ) ) );  
+        }
+        if( e->GetType() == SMDSAbs_Face ) {
+          //Area                         
+          afunctor.reset(  new SMESH::Controls::Area() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );  
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "AREA_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          //Taper        
+          afunctor.reset( new SMESH::Controls::Taper() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
+          afunctor->SetPrecision( cprecision );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MEN_TAPER" ) ).arg( afunctor->GetValue( id ) ) );
+          //AspectRatio2D        
+          afunctor.reset( new SMESH::Controls::AspectRatio() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          //Minimum angle         
+          afunctor.reset( new SMESH::Controls::MinimumAngle() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MINIMUMANGLE_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          //Wraping angle        
+          afunctor.reset( new SMESH::Controls::Warping() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "STB_WARP" ) ).arg( afunctor->GetValue( id ) ) );
+          //Skew         
+          afunctor.reset( new SMESH::Controls::Skew() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "TOP_SKEW" ) ).arg( afunctor->GetValue( id ) ) );
+          //ElemDiam2D   
+          afunctor.reset( new SMESH::Controls::MaxElementLength2D() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MAX_ELEMENT_LENGTH_2D" ) ).arg( afunctor->GetValue( id ) ) );
+        }
+        if( e->GetType() == SMDSAbs_Volume ) {
+          //AspectRatio3D
+          afunctor.reset(  new SMESH::Controls::AspectRatio3D() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "ASPECTRATIO_3D_ELEMENTS" ) ).arg( afunctor->GetValue( id ) ) );
+          //Volume      
+          afunctor.reset(  new SMESH::Controls::Volume() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          myInfo->append( QString( "- <b>%1:</b> %2" ).arg( tr( "MEN_VOLUME_3D" ) ).arg( afunctor->GetValue( id ) ) );
+          //ElementDiameter3D    
+          afunctor.reset(  new SMESH::Controls::Volume() );
+          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( "" );
+          //shapeID
+          int shapeID = e->getshapeId();
+          if ( shapeID > 0 ) {     
+            QString shapeType;
+            switch ( actor()->GetObject()->GetMesh()->FindElement( shapeID )->GetType() ) {
+            case SMDS_TOP_EDGE:   shapeType = tr( "EDGE" ); break;
+            case SMDS_TOP_FACE:   shapeType = tr( "FACE" ); break;
+            case SMDS_TOP_VERTEX: shapeType = tr( "VERTEX" ); break;
+            default:              shapeType = tr( "SOLID" );
+            }     
+            myInfo->append( QString( "<b>%1:</b> %2 #%3" ).arg( tr( "Position" ) ).arg( shapeType ).arg( shapeID ) );
+          }
+        }
+       */
       }
       // separator
       if ( ids.count() > 1 ) {
@@ -1123,6 +1206,9 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
 
   if ( actor() ) {
     int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
+    int cprecision = -1;
+    if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) ) 
+      cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
     foreach ( long id, ids ) {
       if ( !isElements() ) {
         //
@@ -1226,6 +1312,7 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
         // show element info
         // 
         const SMDS_MeshElement* e = actor()->GetObject()->GetMesh()->FindElement( id );
+        SMESH::Controls::NumericalFunctorPtr afunctor;
         if ( !e ) return;
         
         // element ID && type
@@ -1373,6 +1460,105 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
             }
           }
         }
+        //Controls
+        QTreeWidgetItem* cntrItem = createItem( elemItem, Bold );
+        cntrItem->setText( 0, tr( "MEN_CTRL" ) );
+        //Length
+        if( e->GetType()==SMDSAbs_Edge){         
+          afunctor.reset( new SMESH::Controls::Length() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* lenItem = createItem( cntrItem, Bold );
+          lenItem->setText( 0, tr( "LENGTH_EDGES" ) );
+          lenItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );         
+        }
+        if( e->GetType() == SMDSAbs_Face ) {
+          //Area         
+          afunctor.reset( new SMESH::Controls::Area() );        
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* areaItem = createItem( cntrItem, Bold );
+          areaItem->setText( 0, tr( "AREA_ELEMENTS" ) );
+          areaItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue(id) ) );         
+          //Taper
+          afunctor.reset( new SMESH::Controls::Taper() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* taperlItem = createItem( cntrItem, Bold );
+          taperlItem->setText( 0, tr( "MEN_TAPER" ) );
+          taperlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );    
+          //AspectRatio2D
+          afunctor.reset( new SMESH::Controls::AspectRatio() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );  
+          QTreeWidgetItem* ratlItem = createItem( cntrItem, Bold );
+          ratlItem->setText( 0, tr( "ASPECTRATIO_ELEMENTS" ));
+          ratlItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );      
+          //Minimum angle
+          afunctor.reset( new SMESH::Controls::MinimumAngle() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* minanglItem = createItem( cntrItem, Bold );
+          minanglItem->setText( 0, tr( "MINIMUMANGLE_ELEMENTS" ) );
+          minanglItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );    
+          //Wraping angle       
+          afunctor.reset( new SMESH::Controls::Warping() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* warpItem = createItem( cntrItem, Bold );
+          warpItem->setText( 0, tr( "STB_WARP" ));
+          warpItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );        
+          //Skew          
+          afunctor.reset( new SMESH::Controls::Skew() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          afunctor->SetPrecision( cprecision );
+          QTreeWidgetItem* skewItem = createItem( cntrItem, Bold );
+          skewItem->setText( 0, tr( "TOP_SKEW" ) );
+          skewItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
+          //ElemDiam2D    
+          afunctor.reset( new SMESH::Controls::MaxElementLength2D() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          QTreeWidgetItem* diamItem = createItem( cntrItem, Bold );
+          diamItem->setText( 0, tr( "MAX_ELEMENT_LENGTH_2D" ));
+          diamItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );       
+        }
+        if( e->GetType() == SMDSAbs_Volume ) {
+          //AspectRatio3D       
+          afunctor.reset( new SMESH::Controls::AspectRatio3D() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          QTreeWidgetItem* ratlItem3 = createItem( cntrItem, Bold );
+          ratlItem3->setText( 0, tr( "ASPECTRATIO_3D_ELEMENTS" ) );
+          ratlItem3->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );      
+          //Volume
+          afunctor.reset( new SMESH::Controls::Volume() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          QTreeWidgetItem* volItem = createItem( cntrItem, Bold );
+          volItem->setText( 0, tr( "MEN_VOLUME_3D" ) );
+          volItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id ) ) );
+          //ElementDiameter3D   
+          afunctor.reset( new SMESH::Controls::MaxElementLength3D() );
+          afunctor->SetMesh( actor()->GetObject()->GetMesh() );
+          QTreeWidgetItem* diam3Item = createItem( cntrItem, Bold );
+          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();
+          if ( shapeID > 0 ) {
+            QTreeWidgetItem* shItem = createItem( elemItem, Bold );
+            QString shapeType;
+            switch ( actor()->GetObject()->GetMesh()->FindElement( shapeID )->GetType() ) {
+            case SMDS_TOP_EDGE:   shapeType = tr( "EDGE" ); break;
+            case SMDS_TOP_FACE:   shapeType = tr( "FACE" ); break;
+            case SMDS_TOP_VERTEX: shapeType = tr( "VERTEX" ); break;
+            default:              shapeType = tr( "SOLID" );
+            }
+            shItem->setText( 0, tr( "Position" ) );
+            shItem->setText( 1, QString( "%1 #%2" ).arg(shapeType).arg( shapeID ) );
+          }
+        }
+       */
       }
     }
   }
index 9ad1a47fc5ae4d4a5ae928f3d6d315ce80107e92..df085305b151244508c4ce609f8ccf6ef970fe9c 100644 (file)
@@ -297,9 +297,9 @@ SUIT_SelectionFilter* SMESHGUI_MeshOp::createFilter( const int theId ) const
     return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
   }
   else if ( theId == SMESHGUI_MeshDlg::Obj && !myToCreate )
-    return new SMESH_TypeFilter( MESHorSUBMESH );
+    return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
   else if ( theId == SMESHGUI_MeshDlg::Mesh )
-    return new SMESH_TypeFilter( MESH );
+    return new SMESH_TypeFilter( SMESH::MESH );
   else
     return 0;
 }
@@ -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 a12ca8fbe1fed72b8fa009a7d0efc5d2047877ce..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();
@@ -998,12 +1000,12 @@ void SMESHGUI_MultiEditDlg::setSelectionMode()
   if (mySubmeshChk->isChecked()) {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(ActorSelection);
-    mySelectionMgr->installFilter(new SMESH_TypeFilter(SUBMESH));
+    mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::SUBMESH));
   }
   else if (myGroupChk->isChecked()) {
     if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
       aViewWindow->SetSelectionMode(ActorSelection);
-    mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+    mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
   }
 
   if (entityType()) {
@@ -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 1e9874b086c3fc7e31850c782d3469be331f2415..820db62b1ca6edb16b1cc299eaef3c50094602d7 100644 (file)
@@ -621,8 +621,8 @@ void SMESHGUI_PropertiesDlg::showControls( int elements, bool nodes )
   // node controls are supposed to be shown if at least any element type is present
   // or if there are only nodes
   myNodeGrp->setVisible( nodes || elements & SMESH_Actor::eAllEntity );
-  // edge controls are shown only if there are edges
-  myEdgeGrp->setVisible( elements & SMESH_Actor::eEdges );
+  // edge/wireframe controls are needed for edges, faces and volumes
+  myEdgeGrp->setVisible( elements & ( SMESH_Actor::eEdges | SMESH_Actor::eFaces | SMESH_Actor::eVolumes ) );
   // face controls are shown only if there are faces
   myFaceGrp->setVisible( elements & SMESH_Actor::eFaces );
   // volume controls are shown only if there are volumes
index f16f568fe60a84b276ca3c4f1fde146ae8823ab7..6a5cedd86ccf94f8532607930e6432365cc98838 100644 (file)
@@ -372,16 +372,16 @@ void SMESHGUI_RemoveElementsDlg::SelectionIntoArgument()
       myActor = SMESH::FindActorByEntry(anIO->getEntry());
       if (myActor) {
         
-        // get selected nodes
+        // get selected elements
         QString aString = "";
         int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
         if (nbElems > 0) {
           myBusy = true;
           myEditCurrentArgument->setText(aString);
           myBusy = false;
-          
+
           // OK
-          
+
           myNbOkElements = nbElems;
         } // if (nbElems > 0)
       } // if (myActor)
index 278fe0b9694ead3ea379873735bc6021e2b657b1..96d061cc6ef24874bbd0e903dac1a2352ac2f341 100644 (file)
@@ -182,7 +182,7 @@ void SMESHGUI_RenumberingDlg::Init()
 
   myMesh = SMESH::SMESH_Mesh::_nil();
 
-  myMeshFilter = new SMESH_TypeFilter (MESH);
+  myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
 
   /* signals and slots connections */
   connect(buttonOk,     SIGNAL(clicked()), this, SLOT(ClickOnOk()));
index cc5db9fe246e3b915eca3750b677f69fc65b916a..5b8c90e2750447e5595fb7a8c174744d00c292df 100644 (file)
@@ -401,22 +401,22 @@ SUIT_SelectionFilter* SMESHGUI_ReorientFacesOp::createFilter( const int what ) c
   case EObject:
     {
       QList<SUIT_SelectionFilter*> filters;
-      filters.append( new SMESH_TypeFilter( MESH ));
-      filters.append( new SMESH_TypeFilter( SUBMESH_FACE ));
-      filters.append( new SMESH_TypeFilter( GROUP_FACE ));
+      filters.append( new SMESH_TypeFilter( SMESH::MESH ));
+      filters.append( new SMESH_TypeFilter( SMESH::SUBMESH_FACE ));
+      filters.append( new SMESH_TypeFilter( SMESH::GROUP_FACE ));
       return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
     }
   case EPoint:
     {
       QList<SUIT_SelectionFilter*> filters;
-      filters.append( new SMESH_TypeFilter( IDSOURCE ));
+      filters.append( new SMESH_TypeFilter( SMESH::IDSOURCE ));
       filters.append( new SMESH_NumberFilter( "GEOM",TopAbs_VERTEX, 1, TopAbs_VERTEX ));
       return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
     }
   case EFace:
   case EDirection:
     {
-      return new SMESH_TypeFilter( IDSOURCE );
+      return new SMESH_TypeFilter( SMESH::IDSOURCE );
     }
   }
   return NULL;
index 2d198bb68353e9c17a704300da46e4c4f53587ce..f85e4eade0ae701c196507e88233cc9a8fb8759f 100644 (file)
@@ -301,8 +301,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule )
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index f257c3c87471b0e16345e2fcbc402cf524f75ca2..0e0690c018c93550cdd9f6a0094cd2776bf65fa9 100644 (file)
@@ -281,8 +281,8 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule ) :
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index 1e3cd9f9542c7f6720342feee0dd965690519897..b74a31f123f70efe12e516691805c8885528d648 100644 (file)
@@ -285,8 +285,8 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) :
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index 8fff50e3ca6bd80df6765f8e38f7f5c948130ee1..efa3c236148fb3fdd621d82b67d9f9039fd4e99b 100644 (file)
@@ -551,7 +551,7 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
     return -1;
 
   if( objComponent->GetIOR()==obj->GetIOR() )
-    return COMPONENT;
+    return SMESH::COMPONENT;
 
   int aLevel = obj->Depth() - objComponent->Depth(),
       aFTag = objFather->Tag(),
@@ -562,16 +562,16 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
   {
   case 1:
     if (anOTag >= SMESH::Tag_FirstMeshRoot)
-      res = MESH;
+      res = SMESH::MESH;
     break;
   case 2:
     switch (aFTag)
     {
     case SMESH::Tag_HypothesisRoot:
-      res = HYPOTHESIS;
+      res = SMESH::HYPOTHESIS;
       break;
     case SMESH::Tag_AlgorithmsRoot:
-      res = ALGORITHM;
+      res = SMESH::ALGORITHM;
       break;
     }
     break;
@@ -579,25 +579,25 @@ int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study )
     switch (aFTag)
     {
     case SMESH::Tag_SubMeshOnVertex:
-      res = SUBMESH_VERTEX;
+      res = SMESH::SUBMESH_VERTEX;
       break;
     case SMESH::Tag_SubMeshOnEdge:
-      res = SUBMESH_EDGE;
+      res = SMESH::SUBMESH_EDGE;
       break;
     case SMESH::Tag_SubMeshOnFace:
-      res = SUBMESH_FACE;
+      res = SMESH::SUBMESH_FACE;
       break;
     case SMESH::Tag_SubMeshOnSolid:
-      res = SUBMESH_SOLID;
+      res = SMESH::SUBMESH_SOLID;
       break;
     case SMESH::Tag_SubMeshOnCompound:
-      res = SUBMESH_COMPOUND;
+      res = SMESH::SUBMESH_COMPOUND;
       break;
     default:
       if (aFTag >= SMESH::Tag_FirstGroup)
-        res = GROUP;
+        res = SMESH::GROUP;
       else
-        res = SUBMESH;
+        res = SMESH::SUBMESH;
     }
     break;
   }
@@ -614,29 +614,29 @@ QString SMESHGUI_Selection::typeName( const int t )
 {
   switch( t )
   {
-  case HYPOTHESIS:
+  case SMESH::HYPOTHESIS:
     return "Hypothesis";
-  case ALGORITHM:
+  case SMESH::ALGORITHM:
     return "Algorithm";
-  case MESH:
+  case SMESH::MESH:
     return "Mesh";
-  case SUBMESH:
+  case SMESH::SUBMESH:
     return "SubMesh";
-  case MESHorSUBMESH:
+  case SMESH::MESHorSUBMESH:
     return "Mesh or submesh";
-  case SUBMESH_VERTEX:
+  case SMESH::SUBMESH_VERTEX:
     return "Mesh vertex";
-  case SUBMESH_EDGE:
+  case SMESH::SUBMESH_EDGE:
     return "Mesh edge";
-  case SUBMESH_FACE:
+  case SMESH::SUBMESH_FACE:
     return "Mesh face";
-  case SUBMESH_SOLID:
+  case SMESH::SUBMESH_SOLID:
     return "Mesh solid";
-  case SUBMESH_COMPOUND:
+  case SMESH::SUBMESH_COMPOUND:
     return "Mesh compound";
-  case GROUP:
+  case SMESH::GROUP:
     return "Group";
-  case COMPONENT:
+  case SMESH::COMPONENT:
     return "Component";
   default:
     return "Unknown";
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 2eb9b521e218f9a2038d93280e3f0389611622b5..61aaae845cf012b2524d7ca67dc37706f5ded7f9 100644 (file)
@@ -263,7 +263,7 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule )
 
   // Costruction of the logical filter for the elements: mesh/sub-mesh/group
   QList<SUIT_SelectionFilter*> aListOfFilters;
-  aListOfFilters << new SMESH_TypeFilter(MESHorSUBMESH) << new SMESH_TypeFilter(GROUP);
+  aListOfFilters << new SMESH_TypeFilter(SMESH::MESHorSUBMESH) << new SMESH_TypeFilter(SMESH::GROUP);
 
   myMeshOrSubMeshOrGroupFilter =
     new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
index 5f4b1e20667aace70103915098c0533a4342bc06..5ab4f3f2274e4040c0c8ea3c66163b5243ba0a81 100644 (file)
@@ -284,8 +284,8 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule )
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index 31ff3a796bc8b733043caf32945176b08df20fe4..eaee5140990689efda0982ea4da32b5adbc8f69a 100644 (file)
@@ -288,8 +288,8 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule ) :
   mySMESHGUI->SetActiveDialogBox((QDialog*)this);
 
   // Costruction of the logical filter
-  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
-  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (GROUP);
+  SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+  SMESH_TypeFilter* aSmeshGroupFilter    = new SMESH_TypeFilter (SMESH::GROUP);
 
   QList<SUIT_SelectionFilter*> aListOfFilters;
   if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
index 0da8d3a3abeec00ecd36394ee9c7da32f0a9ec03..6562da87a3a4c19ba8d4e4c470f7e8823e009bef 100644 (file)
@@ -610,16 +610,16 @@ namespace SMESH
         SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( aSObj ));
         if(!CORBA::is_nil(aGroup) && anActor)
         {
-         QColor c;
-         int deltaF, deltaV;
-         SMESH::GetColor( "SMESH", "fill_color", c, deltaF, "0,170,255|-100"  );
-         SMESH::GetColor( "SMESH", "volume_color", c, deltaV, "255,0,170|-100"  );
-         SMESH::GetColor( "SMESH", "default_grp_color", c );
+          QColor c;
+          int deltaF, deltaV;
+          SMESH::GetColor( "SMESH", "fill_color", c, deltaF, "0,170,255|-100"  );
+          SMESH::GetColor( "SMESH", "volume_color", c, deltaV, "255,0,170|-100"  );
+          SMESH::GetColor( "SMESH", "default_grp_color", c );
           SALOMEDS::Color aColor = aGroup->GetColor();
           if( !( aColor.R > 0 || aColor.G > 0 || aColor.B > 0 ))
           {
-           aColor.R = c.redF();
-           aColor.G = c.greenF();
+            aColor.R = c.redF();
+            aColor.G = c.greenF();
             aColor.B = c.blueF();
             aGroup->SetColor( aColor );
           }
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 84f6c2ee10ae80eef8e8de225672eed141ba3ea8..5d43fc78ac5bb2b5ccad02a69e2e5f80c4afab0f 100644 (file)
         <source>MED_VX_FILES_FILTER</source>
         <translation>MED %1 files</translation>
     </message>
+    <message>
+        <source>STL_FILES_FILTER</source>
+        <translation>STL files</translation>
+    </message>
     <message>
         <source>STL_ASCII_FILES_FILTER</source>
         <translation>STL ASCII files</translation>
         <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>
     </message>
     <message>
         <source>MEN_IMPORT_DAT</source>
-        <translation>DAT File</translation>
+        <translation>DAT file</translation>
     </message>
     <message>
         <source>MEN_DAT</source>
-        <translation>DAT File</translation>
+        <translation>DAT file</translation>
     </message>
     <message>
         <source>MEN_DELETE</source>
         <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>
     </message>
     <message>
         <source>MEN_EXPORT_DAT</source>
-        <translation>Export to DAT File</translation>
+        <translation>Export to DAT file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_MED</source>
-        <translation>Export to MED File</translation>
+        <translation>Export to MED file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_CGNS</source>
-        <translation>Export to CGNS File</translation>
+        <translation>Export to CGNS file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_GMF</source>
-        <translation>Export to GMF File</translation>
+        <translation>Export to GMF file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_SAUV</source>
     </message>
     <message>
         <source>MEN_EXPORT_STL</source>
-        <translation>Export to STL File</translation>
+        <translation>Export to STL file</translation>
     </message>
     <message>
         <source>MEN_EXPORT_UNV</source>
-        <translation>Export to UNV File</translation>
+        <translation>Export to UNV file</translation>
     </message>
     <message>
         <source>MEN_EXTRUSION</source>
     </message>
     <message>
         <source>MEN_IMPORT_STL</source>
-        <translation>STL File</translation>
+        <translation>STL file</translation>
     </message>
     <message>
         <source>MEN_STL</source>
-        <translation>STL File</translation>
+        <translation>STL file</translation>
     </message>
     <message>
         <source>MEN_SYM</source>
     </message>
     <message>
         <source>MEN_IMPORT_UNV</source>
-        <translation>UNV File</translation>
+        <translation>UNV file</translation>
     </message>
     <message>
         <source>MEN_UNV</source>
-        <translation>UNV File</translation>
+        <translation>UNV file</translation>
     </message>
     <message>
         <source>MEN_UN_GROUP</source>
@@ -1071,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>
@@ -1253,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>
@@ -2431,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>
@@ -2825,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>
@@ -3433,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>
@@ -4010,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>
@@ -4324,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>
@@ -4823,6 +4896,14 @@ Please select valid object and try again</translation>
         <source>NODES_TLT</source>
         <translation>Filter for Nodes</translation>
     </message>
+    <message>
+        <source>ELEM0D_TLT</source>
+        <translation>Filter for 0D Elements</translation>
+    </message>
+    <message>
+        <source>BALL_TLT</source>
+        <translation>Filter for Balls</translation>
+    </message>
     <message>
         <source>SELECTION</source>
         <translation>Initial Selection</translation>
@@ -5095,6 +5176,10 @@ Please check input data and try again</translation>
         <source>BALLS</source>
         <translation>Balls</translation>
     </message>
+    <message>
+        <source>ELEM0D</source>
+        <translation>0D Elements</translation>
+    </message>
     <message>
         <source>EDGES</source>
         <translation>Edges</translation>
index f4eb29eddc6b2eb1e375c2e5a732a42434840f58..fad91d48043bbf411dfc679f75fae1a291f1d04e 100755 (executable)
         <source>MED_VX_FILES_FILTER</source>
         <translation>Fichiers MED %1</translation>
     </message>
+    <message>
+        <source>STL_FILES_FILTER</source>
+        <translation>Fichiers STL</translation>
+    </message>
     <message>
         <source>STL_ASCII_FILES_FILTER</source>
         <translation>Fichiers STL ASCII</translation>
         <source>COMPERR_CANCELED</source>
         <translation>Calcul annulé</translation>
     </message>
+    <message>
+        <source>COMPERR_NO_MESH_ON_SHAPE</source>
+        <translation>Aucun élément n'est associé à une sous-shape</translation>
+    </message>
+    <message>
+        <source>EDITERR_NO_MEDIUM_ON_GEOM</source>
+        <translation>Certain noeuds milieux (affichés en magenta) ne sont pas placés
+        sur la géométrie pour éviter d&apos;obtenir des élements distordus.</translation>
+    </message>
     <message>
         <source>SMESH_GEOM</source>
         <translation>Géométrie</translation>
         <source>MEN_EXPORT_CGNS</source>
         <translation>Exporter au format CGNS</translation>
     </message>
+    <message>
+        <source>MEN_EXPORT_GMF</source>
+        <translation>Exporter au format GMF</translation>
+    </message>
     <message>
         <source>MEN_EXPORT_SAUV</source>
         <translation>Exporter au format SAUV (ASCII)</translation>
         <source>MEN_CGNS</source>
         <translation>Fichier CGNS</translation>
     </message>
+    <message>
+        <source>MEN_IMPORT_GMF</source>
+        <translation>Fichier GMF</translation>
+    </message>
+    <message>
+        <source>MEN_GMF</source>
+        <translation>Fichier GMF</translation>
+    </message>
     <message>
         <source>MEN_IMPORT_SAUV</source>
         <translation>Fichier SAUV (ASCII)</translation>
@@ -1557,27 +1582,14 @@ Voulez-vous effectuer l&apos;exportation à MED 2.1 ?</translation>
         <source>SMESH_EXPORT_MED_VERSION_COLLISION</source>
         <translation>La version MED du fichier &quot;%1&quot; n&apos;est pas connue 
 ou ne correspond pas à la version choisie.
-Réécrire le fichier ?</translation>
+Ecraser le fichier ?</translation>
     </message>
     <message>
         <source>SMESH_EXPORT_MED_MESH_NAMES_COLLISION</source>
-        <translation>Le fichier choisi contient déjà
-les maillages avec les noms suivants: %1
-Il est possible que le fichier résultant ne soit pas correct.
-Réécrire le fichier ?</translation>
-    </message>
-    <message>
-        <source>SMESH_EXPORT_STL1</source>
-        <translation>Le maillage  - &quot;%1&quot; ne contient pas de triangles</translation>
-    </message>
-    <message>
-        <source>SMESH_EXPORT_STL2</source>
-        <translation>Le maillage - &quot;%1&quot; contient d&apos;autres éléments que les triangles, ils ne seront donc pas enregistrés dans le fichier STL</translation>
-    </message>
-    <message>
-        <source>SMESH_EXPORT_UNV</source>
-        <translation>Les éléments pyramides seront omis au cours de l&apos;exportation 
-du maillage &quot;%1&quot; dans le fichier UNV</translation>
+        <translation>Le fichier sélectionné contient déjà
+des maillages avec les noms suivants: %1
+Le fichier obtenu pourrait être incorrect.
+Ecraser le fichier ?</translation>
     </message>
     <message>
         <source>EXPORT_NOT_SUPPORTED</source>
@@ -2773,14 +2785,14 @@ Vérifiez la limite dans les préférences du module Mesh.
         <source>STB_CUT_GROUP</source>
         <translation>Découper les groupes</translation>
     </message>
-    <message>
-        <source>STB_IMPORT_DAT</source>
-        <translation>Importer un fichier DAT</translation>
-    </message>
     <message>
         <source>STB_DAT</source>
         <translation>Exporter un fichier DAT</translation>
     </message>
+    <message>
+        <source>STB_IMPORT_DAT</source>
+        <translation>Importer un fichier DAT</translation>
+    </message>
     <message>
         <source>STB_DELETE</source>
         <translation>Supprimer</translation>
@@ -2977,6 +2989,14 @@ Vérifiez la limite dans les préférences du module Mesh.
         <source>STB_CGNS</source>
         <translation>Exporter un fichier CGNS</translation>
     </message>
+    <message>
+        <source>STB_IMPORT_GMF</source>
+        <translation>Importer un ficher GMF</translation>
+    </message>
+    <message>
+        <source>STB_GMF</source>
+        <translation>Exporter un fichier GMF</translation>
+    </message>
     <message>
         <source>STB_IMPORT_SAUV</source>
         <translation>Importer un fichier SAUV (ASCII)</translation>
@@ -3973,16 +3993,27 @@ 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>
         <source>ALLOW_ELEM_LIST_MODIF</source>
         <translation>Edition manuelle</translation>
     </message>
-    <message>
-        <source>SELECT_ALL</source>
-        <translation>Sélectionner tout</translation>
-    </message>
 </context>
 <context>
     <name>SMESHGUI</name>
@@ -4791,6 +4822,14 @@ Sélectionnez un objet valide et essayez de nouveau</translation>
         <source>NODES_TLT</source>
         <translation>Filtre de nœuds</translation>
     </message>
+    <message>
+        <source>ELEM0D_TLT</source>
+        <translation>Filtre d&apos;éléments 0D</translation>
+    </message>
+    <message>
+        <source>BALL_TLT</source>
+        <translation>Filtre d&apos;éléments particulaires</translation>
+    </message>
     <message>
         <source>SELECTION</source>
         <translation>Sélection initiale</translation>
@@ -5063,6 +5102,10 @@ Vérifiez la validité des informations données</translation>
         <source>BALLS</source>
         <translation>Particulaires</translation>
     </message>
+    <message>
+        <source>ELEM0D</source>
+        <translation>Eléments 0D</translation>
+    </message>
     <message>
         <source>EDGES</source>
         <translation>Arêtes</translation>
index 0e5f876248d593c837fd9e7eb6387ca4a2ac0209..a90736ca50539a2e9d7d72003f7edbb4931919d1 100644 (file)
@@ -26,7 +26,9 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 salomeinclude_HEADERS = \
        SMESH_Block.hxx \
        SMESH_TypeDefs.hxx \
+       SMESH_Tree.hxx \
        SMESH_Octree.hxx \
+       SMESH_Quadtree.hxx \
        SMESH_OctreeNode.hxx \
        SMESH_Comment.hxx \
        SMESH_ComputeError.hxx \
@@ -39,6 +41,7 @@ lib_LTLIBRARIES = libSMESHUtils.la
 
 dist_libSMESHUtils_la_SOURCES = \
        SMESH_Block.cxx \
+       SMESH_Quadtree.cxx \
        SMESH_Octree.cxx \
        SMESH_OctreeNode.cxx \
        SMESH_File.cxx
index 00778a729a6af359750e34b05ff09bf86426c6ad..cfaccbde2f400012ddc771146d0f0ed086bfeded 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH  SMESH_Octree : global Octree implementation
+//  SMESH  SMESH_Octree : Octree implementation
 //  File      : SMESH_Octree.cxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux(OCC)
  */
 //===========================================================================
 
-SMESH_Octree::SMESH_Octree (SMESH_Octree::Limit* limit):
-  myChildren(NULL),
-  myFather(NULL),
-  myIsLeaf( false ),
-  myLimit( limit ),
-  myLevel(0),
-  myBox(NULL)
+SMESH_Octree::SMESH_Octree (SMESH_TreeLimit* limit): TBaseTree( limit )
 {
 }
 
-//================================================================================
-/*!
- * \brief Compute the Octree
- */
-//================================================================================
-
-void SMESH_Octree::compute()
-{
-  if ( myLevel==0 )
-  {
-    myBox = buildRootBox();
-    if ( myLimit->myMinBoxSize > 0. && maxSize() <= myLimit->myMinBoxSize )
-      myIsLeaf = true;
-    else
-      buildChildren();
-  }
-}
-
-//======================================
-/*!
- * \brief SMESH_Octree Destructor
- */
-//======================================
-
-SMESH_Octree::~SMESH_Octree ()
-{
-  if(myChildren != NULL)
-  {
-    if(!isLeaf())
-    {
-      for(int i = 0; i<8; i++)
-        delete myChildren[i];
-      delete[] myChildren;
-      myChildren = 0;
-    }
-  }
-  if ( myBox )
-    delete myBox;
-  myBox = 0;
-  if ( level() == 0 )
-    delete myLimit;
-  myLimit = 0;
-}
-
 //=================================================================
 /*!
- * \brief Build the 8 children boxes and call buildChildrenData()
+ * \brief Allocate a bndbox according to childIndex. childIndex is zero based
  */
 //=================================================================
 
-void SMESH_Octree::buildChildren()
+Bnd_B3d* SMESH_Octree::newChildBox(int childIndex) const
 {
-  if ( isLeaf() ) return;
-
-  myChildren = new SMESH_Octree*[8];
-
-  gp_XYZ min = myBox->CornerMin();
-  gp_XYZ max = myBox->CornerMax();
+  gp_XYZ min = getBox()->CornerMin();
+  gp_XYZ max = getBox()->CornerMax();
   gp_XYZ HSize = (max - min)/2.;
-  gp_XYZ mid = min + HSize;
   gp_XYZ childHsize = HSize/2.;
 
-  // get the whole model size
-  double rootSize = 0;
-  {
-    SMESH_Octree* root = this;
-    while ( root->myLevel > 0 )
-      root = root->myFather;
-    rootSize = root->maxSize();
-  }
-  Standard_Real XminChild, YminChild, ZminChild;
-  gp_XYZ minChild;
-  for (int i = 0; i < 8; i++)
-  {
-    // We build the eight boxes, we need 2 points to do that:
-    // Min and Mid
-    // In binary, we can write i from 0 to 7
-    // For instance :
-    // 5 is 101, it corresponds here in coordinates to ZYX
-    // If coordinate is 0 in Y-> box from Ymin to Ymid
-    // If coordinate is 1 in Y-> box from Ymid to Ymax
-    // Same scheme for X and Z
-    // I need the minChild to build the Bnd_B3d box.
+  gp_XYZ minChild( min.X() + childIndex%2     * HSize.X(),
+                   min.Y() + (childIndex%4)/2 * HSize.Y(),
+                   min.Z() + ( childIndex>=4 ) * HSize.Z());
 
-    XminChild = (i%2==0)?min.X():mid.X();
-    YminChild = ((i%4)/2==0)?min.Y():mid.Y();
-    ZminChild = (i<4)?min.Z():mid.Z();
-    minChild.SetCoord(XminChild, YminChild, ZminChild);
-
-    // The child is of the same type than its father (For instance, a SMESH_OctreeNode)
-    // We allocate the memory we need for the child
-    myChildren[i] = allocateOctreeChild();
-    // and we assign to him its box.
-    myChildren[i]->myFather = this;
-    myChildren[i]->myLimit = myLimit;
-    myChildren[i]->myLevel = myLevel + 1;
-    myChildren[i]->myBox = new Bnd_B3d(minChild+childHsize,childHsize);
-    myChildren[i]->myBox->Enlarge( rootSize * 1e-10 );
-    if ( myLimit->myMinBoxSize > 0. && myChildren[i]->maxSize() <= myLimit->myMinBoxSize )
-      myChildren[i]->myIsLeaf = true;
-  }
-
-  // After building the 8 boxes, we put the data into the children.
-  buildChildrenData();
-
-  //After we pass to the next level of the Octree
-  for (int i = 0; i<8; i++)
-    myChildren[i]->buildChildren();
-}
-
-//================================================================================
-/*!
- * \brief Tell if Octree is a leaf or not
- *        An inheriting class can influence it via myIsLeaf protected field
- */
-//================================================================================
-
-bool SMESH_Octree::isLeaf() const
-{
-  return myIsLeaf || ((myLimit->myMaxLevel > 0) ? (level() >= myLimit->myMaxLevel) : false );
+  return new Bnd_B3d(minChild+childHsize,childHsize);
 }
 
 //===========================================================================
@@ -175,37 +67,13 @@ bool SMESH_Octree::isLeaf() const
 
 double SMESH_Octree::maxSize() const
 {
-  if ( myBox && !myBox->IsVoid() )
+  if ( getBox() && !getBox()->IsVoid() )
   {
-    gp_XYZ min = myBox->CornerMin();
-    gp_XYZ max = myBox->CornerMax();
+    gp_XYZ min = getBox()->CornerMin();
+    gp_XYZ max = getBox()->CornerMax();
     gp_XYZ Size = (max - min);
     double returnVal = (Size.X()>Size.Y())?Size.X():Size.Y();
     return (returnVal>Size.Z())?returnVal:Size.Z();
   }
   return 0.;
 }
-
-//================================================================================
-/*!
- * \brief Return height of the tree, full or from this level to topest leaf
- */
-//================================================================================
-
-int SMESH_Octree::getHeight(const bool full) const
-{
-  if ( full && myFather )
-    return myFather->getHeight( true );
-
-  if ( isLeaf() )
-    return 1;
-
-  int heigth = 0;
-  for (int i = 0; i<8; i++)
-  {
-    int h = myChildren[i]->getHeight( false );
-    if ( h > heigth )
-      heigth = h;
-  }
-  return heigth + 1;
-}
index 97d767a60cffb0d7bab10d123c625dd616c89273..9cc5eb4e37852aa36090889ed1a8521da21cddac 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMESH_Octree : global Octree implementation
+//  SMESH SMESH_Octree : Octree implementation
 //  File      : SMESH_Octree.hxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurélien Motteux (OCC)
 #define _SMESH_OCTREE_HXX_
 
 #include "SMESH_Utils.hxx"
+#include "SMESH_Tree.hxx"
 #include <Bnd_B3d.hxx>
 
-class SMESHUtils_EXPORT SMESH_Octree {
-
+//================================================================================
+/*!
+ * \brief 3D tree of anything.
+ * Methods to implement in a descendant are:
+ * - Bnd_B3d*       buildRootBox(); // box of the whole tree
+ * - descendant*    newChild() const; // a new child instance
+ * - void           buildChildrenData(); // Fill in data of the children
+ */
+class SMESHUtils_EXPORT SMESH_Octree : public SMESH_Tree< Bnd_B3d, 8 >
+{
 public:
-
-  // Data limiting the tree height
-  struct Limit {
-    // MaxLevel of the Octree
-    int    myMaxLevel;
-    // Minimal size of the Box
-    double myMinBoxSize;
-
-    // Default:
-    // maxLevel-> 8^8 = 16777216 terminal trees
-    // minSize -> box size not checked
-    Limit(int maxLevel=8, double minSize=0.):myMaxLevel(maxLevel),myMinBoxSize(minSize) {}
-    virtual ~Limit() {} // it can be inherited
-  };
+  typedef SMESH_Tree< Bnd_B3d, 8> TBaseTree;
 
   // Constructor. limit must be provided at tree root construction.
   // limit will be deleted by SMESH_Octree
-  SMESH_Octree (Limit* limit=0);
-
-  // Destructor
-  virtual ~SMESH_Octree ();
-
-  // Compute the Octree. Must be called by constructor of inheriting class
-  void                   compute();
-
-  // Tell if Octree is a leaf or not.
-  // An inheriting class can influence it via myIsLeaf protected field
-  bool                   isLeaf() const;
-
-  // Return its level
-  int                    level() const { return myLevel; }
-
-  // Get box to the 3d Bounding Box of the Octree
-  const Bnd_B3d&         getBox() const { return *myBox; }
+  SMESH_Octree (SMESH_TreeLimit* limit=0);
 
   // Compute the bigger dimension of my box
   double                 maxSize() const;
@@ -76,49 +56,16 @@ public:
   // Return index of a child the given point is in
   inline int             getChildIndex(double x, double y, double z, const gp_XYZ& boxMiddle)const;
 
-  // Return height of the tree, full or from this level to topest leaf
-  int                    getHeight(const bool full=true) const;
+ protected:
 
-protected:
-  // Return box of the whole tree
-  virtual Bnd_B3d*       buildRootBox() = 0;
-
-  // Constructor for children
-  virtual SMESH_Octree*  allocateOctreeChild() const = 0;
-
-  // Build the data in the 8 children
-  virtual void           buildChildrenData() = 0;
-
-  // members
-
-  // Array of 8 Octree children
-  SMESH_Octree** myChildren;
-
-  // Point the father, set to NULL for the level 0
-  SMESH_Octree*  myFather;
-
-  // Tell us if the Octree is a leaf or not
-  bool           myIsLeaf;
-
-  // Tree limit
-  const Limit*   myLimit;
-
-private:
-  // Build the 8 children boxes recursively
-  void                   buildChildren();
-
-  // Level of the Octree
-  int            myLevel;
-
-  Bnd_B3d*       myBox;
+  // Allocate a bndbox according to childIndex. childIndex is zero based
+  virtual Bnd_B3d*       newChildBox(int childIndex) const;
 };
 
 //================================================================================
 /*!
  * \brief Return index of a child the given point is in
  */
-//================================================================================
-
 inline int SMESH_Octree::getChildIndex(double x, double y, double z, const gp_XYZ& mid) const
 {
   return (x > mid.X()) + ( y > mid.Y())*2 + (z > mid.Z())*4;
index d14a50a2465106b190ee8ad57afc373a14ab16b5..821812340bb57920f4a870b80b1ede124a241022 100644 (file)
@@ -21,7 +21,7 @@
 //
 
 //  SMESH SMESH_OctreeNode : Octree with Nodes set
-//  inherites global class SMESH_Octree
+//  inherites class SMESH_Octree
 //  File      : SMESH_OctreeNode.cxx
 //  Created   : Tue Jan 16 16:00:00 2007
 //  Author    : Nicolas Geimer & Aurelien Motteux (OCC)
@@ -43,11 +43,11 @@ using namespace std;
  * \param minBoxSize - Minimal size of the Octree Box
  */
 //================================================================
+
 SMESH_OctreeNode::SMESH_OctreeNode (const TIDSortedNodeSet & theNodes, const int maxLevel,
                                     const int maxNbNodes , const double minBoxSize )
-  :SMESH_Octree( new SMESH_Octree::Limit( maxLevel,minBoxSize)),
-  myMaxNbNodes(maxNbNodes),
-  myNodes(theNodes)
+  :SMESH_Octree( new Limit( maxLevel,minBoxSize,maxNbNodes)),
+   myNodes(theNodes)
 {
   compute();
 }
@@ -58,9 +58,19 @@ SMESH_OctreeNode::SMESH_OctreeNode (const TIDSortedNodeSet & theNodes, const int
  */
 //================================================================================
 
-SMESH_OctreeNode::SMESH_OctreeNode (int maxNbNodes):
-  SMESH_Octree(), myMaxNbNodes(maxNbNodes)
+SMESH_OctreeNode::SMESH_OctreeNode ():SMESH_Octree()
+{
+}
+
+//================================================================================
+/*!
+ * \brief Return max number of nodes in a tree leaf
+ */
+//================================================================================
+
+int SMESH_OctreeNode::getMaxNbNodes() const
 {
+  return ((Limit*)myLimit)->myMaxNbNodes;
 }
 
 //==================================================================================
@@ -69,9 +79,9 @@ SMESH_OctreeNode::SMESH_OctreeNode (int maxNbNodes):
  */
 //==================================================================================
 
-SMESH_Octree* SMESH_OctreeNode::allocateOctreeChild() const
+SMESH_Octree* SMESH_OctreeNode::newChild() const
 {
-  return new SMESH_OctreeNode(myMaxNbNodes);
+  return new SMESH_OctreeNode();
 }
 
 //======================================
@@ -91,7 +101,7 @@ Bnd_B3d* SMESH_OctreeNode::buildRootBox()
     gp_XYZ p1( n1->X(), n1->Y(), n1->Z() );
     box->Add(p1);
   }
-  if ( myNodes.size() <= myMaxNbNodes )
+  if ( myNodes.size() <= getMaxNbNodes() )
     myIsLeaf = true;
 
   return box;
@@ -109,8 +119,8 @@ Bnd_B3d* SMESH_OctreeNode::buildRootBox()
 const bool SMESH_OctreeNode::isInside (const gp_XYZ& p, const double precision)
 {
   if (precision <= 0.)
-    return !(getBox().IsOut(p));
-  Bnd_B3d BoxWithPrecision = getBox();
+    return !(getBox()->IsOut(p));
+  Bnd_B3d BoxWithPrecision = *getBox();
   BoxWithPrecision.Enlarge(precision);
   return ! BoxWithPrecision.IsOut(p);
 }
@@ -123,8 +133,8 @@ const bool SMESH_OctreeNode::isInside (const gp_XYZ& p, const double precision)
 //================================================
 void SMESH_OctreeNode::buildChildrenData()
 {
-  gp_XYZ min = getBox().CornerMin();
-  gp_XYZ max = getBox().CornerMax();
+  gp_XYZ min = getBox()->CornerMin();
+  gp_XYZ max = getBox()->CornerMax();
   gp_XYZ mid = (min + max)/2.;
 
   TIDSortedNodeSet::iterator it = myNodes.begin();
@@ -140,7 +150,7 @@ void SMESH_OctreeNode::buildChildrenData()
   for (int i = 0; i < 8; i++)
   {
     SMESH_OctreeNode* myChild = dynamic_cast<SMESH_OctreeNode*> (myChildren[i]);
-    if ( myChild->myNodes.size() <= myMaxNbNodes )
+    if ( myChild->myNodes.size() <= getMaxNbNodes() )
       myChild->myIsLeaf = true;
   }
 }
@@ -200,7 +210,7 @@ bool SMESH_OctreeNode::NodesAround(const gp_XYZ &node,
     if (!isLeaf())
     {
       // first check a child containing node
-      gp_XYZ mid = (getBox().CornerMin() + getBox().CornerMax()) / 2.;
+      gp_XYZ mid = (getBox()->CornerMin() + getBox()->CornerMax()) / 2.;
       int nodeChild  = getChildIndex( node.X(), node.Y(), node.Z(), mid );
       if ( ((SMESH_OctreeNode*) myChildren[nodeChild])->NodesAround(node, dist2Nodes, precision))
         return true;
@@ -401,7 +411,7 @@ void SMESH_OctreeNode::UpdateByMoveNode( const SMDS_MeshNode* node, const gp_Pnt
   }
   else if ( myChildren )
   {
-    gp_XYZ mid = (getBox().CornerMin() + getBox().CornerMax()) / 2.;
+    gp_XYZ mid = (getBox()->CornerMin() + getBox()->CornerMax()) / 2.;
     int nodeChild  = getChildIndex( node->X(), node->Y(), node->Z(), mid );
     int pointChild = getChildIndex( toPnt.X(), toPnt.Y(), toPnt.Z(), mid );
     if ( nodeChild != pointChild )
@@ -420,7 +430,7 @@ void SMESH_OctreeNode::UpdateByMoveNode( const SMDS_MeshNode* node, const gp_Pnt
 SMESH_OctreeNodeIteratorPtr SMESH_OctreeNode::GetChildrenIterator()
 {
   return SMESH_OctreeNodeIteratorPtr
-    ( new SMDS_SetIterator< SMESH_OctreeNode*, SMESH_Octree** >
+    ( new SMDS_SetIterator< SMESH_OctreeNode*, TBaseTree** >
       ( myChildren, (( isLeaf() || !myChildren ) ? myChildren : &myChildren[ 8 ] )));
 }
 
index cc66a275b12fa8a7f85ec97a1d7d45ceff5dd559..eea34d11f8ea462f40d521c6150013066d978f16 100644 (file)
@@ -109,7 +109,16 @@ public:
 
 protected:
 
-  SMESH_OctreeNode (int maxNbNodes );
+  struct Limit : public SMESH_TreeLimit
+  {
+    int myMaxNbNodes;
+    Limit(int maxLevel, double minSize, int maxNbNodes)
+      :SMESH_TreeLimit(maxLevel, minSize), myMaxNbNodes(maxNbNodes) {}
+  };
+
+  int                   getMaxNbNodes() const;
+
+  SMESH_OctreeNode();
 
   // Compute the bounding box of the whole set of nodes myNodes
   virtual Bnd_B3d*      buildRootBox();
@@ -118,7 +127,7 @@ protected:
   virtual void          buildChildrenData();
 
   // Construct an empty SMESH_OctreeNode used by SMESH_Octree::buildChildren()
-  virtual SMESH_Octree* allocateOctreeChild() const;
+  virtual SMESH_Octree* newChild() const;
 
   // Return in result a list of nodes closed to Node and remove it from SetOfNodes
   void                  FindCoincidentNodes( const SMDS_MeshNode *            Node,
@@ -126,9 +135,6 @@ protected:
                                              std::list<const SMDS_MeshNode*>* Result,
                                              const double                     precision);
 
-  // The max number of nodes a leaf box can contain
-  int                myMaxNbNodes;
-
   // The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
   TIDSortedNodeSet   myNodes;
 
diff --git a/src/SMESHUtils/SMESH_Quadtree.cxx b/src/SMESHUtils/SMESH_Quadtree.cxx
new file mode 100644 (file)
index 0000000..680c4db
--- /dev/null
@@ -0,0 +1,76 @@
+// 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_Quadtree : Quartree implementation
+//  File      : SMESH_Quadtree.cxx
+//  Module    : SMESH
+//
+#include "SMESH_Quadtree.hxx"
+
+//===========================================================================
+/*!
+ * Constructor. limit must be provided at tree root construction.
+ * limit will be deleted by SMESH_Quadtree.
+ */
+//===========================================================================
+
+SMESH_Quadtree::SMESH_Quadtree (SMESH_TreeLimit* limit): TBaseTree( limit )
+{
+}
+
+//=================================================================
+/*!
+ * \brief Allocate a bndbox according to childIndex. childIndex is zero based
+ */
+//=================================================================
+
+Bnd_B2d* SMESH_Quadtree::newChildBox(int childIndex) const
+{
+  gp_XY min = getBox()->CornerMin();
+  gp_XY max = getBox()->CornerMax();
+  gp_XY HSize = (max - min)/2.;
+  gp_XY childHsize = HSize/2.;
+
+  gp_XY minChild( min.X() + childIndex%2     * HSize.X(),
+                  min.Y() + ( childIndex<2 ) * HSize.Y());
+
+  return new Bnd_B2d(minChild+childHsize,childHsize);
+}
+
+//===========================================================================
+/*!
+ * \brief Compute the bigger dimension of my box
+ */
+//===========================================================================
+
+double SMESH_Quadtree::maxSize() const
+{
+  if ( getBox() && !getBox()->IsVoid() )
+  {
+    gp_XY min = getBox()->CornerMin();
+    gp_XY max = getBox()->CornerMax();
+    gp_XY Size = (max - min);
+    double returnVal = (Size.X()>Size.Y())?Size.X():Size.Y();
+    return returnVal;
+  }
+  return 0.;
+}
diff --git a/src/SMESHUtils/SMESH_Quadtree.hxx b/src/SMESHUtils/SMESH_Quadtree.hxx
new file mode 100644 (file)
index 0000000..bb69a97
--- /dev/null
@@ -0,0 +1,73 @@
+// 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_Quadtree : Quartree implementation
+//  File      : SMESH_Quadtree.hxx
+//  Module    : SMESH
+//
+#ifndef _SMESH_Quadtree_HXX_
+#define _SMESH_Quadtree_HXX_
+
+#include "SMESH_Utils.hxx"
+#include "SMESH_Tree.hxx"
+#include <Bnd_B2d.hxx>
+
+/*!
+ * \brief 2D tree of anything.
+ * Methods to implement in a descendant are:
+ * - Bnd_B2d*       buildRootBox(); // box of the whole tree
+ * - descendant*    newChild() const; // a new child instance
+ * - void           buildChildrenData(); // Fill in data of the children
+ */
+class SMESHUtils_EXPORT SMESH_Quadtree : public SMESH_Tree< Bnd_B2d, 4 >
+{
+public:
+  typedef SMESH_Tree< Bnd_B2d, 4> TBaseTree;
+
+  // Constructor. limit must be provided at tree root construction.
+  // limit will be deleted by SMESH_Quadtree
+  SMESH_Quadtree (SMESH_TreeLimit* limit=0);
+
+  // Compute the bigger dimension of my box
+  double                 maxSize() const;
+
+  // Return index of a child the given point is in
+  //inline int             getChildIndex(double x, double y, const gp_XY& boxMiddle)const;
+
+ protected:
+
+  // Allocate a bndbox according to childIndex. childIndex is zero based
+  virtual Bnd_B2d*       newChildBox(int childIndex) const;
+};
+
+//================================================================================
+/*!
+ * \brief Return index of a child the given point is in
+ */
+//================================================================================
+
+// inline int SMESH_Quadtree::getChildIndex(double x, double y, const gp_XY& mid) const
+// {
+//   return (x > mid.X()) + ( y > mid.Y())*2 + (z > mid.Z())*4;
+// }
+
+#endif
diff --git a/src/SMESHUtils/SMESH_Tree.hxx b/src/SMESHUtils/SMESH_Tree.hxx
new file mode 100644 (file)
index 0000000..4d82291
--- /dev/null
@@ -0,0 +1,275 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE\r
+//\r
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2.1 of the License.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
+//\r
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
+//\r
+\r
+//  SMESH SMESH_Tree : tree implementation\r
+//  File      : SMESH_Tree.hxx\r
+//  Created   : Tue Jan 16 16:00:00 2007\r
+//  Author    : Nicolas Geimer & Aurélien Motteux (OCC)\r
+//  Module    : SMESH\r
+//\r
+#ifndef _SMESH_Tree_HXX_\r
+#define _SMESH_Tree_HXX_\r
+\r
+#include "SMESH_Utils.hxx"\r
+\r
+//================================================================================\r
+// Data limiting the tree height\r
+struct SMESH_TreeLimit {\r
+  // MaxLevel of the Tree\r
+  int    myMaxLevel;\r
+  // Minimal size of the Box\r
+  double myMinBoxSize;\r
+\r
+  // Default:\r
+  // maxLevel-> 8^8 = 16777216 terminal trees at most\r
+  // minSize -> box size not checked\r
+  SMESH_TreeLimit(int maxLevel=8, double minSize=0.):myMaxLevel(maxLevel),myMinBoxSize(minSize) {}\r
+  virtual ~SMESH_TreeLimit() {} // it can be inherited\r
+};\r
+\r
+//================================================================================\r
+/*!\r
+ * \brief Base class for 2D and 3D trees\r
+ */\r
+//================================================================================\r
+\r
+template< class BND_BOX,\r
+          int   NB_CHILDREN>\r
+class SMESH_Tree\r
+{\r
+ public:\r
+\r
+  typedef BND_BOX box_type;\r
+\r
+  // Constructor. limit must be provided at tree root construction.\r
+  // limit will be deleted by SMESH_Tree\r
+  SMESH_Tree (SMESH_TreeLimit* limit=0);\r
+\r
+  // Destructor\r
+  virtual ~SMESH_Tree ();\r
+\r
+  // Compute the Tree. Must be called by constructor of inheriting class\r
+  void                   compute();\r
+\r
+  // Tell if Tree is a leaf or not.\r
+  // An inheriting class can influence it via myIsLeaf protected field\r
+  bool                   isLeaf() const;\r
+\r
+  // Return its level\r
+  int                    level() const { return myLevel; }\r
+\r
+  // Return Bounding Box of the Tree\r
+  const box_type*        getBox() const { return myBox; }\r
+\r
+  // Return height of the tree, full or from this level to topest leaf\r
+  int                    getHeight(const bool full=true) const;\r
+\r
+  static int             nbChildren() { return NB_CHILDREN; }\r
+\r
+  // Compute the bigger dimension of my box\r
+  virtual double         maxSize() const = 0;\r
+\r
+protected:\r
+  // Return box of the whole tree\r
+  virtual box_type*      buildRootBox() = 0;\r
+\r
+  // Allocate a child\r
+  virtual SMESH_Tree*    newChild() const = 0;\r
+\r
+  // Allocate a bndbox according to childIndex. childIndex is zero based\r
+  virtual box_type*      newChildBox(int childIndex) const = 0;\r
+\r
+  // Fill in data of the children\r
+  virtual void           buildChildrenData() = 0;\r
+\r
+  // members\r
+\r
+  // Array of children\r
+  SMESH_Tree**   myChildren;\r
+\r
+  // Point the father, NULL for the level 0\r
+  SMESH_Tree*    myFather;\r
+\r
+  // Tell us if the Tree is a leaf or not\r
+  bool           myIsLeaf;\r
+\r
+  // Tree limit\r
+  const SMESH_TreeLimit* myLimit;\r
+\r
+private:\r
+  // Build the children recursively\r
+  void                   buildChildren();\r
+\r
+  // Level of the Tree\r
+  int            myLevel;\r
+\r
+  box_type*      myBox;\r
+};\r
+\r
+//===========================================================================\r
+/*!\r
+ * Constructor. limit must be provided at tree root construction.\r
+ * limit will be deleted by SMESH_Tree.\r
+ */\r
+//===========================================================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+SMESH_Tree<BND_BOX,NB_CHILDREN>::SMESH_Tree (SMESH_TreeLimit* limit):\r
+  myChildren(0),\r
+  myFather(0),\r
+  myIsLeaf( false ),\r
+  myLimit( limit ),\r
+  myLevel(0),\r
+  myBox(0)\r
+{\r
+  if ( !myLimit ) myLimit = new SMESH_TreeLimit();\r
+}\r
+\r
+//================================================================================\r
+/*!\r
+ * \brief Compute the Tree\r
+ */\r
+//================================================================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+void SMESH_Tree<BND_BOX,NB_CHILDREN>::compute()\r
+{\r
+  if ( myLevel==0 )\r
+  {\r
+    myBox = buildRootBox();\r
+    if ( myLimit->myMinBoxSize > 0. && maxSize() <= myLimit->myMinBoxSize )\r
+      myIsLeaf = true;\r
+    else\r
+      buildChildren();\r
+  }\r
+}\r
+\r
+//======================================\r
+/*!\r
+ * \brief SMESH_Tree Destructor\r
+ */\r
+//======================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+SMESH_Tree<BND_BOX,NB_CHILDREN>::~SMESH_Tree ()\r
+{\r
+  if ( myChildren )\r
+  {\r
+    if ( !isLeaf() )\r
+    {\r
+      for(int i = 0; i<NB_CHILDREN; i++)\r
+        delete myChildren[i];\r
+      delete[] myChildren;\r
+      myChildren = 0;\r
+    }\r
+  }\r
+  if ( myBox )\r
+    delete myBox;\r
+  myBox = 0;\r
+  if ( level() == 0 )\r
+    delete myLimit;\r
+  myLimit = 0;\r
+}\r
+\r
+//=================================================================\r
+/*!\r
+ * \brief Build the children boxes and call buildChildrenData()\r
+ */\r
+//=================================================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+void SMESH_Tree<BND_BOX,NB_CHILDREN>::buildChildren()\r
+{\r
+  if ( isLeaf() ) return;\r
+\r
+  myChildren = new SMESH_Tree*[NB_CHILDREN];\r
+\r
+  // get the whole model size\r
+  double rootSize = 0;\r
+  {\r
+    SMESH_Tree* root = this;\r
+    while ( root->myLevel > 0 )\r
+      root = root->myFather;\r
+    rootSize = root->maxSize();\r
+  }\r
+  for (int i = 0; i < NB_CHILDREN; i++)\r
+  {\r
+    // The child is of the same type than its father (For instance, a SMESH_OctreeNode)\r
+    // We allocate the memory we need for the child\r
+    myChildren[i] = newChild();\r
+    // and we assign to him its box.\r
+    myChildren[i]->myFather = this;\r
+    myChildren[i]->myLimit = myLimit;\r
+    myChildren[i]->myLevel = myLevel + 1;\r
+    myChildren[i]->myBox = newChildBox( i );\r
+    myChildren[i]->myBox->Enlarge( rootSize * 1e-10 );\r
+    if ( myLimit->myMinBoxSize > 0. && myChildren[i]->maxSize() <= myLimit->myMinBoxSize )\r
+      myChildren[i]->myIsLeaf = true;\r
+  }\r
+\r
+  // After building the NB_CHILDREN boxes, we put the data into the children.\r
+  buildChildrenData();\r
+\r
+  //After we pass to the next level of the Tree\r
+  for (int i = 0; i<NB_CHILDREN; i++)\r
+    myChildren[i]->buildChildren();\r
+}\r
+\r
+//================================================================================\r
+/*!\r
+ * \brief Tell if Tree is a leaf or not\r
+ *        An inheriting class can influence it via myIsLeaf protected field\r
+ */\r
+//================================================================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+bool SMESH_Tree<BND_BOX,NB_CHILDREN>::isLeaf() const\r
+{\r
+  return myIsLeaf || ((myLimit->myMaxLevel > 0) ? (level() >= myLimit->myMaxLevel) : false );\r
+}\r
+\r
+//================================================================================\r
+/*!\r
+ * \brief Return height of the tree, full or from this level to topest leaf\r
+ */\r
+//================================================================================\r
+\r
+template< class BND_BOX, int NB_CHILDREN>\r
+int SMESH_Tree<BND_BOX,NB_CHILDREN>::getHeight(const bool full) const\r
+{\r
+  if ( full && myFather )\r
+    return myFather->getHeight( true );\r
+\r
+  if ( isLeaf() )\r
+    return 1;\r
+\r
+  int heigth = 0;\r
+  for (int i = 0; i<NB_CHILDREN; i++)\r
+  {\r
+    int h = myChildren[i]->getHeight( false );\r
+    if ( h > heigth )\r
+      heigth = h;\r
+  }\r
+  return heigth + 1;\r
+}\r
+\r
+#endif\r
index edb0f247f8e0a1a81f0d75e6938913cfab4719a4..0dbdd74226f2f5ef47a19b241e021a0b25823b07 100644 (file)
@@ -119,6 +119,28 @@ struct SMESH_TNodeXYZ : public gp_XYZ
   bool operator==(const SMESH_TNodeXYZ& other) const { return _node == other._node; }
 };
 
+//--------------------------------------------------
+/*!
+ * \brief Data of a node generated on FACE boundary
+ */
+//--------------------------------------------------
+typedef struct uvPtStruct
+{
+  double param;
+  double normParam;
+  double u, v; // original 2d parameter
+  double x, y; // 2d parameter, normalized [0,1]
+  const SMDS_MeshNode * node;
+
+  struct NodeAccessor // accessor to iterate on nodes in UVPtStructVec
+  {
+    static const SMDS_MeshNode* value(std::vector< uvPtStruct >::const_iterator it)
+    { return it->node; }
+  };
+} UVPtStruct;
+
+typedef std::vector< UVPtStruct > UVPtStructVec;
+
 // --------------------------------------------------------------------------------
 // class SMESH_SequenceOfElemPtr
 #include <NCollection_DefineSequence.hxx>
index 4f05fa7a4ee6baf0d81f08dfa129f4607a6aea4d..08ba9b7021475c0b7c8d924aa5b2dab92b1d7a5d 100644 (file)
@@ -109,7 +109,8 @@ libSMESHEngine_la_CPPFLAGS = \
        -I$(srcdir)/../DriverCGNS \
        -I$(srcdir)/../SMESH \
        -I$(srcdir)/../SMESHUtils \
-       -I$(top_builddir)/idl
+       -I$(top_builddir)/idl \
+       -I$(top_builddir)
 
 libSMESHEngine_la_LDFLAGS  = \
        ../../idl/libSalomeIDLSMESH.la \
index 91f6e7effd1d6482db1de829fd9aaa67fac89d1d..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" ))
   {
@@ -1510,7 +1569,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
          method == "ExportToMEDX" ) { // ExportToMEDX() --> ExportMED()
       theCommand->SetMethod( "ExportMED" );
     }
-    else if ( method == "ExportCGNS" )
+    else if ( method == "ExportCGNS" || method == "ExportGMF" )
     { // ExportCGNS(part, ...) -> ExportCGNS(..., part)
       _pyID partID = theCommand->GetArg( 1 );
       int nbArgs = theCommand->GetNbArgs();
@@ -1541,26 +1600,42 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
   {
     _pyID hypID  = theCommand->GetArg( 2 );
     _pyID geomID = theCommand->GetArg( 1 );
+    bool isLocal = ( geomID != GetGeom() );
 
     // check if this mesh still has corresponding addition command
-    bool hasAddCmd = false;
-    list< Handle(_pyCommand) >::iterator cmd = myAddHypCmds.begin();
-    while ( cmd != myAddHypCmds.end() )
+    Handle(_pyCommand) addCmd;
+    list< Handle(_pyCommand) >::iterator cmd;
+    list< Handle(_pyCommand) >* addCmds[2] = { &myAddHypCmds, &myNotConvertedAddHypCmds };
+    for ( int i = 0; i < 2; ++i )
     {
-      // AddHypothesis(geom, hyp)
-      if ( hypID  == (*cmd)->GetArg( 2 ) &&
-           geomID == (*cmd)->GetArg( 1 )) { // erase both (add and remove) commands
-        theCommand->Clear();
-        (*cmd)->Clear();
-        cmd = myAddHypCmds.erase( cmd );
-        hasAddCmd = true;
-      }
-      else {
-        ++cmd;
+      list< Handle(_pyCommand )> & addHypCmds = *(addCmds[i]);
+      for ( cmd = addHypCmds.begin(); cmd != addHypCmds.end(); )
+      {
+        bool sameHyp = true;
+        if ( hypID != (*cmd)->GetArg( 1 ) && hypID != (*cmd)->GetArg( 2 ))
+          sameHyp = false; // other hyp
+        if ( (*cmd)->GetNbArgs() == 2 &&
+             geomID != (*cmd)->GetArg( 1 ) && geomID != (*cmd)->GetArg( 2 ))
+          sameHyp = false; // other geom
+        if ( (*cmd)->GetNbArgs() == 1 && isLocal )
+          sameHyp = false; // other geom
+        if ( sameHyp )
+        {
+          addCmd = *cmd;
+          cmd    = addHypCmds.erase( cmd );
+          if ( !theGen->IsToKeepAllCommands() ) {
+            addCmd->Clear();
+            theCommand->Clear();
+          }
+        }
+        else
+        {
+          ++cmd;
+        }
       }
     }
     Handle(_pyHypothesis) hyp = theGen->FindHyp( hypID );
-    if ( ! hasAddCmd && hypID.Length() != 0 ) { // hypo addition already wrapped
+    if ( !theCommand->IsEmpty() && !hypID.IsEmpty() ) {
       // RemoveHypothesis(geom, hyp) --> RemoveHypothesis( hyp, geom=0 )
       _pyID geom = theCommand->GetArg( 1 );
       theCommand->RemoveArgs();
@@ -1588,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
   {
@@ -1742,6 +1800,7 @@ void _pyMesh::Flush()
       addCmd->SetArg( 1, algoID );
       if ( isLocalAlgo )
         addCmd->SetArg( 2, geom );
+      myNotConvertedAddHypCmds.push_back( addCmd );
     }
   }
 
@@ -1762,6 +1821,7 @@ void _pyMesh::Flush()
       addCmd->SetArg( 1, hypID );
       if ( geom != GetGeom() )
         addCmd->SetArg( 2, geom );
+      myNotConvertedAddHypCmds.push_back( addCmd );
     }
   }
 
@@ -1911,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",
@@ -1937,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() ) {
@@ -1949,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)
     {
@@ -1980,7 +2063,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
     }
   }
 
-  // ExtrusionSweep0D() -> ExtrusionSweep()
+  // ExtrusionSweep0D()       -> ExtrusionSweep()
   // ExtrusionSweepObject0D() -> ExtrusionSweepObject()
   if ( !isPyMeshMethod && ( method == "ExtrusionSweep0D"  ||
                             method == "ExtrusionSweepObject0D" ))
@@ -1990,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" ||
@@ -2027,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" )
@@ -2065,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 );
@@ -2076,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();
@@ -3748,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 );
   }
@@ -3846,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
@@ -3923,8 +4006,6 @@ void _pyGroup::Process( const Handle(_pyCommand)& theCommand)
 //================================================================================
 /*!
  * \brief Prevent clearing "DoubleNode...() command if a group created by it is removed
- * 
- * 
  */
 //================================================================================
 
index 36212e0686a3bffbe5ff3bb02f3dae63d229db1b..feb720f5f913d5c8d5d3a633ef4503c74827538d 100644 (file)
@@ -296,7 +296,7 @@ private:
 class _pyMesh: public _pyObject
 {
   std::list< Handle(_pyHypothesis) > myHypos;
-  std::list< Handle(_pyCommand) >    myAddHypCmds;
+  std::list< Handle(_pyCommand) >    myAddHypCmds, myNotConvertedAddHypCmds;
   std::list< Handle(_pySubMesh) >    mySubmeshes;
   std::list< Handle(_pyGroup) >      myGroups;
   std::list< Handle(_pyMeshEditor)>  myEditors;
@@ -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 dc47f8a848a90ef34afd293464453bb63e1add95..ca74c6a0b834164368cd28da71311f63475d8bd7 100644 (file)
@@ -65,6 +65,7 @@
 #endif
 
 #include "SMESH_Gen_i.hxx"
+#include "SMESH_version.h"
 
 #include "SMDS_EdgePosition.hxx"
 #include "SMDS_FacePosition.hxx"
@@ -1231,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 )
 {
@@ -1253,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();
 }
@@ -1383,8 +1387,8 @@ SMESH::compute_error_array* SMESH_Gen_i::GetComputeErrors( SMESH::SMESH_Mesh_ptr
       while ( smIt->more() )
       {
         sm = smIt->next();
-        if ( sm->GetSubShape().ShapeType() == TopAbs_VERTEX )
-          break;
+        // if ( sm->GetSubShape().ShapeType() == TopAbs_VERTEX )
+        //   break;
         SMESH_ComputeErrorPtr error = sm->GetComputeError();
         if ( error && !error->IsOK() && error->myAlgo )
         {
@@ -2213,6 +2217,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
           SMESH_Mesh_i* anInitImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( anInitMesh ).in() );
           if ( anInitImpl ) {
             ::SMESH_Mesh& aInitLocMesh = anInitImpl->GetImpl();
+            aInitLocMesh.Load();
             SMESHDS_Mesh* anInitMeshDS = aInitLocMesh.GetMeshDS();
 
             TIDsMap nodesMap;
@@ -2309,7 +2314,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
                   }
                 }
               }
-            }//elems loop
+            } //elems loop
 
             // copy orphan nodes
             SMDS_NodeIteratorPtr  itNodes = anInitMeshDS->nodesIterator();
@@ -2411,8 +2416,8 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
             }
 
             // check that current group name and type don't have identical ones in union mesh
-            for (int i = 0; i < aListOfGroups->length(); i++) {
-              aGroup = aListOfGroups[i];
+            for (int iG = 0; iG < aListOfGroups->length(); iG++) {
+              aGroup = aListOfGroups[iG];
               aListOfNewGroups.clear();
               aGroupType = aGroup->GetType();
               aGroupName = aGroup->GetName();
@@ -4913,6 +4918,16 @@ int SMESH_Gen_i::GetCurrentStudyID()
   return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId();
 }
 
+// Version information
+char* SMESH_Gen_i::getVersion()
+{
+#if SMESH_DEVELOPMENT
+  return CORBA::string_dup(SMESH_VERSION_STR"dev");
+#else
+  return CORBA::string_dup(SMESH_VERSION_STR);
+#endif
+}
+
 //=============================================================================
 /*!
  *  SMESHEngine_factory
index 1165ac142fa8c8267f707d0c112d9e6d48aa7e87..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 );
 
@@ -441,6 +442,12 @@ public:
     return aResultSO._retn();
   }
 
+  // ============
+  // Version information
+  // ============
+
+  virtual char* getVersion();
+
   // ============
   // Dump python
   // ============
index a5b5f88c16998a07f94d73e784c616a7673aa502..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);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor); // store preview data or new elements
-
-  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);
-
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  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);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if(theCopy || myPreviewMode)
-    storeResult(myEditor);
-
-  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);
+      getEditor().Transform (*workElements, aTrsf, theCopy, theMakeGroups, theTargetMesh);
 
-  if(theCopy || myPreviewMode )
-    storeResult(myEditor);
-
-  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();
@@ -4450,34 +4534,25 @@ void SMESH_MeshEditor_i::FindEqualElements(SMESH::SMESH_IDSource_ptr      theObj
   SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow(theObject);
   if ( !(!group->_is_nil() && group->GetType() == SMESH::NODE) )
   {
-    typedef list<int> TListOfIDs;
-    set<const SMDS_MeshElement*> elems;
-    SMESH::long_array_var aElementsId = theObject->GetIDs();
-    SMESHDS_Mesh* aMesh = GetMeshDS();
-
-    for(int i = 0; i < aElementsId->length(); i++) {
-      CORBA::Long anID = aElementsId[i];
-      const SMDS_MeshElement * elem = aMesh->FindElement(anID);
-      if (elem) {
-        elems.insert(elem);
-      }
-    }
+    TIDSortedElemSet elems;
+    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() );
 
-    ::SMESH_MeshEditor::TListOfListOfElementsID::iterator arraysIt = aListOfListOfElementsID.begin();
-    for (CORBA::Long j = 0; arraysIt != aListOfListOfElementsID.end(); ++arraysIt, ++j) {
+    ::SMESH_MeshEditor::TListOfListOfElementsID::iterator arraysIt =
+        aListOfListOfElementsID.begin();
+    for (CORBA::Long j = 0; arraysIt != aListOfListOfElementsID.end(); ++arraysIt, ++j)
+    {
       SMESH::long_array& aGroup = (*GroupsOfElementsID)[ j ];
-      TListOfIDs& listOfIDs = *arraysIt;
+      list<int>&      listOfIDs = *arraysIt;
       aGroup.length( listOfIDs.size() );
-      TListOfIDs::iterator idIt = listOfIDs.begin();
-      for (int k = 0; idIt != listOfIDs.end(); ++idIt, ++k ) {
+      list<int>::iterator idIt = listOfIDs.begin();
+      for (int k = 0; idIt != listOfIDs.end(); ++idIt, ++k )
         aGroup[ k ] = *idIt;
-      }
     }
 
     TPythonDump() << "equal_elements = " << this << ".FindEqualElements( "
@@ -4513,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 );
 
@@ -4529,7 +4604,7 @@ void SMESH_MeshEditor_i::MergeEqualElements()
 {
   initData();
 
-  myEditor.MergeEqualElements();
+  getEditor().MergeEqualElements();
 
   myMesh->GetMeshDS()->Modified();
 
@@ -4549,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();
@@ -4573,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( "
@@ -4635,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 ) {
@@ -4646,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();
@@ -4663,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
     {
@@ -4671,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
@@ -4715,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 << ", "
@@ -4778,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 << ", "
@@ -4847,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 );
@@ -4876,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,
@@ -4886,7 +4959,6 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
                                        CreatePolygons,
                                        CreatePolyedrs) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -4909,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 );
@@ -4934,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,
@@ -4943,7 +5015,6 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
                                        true,
                                        false, false) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -4968,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 );
@@ -4995,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,
@@ -5005,7 +5076,6 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
                                        CreatePolygons,
                                        CreatePolyedrs) );
 
-  storeResult(myEditor);
 
   myMesh->GetMeshDS()->Modified();
   myMesh->SetIsModified( true );
@@ -5029,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 );
@@ -5056,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 );
@@ -5084,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();
@@ -5092,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;
@@ -5102,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 )
@@ -5118,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 );
@@ -5131,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 )
@@ -5151,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() )
     {
@@ -5163,7 +5232,7 @@ void SMESH_MeshEditor_i::ConvertToQuadraticObject(CORBA::Boolean            theF
     }
     else
     {
-      myEditor.ConvertToQuadratic(theForce3d, elems);
+      getEditor().ConvertToQuadratic(theForce3d, elems);
     }
   }
   myMesh->GetMeshDS()->Modified();
@@ -5184,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() )
     {
@@ -5196,7 +5265,7 @@ void SMESH_MeshEditor_i::ConvertFromQuadraticObject(SMESH::SMESH_IDSource_ptr th
     }
     else
     {
-      myEditor.ConvertFromQuadratic(elems);
+      getEditor().ConvertFromQuadratic(elems);
     }
   }
   myMesh->GetMeshDS()->Modified();
@@ -5253,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;
 }
@@ -5301,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 );
 
@@ -5468,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 )
@@ -5544,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 )
@@ -5586,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 )
@@ -5628,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 )
@@ -5696,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;
@@ -5717,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());
@@ -5775,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 )
@@ -5832,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 )
@@ -5900,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;
@@ -5919,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());
@@ -5975,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 )
@@ -6026,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);
@@ -6035,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;
@@ -6125,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;
@@ -6153,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();
@@ -6173,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
@@ -6202,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();
@@ -6220,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
@@ -6309,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;
@@ -6337,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();
@@ -6481,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,
@@ -6489,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 3bcdb181ca7898578e1983fe74f1630f9bbd912d..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 << " )";
 }
 
 //================================================================================
@@ -3025,8 +3026,8 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart,
   SMESH_MeshPartDS partDS( meshPart );
   _impl->ExportCGNS(file, &partDS);
 
-  TPythonDump() << _this() << ".ExportCGNS( r'"
-                << file << "', " << overwrite << ", "<< meshPart<< ")";
+  TPythonDump() << _this() << ".ExportCGNS( "
+                << meshPart<< ", r'" << file << "', " << overwrite << ")";
 #else
   THROW_SALOME_CORBA_EXCEPTION("CGNS library is unavailable", SALOME::INTERNAL_ERROR);
 #endif
@@ -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,10 +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( r'"
-                << file << "', "<< meshPart<< ")";
+  TPythonDump() << _this() << ".ExportGMF( "
+                << meshPart<< ", r'"
+                << file << "', "
+                << withRequiredGroups << ")";
 }
 
 //=============================================================================
@@ -5051,3 +5055,5 @@ _GET_ITER_DEFINE( SMDS_VolumeIteratorPtr, volumesIterator, SMDS_MeshVolume, SMDS
 // END Implementation of SMESH_MeshPartDS
 //
 //================================================================================
+
+
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 dfeaba4fb7da741e3d39b1b8d1054d87ea9d8c97..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
@@ -283,6 +283,29 @@ class Mesh_Algorithm:
         hyp.SetIgnoreFaces(ignoreFaces)
         return hyp
 
+    ## Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral
+    #  elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms:
+    #  NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO, BLSURF
+    #  @param thickness total thickness of layers of quadrilaterals
+    #  @param numberOfLayers number of layers
+    #  @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
+    #  @param ignoreEdges list of geometrical edge (or their ids) not to generate layers on
+    #  @ingroup l3_hypos_additi
+    def ViscousLayers2D(self, thickness, numberOfLayers, stretchFactor, ignoreEdges=[]):
+        if not isinstance(self.algo, SMESH._objref_SMESH_2D_Algo):
+            raise TypeError, "ViscousLayers2D are supported by 2D algorithms only"
+        if not "ViscousLayers2D" in self.GetCompatibleHypothesis():
+            raise TypeError, "ViscousLayers2D are not supported by %s"%self.algo.GetName()
+        if ignoreEdges and isinstance( ignoreEdges[0], geompyDC.GEOM._objref_GEOM_Object ):
+            ignoreEdges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in ignoreEdges ]
+        hyp = self.Hypothesis("ViscousLayers2D",
+                              [thickness, numberOfLayers, stretchFactor, ignoreEdges])
+        hyp.SetTotalThickness(thickness)
+        hyp.SetNumberLayers(numberOfLayers)
+        hyp.SetStretchFactor(stretchFactor)
+        hyp.SetIgnoreEdges(ignoreEdges)
+        return hyp
+
     ## Transform a list of ether edges or tuples (edge, 1st_vertex_of_edge)
     #  into a list acceptable to SetReversedEdges() of some 1D hypotheses
     #  @ingroup l3_hypos_1dhyps
index e831115fa0fa62d2afc4bc91b6ae74b182accc67..1739ddf8699de103e830bc240e503216593c7a53 100644 (file)
@@ -76,6 +76,7 @@ salomeinclude_HEADERS = \
        StdMeshers_Import_1D.hxx \
        StdMeshers_Import_1D2D.hxx \
        StdMeshers_ViscousLayers.hxx \
+       StdMeshers_ViscousLayers2D.hxx \
        StdMeshers_Projection_1D2D.hxx \
        StdMeshers_CartesianParameters3D.hxx \
        StdMeshers_Cartesian_3D.hxx
@@ -133,6 +134,7 @@ dist_libStdMeshers_la_SOURCES = \
        StdMeshers_Import_1D.cxx \
        StdMeshers_Import_1D2D.cxx \
        StdMeshers_ViscousLayers.cxx \
+       StdMeshers_ViscousLayers2D.cxx \
        StdMeshers_Projection_1D2D.cxx \
        StdMeshers_CartesianParameters3D.cxx \
        StdMeshers_Cartesian_3D.cxx
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 13c2d626316a46f1d5098e4912b2bffc1e8b5d4a..36f0680cc4267e48bd301fc4ff4df772709f3011 100644 (file)
  */
 //================================================================================
 
-StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
-                                         const TopoDS_Edge& theEdge,
-                                         SMESH_Mesh*        theMesh,
-                                         const bool         theIsForward,
-                                         const bool         theIgnoreMediumNodes)
+StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&   theFace,
+                                         const TopoDS_Edge&   theEdge,
+                                         SMESH_Mesh*          theMesh,
+                                         const bool           theIsForward,
+                                         const bool           theIgnoreMediumNodes,
+                                         SMESH_ProxyMesh::Ptr theProxyMesh)
 {
   list<TopoDS_Edge> edges(1,theEdge);
-  *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward, theIgnoreMediumNodes );
+  *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward,
+                               theIgnoreMediumNodes, theProxyMesh );
 }
 
 //================================================================================
@@ -80,11 +82,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
  */
 //================================================================================
 
-StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
-                                         list<TopoDS_Edge>& theEdges,
-                                         SMESH_Mesh*        theMesh,
-                                         const bool         theIsForward,
-                                         const bool         theIgnoreMediumNodes)
+StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face&   theFace,
+                                         list<TopoDS_Edge>&   theEdges,
+                                         SMESH_Mesh*          theMesh,
+                                         const bool           theIsForward,
+                                         const bool           theIgnoreMediumNodes,
+                                         SMESH_ProxyMesh::Ptr theProxyMesh)
 {
   int nbEdges = theEdges.size();
   myEdge.resize      ( nbEdges );
@@ -98,13 +101,14 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
   myIsUniform.resize ( nbEdges, true );
   myLength             = 0;
   myNbPonits           = myNbSegments = 0;
-  myMesh               = theMesh;
+  myProxyMesh          = theProxyMesh;
   myMissingVertexNodes = false;
   myIgnoreMediumNodes  = theIgnoreMediumNodes;
   myDefaultPnt2d       = gp_Pnt2d( 1e+100, 1e+100 );
+  if ( !myProxyMesh ) myProxyMesh.reset( new SMESH_ProxyMesh( *theMesh ));
   if ( nbEdges == 0 ) return;
 
-  SMESHDS_Mesh* meshDS = theMesh->GetMeshDS();
+  SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
 
   int nbDegen = 0;
   list<TopoDS_Edge>::iterator edge = theEdges.begin();
@@ -126,7 +130,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
     if ( myEdge[i].Orientation() == TopAbs_REVERSED )
       std::swap( myFirst[i], myLast[i] );
 
-    if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( *edge )) {
+    if ( const SMESHDS_SubMesh* sm = myProxyMesh->GetSubMesh( *edge )) {
       int nbN = sm->NbNodes();
       if ( theIgnoreMediumNodes ) {
         SMDS_ElemIteratorPtr elemIt = sm->GetElements();
@@ -136,6 +140,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
       myNbPonits += nbN;
       myNbSegments += sm->NbElements();
     }
+
     // TopExp::FirstVertex() and TopExp::LastVertex() return NULL from INTERNAL edge
     vExp.Initialize( *edge );
     if ( vExp.Value().Orientation() == TopAbs_REVERSED ) vExp.Next();
@@ -144,7 +149,7 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
     else
       myMissingVertexNodes = true;
 
-    // check if edge has non-uniform parametrization (issue 0020705)
+    // check if the edge has a non-uniform parametrization (issue 0020705)
     if ( !myC2d[i].IsNull() && myEdgeLength[i] > DBL_MIN)
     {
       Geom2dAdaptor_Curve A2dC( myC2d[i],
@@ -163,7 +168,12 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
         myC3dAdaptor[i].Load( C3d, fp,lp );
       }
     }
-  }
+    // reverse a proxy submesh
+    if ( !theIsForward )
+      reverseProxySubmesh( myEdge[i] );
+
+  } // loop on edges
+
   vExp.Initialize( theEdges.back() );
   if ( vExp.Value().Orientation() != TopAbs_REVERSED ) vExp.Next();
   if ( vExp.More() )
@@ -203,8 +213,8 @@ StdMeshers_FaceSide::StdMeshers_FaceSide(const SMDS_MeshNode* theNode,
                                          const StdMeshers_FaceSide* theSide)
 {
   myC2d.resize(1);
-  myLength = 0;
-  myMesh = theSide->GetMesh();
+  myLength       = 0;
+  myProxyMesh    = theSide->myProxyMesh;
   myDefaultPnt2d = thePnt2d;
 
   myPoints = theSide->GetUVPtStruct();
@@ -232,55 +242,70 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
 
     if ( NbEdges() == 0 ) return myPoints;
 
-    SMESHDS_Mesh* meshDS = myMesh->GetMeshDS();
-    SMESH_MesherHelper helper(*myMesh);
+    SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
+    SMESH_MesherHelper helper(*myProxyMesh->GetMesh());
     bool paramOK;
+    double eps = 1e-100;
 
     // sort nodes of all edges putting them into a map
 
     map< double, const SMDS_MeshNode*> u2node;
-    //int nbOnDegen = 0;
-    for ( int i = 0; i < myEdge.size(); ++i )
+    vector< const SMESH_ProxyMesh::SubMesh* > proxySubMesh( myEdge.size());
+    int nbProxyNodes = 0;
+    for ( size_t iE = 0; iE < myEdge.size(); ++iE )
     {
+      proxySubMesh[iE] = myProxyMesh->GetProxySubMesh( myEdge[iE] );
+      if ( proxySubMesh[iE] )
+      {
+        if ( proxySubMesh[iE]->GetUVPtStructVec().empty() ) {
+          proxySubMesh[iE] = 0;
+        }
+        else {
+          nbProxyNodes += proxySubMesh[iE]->GetUVPtStructVec().size() - 1;
+          if ( iE+1 == myEdge.size() )
+            ++nbProxyNodes;
+          continue;
+        }
+      }
       // Put 1st vertex node of a current edge
       TopoDS_Vertex VV[2]; // TopExp::FirstVertex() returns NULL for INTERNAL edge
-      VV[0] = SMESH_MesherHelper::IthVertex( 0, myEdge[i]);
-      VV[1] = SMESH_MesherHelper::IthVertex( 1, myEdge[i]);
+      VV[0] = SMESH_MesherHelper::IthVertex( 0, myEdge[iE]);
+      VV[1] = SMESH_MesherHelper::IthVertex( 1, myEdge[iE]);
       const SMDS_MeshNode* node = SMESH_Algo::VertexNode( VV[0], meshDS );
-      double prevNormPar = ( i == 0 ? 0 : myNormPar[ i-1 ]); // normalized param
+      double prevNormPar = ( iE == 0 ? 0 : myNormPar[ iE-1 ]); // normalized param
       if ( node ) { // nodes on internal vertices may be missing
         u2node.insert( u2node.end(), make_pair( prevNormPar, node ));
       }
-      else if ( i == 0 ) {
+      else if ( iE == 0 ) {
         MESSAGE(" NO NODE on VERTEX" );
         return myPoints;
       }
 
       // Put internal nodes
-      if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( myEdge[i] ))
+      if ( const SMESHDS_SubMesh* sm = myProxyMesh->GetSubMesh( myEdge[iE] ))
       {
         vector< pair< double, const SMDS_MeshNode*> > u2nodeVec;
         u2nodeVec.reserve( sm->NbNodes() );
         SMDS_NodeIteratorPtr nItr = sm->GetNodes();
-        double paramSize = myLast[i] - myFirst[i];
-        double r         = myNormPar[i] - prevNormPar;
-        helper.SetSubShape( myEdge[i] );
+        double paramSize = myLast[iE] - myFirst[iE];
+        double r         = myNormPar[iE] - prevNormPar;
+        helper.SetSubShape( myEdge[iE] );
         helper.ToFixNodeParameters( true );
-        if ( !myIsUniform[i] )
+        if ( !myIsUniform[iE] )
           while ( nItr->more() )
           {
             const SMDS_MeshNode* node = nItr->next();
             if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
               continue;
-            double u = helper.GetNodeU( myEdge[i], node, 0, &paramOK );
+            double u = helper.GetNodeU( myEdge[iE], node, 0, &paramOK );
             double aLenU = GCPnts_AbscissaPoint::Length
-              ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), myFirst[i], u );
-            if ( myEdgeLength[i] < aLenU ) // nonregression test "3D_mesh_NETGEN/G6"
+              ( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[iE]), myFirst[iE], u );
+            if ( myEdgeLength[iE] < aLenU ) // nonregression test "3D_mesh_NETGEN/G6"
             {
               u2nodeVec.clear();
               break;
             }
-            double normPar = prevNormPar + r*aLenU/myEdgeLength[i];
+            double normPar = prevNormPar + r*aLenU/myEdgeLength[iE];
             u2nodeVec.push_back( make_pair( normPar, node ));
           }
         nItr = sm->GetNodes();
@@ -290,18 +315,18 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
             const SMDS_MeshNode* node = nItr->next();
             if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
               continue;
-            double u = helper.GetNodeU( myEdge[i], node, 0, &paramOK );
+            double u = helper.GetNodeU( myEdge[iE], node, 0, &paramOK );
 
             // paramSize is signed so orientation is taken into account
-            double normPar = prevNormPar + r * ( u - myFirst[i] ) / paramSize;
+            double normPar = prevNormPar + r * ( u - myFirst[iE] ) / paramSize;
             u2nodeVec.push_back( make_pair( normPar, node ));
           }
         for ( size_t j = 0; j < u2nodeVec.size(); ++j )
-        u2node.insert( u2node.end(), u2nodeVec[j] );
+          u2node.insert( u2node.end(), u2nodeVec[j] );
       }
 
       // Put 2nd vertex node for a last edge
-      if ( i+1 == myEdge.size() ) {
+      if ( iE+1 == myEdge.size() ) {
         node = SMESH_Algo::VertexNode( VV[1], meshDS );
         if ( !node ) {
           MESSAGE(" NO NODE on VERTEX" );
@@ -309,8 +334,10 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
         }
         u2node.insert( u2node.end(), make_pair( 1., node ));
       }
-    }
-    if ( u2node.size() != myNbPonits ) {
+    } // loop on myEdge's
+
+    if ( u2node.size() + nbProxyNodes != myNbPonits )
+    {
       MESSAGE("Wrong node parameters on edges, u2node.size():"
               <<u2node.size()<<" !=  myNbPonits:"<<myNbPonits);
       return myPoints;
@@ -318,62 +345,86 @@ const vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool   isXConst,
 
     // fill array of UVPtStruct
 
-    vector<uvPtStruct>* points = const_cast<vector<uvPtStruct>*>( &myPoints );
-    points->resize( myNbPonits );
+    UVPtStructVec& points = const_cast< UVPtStructVec& >( myPoints );
+    points.resize( myNbPonits );
 
-    int EdgeIndex = 0;
-    double prevNormPar = 0, paramSize = myNormPar[ EdgeIndex ];
+    int iPt = 0;
+    double prevNormPar = 0, paramSize = myNormPar[ 0 ];
     map< double, const SMDS_MeshNode*>::iterator u_node = u2node.begin();
-    for (int i = 0 ; u_node != u2node.end(); ++u_node, ++i ) {
-      UVPtStruct & uvPt = (*points)[i];
-      uvPt.node = u_node->second;
-      uvPt.x = uvPt.y = uvPt.normParam = u_node->first;
-      if ( isXConst ) uvPt.x = constValue;
-      else            uvPt.y = constValue;
-      const SMDS_EdgePosition* epos =
-        dynamic_cast<const SMDS_EdgePosition*>(uvPt.node->GetPosition());
-      if (( myNormPar[ EdgeIndex ] < uvPt.normParam ) ||
-          ( epos && uvPt.node->getshapeId() != myEdgeID[ EdgeIndex ])) // for myMissingVertexNodes
+    for ( size_t iE = 0; iE < myEdge.size(); ++iE )
+    {
+      if ( proxySubMesh[ iE ] ) // copy data from a proxy sub-mesh
       {
-        prevNormPar = myNormPar[ EdgeIndex ];
-        ++EdgeIndex;
-#ifdef _DEBUG_
-        if ( EdgeIndex >= myEdge.size() ) {
-          dump("DEBUG");
-          MESSAGE ( "WRONg EdgeIndex " << 1+EdgeIndex
-                    << " myNormPar.size()="<<myNormPar.size()
-                    << " myNormPar["<< EdgeIndex<<"]="<< myNormPar[ EdgeIndex ]
-                    << " uvPt.normParam="<<uvPt.normParam );
+        const UVPtStructVec& edgeUVPtStruct = proxySubMesh[iE]->GetUVPtStructVec();
+        std::copy( edgeUVPtStruct.begin(), edgeUVPtStruct.end(), & points[iPt] );
+        // update normalized params
+        if ( myEdge.size() > 1 ) {
+          for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i, ++iPt )
+          {
+            UVPtStruct & uvPt = points[iPt];
+            uvPt.normParam = prevNormPar + uvPt.normParam * paramSize;
+            uvPt.x = uvPt.y = uvPt.normParam;
+          }
+          --iPt; // to point to the 1st VERTEX of the next EDGE
         }
-#endif
-        paramSize = myNormPar[ EdgeIndex ] - prevNormPar;
-      }
-      if ( epos ) {
-        uvPt.param = epos->GetUParameter();
       }
-      else {
-        double r = ( uvPt.normParam - prevNormPar )/ paramSize;
-//         uvPt.param = myFirst[EdgeIndex] * ( 1 - r ) + myLast[EdgeIndex] * r;
-        uvPt.param = ( r > 0.5 ? myLast[EdgeIndex] : myFirst[EdgeIndex] );
-      }
-      if ( !myC2d[ EdgeIndex ].IsNull() ) {
-        gp_Pnt2d p = myC2d[ EdgeIndex ]->Value( uvPt.param );
-        uvPt.u = p.X();
-        uvPt.v = p.Y();
+      else
+      {
+        for ( ; u_node != u2node.end(); ++u_node, ++iPt )
+        {
+          if ( myNormPar[ iE ]-eps < u_node->first )
+            break; // u_node is at VERTEX of the next EDGE 
+
+          UVPtStruct & uvPt = points[iPt];
+          uvPt.node       = u_node->second;
+          // -- normParam, x, y --------------------------------
+          uvPt.normParam  = u_node->first;
+          uvPt.x = uvPt.y = uvPt.normParam;
+          // -- U ----------------------------------------------
+          const SMDS_EdgePosition* epos =
+            dynamic_cast<const SMDS_EdgePosition*>(uvPt.node->GetPosition());
+          if ( epos ) {
+            uvPt.param = epos->GetUParameter();
+          }
+          else {
+            double r = ( uvPt.normParam - prevNormPar )/ paramSize;
+            uvPt.param = ( r > 0.5 ? myLast[iE] : myFirst[iE] );
+          }
+          // -- UV ---------------------------------------------
+          if ( !myC2d[ iE ].IsNull() ) {
+            gp_Pnt2d p = myC2d[ iE ]->Value( uvPt.param );
+            uvPt.u = p.X();
+            uvPt.v = p.Y();
+          }
+          else {
+            uvPt.u = uvPt.v = 1e+100;
+          }
+        }
       }
-      else {
-        uvPt.u = uvPt.v = 1e+100;
+      // prepare for the next EDGE
+      if ( iE+1 < myEdge.size() )
+      {
+        prevNormPar = myNormPar[ iE ];
+        paramSize   = myNormPar[ iE+1 ] - prevNormPar;
       }
-    }
-  }
+    } // loop on myEdge's
+
+    // set <constValue>
+    if ( isXConst )
+      for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].x = constValue;
+    else
+      for ( iPt = 0; iPt < points.size(); ++iPt ) points[ iPt ].y = constValue;
+
+  } // if ( myPoints.empty())
+
   return myPoints;
 }
 
 //================================================================================
 /*!
  * \brief Falsificate info on nodes
 * \param nbSeg - nb of segments on the side
 * \retval UVPtStruct* - array of data structures
+ * \param nbSeg - nb of segments on the side
+ * \retval UVPtStruct* - array of data structures
  */
 //================================================================================
 
@@ -429,8 +480,8 @@ std::vector<const SMDS_MeshNode*> StdMeshers_FaceSide::GetOrderedNodes() const
   {
     if ( NbEdges() == 0 ) return resultNodes;
 
-    SMESHDS_Mesh* meshDS = myMesh->GetMeshDS();
-    SMESH_MesherHelper helper(*myMesh);
+    SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
+    SMESH_MesherHelper helper(*myProxyMesh->GetMesh());
     bool paramOK;
 
     // Sort nodes of all edges putting them into a map
@@ -547,6 +598,31 @@ void StdMeshers_FaceSide::Reverse()
     myNormPar[nbEdges-1]=1.;
     myPoints.clear();
     myFalsePoints.clear();
+    for ( size_t i = 0; i < myEdge.size(); ++i )
+      reverseProxySubmesh( myEdge[i] );
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Reverse UVPtStructVec if a proxy sub-mesh of E
+ */
+//================================================================================
+
+void StdMeshers_FaceSide::reverseProxySubmesh( const TopoDS_Edge& E )
+{
+  if ( !myProxyMesh ) return;
+  if ( const SMESH_ProxyMesh::SubMesh* sm = myProxyMesh->GetProxySubMesh( E ))
+  {
+    UVPtStructVec& edgeUVPtStruct = (UVPtStructVec& ) sm->GetUVPtStructVec();
+    for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i )
+    {
+      UVPtStruct & uvPt = edgeUVPtStruct[i];
+      uvPt.normParam = 1 - uvPt.normParam;
+      uvPt.x         = 1 - uvPt.x;
+      uvPt.y         = 1 - uvPt.y;
+    }
+    reverse( edgeUVPtStruct );
   }
 }
 
@@ -673,10 +749,11 @@ gp_Pnt2d StdMeshers_FaceSide::Value2d(double U) const
  */
 //================================================================================
 
-TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face& theFace,
-                                              SMESH_Mesh &       theMesh,
-                                              const bool         theIgnoreMediumNodes,
-                                              TError &           theError)
+TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face&   theFace,
+                                              SMESH_Mesh &         theMesh,
+                                              const bool           theIgnoreMediumNodes,
+                                              TError &             theError,
+                                              SMESH_ProxyMesh::Ptr theProxyMesh)
 {
   TopoDS_Vertex V1;
   list< TopoDS_Edge > edges, internalEdges;
@@ -720,14 +797,16 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face& theFace,
     }
 
     StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, wireEdges, &theMesh,
-                                                         /*isForward=*/true, theIgnoreMediumNodes);
+                                                         /*isForward=*/true, theIgnoreMediumNodes,
+                                                         theProxyMesh );
     wires[ iW ] = StdMeshers_FaceSidePtr( wire );
     from = to;
   }
   while ( !internalEdges.empty() )
   {
     StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, internalEdges.back(), &theMesh,
-                                                         /*isForward=*/true, theIgnoreMediumNodes);
+                                                         /*isForward=*/true, theIgnoreMediumNodes,
+                                                         theProxyMesh );
     wires.push_back( StdMeshers_FaceSidePtr( wire ));
     internalEdges.pop_back();
   }
index 4a119ed848e7ebb7e5a4619dab2b25155389f974..1d4521dfe99bae2b145976e7f69dbab96b4fa67d 100644 (file)
@@ -30,6 +30,8 @@
 
 #include "SMESH_StdMeshers.hxx"
 
+#include "SMESH_ProxyMesh.hxx"
+
 #include <Geom2d_Curve.hxx>
 #include <GeomAdaptor_Curve.hxx>
 #include <TopoDS_Edge.hxx>
@@ -47,23 +49,11 @@ class Adaptor3d_Curve;
 class BRepAdaptor_CompCurve;
 class TopoDS_Face;
 struct SMESH_ComputeError;
-
-typedef struct uvPtStruct
-{
-  double param;
-  //int    curvIndex;
-  double normParam;
-  double u; // original 2d parameter
-  double v;
-  double x; // 2d parameter, normalized [0,1]
-  double y;
-  const SMDS_MeshNode * node;
-} UVPtStruct;
-
 class StdMeshers_FaceSide;
+
+typedef boost::shared_ptr< SMESH_ComputeError >  TError;
 typedef boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr;
 typedef std::vector< StdMeshers_FaceSidePtr >    TSideVector;
-typedef boost::shared_ptr< SMESH_ComputeError >  TError;
 
 //================================================================================
 /*!
@@ -78,11 +68,12 @@ public:
   /*!
    * \brief Wrap one edge
    */
-  StdMeshers_FaceSide(const TopoDS_Face& theFace,
-                      const TopoDS_Edge& theEdge,
-                      SMESH_Mesh*        theMesh,
-                      const bool         theIsForward,
-                      const bool         theIgnoreMediumNodes);
+  StdMeshers_FaceSide(const TopoDS_Face&   theFace,
+                      const TopoDS_Edge&   theEdge,
+                      SMESH_Mesh*          theMesh,
+                      const bool           theIsForward,
+                      const bool           theIgnoreMediumNodes,
+                      SMESH_ProxyMesh::Ptr theProxyMesh = SMESH_ProxyMesh::Ptr());
   /*!
    * \brief Wrap several edges. Edges must be properly ordered and oriented.
    */
@@ -90,7 +81,8 @@ public:
                       std::list<TopoDS_Edge>& theEdges,
                       SMESH_Mesh*             theMesh,
                       const bool              theIsForward,
-                      const bool              theIgnoreMediumNodes);
+                      const bool              theIgnoreMediumNodes,
+                      SMESH_ProxyMesh::Ptr    theProxyMesh = SMESH_ProxyMesh::Ptr());
   /*!
    * \brief Simulate a side from a vertex using data from other FaceSide
    */
@@ -100,11 +92,11 @@ public:
   /*!
    * \brief Return wires of a face as StdMeshers_FaceSide's
    */
-  static TSideVector GetFaceWires(const TopoDS_Face& theFace,
-                                  SMESH_Mesh &       theMesh,
-                                  const bool         theIgnoreMediumNodes,
-                                  TError &           theError);  
-
+  static TSideVector GetFaceWires(const TopoDS_Face&   theFace,
+                                  SMESH_Mesh &         theMesh,
+                                  const bool           theIgnoreMediumNodes,
+                                  TError &             theError,
+                                  SMESH_ProxyMesh::Ptr theProxyMesh = SMESH_ProxyMesh::Ptr());
   /*!
    * \brief Change orientation of side geometry
    */
@@ -120,7 +112,7 @@ public:
   /*!
    * \brief Return mesh
    */
-  SMESH_Mesh* GetMesh() const { return myMesh; }
+  SMESH_Mesh* GetMesh() const { return myProxyMesh->GetMesh(); }
   /*!
    * \brief Return true if there are vertices without nodes
    */
@@ -133,15 +125,15 @@ public:
     * Missing nodes are allowed only on internal vertices.
     * For a closed side, the 1st point repeats at end
    */
-  const std::vector<UVPtStruct>& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
+  const UVPtStructVec& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
   /*!
    * \brief Simulates detailed data on nodes
     * \param isXConst - true if normalized parameter X is constant
     * \param constValue - constant parameter value
    */
-  const std::vector<UVPtStruct>& SimulateUVPtStruct(int    nbSeg,
-                                                    bool   isXConst   = 0,
-                                                    double constValue = 0) const;
+  const UVPtStructVec& SimulateUVPtStruct(int    nbSeg,
+                                          bool   isXConst   = 0,
+                                          double constValue = 0) const;
   /*!
    * \brief Return nodes in the order they encounter while walking along the side.
     * For a closed side, the 1st point repeats at end
@@ -183,14 +175,6 @@ public:
    * \brief Return last vertex of the i-the edge (count starts from zero)
    */
   TopoDS_Vertex LastVertex(int i=-1) const;
-  /*!
-   * \brief Return first normalized parameter of the i-the edge (count starts from zero)
-   */
-  inline double FirstParameter(int i) const;
-  /*!
-   * \brief Return ast normalized parameter of the i-the edge (count starts from zero)
-   */
-  inline double LastParameter(int i) const;
   /*!
    * \brief Return side length
    */
@@ -204,9 +188,45 @@ public:
   
   void dump(const char* msg=0) const;
   
+  /*!
+   * \brief Return ID of i-th wrapped edge (count starts from zero)
+   */
+  inline int EdgeID(int i) const;
+  /*!
+   * \brief Return p-curve of i-th wrapped edge (count starts from zero)
+   */
+  inline Handle(Geom2d_Curve) Curve2d(int i) const;
+  /*!
+   * \brief Return first normalized parameter of the i-the edge (count starts from zero)
+   */
+  inline double FirstParameter(int i) const;
+  /*!
+   * \brief Return last normalized parameter of the i-the edge (count starts from zero)
+   */
+  inline double LastParameter(int i) const;
+  /*!
+   * \brief Return first parameter of the i-the edge (count starts from zero).
+   *        EDGE orientation is taken into account
+   */
+  inline double FirstU(int i) const;
+  /*!
+   * \brief Return last parameter of the i-the edge (count starts from zero).
+   *        EDGE orientation is taken into account
+   */
+  inline double LastU(int i) const;
+  /*!
+   * \brief Return length of i-th wrapped edge (count starts from zero)
+   */
+  inline double EdgeLength(int i) const;
+  /*!
+   * \brief Return orientation of i-th wrapped edge (count starts from zero)
+   */
+  inline bool IsReversed(int i) const;
 
 protected:
 
+  void reverseProxySubmesh( const TopoDS_Edge& E );
+
   // DON't FORGET to update Reverse() when adding one more vector!
   std::vector<uvPtStruct>           myPoints, myFalsePoints;
   std::vector<TopoDS_Edge>          myEdge;
@@ -219,7 +239,7 @@ protected:
   std::vector<double>               myIsUniform;
   double                            myLength;
   int                               myNbPonits, myNbSegments;
-  SMESH_Mesh*                       myMesh;
+  SMESH_ProxyMesh::Ptr              myProxyMesh;
   bool                              myMissingVertexNodes, myIgnoreMediumNodes;
   gp_Pnt2d                          myDefaultPnt2d;
 };
@@ -265,7 +285,7 @@ inline double StdMeshers_FaceSide::Parameter(double U, TopoDS_Edge & edge) const
 
 inline double StdMeshers_FaceSide::FirstParameter(int i) const
 {
-  return i==0 ? 0. : i<myNormPar.size() ? myNormPar[i-1] : 1.;
+  return i==0 ? 0. : i<(int)myNormPar.size() ? myNormPar[i-1] : 1.;
 }
 
 //================================================================================
@@ -276,7 +296,73 @@ inline double StdMeshers_FaceSide::FirstParameter(int i) const
 
 inline double StdMeshers_FaceSide::LastParameter(int i) const
 {
-  return i<myNormPar.size() ? myNormPar[i] : 1;
+  return i < (int)myNormPar.size() ? myNormPar[i] : 1;
+}
+
+//================================================================================
+/*!
+ * \brief Return first parameter of the i-the edge
+ */
+//================================================================================
+
+inline double StdMeshers_FaceSide::FirstU(int i) const
+{
+  return myFirst[ i % myFirst.size() ];
+}
+
+//================================================================================
+/*!
+ * \brief Return last parameter of the i-the edge
+ */
+//================================================================================
+
+inline double StdMeshers_FaceSide::LastU(int i) const
+{
+  return myLast[ i % myLast.size() ];
+}
+
+//================================================================================
+  /*!
+   * \brief Return ID of i-th wrapped edge (count starts from zero)
+   */
+//================================================================================
+
+inline int StdMeshers_FaceSide::EdgeID(int i) const
+{
+  return myEdgeID[ i % myEdgeID.size() ];
+}
+
+//================================================================================
+/*!
+   * \brief Return p-curve of i-th wrapped edge (count starts from zero)
+   */
+//================================================================================
+
+inline Handle(Geom2d_Curve) StdMeshers_FaceSide::Curve2d(int i) const
+{
+  return myC2d[ i % myC2d.size() ];
+}
+
+//================================================================================
+/*!
+ * \brief Return length of i-th wrapped edge (count starts from zero)
+ */
+ //================================================================================
+
+inline double StdMeshers_FaceSide::EdgeLength(int i) const
+{
+  return myEdgeLength[ i % myEdgeLength.size() ];
+}
+
+//================================================================================
+/*!
+ * \brief Return orientation of i-th wrapped edge (count starts from zero)
+ */
+ //================================================================================
+
+inline bool StdMeshers_FaceSide::IsReversed(int i) const
+{
+  return myFirst[i] > myLast[i];
 }
 
 #endif
index f7a91a6b1493044c04cfdced27d5a695522594ac..55091c7f9c598ba557cd8dcdf28890af4a7e16ba 100644 (file)
 //
 #include "StdMeshers_MEFISTO_2D.hxx"
 
+#include "SMDS_EdgePosition.hxx"
+#include "SMDS_MeshElement.hxx"
+#include "SMDS_MeshNode.hxx"
+#include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_Mesh.hxx"
-#include "SMESH_subMesh.hxx"
-#include "SMESH_Block.hxx"
 #include "SMESH_MesherHelper.hxx"
-#include "SMESH_Comment.hxx"
-
+#include "SMESH_subMesh.hxx"
 #include "StdMeshers_FaceSide.hxx"
-#include "StdMeshers_MaxElementArea.hxx"
 #include "StdMeshers_LengthFromEdges.hxx"
+#include "StdMeshers_MaxElementArea.hxx"
+#include "StdMeshers_ViscousLayers2D.hxx"
+
+#include "utilities.h"
 
 #include "Rn.h"
 #include "aptrte.h"
 
-#include "SMDS_MeshElement.hxx"
-#include "SMDS_MeshNode.hxx"
-#include "SMDS_EdgePosition.hxx"
-#include "SMDS_FacePosition.hxx"
-
-#include "utilities.h"
-
+#include <BRepGProp.hxx>
 #include <BRepTools.hxx>
 #include <BRep_Tool.hxx>
+#include <GProp_GProps.hxx>
 #include <Geom2d_Curve.hxx>
 #include <Geom_Curve.hxx>
 #include <Geom_Surface.hxx>
 #include <TopoDS_Wire.hxx>
 #include <gp_Pnt2d.hxx>
 
-#include <BRep_Tool.hxx>
-#include <GProp_GProps.hxx>
-#include <BRepGProp.hxx>
-
 using namespace std;
 
+#ifdef _DEBUG_
+//#define DUMP_POINTS // to print coordinates of MEFISTO input
+#endif
+
 //=============================================================================
 /*!
  *  
@@ -87,12 +86,13 @@ StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen *
   _shapeType = (1 << TopAbs_FACE);
   _compatibleHypothesis.push_back("MaxElementArea");
   _compatibleHypothesis.push_back("LengthFromEdges");
+  _compatibleHypothesis.push_back("ViscousLayers2D");
 
   _edgeLength = 0;
   _maxElementArea = 0;
   _hypMaxElementArea = NULL;
   _hypLengthFromEdges = NULL;
-  myTool = 0;
+  _helper = 0;
 }
 
 //=============================================================================
@@ -191,13 +191,19 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh
 
   // helper builds quadratic mesh if necessary
   SMESH_MesherHelper helper(aMesh);
-  myTool = &helper;
-  _quadraticMesh = myTool->IsQuadraticSubMesh(aShape);
-  const bool ignoreMediumNodes = _quadraticMesh;
+  _helper = &helper;
+  _quadraticMesh = _helper->IsQuadraticSubMesh(aShape);
+  const bool skipMediumNodes = _quadraticMesh;
+
+  // build viscous layers if required
+  SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
+  if ( !proxyMesh )
+    return false;
 
   // get all edges of a face
   TError problem;
-  TWireVector wires = StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, problem );
+  TWireVector wires =
+    StdMeshers_FaceSide::GetFaceWires( F, aMesh, skipMediumNodes, problem, proxyMesh );
   int nbWires = wires.size();
   if ( problem && !problem->IsOK() ) return error( problem );
   if ( nbWires == 0 ) return error( "Problem in StdMeshers_FaceSide::GetFaceWires()");
@@ -575,7 +581,7 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
   TopTools_IndexedDataMapOfShapeListOfShape VWMap;
   if ( wires.size() > 1 )
   {
-    F = TopoDS::Face( myTool->GetSubShape() );
+    F = TopoDS::Face( _helper->GetSubShape() );
     TopExp::MapShapesAndAncestors( F, TopAbs_VERTEX, TopAbs_WIRE, VWMap );
     int nbVertices = 0;
     for ( int iW = 0; iW < wires.size(); ++iW )
@@ -616,10 +622,10 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
       case SMDS_TOP_EDGE:
         // In order to detect degenerated faces easily, we replace
         // nodes on a degenerated edge by node on the vertex of that edge
-        if ( myTool->IsDegenShape( uvPt->node->getshapeId() ))
+        if ( _helper->IsDegenShape( uvPt->node->getshapeId() ))
         {
           int edgeID = uvPt->node->getshapeId();
-          SMESH_subMesh* edgeSM = myTool->GetMesh()->GetSubMeshContaining( edgeID );
+          SMESH_subMesh* edgeSM = _helper->GetMesh()->GetSubMeshContaining( edgeID );
           SMESH_subMeshIteratorPtr smIt = edgeSM->getDependsOnIterator( /*includeSelf=*/0,
                                                                         /*complexShapeFirst=*/0);
           if ( smIt->more() )
@@ -644,8 +650,8 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
       if ( iW && !VWMap.IsEmpty()) { // except outer wire
         // avoid passing same uv point for a vertex common to 2 wires
         int vID = mefistoToDS[m]->getshapeId();
-        TopoDS_Vertex V = TopoDS::Vertex( myTool->GetMeshDS()->IndexToShape( vID ));
-        if ( fixCommonVertexUV( uvslf[m], V, F, VWMap, *myTool->GetMesh(),
+        TopoDS_Vertex V = TopoDS::Vertex( _helper->GetMeshDS()->IndexToShape( vID ));
+        if ( fixCommonVertexUV( uvslf[m], V, F, VWMap, *_helper->GetMesh(),
                                 scalex, scaley, _quadraticMesh )) {
           myNodesOnCommonV.push_back( mefistoToDS[m] );
           continue;
@@ -659,9 +665,13 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector &                 wires,
       fixOverlappedLinkUV (uvslf[ mB ], uvslf[ m ], uvslf[ mA ]);
     }
   }
-//   cout << "MEFISTO INPUT************" << endl;
-//   for ( int i =0; i < m; ++i )
-//     cout << i << ": \t" << uvslf[i].x << ", " << uvslf[i].y << " Node " << mefistoToDS[i]->GetID()<< endl;
+
+#ifdef DUMP_POINTS
+  cout << "MEFISTO INPUT************" << endl;
+  for ( int i =0; i < m; ++i )
+    cout << i << ": \t" << uvslf[i].x << ", " << uvslf[i].y
+         << " Node " << mefistoToDS[i]->GetID()<< endl;
+#endif
 
   return true;
 }
@@ -770,10 +780,10 @@ void StdMeshers_MEFISTO_2D::StoreResult(Z nbst, R2 * uvst, Z nbt, Z * nust,
                                         vector< const SMDS_MeshNode*>&mefistoToDS,
                                         double scalex, double scaley)
 {
-  SMESHDS_Mesh * meshDS = myTool->GetMeshDS();
-  int faceID = myTool->GetSubShapeID();
+  SMESHDS_Mesh * meshDS = _helper->GetMeshDS();
+  int faceID = _helper->GetSubShapeID();
 
-  TopoDS_Face F = TopoDS::Face( myTool->GetSubShape() );
+  TopoDS_Face F = TopoDS::Face( _helper->GetSubShape() );
   Handle(Geom_Surface) S = BRep_Tool::Surface( F );
 
   Z n = mefistoToDS.size(); // nb input points
@@ -809,14 +819,14 @@ void StdMeshers_MEFISTO_2D::StoreResult(Z nbst, R2 * uvst, Z nbt, Z * nust,
     const SMDS_MeshNode * n3 = mefistoToDS[ nust[m++] - 1 ];
 
     // avoid creating degenetrated faces
-    bool isDegen = ( myTool->HasDegeneratedEdges() && ( n1 == n2 || n1 == n3 || n2 == n3 ));
+    bool isDegen = ( _helper->HasDegeneratedEdges() && ( n1 == n2 || n1 == n3 || n2 == n3 ));
     if ( !isDegen )
     {
       SMDS_MeshElement * elt;
       if (triangleIsWellOriented)
-        elt = myTool->AddFace(n1, n2, n3);
+        elt = _helper->AddFace(n1, n2, n3);
       else
-        elt = myTool->AddFace(n1, n3, n2);
+        elt = _helper->AddFace(n1, n3, n2);
       meshDS->SetMeshElementOnShape(elt, faceID);
     }
     m++;
index 219df40890088fc1f82f799f186a1e0b3f0e6f06..28f2da8a2de9a5008f7729cbf2eb218d8b92ea7e 100644 (file)
@@ -85,7 +85,7 @@ protected:
 
   std::list<const SMDS_MeshNode*> myNodesOnCommonV;
 
-  SMESH_MesherHelper* myTool; // tool for working with quadratic elements
+  SMESH_MesherHelper* _helper; // tool for working with quadratic elements
 };
 
 #endif
index c4c421c80f307aa0d1519d342eef174dfd097a03..85eaef56619c46b5d460884730c24d96960fecd0 100644 (file)
@@ -2215,7 +2215,7 @@ TopoDS_Edge StdMeshers_PrismAsBlock::TSideFace::GetEdge(const int iEdge) const
   // find edge by 2 vertices
   TopoDS_Shape V1 = edge;
   TopoDS_Shape V2 = myHelper->GetSubShapeByNode( node, meshDS );
-  if ( V2.ShapeType() == TopAbs_VERTEX && !V2.IsSame( V1 ))
+  if ( !V2.IsNull() && V2.ShapeType() == TopAbs_VERTEX && !V2.IsSame( V1 ))
   {
     TopoDS_Shape ancestor = myHelper->GetCommonAncestor( V1, V2, *myHelper->GetMesh(), TopAbs_EDGE);
     if ( !ancestor.IsNull() )
index d0f29a54bb66dbc9ddebdcd549e4a62baa39bbd4..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() ));
+    }
+    else if ( shape.ShapeType() == TopAbs_EDGE ) {
+      if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( shape )))
+        allBndEdges.push_back( TopoDS::Edge( shape ));
     }
-    return edge;
+    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;
     }
   }
 
@@ -1237,6 +1274,7 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
 {
   bool OK = false;
   list< int > nbEInW1, nbEInW2;
+  list< TopoDS_Edge >::iterator edgeIt;
   int i_ok_wire_algo = -1;
   for ( int outer_wire_algo = 0; outer_wire_algo < 2 && !OK; ++outer_wire_algo )
   {
@@ -1247,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;
@@ -1257,7 +1300,6 @@ int StdMeshers_ProjectionUtils::FindFaceAssociation(const TopoDS_Face&    face1,
 
     bool reverse = false;
 
-    list< TopoDS_Edge >::iterator edgeIt;
     if ( !VV1[1].IsSame( TopExp::LastVertex( edges1.front(), true ))) {
       reverse = true;
       edgeIt = --edges1.end();
@@ -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,87 @@ 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;
+      }
+    }
+  }
+
+  const int nbEdges = nbEInW1.front();
+  if ( OK && nbEdges == 2 )
+  {
+    // 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();
+    l1[0] = SMESH_Algo::EdgeLength( *edgeIt++ );
+    l1[1] = SMESH_Algo::EdgeLength( *edgeIt++ );
+    if ( Abs( l1[0] - l1[1] ) > 0.1 * Max( l1[0], l1[1] ) )
+    {
+      edgeIt = edges2.begin();
+      l2[0] = SMESH_Algo::EdgeLength( *edgeIt++ );
+      l2[1] = SMESH_Algo::EdgeLength( *edgeIt++ );
+      if (( l1[0] < l1[1] ) != ( l2[0] < l2[1] ))
+      {
+        Reverse( edges2, nbEdges );
       }
     }
   }
@@ -2043,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 );
@@ -2059,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 60917a9fcd4be63af82cf9d32e1dcbd1de7a2031..ad6f45e572bdb05ebb40db1b893de3c05d572e1b 100644 (file)
@@ -794,8 +794,18 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
   if ( !TAssocTool::FindSubShapeAssociation( tgtFace, tgtMesh, srcShape, srcMesh,
                                              shape2ShapeMap)  ||
        !shape2ShapeMap.IsBound( tgtFace ))
+  {
+    if ( srcShape.ShapeType() == TopAbs_FACE )
+    {
+      int nbE1 = TAssocTool::Count( tgtFace, TopAbs_EDGE, /*ignoreSame=*/true );
+      int nbE2 = TAssocTool::Count( srcShape, TopAbs_EDGE, /*ignoreSame=*/true );
+      if ( nbE1 != nbE2 )
+        return error(COMPERR_BAD_SHAPE,
+                     SMESH_Comment("Different number of edges in source and target faces: ")
+                     << nbE2 << " and " << nbE1 );
+    }
     return error(COMPERR_BAD_SHAPE,"Topology of source and target faces seems different" );
-
+  }
   TopoDS_Face srcFace = TopoDS::Face( shape2ShapeMap( tgtFace ).Oriented(TopAbs_FORWARD));
 
   // ----------------------------------------------
index 3842b4733f56d8d937d25444bfb7de67257cb272..d75a5aac2de8c7be2bd8f4387197e17d9199ae3f 100644 (file)
 
 #include "StdMeshers_Quadrangle_2D.hxx"
 
-#include "StdMeshers_FaceSide.hxx"
-
-#include "StdMeshers_QuadrangleParams.hxx"
-
+#include "SMDS_EdgePosition.hxx"
+#include "SMDS_FacePosition.hxx"
+#include "SMDS_MeshElement.hxx"
+#include "SMDS_MeshNode.hxx"
+#include "SMESH_Block.hxx"
+#include "SMESH_Comment.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_Mesh.hxx"
-#include "SMESH_subMesh.hxx"
 #include "SMESH_MesherHelper.hxx"
-#include "SMESH_Block.hxx"
-#include "SMESH_Comment.hxx"
-
-#include "SMDS_MeshElement.hxx"
-#include "SMDS_MeshNode.hxx"
-#include "SMDS_EdgePosition.hxx"
-#include "SMDS_FacePosition.hxx"
+#include "SMESH_subMesh.hxx"
+#include "StdMeshers_FaceSide.hxx"
+#include "StdMeshers_QuadrangleParams.hxx"
+#include "StdMeshers_ViscousLayers2D.hxx"
 
 #include <BRep_Tool.hxx>
 #include <Geom_Surface.hxx>
@@ -79,7 +77,8 @@ typedef SMESH_Comment TComm;
 
 StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
                                                     SMESH_Gen* gen)
-     : SMESH_2D_Algo(hypId, studyId, gen)
+  : SMESH_2D_Algo(hypId, studyId, gen),
+    myHelper( 0 )
 {
   MESSAGE("StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D");
   _name = "Quadrangle_2D";
@@ -87,7 +86,7 @@ StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId,
   _compatibleHypothesis.push_back("QuadrangleParams");
   _compatibleHypothesis.push_back("QuadranglePreference");
   _compatibleHypothesis.push_back("TrianglePreference");
-  myHelper = 0;
+  _compatibleHypothesis.push_back("ViscousLayers2D");
 }
 
 //=============================================================================
@@ -193,11 +192,11 @@ bool StdMeshers_Quadrangle_2D::CheckHypothesis
  */
 //=============================================================================
 
-bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh& aMesh,
-                                        const TopoDS_Shape& aShape)// throw (SALOME_Exception)
+bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh&         aMesh,
+                                        const TopoDS_Shape& aShape)
 {
-  // PAL14921. Enable catching std::bad_alloc and Standard_OutOfMemory outside
-  //Unexpect aCatchSalomeException);
+  const TopoDS_Face& F = TopoDS::Face(aShape);
+  Handle(Geom_Surface) S = BRep_Tool::Surface(F);
 
   SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
   aMesh.GetSubMesh(aShape);
@@ -205,6 +204,10 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh& aMesh,
   SMESH_MesherHelper helper (aMesh);
   myHelper = &helper;
 
+  myProxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
+  if ( !myProxyMesh )
+    return false;
+
   _quadraticMesh = myHelper->IsQuadraticSubMesh(aShape);
   myNeedSmooth = false;
 
@@ -263,9 +266,6 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh& aMesh,
   int nbhoriz  = Min(nbdown, nbup);
   int nbvertic = Min(nbright, nbleft);
 
-  const TopoDS_Face& F = TopoDS::Face(aShape);
-  Handle(Geom_Surface) S = BRep_Tool::Surface(F);
-
   // internal mesh nodes
   int i, j, geomFaceID = meshDS->ShapeToIndex(F);
   for (i = 1; i < nbhoriz - 1; i++) {
@@ -307,10 +307,10 @@ bool StdMeshers_Quadrangle_2D::Compute (SMESH_Mesh& aMesh,
   for (i = ilow; i < iup; i++) {
     for (j = jlow; j < jup; j++) {
       const SMDS_MeshNode *a, *b, *c, *d;
-      a = quad->uv_grid[j * nbhoriz + i].node;
-      b = quad->uv_grid[j * nbhoriz + i + 1].node;
+      a = quad->uv_grid[j       * nbhoriz + i    ].node;
+      b = quad->uv_grid[j       * nbhoriz + i + 1].node;
       c = quad->uv_grid[(j + 1) * nbhoriz + i + 1].node;
-      d = quad->uv_grid[(j + 1) * nbhoriz + i].node;
+      d = quad->uv_grid[(j + 1) * nbhoriz + i    ].node;
       SMDS_MeshFace* face = myHelper->AddFace(a, b, c, d);
       if (face) {
         meshDS->SetMeshElementOnShape(face, geomFaceID);
@@ -831,9 +831,12 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
         }
         if (!E1.IsNull() && !E2.IsNull() && !E3.IsNull())
         {
-          quad->side.push_back(new StdMeshers_FaceSide(F, E1, &aMesh, true, ignoreMediumNodes));
-          quad->side.push_back(new StdMeshers_FaceSide(F, E2, &aMesh, true, ignoreMediumNodes));
-          quad->side.push_back(new StdMeshers_FaceSide(F, E3, &aMesh, false,ignoreMediumNodes));
+          quad->side.push_back(new StdMeshers_FaceSide(F, E1, &aMesh, true,
+                                                       ignoreMediumNodes, myProxyMesh));
+          quad->side.push_back(new StdMeshers_FaceSide(F, E2, &aMesh, true,
+                                                       ignoreMediumNodes, myProxyMesh));
+          quad->side.push_back(new StdMeshers_FaceSide(F, E3, &aMesh, false,
+                                                       ignoreMediumNodes, myProxyMesh));
           const vector<UVPtStruct>& UVPSleft  = quad->side[0]->GetUVPtStruct(true,0);
           /*  vector<UVPtStruct>& UVPStop   = */quad->side[1]->GetUVPtStruct(false,1);
           /*  vector<UVPtStruct>& UVPSright = */quad->side[2]->GetUVPtStruct(true,1);
@@ -856,8 +859,8 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
   else if (nbEdgesInWire.front() == 4) // exactly 4 edges
   {
     for (; edgeIt != edges.end(); ++edgeIt, nbSides++)
-      quad->side.push_back(new StdMeshers_FaceSide(F, *edgeIt, &aMesh,
-                                                    nbSides<TOP_SIDE, ignoreMediumNodes));
+      quad->side.push_back(new StdMeshers_FaceSide(F, *edgeIt, &aMesh, nbSides < TOP_SIDE,
+                                                   ignoreMediumNodes, myProxyMesh));
   }
   else if (nbEdgesInWire.front() > 4) // more than 4 edges - try to unite some
   {
@@ -883,8 +886,8 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
       if ( sideEdges.size() == 1 && BRep_Tool::Degenerated( sideEdges.front() ))
         degenSides.push_back( nbSides );
 
-      quad->side.push_back(new StdMeshers_FaceSide(F, sideEdges, &aMesh,
-                                                    nbSides<TOP_SIDE, ignoreMediumNodes));
+      quad->side.push_back(new StdMeshers_FaceSide(F, sideEdges, &aMesh, nbSides < TOP_SIDE,
+                                                   ignoreMediumNodes, myProxyMesh));
       ++nbSides;
     }
     if ( !degenSides.empty() && nbSides - degenSides.size() == 4 )
@@ -935,7 +938,8 @@ FaceQuadStruct* StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh &         aMes
           }
         }
         quad->side.push_back(new StdMeshers_FaceSide(F, sideEdges, &aMesh,
-                                                      nbSides<TOP_SIDE, ignoreMediumNodes));
+                                                     nbSides < TOP_SIDE,
+                                                     ignoreMediumNodes, myProxyMesh));
         ++nbSides;
       }
     }
@@ -1265,37 +1269,29 @@ bool StdMeshers_Quadrangle_2D::SetNormalizedGrid (SMESH_Mesh & aMesh,
   if ( myNeedSmooth )
     UpdateDegenUV( quad );
 
-  // nodes Id on "in" edges
-  if (! quad->isEdgeOut[0]) {
-    int j = 0;
-    for (int i = 0; i < nbhoriz; i++) { // down
-      int ij = j * nbhoriz + i;
-      uv_grid[ij].node = uv_e0[i].node;
-    }
+  // copy data of face boundary
+  /*if (! quad->isEdgeOut[0])*/ {
+    const int j = 0;
+    for (int i = 0; i < nbhoriz; i++)       // down
+      uv_grid[ j * nbhoriz + i ] = uv_e0[i];
   }
-  if (! quad->isEdgeOut[1]) {
-    int i = nbhoriz - 1;
-    for (int j = 0; j < nbvertic; j++) { // right
-      int ij = j * nbhoriz + i;
-      uv_grid[ij].node = uv_e1[j].node;
-    }
+  /*if (! quad->isEdgeOut[1])*/ {
+    const int i = nbhoriz - 1;
+    for (int j = 0; j < nbvertic; j++)      // right
+      uv_grid[ j * nbhoriz + i ] = uv_e1[j];
   }
-  if (! quad->isEdgeOut[2]) {
-    int j = nbvertic - 1;
-    for (int i = 0; i < nbhoriz; i++) { // up
-      int ij = j * nbhoriz + i;
-      uv_grid[ij].node = uv_e2[i].node;
-    }
+  /*if (! quad->isEdgeOut[2])*/ {
+    const int j = nbvertic - 1;
+    for (int i = 0; i < nbhoriz; i++)       // up
+      uv_grid[ j * nbhoriz + i ] = uv_e2[i];
   }
-  if (! quad->isEdgeOut[3]) {
+  /*if (! quad->isEdgeOut[3])*/ {
     int i = 0;
-    for (int j = 0; j < nbvertic; j++) { // left
-      int ij = j * nbhoriz + i;
-      uv_grid[ij].node = uv_e3[j].node;
-    }
+    for (int j = 0; j < nbvertic; j++)      // left
+      uv_grid[ j * nbhoriz + i ] = uv_e3[j];
   }
 
-  // normalized 2d values on grid
+  // normalized 2d parameters on grid
   for (int i = 0; i < nbhoriz; i++) {
     for (int j = 0; j < nbvertic; j++) {
       int ij = j * nbhoriz + i;
@@ -1316,26 +1312,23 @@ bool StdMeshers_Quadrangle_2D::SetNormalizedGrid (SMESH_Mesh & aMesh,
   }
 
   // 4 --- projection on 2d domain (u,v)
-  gp_UV a0(uv_e0.front().u, uv_e0.front().v);
-  gp_UV a1(uv_e0.back().u,  uv_e0.back().v);
-  gp_UV a2(uv_e2.back().u,  uv_e2.back().v);
-  gp_UV a3(uv_e2.front().u, uv_e2.front().v);
+  gp_UV a0 (uv_e0.front().u, uv_e0.front().v);
+  gp_UV a1 (uv_e0.back().u,  uv_e0.back().v );
+  gp_UV a2 (uv_e2.back().u,  uv_e2.back().v );
+  gp_UV a3 (uv_e2.front().u, uv_e2.front().v);
+
+  for (int i = 0; i < nbhoriz; i++)
+  {
+    gp_UV p0( uv_e0[i].u, uv_e0[i].v );
+    gp_UV p2( uv_e2[i].u, uv_e2[i].v );
+    for (int j = 0; j < nbvertic; j++)
+    {
+      gp_UV p1( uv_e1[j].u, uv_e1[j].v );
+      gp_UV p3( uv_e3[j].u, uv_e3[j].v );
 
-  for (int i = 0; i < nbhoriz; i++) {
-    for (int j = 0; j < nbvertic; j++) {
       int ij = j * nbhoriz + i;
       double x = uv_grid[ij].x;
       double y = uv_grid[ij].y;
-      double param_0 = uv_e0[0].normParam + x * (uv_e0.back().normParam - uv_e0[0].normParam); // sud
-      double param_2 = uv_e2[0].normParam + x * (uv_e2.back().normParam - uv_e2[0].normParam); // nord
-      double param_1 = uv_e1[0].normParam + y * (uv_e1.back().normParam - uv_e1[0].normParam); // est
-      double param_3 = uv_e3[0].normParam + y * (uv_e3.back().normParam - uv_e3[0].normParam); // ouest
-
-      //MESSAGE("params "<<param_0<<" "<<param_1<<" "<<param_2<<" "<<param_3);
-      gp_UV p0 = quad->side[0]->Value2d(param_0).XY();
-      gp_UV p1 = quad->side[1]->Value2d(param_1).XY();
-      gp_UV p2 = quad->side[2]->Value2d(param_2).XY();
-      gp_UV p3 = quad->side[3]->Value2d(param_3).XY();
 
       gp_UV uv = CalcUV(x,y, a0,a1,a2,a3, p0,p1,p2,p3);
 
@@ -1353,7 +1346,8 @@ bool StdMeshers_Quadrangle_2D::SetNormalizedGrid (SMESH_Mesh & aMesh,
 
 static void ShiftQuad(FaceQuadStruct* quad, const int num, bool)
 {
-  StdMeshers_FaceSide* side[4] = { quad->side[0], quad->side[1], quad->side[2], quad->side[3] };
+  StdMeshers_FaceSide* side[4] = { quad->side[0], quad->side[1],
+                                   quad->side[2], quad->side[3] };
   for (int i = BOTTOM_SIDE; i < NB_SIDES; ++i) {
     int id = (i + num) % NB_SIDES;
     bool wasForward = (i < TOP_SIDE);
@@ -1374,23 +1368,18 @@ static gp_UV CalcUV(double x0, double x1, double y0, double y1,
                     const gp_UV& a0, const gp_UV& a1,
                     const gp_UV& a2, const gp_UV& a3)
 {
-  const vector<UVPtStruct>& uv_eb = quad->side[0]->GetUVPtStruct(true,0);
-  const vector<UVPtStruct>& uv_er = quad->side[1]->GetUVPtStruct(false,1);
-  const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1);
-  const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
+  // const vector<UVPtStruct>& uv_eb = quad->side[0]->GetUVPtStruct(true,0);
+  // const vector<UVPtStruct>& uv_er = quad->side[1]->GetUVPtStruct(false,1);
+  // const vector<UVPtStruct>& uv_et = quad->side[2]->GetUVPtStruct(true,1);
+  // const vector<UVPtStruct>& uv_el = quad->side[3]->GetUVPtStruct(false,0);
 
   double x = (x0 + y0 * (x1 - x0)) / (1 - (y1 - y0) * (x1 - x0));
   double y = y0 + x * (y1 - y0);
 
-  double param_b = uv_eb[0].normParam + x * (uv_eb.back().normParam - uv_eb[0].normParam);
-  double param_t = uv_et[0].normParam + x * (uv_et.back().normParam - uv_et[0].normParam);
-  double param_r = uv_er[0].normParam + y * (uv_er.back().normParam - uv_er[0].normParam);
-  double param_l = uv_el[0].normParam + y * (uv_el.back().normParam - uv_el[0].normParam);
-
-  gp_UV p0 = quad->side[BOTTOM_SIDE]->Value2d(param_b).XY();
-  gp_UV p1 = quad->side[RIGHT_SIDE ]->Value2d(param_r).XY();
-  gp_UV p2 = quad->side[TOP_SIDE   ]->Value2d(param_t).XY();
-  gp_UV p3 = quad->side[LEFT_SIDE  ]->Value2d(param_l).XY();
+  gp_UV p0 = quad->side[BOTTOM_SIDE]->Value2d(x).XY();
+  gp_UV p1 = quad->side[RIGHT_SIDE ]->Value2d(y).XY();
+  gp_UV p2 = quad->side[TOP_SIDE   ]->Value2d(x).XY();
+  gp_UV p3 = quad->side[LEFT_SIDE  ]->Value2d(y).XY();
 
   gp_UV uv = CalcUV(x,y, a0,a1,a2,a3, p0,p1,p2,p3);
 
index e200bc5af1b26554b27cb421fef6bfa220731499..000c01f66103b74908cec7eacb1abe52e68ac604 100644 (file)
 #ifndef _SMESH_QUADRANGLE_2D_HXX_
 #define _SMESH_QUADRANGLE_2D_HXX_
 
+#include "SMESH_Algo.hxx"
+#include "SMESH_ProxyMesh.hxx"
 #include "SMESH_StdMeshers.hxx"
-
 #include "StdMeshers_QuadrangleParams.hxx"
 
-#include "SMESH_Algo.hxx"
-#include "Utils_SALOME_Exception.hxx"
-
 #include <TopoDS_Face.hxx>
 
+class SMDS_MeshNode;
 class SMESH_Mesh;
 class SMESH_MesherHelper;
+class SMESH_ProxyMesh;
 class StdMeshers_FaceSide;
-class SMDS_MeshNode;
 struct uvPtStruct;
 
 
@@ -124,13 +123,15 @@ protected:
 
   bool myTrianglePreference;
 
-  int myTriaVertexID;
+  int  myTriaVertexID;
+
+  bool myNeedSmooth;
 
-  StdMeshers_QuadType myQuadType;
+  StdMeshers_QuadType  myQuadType;
 
-  SMESH_MesherHelper* myHelper; // tool for working with quadratic elements
+  SMESH_MesherHelper*  myHelper; // tool for working with quadratic elements
 
-  bool myNeedSmooth;
+  SMESH_ProxyMesh::Ptr myProxyMesh;
 };
 
 #endif
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 c875ca104a4f622be907664d77f9c5f2329f6597..a855c24a35a5a3182d9c9bcdc3f96b054ef9a581 100644 (file)
@@ -82,7 +82,7 @@
 using namespace std;
 
 //================================================================================
-namespace VISCOUS
+namespace VISCOUS_3D
 {
   typedef int TGeomID;
 
@@ -121,13 +121,13 @@ namespace VISCOUS
    * \brief Listener of events of 3D sub-meshes computed with viscous layers.
    * It is used to clear an inferior dim sub-meshes modified by viscous layers
    */
-  class _SrinkShapeListener : SMESH_subMeshEventListener
+  class _ShrinkShapeListener : SMESH_subMeshEventListener
   {
-    _SrinkShapeListener()
+    _ShrinkShapeListener()
       : SMESH_subMeshEventListener(/*isDeletable=*/false,
-                                   "StdMeshers_ViscousLayers::_SrinkShapeListener") {}
-    static SMESH_subMeshEventListener* Get() { static _SrinkShapeListener l; return &l; }
+                                   "StdMeshers_ViscousLayers::_ShrinkShapeListener") {}
   public:
+    static SMESH_subMeshEventListener* Get() { static _ShrinkShapeListener l; return &l; }
     virtual void ProcessEvent(const int                       event,
                               const int                       eventType,
                               SMESH_subMesh*                  solidSM,
@@ -139,23 +139,6 @@ namespace VISCOUS
         SMESH_subMeshEventListener::ProcessEvent(event,eventType,solidSM,data,hyp);
       }
     }
-    static void ToClearSubMeshWithSolid( SMESH_subMesh*      sm,
-                                         const TopoDS_Shape& solid)
-    {
-      SMESH_subMesh* solidSM = sm->GetFather()->GetSubMesh( solid );
-      SMESH_subMeshEventListenerData* data = solidSM->GetEventListenerData( Get());
-      if ( data )
-      {
-        if ( find( data->mySubMeshes.begin(), data->mySubMeshes.end(), sm ) ==
-             data->mySubMeshes.end())
-          data->mySubMeshes.push_back( sm );
-      }
-      else
-      {
-        data = SMESH_subMeshEventListenerData::MakeData( /*dependent=*/sm );
-        sm->SetEventListener( Get(), data, /*whereToListenTo=*/solidSM );
-      }
-    }
   };
   //--------------------------------------------------------------------------------
   /*!
@@ -205,6 +188,32 @@ namespace VISCOUS
     }
   };
   
+  //================================================================================
+  /*!
+   * \brief sets a sub-mesh event listener to clear sub-meshes of sub-shapes of
+   * the main shape when sub-mesh of the main shape is cleared,
+   * for example to clear sub-meshes of FACEs when sub-mesh of a SOLID
+   * is cleared
+   */
+  //================================================================================
+
+  void ToClearSubWithMain( SMESH_subMesh* sub, const TopoDS_Shape& main)
+  {
+    SMESH_subMesh* mainSM = sub->GetFather()->GetSubMesh( main );
+    SMESH_subMeshEventListenerData* data =
+      mainSM->GetEventListenerData( _ShrinkShapeListener::Get());
+    if ( data )
+    {
+      if ( find( data->mySubMeshes.begin(), data->mySubMeshes.end(), sub ) ==
+           data->mySubMeshes.end())
+        data->mySubMeshes.push_back( sub );
+    }
+    else
+    {
+      data = SMESH_subMeshEventListenerData::MakeData( /*dependent=*/sub );
+      sub->SetEventListener( _ShrinkShapeListener::Get(), data, /*whereToListenTo=*/mainSM );
+    }
+  }
   //--------------------------------------------------------------------------------
   /*!
    * \brief Simplex (triangle or tetrahedron) based on 1 (tria) or 2 (tet) nodes of
@@ -256,6 +265,7 @@ namespace VISCOUS
   {
     double _r; // radius
     double _k; // factor to correct node smoothed position
+    double _h2lenRatio; // avgNormProj / (2*avgDist)
   public:
     static _Curvature* New( double avgNormProj, double avgDist )
     {
@@ -266,10 +276,12 @@ namespace VISCOUS
         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;
   //--------------------------------------------------------------------------------
@@ -547,7 +559,7 @@ virtual SMDS_ElemIteratorPtr elementsIterator(SMDSAbs_ElementType type) const
       _nn[3]=_le2->_nodes[0];
     }
   };
-} // namespace VISCOUS
+} // namespace VISCOUS_3D
 
 //================================================================================
 // StdMeshers_ViscousLayers hypothesis
@@ -559,10 +571,15 @@ StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, int studyId, SMESH
   _name = StdMeshers_ViscousLayers::GetHypType();
   _param_algo_dim = -3; // auxiliary hyp used by 3D algos
 } // --------------------------------------------------------------------------------
-void StdMeshers_ViscousLayers::SetIgnoreFaces(const std::vector<int>& faceIds)
+void StdMeshers_ViscousLayers::SetBndShapesToIgnore(const std::vector<int>& faceIds)
 {
-  if ( faceIds != _ignoreFaceIds )
-    _ignoreFaceIds = faceIds, NotifySubMeshesHypothesisModification();
+  if ( faceIds != _ignoreBndShapeIds )
+    _ignoreBndShapeIds = faceIds, NotifySubMeshesHypothesisModification();
+} // --------------------------------------------------------------------------------
+bool StdMeshers_ViscousLayers::IsIgnoredShape(const int shapeID) const
+{
+  return ( find( _ignoreBndShapeIds.begin(), _ignoreBndShapeIds.end(), shapeID )
+           != _ignoreBndShapeIds.end() );
 } // --------------------------------------------------------------------------------
 void StdMeshers_ViscousLayers::SetTotalThickness(double thickness)
 {
@@ -584,7 +601,7 @@ StdMeshers_ViscousLayers::Compute(SMESH_Mesh&         theMesh,
                                   const TopoDS_Shape& theShape,
                                   const bool          toMakeN2NMap) const
 {
-  using namespace VISCOUS;
+  using namespace VISCOUS_3D;
   _ViscousBuilder bulder;
   SMESH_ComputeErrorPtr err = bulder.Compute( theMesh, theShape );
   if ( err && !err->IsOK() )
@@ -620,17 +637,17 @@ std::ostream & StdMeshers_ViscousLayers::SaveTo(std::ostream & save)
   save << " " << _nbLayers
        << " " << _thickness
        << " " << _stretchFactor
-       << " " << _ignoreFaceIds.size();
-  for ( unsigned i = 0; i < _ignoreFaceIds.size(); ++i )
-    save << " " << _ignoreFaceIds[i];
+       << " " << _ignoreBndShapeIds.size();
+  for ( unsigned i = 0; i < _ignoreBndShapeIds.size(); ++i )
+    save << " " << _ignoreBndShapeIds[i];
   return save;
 } // --------------------------------------------------------------------------------
 std::istream & StdMeshers_ViscousLayers::LoadFrom(std::istream & load)
 {
   int nbFaces, faceID;
   load >> _nbLayers >> _thickness >> _stretchFactor >> nbFaces;
-  while ( _ignoreFaceIds.size() < nbFaces && load >> faceID )
-    _ignoreFaceIds.push_back( faceID );
+  while ( _ignoreBndShapeIds.size() < nbFaces && load >> faceID )
+    _ignoreBndShapeIds.push_back( faceID );
   return load;
 } // --------------------------------------------------------------------------------
 bool StdMeshers_ViscousLayers::SetParametersByMesh(const SMESH_Mesh*   theMesh,
@@ -716,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 );
       }
     }
@@ -849,7 +869,7 @@ namespace
 #endif
 }
 
-using namespace VISCOUS;
+using namespace VISCOUS_3D;
 
 //================================================================================
 /*!
@@ -1051,7 +1071,7 @@ bool _ViscousBuilder::findFacesWithLayers()
   vector<TopoDS_Shape> ignoreFaces;
   for ( unsigned i = 0; i < _sdVec.size(); ++i )
   {
-    vector<TGeomID> ids = _sdVec[i]._hyp->GetIgnoreFaces();
+    vector<TGeomID> ids = _sdVec[i]._hyp->GetBndShapesToIgnore();
     for ( unsigned i = 0; i < ids.size(); ++i )
     {
       const TopoDS_Shape& s = getMeshDS()->IndexToShape( ids[i] );
@@ -1371,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;
@@ -1695,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;
@@ -2844,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;
@@ -3047,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;
   }
 
@@ -3599,6 +3620,7 @@ bool _ViscousBuilder::shrink()
           _Shrinker1D& srinker = e2shrMap[ edgeIndex ];
           eShri1D.insert( & srinker );
           srinker.AddEdge( edge, helper );
+          VISCOUS_3D::ToClearSubWithMain( _mesh->GetSubMesh( edge->_sWOL ), data._solid );
           // restore params of nodes on EGDE if the EDGE has been already
           // srinked while srinking another FACE
           srinker.RestoreParams();
@@ -3684,7 +3706,7 @@ bool _ViscousBuilder::shrink()
       dumpFunctionEnd();
     }
     // Set an event listener to clear FACE sub-mesh together with SOLID sub-mesh
-    _SrinkShapeListener::ToClearSubMeshWithSolid( sm, data._solid );
+    VISCOUS_3D::ToClearSubWithMain( sm, data._solid );
 
     if ( !getMeshDS()->IsEmbeddedMode() )
       // Log node movement
index 42c1871304effa3104e648a6f2da9af835bf86f3..4fa07a9efe0f8a8a572717b5c739efa2d1fcffca 100644 (file)
@@ -39,9 +39,10 @@ class STDMESHERS_EXPORT StdMeshers_ViscousLayers : public SMESH_Hypothesis
 public:
   StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen);
 
-  // Set faces to exclude from treatment
-  void SetIgnoreFaces(const std::vector<int>& faceIds);
-  std::vector<int> GetIgnoreFaces() const { return _ignoreFaceIds; }
+  // Set boundary shapes to exclude from treatment, faces in 3D, edges in 2D
+  void SetBndShapesToIgnore(const std::vector<int>& shapeIds);
+  std::vector<int> GetBndShapesToIgnore() const { return _ignoreBndShapeIds; }
+  bool IsIgnoredShape(const int shapeID) const;
 
   // Set total thickness of layers of prisms
   void SetTotalThickness(double thickness);
@@ -85,10 +86,20 @@ public:
 
  private:
 
-  std::vector<int> _ignoreFaceIds;
+  std::vector<int> _ignoreBndShapeIds;
   int              _nbLayers;
   double           _thickness;
   double           _stretchFactor;
 };
 
+class SMESH_subMesh;
+namespace VISCOUS_3D
+{
+  // sets a sub-mesh event listener to clear sub-meshes of sub-shapes of
+  // the main shape when sub-mesh of the main shape is cleared,
+  // for example to clear sub-meshes of FACEs when sub-mesh of a SOLID
+  // is cleared
+  void ToClearSubWithMain( SMESH_subMesh* sub, const TopoDS_Shape& main);
+}
+
 #endif
diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.cxx
new file mode 100644 (file)
index 0000000..4e4d0ed
--- /dev/null
@@ -0,0 +1,2234 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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      : StdMeshers_ViscousLayers2D.cxx
+// Created   : 23 Jul 2012
+// Author    : Edward AGAPOV (eap)
+
+#include "StdMeshers_ViscousLayers2D.hxx"
+
+#include "SMDS_EdgePosition.hxx"
+#include "SMDS_FaceOfNodes.hxx"
+#include "SMDS_FacePosition.hxx"
+#include "SMDS_MeshNode.hxx"
+#include "SMDS_SetIterator.hxx"
+#include "SMESHDS_Group.hxx"
+#include "SMESHDS_Hypothesis.hxx"
+#include "SMESH_Algo.hxx"
+#include "SMESH_ComputeError.hxx"
+#include "SMESH_ControlsDef.hxx"
+#include "SMESH_Gen.hxx"
+#include "SMESH_Group.hxx"
+#include "SMESH_HypoFilter.hxx"
+#include "SMESH_Mesh.hxx"
+#include "SMESH_MesherHelper.hxx"
+#include "SMESH_ProxyMesh.hxx"
+#include "SMESH_Quadtree.hxx"
+#include "SMESH_subMesh.hxx"
+#include "SMESH_subMeshEventListener.hxx"
+#include "StdMeshers_FaceSide.hxx"
+
+#include "utilities.h"
+
+#include <BRepAdaptor_Curve.hxx>
+#include <BRepAdaptor_Curve2d.hxx>
+#include <BRep_Tool.hxx>
+#include <Bnd_B2d.hxx>
+#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>
+#include <GeomAdaptor_Curve.hxx>
+#include <Geom_Circle.hxx>
+#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>
+#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Vec.hxx>
+#include <gp_XY.hxx>
+
+#include <list>
+#include <string>
+#include <cmath>
+#include <limits>
+
+#ifdef _DEBUG_
+//#define __myDEBUG
+#endif
+
+using namespace std;
+
+//================================================================================
+namespace VISCOUS_2D
+{
+  typedef int TGeomID;
+
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Proxy Mesh of FACE with viscous layers. It's needed only to 
+   *        redefine newSubmesh().
+   */
+  struct _ProxyMeshOfFace : public SMESH_ProxyMesh
+  {
+    //---------------------------------------------------
+    // Proxy sub-mesh of an EDGE. It contains nodes in _uvPtStructVec.
+    struct _EdgeSubMesh : public SMESH_ProxyMesh::SubMesh
+    {
+      _EdgeSubMesh(int index=0): SubMesh(index) {}
+      //virtual int NbElements() const { return _elements.size()+1; }
+      virtual int NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
+      void SetUVPtStructVec(UVPtStructVec& vec) { _uvPtStructVec.swap( vec ); }
+    };
+    _ProxyMeshOfFace(const SMESH_Mesh& mesh): SMESH_ProxyMesh(mesh) {}
+    _EdgeSubMesh* GetEdgeSubMesh(int ID) { return (_EdgeSubMesh*) getProxySubMesh(ID); }
+    virtual SubMesh* newSubmesh(int index=0) const { return new _EdgeSubMesh(index); }
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief SMESH_subMeshEventListener used to store _ProxyMeshOfFace, computed
+   *        by _ViscousBuilder2D, in a SMESH_subMesh of the FACE.
+   *        This is to delete _ProxyMeshOfFace when StdMeshers_ViscousLayers2D
+   *        hypothesis is modified
+   */
+  struct _ProxyMeshHolder : public SMESH_subMeshEventListener
+  {
+    _ProxyMeshHolder( const TopoDS_Face&    face,
+                      SMESH_ProxyMesh::Ptr& mesh)
+      : SMESH_subMeshEventListener( /*deletable=*/true, Name() )
+    {
+      SMESH_subMesh* faceSM = mesh->GetMesh()->GetSubMesh( face );
+      faceSM->SetEventListener( this, new _Data( mesh ), faceSM );
+    }
+    // Finds a proxy mesh of face
+    static SMESH_ProxyMesh::Ptr FindProxyMeshOfFace( const TopoDS_Shape& face,
+                                                     SMESH_Mesh&         mesh )
+    {
+      SMESH_ProxyMesh::Ptr proxy;
+      SMESH_subMesh* faceSM = mesh.GetSubMesh( face );
+      if ( EventListenerData* ld = faceSM->GetEventListenerData( Name() ))
+        proxy = static_cast< _Data* >( ld )->_mesh;
+      return proxy;
+    }
+    // Treat events
+    void ProcessEvent(const int          event,
+                      const int          eventType,
+                      SMESH_subMesh*     subMesh,
+                      EventListenerData* data,
+                      const SMESH_Hypothesis*  /*hyp*/)
+    {
+      if ( event == SMESH_subMesh::CLEAN && eventType == SMESH_subMesh::COMPUTE_EVENT)
+        ((_Data*) data)->_mesh.reset();
+    }
+  private:
+    // holder of a proxy mesh
+    struct _Data : public SMESH_subMeshEventListenerData
+    {
+      SMESH_ProxyMesh::Ptr _mesh;
+      _Data( SMESH_ProxyMesh::Ptr& mesh )
+        :SMESH_subMeshEventListenerData( /*isDeletable=*/true), _mesh( mesh )
+      {}
+    };
+    // Returns identifier string
+    static const char* Name() { return "VISCOUS_2D::_ProxyMeshHolder"; }
+  };
+  
+  struct _PolyLine;
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Segment connecting inner ends of two _LayerEdge's.
+   */
+  struct _Segment
+  {
+    const gp_XY* _uv[2];       // poiter to _LayerEdge::_uvIn
+    int          _indexInLine; // position in _PolyLine
+
+    _Segment() {}
+    _Segment(const gp_XY& p1, const gp_XY& p2):_indexInLine(-1) { _uv[0] = &p1; _uv[1] = &p2; }
+    const gp_XY& p1() const { return *_uv[0]; }
+    const gp_XY& p2() const { return *_uv[1]; }
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Tree of _Segment's used for a faster search of _Segment's.
+   */
+  struct _SegmentTree : public SMESH_Quadtree
+  {
+    typedef boost::shared_ptr< _SegmentTree > Ptr;
+
+    _SegmentTree( const vector< _Segment >& segments );
+    void GetSegmentsNear( const _Segment& seg, vector< const _Segment* >& found );
+    void GetSegmentsNear( const gp_Ax2d& ray, vector< const _Segment* >& found );
+  protected:
+    _SegmentTree() {}
+    _SegmentTree* newChild() const { return new _SegmentTree; }
+    void          buildChildrenData();
+    Bnd_B2d*      buildRootBox();
+  private:
+    static int    maxNbSegInLeaf() { return 5; }
+    struct _SegBox
+    {
+      const _Segment* _seg;
+      bool            _iMin[2];
+      void Set( const _Segment& seg )
+      {
+        _seg = &seg;
+        _iMin[0] = ( seg._uv[1]->X() < seg._uv[0]->X() );
+        _iMin[1] = ( seg._uv[1]->Y() < seg._uv[0]->Y() );
+      }
+      bool IsOut( const _Segment& seg ) const;
+      bool IsOut( const gp_Ax2d& ray ) const;
+    };
+    vector< _SegBox > _segments;
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Edge normal to FACE boundary, connecting a point on EDGE (_uvOut)
+   * and a point of a layer internal boundary (_uvIn)
+   */
+  struct _LayerEdge
+  {
+    gp_XY         _uvOut;    // UV on the FACE boundary
+    gp_XY         _uvIn;     // UV inside the FACE
+    double        _length2D; // distance between _uvOut and _uvIn
+
+    bool          _isBlocked;// is more inflation possible or not
+
+    gp_XY         _normal2D; // to pcurve
+    double        _len2dTo3dRatio; // to pass 2D <--> 3D
+    gp_Ax2d       _ray;      // a ray starting at _uvOut
+
+    vector<gp_XY> _uvRefined; // divisions by layers
+
+    bool SetNewLength( const double length );
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Poly line composed of _Segment's of one EDGE.
+   *        It's used to detect intersection of inflated layers by intersecting
+   *        _Segment's in 2D.
+   */
+  struct _PolyLine
+  {
+    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
+    int                  _lastPntInd;
+
+    vector< _LayerEdge > _lEdges;      /* _lEdges[0] is usually is not treated
+                                          as it is equal to the last one of the _leftLine */
+    vector< _Segment >   _segments;    // segments connecting _uvIn's of _lEdges
+    _SegmentTree::Ptr    _segTree;
+
+    vector< _PolyLine* > _reachableLines;       // lines able to interfere with my layer
+
+    vector< const SMDS_MeshNode* > _leftNodes;  // nodes built from a left VERTEX
+    vector< const SMDS_MeshNode* > _rightNodes; // nodes built from a right VERTEX
+
+    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 && _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] );
+    }
+  };
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Intersector of _Segment's
+   */
+  struct _SegmentIntersection
+  {
+    gp_XY    _vec1, _vec2;     // Vec( _seg.p1(), _seg.p2() )
+    gp_XY    _vec21;           // Vec( _seg2.p1(), _seg1.p1() )
+    double   _D;               // _vec1.Crossed( _vec2 )
+    double   _param1, _param2; // intersection param on _seg1 and _seg2
+
+    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(); 
+      _D = _vec1.Crossed(_vec2);
+      if ( fabs(_D) < std::numeric_limits<double>::min())
+        return false;
+      _param1 = _vec2.Crossed(_vec21) / _D; 
+      if (_param1 < -eps || _param1 > 1 + eps )
+        return false;
+      _param2 = _vec1.Crossed(_vec21) / _D; 
+      if (_param2 < -eps || ( !seg2IsRay && _param2 > 1 + eps ))
+        return false;
+      return true;
+    }
+    bool Compute( const _Segment& seg1, const gp_Ax2d& ray )
+    {
+      gp_XY segEnd = ray.Location().XY() + ray.Direction().XY();
+      _Segment seg2( ray.Location().XY(), segEnd );
+      return Compute( seg1, seg2, true );
+    }
+    //gp_XY GetPoint() { return _seg1.p1() + _param1 * _vec1; }
+  };
+  //--------------------------------------------------------------------------------
+
+  typedef map< const SMDS_MeshNode*, _LayerEdge*, TIDCompare > TNode2Edge;
+  
+  //--------------------------------------------------------------------------------
+  /*!
+   * \brief Builder of viscous layers
+   */
+  class _ViscousBuilder2D
+  {
+  public:
+    _ViscousBuilder2D(SMESH_Mesh&                       theMesh,
+                      const TopoDS_Face&                theFace,
+                      const StdMeshers_ViscousLayers2D* theHyp);
+    SMESH_ComputeErrorPtr GetError() const { return _error; }
+    // does it's job
+    SMESH_ProxyMesh::Ptr  Compute();
+
+  private:
+
+    bool findEdgesWithLayers();
+    bool makePolyLines();
+    bool inflate();
+    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);
+    bool removeMeshFaces(const TopoDS_Shape& face);
+
+    bool              error( const string& text );
+    SMESHDS_Mesh*     getMeshDS() { return _mesh->GetMeshDS(); }
+    _ProxyMeshOfFace* getProxyMesh();
+
+    // debug
+    //void makeGroupOfLE();
+
+  private:
+
+    // input data
+    SMESH_Mesh*                 _mesh;
+    TopoDS_Face                 _face;
+    const StdMeshers_ViscousLayers2D* _hyp;
+
+    // result data
+    SMESH_ProxyMesh::Ptr        _proxyMesh;
+    SMESH_ComputeErrorPtr       _error;
+
+    // working data
+    Handle(Geom_Surface)        _surface;
+    SMESH_MesherHelper          _helper;
+    TSideVector                 _faceSideVec; // wires (StdMeshers_FaceSide) of _face
+    vector<_PolyLine>           _polyLineVec; // fronts to advance
+
+    double                      _fPowN; // to compute thickness of layers
+    double                      _thickness; // required or possible layers thickness
+
+    // sub-shapes of _face 
+    set<TGeomID>                _ignoreShapeIds; // ids of EDGEs w/o layers
+    set<TGeomID>                _noShrinkVert;   // ids of VERTEXes that are extremities
+    // of EDGEs along which _LayerEdge can't be inflated because no viscous layers
+    // defined on neighbour FACEs sharing an EDGE. Nonetheless _LayerEdge's
+    // are inflated along such EDGEs but then such _LayerEdge's are turned into
+    // a node on VERTEX, i.e. all nodes on a _LayerEdge are melded into one node.
+    
+  };
+
+  //================================================================================
+  /*!
+   * \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
+
+//================================================================================
+// StdMeshers_ViscousLayers hypothesis
+//
+StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen)
+  :StdMeshers_ViscousLayers(hypId, studyId, gen)
+{
+  _name = StdMeshers_ViscousLayers2D::GetHypType();
+  _param_algo_dim = -2; // auxiliary hyp used by 2D algos
+}
+// --------------------------------------------------------------------------------
+bool StdMeshers_ViscousLayers2D::SetParametersByMesh(const SMESH_Mesh*   theMesh,
+                                                     const TopoDS_Shape& theShape)
+{
+  // TODO ???
+  return false;
+}
+// --------------------------------------------------------------------------------
+SMESH_ProxyMesh::Ptr
+StdMeshers_ViscousLayers2D::Compute(SMESH_Mesh&        theMesh,
+                                    const TopoDS_Face& theFace)
+{
+  SMESH_ProxyMesh::Ptr pm;
+
+  const StdMeshers_ViscousLayers2D* vlHyp = VISCOUS_2D::findHyp( theMesh, theFace );
+  if ( vlHyp )
+  {
+    VISCOUS_2D::_ViscousBuilder2D builder( theMesh, theFace, vlHyp );
+    pm = builder.Compute();
+    SMESH_ComputeErrorPtr error = builder.GetError();
+    if ( error && !error->IsOK() )
+      theMesh.GetSubMesh( theFace )->GetComputeError() = error;
+    else if ( !pm )
+      pm.reset( new SMESH_ProxyMesh( theMesh ));
+    if ( getenv("ONLY_VL2D"))
+      pm.reset();
+  }
+  else
+  {
+    pm.reset( new SMESH_ProxyMesh( theMesh ));
+  }
+  return pm;
+}
+// --------------------------------------------------------------------------------
+void StdMeshers_ViscousLayers2D::RestoreListeners() const
+{
+  StudyContextStruct* sc = _gen->GetStudyContext( _studyId );
+  std::map < int, SMESH_Mesh * >::iterator i_smesh = sc->mapMesh.begin();
+  for ( ; i_smesh != sc->mapMesh.end(); ++i_smesh )
+  {
+    SMESH_Mesh* smesh = i_smesh->second;
+    if ( !smesh ||
+         !smesh->HasShapeToMesh() ||
+         !smesh->GetMeshDS() ||
+         !smesh->GetMeshDS()->IsUsedHypothesis( this ))
+      continue;
+
+    // set event listeners to EDGE's of FACE where this hyp is used
+    TopoDS_Shape shape = i_smesh->second->GetShapeToMesh();
+    for ( TopExp_Explorer face( shape, TopAbs_FACE); face.More(); face.Next() )
+      if ( SMESH_Algo* algo = _gen->GetAlgo( *smesh, face.Current() ))
+      {
+        const std::list <const SMESHDS_Hypothesis *> & usedHyps =
+          algo->GetUsedHypothesis( *smesh, face.Current(), /*ignoreAuxiliary=*/false );
+        if ( std::find( usedHyps.begin(), usedHyps.end(), this ) != usedHyps.end() )
+          for ( TopExp_Explorer edge( face.Current(), TopAbs_EDGE); edge.More(); edge.Next() )
+            VISCOUS_3D::ToClearSubWithMain( smesh->GetSubMesh( edge.Current() ), face.Current() );
+      }
+  }
+}
+// END StdMeshers_ViscousLayers2D hypothesis
+//================================================================================
+
+using namespace VISCOUS_2D;
+
+//================================================================================
+/*!
+ * \brief Constructor of _ViscousBuilder2D
+ */
+//================================================================================
+
+_ViscousBuilder2D::_ViscousBuilder2D(SMESH_Mesh&                       theMesh,
+                                     const TopoDS_Face&                theFace,
+                                     const StdMeshers_ViscousLayers2D* theHyp):
+  _mesh( &theMesh ), _face( theFace ), _hyp( theHyp ), _helper( theMesh )
+{
+  _helper.SetSubShape( _face );
+  _helper.SetElementsOnShape(true);
+
+  //_face.Orientation( TopAbs_FORWARD );
+  _surface = BRep_Tool::Surface( _face );
+
+  if ( _hyp )
+    _fPowN = pow( _hyp->GetStretchFactor(), _hyp->GetNumberLayers() );
+}
+
+//================================================================================
+/*!
+ * \brief Stores error description and returns false
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::error(const string& text )
+{
+  cout << "_ViscousBuilder2D::error " << text << endl;
+  _error->myName    = COMPERR_ALGO_FAILED;
+  _error->myComment = string("Viscous layers builder 2D: ") + text;
+  if ( SMESH_subMesh* sm = _mesh->GetSubMesh( _face ) )
+  {
+    SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
+    if ( smError && smError->myAlgo )
+      _error->myAlgo = smError->myAlgo;
+    smError = _error;
+  }
+  //makeGroupOfLE(); // debug
+
+  return false;
+}
+
+//================================================================================
+/*!
+ * \brief Does its job
+ */
+//================================================================================
+
+SMESH_ProxyMesh::Ptr _ViscousBuilder2D::Compute()
+{
+  _error       = SMESH_ComputeError::New(COMPERR_OK);
+  _faceSideVec = StdMeshers_FaceSide::GetFaceWires( _face, *_mesh, true, _error );
+  if ( !_error->IsOK() )
+    return _proxyMesh;
+
+  if ( !findEdgesWithLayers() ) // analysis of a shape
+    return _proxyMesh;
+
+  if ( ! makePolyLines() ) // creation of fronts
+    return _proxyMesh;
+    
+  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;
+
+  //improve();
+
+  return _proxyMesh;
+}
+
+//================================================================================
+/*!
+ * \brief Finds EDGE's to make viscous layers on.
+ */
+//================================================================================
+
+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 ) {
+      _ignoreShapeIds.insert( ids[i] );
+      nbMyEdgesIgnored += ( _helper.IsSubShape( s, _face ));
+    }
+  }
+
+  // check all EDGEs of the _face
+  int totalNbEdges = 0;
+  for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
+  {
+    StdMeshers_FaceSidePtr wire = _faceSideVec[ iWire ];
+    totalNbEdges += wire->NbEdges();
+    for ( int iE = 0; iE < wire->NbEdges(); ++iE )
+      if ( _helper.NbAncestors( wire->Edge( iE ), *_mesh, TopAbs_FACE ) > 1 )
+      {
+        // ignore internal EDGEs (shared by several FACEs)
+        TGeomID edgeID = getMeshDS()->ShapeToIndex( wire->Edge( iE ));
+        _ignoreShapeIds.insert( edgeID );
+
+        // check if ends of an EDGE are to be added to _noShrinkVert
+        PShapeIteratorPtr faceIt = _helper.GetAncestors( wire->Edge( iE ), *_mesh, TopAbs_FACE );
+        while ( const TopoDS_Shape* neighbourFace = faceIt->next() )
+        {
+          if ( neighbourFace->IsSame( _face )) continue;
+          SMESH_Algo* algo = _mesh->GetGen()->GetAlgo( *_mesh, *neighbourFace );
+          if ( !algo ) continue;
+
+          const StdMeshers_ViscousLayers2D* viscHyp = 0;
+          const list <const SMESHDS_Hypothesis *> & allHyps =
+            algo->GetUsedHypothesis(*_mesh, *neighbourFace, /*noAuxiliary=*/false);
+          list< const SMESHDS_Hypothesis *>::const_iterator hyp = allHyps.begin();
+          for ( ; hyp != allHyps.end() && !viscHyp; ++hyp )
+            viscHyp = dynamic_cast<const StdMeshers_ViscousLayers2D*>( *hyp );
+
+          set<TGeomID> neighbourIgnoreEdges;
+          if (viscHyp) {
+            vector<TGeomID> ids = _hyp->GetBndShapesToIgnore();
+            neighbourIgnoreEdges.insert( ids.begin(), ids.end() );
+          }
+          for ( int iV = 0; iV < 2; ++iV )
+          {
+            TopoDS_Vertex vertex = iV ? wire->LastVertex(iE) : wire->FirstVertex(iE);
+            if ( !viscHyp )
+              _noShrinkVert.insert( getMeshDS()->ShapeToIndex( vertex ));
+            else
+            {
+              PShapeIteratorPtr edgeIt = _helper.GetAncestors( vertex, *_mesh, TopAbs_EDGE );
+              while ( const TopoDS_Shape* edge = edgeIt->next() )
+                if ( !edge->IsSame( wire->Edge( iE )) &&
+                     neighbourIgnoreEdges.count( getMeshDS()->ShapeToIndex( *edge )))
+                  _noShrinkVert.insert( getMeshDS()->ShapeToIndex( vertex ));
+            }
+          }
+        }
+      }
+  }
+  return ( nbMyEdgesIgnored < totalNbEdges );
+}
+
+//================================================================================
+/*!
+ * \brief Create the inner front of the viscous layers and prepare data for infation
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::makePolyLines()
+{
+  // Create _PolyLines and _LayerEdge's
+
+  // count total nb of EDGEs to allocate _polyLineVec
+  int nbEdges = 0;
+  for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
+    nbEdges += _faceSideVec[ iWire ]->NbEdges();
+  _polyLineVec.resize( nbEdges );
+
+  // Assign data to _PolyLine's
+  // ---------------------------
+
+  size_t iPoLine = 0;
+  for ( size_t iWire = 0; iWire < _faceSideVec.size(); ++iWire )
+  {
+    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 )
+    {
+      _PolyLine& L  = _polyLineVec[ iPoLine++ ];
+      L._wire       = wire.get();
+      L._edgeInd    = iE;
+      L._advancable = !_ignoreShapeIds.count( wire->EdgeID( iE ));
+
+      int iRight    = iPoLine - (( iE+1 < wire->NbEdges() ) ? 0 : wire->NbEdges() );
+      L._rightLine  = &_polyLineVec[ iRight ];
+      _polyLineVec[ iRight ]._leftLine = &L;
+
+      L._firstPntInd = iPnt;
+      double lastNormPar = wire->LastParameter( iE ) - 1e-10;
+      while ( points[ iPnt ].normParam < lastNormPar )
+        ++iPnt;
+      L._lastPntInd = iPnt;
+      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 );
+      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 );
+        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 );
+      }
+    }
+  }
+
+  // Fill _PolyLine's with _segments
+  // --------------------------------
+
+  double maxLen2dTo3dRatio = 0;
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    _PolyLine& L = _polyLineVec[ iPoLine ];
+    L._segments.resize( L._lEdges.size() - 1 );
+    for ( size_t i = 1; i < L._lEdges.size(); ++i )
+    {
+      _Segment & S   = L._segments[i-1];
+      S._uv[0]       = & L._lEdges[i-1]._uvIn;
+      S._uv[1]       = & L._lEdges[i  ]._uvIn;
+      S._indexInLine = i-1;
+      if ( maxLen2dTo3dRatio < L._lEdges[i]._len2dTo3dRatio )
+        maxLen2dTo3dRatio = L._lEdges[i]._len2dTo3dRatio;
+    }
+    // // connect _PolyLine's with segments, the 1st _LayerEdge of every _PolyLine
+    // // becomes not connected to any segment
+    // if ( L._leftLine->_advancable )
+    //   L._segments[0]._uv[0] = & L._leftLine->_lEdges.back()._uvIn;
+
+    L._segTree.reset( new _SegmentTree( L._segments ));
+  }
+
+  // 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 )
+  {
+    vector< const _Segment* > foundSegs;
+    double maxPossibleThick = 0;
+    _SegmentIntersection intersection;
+    for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
+    {
+      _PolyLine& L1 = _polyLineVec[ iL1 ];
+      _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();
+          L2._segTree->GetSegmentsNear( L1._lEdges[iLE]._ray, foundSegs );
+          for ( size_t i = 0; i < foundSegs.size(); ++i )
+            if ( intersection.Compute( *foundSegs[i], L1._lEdges[iLE]._ray ))
+            {
+              double  distToL2 = intersection._param2 / L1._lEdges[iLE]._len2dTo3dRatio;
+              double psblThick = distToL2 / ( 1 + L1._advancable + L2._advancable );
+              if ( maxPossibleThick < psblThick )
+                maxPossibleThick = psblThick;
+            }
+        }
+      }
+    }
+    _thickness = Min( _hyp->GetTotalThickness(), maxPossibleThick );
+  }
+
+  // Adjust _LayerEdge's at _PolyLine's extremities
+  // -----------------------------------------------
+
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    _PolyLine& LL = _polyLineVec[ iPoLine ];
+    _PolyLine& LR = *LL._rightLine;
+    adjustCommonEdge( LL, LR );
+  }
+  // recreate _segments if some _LayerEdge's have been removed by adjustCommonEdge()
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    _PolyLine& L = _polyLineVec[ iPoLine ];
+    // if ( L._segments.size() ==  L._lEdges.size() - 1 )
+    //   continue;
+    L._segments.resize( L._lEdges.size() - 1 );
+    for ( size_t i = 1; i < L._lEdges.size(); ++i )
+    {
+      _Segment & S   = L._segments[i-1];
+      S._uv[0]       = & L._lEdges[i-1]._uvIn;
+      S._uv[1]       = & L._lEdges[i  ]._uvIn;
+      S._indexInLine = i-1;
+    }
+    L._segTree.reset( new _SegmentTree( L._segments ));
+  }
+  // connect _PolyLine's with segments, the 1st _LayerEdge of every _PolyLine
+  // becomes not connected to any segment
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    _PolyLine& L = _polyLineVec[ iPoLine ];
+    if ( L._leftLine->_advancable )
+      L._segments[0]._uv[0] = & L._leftLine->_lEdges.back()._uvIn;
+  }
+
+  // Fill _reachableLines.
+  // ----------------------
+
+  // compute bnd boxes taking into account the layers total thickness
+  vector< _SegmentTree::box_type > lineBoxes( _polyLineVec.size() );
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    lineBoxes[ iPoLine ] = *_polyLineVec[ iPoLine ]._segTree->getBox();
+    if ( _polyLineVec[ iPoLine ]._advancable )
+      lineBoxes[ iPoLine ].Enlarge( maxLen2dTo3dRatio * _thickness * 2 );
+  }
+  // _reachableLines
+  for ( iPoLine = 0; iPoLine < _polyLineVec.size(); ++iPoLine )
+  {
+    _PolyLine& L1 = _polyLineVec[ iPoLine ];
+    for ( size_t iL2 = 0; iL2 < _polyLineVec.size(); ++iL2 )
+    {
+      _PolyLine& L2 = _polyLineVec[ iL2 ];
+      if ( iPoLine == iL2 || lineBoxes[ iPoLine ].IsOut( lineBoxes[ iL2 ]))
+        continue;
+      if ( !L1._advancable && ( L1._leftLine == &L2 || L1._rightLine == &L2 ))
+        continue;
+      // check reachability by _LayerEdge's
+      int iDelta = 1; //Max( 1, L1._lEdges.size() / 100 );
+      for ( size_t iLE = 1; iLE < L1._lEdges.size(); iLE += iDelta )
+      {
+        _LayerEdge& LE = L1._lEdges[iLE];
+        if ( !lineBoxes[ iL2 ].IsOut ( LE._uvOut,
+                                       LE._uvOut + LE._normal2D *_thickness * LE._len2dTo3dRatio ))
+        {
+          L1._reachableLines.push_back( & L2 );
+          break;
+        }
+      }
+    }
+    // add self to _reachableLines
+    Geom2dAdaptor_Curve pcurve( L1._wire->Curve2d( L1._edgeInd ));
+    L1._isStraight2D = ( pcurve.GetType() == GeomAbs_Line );
+    if ( !L1._isStraight2D )
+    {
+      // TODO: check carefully
+      L1._reachableLines.push_back( & L1 );
+    }
+  }
+
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief adjust common _LayerEdge of two adjacent _PolyLine's
+ *  \param LL - left _PolyLine
+ *  \param LR - right _PolyLine
+ */
+//================================================================================
+
+void _ViscousBuilder2D::adjustCommonEdge( _PolyLine& LL, _PolyLine& LR )
+{
+  int nbAdvancableL = LL._advancable + LR._advancable;
+  if ( nbAdvancableL == 0 )
+    return;
+
+  _LayerEdge& EL = LL._lEdges.back();
+  _LayerEdge& ER = LR._lEdges.front();
+  gp_XY normL    = EL._normal2D;
+  gp_XY normR    = ER._normal2D;
+  gp_XY tangL ( normL.Y(), -normL.X() );
+
+  // 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 ));
+
+  ER = EL;
+
+  const double dotNormTang = normR * tangL;
+  const bool    largeAngle = Abs( dotNormTang ) > 0.2;
+  if ( largeAngle ) // not 180 degrees
+  {
+    // recompute _len2dTo3dRatio to take into account angle between EDGEs
+    gp_Vec2d oldNorm( LL._advancable ? normL : normR );
+    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 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 + 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;
+        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( 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( lastIntersection._param1 , lastIntersection._param2 );
+          L._lEdges.front()._len2dTo3dRatio *= lastIntersection._param1; // ??
+          L._lEdges.back ()._len2dTo3dRatio *= lastIntersection._param2;
+        }
+        else if ( iLE != 1 )
+        {
+          // eIt points to the _LayerEdge not intersecting with segCommon
+          if ( isR )
+            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;
+        }
+      }
+    }
+    else // ------------------------------------------ CONCAVE ANGLE
+    {
+      if ( nbAdvancableL == 1 )
+      {
+        // 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
+ */
+//================================================================================
+
+void _ViscousBuilder2D::setLenRatio( _LayerEdge& LE, const gp_Pnt& pOut )
+{
+  const double probeLen2d = 1e-3;
+
+  gp_Pnt2d p2d = LE._uvOut + LE._normal2D * probeLen2d;
+  gp_Pnt   p3d = _surface->Value( p2d.X(), p2d.Y() );
+  double len3d = p3d.Distance( pOut );
+  if ( len3d < std::numeric_limits<double>::min() )
+    LE._len2dTo3dRatio = std::numeric_limits<double>::min();
+  else
+    LE._len2dTo3dRatio = probeLen2d / len3d;
+}
+
+//================================================================================
+/*!
+ * \brief Increase length of _LayerEdge's to reach the required thickness of layers
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::inflate()
+{
+  // Limit size of inflation step by geometry size found by
+  // itersecting _LayerEdge's with _Segment's
+  double minSize = _thickness, maxSize = 0;
+  vector< const _Segment* > foundSegs;
+  _SegmentIntersection intersection;
+  for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
+  {
+    _PolyLine& L1 = _polyLineVec[ iL1 ];
+    for ( size_t iL2 = 0; iL2 < L1._reachableLines.size(); ++iL2 )
+    {
+      _PolyLine& L2 = * L1._reachableLines[ iL2 ];
+      for ( size_t iLE = 1; iLE < L1._lEdges.size(); ++iLE )
+      {
+        foundSegs.clear();
+        L2._segTree->GetSegmentsNear( L1._lEdges[iLE]._ray, foundSegs );
+        for ( size_t i = 0; i < foundSegs.size(); ++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     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 << "-- minSize = " << minSize << ", maxSize = " << maxSize << endl;
+#endif
+
+  double curThick = 0, stepSize = minSize;
+  int nbSteps = 0;
+  if ( maxSize > _thickness )
+    maxSize = _thickness;
+  while ( curThick < maxSize )
+  {
+    curThick += stepSize * 1.25;
+    if ( curThick > _thickness )
+      curThick = _thickness;
+
+    // Elongate _LayerEdge's
+    for ( size_t iL = 0; iL < _polyLineVec.size(); ++iL )
+    {
+      _PolyLine& L = _polyLineVec[ iL ];
+      if ( !L._advancable ) continue;
+      bool lenChange = false;
+      for ( size_t iLE = L.FirstLEdge(); iLE < L._lEdges.size(); ++iLE )
+        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;
+      if ( lenChange )
+        L._segTree.reset( new _SegmentTree( L._segments ));
+    }
+
+    // Avoid intersection of _Segment's
+    bool allBlocked = fixCollisions();
+    if ( allBlocked )
+    {
+      break; // no more inflating possible
+    }
+    stepSize = Max( stepSize , _thickness / 10. );
+    nbSteps++;
+  }
+
+  // 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
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::fixCollisions()
+{
+  // look for intersections of _Segment's by intersecting _LayerEdge's with
+  // _Segment's
+  //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 ];
+    //if ( !L1._advancable ) continue;
+    for ( size_t iL2 = 0; iL2 < L1._reachableLines.size(); ++iL2 )
+    {
+      _PolyLine& L2 = * L1._reachableLines[ iL2 ];
+      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], &LE1 ) &&
+               intersection.Compute( *foundSegs[i], LE1._ray ))
+          {
+            const double dist2DToL2 = intersection._param2;
+            double         newLen2D = dist2DToL2 / 2;
+            if ( newLen2D < 1.1 * LE1._length2D ) // collision!
+            {
+              if ( newLen2D < LE1._length2D )
+              {
+                blockedEdgesList.push_back( &LE1 );
+                if ( L1._advancable )
+                {
+                  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
+                {
+                  _LayerEdge LE2[2] = { L2._lEdges[ foundSegs[i]->_indexInLine     ],
+                                        L2._lEdges[ foundSegs[i]->_indexInLine + 1 ] };
+                  _Segment outSeg2( LE2[0]._uvOut, LE2[1]._uvOut );
+                  intersection.Compute( outSeg2, LE1._ray );
+                  newLen2D = intersection._param2 / 2;
+
+                  edgeLenLimitList.push_back( make_pair( &LE2[0], newLen2D ));
+                  edgeLenLimitList.push_back( make_pair( &LE2[1], newLen2D ));
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  // 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;
+}
+
+//================================================================================
+/*!
+ * \brief Create new edges and shrink edges existing on a non-advancable _PolyLine
+ *        adjacent to an advancable one.
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::shrink()
+{
+  gp_Pnt2d uv; //gp_Vec2d tangent;
+  _SegmentIntersection intersection;
+  double sign;
+
+  for ( size_t iL1 = 0; iL1 < _polyLineVec.size(); ++iL1 )
+  {
+    _PolyLine& L = _polyLineVec[ iL1 ]; // line with no layers
+    if ( L._advancable )
+      continue;
+    const int nbAdvancable = ( L._rightLine->_advancable + L._leftLine->_advancable );
+    if ( nbAdvancable == 0 )
+      continue;
+
+    const TopoDS_Edge&        E = L._wire->Edge      ( L._edgeInd );
+    const int            edgeID = L._wire->EdgeID    ( L._edgeInd );
+    const double        edgeLen = L._wire->EdgeLength( L._edgeInd );
+    Handle(Geom2d_Curve) pcurve = L._wire->Curve2d   ( L._edgeInd );
+    const bool     edgeReversed = ( E.Orientation() == TopAbs_REVERSED );
+
+    SMESH_MesherHelper helper( *_mesh ); // to create nodes and edges on E
+    helper.SetSubShape( E );
+    helper.SetElementsOnShape( true );
+
+    // 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 ))
+      {
+        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( adjFace );
+        }
+        else
+        {
+          // 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 )
+          {
+            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() );
+            }
+          }
+          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
+
+    if ( existingNodesFound )
+      continue; // nothing more to do in this case
+
+    double u1 = L._wire->FirstU( L._edgeInd ), uf = u1;
+    double u2 = L._wire->LastU ( L._edgeInd ), ul = u2;
+
+    // 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 ]);
+    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 )
+    {
+      const double len = GCPnts_AbscissaPoint::Length( curve, uf, nodeDataVec[iP].param );
+      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-----
+    //  |  e1    e2    e3    e4
+
+    // After
+    //  n1          n2    n3
+    //  x-x-x-x-----x-----x----
+    //  | | | |  e1    e2    e3
+
+    int isRShrinkedForAdjacent;
+    UVPtStructVec nodeDataForAdjacent;
+    for ( int isR = 0; isR < 2; ++isR )
+    {
+      _PolyLine* L2 = isR ? L._rightLine : L._leftLine; // line with layers
+      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 = nearLE._length2D;
+      double  length1D = 0;
+      sign = ( isR ^ edgeReversed ) ? -1. : 1.;
+
+      bool isConvex = false;
+      if ( L2->_advancable )
+      {
+        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 // 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 --> 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 );
+      nodeDataVec[ iPEnd ].u = newUV.X();
+      nodeDataVec[ iPEnd ].v = newUV.Y();
+
+      // compute params of layers on L
+      vector<double> heights;
+      calcLayersHeight( u - u0, heights );
+      //
+      vector< double > params( heights.size() );
+      for ( size_t i = 0; i < params.size(); ++i )
+        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() );
+      layersNode.resize( _hyp->GetNumberLayers() );
+      const SMDS_MeshNode* vertexNode = nodeDataVec[ iPEnd ].node;
+      const SMDS_MeshNode *  prevNode = vertexNode;
+      for ( size_t i = 0; i < params.size(); ++i )
+      {
+        gp_Pnt p        = curve.Value( params[i] );
+        layersNode[ i ] = helper.AddNode( p.X(), p.Y(), p.Z(), /*id=*/0, params[i] );
+        nodeUV    [ i ] = pcurve->Value( params[i] ).XY();
+        helper.AddEdge( prevNode, layersNode[ i ] );
+        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 );
+      const SMDS_MeshNode* segNodes[3];
+      while ( segIt->more() )
+      {
+        const SMDS_MeshElement* segment = segIt->next();
+        if ( segment->getshapeId() != edgeID ) continue;
+        
+        const int nbNodes = segment->NbNodes();
+        for ( int i = 0; i < nbNodes; ++i )
+        {
+          const SMDS_MeshNode* n = segment->GetNode( i );
+          segNodes[ i ] = ( n == vertexNode ? layersNode.back() : n );
+        }
+        getMeshDS()->ChangeElementNodes( segment, segNodes, nbNodes );
+        break;
+      }
+      nodeDataVec[ iPEnd ].node = layersNode.back();
+
+    } // loop on the extremities of L
+
+    // Shrink edges to fit in between the layers at EDGE ends
+
+    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;
+
+      GCPnts_AbscissaPoint discret( curve, segLengths[iP-1] * lenRatio, u1 );
+      if ( !discret.IsDone() )
+        throw SALOME_Exception(LOCALIZED("GCPnts_AbscissaPoint failed"));
+
+      nodeDataVec[iP].param = discret.Parameter();
+      if ( oldNode->GetPosition()->GetTypeOfPosition() != SMDS_TOP_EDGE )
+        throw SALOME_Exception(SMESH_Comment("ViscousBuilder2D: not SMDS_TOP_EDGE node position: ")
+                               << oldNode->GetPosition()->GetTypeOfPosition()
+                               << " of node " << oldNode->GetID());
+      SMDS_EdgePosition* pos = static_cast<SMDS_EdgePosition*>( oldNode->GetPosition() );
+      pos->SetUParameter( nodeDataVec[iP].param );
+
+      gp_Pnt newP = curve.Value( nodeDataVec[iP].param );
+      getMeshDS()->MoveNode( oldNode, newP.X(), newP.Y(), newP.Z() );
+
+      gp_Pnt2d newUV = pcurve->Value( nodeDataVec[iP].param ).XY();
+      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;
+    }
+
+    // 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
+    _ProxyMeshOfFace::_EdgeSubMesh* edgeSM = getProxyMesh()->GetEdgeSubMesh( edgeID );
+    edgeSM->SetUVPtStructVec( nodeDataVec );
+
+    // set a sub-mesh event listener to remove just created edges when
+    // "ViscousLayers2D" hypothesis is modified
+    VISCOUS_3D::ToClearSubWithMain( _mesh->GetSubMesh( E ), _face );
+
+  } // loop on _polyLineVec
+
+  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
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::refine()
+{
+  // store a proxyMesh in a sub-mesh
+  // make faces on each _PolyLine
+  vector< double > layersHeight;
+  double prevLen2D = -1;
+  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
+    size_t iLE = 0, nbLE = L._lEdges.size();
+    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 && 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];
+      if ( fabs( LE._length2D - prevLen2D ) > LE._length2D / 100. )
+      {
+        calcLayersHeight( LE._length2D, layersHeight );
+        prevLen2D = LE._length2D;
+      }
+      for ( size_t i = 0; i < layersHeight.size(); ++i )
+        LE._uvRefined.push_back( LE._uvOut + LE._normal2D * layersHeight[i] );
+    }
+
+    // nodes to create 1 layer of faces
+    vector< const SMDS_MeshNode* > outerNodes( L._lastPntInd - L._firstPntInd + 1 );
+    vector< const SMDS_MeshNode* > innerNodes( L._lastPntInd - L._firstPntInd + 1 );
+
+    // initialize outerNodes by node on the L._wire
+    const vector<UVPtStruct>& points = L._wire->GetUVPtStruct();
+    for ( int i = L._firstPntInd; i <= L._lastPntInd; ++i )
+      outerNodes[ i-L._firstPntInd ] = points[i].node;
+
+    // compute normalized [0;1] node parameters of outerNodes
+    vector< double > normPar( L._lastPntInd - L._firstPntInd + 1 );
+    const double
+      normF    = L._wire->FirstParameter( L._edgeInd ),
+      normL    = L._wire->LastParameter ( L._edgeInd ),
+      normDist = normL - normF;
+    for ( int i = L._firstPntInd; i <= L._lastPntInd; ++i )
+      normPar[ i - L._firstPntInd ] = ( points[i].normParam - normF ) / normDist;
+
+    // Create layers of faces
+
+    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
+      for ( iS = 1; iS < segLen.size(); ++iS )
+      {
+        double sLen = (L._lEdges[iS-1]._uvRefined[iF] - L._lEdges[iS]._uvRefined[iF] ).Modulus();
+        segLen[iS] = segLen[iS-1] + sLen;
+      }
+      // normalize the accumulated length
+      for ( iS = 1; iS < segLen.size(); ++iS )
+        segLen[iS] /= segLen.back();
+
+      // create innerNodes of a current layer
+      iS = 0;
+      for ( size_t i = iN0; i < nbN; ++i )
+      {
+        while ( normPar[i] > segLen[iS+1] )
+          ++iS;
+        double r = ( normPar[i] - segLen[iS] ) / ( segLen[iS+1] - segLen[iS] );
+        gp_XY uv = r * L._lEdges[iS+1]._uvRefined[iF] + (1-r) * L._lEdges[iS]._uvRefined[iF];
+        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() );
+      }
+      // 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 )
+        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
+
+    UVPtStructVec nodeDataVec( outerNodes.size() ); // outerNodes swapped with innerNodes
+    for ( size_t i = 0; i < outerNodes.size(); ++i )
+    {
+      gp_XY uv = _helper.GetNodeUV( _face, outerNodes[i] );
+      nodeDataVec[i].u         = uv.X();
+      nodeDataVec[i].v         = uv.Y();
+      nodeDataVec[i].node      = outerNodes[i];
+      nodeDataVec[i].param     = points [i + L._firstPntInd].param;
+      nodeDataVec[i].normParam = normPar[i];
+      nodeDataVec[i].x         = normPar[i];
+      nodeDataVec[i].y         = normPar[i];
+    }
+    nodeDataVec.front().param = L._wire->FirstU( L._edgeInd );
+    nodeDataVec.back() .param = L._wire->LastU ( L._edgeInd );
+
+    _ProxyMeshOfFace::_EdgeSubMesh* edgeSM
+      = getProxyMesh()->GetEdgeSubMesh( L._wire->EdgeID( L._edgeInd ));
+    edgeSM->SetUVPtStructVec( nodeDataVec );
+
+  } // loop on _PolyLine's
+
+  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
+ */
+//================================================================================
+
+bool _ViscousBuilder2D::removeMeshFaces(const TopoDS_Shape& face)
+{
+  // we don't use SMESH_subMesh::ComputeStateEngine() because of a listener
+  // which clears EDGEs together with _face.
+  bool thereWereElems = false;
+  SMESH_subMesh* sm = _mesh->GetSubMesh( face );
+  if ( SMESHDS_SubMesh* smDS = sm->GetSubMeshDS() )
+  {
+    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;
+}
+
+//================================================================================
+/*!
+ * \brief Creates a _ProxyMeshOfFace and store it in a sub-mesh of FACE
+ */
+//================================================================================
+
+_ProxyMeshOfFace* _ViscousBuilder2D::getProxyMesh()
+{
+  if ( _proxyMesh.get() )
+    return (_ProxyMeshOfFace*) _proxyMesh.get();
+
+  _ProxyMeshOfFace* proxyMeshOfFace = new _ProxyMeshOfFace( *_mesh );
+  _proxyMesh.reset( proxyMeshOfFace );
+  new _ProxyMeshHolder( _face, _proxyMesh );
+
+  return proxyMeshOfFace;
+}
+
+//================================================================================
+/*!
+ * \brief Calculate height of layers for the given thickness. Height is measured
+ *        from the outer boundary
+ */
+//================================================================================
+
+void _ViscousBuilder2D::calcLayersHeight(const double    totalThick,
+                                         vector<double>& heights)
+{
+  heights.resize( _hyp->GetNumberLayers() );
+  double h0;
+  if ( _fPowN - 1 <= numeric_limits<double>::min() )
+    h0 = totalThick / _hyp->GetNumberLayers();
+  else
+    h0 = totalThick * ( _hyp->GetStretchFactor() - 1 )/( _fPowN - 1 );
+
+  double hSum = 0, hi = h0;
+  for ( int i = 0; i < _hyp->GetNumberLayers(); ++i )
+  {
+    hSum += hi;
+    heights[ i ] = hSum;
+    hi *= _hyp->GetStretchFactor();
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Elongate this _LayerEdge
+ */
+//================================================================================
+
+bool _LayerEdge::SetNewLength( const double length3D )
+{
+  if ( _isBlocked ) return false;
+
+  //_uvInPrev = _uvIn;
+  _length2D = length3D * _len2dTo3dRatio;
+  _uvIn     = _uvOut + _normal2D * _length2D;
+  return true;
+}
+
+//================================================================================
+/*!
+ * \brief Return true if _LayerEdge at a common VERTEX between EDGEs with
+ *  and w/o layer is common to the both _PolyLine's. If this is true, nodes
+ *  of this _LayerEdge are inflated along a _PolyLine w/o layer, else the nodes
+ *  are inflated along _normal2D of _LayerEdge of EDGE with layer
+ */
+//================================================================================
+
+bool _PolyLine::IsCommonEdgeShared( const _PolyLine& other )
+{
+  const double tol = 1e-30;
+
+  if ( & other == _leftLine )
+    return _lEdges[0]._normal2D.IsEqual( _leftLine->_lEdges.back()._normal2D, tol );
+
+  if ( & other == _rightLine )
+    return _lEdges.back()._normal2D.IsEqual( _rightLine->_lEdges[0]._normal2D, tol );
+
+  return false;
+}
+
+//================================================================================
+/*!
+ * \brief Constructor of SegmentTree
+ */
+//================================================================================
+
+_SegmentTree::_SegmentTree( const vector< _Segment >& segments ):
+  SMESH_Quadtree()
+{
+  _segments.resize( segments.size() );
+  for ( size_t i = 0; i < segments.size(); ++i )
+    _segments[i].Set( segments[i] );
+
+  compute();
+}
+
+//================================================================================
+/*!
+ * \brief Return the maximal bnd box
+ */
+//================================================================================
+
+_SegmentTree::box_type* _SegmentTree::buildRootBox()
+{
+  _SegmentTree::box_type* box = new _SegmentTree::box_type;
+  for ( size_t i = 0; i < _segments.size(); ++i )
+  {
+    box->Add( *_segments[i]._seg->_uv[0] );
+    box->Add( *_segments[i]._seg->_uv[1] );
+  }
+  return box;
+}
+
+//================================================================================
+/*!
+ * \brief Redistrubute _segments among children
+ */
+//================================================================================
+
+void _SegmentTree::buildChildrenData()
+{
+  for ( int i = 0; i < _segments.size(); ++i )
+    for (int j = 0; j < nbChildren(); j++)
+      if ( !myChildren[j]->getBox()->IsOut( *_segments[i]._seg->_uv[0],
+                                            *_segments[i]._seg->_uv[1] ))
+        ((_SegmentTree*)myChildren[j])->_segments.push_back( _segments[i]);
+
+  SMESHUtils::FreeVector( _segments ); // = _elements.clear() + free memory
+
+  for (int j = 0; j < nbChildren(); j++)
+  {
+    _SegmentTree* child = static_cast<_SegmentTree*>( myChildren[j]);
+    child->myIsLeaf = ( child->_segments.size() <= maxNbSegInLeaf() );
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Return elements which can include the point
+ */
+//================================================================================
+
+void _SegmentTree::GetSegmentsNear( const _Segment&            seg,
+                                    vector< const _Segment* >& found )
+{
+  if ( getBox()->IsOut( *seg._uv[0], *seg._uv[1] ))
+    return;
+
+  if ( isLeaf() )
+  {
+    for ( int i = 0; i < _segments.size(); ++i )
+      if ( !_segments[i].IsOut( seg ))
+        found.push_back( _segments[i]._seg );
+  }
+  else
+  {
+    for (int i = 0; i < nbChildren(); i++)
+      ((_SegmentTree*) myChildren[i])->GetSegmentsNear( seg, found );
+  }
+}
+
+
+//================================================================================
+/*!
+ * \brief Return segments intersecting a ray
+ */
+//================================================================================
+
+void _SegmentTree::GetSegmentsNear( const gp_Ax2d&             ray,
+                                    vector< const _Segment* >& found )
+{
+  if ( getBox()->IsOut( ray ))
+    return;
+
+  if ( isLeaf() )
+  {
+    for ( int i = 0; i < _segments.size(); ++i )
+      if ( !_segments[i].IsOut( ray ))
+        found.push_back( _segments[i]._seg );
+  }
+  else
+  {
+    for (int i = 0; i < nbChildren(); i++)
+      ((_SegmentTree*) myChildren[i])->GetSegmentsNear( ray, found );
+  }
+}
+
+//================================================================================
+/*!
+ * \brief Classify a _Segment
+ */
+//================================================================================
+
+bool _SegmentTree::_SegBox::IsOut( const _Segment& seg ) const
+{
+  const double eps = std::numeric_limits<double>::min();
+  for ( int iC = 0; iC < 2; ++iC )
+  {
+    if ( seg._uv[0]->Coord(iC+1) < _seg->_uv[ _iMin[iC]]->Coord(iC+1)+eps &&
+         seg._uv[1]->Coord(iC+1) < _seg->_uv[ _iMin[iC]]->Coord(iC+1)+eps )
+      return true;
+    if ( seg._uv[0]->Coord(iC+1) > _seg->_uv[ 1-_iMin[iC]]->Coord(iC+1)-eps &&
+         seg._uv[1]->Coord(iC+1) > _seg->_uv[ 1-_iMin[iC]]->Coord(iC+1)-eps )
+      return true;
+  }
+  return false;
+}
+
+//================================================================================
+/*!
+ * \brief Classify a ray
+ */
+//================================================================================
+
+bool _SegmentTree::_SegBox::IsOut( const gp_Ax2d& ray ) const
+{
+  double distBoxCenter2Ray =
+    ray.Direction().XY() ^ ( ray.Location().XY() - 0.5 * (*_seg->_uv[0] + *_seg->_uv[1]));
+
+  double boxSectionDiam =
+    Abs( ray.Direction().X() ) * ( _seg->_uv[1-_iMin[1]]->Y() - _seg->_uv[_iMin[1]]->Y() ) +
+    Abs( ray.Direction().Y() ) * ( _seg->_uv[1-_iMin[0]]->X() - _seg->_uv[_iMin[0]]->X() );
+
+  return Abs( distBoxCenter2Ray ) > 0.5 * boxSectionDiam;
+}
diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx
new file mode 100644 (file)
index 0000000..c218879
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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      : StdMeshers_ViscousLayers2D.hxx
+// Created   : 23 Jul 2012
+// Author    : Edward AGAPOV (eap)
+
+#ifndef __StdMeshers_ViscousLayers2D_HXX__
+#define __StdMeshers_ViscousLayers2D_HXX__
+
+#include "StdMeshers_ViscousLayers.hxx"
+
+class TopoDS_Face;
+
+/*!
+ * \brief Hypothesis defining parameters of viscous layers
+ */
+class STDMESHERS_EXPORT StdMeshers_ViscousLayers2D : public StdMeshers_ViscousLayers
+{
+public:
+  StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen);
+
+  // Computes temporary 2D mesh to be used by 2D algorithm.
+  // Return SMESH_ProxyMesh for the given FACE, or NULL in case of error
+  static SMESH_ProxyMesh::Ptr Compute(SMESH_Mesh&        theMesh,
+                                      const TopoDS_Face& theShape);
+  /*!
+   * \brief At study restoration, restore event listeners used to clear an inferior
+   *  dim sub-mesh modified by viscous layers
+   */
+  void RestoreListeners() const;
+
+  /*!
+   * \brief Initialize my parameter values by the mesh built on the geometry
+    * \param theMesh - the built mesh
+    * \param theShape - the geometry of interest
+    * \retval bool - true if parameter values have been successfully defined
+    *
+    * Just return false as this hypothesis does not have parameters values
+   */
+  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+
+  /*!
+   * \brief Initialize my parameter values by default parameters.
+   *  \retval bool - true if parameter values have been successfully defined
+   */
+  virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0)
+  { return false; }
+
+  static const char* GetHypType() { return "ViscousLayers2D"; }
+
+ private:
+};
+
+#endif
index 1efeb01621c3959b987576933abbdd42feea899b..1466fc8b681e3b6d82d6c2b8d4b4ae928d7bb13d 100644 (file)
@@ -72,7 +72,7 @@ StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
 //================================================================================
 
 StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
-( MeshObjectType objType, QWidget* parent, bool multiSelection )
+( SMESH::MeshObjectType objType, QWidget* parent, bool multiSelection )
   : QWidget( parent ), myMultiSelection( multiSelection )
 {
   myFilter = new SMESH_TypeFilter( objType );
index 26448cf22df51c49fd48c7133ff0ecb2c6b43663..5ffd0bca1a08d60ec3b5aed834b7a129ccaf5cd7 100644 (file)
@@ -58,7 +58,7 @@ public:
                                          QWidget*              parent,
                                          bool                  multiSelection=false,
                                          bool                  stretch=true);
-  StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType,
+  StdMeshersGUI_ObjectReferenceParamWdg( SMESH::MeshObjectType objType,
                                          QWidget*       parent,
                                          bool           multiSelection=false);
   ~StdMeshersGUI_ObjectReferenceParamWdg();
index 87727c20d76a21c0559487858cc777f044f4766b..0a033c0335ffa6b3b4715be869982c90ecf62419 100644 (file)
@@ -694,6 +694,24 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
         h->SetIgnoreFaces( idsWg->GetListOfIDs() );
       }
     }
+    else if( hypType()=="ViscousLayers2D" )
+    {
+      StdMeshers::StdMeshers_ViscousLayers2D_var h =
+        StdMeshers::StdMeshers_ViscousLayers2D::_narrow( hypothesis() );
+
+      h->SetVarParameter( params[0].text(), "SetTotalThickness" );
+      h->SetTotalThickness( params[0].myValue.toDouble() );
+      h->SetVarParameter( params[1].text(), "SetNumberLayers" );
+      h->SetNumberLayers  ( params[1].myValue.toInt() );
+      h->SetVarParameter( params[2].text(), "SetStretchFactor" );
+      h->SetStretchFactor ( params[2].myValue.toDouble() );
+
+      if ( StdMeshersGUI_SubShapeSelectorWdg* idsWg = 
+           widget< StdMeshersGUI_SubShapeSelectorWdg >( 3 ))
+      {
+        h->SetIgnoreEdges( idsWg->GetListOfIDs() );
+      }
+    }
     else if( hypType()=="QuadrangleParams" )
     {
       StdMeshers::StdMeshers_QuadrangleParams_var h =
@@ -1006,7 +1024,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 1 ),
                                                h->GetSourceEdge()));
     item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
-    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
                                                h->GetSourceMesh()));
     item.myName = tr( "SMESH_SOURCE_VERTEX" ); p.append( item );
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@@ -1024,7 +1042,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 2 ),
                                                h->GetSourceFace()));
     item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
-    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
                                                h->GetSourceMesh()));
     item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@@ -1048,7 +1066,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 3, TopAbs_FACE, 6, true ),
                                                h->GetSource3DShape()));
     item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
-    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
                                                h->GetSourceMesh()));
     item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
     customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
@@ -1073,7 +1091,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
 
     item.myName = tr( "SMESH_SOURCE_EDGES" ); p.append( item );
-    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_EDGE ), 
+    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_EDGE ), 
                                                 groupEntries));
 
     item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
@@ -1098,7 +1116,7 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
 
     item.myName = tr( "SMESH_SOURCE_FACES" ); p.append( item );
-    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_FACE ), 
+    customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_FACE ), 
                                                 groupEntries));
 
     item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
@@ -1152,6 +1170,45 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
       customWidgets()->append ( idsWg );
     }
   }
+  else if( hypType()=="ViscousLayers2D" )
+  {
+    StdMeshers::StdMeshers_ViscousLayers2D_var h =
+      StdMeshers::StdMeshers_ViscousLayers2D::_narrow( hyp );
+
+    item.myName = tr( "SMESH_TOTAL_THICKNESS" );
+    if(!initVariableName( hyp, item, "SetTotalThickness" ))
+      item.myValue = h->GetTotalThickness();
+    p.append( item );
+    customWidgets()->append (0);
+
+    item.myName = tr( "SMESH_NUMBER_OF_LAYERS" );
+    if(!initVariableName( hyp, item, "SetNumberLayers" ))
+      item.myValue = h->GetNumberLayers();
+    p.append( item );
+    customWidgets()->append (0);
+
+    item.myName = tr( "SMESH_STRETCH_FACTOR" );
+    if(!initVariableName( hyp, item, "SetStretchFactor" ))
+      item.myValue = h->GetStretchFactor();
+    p.append( item );
+    customWidgets()->append (0);
+
+    QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+    if ( !aMainEntry.isEmpty() )
+    {
+      item.myName = tr( "SMESH_EDGES_WO_LAYERS" );
+      p.append( item );
+
+      StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+        new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_EDGE);
+
+      idsWg->SetGeomShapeEntry( aMainEntry );
+      idsWg->SetMainShapeEntry( aMainEntry );
+      idsWg->SetListOfIDs( h->GetIgnoreEdges() );
+      idsWg->showPreview( true );
+      customWidgets()->append ( idsWg );
+    }
+  }
   else if (hypType() == "QuadrangleParams")
   {
     StdMeshers::StdMeshers_QuadrangleParams_var h =
@@ -1242,7 +1299,7 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
     {
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "parametric_precision" );
     }
-    else if( hypType()=="ViscousLayers" )
+    else if( hypType().startsWith( "ViscousLayers" ))
     {
       if (sb->objectName() == tr("SMESH_STRETCH_FACTOR"))
         sb->RangeStepAndValidator( 1.0, VALUE_MAX, 0.1, "parametric_precision" );
@@ -1254,12 +1311,6 @@ void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
       sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
     }
   }
-//   else if ( QtxIntSpinBox* ib = w->inherits( "QtxIntSpinBox" ) ? ( QtxIntSpinBox* )w : 0)
-//   {
-//     if( hypType()=="ViscousLayers" )
-//     {
-//     }
-//   }
 }
 
 //================================================================================
@@ -1334,6 +1385,7 @@ QString StdMeshersGUI_StdHypothesisCreator::hypTypeName( const QString& t ) cons
     types.insert( "SegmentLengthAroundVertex", "SEGMENT_LENGTH_AROUND_VERTEX" );
     types.insert( "MaxLength", "MAX_LENGTH" );
     types.insert( "ViscousLayers", "VISCOUS_LAYERS" );
+    types.insert( "ViscousLayers2D", "VISCOUS_LAYERS" );
     types.insert( "QuadrangleParams", "QUADRANGLE_PARAMS" );
     types.insert( "CartesianParameters3D", "CARTESIAN_PARAMS" );
   }
index df97c12a15c0becd9c74fb20818deaeec6d66a18..2b506311f87a1e9a160b9038afa5c797e1de7892 100644 (file)
     <message>
         <source>SMESH_FACES_WO_LAYERS</source>
         <translation>Faces without layers
+(inlets and oulets)</translation>
+    </message>
+    <message>
+        <source>SMESH_EDGES_WO_LAYERS</source>
+        <translation>Edges without layers
 (inlets and oulets)</translation>
     </message>
     <message>
index 836a9fb20390d4dfb27ebd540d73d2642d670a2c..17fac5a044dace1cd4e1d6a3c8886ef95a6ec41b 100755 (executable)
     <message>
         <source>SMESH_FACES_WO_LAYERS</source>
         <translation>Faces sans couche limite
+(entrées et sorties)</translation>
+    </message>
+    <message>
+        <source>SMESH_EDGES_WO_LAYERS</source>
+        <translation>Arêtes sans couche limite
 (entrées et sorties)</translation>
     </message>
     <message>
index 4bc901d2dfa6750e7358f1c3c6a5d9e8f6ab0f44..c9f50b4d085dbfb25e90c085d2ee9fb945833dde 100644 (file)
@@ -68,6 +68,7 @@ salomeinclude_HEADERS = \
        StdMeshers_Import_1D_i.hxx \
        StdMeshers_Import_1D2D_i.hxx \
        StdMeshers_ViscousLayers_i.hxx \
+       StdMeshers_ViscousLayers2D_i.hxx \
        StdMeshers_CartesianParameters3D_i.hxx \
        StdMeshers_Cartesian_3D_i.hxx
 
@@ -116,6 +117,7 @@ dist_libStdMeshersEngine_la_SOURCES = \
        StdMeshers_Import_1D_i.cxx \
        StdMeshers_Import_1D2D_i.cxx \
        StdMeshers_ViscousLayers_i.cxx \
+       StdMeshers_ViscousLayers2D_i.cxx \
        StdMeshers_CartesianParameters3D_i.cxx \
        StdMeshers_Cartesian_3D_i.cxx
 
diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx
new file mode 100644 (file)
index 0000000..b60672a
--- /dev/null
@@ -0,0 +1,225 @@
+// 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   : StdMeshers_ViscousLayers2D_i.cxx
+//  Module : SMESH
+//
+#include "StdMeshers_ViscousLayers2D_i.hxx"
+
+#include "SMESH_Gen.hxx"
+#include "SMESH_Gen_i.hxx"
+#include "SMESH_PythonDump.hxx"
+
+#include "Utils_CorbaException.hxx"
+#include "utilities.h"
+
+#include <TCollection_AsciiString.hxx>
+
+#include CORBA_SERVER_HEADER(SMESH_Group)
+
+using namespace std;
+
+//=============================================================================
+/*!
+ *  StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i
+ *
+ *  Constructor
+ */
+//=============================================================================
+
+StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
+                                                            int                     theStudyId,
+                                                            ::SMESH_Gen*            theGenImpl )
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA )
+{
+  MESSAGE( "StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i" );
+  myBaseImpl = new ::StdMeshers_ViscousLayers2D( theGenImpl->GetANewId(),
+                                                 theStudyId,
+                                                 theGenImpl );
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_ViscousLayers2D_i::~StdMeshers_ViscousLayers2D_i
+ *
+ *  Destructor
+ */
+//=============================================================================
+
+StdMeshers_ViscousLayers2D_i::~StdMeshers_ViscousLayers2D_i()
+{
+  MESSAGE( "StdMeshers_ViscousLayers2D_i::~StdMeshers_ViscousLayers2D_i" );
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers2D_i::SetIgnoreEdges(const ::SMESH::long_array& edgeIDs)
+throw ( SALOME::SALOME_Exception )
+{
+  vector<int> ids( edgeIDs.length() );
+  for ( unsigned i = 0; i < ids.size(); ++i )
+    if (( ids[i] = edgeIDs[i] ) < 1 )
+      THROW_SALOME_CORBA_EXCEPTION( "Invalid edge id", SALOME::BAD_PARAM );
+  GetImpl()->SetBndShapesToIgnore( ids );
+  SMESH::TPythonDump() << _this() << ".SetIgnoreEdges( " << edgeIDs << " )";
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+SMESH::long_array* StdMeshers_ViscousLayers2D_i::GetIgnoreEdges()
+{
+  vector<int> idsVec = GetImpl()->GetBndShapesToIgnore();
+  SMESH::long_array_var ids = new SMESH::long_array;
+  ids->length( idsVec.size() );
+  for ( unsigned i = 0; i < idsVec.size(); ++i )
+    ids[i] = idsVec[i];
+  return ids._retn();
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers2D_i::SetTotalThickness(::CORBA::Double thickness)
+throw ( SALOME::SALOME_Exception )
+{
+  if ( thickness < 1e-100 )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid thickness", SALOME::BAD_PARAM );
+  GetImpl()->SetTotalThickness(thickness);
+  SMESH::TPythonDump() << _this() << ".SetTotalThickness( " << SMESH::TVar(thickness) << " )";
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+::CORBA::Double StdMeshers_ViscousLayers2D_i::GetTotalThickness()
+{
+  return GetImpl()->GetTotalThickness();
+}
+
+//================================================================================
+/*!
+ * \brief 
+ *  \param nb - 
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers2D_i::SetNumberLayers(::CORBA::Short nb)
+throw ( SALOME::SALOME_Exception )
+{
+  if ( nb < 1 )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid number of layers", SALOME::BAD_PARAM );
+  GetImpl()->SetNumberLayers( nb );
+  SMESH::TPythonDump() << _this() << ".SetNumberLayers( " << SMESH::TVar(nb) << " )";
+}
+
+//================================================================================
+/*!
+ * \brief 
+ */
+//================================================================================
+
+::CORBA::Short StdMeshers_ViscousLayers2D_i::GetNumberLayers()
+{
+  return CORBA::Short( GetImpl()->GetNumberLayers() );
+}
+
+//================================================================================
+/*!
+ * \brief 
+ *  \param factor - 
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers2D_i::SetStretchFactor(::CORBA::Double factor)
+throw ( SALOME::SALOME_Exception )
+{
+  if ( factor < 1 )
+    THROW_SALOME_CORBA_EXCEPTION( "Invalid stretch factor, it must be >= 1.0", SALOME::BAD_PARAM );
+  GetImpl()->SetStretchFactor(factor);
+  SMESH::TPythonDump() << _this() << ".SetStretchFactor( " << SMESH::TVar(factor) << " )";
+}
+
+//================================================================================
+/*!
+ * \brief 
+ * 
+ */
+//================================================================================
+
+::CORBA::Double StdMeshers_ViscousLayers2D_i::GetStretchFactor()
+{
+  return GetImpl()->GetStretchFactor();
+}
+
+//=============================================================================
+/*!
+ *  Get implementation
+ */
+//=============================================================================
+
+::StdMeshers_ViscousLayers2D* StdMeshers_ViscousLayers2D_i::GetImpl()
+{
+  MESSAGE( "StdMeshers_ViscousLayers2D_i::GetImpl" );
+  return ( ::StdMeshers_ViscousLayers2D* )myBaseImpl;
+}
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type 
+  * \param type - dimension (see SMESH::Dimension enumeration)
+  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * 
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================  
+
+CORBA::Boolean StdMeshers_ViscousLayers2D_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_2D;
+}
+
+//================================================================================
+/*!
+ * \brief Sets sub-mesh event listeners to clear sub-meshes of edges
+ * shrinked by viscous layers
+ */
+//================================================================================
+
+void StdMeshers_ViscousLayers2D_i::UpdateAsMeshesRestored()
+{
+  GetImpl()->RestoreListeners();
+}
diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx
new file mode 100644 (file)
index 0000000..8a6eacf
--- /dev/null
@@ -0,0 +1,74 @@
+// 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   : StdMeshers_ViscousLayers2D_i.hxx
+//  Module : SMESH
+//
+#ifndef _SMESH_ViscousLayers2D_I_HXX_
+#define _SMESH_ViscousLayers2D_I_HXX_
+
+#include "SMESH_StdMeshers_I.hxx"
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
+
+#include "StdMeshers_ViscousLayers_i.hxx"
+#include "StdMeshers_ViscousLayers2D.hxx"
+
+class SMESH_Gen;
+
+class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers2D_i:
+  public virtual POA_StdMeshers::StdMeshers_ViscousLayers2D,
+  public virtual SMESH_Hypothesis_i
+{
+ public:
+  // Constructor
+  StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA,
+                              int                     theStudyId,
+                              ::SMESH_Gen*            theGenImpl );
+  // Destructor
+  virtual ~StdMeshers_ViscousLayers2D_i();
+
+  void SetIgnoreEdges(const ::SMESH::long_array& edgeIDs) throw ( SALOME::SALOME_Exception );
+  SMESH::long_array* GetIgnoreEdges();
+
+  void SetTotalThickness(::CORBA::Double thickness) throw ( SALOME::SALOME_Exception );
+  ::CORBA::Double GetTotalThickness();
+
+  void SetNumberLayers(::CORBA::Short nb) throw ( SALOME::SALOME_Exception );
+  ::CORBA::Short GetNumberLayers();
+
+  void SetStretchFactor(::CORBA::Double factor) throw ( SALOME::SALOME_Exception );
+  ::CORBA::Double GetStretchFactor();
+
+  // Get implementation
+  ::StdMeshers_ViscousLayers2D* GetImpl();
+
+  // Verify whether hypothesis supports given entity type 
+  CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+
+  // Sets sub-mesh event listeners to clear sub-meshes of edges
+  // shrinked by viscous layers
+  virtual void  UpdateAsMeshesRestored();
+};
+
+#endif
index 55ca30d75905209e02866600dfcba7d4f4dfe012..e6e7897f0bf4e0cadf71816733d4986caa090331 100644 (file)
@@ -85,7 +85,7 @@ throw ( SALOME::SALOME_Exception )
   for ( unsigned i = 0; i < ids.size(); ++i )
     if (( ids[i] = faceIDs[i] ) < 1 )
       THROW_SALOME_CORBA_EXCEPTION( "Invalid face id", SALOME::BAD_PARAM );
-  GetImpl()->SetIgnoreFaces( ids );
+  GetImpl()->SetBndShapesToIgnore( ids );
   SMESH::TPythonDump() << _this() << ".SetIgnoreFaces( " << faceIDs << " )";
 }
 
@@ -97,7 +97,7 @@ throw ( SALOME::SALOME_Exception )
 
 SMESH::long_array* StdMeshers_ViscousLayers_i::GetIgnoreFaces()
 {
-  vector<int> idsVec = GetImpl()->GetIgnoreFaces();
+  vector<int> idsVec = GetImpl()->GetBndShapesToIgnore();
   SMESH::long_array_var ids = new SMESH::long_array;
   ids->length( idsVec.size() );
   for ( unsigned i = 0; i < idsVec.size(); ++i )
index e4d5d6e2e98a84e4c60b0d885e014b2929f32497..b17f9f242de91b0e9c890384c158bfb08e66298b 100644 (file)
@@ -20,7 +20,6 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
 //  File   : StdMeshers_ViscousLayers_i.hxx
 //  Module : SMESH
 //
index 20104d9c8755a58f82e984fff2825fbaef6731c5..9920827583f01efc69f8b6656c13ae7e749548f7 100644 (file)
@@ -73,6 +73,7 @@
 #include "StdMeshers_Import_1D_i.hxx"
 #include "StdMeshers_Import_1D2D_i.hxx"
 #include "StdMeshers_ViscousLayers_i.hxx"
+#include "StdMeshers_ViscousLayers2D_i.hxx"
 #include "StdMeshers_CartesianParameters3D_i.hxx"
 
 template <class T> class StdHypothesisCreator_i:public HypothesisCreator_i<T>
@@ -179,6 +180,8 @@ STDMESHERS_I_EXPORT
       aCreator = new StdHypothesisCreator_i<StdMeshers_ImportSource2D_i>;
     else if (strcmp(aHypName, "ViscousLayers") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_ViscousLayers_i>;
+    else if (strcmp(aHypName, "ViscousLayers2D") == 0)
+      aCreator = new StdHypothesisCreator_i<StdMeshers_ViscousLayers2D_i>;
     else if (strcmp(aHypName, "CartesianParameters3D") == 0)
       aCreator = new StdHypothesisCreator_i<StdMeshers_CartesianParameters3D_i>;
 
index cae255b859183a8ab16b0172703208f32528d082..5deaa3ff5668e326c8cfa3b42053390e02b98858 100644 (file)
@@ -27,5 +27,11 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 SUBDIRS = MeshCut padder
 
+if SMESH_ENABLE_GUI
+  SUBDIRS += YamsPlug
+endif
+
 salomeplugins_PYTHON = \
        smesh_plugins.py
+
+DIST_SUBDIRS = MeshCut padder YamsPlug
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
diff --git a/src/Tools/YamsPlug/Makefile.am b/src/Tools/YamsPlug/Makefile.am
new file mode 100644 (file)
index 0000000..516e420
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright (C) 2007-2012  EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+UIPY_FILES = YamsPlugDialog.py  ViewText.py 
+
+salomeplugins_PYTHON = \
+       monYamsPlugDialog.py\
+       monViewText.py\
+       yamsplug_plugin.py 
+
+nodist_salomeplugins_PYTHON = $(UIPY_FILES)
+
+CLEANFILES = $(UIPY_FILES)
+
+EXTRA_DIST += $(UIPY_FILES:%.py=%.ui)
+
+%.py : %.ui
+       $(PYUIC) $< -o $@
diff --git a/src/Tools/YamsPlug/Tolerance.png b/src/Tools/YamsPlug/Tolerance.png
new file mode 100644 (file)
index 0000000..d8fb162
Binary files /dev/null and b/src/Tools/YamsPlug/Tolerance.png differ
diff --git a/src/Tools/YamsPlug/ViewText.ui b/src/Tools/YamsPlug/ViewText.ui
new file mode 100644 (file)
index 0000000..18fa63e
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ViewExe</class>
+ <widget class="QDialog" name="ViewExe">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>469</width>
+    <height>489</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Run Yams</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0" colspan="2">
+    <widget class="QTextBrowser" name="TB_Exe"/>
+   </item>
+   <item row="1" column="0">
+    <widget class="QPushButton" name="PB_Ok">
+     <property name="text">
+      <string>Ok</string>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="1">
+    <widget class="QPushButton" name="PB_Save">
+     <property name="text">
+      <string>Save</string>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/Tools/YamsPlug/YamsPlugDialog.ui b/src/Tools/YamsPlug/YamsPlugDialog.ui
new file mode 100644 (file)
index 0000000..df7721e
--- /dev/null
@@ -0,0 +1,1079 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>YamsPlugDialog</class>
+ <widget class="QWidget" name="YamsPlugDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>799</width>
+    <height>602</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Yams : Remeshing tool</string>
+  </property>
+  <property name="sizeGripEnabled" stdset="0">
+   <bool>false</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="PB_OK">
+       <property name="text">
+        <string>Compute</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Cancel">
+       <property name="text">
+        <string>Close</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_4">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Minimum</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>60</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Save">
+       <property name="text">
+        <string>Save Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Load">
+       <property name="text">
+        <string>Load Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Default">
+       <property name="text">
+        <string>Default Params</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>338</width>
+         <height>25</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="PB_Help">
+       <property name="font">
+        <font>
+         <pointsize>10</pointsize>
+        </font>
+       </property>
+       <property name="text">
+        <string>Help</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QTabWidget" name="TWOptions">
+     <property name="font">
+      <font>
+       <pointsize>10</pointsize>
+      </font>
+     </property>
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="simple">
+      <attribute name="title">
+       <string>Simple Remeshing Options</string>
+      </attribute>
+      <widget class="QGroupBox" name="GBOptim">
+       <property name="geometry">
+        <rect>
+         <x>20</x>
+         <y>140</y>
+         <width>741</width>
+         <height>271</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>Optimisation</string>
+       </property>
+       <widget class="QGroupBox" name="mesRB">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>611</width>
+          <height>209</height>
+         </rect>
+        </property>
+        <layout class="QVBoxLayout" name="monRBLayout">
+         <item>
+          <widget class="QRadioButton" name="RB_0">
+           <property name="toolTip">
+            <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Quality improvement&lt;/span&gt; is done by point smoothing and edge swapping&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+           <property name="text">
+            <string>Quality improvement Only (0)</string>
+           </property>
+           <property name="checked">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_G">
+           <property name="toolTip">
+            <string>the given surface triangulation is enriched (no coarsening at all) in such away that the distance 
+between the elements in the final mesh and those of the initial one is bounded by auser specified tolerance value. 
+One should use this option, to enrich the mesh where purely
+geometrical features may be insuficiently fine, i.e. the resulting mesh will be least as fine as the input.
+Mesh and the geometric features will be refined if needed as specified by the other program parameters.
+The meshes obtained with those settings may not be suitable for computation.</string>
+           </property>
+           <property name="text">
+            <string>Pure Geometry Enrichment (G)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_U">
+           <property name="toolTip">
+            <string>a uniform subdivision of the given surface triangulation is performed : 
+each triangle of the given surface triangulation is considered at and
+is divided into identical triangles.</string>
+           </property>
+           <property name="text">
+            <string>Uniform Subdivision(U)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_S">
+           <property name="toolTip">
+            <string>a surface sandpapering without shrinkage of the given surface
+triangulation is performed, i.e., the high curvature variations of the
+given surface will be smoothed out without shrinking the volume in
+doing so. If ridges are defined, they will be kept as they are in the
+resulting mesh.
+This option modifies the goemetry.</string>
+           </property>
+           <property name="text">
+            <string>Smoothing (S)</string>
+           </property>
+           <property name="checked">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB__2">
+           <property name="toolTip">
+            <string>The given surface triangulation is modified in such a way that the distance between 
+the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value.
+One should use this option, to coarsen when a purely geometrical mesh is needed. (a mesh that keeps
+and obeys its geometric features only.) The meshes obtained with this option are usually not suitable
+for computation because anisotropic elements may be generated</string>
+           </property>
+           <property name="text">
+            <string>Geometrical Mesh : Coarsening(-2)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_2">
+           <property name="toolTip">
+            <string>The given surface triangulation is modified in such a way that the distance between 
+the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value.
+One should use this option, to coarsen and enrich when a purely geometrical mesh is needed. (a mesh that keeps
+and obeys its geometric features only.) The meshes obtained with this setting are usually not suitable
+for computation because anisotropic elements may be generated</string>
+           </property>
+           <property name="text">
+            <string>Geometrical Mesh :Coarsening and Enrichment (2)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB__1">
+           <property name="toolTip">
+            <string>The given surface triangulation is modfied in accordance to a size map. 
+The latter can be either the intrinsic size map (computed automatically
+and based on the surface properties, i.e. the local curvatures),
+or on a given size map (which is then combined to the intrinsic size map). 
+One should use this option to coarsen  the mesh, when a regular mesh 
+for computation purposes is desired, i.e. a mesh with good aspect ratios or 
+good quality elements.</string>
+           </property>
+           <property name="text">
+            <string>Mesh for finite element computation : Coarsening (-1)</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QRadioButton" name="RB_1">
+           <property name="toolTip">
+            <string>The given surface triangulation is modfied in accordance to a size map. 
+The latter can be either the intrinsic size map (computed automatically
+and based on the surface properties, i.e. the local curvatures),
+or on a given size map (which is then combined to the intrinsic size map). 
+One should use this option to coarsen  and enrich the mesh, when a regular mesh 
+for computation purposes is desired, i.e. a mesh with good aspect ratios or 
+good quality elements</string>
+           </property>
+           <property name="text">
+            <string>Mesh for finite element computation : Coarsening and Enrichment  (1)</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="GBUnit">
+       <property name="geometry">
+        <rect>
+         <x>20</x>
+         <y>420</y>
+         <width>301</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       </property>
+       <property name="title">
+        <string>Units</string>
+       </property>
+       <widget class="QRadioButton" name="RB_Absolute">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>110</width>
+          <height>24</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>Values are expressed in the model units.</string>
+        </property>
+        <property name="text">
+         <string>Absolute</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+       <widget class="QRadioButton" name="RB_Relative">
+        <property name="geometry">
+         <rect>
+          <x>160</x>
+          <y>30</y>
+          <width>110</width>
+          <height>24</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>Values are relative to the bounding box size.</string>
+        </property>
+        <property name="text">
+         <string>Relative</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="GBTolerance_2">
+       <property name="geometry">
+        <rect>
+         <x>410</x>
+         <y>430</y>
+         <width>351</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="toolTip">
+        <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Set chordal deviation tolerance:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This parameter enables the user to bound the maximal chordal deviation allowed,&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;that is, the maximal distance allowed between the detected curve and the plane P&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;of the corresponding mesh face.&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;In other words, it avoids having faces too far away from the curve &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;they represent (or should represent).&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+       </property>
+       <property name="title">
+        <string>Chordal deviation Tolerance</string>
+       </property>
+       <widget class="QDoubleSpinBox" name="SP_Tolerance">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>81</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <stylestrategy>PreferDefault</stylestrategy>
+         </font>
+        </property>
+        <property name="mouseTracking">
+         <bool>true</bool>
+        </property>
+        <property name="toolTip">
+         <string>If the Units parameter is relative epsilon max correspond to 0.0001x s x tolerance parameter where s is the size of the bounding box of the domain.
+If the Units parameter is absolute, the tolerance parameter is expressed in model units :
+if P=2 and point coordinaters are givin in millimetre, it menas that the maximal chordal deviation is 2 mm </string>
+        </property>
+        <property name="maximum">
+         <double>100000.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.100000000000000</double>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>741</width>
+         <height>121</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>12</pointsize>
+        </font>
+       </property>
+       <property name="title">
+        <string>Original Mesh</string>
+       </property>
+       <widget class="QPushButton" name="PB_MeshFile">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>70</y>
+          <width>191</width>
+          <height>33</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+        <property name="text">
+         <string>Mesh File (GMF format)</string>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_MeshFile">
+        <property name="geometry">
+         <rect>
+          <x>240</x>
+          <y>70</y>
+          <width>481</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+       </widget>
+       <widget class="QPushButton" name="PB_MeshSmesh">
+        <property name="geometry">
+         <rect>
+          <x>190</x>
+          <y>30</y>
+          <width>41</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</iconset>
+        </property>
+        <property name="iconSize">
+         <size>
+          <width>18</width>
+          <height>18</height>
+         </size>
+        </property>
+        <property name="checkable">
+         <bool>false</bool>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_MeshSmesh">
+        <property name="geometry">
+         <rect>
+          <x>240</x>
+          <y>30</y>
+          <width>481</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+         </font>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_7">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>141</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="font">
+         <font>
+          <pointsize>10</pointsize>
+          <strikeout>false</strikeout>
+         </font>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::Box</enum>
+        </property>
+        <property name="text">
+         <string>Smesh mesh</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+        <property name="margin">
+         <number>0</number>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_8">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>80</y>
+          <width>31</width>
+          <height>18</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>or</string>
+        </property>
+       </widget>
+      </widget>
+      <zorder>GBUnit</zorder>
+      <zorder>GBTolerance_2</zorder>
+      <zorder>groupBox</zorder>
+      <zorder>GBOptim</zorder>
+     </widget>
+     <widget class="QWidget" name="advanced">
+      <attribute name="title">
+       <string>Advanced  Remeshing Options</string>
+      </attribute>
+      <widget class="QGroupBox" name="groupBox_2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>761</width>
+         <height>71</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can disable :</string>
+       </property>
+       <widget class="QCheckBox" name="CB_Ridge">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>20</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>if not set (ridge detection disabled), Yams will not try to detect any new ridge edge by its own mechanism : 
+it will consider as ridge only the ridges given in the mesh. 
+All non-ridge edges that would have been detected as ridge by the Ridge angle paramaeter 
+(see below)  will be considered as part of the same continuous patch.
+This option should not be checked when all the known ridges of the mesh are given and
+when all other possible ridges are not geometric ridges to take into account.</string>
+        </property>
+        <property name="text">
+         <string>ridge detection</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+       <widget class="QCheckBox" name="CB_Point">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>40</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>When not set (point smoothing is disabled), Yams will not try to move the initial given vertices 
+(along an edge, a ridge or onto the surface), hence Yams will only swap edges, remove vertices
+or add vertices (refines) to change the mesh.</string>
+        </property>
+        <property name="text">
+         <string>point smoothing</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_5">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>100</y>
+         <width>761</width>
+         <height>321</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can control </string>
+       </property>
+       <widget class="QDoubleSpinBox" name="SP_Geomapp">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>30</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="maximum">
+         <double>0.890000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.040000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_2">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>20</y>
+          <width>631</width>
+          <height>61</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This field (as well as tolerance) enables the user to control the accuracy of the
+piecewise linear approximation of the surface. This parameter enables the user to
+control the maximal angle allowed between two adjacent faces. It can be used to 
+bound the maximal deviation of the mesh faces from the tangent planes at mesh vertices. 
+In other words, it avoids having sharp angles between faces representing a smooth curve.
+This parameter enables the user to specify the maximal chordal deviation &quot;max relatively to the curvature.
+Following that criterion:
+- if the chordal deviation epsilon  is smaller than epsilon max *r, it is acceptable to remove the considered point;
+- if the chordal deviation epsilon is greater than epsiolon max*r, the considered mesh face should be redefined 
+by adding a point on the curve.
+One can see that the smaller the radius r, the harder it is to satisfy this criterion:  
+epsilon max is a real value corresponding to a percentage, the ratio between the chordal deviation to 
+the local curvature. This field is used only for optimisation style -O values of  -1, 0 and 1.
+The default value for &quot;max is set to 0:04 which leads to angles of less than 33 degrees between two adjacent
+faces .</string>
+        </property>
+        <property name="text">
+         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Geometrical approximation :  Maximum angle allowed between a face and a curve &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;(not separated by a ridge).&lt;/span&gt;)&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_4">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>70</y>
+          <width>581</width>
+          <height>71</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Ridge angle:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;if the angle between the normal vectors of two adjacent faces exceeds&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;this value, the edge common to the faces is a ridge&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_Ridge">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>90</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="maximum">
+         <double>90.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>45.000000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_5">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>140</y>
+          <width>521</width>
+          <height>41</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter allows the user to prescribe  a maximal size hmax
+for the mesh elements i.e., the lengths of the edges with respect to the specified
+ size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+The default values are automatically set based on the surface geometry (curvature dependent) and its
+bounding box size.
+Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
+size  may be slightly bigger than the prescribed ones.</string>
+        </property>
+        <property name="text">
+         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Maximal size allowed around vertices:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the lengths of the edges with respect to the specified size map.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_3">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>240</y>
+          <width>591</width>
+          <height>61</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter enables the user to control the element size variation in the triangulation.
+Yams will avoid getting two adjacent edges which sizes differ by a factor bigger than this parameter. 
+To avoid rapid size variations, a size correction procedure is applied to the size map. 
+In other words: if two adjacent edges are respectively e1 and e2 long 
+if  e2 &gt; parameter * e1 then e02 the new size for the second edge will be set to  parameter* e1.
+This procedure is de-activated if yams computes a mesh for finite element with only coarsening.
+The default value is 1.3, which is the usual value set for computational meshes.</string>
+        </property>
+        <property name="text">
+         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Mesh Gradation ie the element size variation in the triangulation:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Yams will avoid having two adjacent edges which sizes &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;vary more than the given gradation.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_Gradation">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>250</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="singleStep">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="value">
+         <double>1.300000000000000</double>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_MaxSize">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>150</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="minimum">
+         <double>0.010000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.100000000000000</double>
+        </property>
+        <property name="value">
+         <double>100.000000000000000</double>
+        </property>
+       </widget>
+       <widget class="QLabel" name="label_9">
+        <property name="geometry">
+         <rect>
+          <x>120</x>
+          <y>190</y>
+          <width>521</width>
+          <height>41</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>This parameter allows the user to prescribe  a maximal size hmax
+for the mesh elements i.e., the lengths of the edges with respect to the specified
+ size map. The corresponding values are either relative or absolute depending on the choosen parameter.
+The default values are automatically set based on the surface geometry (curvature dependent) and its
+bounding box size.
+Please note that, as it is not strictly possible to obey the given or computed size map, the actual maximal
+size  may be slightly bigger than the prescribed ones.</string>
+        </property>
+        <property name="text">
+         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Minimal size allowed around vertices:&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the lengths of the edges with respect to the specified size map.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+       </widget>
+       <widget class="QDoubleSpinBox" name="SP_MinSize">
+        <property name="geometry">
+         <rect>
+          <x>10</x>
+          <y>200</y>
+          <width>91</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>0.100000000000000</double>
+        </property>
+        <property name="value">
+         <double>5.000000000000000</double>
+        </property>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_3">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>440</y>
+         <width>751</width>
+         <height>61</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>You can enable :</string>
+       </property>
+       <widget class="QCheckBox" name="CB_SplitEdge">
+        <property name="geometry">
+         <rect>
+          <x>100</x>
+          <y>20</y>
+          <width>271</width>
+          <height>23</height>
+         </rect>
+        </property>
+        <property name="toolTip">
+         <string>if set, Yams creates new vertices placed on the curved surface and adds them to elements. 
+It means one extra vertex on edge (P2 or quadratic triangles).
+New created vertices  are saved in the .mesh file under keyword section Vertices</string>
+        </property>
+        <property name="text">
+         <string>split edge</string>
+        </property>
+        <property name="checked">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="generic">
+      <attribute name="title">
+       <string>Generic Options</string>
+      </attribute>
+      <widget class="QGroupBox" name="groupBox_4">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>30</y>
+         <width>741</width>
+         <height>131</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>Yams Generic Options</string>
+       </property>
+       <widget class="QWidget" name="layoutWidget">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>30</y>
+          <width>441</width>
+          <height>27</height>
+         </rect>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout_3">
+         <item>
+          <widget class="QLabel" name="label">
+           <property name="text">
+            <string>Verbosity Level</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>28</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="SP_Verbosity">
+           <property name="maximum">
+            <number>10</number>
+           </property>
+           <property name="value">
+            <number>7</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QWidget" name="layoutWidget_2">
+        <property name="geometry">
+         <rect>
+          <x>40</x>
+          <y>70</y>
+          <width>441</width>
+          <height>27</height>
+         </rect>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
+         <item>
+          <widget class="QLabel" name="label_6">
+           <property name="minimumSize">
+            <size>
+             <width>225</width>
+             <height>25</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
+&lt;tr&gt;
+&lt;td style=&quot;border: none;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory size (in Mbytes)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>28</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item>
+          <widget class="QSpinBox" name="SP_Memory">
+           <property name="toolTip">
+            <string>The program requires roughly about 370 bytes per point. It is thus possible to estimate a priori 
+the required memory size to complete a job. As an example of memory space needed, a mesh 
+of 543,652 points (1,087,716 triangles) requires 182 Mbytes (about 351 bytes per point). Conversely, 
+a workstation having 512 Mbytes of memory can handle a mesh of about 2,750,000 points.
+The memory needed for mesh modification is allocated dynamically at the beginning of the procedure 
+(data reading), based on the initial triangulation size. When the program reaches the amount of maximal 
+memory allowed, it will stop inserting points and, if possible, the current mesh will be saved as it is, 
+valid and conformal, provided the input mesh was valid and conformal.
+Specify the memory if:
+- the automatically allocated memory reveals insufficient when the user asked to enrich the given mesh;
+- you want to limit the amount of memory used by the program.
+If the input mesh size requires more memory than requested or if the allocated memory (user defined or not)
+exceeds the machine capabilities, the tool will stop because of insufficient memory.</string>
+           </property>
+           <property name="maximum">
+            <number>100000</number>
+           </property>
+           <property name="value">
+            <number>0</number>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="groupBox_6">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>230</y>
+         <width>741</width>
+         <height>141</height>
+        </rect>
+       </property>
+       <property name="title">
+        <string>Plug-In Generic Options</string>
+       </property>
+       <widget class="QLabel" name="label_10">
+        <property name="geometry">
+         <rect>
+          <x>20</x>
+          <y>40</y>
+          <width>391</width>
+          <height>18</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>File used to save Yams Params :</string>
+        </property>
+       </widget>
+       <widget class="QPushButton" name="PB_ParamsFileExplorer">
+        <property name="geometry">
+         <rect>
+          <x>20</x>
+          <y>70</y>
+          <width>30</width>
+          <height>31</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="icon">
+         <iconset>
+          <normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</normaloff>../../../../../../../../SalomeSrc/SMESH_V6_main/src/Tools/YamsPlug/open.png</iconset>
+        </property>
+       </widget>
+       <widget class="QLineEdit" name="LE_ParamsFile">
+        <property name="geometry">
+         <rect>
+          <x>60</x>
+          <y>70</y>
+          <width>661</width>
+          <height>31</height>
+         </rect>
+        </property>
+       </widget>
+      </widget>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/Tools/YamsPlug/doc/Advanced_params.rst b/src/Tools/YamsPlug/doc/Advanced_params.rst
new file mode 100644 (file)
index 0000000..3c83be1
--- /dev/null
@@ -0,0 +1,42 @@
+Advanced Remeshing Options 
+==========================
+
+** be aware that no control of coherency is done when you set these parameters : for instance, geometrical approximation is only allowed when yams compute a mesh for finite elements but the GUI will let you choose geometrical approximation and compute a visualisation mesh. read DISTENE documentation **
+
+  - **Ridge detection**
+if not set (ridge detection disabled ), Yams will not try to detect any new ridge edge by its own mechanism : 
+it will consider as ridge only the ridges given in the mesh.  All non-ridge edges that would have been detected as ridge by the Ridge angle paramaeter (see below split edge)  will be considered as part of the same continuous patch.  This option should not be checked when all the known ridges of the mesh are given and when all other possible ridges are not geometric ridges to take into account.
+
+  - **Point smoothing**
+When not set (point smoothing is disabled), Yams will not try to move the initial given vertices (along an edge, a ridge or onto the surface), hence Yams will only swap edges, remove vertices or add vertices (refines) to change the mesh.
+
+  - **Geometrical  approximation**
+this field as well as the Chordal deviation tolerance parameter,enables the user to bound the maximal chordal deviation allowed. it avoids having sharp angles. , that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent.
+
+.. image:: images/Tolerance.png
+   :align: center
+
+
+This parameter P enables the user to specify the maximal chordal deviation  E relatively to the local curvature. the maximal chordal deviation will be set to E=P x r (r is the radius of the circumcercle) if the units parameter is set to relative or E=P if the units parameter is set to absolute.
+
+
+  - **Ridge angle**
+
+This parameter specifies the angular values  for the automatic detection of ridges and corners. A ridge is automatically detected if the angle between the normal vectors of two adjacent faces exceeds this value.
+
+
+  - **Maximal/Minimal size around vertices**
+
+These two parameters allow the user to prescribe a Maximal/Minimal size for the mesh elements, ie the lengths of the edges. 
+
+
+  - **Mesh gradation**
+This paramater P controls the element size variation : Yams will avoid having two adjacent egdes which sizes vary more than th given gradation. a size correction is applied to the size map : if two adjacent edges are respectively e1 and e2 long and e2 > Pxe1, then, the new size for the second edge will be set to P x e1.
+**This procedure is desactived if P=-1***
+
+
+
+  - **Split edge**
+If this option is activated, Yams creates new vertices placed on the curved surface and adds them to elements.
+It may be used to obtain higher order elements.
+
diff --git a/src/Tools/YamsPlug/doc/Generics_params.rst b/src/Tools/YamsPlug/doc/Generics_params.rst
new file mode 100644 (file)
index 0000000..32b31b1
--- /dev/null
@@ -0,0 +1,22 @@
+Generic  Options
+=================
+
+These options are not meshing options but allow the user to configure control parameters for yams.
+
+
+- **Verbosity Level**
+
+This parameter (between 0 and 10) indicates the amount of information that Yams prints during the run.
+
+
+- **Memory Size**
+You usually don't have to set this parameter but you can choose to limit the amount of memory used by Yams. - It requires 370 bytes per node -. Or, if you try to enrich a already big mesh (up to 2 millions nodes), you exceptionally, need to allocate more memory.
+    
+    
+- **File** 
+
+You can change the file used to store the remeshing hypothesis. see paragraph :ref:`hypothesis-label` for further informations.
+
+.. image:: images/Generic.png
+   :align: center
+
diff --git a/src/Tools/YamsPlug/doc/Mandatory_params.rst b/src/Tools/YamsPlug/doc/Mandatory_params.rst
new file mode 100644 (file)
index 0000000..c752c69
--- /dev/null
@@ -0,0 +1,101 @@
+Simple Remeshing Options
+=========================
+
+simple case 
+-----------
+
+   All options, but the input mesh, have default values. however, **you have to specified these
+   simple options in order to drive yams and control remeshing parameters**. 
+
+   You can access Distene documentation by clicking on Help button.
+
+
+.. image:: images/Simple.png
+   :align: center
+
+
+- **Original Mesh**
+
+   You have to select a Mesh Object from Salome Object Browser or choose a .GMF file.
+
+
+Optimisation
+------------
+    
+This is the main remeshing Option.  Yams always does quality improvement. It is done by point smooting and edge swapping.  It can produce a regular mesh for finite element computation (initial mesh is a a geometrical mesh). In this case, the given surface trianglation is modified in accordance to a size map : an intrinsic size map is computed automatically. it is based on the surface proporties.  Yams is also able to  produce a geometrical mesh (initial mesh is a a mesh for finite element computation). In both case, It can coarsen or enrich the mesh.     
+
+   - **Quality improvement** 
+
+     If you activitate this option, Yams does only quality improvement.  
+
+     It is equivalent to Yams's batch option 0.
+
+   - **Pure Geometry Enrichement**
+
+     The given surface triangulation is enriched (no coarsening at all) in such away that the distance between the elements in the final mesh and those of the initial one is bounded by auser specified tolerance value. One should use this option, to enrich the mesh where purely geometrical features may be insuficiently fine, i.e. the resulting mesh will be least as fine as the input. Mesh and the geometric features will be refined if needed as specified by the other program parameters. The meshes obtained with those settings may not be suitable for computation.
+
+     It is equivalent to Yams's batch option G.
+
+   -  **Uniform subdivision**
+
+     A uniform subdivision of the given surface triangulation is performed : each triangle of the given surface triangulation is considered at and is divided into identical triangles.
+
+     It is equivalent to Yams's batch option U.
+
+   - **Smoothing**
+
+     A surface sandpapering without shrinkage of the given surface triangulation is performed, i.e., the high curvature variations of the given surface will be smoothed out without shrinking the volume in doing so. If ridges are defined, they will be kept as they are in the resulting mesh. It could modify the geometry.
+     It is equivalent to Yams's batch option S.
+
+   - **Geometrical Mesh : Coarsening** 
+
+     The given surface triangulation is modified in such a way that the distance between the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value.One should use this option, to coarsen when a purely geometrical mesh is needed. (a mesh that keeps and obeys its geometric features only.) The meshes obtained with this option are usually not suitable for computation because anisotropic elements may be generated
+
+     It is equivalent to Yams's batch option -2.
+
+   - **Geometrical Mesh : Coarsening and Enrichment** 
+
+     Yams coarses and enrichs meshes to obtain a purely geometrical mesh. The method is the same as above.
+
+     It is equivalent to Yams's batch option 2.
+
+   - **Mesh for finite element computation : Coarsening** 
+
+     The given surface triangulation is modfied in accordance to a size map. The latter is the intrinsic size map (computed automatically and based on the surface properties, i.e. the local curvatures). One should use this option to coarsen  the mesh, when a regular mesh  for computation purposes is desired, i.e. a mesh with good aspect ratios or good quality elements.
+
+     It is equivalent to Yams's batch option -1.
+
+   - **Mesh for finite element computation : Coarsening and Enrichment**
+
+     One should use this option to coarsen  and enrich the mesh, when a regular mesh for computation purposes is desired, i.e. a mesh with good aspect ratios or good quality elements. The method is the same as above.
+
+     It is equivalent to Yams's batch option 1.
+   
+
+Units parameter
+---------------
+
+It indicates what reference is used for the values corresponding to size or distance specifications:
+If the Units parameter is absolute, values are relative to the bounding box,otherwise the tolerance parameter is expressed in model units. The bounding box size is defined as the length of the diagonal (lower left back icorner to upper right front corner).
+
+
+
+Chordal deviation tolerance parameter
+-------------------------------------
+
+This field enables the user to bound the maximal chordal deviation allowed, that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent.
+
+.. image:: images/Tolerance.png
+   :align: center
+
+
+This parameter enables the user to specify the maximal chordal deviation epsilon max.
+
+it can be :
+  - relative : the maximal chordal deviation - epsilon max -is set to 0.001 x the parameter. by default, the parameter is set to 0.1 and the maximum deviation is also 0.1 x 1/1000 * the size of the bounding box,  which is equivalent to say that, for a bouding box of 1 meter, the maximal deviation is 0.1 mm.
+  - absolute : the maximal chordal deviation is the parameter itself. eg if the parameter equals 2, the maximal chordal deviation will be 2 (mm if the point coordonates are given in mm).
+
+Following that criterion:
+  - if the chordal deviation epsilon is smaller than epsilon max, it is acceptable to remove the considered point.
+  - if the chordal deviation epsilon is greater than epsilon max, the considered mesh face should be redifined by adding a point on the curve.
+
diff --git a/src/Tools/YamsPlug/doc/conf.py b/src/Tools/YamsPlug/doc/conf.py
new file mode 100644 (file)
index 0000000..e3d5776
--- /dev/null
@@ -0,0 +1,179 @@
+# -*- coding: utf-8 -*-
+#
+# Yams PlugIn documentation build configuration file, created by
+# sphinx-quickstart on Wed Sep 14 11:40:32 2011.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# The contents of this file are pickled, so don't put values in the namespace
+# that aren't pickleable (module imports are okay, they're removed automatically).
+#
+# All configuration values have a default value; values that are commented out
+# serve to show the default value.
+
+import sys, os
+
+# If your extensions are in another directory, add it here. If the directory
+# is relative to the documentation root, use os.path.abspath to make it
+# absolute, like shown here.
+#sys.path.append(os.path.abspath('some/directory'))
+
+# General configuration
+# ---------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['.templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General substitutions.
+project = 'YAMS Plug_in'
+copyright = '2011, Pascale Noyret'
+
+# The default replacements for |version| and |release|, also used in various
+# other places throughout the built documents.
+#
+# The short X.Y version.
+version = '6.4'
+# The full version, including alpha/beta/rc tags.
+release = '6.4.0'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directories, that shouldn't be searched
+# for source files.
+#exclude_dirs = []
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+
+# Options for HTML output
+# -----------------------
+
+# The style sheet to use for HTML and HTML Help pages. A file of that name
+# must exist either in Sphinx' static/ path, or in one of the custom paths
+# given in html_static_path.
+html_style = 'default.css'
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (within the static path) to place at the top of
+# the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+#html_static_path = ['.static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, the reST sources are included in the HTML build as _sources/<name>.
+#html_copy_source = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'YamsPlug-in doc'
+
+
+# Options for LaTeX output
+# ------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, document class [howto/manual]).
+latex_documents = [
+  ('index', 'YAMSPlugIn.tex', 'Yams PlugIn Documentation',
+   'Pascale Noyret', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
diff --git a/src/Tools/YamsPlug/doc/editHypo.rst b/src/Tools/YamsPlug/doc/editHypo.rst
new file mode 100644 (file)
index 0000000..414d8ad
--- /dev/null
@@ -0,0 +1,60 @@
+.. _hypothesis-label:
+
+===========================
+How to save Yams Parameters 
+===========================
+
+As Yams hypothesis are not meshing hypothesis for Salome (but hypothesis for yams), parameters
+are stored in a special file. Default file is $HOME/.yams.dat. It is strongly recommended that you
+change this name if you want to preserve the way you obtain a mesh : This file is never cleaned.
+All sets of parameters are logged in it.
+
+
+- To save the current setting, click on "Save Params" pushbutton. 
+- A set of parameters is automatically written in the .yams.dat file when you run computation.  
+- Restoring the default settings can be done by pushing "Default Params". 
+- "Loading Params" will reload the last set of parameters
+
+
+
+**example of .yams.dat**
+
+
+.. code-block:: python
+
+   # Save intermediate params
+   # Params for mesh :
+   Optimisation ='Quality improvement Only (0)'
+   Units ='Relative'
+   Chordal_Tolerance_Deviation=1.0
+   Ridge_Detection=True
+   Split_Edge=False
+   Point_Smoothing=True
+   Geometrical_Approximation=0.04
+   Ridge_Angle=45.0
+   Maximum_Size=-2.0
+   Minimum_Size=-2.0
+   Mesh_Gradation=1.3
+   Verbosity=3
+   Memory=0
+   
+   
+   
+   # Params for Hypothese : monHypo_Yams_0
+   # Params for mesh : Mesh_1
+   Optimisation ='Quality improvement Only (0)'
+   Units ='Relative'
+   Chordal_Tolerance_Deviation=1.0
+   Ridge_Detection=True
+   Split_Edge=False
+   Point_Smoothing=True
+   Geometrical_Approximation=0.04
+   Ridge_Angle=45.0
+   Maximum_Size=-2.0
+   Minimum_Size=-2.0
+   Mesh_Gradation=1.3
+   Verbosity=3
+   Memory=0
+
+
+
diff --git a/src/Tools/YamsPlug/doc/images/Advanced.png b/src/Tools/YamsPlug/doc/images/Advanced.png
new file mode 100644 (file)
index 0000000..bd91a17
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Advanced.png differ
diff --git a/src/Tools/YamsPlug/doc/images/AppelYams.png b/src/Tools/YamsPlug/doc/images/AppelYams.png
new file mode 100644 (file)
index 0000000..a18b9ef
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/AppelYams.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Generic.png b/src/Tools/YamsPlug/doc/images/Generic.png
new file mode 100644 (file)
index 0000000..fb37ab4
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Generic.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Simple.png b/src/Tools/YamsPlug/doc/images/Simple.png
new file mode 100644 (file)
index 0000000..98cf1b9
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Simple.png differ
diff --git a/src/Tools/YamsPlug/doc/images/Tolerance.png b/src/Tools/YamsPlug/doc/images/Tolerance.png
new file mode 100644 (file)
index 0000000..6df0c80
Binary files /dev/null and b/src/Tools/YamsPlug/doc/images/Tolerance.png differ
diff --git a/src/Tools/YamsPlug/doc/index.rst b/src/Tools/YamsPlug/doc/index.rst
new file mode 100644 (file)
index 0000000..8640446
--- /dev/null
@@ -0,0 +1,28 @@
+.. Yams documentation master file, created by sphinx-quickstart on Wed Sep 14 11:40:32 2011.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+YAMS plugin documentation
+==========================
+
+This documentation covers the usage of Yams as plug-in in Salome that can be used within the Salome
+Mesh module for remeshing 2D Surface. 
+
+Yams plug-in uses Distene commercial software Yams, which is an **automatic surface remeshing tool**.
+This plug_in offers only the most common functionnalities of the tool.
+
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+  
+   lct.rst
+   Mandatory_params.rst
+   Generics_params.rst
+   Advanced_params.rst
+   editHypo.rst
+   
+   
+
+
diff --git a/src/Tools/YamsPlug/doc/lct.rst b/src/Tools/YamsPlug/doc/lct.rst
new file mode 100644 (file)
index 0000000..6f3bc51
--- /dev/null
@@ -0,0 +1,11 @@
+Running Yams Plug-in 
+=====================
+
+Yamms plug-in can be invoked via SMESH Plugin item in Mesh menu bar 
+
+.. image:: images/AppelYams.png
+   :align: center
+
+
+This plug-in works only with the commercial software Yams. To obtain a license,
+visit www.distene.comm
diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py
new file mode 100644 (file)
index 0000000..19dcd3e
--- /dev/null
@@ -0,0 +1,86 @@
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2012   EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Modules Python
+import string,types,os
+import traceback
+
+from PyQt4 import *
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+# Import des panels
+
+# ------------------------------- #
+from ViewText import Ui_ViewExe
+class MonViewText(Ui_ViewExe,QDialog):
+# ------------------------------- #
+    """
+    Classe permettant la visualisation de texte
+    """
+    def __init__(self,parent,txt):
+        QDialog.__init__(self,parent)
+        self.setupUi(self)
+        self.resize( QSize(600,600).expandedTo(self.minimumSizeHint()) )
+        self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") )
+        self.connect( self.PB_Save,SIGNAL("clicked()"), self.saveFile )
+        self.monExe=QProcess(self)
+
+
+        self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut )
+        self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr )
+      
+        # Je n arrive pas a utiliser le setEnvironment du QProcess
+        # fonctionne hors Salome mais pas dans Salome ???
+        LICENCE=os.environ['DISTENE_LICENCE_FILE_FOR_YAMS']
+        txt='export DISTENE_LICENSE_FILE='+LICENCE+';'+ txt
+        pid=self.monExe.pid()
+        nomFichier='/tmp/yam_'+str(pid)+'.py'
+        f=open(nomFichier,'w')
+        f.write(txt)
+        f.close()
+
+        maBidouille='sh  ' + nomFichier
+        self.monExe.start(maBidouille)
+        self.monExe.closeWriteChannel()
+        self.show()
+
+        
+    def saveFile(self):
+        #recuperation du nom du fichier
+        savedir=os.environ['HOME']
+        fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir)
+        if fn.isNull() : return
+        ulfile = os.path.abspath(unicode(fn))
+        try:
+           f = open(fn, 'wb')
+           f.write(str(self.TB_Exe.toPlainText()))
+           f.close()
+        except IOError, why:
+           QMessageBox.critical(self, self.trUtf8('Save File'),
+                self.trUtf8('The file <b>%1</b> could not be saved.<br>Reason: %2')
+                    .arg(unicode(fn)).arg(str(why)))
+
+    def readFromStdErr(self):
+        a=self.monExe.readAllStandardError()
+        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a))) ;
+
+    def readFromStdOut(self) :
+        a=self.monExe.readAllStandardOutput()
+        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a))) ;
diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py
new file mode 100644 (file)
index 0000000..c92765d
--- /dev/null
@@ -0,0 +1,319 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2012   EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Modules Python
+# Modules Eficas
+
+import os
+from YamsPlugDialog import Ui_YamsPlugDialog
+from monViewText import MonViewText
+from PyQt4.QtGui import *
+from PyQt4.QtCore import *
+
+
+class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
+  """
+  """
+  def __init__(self):
+        QWidget.__init__(self)
+        self.setupUi(self)
+        self.connecterSignaux()
+        self.fichierIn=""
+        self.fichierOut=""
+        self.MeshIn="" 
+        self.num=1
+
+#      Ces parametres ne sont pas remis à rien par le clean
+        self.paramsFile= os.path.abspath(os.path.join(os.environ['HOME'],'.yams.dat'))
+        self.LE_ParamsFile.setText(self.paramsFile)
+        self.LE_MeshFile.setText("")
+        self.LE_MeshSmesh.setText("")
+
+  def connecterSignaux(self) :
+        self.connect(self.PB_Cancel,SIGNAL("clicked()"),self.PBCancelPressed)
+        self.connect(self.PB_Default,SIGNAL("clicked()"),self.clean)
+        self.connect(self.PB_Help,SIGNAL("clicked()"),self.PBHelpPressed)
+        self.connect(self.PB_Load,SIGNAL("clicked()"),self.PBLoadPressed)
+        self.connect(self.PB_OK,SIGNAL("clicked()"),self.PBOKPressed)
+        self.connect(self.PB_Save,SIGNAL("clicked()"),self.PBSavePressed)
+        self.connect(self.PB_MeshFile,SIGNAL("clicked()"),self.PBMeshFilePressed)
+        self.connect(self.PB_MeshSmesh,SIGNAL("clicked()"),self.PBMeshSmeshPressed)
+        self.connect(self.PB_ParamsFileExplorer,SIGNAL("clicked()"),self.setParamsFileName)
+        self.connect(self.LE_MeshFile,SIGNAL("returnPressed()"),self.meshFileNameChanged)
+        self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged)
+
+
+  def PBHelpPressed(self):
+        try :
+          maDoc=os.environ['DISTENE_YAMS_DOC_PDF']
+        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):
+        if not(self.PrepareLigneCommande()) : return
+        self.PBSavePressed(NomHypo=True)
+        maFenetre=MonViewText(self,self.commande)
+        if os.path.isfile(self.fichierOut) :self.enregistreResultat()
+
+  def enregistreResultat(self):
+        import smesh
+        import SMESH
+        import salome
+        from salome.kernel import studyedit
+
+        maStudy=studyedit.getActiveStudy()
+        smesh.SetCurrentStudy(maStudy)
+        (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut)
+        meshname = 'yams'+str(self.num)
+        smesh.SetName(outputMesh.GetMesh(), meshname)
+        outputMesh.Compute()
+
+
+        self.editor = studyedit.getStudyEditor()    # 
+        moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH")
+        HypReMeshEntry = self.editor.findOrCreateItem( moduleEntry, name = 'HypoForRemesh',
+                                           comment = 'HypoForRemshing')
+        monStudyBuilder=maStudy.NewBuilder();
+        monStudyBuilder.NewCommand();
+        newStudyIter=monStudyBuilder.NewObject(HypReMeshEntry)
+        aNameAttrib=monStudyBuilder.FindOrCreateAttribute(newStudyIter,"AttributeName")
+        hypoName = 'monHypo_Yams_'+str(self.num)
+        aNameAttrib.SetValue(hypoName)
+        aCommentAttrib=monStudyBuilder.FindOrCreateAttribute(newStudyIter,"AttributeComment")
+        aCommentAttrib.SetValue(str(self.commande))
+        
+        SOMesh=maStudy.FindObjectByName(meshname ,"SMESH")[0]
+        newLink=monStudyBuilder.NewObject(SOMesh)
+        monStudyBuilder.Addreference(newLink, newStudyIter);
+        if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(0)
+        self.num+=1
+        return True
+
+  def PBSavePressed(self,NomHypo=False):
+        if NomHypo : text = '# Params for Hypothese : monHypo_Yams_'+str(self.num - 1)+"\n"
+        else :       text = '# Save intermediate params \n' 
+        text += "# Params for mesh : " +  self.LE_MeshSmesh.text() +'\n'
+        for RB in self.GBOptim.findChildren(QRadioButton,):
+            if RB.isChecked()==True:
+               text+="Optimisation ='"+RB.text()+"'\n"
+               break
+        for RB in self.GBUnit.findChildren(QRadioButton,):
+            if RB.isChecked()==True:
+               text+="Units ='"+RB.text()+"'\n"
+        text+='Chordal_Tolerance_Deviation='+str(self.SP_Tolerance.value())+'\n'
+
+        text+='Ridge_Detection=' + str(self.CB_Ridge.isChecked())+'\n'
+        text+='Split_Edge='      + str(self.CB_SplitEdge.isChecked())+'\n'
+        text+='Point_Smoothing=' + str(self.CB_Point.isChecked())+'\n'
+        text+='Geometrical_Approximation='+ str(self.SP_Geomapp.value())  +'\n'
+        text+='Ridge_Angle='              + str(self.SP_Ridge.value())    +'\n'
+        text+='Maximum_Size='             + str(self.SP_MaxSize.value())  +'\n'
+        text+='Minimum_Size='             + str(self.SP_MaxSize.value())  +'\n'
+        text+='Mesh_Gradation='           + str(self.SP_Gradation.value())+'\n'
+
+        text+='Verbosity='                + str(self.SP_Verbosity.value())+'\n'
+        text+='Memory='                   + str(self.SP_Memory.value())+'\n'
+        text+='\n\n'
+
+        try :
+           f=open(self.paramsFile,'a')
+        except :
+           QMessageBox.warning( self, "File", "Unable to open "+self.paramsFile)
+           return
+        try :
+           f.write(text)
+        except :
+           QMessageBox.warning( self, "File", "Unable to write "+self.paramsFile)
+           return
+        f.close()
+
+  def PBLoadPressed(self):
+        try :
+           f=open(self.paramsFile,'r')
+        except :
+           QMessageBox.warning( self, "File", "Unable to open "+self.paramsFile)
+           return
+        try :
+           text=f.read()
+        except :
+           QMessageBox.warning( self, "File", "Unable to read "+self.paramsFile)
+           return
+        f.close()
+        d={}
+        exec text in d
+        for RB in self.GBOptim.findChildren(QRadioButton,):
+            if d['Optimisation']== RB.text():
+               RB.setChecked(True)
+               break
+        for RB in self.GBUnit.findChildren(QRadioButton,):
+            if d['Units']== RB.text():
+               RB.setChecked(True)
+               break
+        self.SP_Tolerance.setValue(d['Chordal_Tolerance_Deviation'])
+
+        self.CB_Ridge.setChecked(d['Ridge_Detection'])
+        self.CB_Point.setChecked(d['Point_Smoothing'])
+        self.CB_SplitEdge.setChecked(d['Split_Edge'])
+        self.SP_Geomapp.setValue(d['Geometrical_Approximation'])
+        self.SP_Ridge.setValue(d['Ridge_Angle'])
+        self.SP_MaxSize.setValue(d['Maximum_Size'])
+        self.SP_MinSize.setValue(d['Minimum_Size'])
+        self.SP_Gradation.setValue(d['Mesh_Gradation'])
+
+        self.SP_Verbosity.setValue(d['Verbosity'])
+        self.SP_Memory.setValue(d['Memory'])
+
+
+  def PBCancelPressed(self):
+        self.close()
+
+  def PBMeshFilePressed(self):
+       fd = QFileDialog(self, "select an existing Mesh file", self.LE_MeshFile.text(), "Mesh-Files (*.mesh);;All Files (*)")
+       if fd.exec_():
+          infile = fd.selectedFiles()[0]
+          self.LE_MeshFile.setText(infile)
+          self.fichierIn=infile.toLatin1()
+
+  def setParamsFileName(self):
+       fd = QFileDialog(self, "select a file", self.LE_ParamsFile.text(), "dat Files (*.dat);;All Files (*)")
+       if fd.exec_():
+          infile = fd.selectedFiles()[0]
+          self.LE_ParamsFile.setText(infile)
+          self.paramsFile=infile.toLatin1()
+
+
+  def meshFileNameChanged(self):
+      self.fichierIn=self.LE_MeshFile.text()
+      if os.path.exists(self.fichierIn): return
+      QMessageBox.warning( self, "Unknown File", "File doesn't exist")
+
+  def paramsFileNameChanged(self):
+      self.paramsFile=self.LE_ParamsFile.text()
+
+  def PBMeshSmeshPressed(self):
+      import salome
+      import smesh
+      from salome.kernel import studyedit
+      from salome.smesh.smeshstudytools import SMeshStudyTools
+      from salome.gui import helper as guihelper
+      from omniORB import CORBA
+
+      mySObject, myEntry = guihelper.getSObjectSelected()
+      if CORBA.is_nil(mySObject) or mySObject==None:
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return
+      self.smeshStudyTool = SMeshStudyTools()
+      self.__selectedMesh = self.smeshStudyTool.getMeshObjectFromSObject(mySObject)
+      if CORBA.is_nil(self.__selectedMesh):
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return
+      myName = mySObject.GetName()
+      self.MeshIn=myName
+      self.LE_MeshSmesh.setText(myName)
+
+  def prepareFichier(self):
+      self.fichierIn="/tmp/PourYam_"+str(self.num)+".mesh"
+      import SMESH
+      self.__selectedMesh.ExportGMF(self.__selectedMesh,self.fichierIn, True)
+
+  def PrepareLigneCommande(self):
+      self.commande="yams "
+      verbosity=str(self.SP_Verbosity.value())
+      self.commande+="-v "+verbosity
+      for obj in self.mesRB.children():
+          try :
+           if obj.isChecked():
+              self.style=obj.objectName().remove(0,3)
+              self.style.replace("_","-")
+              break
+          except :
+              pass
+      self.commande+=" -O "+self.style.toLatin1()
+      if self.fichierIn=="" and self.MeshIn=="" :
+         QMessageBox.critical(self, "Mesh", "select an input mesh")
+         return False
+      if self.MeshIn!="" : self.prepareFichier()
+      if not (os.path.isfile(self.fichierIn)):
+         QMessageBox.critical(self, "File", "unable to read GMF Mesh in "+str(self.fichierIn))
+         return False
+
+      deb=os.path.splitext(self.fichierIn)
+      self.fichierOut=deb[0]+'.d.meshb'
+
+      if self.RB_Absolute.isChecked()==True :
+         self.commande+=' -Dabsolute'
+      else :
+         self.commande+=' -Drelative'
+      self.commande+=',tolerance=%f'%self.SP_Tolerance.value()
+      if self.CB_Ridge.isChecked()==False : self.commande+=',nr'
+      if self.CB_Point.isChecked()==False : self.commande+=',ns'
+      if self.SP_Geomapp.value()!=0.04 : self.commande+=',geomapp=%f'%self.SP_Geomapp.value()
+      if self.SP_Ridge.value()!=45.0 : self.commande+=',ridge=%f'%self.SP_Ridge.value()
+      if self.SP_MaxSize.value()!=100 : self.commande+=',maxsize=%f'%self.SP_MaxSize.value()
+      if self.SP_MinSize.value()!=5 : self.commande+=',minsize=%f'%self.SP_MinSize.value()
+      if self.SP_Gradation.value()!=1.3 : self.commande+=',gradation=%f'%self.SP_MaxSize.value()
+      if self.CB_SplitEdge.isChecked()==True : self.commande+=',splitedge=1'
+
+      if self.SP_Verbosity.value()!=3 : self.commande+=' -v %d'%self.SP_Verbosity.value()
+      if self.SP_Memory.value()!=0 : self.commande+=' -m %d'%self.SP_Memory.value()
+
+      self.commande+=" "+self.fichierIn
+      return True
+
+  def clean(self):
+        self.RB_0.setChecked(True)
+        self.RB_G.setChecked(False)
+        self.RB_U.setChecked(False)
+        self.RB_S.setChecked(False)
+        self.RB_2.setChecked(False)
+        self.RB_1.setChecked(False)
+        self.RB_Absolute.setChecked(False)
+        self.RB_Relative.setChecked(True)
+        self.SP_Tolerance.setProperty("value", 0.1)
+        self.SP_Geomapp.setProperty("value", 0.04)
+        self.SP_Ridge.setProperty("value", 45.0)
+        self.SP_Gradation.setProperty("value", 1.3)
+        self.CB_Ridge.setChecked(True)
+        self.CB_Point.setChecked(True)
+        self.CB_SplitEdge.setChecked(False)
+        self.SP_MaxSize.setProperty("value", -2.0)
+        self.SP_MinSize.setProperty("value", -2.0)
+        self.SP_Verbosity.setProperty("value", 3)
+        self.SP_Memory.setProperty("value", 0)
+
+
+__dialog=None
+def getDialog():
+    """
+    This function returns a singleton instance of the plugin dialog.
+    c est obligatoire pour faire un show sans parent...
+    """
+    global __dialog
+    if __dialog is None:
+        __dialog = MonYamsPlugDialog()
+    #else :
+    #   __dialog.clean()
+    return __dialog
+
diff --git a/src/Tools/YamsPlug/select1.png b/src/Tools/YamsPlug/select1.png
new file mode 100644 (file)
index 0000000..ecb252a
Binary files /dev/null and b/src/Tools/YamsPlug/select1.png differ
diff --git a/src/Tools/YamsPlug/yamsplug_plugin.py b/src/Tools/YamsPlug/yamsplug_plugin.py
new file mode 100644 (file)
index 0000000..4e04a98
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright (C) 2006-2012  EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
+# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
+
+def YamsLct(context):
+  # get context study, studyId, salomeGui
+  study = context.study
+  studyId = context.studyId
+  sg = context.sg
+  
+  import os
+  import subprocess
+  import tempfile
+  from PyQt4 import QtCore
+  from PyQt4 import QtGui
+  from PyQt4.QtGui import QFileDialog
+  from PyQt4.QtGui import QMessageBox
+  
+  try :
+      os.environ['DISTENE_LICENCE_FILE_FOR_YAMS']
+  except:
+      QMessageBox.warning(None,"Products","Distene's products are not installed")
+      return
+  import monYamsPlugDialog
+  window=monYamsPlugDialog.getDialog() 
+  window.show()
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)
index 612e0faa889885f25214c768e6e4c392b03348cc..ebea5765048c944da6b3d53db10a3b17d65d5214 100644 (file)
@@ -23,6 +23,7 @@ import salome_pluginsmanager
 
 from spadderPlugin import runSpadderPlugin
 from meshcut_plugin import MeshCut
+from yamsplug_plugin import YamsLct
 
 salome_pluginsmanager.AddFunction('PADDER mesher',
                                   'Create a mesh with PADDER',
@@ -31,3 +32,7 @@ salome_pluginsmanager.AddFunction('PADDER mesher',
 salome_pluginsmanager.AddFunction('MeshCut',
                                   'Cut a tetrahedron mesh by a plane',
                                   MeshCut)
+
+salome_pluginsmanager.AddFunction('ReMesh with Yams',
+                                  'Run Yams',
+                                  YamsLct)