]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/commitdiff
Salome HOME
Imported using TkCVS baseline-1_1_1
authorsecher <secher>
Tue, 13 Mar 2007 09:41:48 +0000 (09:41 +0000)
committersecher <secher>
Tue, 13 Mar 2007 09:41:48 +0000 (09:41 +0000)
47 files changed:
Makefile.in [new file with mode: 0755]
adm_local/Makefile.in [new file with mode: 0755]
adm_local/unix/config_files/check_GHS3DPRLPLUGIN.m4 [new file with mode: 0755]
adm_local/unix/make_commence.in [new file with mode: 0755]
adm_local/unix/make_omniorb.in [new file with mode: 0755]
bin/VERSION.in [new file with mode: 0755]
build_configure [new file with mode: 0755]
configure.in.base [new file with mode: 0755]
env_GHS3DPRLplugin-Src.sh [new file with mode: 0755]
idl/GHS3DPRLPlugin_Algorithm.idl [new file with mode: 0755]
idl/Makefile.in [new file with mode: 0755]
install [new file with mode: 0755]
resources/GHS3DPRL.png [new file with mode: 0755]
resources/GHS3DPRLPLUGIN.xml [new file with mode: 0755]
resources/mesh_algo_GHS3DPRL.png [new file with mode: 0755]
resources/mesh_hypo_GHS3DPRL.png [new file with mode: 0755]
resources/mesh_tree_algo_GHS3DPRL.png [new file with mode: 0755]
resources/mesh_tree_hypo_GHS3DPRL.png [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.cxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.hxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.cxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.hxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.cxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.hxx [new file with mode: 0755]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_i.cxx [new file with mode: 0755]
src/GHS3DPRLPlugin/Makefile.in [new file with mode: 0755]
src/Makefile.in [new file with mode: 0755]
src/gui/GHS3DPRLPluginGUI.cxx [new file with mode: 0755]
src/gui/GHS3DPRLPluginGUI_HypothesisCreator.cxx [new file with mode: 0755]
src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h [new file with mode: 0755]
src/gui/GHS3DPRLPlugin_images.po [new file with mode: 0755]
src/gui/GHS3DPRLPlugin_msg_en.po [new file with mode: 0755]
src/gui/Makefile.in [new file with mode: 0755]
src/tepal2med/.depend [new file with mode: 0644]
src/tepal2med/Makefile [new file with mode: 0755]
src/tepal2med/Makefile.in [new file with mode: 0755]
src/tepal2med/dlg_ghs3dmain.cxx [new file with mode: 0755]
src/tepal2med/dlg_ghs3dmain.h [new file with mode: 0755]
src/tepal2med/dlg_ghs3dmain.ui.h [new file with mode: 0755]
src/tepal2med/ghs3dprl_mesh_wrap.cxx [new file with mode: 0755]
src/tepal2med/ghs3dprl_mesh_wrap.h [new file with mode: 0755]
src/tepal2med/ghs3dprl_msg_parser.cxx [new file with mode: 0755]
src/tepal2med/ghs3dprl_msg_parser.h [new file with mode: 0755]
src/tepal2med/moc_dlg_ghs3dmain.cxx [new file with mode: 0755]
src/tepal2med/tepal2med.cxx [new file with mode: 0755]

diff --git a/Makefile.in b/Makefile.in
new file mode 100755 (executable)
index 0000000..da8b4bc
--- /dev/null
@@ -0,0 +1,93 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# -* Makefile *-
+#
+# Author : Christian VAN WAMBEKE (CEA)
+# Date : 2007/02/01
+#
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=.
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+SUBDIRS = idl src adm_local
+
+RESOURCES_FILES = \
+    GHS3DPRLPLUGIN.xml \
+    mesh_algo_GHS3DPRL.png \
+    mesh_hypo_GHS3DPRL.png \
+    mesh_tree_algo_GHS3DPRL.png \
+    mesh_tree_hypo_GHS3DPRL.png \
+    GHS3DPRL.png
+
+BIN_SCRIPT = VERSION
+
+# copy header files in common directory ------------
+
+ifeq ($(HAVE_SSTREAM),yes)
+  include_list=include/salome/SALOMEconfig.h
+else
+  include_list=include/salome/SALOMEconfig.h include/salome/sstream
+endif
+
+inc: idl $(include_list)
+
+include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
+       -$(RM) $@
+       $(LN_S) ../../$< $@
+
+# test if SALOMEconfig.h has changed (contents)
+salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
+       @if ! [ -a $@ ]; then \
+         cp -p -f $< $@;        \
+       fi;                   \
+       if ! cmp $< $@; then  \
+         cp -p -f $< $@;        \
+       fi;                   \
+
+include/salome/sstream: salome_adm/unix/sstream
+       -$(RM) $@
+       $(LN_S) ../../$< $@
+
+# install script in $(bindir) :
+install-bin: $(BIN_SCRIPT)
+       $(INSTALL) -d  $(bindir)
+       if test $(BIN_SCRIPT)X != X; then                       \
+               $(INSTALL_PROGRAM) $^ $(bindir);                \
+       fi
+
+# CLEAN --------------------
+
+distclean: distclean-other
+
+distclean-other:
+       -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
+       -$(RM) salome_adm/unix/make_*
+       -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h
+       -$(RM) config.cache config.log config.status
+
+@MODULE@
+
+install: install-bin
diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in
new file mode 100755 (executable)
index 0000000..b19e7c1
--- /dev/null
@@ -0,0 +1,60 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=..
+srcdir=@srcdir@
+VPATH=.:$(srcdir)/adm_local
+
+
+all: resources
+
+install:
+       cp -rf @top_srcdir@/adm_local @prefix@
+
+bin:
+
+resources :
+       cp -rf @top_srcdir@/adm_local $(top_builddir)
+
+inc:
+
+lib:
+
+depend:
+
+depend_idl:
+
+install-end:
+
+install-include:
+
+install-bin:
+
+uninstall:
+
+uninstall-idl:
+
+distclean:
+
+clean:
+
+distclean-other:
+
diff --git a/adm_local/unix/config_files/check_GHS3DPRLPLUGIN.m4 b/adm_local/unix/config_files/check_GHS3DPRLPLUGIN.m4
new file mode 100755 (executable)
index 0000000..e775e94
--- /dev/null
@@ -0,0 +1,53 @@
+AC_DEFUN([CHECK_GHS3DPRL],[
+
+AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
+
+AC_CHECKING(for GHS3DPRL(Tepal) commercial product)
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_ARG_WITH(,
+           [  --with-GHS3DPRL=DIR root directory path of Tepal installation],
+           GHS3DPRL_HOME=$withval,GHS3DPRL_HOME="")
+
+GHS3DPRL_ok=no
+
+if test "x$GHS3DPRL_HOME" == "x" ; then
+
+# no --with-GHS3DPRL option used
+   if test "x$GHS3DPRLHOME" != "x" ; then
+
+    # GHS3DPRLHOME environment variable defined
+      GHS3DPRL_HOME=$GHS3DPRLHOME
+
+   fi
+#
+fi
+
+if test "x$GHS3DPRL_HOME" != "x"; then
+
+  echo
+  echo -------------------------------------------------
+  echo You are about to choose to use somehow the
+  echo "GHS3DPRL(Tepal) commercial product to generate 3D tetrahedral mesh."
+  echo
+
+  AC_MSG_CHECKING(for GHS3DPRL(Tepal) executable)
+
+  AC_CHECK_PROG(GHS3DPRL,tepal,found)
+
+  if test "x$GHS3DPRL" == x ; then
+    AC_MSG_RESULT(no)
+    AC_MSG_WARN(Tepal program not found in PATH variable)
+  else
+    GHS3DPRL_ok=yes
+  fi
+
+fi
+
+AC_MSG_RESULT(for GHS3DPRL(Tepal): $GHS3DPRL_ok)
+AC_LANG_RESTORE
+
+])dnl
diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in
new file mode 100755 (executable)
index 0000000..6d07a77
--- /dev/null
@@ -0,0 +1,290 @@
+# common directories to put headerfiles
+inc_builddir=$(top_builddir)/include/salome
+
+@SET_MAKE@
+SHELL=/bin/sh
+
+# header missing
+
+HAVE_SSTREAM=@HAVE_SSTREAM@
+
+
+LIBS=@LIBS@ 
+LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome
+# add libstdc++ to link c++ library with libtool !
+LDFLAGS+= -lstdc++
+
+CP=@CP@
+
+# CPP
+
+CPP=@CPP@
+CXXCPP=@CXXCPP@
+CPPFLAGS=@CPPFLAGS@ -I$(inc_builddir) -I$(srcdir) -I.
+
+# C
+
+CC = @CC@
+CFLAGS = @CFLAGS@
+C_DEPEND_FLAG = @C_DEPEND_FLAG@
+
+# C++
+
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@ 
+CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
+
+# BOOST Library
+
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+
+# JAVA
+
+JAVA_INCLUDES = @JAVA_INCLUDES@
+JAVA_LIBS = @JAVA_LIBS@
+JAVA_LDPATH = @JAVA_LDPATH@
+
+# PYTHON
+
+PYTHON = @PYTHON@
+PYTHONHOME = @PYTHONHOME@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_VERSION = @PYTHON_VERSION@
+PYTHON_SITE = @PYTHON_SITE@
+PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@
+
+# QT
+
+QT_ROOT = @QT_ROOT@
+QT_INCLUDES = @QT_INCLUDES@
+QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT
+QT_LIBS = @QT_LIBS@
+QT_MT_LIBS = @QT_MT_LIBS@
+
+MOC = @MOC@
+UIC = @UIC@
+MSG2QM = @MSG2QM@
+
+#QWT
+
+QWT_INCLUDES=@QWT_INCLUDES@
+QWT_LIBS=@QWT_LIBS@
+
+# SIP
+SIP = @SIP@
+SIP_INCLUDES = @SIP_INCLUDES@
+SIP_LIBS = @SIP_LIBS@
+
+# PYQT
+PYQT_SIPS = @PYQT_SIPS@
+PYQT_LIBS = @PYQT_LIBS@
+
+# openGL
+OGL_INCLUDES=@OGL_INCLUDES@
+OGL_LIBS=@OGL_LIBS@
+
+# VTK
+VTK_INCLUDES=@VTK_INCLUDES@
+VTK_LIBS=@VTK_LIBS@
+
+# HDF5
+
+HDF5_INCLUDES=@HDF5_INCLUDES@
+HDF5_LIBS=@HDF5_LIBS@
+HDF5_MT_LIBS=@HDF5_MT_LIBS@
+
+# MED2
+
+MED2_INCLUDES=@MED2_INCLUDES@
+MED2_LIBS=@MED2_LIBS@
+MED2_MT_LIBS=@MED2_MT_LIBS@
+
+# OpenCasCade
+
+OCC_INCLUDES=@CAS_CPPFLAGS@
+OCC_CXXFLAGS=@CAS_CXXFLAGS@
+
+OCC_KERNEL_LIBS=@CAS_KERNEL@
+OCC_OCAF_LIBS=@CAS_OCAF@
+OCC_VIEWER_LIBS=@CAS_VIEWER@
+OCC_MODELER_LIBS=@CAS_MODELER@
+OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
+OCC_LIBS=@CAS_LDFLAGS@
+OCC_LDPATH=@CAS_LDPATH@
+
+# MPICH
+
+MPICH_INCLUDES=@MPICH_INCLUDES@
+MPICH_LIBS=@MPICH_LIBS@
+
+# Swig C++ Python
+
+SWIG       = @SWIG@
+SWIG_FLAGS = @SWIG_FLAGS@ -I$(inc_builddir) -I$(srcdir) -I.
+
+# OMNIORB
+
+OMNIORB_ROOT        = @OMNIORB_ROOT@
+OMNIORB_INCLUDES    = @OMNIORB_INCLUDES@
+OMNIORB_LIBS        = @OMNIORB_LIBS@
+OMNIORB_CXXFLAGS    = @OMNIORB_CXXFLAGS@
+
+OMNIORB_IDL         = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS  = @OMNIORB_IDLPYFLAGS@ -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome\
+       -I$(SMESH_ROOT_DIR)/idl/salome
+
+OMNIORB_IDL_CLN_H   = @OMNIORB_IDL_CLN_H@
+OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
+OMNIORB_IDL_CLN_OBJ = @OMNIORB_IDL_CLN_OBJ@
+
+OMNIORB_IDL_SRV_H   = @OMNIORB_IDL_SRV_H@
+OMNIORB_IDL_SRV_CXX = @OMNIORB_IDL_SRV_CXX@
+OMNIORB_IDL_SRV_OBJ = @OMNIORB_IDL_SRV_OBJ@
+
+# Default ORB
+
+CORBA_ROOT        = @CORBA_ROOT@
+CORBA_INCLUDES    = @CORBA_INCLUDES@
+CORBA_LIBS        = @CORBA_LIBS@
+CORBA_CXXFLAGS    = @CORBA_CXXFLAGS@
+
+IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome\
+       -I$(SMESH_ROOT_DIR)/idl/salome
+IDLPYFLAGS  = @IDLPYFLAGS@
+
+IDL = @IDL@
+
+IDL_CLN_H   = @IDL_CLN_H@
+IDL_CLN_CXX = @IDL_CLN_CXX@
+IDL_CLN_OBJ = @IDL_CLN_OBJ@
+
+IDL_SRV_H   = @IDL_SRV_H@
+IDL_SRV_CXX = @IDL_SRV_CXX@
+IDL_SRV_OBJ = @IDL_SRV_OBJ@
+
+CPPFLAGS+= $(CORBA_INCLUDES) 
+CXXFLAGS+= $(CORBA_CXXFLAGS)
+
+# SALOME
+
+SALOME_INCLUDES = \
+       -I$(KERNEL_ROOT_DIR)/include/salome \
+       -I$(GEOM_ROOT_DIR)/include/salome \
+       -I$(SMESH_ROOT_DIR)/include/salome
+
+CPPFLAGS += -DSOLIDGEOM -DLINUX $(OCC_INCLUDES) $(SALOME_INCLUDES) $(BOOST_CPPFLAGS)
+CXXFLAGS += -DSOLIDGEOM -DLINUX $(OCC_CXXFLAGS) $(SALOME_INCLUDES)
+
+LDFLAGS += -L${KERNEL_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -L${SMESH_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -L${GEOM_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -lSMESHimpl -lSMESHEngine -lStdMeshers -lStdMeshersEngine -lSalomeGenericObj
+
+# add corba libs when link salome application ! 
+#LDFLAGS+= $(CORBA_LIBS)
+LIBS+=$(CORBA_LIBS)
+
+## Shared libraries
+LT_STATIC_EXEC=@LT_STATIC_EXEC@
+DYNAMIC_DIRS=@DYNAMIC_DIRS@
+LT_LIB=libtool
+LT=$(top_builddir)/libtool
+LT_COMPILE=$(LT) --mode=compile $(CC)
+LT_LINK_LIB=$(LT_LIB) --mode=link $(CC) -rpath $(libdir)
+LT_LINK_EXE=$(LT) --mode=link $(CC) $(LT_STATIC_EXEC) -dlopen self -rpath $(bindir) $(DYNAMIC_DIRS)
+LT_RUN=$(LT) --mode=execute
+LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM)
+LT_INSTALL_LIB=$(LT) --mode=install $(INSTALL_DATA)
+LT_UNINSTALL=$(LT) --mode=uninstall $(RM)
+
+INSTALL=@INSTALL@
+INSTALL_PROGRAM=@INSTALL_PROGRAM@
+INSTALL_DATA=@INSTALL_DATA@
+
+# create a symbolic link (or a copie ?)
+LN_S=@LN_S@
+
+## Installation points
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@/salome
+libdir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/salome
+# warning : if user give this path in configure we could have salome/salome :-(
+includedir=@includedir@/salome
+datadir=@datadir@/salome
+idldir=$(prefix)/idl/salome
+sharedpydir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
+
+docdir=${prefix}/doc/salome
+
+#
+# begin of package rules
+#
+
+.PHONY: all lib bin inc resources docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
+
+.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm
+
+all:
+       $(MAKE) inc
+       $(MAKE) depend_idl
+       $(MAKE) depend
+       $(MAKE) lib
+       $(MAKE) bin
+       $(MAKE) resources
+
+#
+# add target to build administrative files
+#
+
+Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
+       cd $(top_builddir) ; ./config.status
+
+LOCAL_MAKE = make_commence make_omniorb
+
+KERNEL_MAKE = make_module make_conclude depend SALOMEconfig.h F77config.h sstream envScript
+
+$(top_builddir)/config.status: $(top_srcdir)/configure \
+                              $(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \
+                              $(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in)
+       cd $(top_builddir) ; ./config.status --recheck
+
+# VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-)
+ifneq ($(top_srcdir),$(srcdir))
+configure: $(top_srcdir)/configure
+endif
+
+$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
+       cd $(top_srcdir) ; autoconf
+
+$(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
+       cd $(top_srcdir) && ./build_configure
+
+
+ACLOCAL_KERNEL = \
+ac_cxx_bool.m4                    check_corba.m4                       \
+ac_cxx_depend_flag.m4             check_hdf5.m4      enable_pthreads.m4        \
+ac_cxx_mutable.m4                 check_mico.m4      libtool.m4                \
+ac_cxx_namespaces.m4              check_omniorb.m4   pyembed.m4                \
+ac_cxx_partial_specialization.m4  python.m4                            \
+ac_cxx_typename.m4                check_pthreads.m4  check_cas.m4      \
+ac_cc_warnings.m4                 check_swig.m4             check_boost.m4 
+
+ACLOCAL_GUI = \
+check_vtk.m4                      check_opengl.m4    check_qt.m4       \
+check_GUI.m4                      check_corba_in_GUI.m4
+
+ACLOCAL_GEOM =                    check_GEOM.m4
+
+ACLOCAL_SMESH =                   check_SMESH.m4
+
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+                          $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
+                          $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \
+                          $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%)
+       cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+                                                                       -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+                                                                       -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
+                                                                       -I @SMESH_ROOT_DIR@/adm_local/unix/config_files
+                                                              
diff --git a/adm_local/unix/make_omniorb.in b/adm_local/unix/make_omniorb.in
new file mode 100755 (executable)
index 0000000..217e040
--- /dev/null
@@ -0,0 +1,61 @@
+#=======================================================================
+# Begin specific part to omniorb 
+# (include from file adm/unix/make_omniorb generated by 
+# adm/unix/make_omniorb.in)
+#=======================================================================
+# -* Makefile *- 
+#
+# Author : Patrick GOLDBRONN (CEA)
+# Date : 29/06/2001
+#
+
+# Client and server object are the same with omniorb
+# There are one header file and one source file generate
+
+#IDLOBJ=$(IDLSRC:%.idl=%$(IDL_CLN_OBJ))
+
+# dependancies between idl and it's generated files
+%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${KERNEL_ROOT_DIR}/idl/salome/%.idl
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${GEOM_ROOT_DIR}/idl/salome/%.idl
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+#%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${MED_ROOT_DIR}/idl/salome/%.idl
+#      $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${SMESH_ROOT_DIR}/idl/salome/%.idl
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${top_builddir}/idl/salome/%.idl
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+# dependncies between idl files
+depend_idl: .depidl
+
+# we use cpp to generate dependencies between idl files.
+# we change cpp output to keep only idl file and transform it to get a suitable rule
+.depidl: $(IDL_FILES)
+       @touch $@
+       @for dep in $? dummy; do \
+         if [ $$dep != "dummy" ]; then \
+           echo Building dependencies for $$dep; \
+           basedep=`basename $$dep .idl`; \
+           header="$$basedep"$(IDL_CLN_H); \
+           sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
+           $(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \
+           sed `echo "s%$$basedep\\.idl%$$header:%g"` | \
+           sed 's% $(srcdir)/% %g' | \
+           sed 's% $(top_srcdir)/% %g' | \
+           sed 's% $(top_builddir)/% %g' | \
+           sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \
+           sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \
+           echo ''  >>$@; \
+         fi; \
+       done ;
+
+-include .depidl
+
+#=======================================================================
+# End specific part to omniorb 
+#=======================================================================
diff --git a/bin/VERSION.in b/bin/VERSION.in
new file mode 100755 (executable)
index 0000000..e3551b5
--- /dev/null
@@ -0,0 +1 @@
+THIS IS SALOME - GHS3DPRLPLUGIN VERSION: @VERSION@
diff --git a/build_configure b/build_configure
new file mode 100755 (executable)
index 0000000..b1db1b3
--- /dev/null
@@ -0,0 +1,261 @@
+#!/bin/bash
+
+#
+# Tool for updating list of .in file for the SALOME project 
+# and regenerating configure script
+#
+# Author : Marc Tajchman - CEA
+# Date : 10/10/2002
+#
+
+ORIG_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+
+########################################################################
+# Test if the KERNEL_ROOT_DIR is set correctly
+
+if test ! -d "${KERNEL_ROOT_DIR}"; then
+    echo "failed : KERNEL_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+# Test if the KERNEL_SRC is set correctly
+
+#if test ! -d "${KERNEL_SRC}"; then
+#    echo "failed : KERNEL_SRC variable is not correct !"
+#    exit
+#fi
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+    echo "failed : GUI_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+########################################################################
+# Test if the MED_ROOT_DIR is set correctly
+
+if test ! -d "${MED_ROOT_DIR}"; then
+    echo "failed : MED_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+########################################################################
+# Test if the GEOM_ROOT_DIR is set correctly
+
+if test ! -d "${GEOM_ROOT_DIR}"; then
+    echo "failed : GEOM_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+########################################################################
+# Test if the SMESH_ROOT_DIR is set correctly
+
+if test ! -d "${SMESH_ROOT_DIR}"; then
+    echo "failed : SMESH_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+########################################################################
+# find_in - utility function
+#
+# usage :  
+#    find_in directory filename 
+#
+# Finds files following the *.in pattern, recursively in the
+# directory (first argument).
+# Results are appended into the file (second argument)
+#
+# Difference from the standard unix find is that files are tested
+# before directories
+# 
+
+find_in()
+{
+  local i
+  local f=$2
+
+# if the first argument is not a directory, returns
+
+  if [ ! -d "$1" ] ; then 
+     return 
+  fi
+
+# dont look in the CVS directories
+
+  case $1 in
+    */CVS) return ;;
+       */adm_local/*) return ;;
+    *) ;;
+  esac
+
+# for each regular file contained in the directory
+# test if it's a .in file
+
+  for i in "$1"/*
+  do
+     if [ -f "$i" ] ; then
+       case $i in 
+         *.in) echo "  "$i" \\" >> $f;;
+         *) ;;
+        esac
+     fi
+  done
+
+# for each subdirectory of the first argument, proceeds recursively
+
+  for i in "$1"/*
+  do
+     if [ -d "$i" ] ; then
+        find_in "$i" "$f"
+     fi
+  done
+}
+
+
+#######################################################################
+# Generate list of .in files (Makefile.in, config.h.in, etc)
+# appending it in file configure.in
+
+cd ${CONF_DIR}
+ABS_CONF_DIR=`pwd`
+
+echo
+echo "CONF_DIR        : $CONF_DIR"
+echo "ABS_CONF_DIR    : $ABS_CONF_DIR"
+echo "KERNEL_ROOT_DIR : $KERNEL_ROOT_DIR"
+echo "ROOT_SRCDIR     : $ROOT_SRCDIR"
+echo
+
+#
+# Common part of the configure.in file
+#
+chmod u+w configure.in.base
+if ! \cp -f configure.in.base configure.in_tmp1 
+then
+       echo
+       echo "error : can't create files in" ${CONF_DIR}
+       echo "aborting ..."
+        chmod u-w configure.in.base 
+       exit
+fi
+chmod u-w configure.in.base 
+
+if [ -e "${CONF_DIR}/salome_adm" ] ; then
+    echo "salome_adm file exists in the current directory"
+    \rm -f ${CONF_DIR}/salome_adm
+fi
+
+# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in  files
+echo "" >> configure.in_tmp1
+echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1
+
+echo  "" >> configure.in_tmp1
+echo "AC_OUTPUT([ \\" >> configure.in_tmp1
+
+#
+# List of .in files in the adm/unix directory
+# These files MUST be on top of AC_OUTPUT list so we
+# put them "manually"
+#
+
+echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
+echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
+
+\rm -f configure.in_tmp2 configure.in_tmp3
+touch configure.in_tmp2
+find_in . configure.in_tmp2
+
+sed -e '/^...salome_adm/d' configure.in_tmp2 >  configure.in_tmp3
+sed -e '/^...adm_local.unix.make_omniorb/d' configure.in_tmp3 configure.in_tmp2
+sed -e '/^...adm_local.unix.make_commence/d' configure.in_tmp2 > configure.in_tmp3
+sed -e '/configure.in/d' configure.in_tmp3 >  configure.in_tmp2
+sed -e 's/.in / /' configure.in_tmp2 >>  configure.in_tmp1
+#sed '/^.salome_adm/d' configure.in_tmp2 >  configure.in_tmp3
+#sed '/configure.in/d' configure.in_tmp3 >  configure.in_tmp2
+#sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
+
+echo  "])" >> configure.in_tmp1
+
+# delete the link created for AC_OUTPUT
+echo "" >> configure.in_tmp1
+#echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
+
+\mv configure.in_tmp1 configure.in_new
+\rm  -f configure.in_tmp2 configure.in_tmp3
+
+########################################################################
+# Create new (or replace old) configure.in file
+# Print a message if the file is write protected
+#
+
+echo
+if test ! -f configure.in
+then
+       echo -n "Creating new file 'configure.in' ... "
+       if \mv configure.in_new configure.in >& /dev/null
+       then
+               echo "done"
+       else
+               echo "error, check your file permissions"
+       fi
+else
+       echo -n "Updating 'configure.in' file ... "
+       if ! \cp configure.in configure.in_old >& /dev/null
+       then
+               echo
+               echo
+               echo "Can't backup previous configure.in"
+               echo -n "Continue (you will not be able to revert) - (Y/N) ? "
+               read R
+                case "x$R" in
+                   xn*) exit;;
+                   xN*) exit;;
+               esac
+               echo
+               echo -n "                                 "
+       fi
+       if \cp configure.in_new configure.in >& /dev/null
+       then
+               echo "done"
+       else
+               echo
+               echo "error, can't update previous configure.in"
+       fi
+fi
+
+########################################################################
+# Use autoconf to rebuild the configure script
+#
+
+if test -f configure
+then
+       echo -n "Updating 'configure' script ...  "
+else
+       echo -n "Creating 'configure' script ...  "
+fi
+
+aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                                       -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+                                       -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+                                       -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+                                       -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files 
+
+if autoconf
+then
+       echo "done"
+else
+       echo "failed (check file permissions and/or user quotas ...)"
+fi
+
+cd ${ORIG_DIR}
+
+echo
diff --git a/configure.in.base b/configure.in.base
new file mode 100755 (executable)
index 0000000..16bce0b
--- /dev/null
@@ -0,0 +1,435 @@
+#
+#  PLEASE DO NOT MODIFY configure.in FILE
+#
+#  ALL CHANGES WILL BE DISCARDED BY THE NEXT
+#  build_configure COMMAND
+#
+#  CHANGES MUST BE MADE IN configure.in.base FILE
+#
+#
+# Author : Christian VAN WAMBEKE (CEA)
+# Date : 2007/02/01
+# Modified by : Patrick GOLDBRONN (CEA)
+# Modified by : Marc Tajchman (CEA)
+#
+# Created from configure.in.base
+#
+
+AC_INIT(src)
+AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
+AC_CANONICAL_HOST
+
+PACKAGE=salome
+AC_SUBST(PACKAGE)
+
+VERSION=0.0.1
+AC_SUBST(VERSION)
+
+dnl
+dnl Initialize source and build root directories
+dnl
+
+ROOT_BUILDDIR=`pwd`
+ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+cd $ROOT_SRCDIR
+ROOT_SRCDIR=`pwd`
+cd $ROOT_BUILDDIR
+
+AC_SUBST(ROOT_SRCDIR)
+AC_SUBST(ROOT_BUILDDIR)
+
+echo
+echo Source root directory : $ROOT_SRCDIR
+echo Build  root directory : $ROOT_BUILDDIR
+echo
+echo
+
+if test -z "$AR"; then
+   AC_CHECK_PROGS(AR,ar xar,:,$PATH)
+fi
+AC_SUBST(AR)
+
+dnl Export the AR macro so that it will be placed in the libtool file
+dnl correctly.
+export AR
+
+echo
+echo ---------------------------------------------
+echo testing make
+echo ---------------------------------------------
+echo
+
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+dnl
+dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + pour les librairies dynamiques !
+
+AC_ENABLE_DEBUG(yes)
+AC_DISABLE_PRODUCTION
+
+echo ---------------------------------------------
+echo testing libtool
+echo ---------------------------------------------
+
+dnl first, we set static to no!
+dnl if we want it, use --enable-static
+AC_ENABLE_STATIC(no)
+
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+dnl Fix up the INSTALL macro if it s a relative path. We want the
+dnl full-path to the binary instead.
+case "$INSTALL" in
+   *install-sh*)
+      INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+      ;;
+esac
+
+echo
+echo ---------------------------------------------
+echo testing C/C++
+echo ---------------------------------------------
+echo
+
+cc_ok=no
+dnl inutil car libtool
+dnl AC_PROG_CC
+AC_PROG_CXX
+AC_DEPEND_FLAG
+# AC_CC_WARNINGS([ansi])
+cc_ok=yes
+
+dnl Library libdl :
+AC_CHECK_LIB(dl,dlopen)
+
+dnl add library libm :
+AC_CHECK_LIB(m,ceil)
+
+dnl
+dnl Well we use sstream which is not in gcc pre-2.95.3
+dnl We must test if it exists. If not, add it in include !
+dnl
+
+AC_CXX_HAVE_SSTREAM
+
+dnl
+dnl ---------------------------------------------
+dnl testing MPICH
+dnl ---------------------------------------------
+dnl
+
+CHECK_MPICH
+
+echo
+echo ---------------------------------------------
+echo testing LEX \& YACC
+echo ---------------------------------------------
+echo
+
+lex_yacc_ok=no
+AC_PROG_YACC
+AC_PROG_LEX
+lex_yacc_ok=yes
+
+echo
+echo ---------------------------------------------
+echo testing python
+echo ---------------------------------------------
+echo
+
+CHECK_PYTHON
+
+echo
+echo ---------------------------------------------
+echo BOOST Library
+echo ---------------------------------------------
+echo
+
+CHECK_BOOST
+
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing java
+dnl echo ---------------------------------------------
+dnl echo
+
+dnl CHECK_JAVA
+
+echo
+echo ---------------------------------------------
+echo testing swig
+echo ---------------------------------------------
+echo
+
+CHECK_SWIG
+
+echo
+echo ---------------------------------------------
+echo testing threads
+echo ---------------------------------------------
+echo
+
+ENABLE_PTHREADS
+
+echo
+echo ---------------------------------------------
+echo testing omniORB
+echo ---------------------------------------------
+echo
+
+CHECK_OMNIORB
+
+dnl echo
+dnl echo ---------------------------------------------
+dnl echo testing mico
+dnl echo ---------------------------------------------
+dnl echo
+
+dnl CHECK_MICO
+
+echo
+echo ---------------------------------------------
+echo default ORB : omniORB
+echo ---------------------------------------------
+echo
+
+DEFAULT_ORB=omniORB
+CHECK_CORBA
+
+AC_SUBST_FILE(CORBA)
+corba=make_$ORB
+CORBA=adm_local/unix/$corba
+
+echo
+echo ---------------------------------------------
+echo testing openGL
+echo ---------------------------------------------
+echo
+
+CHECK_OPENGL
+
+echo
+echo ---------------------------------------------
+echo testing QT
+echo ---------------------------------------------
+echo
+
+CHECK_QT
+
+echo
+echo ---------------------------------------------
+echo testing MSG2QM
+echo ---------------------------------------------
+echo
+
+CHECK_MSG2QM
+
+echo
+echo ---------------------------------------------
+echo testing VTK
+echo ---------------------------------------------
+echo
+
+CHECK_VTK
+
+echo
+echo ---------------------------------------------
+echo testing HDF5
+echo ---------------------------------------------
+echo
+
+CHECK_HDF5
+
+echo
+echo ---------------------------------------------
+echo testing MED2
+echo ---------------------------------------------
+echo
+
+CHECK_MED2
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+CHECK_CAS
+
+echo
+echo ---------------------------------------------
+echo Testing html generators
+echo ---------------------------------------------
+echo
+
+CHECK_HTML_GENERATORS
+
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_SALOME_GUI
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+CHECK_CORBA_IN_GUI
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+  echo "failed : For configure GHS3DPRLPLUGIN module necessary full GUI !"
+  exit
+fi
+
+echo
+echo ---------------------------------------------
+echo Testing Kernel
+echo ---------------------------------------------
+echo
+
+CHECK_KERNEL
+
+echo
+echo ---------------------------------------------
+echo Testing Geom
+echo ---------------------------------------------
+echo
+
+CHECK_GEOM
+
+# echo
+# echo ---------------------------------------------
+# echo Testing Med
+# echo ---------------------------------------------
+# echo
+#
+# CHECK_MED
+
+echo
+echo ---------------------------------------------
+echo Testing GHS3DPRL
+echo ---------------------------------------------
+echo
+
+CHECK_GHS3DPRL
+
+echo
+echo ---------------------------------------------
+echo Testing SMesh
+echo ---------------------------------------------
+echo
+
+CHECK_SMESH
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+echo Configure
+variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok GHS3DPRL_ok"
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+dnl generals files which could be included in every makefile
+
+AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence
+AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
+AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
+
+dnl les dependences
+AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
+
+dnl We don t need to say when we re entering directories if we re using
+dnl GNU make becuase make does it for us.
+if test "X$GMAKE" = "Xyes"; then
+   AC_SUBST(SETX) SETX=":"
+else
+   AC_SUBST(SETX) SETX="set -x"
+fi
+
+# make other build directories
+for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl
+do
+#   if test ! -d $rep ; then
+#      eval mkdir $rep
+#   fi
+    $INSTALL -d $rep
+done
+
+echo
+echo ---------------------------------------------
+echo copying resource files, shell scripts, and
+echo xml files
+echo ---------------------------------------------
+echo
+
+
+dnl copy resources directories
+
+#for i in `find $ROOT_SRCDIR -name 'resources' -print`
+#do
+#  local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
+#  local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+#  mkdir -p $local_res_dir
+#  cd $local_res_dir
+#  ln -fs $i
+#  echo $local_res
+#  cd $ROOT_BUILDDIR
+#done
+
+dnl copy shells and utilities contained in the bin directory
+dnl excluding .in files (treated in AC-OUTPUT below) and CVS
+dnl directory
+
+#mkdir -p bin/salome
+#cd bin/salome
+#for i in $ROOT_SRCDIR/bin/*
+#do
+#  local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
+#  case "$local_bin" in
+#        *.in | *~)                    ;;
+#        ./bin/CVS | ./bin/salome)                    ;;
+#        *) /usr/bin/install -C $i .; echo $local_bin ;;
+#  esac
+#done
+#cd $ROOT_BUILDDIR
+
+AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript
+
+dnl copy xml files to the build tree (lib directory)
+dnl pourquoi ????
+
+#cd lib
+#for i in `find $ROOT_SRCDIR -name "*.xml" -print`
+#do
+#  ln -fs $i
+#  echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
+#done
+#cd $ROOT_BUILDDIR
+
+
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+#AC_OUTPUT_COMMANDS([ \
+#      chmod +x ./bin/* \
+#])
+
+## do not delete this line
diff --git a/env_GHS3DPRLplugin-Src.sh b/env_GHS3DPRLplugin-Src.sh
new file mode 100755 (executable)
index 0000000..8f3c0c3
--- /dev/null
@@ -0,0 +1,3 @@
+#------ GHS3DPRLplugin-Src ------
+export GHS3DPRLPLUGIN_SRC_DIR=${INSTALL_ROOT}/GHS3DPRLPLUGIN_SRC_NEW
+##
diff --git a/idl/GHS3DPRLPlugin_Algorithm.idl b/idl/GHS3DPRLPlugin_Algorithm.idl
new file mode 100755 (executable)
index 0000000..c5105f3
--- /dev/null
@@ -0,0 +1,59 @@
+//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File    : GHS3DPRLPlugin_Algorithm.idl
+//  Author  : Christian VAN WAMBEKE (CEA)
+
+#ifndef _SMESH_GHS3DPRLALGORITHM_IDL_
+#define _SMESH_GHS3DPRLALGORITHM_IDL_
+
+#include "SMESH_Hypothesis.idl"
+
+/*!
+ * GHS3DPRLPlugin: interfaces to GHS3DPRL related hypotheses and algorithms
+ */
+module GHS3DPRLPlugin
+{
+  /*!
+   * GHS3DPRLPlugin_GHS3DPRL: interface of GHS3DPRL algorithm
+   */
+  interface GHS3DPRLPlugin_GHS3DPRL : SMESH::SMESH_3D_Algo
+  {
+  };
+
+  /*!
+   * GHS3DPRLPlugin_Hypothesis: interface of "GHS3DPRL parameters" hypothesis
+   */
+  interface GHS3DPRLPlugin_Hypothesis : SMESH::SMESH_Hypothesis
+  {
+    void SetMEDName(in string value);
+    string GetMEDName();
+
+    void SetNbPart(in long value);
+    long GetNbPart();
+
+    void SetKeepFiles(in boolean value);
+    boolean GetKeepFiles();
+  };
+
+};
+
+#endif
diff --git a/idl/Makefile.in b/idl/Makefile.in
new file mode 100755 (executable)
index 0000000..0fa27a4
--- /dev/null
@@ -0,0 +1,84 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+#
+# generate dependencies for idl file :
+#
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=..
+srcdir=@srcdir@
+VPATH=.:${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome :${SMESH_ROOT_DIR}/idl/salome
+#:${MED_ROOT_DIR}/idl/salome
+
+@COMMENCE@
+
+IDL_FILES = GHS3DPRLPlugin_Algorithm.idl
+
+
+# copy all idl file in $(top_builddir)/idl
+inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
+
+$(top_builddir)/idl/salome:
+       $(INSTALL) -d $@
+
+$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
+       cp -f $^ $(top_builddir)/idl/salome
+
+
+# python wrap
+lib: pyidl
+
+PYTHON_BUILD_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
+
+pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
+
+$(PYTHON_BUILD_SITE):
+       $(INSTALL) -d  $@
+
+$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
+       $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
+
+
+# install python client (generated from idl file)
+install: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
+       $(INSTALL) -d  $(idldir) $(PYTHON_SITE_INSTALL)
+       $(INSTALL_DATA) $^ $(idldir)
+       @for file in $^ dummy; do \
+         if [ $$file != "dummy" ]; then \
+           $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
+         fi ; \
+       done ;
+
+uninstall:
+       -$(RM) $(IDL_FILES:%=$(idldir)/%)
+       -$(RM) $(IDL_FILES:%.idl=$(PYTHON_SITE_INSTALL)/%_idl.py)
+
+# clean
+cleandep:
+       -$(RM) .dep*
+
+clean: cleandep
+       -$(RM) $(top_builddir)/idl/salome/*.idl
+       -$(RM) $(PYTHON_BUILD_SITE)/*.py
+
+distclean: clean
+       -$(RM) Makefile
+
diff --git a/install b/install
new file mode 100755 (executable)
index 0000000..23602e6
--- /dev/null
+++ b/install
@@ -0,0 +1,5 @@
+This is the version 3.2.0 of GHS3DPRLPLUGIN
+Compatible with :
+       - KERNEL 3.2.0
+       - GUI 3.2.0
+        - SMESH 3.2.0
diff --git a/resources/GHS3DPRL.png b/resources/GHS3DPRL.png
new file mode 100755 (executable)
index 0000000..487fdb7
Binary files /dev/null and b/resources/GHS3DPRL.png differ
diff --git a/resources/GHS3DPRLPLUGIN.xml b/resources/GHS3DPRLPLUGIN.xml
new file mode 100755 (executable)
index 0000000..6eaa2f6
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='us-ascii'?>
+<!DOCTYPE meshers PUBLIC "" "desktop.dtd">
+
+<!--  GUI customization for GHS3DPRL Plugin  -->
+
+<meshers>
+
+<meshers-group name="GHS3DPRL"
+               resources="GHS3DPRLPlugin"
+               server-lib="libGHS3DPRLEngine.so"
+               gui-lib="libGHS3DPRLPluginGUI.so">
+  <hypotheses>
+    <hypothesis type="GHS3DPRL_Parameters"
+               label-id="GHS3DPRL Parameters"
+               icon-id="mesh_hypo_GHS3DPRL.png"
+               dim="3"/>
+  </hypotheses>
+  <algorithms>
+    <algorithm type="GHS3DPRL_3D"
+               label-id="GHS3DPRL"
+               icon-id="mesh_algo_GHS3DPRL.png"
+               hypos="GHS3DPRL_Parameters"
+               input="TRIA,QUAD"
+               dim="3"/>
+  </algorithms>
+</meshers-group>
+
+</meshers>
diff --git a/resources/mesh_algo_GHS3DPRL.png b/resources/mesh_algo_GHS3DPRL.png
new file mode 100755 (executable)
index 0000000..2629a2b
Binary files /dev/null and b/resources/mesh_algo_GHS3DPRL.png differ
diff --git a/resources/mesh_hypo_GHS3DPRL.png b/resources/mesh_hypo_GHS3DPRL.png
new file mode 100755 (executable)
index 0000000..487fdb7
Binary files /dev/null and b/resources/mesh_hypo_GHS3DPRL.png differ
diff --git a/resources/mesh_tree_algo_GHS3DPRL.png b/resources/mesh_tree_algo_GHS3DPRL.png
new file mode 100755 (executable)
index 0000000..092eae3
Binary files /dev/null and b/resources/mesh_tree_algo_GHS3DPRL.png differ
diff --git a/resources/mesh_tree_hypo_GHS3DPRL.png b/resources/mesh_tree_hypo_GHS3DPRL.png
new file mode 100755 (executable)
index 0000000..cd813c8
Binary files /dev/null and b/resources/mesh_tree_hypo_GHS3DPRL.png differ
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx
new file mode 100755 (executable)
index 0000000..46f7df4
--- /dev/null
@@ -0,0 +1,554 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File    : GHS3DPRLPlugin_GHS3DPRL.cxx
+// Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date    : 2007/02/01
+// Project : SALOME
+//=============================================================================
+using namespace std;
+
+#include "GHS3DPRLPlugin_GHS3DPRL.hxx"
+#include "GHS3DPRLPlugin_Hypothesis.hxx"
+// #include "GHS3DPRLPlugin_Mesher.hxx"
+
+#include "SMDS_MeshElement.hxx"
+#include "SMDS_MeshNode.hxx"
+
+#include <TopExp_Explorer.hxx>
+#include <OSD_File.hxx>
+
+#include "utilities.h"
+
+#ifndef WIN32
+#include <sys/sysinfo.h>
+#endif
+
+#ifdef _DEBUG_
+#define DUMP(txt) \
+//  cout << txt
+#else
+#define DUMP(txt)
+#endif
+
+#include <SMESH_Gen.hxx>
+#include <SMESHDS_Mesh.hxx>
+#include <SMESH_ControlsDef.hxx>
+
+#include <list>
+#include <TCollection_AsciiString.hxx>
+
+//=============================================================================
+
+GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL(int hypId, int studyId, SMESH_Gen* gen)
+  : SMESH_3D_Algo(hypId, studyId, gen)
+{
+  MESSAGE("GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL");
+  _name = "GHS3DPRL_3D";
+  _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
+  _countSubMesh=0;
+  _nodeRefNumber=0;
+  _compatibleHypothesis.push_back("GHS3DPRL_Parameters");
+}
+
+//=============================================================================
+
+GHS3DPRLPlugin_GHS3DPRL::~GHS3DPRLPlugin_GHS3DPRL()
+{
+  MESSAGE("GHS3DPRLPlugin_GHS3DPRL::~GHS3DPRLPlugin_GHS3DPRL");
+}
+
+//=============================================================================
+
+bool GHS3DPRLPlugin_GHS3DPRL::CheckHypothesis
+                         (SMESH_Mesh& aMesh,
+                          const TopoDS_Shape& aShape,
+                          SMESH_Hypothesis::Hypothesis_Status& aStatus)
+{
+  MESSAGE("GHS3DPRLPlugin_GHS3DPRL::CheckHypothesis");
+
+  _hypothesis = NULL;
+
+  list<const SMESHDS_Hypothesis*>::const_iterator itl;
+  const SMESHDS_Hypothesis* theHyp;
+
+  const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape);
+  int nbHyp = hyps.size();
+  if (!nbHyp)
+  {
+    aStatus = SMESH_Hypothesis::HYP_OK;
+    return true;  // can work with no hypothesis
+  }
+
+  itl = hyps.begin();
+  theHyp = (*itl); // use only the first hypothesis
+
+  string hypName = theHyp->GetName();
+  if (hypName == "GHS3DPRL_Parameters")
+  {
+    _hypothesis = static_cast<const GHS3DPRLPlugin_Hypothesis*> (theHyp);
+    ASSERT(_hypothesis);
+    aStatus = SMESH_Hypothesis::HYP_OK;
+  }
+  else
+    aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
+
+  return aStatus == SMESH_Hypothesis::HYP_OK;
+}
+
+//=======================================================================
+
+static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
+                                SMESHDS_Mesh *                   theMesh,
+                                map <int,int> &                  theSmdsToGHS3DPRLIdMap,
+                                map <int,const SMDS_MeshNode*> & theGHS3DPRLIdToNodeMap)
+{
+   bool Ok;
+   TCollection_AsciiString namefile(GHS3DPRL_In);
+   namefile+=".points";
+   OSD_File(namefile).Remove();
+   ofstream theFile;
+   theFile.open(namefile.ToCString(),ios::out);
+#ifdef WIN32
+   Ok=theFile->is_open();
+#else
+   Ok=theFile.rdbuf()->is_open();
+#endif
+   if (!Ok)
+   {
+      INFOS("Can't write into "<<namefile.ToCString());
+      return false;
+   }
+   cout<<endl<<"Creating GHS3DPRL processed mesh file : "<<namefile<<endl;
+
+   int nbVertices=theMesh->NbNodes();
+   int nbFaces=theMesh->NbFaces();        //triangles or quadrangles
+   const char* space="  ";
+   const int dummyint=1;                  //nrs,nsd,refnum=1 (for wrap)
+
+   // Writing SMESH points into GHS3DPRL File.points
+   theFile<<nbVertices<<endl;
+
+   int aSmdsNodeID = 1;
+   const SMDS_MeshNode* node_2;
+   SMDS_NodeIteratorPtr itOnNode = theMesh->nodesIterator();
+   while (itOnNode->more())
+   {
+      node_2 = itOnNode->next();
+      theSmdsToGHS3DPRLIdMap.insert(map <int,int>::value_type(node_2->GetID(),aSmdsNodeID));
+      theGHS3DPRLIdToNodeMap.insert(map <int,const SMDS_MeshNode*>::value_type(aSmdsNodeID,node_2));
+      aSmdsNodeID++;
+      theFile<<node_2->X()<<space<<node_2->Y()<<space<<node_2->Z()<<space<<dummyint<<endl;
+   }
+   //no specified points;
+   theFile.close();
+
+   namefile=GHS3DPRL_In+".faces";
+   OSD_File(namefile).Remove();
+   theFile.open(namefile.ToCString(),ios::out);
+#ifdef WIN32
+   Ok=theFile->is_open();
+#else
+   Ok=theFile.rdbuf()->is_open();
+#endif
+   if (!Ok)
+   {
+      INFOS("Can't write into "<<namefile.ToCString());
+      return false;
+   }
+   cout<<endl<<"Creating GHS3DPRL processed mesh file : "<<namefile<<endl;
+
+   // Writing SMESH faces into GHS3DPRL File.faces
+   theFile<<nbFaces<<" 0"<<endl;   //NB_ELEMS DUMMY_INT
+                                   //" 0" is a reserved parameter
+
+   const SMDS_MeshElement* aFace;
+   map<int,int>::const_iterator itOnSmdsNode;
+   SMDS_ElemIteratorPtr itOnFaceNode;
+   SMDS_FaceIteratorPtr itOnSmdsFace = theMesh->facesIterator();
+   long nbNoTriangles=0;
+   while (itOnSmdsFace->more())
+   {
+      aFace=itOnSmdsFace->next();
+      itOnFaceNode=aFace->nodesIterator();
+      const int nbNodes=aFace->NbNodes();
+      if (nbNodes!=3) nbNoTriangles++;
+      theFile<<nbNodes<<space;        // NB_NODES
+      while (itOnFaceNode->more())
+      {
+          aSmdsNodeID=itOnFaceNode->next()->GetID();
+          itOnSmdsNode=theSmdsToGHS3DPRLIdMap.find(aSmdsNodeID);
+          ASSERT(itOnSmdsNode!=theSmdsToGHS3DPRLIdMap.end());
+          theFile<<space<<(*itOnSmdsNode).second; //NODE_1 NODE_2 ...
+      }
+      //(NB_NODES+1) times: DUMMY_INT
+      for ( int i=0; i<=nbNodes; i++) theFile<<space<<dummyint;
+      theFile<<endl;
+   }
+   theFile.close();
+
+   cout<<"Processed mesh files created, they contains :\n";
+   cout<<"    "<<nbVertices<<" vertices\n";
+   if (nbNoTriangles==0)
+      cout<<"    "<<nbFaces<<" faces\n\n";
+   else
+      cout<<"    "<<nbFaces<<" faces with "<<nbNoTriangles<<"faces no triangles\n\n";
+   return true;
+}
+
+//=======================================================================
+
+static bool getInt( int & theValue, char * & theLine )
+{
+  char *ptr;
+  theValue = strtol( theLine, &ptr, 10 );
+  if ( ptr == theLine ||
+      // there must not be neither '.' nor ',' nor 'E' ...
+      (*ptr != ' ' && *ptr != '\n' && *ptr != '\0'))
+    return false;
+
+  DUMP( "  " << theValue );
+  theLine = ptr;
+  return true;
+}
+
+//=======================================================================
+
+static bool getDouble( double & theValue, char * & theLine )
+{
+  char *ptr;
+  theValue = strtod( theLine, &ptr );
+  if ( ptr == theLine )
+    return false;
+
+  DUMP( "   " << theValue );
+  theLine = ptr;
+  return true;
+}
+
+//=======================================================================
+
+#define GHS3DPRLPlugin_BUFLENGTH 256
+#define GHS3DPRLPlugin_ReadLine(aPtr,aBuf,aFile,aLineNb) \
+{  aPtr = fgets( aBuf, GHS3DPRLPlugin_BUFLENGTH - 2, aFile ); aLineNb++; DUMP(endl); }
+
+//=======================================================================
+
+static bool readResult(FILE *                           theFile,
+                       SMESHDS_Mesh *                   theMesh,
+                       const TopoDS_Shape &             theShape,
+                       map <int,const SMDS_MeshNode*> & theGHS3DPRLIdToNodeMap,
+                       const TCollection_AsciiString &  GHS3DPRL_Out,
+                       int &                            nodeRefNumber)
+{
+  // ---------------------------------
+  // Read generated elements and nodes
+  // ---------------------------------
+
+  cout << "Reading GHS3DPRL output file : " << GHS3DPRL_Out << endl;
+  cout << endl;
+
+  char aBuffer[ GHS3DPRLPlugin_BUFLENGTH ];
+  char * aPtr;
+  int aLineNb = 0;
+  int shapeID = theMesh->ShapeToIndex( theShape );
+
+  int line = 1, EndOfFile = 0, nbElem = 0, nField = 10, nbRef = 0, aGHS3DPRLNodeID = 0;
+  char * theField;
+
+  char * tabField [nField];
+  int    tabRef [nField];
+
+  tabField[0] = "MeshVersionFormatted";    tabRef[0] = 0;
+  tabField[1] = "Dimension";               tabRef[1] = 0;
+  tabField[2] = "Vertices";                tabRef[2] = 3;
+  tabField[3] = "Edges";                   tabRef[3] = 2;
+  tabField[4] = "Triangles";               tabRef[4] = 3;
+  tabField[5] = "Quadrilaterals";          tabRef[5] = 4;
+  tabField[6] = "Hexahedra";               tabRef[6] = 8;
+  tabField[7] = "Corners";                 tabRef[7] = 1;
+  tabField[8] = "Ridges";                  tabRef[0] = 1;
+  tabField[9] = "End";                     tabRef[0] = 0;
+
+  nodeRefNumber += theMesh->NbNodes();
+
+  SMDS_NodeIteratorPtr itOnGHS3DPRLInputNode = theMesh->nodesIterator();
+  while ( itOnGHS3DPRLInputNode->more() )
+      theMesh->RemoveNode( itOnGHS3DPRLInputNode->next() );
+
+  while ( EndOfFile == 0  ) {
+      GHS3DPRLPlugin_ReadLine( aPtr, aBuffer, theFile, aLineNb );
+      for ( int iField = 0; iField < nField; iField++ ) {
+          stringstream theMessage;
+          theField = tabField[iField];
+          if ( strncmp(aPtr, theField, strlen(theField)) == 0 ) {
+              if ( strcmp(theField, "End") == 0 ) {
+                  EndOfFile = 1;
+                  theMessage << "End of GHS3DPRL output file has been reached";
+              }
+              else {
+                  GHS3DPRLPlugin_ReadLine( aPtr, aBuffer, theFile, aLineNb );
+                  line++;
+                  getInt( nbElem, aPtr );
+
+                  if ( strcmp(theField, "MeshVersionFormatted") == 0 )
+                      theMessage << "GHS3DPRL mesh descriptor : " << theField << " " << nbElem;
+                  else if ( strcmp(theField, "Dimension") == 0 )
+                      theMessage << "GHS3DPRL mesh of " << nbElem << "D dimension";
+                  else if ( strcmp(theField, "Vertices")       == 0 ||
+                            strcmp(theField, "Edges")          == 0 ||
+                            strcmp(theField, "Quadrilaterals") == 0 ||
+                            strcmp(theField, "Hexahedra")      == 0 ) {
+                      nbRef = tabRef[iField];
+                      GHS3DPRLPlugin_ReadLine( aPtr, aBuffer, theFile, aLineNb );           // read blank line
+
+                      if ( strcmp(theField, "Vertices") == 0 ) {
+                          int aGHS3DPRLID;
+                          double coord[nbRef];
+                          SMDS_MeshNode * aGHS3DPRLNode;
+
+                          for ( int iElem = 0; iElem < nbElem; iElem++ ) {
+                              aGHS3DPRLID = iElem + 1 + nodeRefNumber;
+                              GHS3DPRLPlugin_ReadLine( aPtr, aBuffer, theFile, aLineNb );   // read file lines
+                              for ( int iCoord = 0; iCoord < 3; iCoord++ )
+                                  getDouble ( coord[ iCoord ], aPtr );
+                              aGHS3DPRLNode = theMesh->AddNode(coord[0], coord[1], coord[2]);
+                              theMesh->SetNodeInVolume( aGHS3DPRLNode, shapeID );
+                              theGHS3DPRLIdToNodeMap[ aGHS3DPRLID ] = aGHS3DPRLNode;
+                          }
+                      }
+                      else {
+                          const SMDS_MeshNode * node[nbRef];
+                          SMDS_MeshElement* aGHS3DPRLElement;
+                          map <int,const SMDS_MeshNode*>::iterator itOnGHS3DPRLNode;
+
+                          for ( int iElem = 0; iElem < nbElem; iElem++ ) {
+                              GHS3DPRLPlugin_ReadLine( aPtr, aBuffer, theFile, aLineNb );   // read file lines
+                              for ( int iRef = 0; iRef < nbRef; iRef++ ) {
+                                  getInt ( aGHS3DPRLNodeID, aPtr );                         // read nbRef aGHS3DPRLNodeID
+                                  aGHS3DPRLNodeID += nodeRefNumber;
+                                  itOnGHS3DPRLNode = theGHS3DPRLIdToNodeMap.find( aGHS3DPRLNodeID );
+                                  node[ iRef ] = itOnGHS3DPRLNode->second;
+                              }
+
+                              if ( strcmp(theField, "Edges") == 0 )                        // create an element
+                                  aGHS3DPRLElement = theMesh->AddEdge( node[0], node[1] );
+                              else if ( strcmp(theField, "Quadrilaterals") == 0 )
+                                  aGHS3DPRLElement = theMesh->AddFace( node[0], node[1], node[2], node[3] );
+                              else if ( strcmp(theField, "Hexahedra") == 0 )
+                                  aGHS3DPRLElement = theMesh->AddVolume( node[0], node[1], node[2], node[3], node[4], node[5], node[6], node[7] );
+
+                              theMesh->SetMeshElementOnShape( aGHS3DPRLElement, shapeID );
+                          }
+                      }
+                      theMessage << nbElem << " " << theField << " created";
+                  }
+              }
+              if ( theMessage.str().size() != 0 ) {
+                  cout << theMessage.str() << endl;
+                  break;
+              }
+          }
+      }
+  }
+  cout << endl;
+  return true;
+}
+
+//=============================================================================
+// Pass parameters to GHS3DPRL
+
+void GHS3DPRLPlugin_GHS3DPRL::SetParameters(const GHS3DPRLPlugin_Hypothesis* hyp) {
+  if (hyp) {
+    MESSAGE("GHS3DPRLPlugin_GHS3DPRL::SetParameters");
+    _MEDName = hyp->GetMEDName();  //"DOMAIN\0"
+    _NbPart = hyp->GetNbPart();
+    _KeepFiles = hyp->GetKeepFiles();
+  }
+}
+
+//=======================================================================
+
+static TCollection_AsciiString getTmpDir()
+{
+  TCollection_AsciiString aTmpDir;
+
+  char *Tmp_dir = getenv("SALOME_TMP_DIR");
+  if (Tmp_dir == NULL) Tmp_dir = getenv("TMPDIR");
+  if(Tmp_dir != NULL)
+  {
+    aTmpDir = Tmp_dir;
+#ifdef WIN32
+      if(aTmpDir.Value(aTmpDir.Length()) != '\\') aTmpDir+='\\';
+#else
+      if(aTmpDir.Value(aTmpDir.Length()) != '/') aTmpDir+='/';
+#endif
+  }
+  else
+  {
+#ifdef WIN32
+      aTmpDir = TCollection_AsciiString("C:\\");
+#else
+      aTmpDir = TCollection_AsciiString("/export/home/");
+#endif
+  }
+  //cout<<"getTmpDir()="<<aTmpDir<<endl;
+  return aTmpDir;
+}
+
+//=============================================================================
+// Here we are going to use the GHS3DPRL mesher
+
+bool GHS3DPRLPlugin_GHS3DPRL::Compute(SMESH_Mesh&          theMesh,
+                                     const TopoDS_Shape& theShape) {
+
+
+   bool Ok;
+   MESSAGE("GHS3DPRLPlugin_GHS3DPRL::Compute");
+
+   if (_hypothesis==NULL)
+   {
+      Ok = false;
+      cout <<"\nNo existing parameters/hypothesis for GHS3DPRL!\n\n";
+      return Ok;
+   }
+   SetParameters(_hypothesis);
+
+  cout << endl;
+  cout << _name << " parameters :" << endl;
+  cout << "     generic path/name of MED Files = " << _MEDName << endl;
+  cout << "     number of partitions = " << _NbPart << endl;
+  cout << "     keep intermediates files (from tepal) = " << _KeepFiles << endl;
+  cout << endl;
+
+  SMESHDS_Mesh* meshDS = theMesh.GetMeshDS();
+
+  if (_countSubMesh==0)
+  {
+      _countTotal=0;
+      TopExp_Explorer expf(meshDS->ShapeToMesh(), TopAbs_SOLID);
+      for ( ; expf.More(); expf.Next() )
+          _countTotal++;
+  }
+
+  _countSubMesh++;
+
+  if (_countSubMesh == _countTotal )
+  {
+      TCollection_AsciiString
+         tmpDir=getTmpDir(),
+         GHS3DPRL_In,
+         GHS3DPRL_Out,
+         NbPart,
+         run_GHS3DPRL("tepal2med "),
+         run_keep_files("rm ");
+
+      //example: tepal2med GHS3DPRL 4 12500000 4 Test noMemu LaunchTepal
+
+      TCollection_AsciiString path;
+      TCollection_AsciiString casenamemed;//_MEDName.c_str());
+      casenamemed += (char *)_MEDName.c_str();
+      int n=casenamemed.SearchFromEnd('/');
+      if (n>0)
+      {
+         path=casenamemed.SubString(1,n);
+         casenamemed=casenamemed.SubString(n+1,casenamemed.Length());
+      }
+      else
+         path=tmpDir;
+
+      if (casenamemed.Length()>20)
+      {
+         casenamemed=casenamemed.SubString(1,20);
+         cerr<<"MEDName truncated (no more 20 characters) = "<<casenamemed<<endl;
+      }
+      cout<<"path="<<path<<endl;
+      cout<<"casenamemed="<<casenamemed<<endl;
+
+      map <int,int> aSmdsToGHS3DPRLIdMap;
+      map <int,const SMDS_MeshNode*> aGHS3DPRLIdToNodeMap;
+      GHS3DPRL_In=path + "GHS3DPRL";
+      GHS3DPRL_Out=path + casenamemed;
+      NbPart=_NbPart;
+      run_GHS3DPRL += GHS3DPRL_In + " " + NbPart + " 12500000 1 Test noMemu LaunchTepal " + GHS3DPRL_Out;
+      run_keep_files += GHS3DPRL_In + ".*.*.* " + path + "tepal.out";
+      cout<<"GHS3DPRL command : "<<run_GHS3DPRL<<endl;
+
+      OSD_File( GHS3DPRL_Out ).Remove(); //only the master med file
+      Ok=writeGHS3DPRLFiles(GHS3DPRL_In, meshDS, aSmdsToGHS3DPRLIdMap, aGHS3DPRLIdToNodeMap);
+
+      if (Ok) system( run_GHS3DPRL.ToCString() );
+
+      // read a result, GHS3DPRL_Out is the name of master file (previous xml format)
+      FILE * aResultFile = fopen( GHS3DPRL_Out.ToCString(), "r" );
+      if (aResultFile)
+      {
+          //Ok = readResult( aResultFile, meshDS, theShape, aGHS3DPRLIdToNodeMap, GHS3DPRL_Out, _nodeRefNumber );
+          Ok = true;
+          fclose(aResultFile);
+          cout << "GHS3DPRL OK output file "<<GHS3DPRL_Out<<" exist !\n\n";
+          if (!_KeepFiles)
+          {
+             system( run_keep_files.ToCString() );
+          }
+      }
+      else
+      {
+          Ok = false;
+          cout << "GHS3DPRL KO output files "<<GHS3DPRL_Out<<" do not exist ! see intermediates files keeped:\n";
+          TCollection_AsciiString run_keep_files("ls -alt ");
+          run_keep_files += GHS3DPRL_Out + "* " + GHS3DPRL_In + "* " + path + "tepal.out";
+          system( run_keep_files.ToCString() );
+          cout<<endl;
+      }
+      _countSubMesh=0;
+
+  }
+  return Ok;
+}
+
+//=============================================================================
+
+ostream & GHS3DPRLPlugin_GHS3DPRL::SaveTo(ostream & save)
+{
+  return save;
+}
+
+//=============================================================================
+
+istream & GHS3DPRLPlugin_GHS3DPRL::LoadFrom(istream & load)
+{
+  return load;
+}
+
+//=============================================================================
+
+ostream & operator << (ostream & save, GHS3DPRLPlugin_GHS3DPRL & hyp)
+{
+  return hyp.SaveTo( save );
+}
+
+//=============================================================================
+
+istream & operator >> (istream & load, GHS3DPRLPlugin_GHS3DPRL & hyp)
+{
+  return hyp.LoadFrom( load );
+}
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx
new file mode 100755 (executable)
index 0000000..b98eb64
--- /dev/null
@@ -0,0 +1,70 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File    : GHS3DPRLPlugin_GHS3DPRL.hxx
+// Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date    : 2007/02/01
+// Project : SALOME
+//=============================================================================
+
+#ifndef _GHS3DPRLPlugin_GHS3DPRL_HXX_
+#define _GHS3DPRLPlugin_GHS3DPRL_HXX_
+
+#include "SMESH_3D_Algo.hxx"
+#include "SMESH_Mesh.hxx"
+#include "Utils_SALOME_Exception.hxx"
+
+class SMESH_Mesh;
+class GHS3DPRLPlugin_Hypothesis;
+
+class GHS3DPRLPlugin_GHS3DPRL: public SMESH_3D_Algo
+{
+public:
+  GHS3DPRLPlugin_GHS3DPRL(int hypId, int studyId, SMESH_Gen* gen);
+  virtual ~GHS3DPRLPlugin_GHS3DPRL();
+
+  virtual bool CheckHypothesis(SMESH_Mesh&                          aMesh,
+                               const TopoDS_Shape&                  aShape,
+                               SMESH_Hypothesis::Hypothesis_Status& aStatus);
+
+  void SetParameters(const GHS3DPRLPlugin_Hypothesis* hyp);
+
+  virtual bool Compute(SMESH_Mesh&         aMesh,
+                      const TopoDS_Shape& aShape);
+
+  ostream & SaveTo(ostream & save);
+  istream & LoadFrom(istream & load);
+  friend ostream & operator << (ostream & save, GHS3DPRLPlugin_GHS3DPRL & hyp);
+  friend istream & operator >> (istream & load, GHS3DPRLPlugin_GHS3DPRL & hyp);
+
+protected:
+  const GHS3DPRLPlugin_Hypothesis* _hypothesis;
+private:
+  int   _countSubMesh;
+  int   _countTotal;
+  int   _nodeRefNumber;
+
+  string _MEDName;    //number of partitions
+  int   _NbPart;      //number of partitions
+  bool  _KeepFiles;   //tepal file .noboite binary or not
+};
+
+#endif
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.cxx
new file mode 100755 (executable)
index 0000000..7179b48
--- /dev/null
@@ -0,0 +1,82 @@
+//  GHS3DPRLPlugin : idl implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//  File    : GHS3DPRLPlugin_GHS3DPRL_i.cxx
+//  Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module  : GHS3DPRLPlugin
+//  $Header :
+
+using namespace std;
+#include "GHS3DPRLPlugin_GHS3DPRL_i.hxx"
+#include "SMESH_Gen.hxx"
+#include "GHS3DPRLPlugin_GHS3DPRL.hxx"
+
+#include "Utils_CorbaException.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_GHS3DPRL_i::GHS3DPRLPlugin_GHS3DPRL_i
+ *
+ *  Constructor
+ */
+//=============================================================================
+
+GHS3DPRLPlugin_GHS3DPRL_i::GHS3DPRLPlugin_GHS3DPRL_i( PortableServer::POA_ptr thePOA,
+                                                  int                     theStudyId,
+                                                  ::SMESH_Gen*            theGenImpl )
+     : SALOME::GenericObj_i( thePOA ),
+       SMESH_Hypothesis_i( thePOA ),
+       SMESH_Algo_i( thePOA ),
+       SMESH_3D_Algo_i( thePOA )
+{
+  MESSAGE( "GHS3DPRLPlugin_GHS3DPRL_i::GHS3DPRLPlugin_GHS3DPRL_i" );
+  myBaseImpl = new ::GHS3DPRLPlugin_GHS3DPRL( theGenImpl->GetANewId(),
+                                            theStudyId,
+                                            theGenImpl );
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_GHS3DPRL_i::~GHS3DPRLPlugin_GHS3DPRL_i
+ *
+ *  Destructor
+ */
+//=============================================================================
+
+GHS3DPRLPlugin_GHS3DPRL_i::~GHS3DPRLPlugin_GHS3DPRL_i()
+{
+  MESSAGE( "GHS3DPRLPlugin_GHS3DPRL_i::~GHS3DPRLPlugin_GHS3DPRL_i" );
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_GHS3DPRL_i::GetImpl
+ *
+ *  Get implementation
+ */
+//=============================================================================
+
+::GHS3DPRLPlugin_GHS3DPRL* GHS3DPRLPlugin_GHS3DPRL_i::GetImpl()
+{
+  MESSAGE( "GHS3DPRLPlugin_GHS3DPRL_i::GetImpl" );
+  return ( ::GHS3DPRLPlugin_GHS3DPRL* )myBaseImpl;
+}
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.hxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.hxx
new file mode 100755 (executable)
index 0000000..5c4ec04
--- /dev/null
@@ -0,0 +1,56 @@
+//  GHS3DPRLPlugin : idl implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//  File    : GHS3DPRLPlugin_GHS3DPRL_i.hxx
+//  Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module  : GHS3DPRLPlugin
+//  $Header:
+
+#ifndef _GHS3DPRLPlugin_GHS3DPRL_I_HXX_
+#define _GHS3DPRLPlugin_GHS3DPRL_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GHS3DPRLPlugin_Algorithm)
+#include CORBA_SERVER_HEADER(SALOME_Exception)
+
+#include "SMESH_3D_Algo_i.hxx"
+#include "GHS3DPRLPlugin_GHS3DPRL.hxx"
+
+// ======================================================
+// GHS3DPRL 3d algorithm
+// ======================================================
+class GHS3DPRLPlugin_GHS3DPRL_i:
+  public virtual POA_GHS3DPRLPlugin::GHS3DPRLPlugin_GHS3DPRL,
+  public virtual SMESH_3D_Algo_i
+{
+public:
+  // Constructor
+  GHS3DPRLPlugin_GHS3DPRL_i (PortableServer::POA_ptr thePOA,
+                           int                     theStudyId,
+                           ::SMESH_Gen*            theGenImpl );
+  // Destructor
+  virtual ~GHS3DPRLPlugin_GHS3DPRL_i();
+
+  // Get implementation
+  ::GHS3DPRLPlugin_GHS3DPRL* GetImpl();
+};
+
+#endif
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.cxx
new file mode 100755 (executable)
index 0000000..866a76e
--- /dev/null
@@ -0,0 +1,201 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File      : GHS3DPRLPlugin_Hypothesis.cxx
+// Author    : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date      : 2007/02/01
+// Project   : SALOME
+//=============================================================================
+
+using namespace std;
+#include <GHS3DPRLPlugin_Hypothesis.hxx>
+#include <utilities.h>
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+GHS3DPRLPlugin_Hypothesis::GHS3DPRLPlugin_Hypothesis (int hypId, int studyId,
+                                                  SMESH_Gen * gen)
+  : SMESH_Hypothesis(hypId, studyId, gen),
+    _MEDName( GetDefaultMEDName() ),
+    _NbPart( GetDefaultNbPart() ),
+    _KeepFiles( GetDefaultKeepFiles() )
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis::GHS3DPRLPlugin_Hypothesis");
+  _name = "GHS3DPRL_Parameters";
+  _param_algo_dim = 3;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+void GHS3DPRLPlugin_Hypothesis::SetMEDName(string theVal) {
+  if (theVal != _MEDName) {
+    _MEDName = theVal;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+void GHS3DPRLPlugin_Hypothesis::SetNbPart(int theVal) {
+  if (theVal != _NbPart) {
+    _NbPart = theVal;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+void GHS3DPRLPlugin_Hypothesis::SetKeepFiles(bool theVal) {
+  if (theVal != _KeepFiles) {
+    _KeepFiles = theVal;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+ostream & GHS3DPRLPlugin_Hypothesis::SaveTo(ostream & save)
+{
+  save << "MEDName=" << _MEDName;
+  save << "NbPart=" << _NbPart;
+  save << "KeepFiles=" << (int)_KeepFiles;
+  cout << endl;
+  cout << "save : " << save << endl;
+  cout << endl;
+  return save;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+istream & GHS3DPRLPlugin_Hypothesis::LoadFrom(istream & load)
+{
+//   bool isOK = true;
+//   int is;
+//   double val;
+
+//   isOK = (load >> val);
+//   if (isOK)
+//     _maxSize = val;
+//   else
+//     load.clear(ios::badbit | load.rdstate());
+
+//   isOK = (load >> is);
+//   if (isOK)
+//     SetFineness((Fineness) is);
+//   else
+//     load.clear(ios::badbit | load.rdstate());
+
+//   if (_fineness == UserDefined)
+//   {
+//     isOK = (load >> val);
+//     if (isOK)
+//       _growthRate = val;
+//     else
+//       load.clear(ios::badbit | load.rdstate());
+
+//     isOK = (load >> val);
+//     if (isOK)
+//       _nbSegPerEdge = val;
+//     else
+//       load.clear(ios::badbit | load.rdstate());
+
+//     isOK = (load >> val);
+//     if (isOK)
+//       _nbSegPerRadius = val;
+//     else
+//       load.clear(ios::badbit | load.rdstate());
+//   }
+
+//   isOK = (load >> is);
+//   if (isOK)
+//     _secondOrder = (bool) is;
+//   else
+//     load.clear(ios::badbit | load.rdstate());
+
+//   isOK = (load >> is);
+//   if (isOK)
+//     _optimize = (bool) is;
+//   else
+//     load.clear(ios::badbit | load.rdstate());
+  return load;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+ostream & operator <<(ostream & save, GHS3DPRLPlugin_Hypothesis & hyp)
+{
+  return hyp.SaveTo( save );
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+istream & operator >>(istream & load, GHS3DPRLPlugin_Hypothesis & hyp)
+{
+  return hyp.LoadFrom( load );
+}
+
+
+//================================================================================
+/*!
+ * \brief Does nothing
+ * \param theMesh - the built mesh
+ * \param theShape - the geometry of interest
+ * \retval bool - always false
+ */
+//================================================================================
+bool GHS3DPRLPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh*   theMesh,
+                                                      const TopoDS_Shape& theShape)
+{
+  return false;
+}
+
+//=============================================================================
+string GHS3DPRLPlugin_Hypothesis::GetDefaultMEDName()
+{
+  return "DOMAIN\0";
+}
+
+//=============================================================================
+int GHS3DPRLPlugin_Hypothesis::GetDefaultNbPart()
+{
+  return 16;
+}
+
+bool GHS3DPRLPlugin_Hypothesis::GetDefaultKeepFiles()
+{
+  return false;
+}
+
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.hxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.hxx
new file mode 100755 (executable)
index 0000000..2640c71
--- /dev/null
@@ -0,0 +1,83 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File      : GHS3DPRLPlugin_Hypothesis.hxx
+// Author    : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date      : 2007/02/01
+// Project   : SALOME
+// $Header   :
+//=============================================================================
+
+#ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
+#define _GHS3DPRLPlugin_Hypothesis_HXX_
+
+#include "SMESH_Hypothesis.hxx"
+#include "Utils_SALOME_Exception.hxx"
+
+//  Parameters for work of GHS3DPRL
+//
+
+class GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
+{
+public:
+
+  GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen * gen);
+
+  void SetMEDName(string theVal);
+  string GetMEDName() const { return _MEDName; }
+
+  void SetNbPart(int theVal);
+  int GetNbPart() const { return _NbPart; }
+
+  void SetKeepFiles(bool theVal);
+  bool GetKeepFiles() const { return _KeepFiles; }
+
+  // the parameters default values
+
+  static string GetDefaultMEDName();
+  static int GetDefaultNbPart();
+  static bool GetDefaultKeepFiles();
+
+  // Persistence
+  virtual ostream & SaveTo(ostream & save);
+  virtual istream & LoadFrom(istream & load);
+  friend ostream & operator <<(ostream & save, GHS3DPRLPlugin_Hypothesis & hyp);
+  friend istream & operator >>(istream & load, GHS3DPRLPlugin_Hypothesis & hyp);
+
+  /*!
+   * \brief Does nothing
+   * \param theMesh - the built mesh
+   * \param theShape - the geometry of interest
+   * \retval bool - always false
+   */
+  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+
+private:
+  int   _countSubMesh;
+  int   _countTotal;
+  int   _nodeRefNumber;
+
+  string  _MEDName;  //generic path/name of med files
+  int   _NbPart;     //number of partitions
+  bool  _KeepFiles;   //keep intermediates tepal files or not
+};
+
+#endif
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.cxx
new file mode 100755 (executable)
index 0000000..4deb488
--- /dev/null
@@ -0,0 +1,156 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File      : GHS3DPRLPlugin_Hypothesis_i.cxx
+//  Author   : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date      : 2007/02/01
+// Project   : SALOME
+//=============================================================================
+using namespace std;
+
+#include "GHS3DPRLPlugin_Hypothesis_i.hxx"
+#include "SMESH_Gen.hxx"
+#include "SMESH_PythonDump.hxx"
+
+#include "Utils_CorbaException.hxx"
+#include "utilities.h"
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i
+ *
+ *  Constructor
+ */
+//=============================================================================
+GHS3DPRLPlugin_Hypothesis_i::
+GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
+                           int                     theStudyId,
+                           ::SMESH_Gen*            theGenImpl)
+  : SALOME::GenericObj_i( thePOA ),
+    SMESH_Hypothesis_i( thePOA )
+{
+  MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i" );
+  myBaseImpl = new ::GHS3DPRLPlugin_Hypothesis (theGenImpl->GetANewId(),
+                                              theStudyId,
+                                              theGenImpl);
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i
+ *
+ *  Destructor
+ */
+//=============================================================================
+GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
+{
+  MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i" );
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_Hypothesis_i::SetMEDName
+ *  GHS3DPRLPlugin_Hypothesis_i::SetNbPart
+ *  GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
+ */
+//=============================================================================
+
+void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetMEDName(theValue);
+  SMESH::TPythonDump() << _this() << ".SetMEDName( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetNbPart");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetNbPart(theValue);
+  SMESH::TPythonDump() << _this() << ".SetNbPart( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetKeepFiles(theValue);
+  SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_Hypothesis_i::GetMEDName
+ *  GHS3DPRLPlugin_Hypothesis_i::GetNbPart
+ *  GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
+ */
+//=============================================================================
+
+char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
+  ASSERT(myBaseImpl);
+    CORBA::String_var c_s =
+    CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
+  return c_s._retn();
+}
+
+CORBA::Long GHS3DPRLPlugin_Hypothesis_i::GetNbPart()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetNbPart");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetNbPart();
+}
+
+CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetKeepFiles();
+}
+
+//=============================================================================
+/*!
+ *  GHS3DPRLPlugin_Hypothesis_i::GetImpl
+ *
+ *  Get implementation
+ */
+//=============================================================================
+::GHS3DPRLPlugin_Hypothesis* GHS3DPRLPlugin_Hypothesis_i::GetImpl()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetImpl");
+  return (::GHS3DPRLPlugin_Hypothesis*)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 GHS3DPRLPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_3D;
+}
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.hxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.hxx
new file mode 100755 (executable)
index 0000000..72f1917
--- /dev/null
@@ -0,0 +1,70 @@
+//  GHS3DPRLPlugin : C++ implementation
+//
+//  Copyright (C) 2006  OPEN CASCADE, 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+// File    : GHS3DPRLPlugin_Hypothesis_i.hxx
+// Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// Date    : 2006/06/30
+// Project : SALOME
+//=============================================================================
+
+#ifndef _GHS3DPRLPlugin_Hypothesis_i_HXX_
+#define _GHS3DPRLPlugin_Hypothesis_i_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GHS3DPRLPlugin_Algorithm)
+
+#include "SMESH_Hypothesis_i.hxx"
+#include "GHS3DPRLPlugin_Hypothesis.hxx"
+
+class SMESH_Gen;
+
+// GHS3DPRLPlugin parameters hypothesis
+
+class GHS3DPRLPlugin_Hypothesis_i:
+  public virtual POA_GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis,
+  public virtual SMESH_Hypothesis_i
+{
+ public:
+  // Constructor
+  GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
+                             int                     theStudyId,
+                             ::SMESH_Gen*            theGenImpl);
+  // Destructor
+  virtual ~GHS3DPRLPlugin_Hypothesis_i();
+
+  // Methods for setting and getting parameters values
+  void SetMEDName(const char* theVal);
+  char * GetMEDName();
+
+  void SetNbPart(CORBA::Long theVal);
+  CORBA::Long GetNbPart();
+
+  void SetKeepFiles(CORBA::Boolean theVal);
+  CORBA::Boolean GetKeepFiles();
+
+  // Get implementation
+  ::GHS3DPRLPlugin_Hypothesis* GetImpl();
+
+  // Verify whether hypothesis supports given entity type
+  CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+};
+
+#endif
diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_i.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_i.cxx
new file mode 100755 (executable)
index 0000000..ffa910d
--- /dev/null
@@ -0,0 +1,67 @@
+//  SMESH GHS3DPRLPlugin : implementaion of SMESH idl descriptions
+//
+//  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+//
+//
+//
+//  File    : GHS3DPRLPlugin_i.cxx
+//  Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module  : SMESH
+//  $Header :
+
+using namespace std;
+#include "SMESH_Hypothesis_i.hxx"
+
+#include "utilities.h"
+
+#include "GHS3DPRLPlugin_GHS3DPRL_i.hxx"
+#include "GHS3DPRLPlugin_Hypothesis_i.hxx"
+
+template <class T> class GHS3DPRLPlugin_Creator_i:public HypothesisCreator_i<T>
+{
+  // as we have 'module GHS3DPRLPlugin' in GHS3DPRLPlugin_Algorithm.idl
+  virtual std::string GetModuleName() { return "GHS3DPRLPlugin"; }
+};
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+extern "C"
+{
+  GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
+  {
+    MESSAGE("GetHypothesisCreator " << aHypName);
+
+    GenericHypothesisCreator_i* aCreator = 0;
+
+    // Algorithms
+    if (strcmp(aHypName, "GHS3DPRL_3D") == 0)
+      aCreator = new GHS3DPRLPlugin_Creator_i<GHS3DPRLPlugin_GHS3DPRL_i>;
+    // Hypotheses
+    else if (strcmp(aHypName, "GHS3DPRL_Parameters") == 0)
+      aCreator = new GHS3DPRLPlugin_Creator_i<GHS3DPRLPlugin_Hypothesis_i>;
+    else ;
+
+    return aCreator;
+  }
+}
diff --git a/src/GHS3DPRLPlugin/Makefile.in b/src/GHS3DPRLPlugin/Makefile.in
new file mode 100755 (executable)
index 0000000..525c23f
--- /dev/null
@@ -0,0 +1,54 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# -* Makefile *-
+#
+# Author : Christian VAN WAMBEKE (CEA)
+# Module : GHS3DPRLPLUGIN
+# Date : 2006/06/30
+#
+#
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
+
+@COMMENCE@
+
+LIB_SRC = \
+        GHS3DPRLPlugin_GHS3DPRL.cxx \
+        GHS3DPRLPlugin_GHS3DPRL_i.cxx \
+        GHS3DPRLPlugin_Hypothesis.cxx \
+        GHS3DPRLPlugin_Hypothesis_i.cxx \
+        GHS3DPRLPlugin_i.cxx
+
+LIB_SERVER_IDL = GHS3DPRLPlugin_Algorithm.idl
+
+LIB_CLIENT_IDL = \
+        SALOME_Component.idl \
+        SALOME_Comm.idl \
+        GEOM_Gen.idl \
+        MED.idl
+
+# Libraries targets
+LIB = libGHS3DPRLEngine.la
+
+@CONCLUDE@
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100755 (executable)
index 0000000..f954477
--- /dev/null
@@ -0,0 +1,35 @@
+#  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#
+#
+#  File   : Makefile.in
+#  Author : Christian VAN WAMBEKE (CEA)
+#  Module : SMESH
+
+top_srcdir=@top_srcdir@
+top_builddir=..
+srcdir=@srcdir@
+VPATH=.:@srcdir@
+
+@COMMENCE@
+
+SUBDIRS = GHS3DPRLPlugin gui tepal2med
+
+@MODULE@
diff --git a/src/gui/GHS3DPRLPluginGUI.cxx b/src/gui/GHS3DPRLPluginGUI.cxx
new file mode 100755 (executable)
index 0000000..73d4964
--- /dev/null
@@ -0,0 +1,43 @@
+//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+//
+//  Copyright (C) 2003  CEA
+//
+//  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.org
+//
+//
+//
+//  File   : GHS3DPRLPluginGUI.cxx
+//  Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module : GHS3DPRLPlugin
+
+#include "GHS3DPRLPluginGUI_HypothesisCreator.h"
+
+//=============================================================================
+/*! GetHypothesisCreator
+ *
+ */
+//=============================================================================
+extern "C"
+{
+  SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& aHypType )
+  {
+    SMESHGUI_GenericHypothesisCreator* aCreator = NULL;
+    if( aHypType=="GHS3DPRL_Parameters" )
+      aCreator =  new GHS3DPRLPluginGUI_HypothesisCreator( aHypType );
+    return aCreator;
+  }
+}
diff --git a/src/gui/GHS3DPRLPluginGUI_HypothesisCreator.cxx b/src/gui/GHS3DPRLPluginGUI_HypothesisCreator.cxx
new file mode 100755 (executable)
index 0000000..ccb2df8
--- /dev/null
@@ -0,0 +1,202 @@
+//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+//
+//  Copyright (C) 2003  CEA
+//
+//  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.org
+//
+//
+//
+//  File   : GHS3DPRLPluginGUI_HypothesisCreator.cxx
+//  Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module : GHS3DPRLPlugin
+//  $Header:
+
+#include "GHS3DPRLPluginGUI_HypothesisCreator.h"
+
+#include <SMESHGUI_Utils.h>
+#include <SMESHGUI_HypothesesUtils.h>
+
+#include CORBA_SERVER_HEADER(GHS3DPRLPlugin_Algorithm)
+
+#include <SUIT_Session.h>
+
+#include <SalomeApp_Tools.h>
+
+#include <QtxIntSpinBox.h>
+#include <QtxComboBox.h>
+
+#include <qlabel.h>
+#include <qgroupbox.h>
+#include <qframe.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qwhatsthis.h>
+#include <qpixmap.h>
+
+
+GHS3DPRLPluginGUI_HypothesisCreator::GHS3DPRLPluginGUI_HypothesisCreator( const QString& theHypType )
+: SMESHGUI_GenericHypothesisCreator( theHypType ),
+  myIs3D(true)
+{
+}
+
+GHS3DPRLPluginGUI_HypothesisCreator::~GHS3DPRLPluginGUI_HypothesisCreator()
+{
+}
+
+bool GHS3DPRLPluginGUI_HypothesisCreator::checkParams() const
+{
+  GHS3DPRLHypothesisData data_old, data_new;
+  readParamsFromHypo( data_old );
+  readParamsFromWidgets( data_new );
+  bool res = storeParamsToHypo( data_new );
+  return res;
+}
+
+QFrame* GHS3DPRLPluginGUI_HypothesisCreator::buildFrame()
+{
+  QString toto="myframe";
+  QFrame* fr = new QFrame( 0, "myframe" );
+  fr->setMinimumSize( QSize( 300, 140 ) );
+  QVBoxLayout* lay = new QVBoxLayout( fr, 5, 0 );
+
+  QGroupBox* GroupC1 = new QGroupBox( 2, Qt::Horizontal, fr, "GroupC1" );
+  lay->addWidget( GroupC1 );
+
+  GroupC1->setTitle( tr( "SMESH_ARGUMENTS" ) );
+  GroupC1->layout()->setSpacing( 6 );
+  GroupC1->layout()->setMargin( 11 );
+
+  myName = 0;
+  if( isCreation() ) {
+    myNameText = new QLabel( tr( "SMESH_NAME" ), GroupC1 );
+    QWhatsThis::add( myNameText, tr( "GHS3DPRL_WhatsThis_Name" ) );
+    myName = new QLineEdit( GroupC1 );
+  }
+
+  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis_var h =
+  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis::_narrow( initParamsHypothesis() );
+
+  myMEDNameText = new QLabel( tr( "GHS3DPRL_MEDName" ), GroupC1 );
+  QWhatsThis::add( myMEDNameText, tr( "GHS3DPRL_WhatsThis_MEDName" ) );
+  myMEDName = new QLineEdit( GroupC1 );
+  QLabel* myNbPartText = new QLabel( tr( "GHS3DPRL_NbPart" ), GroupC1 );
+  QWhatsThis::add( myNbPartText, tr( "GHS3DPRL_WhatsThis_NbPart" ) );
+  myNbPart = new QtxIntSpinBox( GroupC1 );
+  // myHexesMinLevel->setMinValue( 3 );
+  myNbPart->setMinValue( 1 );
+  myNbPart->setMaxValue( 256 );
+  myNbPart->setLineStep( 1 );
+
+  myKeepFiles = new QCheckBox( tr( "GHS3DPRL_KeepFiles" ), GroupC1 );
+  QWhatsThis::add( myKeepFiles, tr( "GHS3DPRL_WhatsThis_KeepFiles" ) );
+
+  GroupC1->addSpace(0);
+  myIs3D = true;
+
+  return fr;
+}
+
+void GHS3DPRLPluginGUI_HypothesisCreator::retrieveParams() const
+{
+  GHS3DPRLHypothesisData data;
+  readParamsFromHypo( data );
+
+  if( myName ) myName->setText( data.myName );
+  myMEDName->setText( data.myMEDName );
+  myNbPart->setValue( data.myNbPart );
+  myKeepFiles->setChecked( data.myKeepFiles );
+  myNbPart->setEnabled(true);
+}
+
+QString GHS3DPRLPluginGUI_HypothesisCreator::storeParams() const
+{
+  GHS3DPRLHypothesisData data;
+  readParamsFromWidgets( data );
+  storeParamsToHypo( data );
+
+  QString valStr;
+  valStr += tr("GHS3DPRL_MEDName") + " = " + data.myMEDName + "; ";
+  valStr += tr("GHS3DPRL_NbPart") + " = " + QString::number( data.myNbPart )   + "; ";
+  valStr += tr("GHS3DPRL_KeepFiles")  + " = " + QString::number( data.myKeepFiles ) + "; ";
+
+  return valStr;
+}
+
+bool GHS3DPRLPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DPRLHypothesisData& h_data ) const
+{
+  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis_var h =
+    GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis::_narrow( initParamsHypothesis() );
+
+  HypothesisData* data = SMESH::GetHypothesisData( hypType() );
+  h_data.myName = isCreation() && data ? data->Label : "";
+  h_data.myMEDName = h->GetMEDName(); //"DOMAIN\0";
+  h_data.myNbPart = h->GetNbPart();
+  h_data.myKeepFiles = h->GetKeepFiles();
+
+  return true;
+}
+
+bool GHS3DPRLPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DPRLHypothesisData& h_data ) const
+{
+  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis_var h =
+    GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis::_narrow( hypothesis() );
+
+  bool ok = true;
+  try
+  {
+    if( isCreation() )
+      SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.latin1() );
+
+    h->SetMEDName( h_data.myMEDName );
+    h->SetNbPart( h_data.myNbPart );
+    h->SetKeepFiles( h_data.myKeepFiles );
+  }
+  catch(const SALOME::SALOME_Exception& ex)
+  {
+    SalomeApp_Tools::QtCatchCorbaException(ex);
+    ok = false;
+  }
+  return ok;
+}
+
+bool GHS3DPRLPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DPRLHypothesisData& h_data ) const
+{
+  h_data.myName = myName ? myName->text() : "";
+  h_data.myMEDName = myMEDName->text();
+  h_data.myNbPart = myNbPart->value();
+  h_data.myKeepFiles = myKeepFiles->isChecked();
+
+  return true;
+}
+
+QString GHS3DPRLPluginGUI_HypothesisCreator::caption() const
+{
+  return tr( QString( "GHS3DPRL_%1_TITLE" ).arg(myIs3D?QString("3D"):QString("3D")) );
+}
+
+QPixmap GHS3DPRLPluginGUI_HypothesisCreator::icon() const
+{
+  QString hypIconName = tr( QString("ICON_DLG_GHS3DPRL_PARAMETERS%1").arg(myIs3D?QString(""):QString("")) );
+  return SUIT_Session::session()->resourceMgr()->loadPixmap( "GHS3DPRLPlugin", hypIconName );
+}
+
+QString GHS3DPRLPluginGUI_HypothesisCreator::type() const
+{
+  return tr( QString( "GHS3DPRL_%1_HYPOTHESIS" ).arg(myIs3D?QString("3D"):QString("3D")) );
+}
diff --git a/src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h b/src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h
new file mode 100755 (executable)
index 0000000..995e7a9
--- /dev/null
@@ -0,0 +1,84 @@
+//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+//
+//  Copyright (C) 2003  CEA
+//
+//  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.org
+//
+//
+//
+//  File   : GHS3DPRLPluginGUI_HypothesisCreator.h
+//  Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//  Module : GHS3DPRLPlugin
+//  $Header:
+
+#ifndef GHS3DPRLPLUGINGUI_HypothesisCreator_HeaderFile
+#define GHS3DPRLPLUGINGUI_HypothesisCreator_HeaderFile
+
+#include <SMESHGUI_Hypotheses.h>
+
+class QtxIntSpinBox;
+class QtxDblSpinBox;
+class QCheckBox;
+class QLineEdit;
+
+typedef struct
+{
+  QString  myName;
+  QString  myMEDName;
+  int      myNbPart;
+  bool     myKeepFiles;
+} GHS3DPRLHypothesisData;
+
+/*!
+ * \brief Class for creation of GHS3DPRL hypotheses
+*/
+class GHS3DPRLPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
+{
+  Q_OBJECT
+
+public:
+  GHS3DPRLPluginGUI_HypothesisCreator( const QString& );
+  virtual ~GHS3DPRLPluginGUI_HypothesisCreator();
+
+  virtual bool checkParams() const;
+
+protected:
+  virtual QFrame*  buildFrame    ();
+  virtual void     retrieveParams() const;
+  virtual QString  storeParams   () const;
+
+  virtual QString  caption() const;
+  virtual QPixmap  icon() const;
+  virtual QString  type() const;
+
+private:
+  bool readParamsFromHypo( GHS3DPRLHypothesisData& ) const;
+  bool readParamsFromWidgets( GHS3DPRLHypothesisData& ) const;
+  bool storeParamsToHypo( const GHS3DPRLHypothesisData& ) const;
+
+private:
+ QLineEdit*       myName;
+ QLabel*          myNameText;
+ QLineEdit*       myMEDName;
+ QLabel*          myMEDNameText;
+ QtxIntSpinBox*   myNbPart;
+ QLabel*          myNbPartText;
+ QCheckBox*       myKeepFiles;
+ bool myIs3D;
+};
+
+#endif
diff --git a/src/gui/GHS3DPRLPlugin_images.po b/src/gui/GHS3DPRLPlugin_images.po
new file mode 100755 (executable)
index 0000000..d64a0fd
--- /dev/null
@@ -0,0 +1,60 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# This is a Qt message file in .po format.  Each msgid starts with
+# a scope.  This scope should *NOT* be translated - eg. "Foo::Bar"
+# would be translated to "Pub", not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
+"PO-Revision-Date: YYYY-MM-DD\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
+
+#-----------------------------------------------------------
+# Hypothesis
+#-----------------------------------------------------------
+
+msgid "ICON_DLG_GHS3DPRL_PARAMETERS"
+msgstr "mesh_hypo_GHS3DPRL.png"
+
+msgid "ICON_DLG_GHS3DPRL_PARAMETERS_3D"
+msgstr "mesh_hypo_GHS3DPRL.png"
+
+#-----------------------------------------------------------
+# ObjectBrowser
+#-----------------------------------------------------------
+
+msgid "ICON_SMESH_TREE_ALGO_GHS3DPRL_3D"
+msgstr "mesh_tree_algo_tetra.png"
+
+msgid "ICON_SMESH_TREE_ALGO_GHS3DPRL_3D"
+msgstr "mesh_tree_algo_GHS3DPRL.png"
+
+msgid "ICON_SMESH_TREE_ALGO_GHS3DPRL_2D3D"
+msgstr "mesh_tree_algo_GHS3DPRL.png"
+
+msgid "ICON_SMESH_TREE_HYPO_GHS3DPRL_Parameters"
+msgstr "mesh_tree_hypo_GHS3DPRL.png"
+
+msgid "ICON_SMESH_TREE_HYPO_GHS3DPRL_Parameters_3D"
+msgstr "mesh_tree_hypo_GHS3DPRL.png"
+
diff --git a/src/gui/GHS3DPRLPlugin_msg_en.po b/src/gui/GHS3DPRLPlugin_msg_en.po
new file mode 100755 (executable)
index 0000000..b685489
--- /dev/null
@@ -0,0 +1,56 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# This is a Qt message file in .po format.  Each msgid starts with
+# a scope.  This scope should *NOT* be translated - eg. "Foo::Bar"
+# would be translated to "Pub", not "Foo::Pub".
+msgid ""
+msgstr ""
+"Project-Id-Version: PROJECT VERSION\n"
+"POT-Creation-Date: 2002-05-28 10:46:48 AM CEST\n"
+"PO-Revision-Date: YYYY-MM-DD\n"
+"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+
+msgid "GHS3DPRL_WhatsThis_Name"
+msgstr "Name of applied hypothese"
+
+msgid "GHS3DPRL_MEDName"
+msgstr "MED_Name"
+
+msgid "GHS3DPRL_WhatsThis_MEDName"
+msgstr "Generic path/name of finals outputs files (.med)"
+
+msgid "GHS3DPRL_NbPart"
+msgstr "Nb_Part"
+
+msgid "GHS3DPRL_WhatsThis_NbPart"
+msgstr "Number of partitions of initial wrap"
+
+msgid "GHS3DPRL_KeepFiles"
+msgstr "Keep_Files"
+
+msgid "GHS3DPRL_WhatsThis_KeepFiles"
+msgstr "Keep intemediates tepal Files (.faces,.points,.msg,.noboite...)"
+
+msgid "GHS3DPRL_3D_HYPOTHESIS"
+msgstr "GHS3DPRL 3D"
+
+msgid "GHS3DPRL_3D_TITLE"
+msgstr "Hypothesis Construction"
diff --git a/src/gui/Makefile.in b/src/gui/Makefile.in
new file mode 100755 (executable)
index 0000000..919e89f
--- /dev/null
@@ -0,0 +1,73 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+#  File    : Makefile.in
+// Author  : Christian VAN WAMBEKE (CEA)
+#  Module  : GHS3DPRLPLUGIN
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
+
+@COMMENCE@
+
+# .po files to transform in .qm
+PO_FILES = \
+       GHS3DPRLPlugin_images.po \
+       GHS3DPRLPlugin_msg_en.po
+
+# Libraries targets
+LIB = libGHS3DPRLPluginGUI.la
+
+LIB_SRC = \
+       GHS3DPRLPluginGUI.cxx \
+       GHS3DPRLPluginGUI_HypothesisCreator.cxx
+
+LIB_MOC = \
+       GHS3DPRLPluginGUI_HypothesisCreator.h
+
+LIB_CLIENT_IDL = \
+       SALOME_Exception.idl \
+       SALOME_GenericObj.idl \
+       SALOME_Component.idl \
+       SALOME_Comm.idl \
+       GEOM_Gen.idl \
+       MED.idl \
+       SMESH_Gen.idl \
+       SMESH_Mesh.idl \
+       SMESH_Group.idl \
+       GHS3DPRLPlugin_Algorithm.idl
+
+LIB_SERVER_IDL =
+
+# additionnal information to compil and link file
+
+CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) \
+           -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \
+           -I${GEOM_ROOT_DIR}/include/salome -I${SMESH_ROOT_DIR}/include/salome \
+            $(BOOST_CPPFLAGS)
+CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \
+           -I${GEOM_ROOT_DIR}/include/salome  -I${SMESH_ROOT_DIR}/include/salome
+
+LDFLAGS += -lSMESH $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome \
+          -L${GUI_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome \
+          -L${SMESH_ROOT_DIR}/lib/salome
+
+@CONCLUDE@
diff --git a/src/tepal2med/.depend b/src/tepal2med/.depend
new file mode 100644 (file)
index 0000000..c192e5b
--- /dev/null
@@ -0,0 +1,257 @@
+# DO NOT DELETE
+
+ghs3dprl_read_ouputs.o: /usr/include/stdio.h /usr/include/features.h
+ghs3dprl_read_ouputs.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
+ghs3dprl_read_ouputs.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stddef.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/types.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/wordsize.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+ghs3dprl_read_ouputs.o: /usr/include/_G_config.h /usr/include/wchar.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+ghs3dprl_read_ouputs.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stdarg.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/stdio_lim.h
+ghs3dprl_read_ouputs.o: /usr/include/bits/sys_errlist.h ghs3dprl_msg_parser.h
+ghs3dprl_read_ouputs.o: ghs3dprl_mesh_wrap.h /usr/lib/qt3/include/qdict.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qgdict.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qptrcollection.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qglobal.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qstring.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qcstring.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qmemarray.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qgarray.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qshared.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qwinexport.h
+ghs3dprl_read_ouputs.o: /usr/include/string.h /usr/include/limits.h
+ghs3dprl_read_ouputs.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/limits.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qregexp.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qstringlist.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qvaluelist.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qtl.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qtextstream.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qiodevice.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qdatastream.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qstrlist.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qptrlist.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qglist.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qxml.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qfile.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qvaluevector.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qwindowdefs.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qobjectdefs.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qnamespace.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qapplication.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qdesktopwidget.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qwidget.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qobject.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qevent.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qregion.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qrect.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qsize.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qpoint.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qmime.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qmap.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qpair.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qpaintdevice.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qpalette.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qcolor.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qbrush.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qfont.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qfontmetrics.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qfontinfo.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qsizepolicy.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qasciidict.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qtranslator.h dlg_ghs3dmain.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qvariant.h
+ghs3dprl_read_ouputs.o: /usr/lib/qt3/include/qdialog.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qstring.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qcstring.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qmemarray.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qgarray.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qshared.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qglobal.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qwinexport.h /usr/include/string.h
+ghs3dprl_mesh_wrap.o: /usr/include/features.h /usr/include/sys/cdefs.h
+ghs3dprl_mesh_wrap.o: /usr/include/gnu/stubs.h
+ghs3dprl_mesh_wrap.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stddef.h
+ghs3dprl_mesh_wrap.o: /usr/include/limits.h
+ghs3dprl_mesh_wrap.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/limits.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qfile.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qiodevice.h /usr/include/stdio.h
+ghs3dprl_mesh_wrap.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+ghs3dprl_mesh_wrap.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+ghs3dprl_mesh_wrap.o: /usr/include/_G_config.h /usr/include/wchar.h
+ghs3dprl_mesh_wrap.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+ghs3dprl_mesh_wrap.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stdarg.h
+ghs3dprl_mesh_wrap.o: /usr/include/bits/stdio_lim.h
+ghs3dprl_mesh_wrap.o: /usr/include/bits/sys_errlist.h ghs3dprl_mesh_wrap.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qdict.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qgdict.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qptrcollection.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qregexp.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qstringlist.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qvaluelist.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qtl.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qtextstream.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qdatastream.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qstrlist.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qptrlist.h
+ghs3dprl_mesh_wrap.o: /usr/lib/qt3/include/qglist.h
+ghs3dprl_msg_parser.o: ghs3dprl_msg_parser.h ghs3dprl_mesh_wrap.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qdict.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qgdict.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qptrcollection.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qglobal.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qstring.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qcstring.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qmemarray.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qgarray.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qshared.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qwinexport.h
+ghs3dprl_msg_parser.o: /usr/include/string.h /usr/include/features.h
+ghs3dprl_msg_parser.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
+ghs3dprl_msg_parser.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stddef.h
+ghs3dprl_msg_parser.o: /usr/include/limits.h
+ghs3dprl_msg_parser.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/limits.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qregexp.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qstringlist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qvaluelist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qtl.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qtextstream.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qiodevice.h /usr/include/stdio.h
+ghs3dprl_msg_parser.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+ghs3dprl_msg_parser.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+ghs3dprl_msg_parser.o: /usr/include/_G_config.h /usr/include/wchar.h
+ghs3dprl_msg_parser.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+ghs3dprl_msg_parser.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stdarg.h
+ghs3dprl_msg_parser.o: /usr/include/bits/stdio_lim.h
+ghs3dprl_msg_parser.o: /usr/include/bits/sys_errlist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qdatastream.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qstrlist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qptrlist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qglist.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qxml.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qfile.h
+ghs3dprl_msg_parser.o: /usr/lib/qt3/include/qvaluevector.h
+dlg_ghs3dmain.o: dlg_ghs3dmain.h /usr/lib/qt3/include/qvariant.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qstring.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qcstring.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qmemarray.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qgarray.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qshared.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qglobal.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qwinexport.h /usr/include/string.h
+dlg_ghs3dmain.o: /usr/include/features.h /usr/include/sys/cdefs.h
+dlg_ghs3dmain.o: /usr/include/gnu/stubs.h
+dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stddef.h
+dlg_ghs3dmain.o: /usr/include/limits.h
+dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/limits.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qvaluelist.h /usr/lib/qt3/include/qtl.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qtextstream.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qiodevice.h /usr/include/stdio.h
+dlg_ghs3dmain.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+dlg_ghs3dmain.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+dlg_ghs3dmain.o: /usr/include/_G_config.h /usr/include/wchar.h
+dlg_ghs3dmain.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stdarg.h
+dlg_ghs3dmain.o: /usr/include/bits/stdio_lim.h
+dlg_ghs3dmain.o: /usr/include/bits/sys_errlist.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qdatastream.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qstringlist.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qstrlist.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qptrlist.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qglist.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qptrcollection.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qmap.h /usr/lib/qt3/include/qpair.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qdialog.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qwidget.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qwindowdefs.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qobjectdefs.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qnamespace.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qobject.h /usr/lib/qt3/include/qevent.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qregion.h /usr/lib/qt3/include/qrect.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qsize.h /usr/lib/qt3/include/qpoint.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qmime.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qpaintdevice.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qpalette.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qcolor.h /usr/lib/qt3/include/qbrush.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qfont.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qfontmetrics.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qfontinfo.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qsizepolicy.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qgroupbox.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qframe.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qspinbox.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qrangecontrol.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qlabel.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qradiobutton.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qbutton.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qkeysequence.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qpushbutton.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qiconset.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qpixmap.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qlayout.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qtooltip.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qwhatsthis.h
+dlg_ghs3dmain.o: /usr/lib/qt3/include/qcursor.h /usr/lib/qt3/include/qimage.h
+dlg_ghs3dmain.o: dlg_ghs3dmain.ui.h
+moc_dlg_ghs3dmain.o: dlg_ghs3dmain.h /usr/lib/qt3/include/qvariant.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qstring.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qcstring.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qmemarray.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qgarray.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qshared.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qglobal.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qwinexport.h /usr/include/string.h
+moc_dlg_ghs3dmain.o: /usr/include/features.h /usr/include/sys/cdefs.h
+moc_dlg_ghs3dmain.o: /usr/include/gnu/stubs.h
+moc_dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stddef.h
+moc_dlg_ghs3dmain.o: /usr/include/limits.h
+moc_dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/limits.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qvaluelist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qtl.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qtextstream.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qiodevice.h /usr/include/stdio.h
+moc_dlg_ghs3dmain.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
+moc_dlg_ghs3dmain.o: /usr/include/bits/typesizes.h /usr/include/libio.h
+moc_dlg_ghs3dmain.o: /usr/include/_G_config.h /usr/include/wchar.h
+moc_dlg_ghs3dmain.o: /usr/include/bits/wchar.h /usr/include/gconv.h
+moc_dlg_ghs3dmain.o: /usr/lib/gcc/i586-mandriva-linux-gnu/4.0.1/include/stdarg.h
+moc_dlg_ghs3dmain.o: /usr/include/bits/stdio_lim.h
+moc_dlg_ghs3dmain.o: /usr/include/bits/sys_errlist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qdatastream.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qstringlist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qstrlist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qptrlist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qglist.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qptrcollection.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qmap.h /usr/lib/qt3/include/qpair.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qdialog.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qwidget.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qwindowdefs.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qobjectdefs.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qnamespace.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qobject.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qevent.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qregion.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qrect.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qsize.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qpoint.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qmime.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qpaintdevice.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qpalette.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qcolor.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qbrush.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qfont.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qfontmetrics.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qfontinfo.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qsizepolicy.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qmetaobject.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qconnection.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qapplication.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qdesktopwidget.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qasciidict.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qgdict.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/qtranslator.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/private/qucomextra_p.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/private/qucom_p.h
+moc_dlg_ghs3dmain.o: /usr/lib/qt3/include/quuid.h
diff --git a/src/tepal2med/Makefile b/src/tepal2med/Makefile
new file mode 100755 (executable)
index 0000000..7d6dd27
--- /dev/null
@@ -0,0 +1,125 @@
+.SUFFIXES: .o .f90  .f .swp .c  .cxx
+
+# Makefile pour linux avec g95
+#
+SHELL       = /bin/sh
+MED         = /export/home/secher/med-2.3.1-install/
+HDF         = /home/salome/pal/installations/salome_3.2.5_MD06/hdf5-1.6.4/
+#BOOST       = /home/wambeke/boost_1_33_1
+
+
+# Options de compilation et Edition de liens
+# ------------------------------------------
+LDFLAGS= -L $(QTDIR)lib -lqt-mt -L $(MED)lib -lmed -L $(HDF)lib -lhdf5
+
+# Options d'optimisation
+# ----------------------
+OPTLEVEL    =
+#-O3
+
+# OPTIONS D'INCLUDE
+# ------------------
+DIRINCLUDE = -I $(QTDIR)include -I $(MED)include -I $(HDF)include
+
+# Option de debogage
+# ------------------
+DEBUG= -g -Wall -pedantic -ansi -Wno-long-long
+
+# Librairies
+# -----------
+
+FLIBS=
+
+# Compilateurs
+# ------------------------
+
+F77 = mpif77
+F77FLAGS = $(OPTLEVEL)
+F77LINKER=mpif77
+
+F90 = mpif90
+F90LINKER= mpif90
+F90FLAGS =  $(OPTLEVEL)
+
+CCC = g++
+CC = gcc
+CCCFLAGS =
+CXXLINKER=g++
+
+# SOURCES
+# --------
+SRC=\
+       ghs3dprl_read_ouputs.cxx ghs3dprl_mesh_wrap.cxx ghs3dprl_msg_parser.cxx dlg_ghs3dmain.cxx moc_dlg_ghs3dmain.cxx
+
+
+# Modules objets
+# --------------
+OBJ=$(SRC:.cxx=.o)
+
+
+# Executables
+# -----------
+EXECS=tepal2med
+
+
+all: print $(EXECS)
+
+print:
+       @echo '=============== COMPILATION ================'
+
+
+# Analyse des dependances
+# ------------------------
+depend .depend:
+       makedepend -- $(DIRINCLUDE) -I. -- $(SRC) -f- >.depend
+
+include .depend
+
+#####################
+#                   #
+# Edition de liens  #
+#                   #
+#####################
+
+$(EXECS):$(OBJ)
+       $(CXXLINKER) $(LDFLAGS) -o $(EXECS) $(CXXFLAGS)  $(OBJ)  $(FLIBS)  $(DEBUG)
+
+
+#####################
+#                   #
+#  Compilation      #
+#                   #
+#####################
+
+
+%.o:%.f77
+       $(F77) $(F77FLAGS) $(DIRINCLUDE) $(DEBUG)  -c $*.f
+
+%.o:%.F90
+       $(F90)  $(F90FLAGS) $(DIRINCLUDE) $(DEBUG) -c $*.F90
+
+%.o:%.cxx
+       $(CCC) $(CXXFLAGS)  $(DIRINCLUDE) $(DEBUG) -c $*.cxx
+
+%.o:%.cpp
+       $(CCC) $(CXXFLAGS)  $(DIRINCLUDE) $(DEBUG) -c $*.cpp
+
+%.o:%.c
+       $(CC) $(CFLAGS)  $(DIRINCLUDE) $(DEBUG) -c $*.c
+
+clean:
+       rm -f *.o *~ *.mod *.kmo *.l
+
+cleanall:
+       rm -f *.o *~ *.mod *.kmo *.l ${EXECS}
+
+###################
+#                 #
+#    Deboguage    #
+#                 #
+###################
+
+debug:
+       make DEBUG="-g" OPTLEVEL=" "
+
+
diff --git a/src/tepal2med/Makefile.in b/src/tepal2med/Makefile.in
new file mode 100755 (executable)
index 0000000..d9bc726
--- /dev/null
@@ -0,0 +1,52 @@
+#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
+#
+#  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/
+#
+# -* Makefile *-
+#
+# Author : Christian VAN WAMBEKE (CEA)
+# Module : GHS3DPRLPLUGIN
+# Date : 2006/06/30
+#
+#
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
+
+@COMMENCE@
+
+SRC= ghs3dprl_mesh_wrap.cxx ghs3dprl_msg_parser.cxx dlg_ghs3dmain.cxx moc_dlg_ghs3dmain.cxx
+OBJ=$(SRC:.cxx=.o)
+
+BIN = tepal2med
+BIN_SRC = 
+
+BIN_SERVER_IDL = 
+
+BIN_CLIENT_IDL =
+
+CPPFLAGS+=$(QT_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES)
+LDFLAGSFORBIN+=-lm $(QT_LIBS) $(MED2_LIBS) $(HDF5_LIBS)
+
+$(BIN):$(OBJ)
+       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(QT_LIBS) $(MED2_LIBS) $(HDF5_LIBS) $< 
+
+@CONCLUDE@
diff --git a/src/tepal2med/dlg_ghs3dmain.cxx b/src/tepal2med/dlg_ghs3dmain.cxx
new file mode 100755 (executable)
index 0000000..3dae43d
--- /dev/null
@@ -0,0 +1,94 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'dlg_ghs3dmain.ui'
+**
+** Created: mer fév 14 13:34:54 2007
+**      by: The User Interface Compiler ($Id$)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "dlg_ghs3dmain.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+#include "dlg_ghs3dmain.ui.h"
+/*
+ *  Constructs a dlg_ghs3dmain as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  TRUE to construct a modal dialog.
+ */
+dlg_ghs3dmain::dlg_ghs3dmain( QWidget* parent, const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name ) setName( "tepal2med" );
+    setMinimumSize( QSize( 270, 150 ) );
+    setMaximumSize( QSize( 270, 150 ) );
+    setSizeGripEnabled( FALSE );
+
+    Parameters = new QGroupBox( this, "Parameters" );
+    Parameters->setGeometry( QRect( 10, 10, 250, 91 ) );
+
+    NbPart = new QSpinBox( Parameters, "NbPart" );
+    NbPart->setGeometry( QRect( 10, 20, 80, 31 ) );
+    NbPart->setMaxValue( 256 );
+    NbPart->setMinValue( 1 );
+
+    textNbPart = new QLabel( Parameters, "textNbPart" );
+    textNbPart->setGeometry( QRect( 100, 20, 141, 31 ) );
+
+    KeepFiles = new QRadioButton( Parameters, "KeepFiles" );
+    KeepFiles->setEnabled( TRUE );
+    KeepFiles->setGeometry( QRect( 40, 50, 190, 31 ) );
+    KeepFiles->setChecked( FALSE );
+
+    Ok = new QPushButton( this, "Ok" );
+    Ok->setGeometry( QRect( 180, 112, 80, 30 ) );
+    Ok->setAutoDefault( FALSE );
+    languageChange();
+    resize( QSize(270, 150).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+
+    // signals and slots connections
+    connect( Ok, SIGNAL( clicked() ), this, SLOT( slotok() ) );
+    //connect( Ok, SIGNAL( released() ), this, SLOT( close() ) );
+    init();
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+dlg_ghs3dmain::~dlg_ghs3dmain()
+{
+    destroy();
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void dlg_ghs3dmain::languageChange()
+{
+    //setCaption( tr( "GHS3DPRL" ) );
+    Parameters->setTitle( tr( "Parameters" ) );
+    textNbPart->setText( tr( "Nb of partitions" ) );
+    KeepFiles->setText( tr( "          Keep files" ) );
+    KeepFiles->setAccel( QKeySequence( QString::null ) );
+    QToolTip::add( KeepFiles, QString::null );
+    QWhatsThis::add( KeepFiles, tr( "Keep outputs files of tepal" ) );
+    Ok->setText( tr( "Ok" ) );
+    Ok->setAccel( QKeySequence( QString::null ) );
+}
+
diff --git a/src/tepal2med/dlg_ghs3dmain.h b/src/tepal2med/dlg_ghs3dmain.h
new file mode 100755 (executable)
index 0000000..140cc7a
--- /dev/null
@@ -0,0 +1,56 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'dlg_ghs3dmain.ui'
+**
+** Created: mer fév 14 13:34:52 2007
+**      by: The User Interface Compiler ($Id$)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef DLG_GHS3DMAIN_H
+#define DLG_GHS3DMAIN_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+#include <qstring.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QGroupBox;
+class QSpinBox;
+class QLabel;
+class QRadioButton;
+class QPushButton;
+
+class dlg_ghs3dmain : public QDialog
+{
+    Q_OBJECT
+
+public:
+    dlg_ghs3dmain( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~dlg_ghs3dmain();
+
+    QGroupBox* Parameters;
+    QSpinBox* NbPart;
+    QLabel* textNbPart;
+    QRadioButton* KeepFiles;
+    QPushButton* Ok;
+
+    bool value_KeepFiles,value_Ok;
+    int value_NbPart;
+
+protected:
+
+protected slots:
+    virtual void languageChange();
+
+    virtual void init();
+    virtual void destroy();
+    virtual void slotok();
+
+
+};
+
+#endif // DLG_GHS3DMAIN_H
diff --git a/src/tepal2med/dlg_ghs3dmain.ui.h b/src/tepal2med/dlg_ghs3dmain.ui.h
new file mode 100755 (executable)
index 0000000..748ae85
--- /dev/null
@@ -0,0 +1,39 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you want to add, delete, or rename functions or slots, use
+** Qt Designer to update this file, preserving your code.
+**
+** You should not define a constructor or destructor in this file.
+** Instead, write your code in functions called init() and destroy().
+** These will automatically be called by the form's constructor and
+** destructor.
+*****************************************************************************/
+
+#include <iostream>
+
+using namespace std;
+
+void dlg_ghs3dmain::init()
+{
+   //cout<<"init"<<endl;
+   this->value_KeepFiles=FALSE;
+   this->value_Ok=FALSE;
+   this->value_NbPart=1;
+}
+
+
+void dlg_ghs3dmain::destroy()
+{
+   //cout<<"destroy"<<endl;
+}
+
+
+void dlg_ghs3dmain::slotok()
+{
+   this->value_KeepFiles=KeepFiles->isChecked();
+   this->value_Ok=TRUE;
+   this->value_NbPart=NbPart->value();
+   //cout<<"ok "<<value_KeepFiles<<" "<<value_NbPart<<endl;
+   this->close();
+}
diff --git a/src/tepal2med/ghs3dprl_mesh_wrap.cxx b/src/tepal2med/ghs3dprl_mesh_wrap.cxx
new file mode 100755 (executable)
index 0000000..6a699c2
--- /dev/null
@@ -0,0 +1,1320 @@
+
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <qstring.h>
+#include <qfile.h>
+#include "ghs3dprl_mesh_wrap.h"
+
+using namespace std;
+using namespace med_2_2;
+
+//************************************
+CVWtab::CVWtab(long nb, med_int *pmint)
+//constructor with pmint allocated yet with new
+{
+   //cout"***constructor med_int CVWtab***\n";
+   size=nb;
+   type=1;  //only tmint valide
+   tmint=pmint;
+   tmflo=NULL;
+}
+
+//************************************
+CVWtab::CVWtab(long nb, med_float *pmflo)
+//constructor with pmflo allocated yet with new
+{
+   //cout<<"***constructor med_float CVWtab***\n";
+   size=nb;
+   type=2;   //only tmflo valide
+   tmint=NULL;
+   tmflo=pmflo;
+}
+
+//************************************
+CVWtab::~CVWtab()
+{
+   bool ok;
+   //cout<<"   destructor CVWtab *** "<<this->filename<<endl;
+   ok=this->CVWtab_deallocate();
+   //remove temporary file
+   if (this->filename!="_NO_FILE")
+   {
+      remove(this->filename); //#include <stdio.h>
+      //cout<<this->filename<<" successfully deleted\n";
+   }
+
+}
+
+//************************************
+bool CVWtab::CVWtab_deallocate()
+{
+   //cout<<"   deallocate CVWtab*** "<<size<<endl;
+   if (size <= 0) return FALSE;
+   if (tmint)
+   {
+      delete[] tmint;
+      size=-size; //precaution
+   }
+   if (tmflo)
+   {
+      delete[] tmflo;
+      size=-size; //precaution
+   }
+   return TRUE;
+}
+
+//************************************
+bool CVWtab::is_equal(CVWtab *tab2)
+{
+   //cout<<"is_equal tab1 tab2 type="<<this->type<<"  size="<<this->size<<" "<<tab2->size<<endl;
+   //if (this->type==1) cout<<"med_int tab1[0]="<<this->tmint[0]<<endl;
+   //if (this->type==2) cout<<"med_float tab1[0]="<<this->tmflo[0]<<endl;
+   if (this->size!=tab2->size) return FALSE;
+   if (this->type!=tab2->type) return FALSE;
+   if (this->type==1)
+   {
+      if (!this->tmint)
+      {  cout<<"***is_equal*** pb pointer NULL with tmint size="<<this->size<<endl;
+         return FALSE;
+      }
+      for (long i=0; i < this->size; i++)
+         if (this->tmint[i]!=tab2->tmint[i]) return FALSE;
+   }
+   if (this->type==2)
+   {
+      if (!this->tmflo)
+      {  cout<<"***is_equal*** pb pointer NULL with tmflo size="<<this->size<<endl;
+         return FALSE;
+      }
+      for (long i=0; i < this->size; i++)
+         if (this->tmflo[i]!=tab2->tmflo[i]) return FALSE;
+   }
+   return TRUE;
+}
+
+//************************************
+bool CVW_is_equal_vertices(CVWtab *tab1, long i1,
+                       CVWtab *tab2, long i2, int verbose)
+//verbose 0 for no prints
+//verbose 1 for print vertices not equals
+//verbose 2 for print also vertices equals (debug)
+{
+   //cout<<"is_equal_vertice size="<<tab1->size<<" "<<tab2->size<<endl;
+   bool ok=FALSE;
+   med_float *p1,*p2;
+   //vertices indices from 1 not 0!
+   long di1=(i1-1)*3, di2=(i2-1)*3;
+   if (di1<0 || di1>=tab1->size)
+   {
+      cerr<<"BadIndice tab1 in is_equal_vertices "<<
+            di1<<" not in "<<tab1->size<<endl;
+      return FALSE;
+   }
+   if (di2<0 || di2>=tab2->size)
+   {
+      cerr<<"BadIndice tab2 in is_equal_vertices "<<
+            di2<<" not in "<<tab2->size<<endl;
+      return FALSE;
+   }
+   p1=(tab1->tmflo+di1);
+   p2=(tab2->tmflo+di2);
+   if (p1[0]==p2[0] && p1[1]==p2[1] && p1[2]==p2[2]) ok=TRUE ;
+   if (!ok && verbose>0) printf(
+      "Vertices differents (%.16g %.16g %.16g) (%.16g %.16g %.16g)\n",
+      p1[0],p1[1],p1[2],p2[0],p2[1],p2[2]);
+   else
+      if (verbose>1) printf(
+      "Vertices equals     (%.16g %.16g %.16g)\n",
+      p1[0],p1[1],p1[2]);
+   return ok;
+}
+
+//************************************
+bool CVW_FindString(const string &str,fstream &Ff, long &count)
+//find in file first line with string str in first position of line
+//converts count value expected after "='" in line found
+{
+   string line;
+   do
+   {
+      if (getline(Ff,line))
+      {
+         if (line[0]==str[0]) //faster
+         {
+            if (line.find(str)==0)
+            {
+            QString tmp=line;
+            bool ok;
+            count=tmp.section('\'',1,1).toLong(&ok);
+            return ok;
+            }
+         }
+      }
+      else
+      {
+         cerr<<"Problem line '"<<str<<"' not found in file\n"<<endl;
+         return FALSE;
+      }
+   } while (1);
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::ReadFileGLO(const QString FileName)
+//read file .glo with no parser xml because big file (volume)
+{
+   QString tmp;
+   fstream Ff((const char *)FileName,ios_base::in);
+   string line;
+   long count;
+   bool ok;
+
+   if (!Ff.is_open())
+   {
+      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
+      return FALSE;
+   }
+
+   //Lit les données :
+   if (!CVW_FindString("<vertices count=",Ff,count)) return FALSE;
+   if (this->verbose>2) cout<<"VerticesCount="<<count<<endl;
+   if (count>0)
+   {
+      med_int *tmint=new med_int[count];
+      for (int i=0; i<count; i++) Ff>>tmint[i];
+      if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+      CVWtab *montab=new CVWtab(count,tmint);
+      tmp=tmp.sprintf("GL%ld VE",this->nofile);
+      ok=this->insert_key(tmp,montab);
+   }
+
+   if (!CVW_FindString("<edges count=",Ff,count)) return FALSE;
+   if (this->verbose>2) cout<<"EdgesCount="<<count<<endl;
+   if (count>0)
+   {
+      med_int *tmint=new med_int[count];
+      for (int i=0; i<count; i++) Ff>>tmint[i];
+      if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+      CVWtab *montab=new CVWtab(count,tmint);
+      tmp=tmp.sprintf("GL%ld ED",this->nofile);
+      ok=this->insert_key(tmp,montab);
+   }
+
+   if (!CVW_FindString("<faces count=",Ff,count)) return FALSE;
+   if (this->verbose>2) cout<<"FacesCount="<<count<<endl;
+   if (count>0)
+   {
+      med_int *tmint=new med_int[count];
+      for (int i=0; i<count; i++) Ff>>tmint[i];
+      if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+      CVWtab *montab=new CVWtab(count,tmint);
+      tmp=tmp.sprintf("GL%ld FA",this->nofile);
+      ok=this->insert_key(tmp,montab);
+   }
+
+   if (!CVW_FindString("<elements count=",Ff,count)) return FALSE;
+   if (this->verbose>2) cout<<"ElementsCount="<<count<<endl;
+   if (count>0)
+   {
+      med_int *tmint=new med_int[count];
+      for (int i=0; i<count; i++) Ff>>tmint[i];
+      if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+      CVWtab *montab=new CVWtab(count,tmint);
+      tmp=tmp.sprintf("GL%ld EL",this->nofile);
+      ok=this->insert_key(tmp,montab);
+   }
+   //Ferme le fichier :
+   Ff.close();
+   this->nbfiles++;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::ReadFileFACES(const QString FileName)
+//read file .faces (wrap)
+{
+   QString tmp;
+   fstream Ff((const char *)FileName,ios_base::in);
+   string line;
+   long nbelem,ntype;
+   bool ok;
+
+   if (!Ff.is_open())
+   {
+      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
+      return FALSE;
+   }
+
+   //Lit les données :
+   //Replace le pointeur de fichier au début :f.seekg(0);
+   if (getline(Ff,line))
+   {
+      tmp=line;
+      nbelem=tmp.section(' ',0,0).toLong(&ok);
+   }
+   else
+   {
+      cerr<<"Problem on first line of file"<<endl;
+      return FALSE;
+   }
+   if (this->verbose>2) cout<<"NumberOfElements="<<nbelem<<endl;
+   med_int *tmint=new med_int[nbelem*7];
+   for (int i=0; i<nbelem*7; i=i+7)
+   {
+      Ff>>ntype;
+      if (ntype!=3) //only triangles
+      {
+         cerr<<"Problem on ntype != 3"<<endl;
+         return FALSE;
+      }
+      for (int j=0; j<7; j++) Ff>>tmint[i+j];
+      //for (int j=0; j<7; j++) cout<<tmint[i+j]<<' '; cout<<endl;
+   }
+   if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[nbelem*7-1]<<endl;
+
+   CVWtab *montab=new CVWtab(nbelem*7,tmint);
+   tmp=tmp.sprintf("FC%ld",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   Ff.close();
+   this->nbfiles++;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::ReadFileNOBOITE(const QString FileName)
+//read file .noboite (volume)
+//for huge files it could be better use ReadFileNOBOITEB (B=binary format)
+//(parameter option of ghs3d but NOT tepal)
+{
+   QString tmp;
+   fstream Ff((const char *)FileName,ios_base::in);
+   long ne,np,npfixe,subnumber,reste;
+   bool ok;
+
+   if (!Ff.is_open())
+   {
+      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
+      return FALSE;
+   }
+
+   //lit les données :
+   Ff>>ne>>np>>npfixe;
+   if (this->verbose>2)
+   {
+      cout<<"NumberOfElements="<<ne<<endl;
+      cout<<"NumberOfVertices="<<np<<endl;
+      cout<<"NumberOfSpecifiedPoints="<<npfixe<<endl;
+   }
+   for (int i=1; i<=17-3; i++) Ff>>reste;
+   //printf("reste %ld\n",reste);
+   med_int *tmint=new med_int[ne*4];
+   for (int i=0; i<ne*4; i++) Ff>>tmint[i];
+   if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[ne*4-1]<<endl;
+
+   CVWtab *montab=new CVWtab(ne*4,tmint);
+   tmp=tmp.sprintf("NB%ld EV",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   med_float *tmflo=new med_float[np*3];
+   for (int i=0; i<np*3; i++) Ff>>tmflo[i];
+   if (this->verbose>4) cout<<"Vertices "<<tmflo[0]<<" "<<tmflo[1]<<"... "<<tmflo[np*3-1]<<endl;
+
+   montab=new CVWtab(np*3,tmflo);
+   tmp=tmp.sprintf("NB%ld VC",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   Ff>>subnumber;
+   if (this->verbose>2) cout<<"NumberOfSubdomains="<<subnumber<<endl;
+   tmint=new med_int[subnumber*3];
+   for (int i=0; i<subnumber*3; i++) Ff>>tmint[i];
+   if (this->verbose>4) cout<<"Subdomains "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[subnumber*3-1]<<endl;
+
+   montab=new CVWtab(subnumber*3,tmint);
+   tmp=tmp.sprintf("NB%ld SN",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   //beware record 6 lenght 1
+   //ferme le fichier :
+   Ff.close();
+   this->nbfiles++;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
+//read file .noboiteb (volume)
+//for huge files it could be better use ReadFileNOBOITEB (B=binary format)
+//but NOT parameter option of tepal
+//idem ReadFileNOBOITE with read unformatted
+{
+   bool ok;
+
+   cerr<<"Problem function ReadFileNOBOITEB\n"
+       <<"(no FORTRAN binary format files in tepal)\n\n";
+
+   QString tmp;
+   //file binary
+   FILE *Ff=fopen((const char *)FileName,"rb");
+   long ne,np,npfixe,reste,subnumber; /*,cube,npbli,
+        nbele,loele,nbelef,loelef,
+        nbpoi,lopoi,nbpoif,lopoif,
+        nbsub,losub,nbsubf,losubf,reste;*/
+
+   //http://www.math.utah.edu/software/c-with-fortran.html
+   //record 1 from format FORTRAN begins and ends with lengh of record
+   //=> 2*long(68)     (68=17*4octets)
+   long r1[17+2];
+
+   if (!Ff)
+   {
+      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
+      return FALSE;
+   }
+
+   //read datas :
+   fread(&r1,sizeof(long),17+2,Ff);
+   for (long i=1; i<18; i++) cout<<"R1("<<i<<")="<<r1[i]<<endl;
+
+   if (r1[0]!=68)
+   {
+      cerr<<"First FORTRAN record of File '"<<FileName<<"' not length 17*long"<<endl;
+      return FALSE;
+   }
+   ne=r1[1];
+   np=r1[2];
+   npfixe=r1[3];
+   if (this->verbose>2)
+   {
+      cout<<"NumberOfElements="<<ne<<endl;
+      cout<<"NumberOfVertices="<<np<<endl;
+      cout<<"NumberOfSpecifiedPoints="<<npfixe<<endl;
+   }
+   ///etc...could be done if necessary not debugged
+   fread(&reste,sizeof(long),1,Ff);
+   long *tlong=new long[ne*4];
+   med_int *tmint=new med_int[ne*4];
+   fread(tlong,sizeof(long),ne*4,Ff);
+   fread(&reste,sizeof(long),1,Ff);
+   for (long i=0; i<ne*4; i++) tmint[i]=tlong[i];
+   delete tlong;
+   if (this->verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[ne*4-1]<<endl;
+
+   CVWtab *montab=new CVWtab(ne*4,tmint);
+   tmp=tmp.sprintf("NB%ld EV",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   fread(&reste,sizeof(long),1,Ff);
+   //cout<<"info "<<reste<<" "<<np*3<<" "<<sizeof(med_float)<<endl;
+   float *tfloat=new float[np*3];
+   med_float *tmflo=new med_float[np*3];
+   fread(tfloat,sizeof(float),np*3,Ff);
+   fread(&reste,sizeof(long),1,Ff);
+   for (long i=0; i<np*3; i++) tmflo[i]=tfloat[i];
+   delete tfloat;
+   if (this->verbose>4) printf("Vertices %g %g ... %g \n",tmflo[0],tmflo[1],tmflo[np*3-1]);
+
+   montab=new CVWtab(np*3,tmflo);
+   tmp=tmp.sprintf("NB%ld VC",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   fread(&reste,sizeof(long),1,Ff);
+   fread(&subnumber,sizeof(long),1,Ff);
+   fread(&reste,sizeof(long),1,Ff);
+   if (this->verbose>2) cout<<"NumberOfSubdomains="<<subnumber<<endl;
+   fread(&reste,sizeof(long),1,Ff);
+   tlong=new long[subnumber*3];
+   fread(tlong,sizeof(long),subnumber*3,Ff);
+   fread(&reste,sizeof(long),1,Ff);
+   if (this->verbose>4) printf("Subdomains %ld %ld ... %ld \n",tlong[0],tlong[1],tlong[subnumber*3-1]);
+
+   tmint=new med_int[subnumber*3];
+   for (long i=0; i<subnumber*3; i++) tmint[i]=tlong[i];
+   delete tlong;
+   montab=new CVWtab(subnumber*3,tmint);
+   tmp=tmp.sprintf("NB%ld SN",this->nofile);
+   ok=this->insert_key(tmp,montab);
+
+   //beware record 6 lenght 1
+   //ferme le fichier :
+   fclose(Ff);
+   this->nbfiles++;
+   return TRUE;
+
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::ReadFilePOINTS(const QString FileName)
+//read file .points (wrap)
+{
+   QString tmp;
+   long nb;
+   Q_ULONG maxlen=128;
+   Q_LONG lg;
+   bool ok=TRUE;
+
+   //Lit les données :
+   QFile Ff(FileName);
+   //NOT Raw because Raw=non-buffered file access
+   ok=Ff.open(IO_ReadOnly|IO_Translate);
+   if (!ok)
+   {
+      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
+      return FALSE;
+   }
+
+   lg=Ff.readLine(tmp,maxlen);
+   tmp=tmp.simplifyWhiteSpace();
+   nb=tmp.toLong(&ok);
+   if (!ok)
+   {
+      cerr<<"Problem conversion File '"<<FileName<<"\n"<<endl;
+      return FALSE;
+   }
+   if (this->verbose>2) cout<<"NumberOfVertices="<<nb<<endl;
+   med_float *tmflo=new med_float[3*nb]; //coordinates
+   med_int *tmint=new med_int[nb];         //nrs (attribute of point)
+   long il3=0;
+   for ( long il=0; il<nb; il++ )
+   {
+      lg=Ff.readLine(tmp,maxlen);
+      tmp=tmp.simplifyWhiteSpace();
+      //cout<<"lu '"<<tmp<<"'"<<lg<<endl;
+      for ( int j=0; j<3; j++ )
+      {
+         tmflo[il3]=tmp.section(' ',j,j).toDouble(&ok);
+         //cout<<"cv '"<<tmflo[il3]<<"' "<<il3<<endl;
+         il3++;
+         if (!ok)
+         {
+            cerr<<"Problem conversion File '"<<FileName<<"\n"<<endl;
+            return FALSE;
+         }
+      }
+      //nrs is vertex attribute
+      tmint[il]=tmp.section(' ',3,3).toLong(&ok);
+      if (!ok)
+      {
+         cerr<<"Problem conversion File '"<<FileName<<"\n"<<endl;
+         return FALSE;
+      }
+   }
+   //beware no examples with each specified points (if any) here
+
+   {CVWtab *montab=new CVWtab(nb,tmint); //init montab->tmint nrs
+   tmp=tmp.sprintf("PO%ld NRS",this->nofile);
+   ok=this->insert_key(tmp,montab);}
+
+   {CVWtab *montab=new CVWtab(nb,tmflo); //init montab->tmflo xyz
+   tmp=tmp.sprintf("PO%ld XYZ",this->nofile);
+   ok=this->insert_key(tmp,montab);}
+
+   //Ferme le fichier :
+   Ff.close();
+   this->nbfiles++;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::list_keys_mesh_wrap()
+{
+   QDictIterator<CVWtab> it( this->mestab);
+   for ( ; it.current(); ++it )
+   {
+      string nom=it.currentKey();
+      nom.resize(20,' ');
+      cout<<nom<<"-> size="<<it.current()->size<<endl;
+   }
+   return TRUE;
+}
+
+//************************************
+long ghs3dprl_mesh_wrap::remove_all_keys_mesh_wrap()
+{
+   long nb=this->remove_key_mesh_wrap(QRegExp(".",TRUE,FALSE));
+   return nb;
+}
+
+//************************************
+long ghs3dprl_mesh_wrap::remove_key_mesh_wrap(const QRegExp &rxp)
+{
+   long nbremove=0;
+   bool remove;
+   QDictIterator<CVWtab> it(this->mestab);
+   for ( ; it.current(); ++it )
+   {
+     do
+     {
+       long i=it.currentKey().contains(rxp);
+       remove=FALSE;
+       if (i>0)
+       {
+          nbremove++;
+          if (this->verbose>4) cout<<"remove key "<<it.currentKey()<<endl;
+          delete it.current();
+          this->mestab.remove(it.currentKey());
+          remove=TRUE;
+       }
+       //All dictionary iterators that refer to the removed item
+       //will be set to point to the next item
+       //in the dictionary's traversal order
+     } while (remove);
+   }
+   return nbremove;
+}
+
+//************************************
+bool SwapOnFile(const QString &key,const QString &path,CVWtab *tab,int verbose)
+//
+{
+   //return TRUE;
+   if (tab->filename=="_NO_FILE")
+   {
+      tab->filename=path+key+".tmp";
+      tab->filename.replace(" ","_"); //replace " " by "_"
+
+      //swap disque binaire
+      //montab->tmint=new long[10]; //for test
+      //for (int i=0; i<10; i++) montab->tmint[i]=i*2;
+      FILE *fichier=fopen(tab->filename,"wb");
+      long taille;
+      taille=tab->size;
+      fwrite(&taille,sizeof(taille),1,fichier);
+      if (tab->tmint)
+      {
+         if (verbose>3)
+         cout<<"SwapOnFile in binary file "<<tab->filename<<
+         " number of elements "<<taille<<
+         " size_element med_int   "<<sizeof(med_int)<<
+         " total_size_binary " <<taille*sizeof(med_int)<<endl;
+         fwrite(tab->tmint,sizeof(med_int),taille,fichier);
+         //fread(&gagnants,sizeof(gagnants),1,fichier);
+      }
+      if (tab->tmflo)
+      {
+         if (verbose>3)
+         cout<<"SwapOnFile in binary file "<<tab->filename<<
+         " number of elements "<<taille<<
+         " size_element med_float "<<sizeof(med_float)<<
+         " total_size_binary " <<taille*sizeof(med_float)<<endl;
+         fwrite(tab->tmflo,sizeof(med_float),taille,fichier);
+      }
+      fclose(fichier);
+   }
+   else
+   {
+      if (verbose>3) cout<<"SwapOnFile in binary file done yet "<<tab->filename<<endl;
+   }
+   //deallocate because swap disk binary mode
+   tab->CVWtab_deallocate(); //free memory
+   return TRUE;
+}
+
+//************************************
+long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp)
+//
+{
+   long nb=0;
+   bool ok;
+   QDictIterator<CVWtab> it(this->mestab);
+   for ( ; it.current(); ++it )
+   {
+     long i=it.currentKey().contains(rxp);
+     if (i>0)
+     {
+        nb++;
+        if (it.current()->size>0)
+           ok=SwapOnFile(it.currentKey(),this->path,it.current(),this->verbose); //free memory
+        //if (this->verbose) cout<<"SwapOutOfMemory key "<<it.currentKey()<<endl;
+     }
+   }
+   return nb;
+}
+//************************************
+bool ghs3dprl_mesh_wrap::list_onekey_mesh_wrap(const QString &key)
+{
+   CVWtab *montab=this->mestab[key];
+   if (montab)
+   {
+      //cout<<"key "<<key<<"trouvee -> size="<<montab->size<<endl;
+      if (montab->type==1)
+         for ( long i=0; i<montab->size; i++ )
+            cout<<montab->tmint[i]<<" ";
+      if (montab->type==2)
+         for ( long i=0; i<montab->size; i++ )
+            cout<<montab->tmflo[i]<<" ";
+      cout<<endl;
+   }
+   else
+      cout<<"key "<<key<<" not found"<<endl;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::insert_key(const QString &key,CVWtab *tab)
+//insertion conditionnée par limite this->nbelem_limit_swap
+//si tableaux contenus on dimension superieure
+//alors swap disque dans getenv(tmp) fichier temporaire binaire
+{
+   bool ok;
+   if (this->verbose>4)
+      cout<<"InsertKey "<<key<<" size="<<tab->size<<endl;
+   tab->filename="_NO_FILE";
+   if (this->nbelem_limit_swap < tab->size)
+      ok=SwapOnFile(key,this->path,tab,this->verbose);
+   this->mestab.insert(key,tab);
+   return TRUE;
+}
+//************************************
+CVWtab* ghs3dprl_mesh_wrap::restore_key(const QString &key)
+//retauration conditionnée par limite nbelem
+//si tableaux contenus on dimension superieure a nbelem
+//alors swap disque dans getenv(tmp) fichier temporaire
+//alors lecture du fichier (et reallocate memory)
+{
+   CVWtab *tab=NULL;
+   tab=this->mestab[key];
+   /*if (tab) cout<<" -> size in proc "<<tab->size<<endl;
+   else cout<<" -> tab NULL\n";*/
+   if (!tab) //it is NOT a problem
+   {
+      if (this->verbose>6) cout<<"restore_key key not found "<<key<<endl;
+      return NULL;
+   }
+   if (tab->size > 0)
+   {
+      if (this->verbose>5) cout<<"restore_key direct from memory "<<key<<" size="<<tab->size<<endl;
+      return tab;
+   }
+   //restore from binary file
+   if ((tab->type<1)||(tab->type>2))
+   {
+      cerr<<"Problem restore_key from binary file "<<tab->filename<<
+               " type unexpexted "<<tab->type<<endl;
+      return NULL;
+   }
+   //cout<<"restore_key from binary file "<<tab->filename<<endl;
+
+   //swap disque binaire
+   FILE *fichier=fopen(tab->filename,"rb");
+   long taille;
+   fread(&taille,sizeof(long),1,fichier);
+   if (taille!=-tab->size)
+   {
+      cerr<<"Problem restore_key from binary file "<<tab->filename<<
+            " size unexpexted "<<taille<<" expected "<<-tab->size<<endl;
+      fclose(fichier);
+      return NULL;
+   }
+   if (tab->type==1)
+   {
+      if (this->verbose>5)
+      cout<<"restore_key from binary file "<<tab->filename<<
+            " number of elements "<<taille<<
+            " size_element med_float "<<sizeof(med_float)<<
+            " total_size_binary " <<taille*sizeof(med_float)<<endl;
+
+      //allocate because swap disque binaire
+      tab->tmint=new med_int[taille]; //allocate memory
+      fread(tab->tmint,sizeof(med_int),taille,fichier);
+   }
+   if (tab->type==2)
+   {
+      if (this->verbose>5)
+      cout<<"restore_key from binary file "<<tab->filename<<
+            " number of elements "<<taille<<
+            " size_element med_float "<<sizeof(med_float)<<
+            " total_size_binary " <<taille*sizeof(med_float)<<endl;
+      //allocate because swap disque binaire
+      tab->tmflo=new med_float[taille]; //allocate memory
+      for (int i=0; i<taille ; i++) tab->tmflo[i]=-1e0;
+      fread(tab->tmflo,sizeof(med_float),taille,fichier);
+      /*for (int i=0; i<taille ; i++) cout<<tab->tmflo[i]<<"/";
+      cout<<endl;*/
+   }
+   fclose(fichier);
+   tab->size=-tab->size;
+   return tab;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::test_msg_wrap()
+//tests sur resultats fichiers msg
+{
+   QString key1,key2,typ="FA VE ED EL"; //pour faces vertice edges elements
+   CVWtab *tab1,*tab2;
+   bool ok=TRUE;
+   //test send=receive
+   //numerotations locales sont identiques
+   long nb=typ.contains(' ',TRUE) + 1; //nb chiffres detectes
+   for (long i=0; i < nb; i++)
+   for (long ifile=1; ifile <= this->nbfiles; ifile++)
+   for (long ineig=1; ineig <= this->nbfiles; ineig++)
+   {
+      if (ifile==ineig) continue; //impossible
+      key1=key1.sprintf("MS%ld NE%ld ",ifile,ineig)+typ.section(' ',i,i)+" SE";
+      key2=key2.sprintf("MS%ld NE%ld ",ifile,ineig)+typ.section(' ',i,i)+" RE";
+      //cout<<"key "<<key1<<" et key "<<key2<<endl;
+      tab1=this->restore_key(key1);
+      //tab1=this->mestab[key1];
+      tab2=this->restore_key(key2);
+      //tab2=this->mestab[key2];
+      //cout<<"sortie key "<<key1<<" et key "<<key2<<endl;
+      if (!tab1 && !tab2) continue; //case not neighbours
+      if (!tab1)
+      {  cout<<"key "<<key1<<" inexistante avec key "<<key2<<" existante"<<endl;
+         ok=FALSE;
+      }
+      else
+      {
+       if (!tab2)
+       {  cout<<"key "<<key2<<" inexistante avec key "<<key1<<" existante"<<endl;
+          ok=FALSE;
+       }
+       else
+        if (!tab1->is_equal(tab2))
+        {  cout<<"key "<<key1<<" et key "<<key2<<" de contenu differents"<<endl;
+           ok=FALSE;
+        }
+      }
+      /*else
+         printf("key '%s' et key '%s' identiques \n",
+                           (const char *)key2,(const char *)key1);*/
+   }
+
+   //test size neighbourg=ifile
+   //numerotations locales sont differentes mais de tailles identiques
+   //pas besoin de verifier " RE " car deja fait au dessus
+   for (long i=0; i < nb; i++)
+   for (long ifile=1; ifile <= this->nbfiles; ifile++)
+   for (long ineig=ifile+1; ineig <= this->nbfiles; ineig++)
+   {
+      if (ifile==ineig) continue; //cas impossible
+      key1=key1.sprintf("MS%ld NE%ld ",ifile,ineig)+typ.section(' ',i,i)+" SE";
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      key2=key2.sprintf("MS%ld NE%ld ",ineig,ifile)+typ.section(' ',i,i)+" SE";
+      tab2=this->restore_key(key2); //tab2=this->mestab[key2];
+      if (!tab1 && !tab2) continue; //case not neighbours
+      if (!tab1)
+      {  cout<<"key "<<key1<<" inexistante avec key "<<key2<<" existante"<<endl;
+         ok=FALSE;
+      }
+      else
+      {
+       if (!tab2)
+       {  cout<<"key "<<key2<<" inexistante avec key "<<key1<<" existante"<<endl;
+          ok=FALSE;
+       }
+       else
+        if ((tab1->type!=tab2->type)||(tab1->size!=tab2->size))
+        {  cout<<"key "<<key1<<" et key "<<key2<<" de type ou tailles differents"<<endl;
+           ok=FALSE;
+        }
+      }
+   }
+   return ok;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::test_vertices_wrap()
+//tests sur vertices
+{
+   QString key1,key2,key11,key22,key11old,key22old;
+   CVWtab *tab1,*tab2,*tab11,*tab22;
+   bool ok=TRUE;
+   key11old="_NO_KEY";key22old="_NO_KEY";
+   //test size neighbourg=ifile
+   //numerotations locales sont differentes mais de tailles identiques
+   //pas besoin de verifier " RE " car deja fait au dessus
+   //for (int ifile=1; ifile <= this->nbfiles; ifile++)
+   //for (int ineig=ifile+1; ineig <= this->nbfiles; ineig++)
+   for (int ifile=this->nbfiles; ifile >= 1; ifile--)
+   for (int ineig=this->nbfiles; ineig >= ifile+1; ineig--)
+   {
+      if (ifile==ineig) continue; //cas impossible
+      key1=key1.sprintf("MS%d NE%d VE SE",ifile,ineig);
+      key11=key11.sprintf("NB%d VC",ifile);
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      key2=key2.sprintf("MS%d NE%d VE SE",ineig,ifile);
+      key22=key22.sprintf("NB%d VC",ineig);
+      tab2=this->restore_key(key2); //tab2=this->mestab[key2];
+      if (!tab1 && !tab2) continue; //cas non voisins
+      if (!tab1)
+      {
+         cerr<<"TestEqualityCoordinates key "<<key1<<" NOT existing but key "<<key2<<" existing"<<endl;
+         ok=FALSE; continue;
+      }
+      if (!tab2)
+      {
+         cerr<<"TestEqualityCoordinates key "<<key2<<" NOT existing but key "<<key1<<" existing"<<endl;
+         ok=FALSE; continue;
+      }
+      if (tab1->size!=tab2->size)
+      {
+         cerr<<"TestEqualityCoordinates key "<<key1<<" and key "<<key2<<" NOT same size"<<endl;
+         ok=FALSE; continue;
+      }
+      if (ok)
+      {
+         //Swap out of memory if no use
+         if ((key11old!=key11)&&(key11old!=key22))
+            this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key11old,TRUE,FALSE));
+         if ((key22old!=key11)&&(key22old!=key22))
+            this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key22old,TRUE,FALSE));
+
+         tab11=this->restore_key(key11); //tab11=this->mestab[key11];
+         tab22=this->restore_key(key22); //tab22=this->mestab[key22];
+         long i1,i2;
+         bool ok1=TRUE;
+         //test on equality of xyz_coordinates of commons vertices
+         for  (long j=0; j < tab1->size-1; j++)
+         {
+            i1=tab1->tmint[j];
+            i2=tab2->tmint[j];
+            //1 for print vertices not equals
+            if (!CVW_is_equal_vertices(tab11,i1,tab22,i2,1))
+            {
+               cerr<<j<<" Vertice "<<i1<<" != Vertice "<<i2<<"\n"<<endl;
+               ok=FALSE; ok1=FALSE;
+            }
+         }
+         if ((this->verbose>2)&&(ok1))
+            cout<<"TestEqualityCoordinates "<<tab1->size<<
+                  " Vertices "<<key1<<" and "<<key2<<" ok"<<endl;
+         if (!ok1)
+            cerr<<"TestEqualityCoordinates "<<tab1->size<<
+                  " Vertices "<<key1<<" and "<<key2<<" NO_OK"<<endl;
+         key11old=key11; key22old=key22;
+      }
+   }
+   //Swap out of memory (supposed no use?)
+   //NO because NB1&NB2 VC supposed future use
+   //YES precaution
+   this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key11old,TRUE,FALSE));
+   this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key22old,TRUE,FALSE));
+   return ok;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::Write_MEDfiles()
+{
+   bool ok=FALSE,oklocal;
+   QString key1,tmp,filename;
+   CVWtab *tab1,*tab2;
+   med_err err;
+   char namelocal[MED_TAILLE_NOM+1];  //no more 32
+   char distfilename[MED_TAILLE_DESC+1];
+   char description[MED_TAILLE_DESC+1];
+
+   //remove path
+   //precaution because casename->med_namelocal no more 32 character
+   //if path, in this->path.
+   //20 preserve for add postfixes "_idom" etc...
+   this->casename=this->casename.section('/',-1);
+   if (this->casename.length()>20)
+   {
+      cerr<<"CaseNameMed truncated (no more 20 characters)"<<endl;
+      this->casename.truncate(20);
+   }
+   filename=this->path+this->casename;
+   ofstream file(filename); //master file
+   file<<"#MED Fichier V 2.3"<<" "<<endl;
+   file<<"# NumbersOfSubDomains"<<" "<<endl;
+   int nbdomains=this->nbfiles;
+   file<<nbdomains<<" "<<endl;
+
+   //loop on the domains
+   for (int idom=1; idom<=nbdomains; idom++)
+   {
+      oklocal=TRUE;
+      ostringstream suffix;
+      suffix<<filename<<"_"<<idom<<".med";
+      strcpy(distfilename,suffix.str().c_str());
+      //tmp=filename+tmp.sprintf("_%d.med",idom);
+      //strcpy(distfilename,tmp);
+      if (this->verbose>0)
+      {
+         if (this->verbose>2) cout<<endl;
+         cout<<"CreateMEDFile "<<idom<<" "<<distfilename<<endl;
+      }
+
+      med_idt fid=MEDouvrir(distfilename,MED_CREATION);
+      if (fid<0) cerr<<"Problem MEDouvrir "<<distfilename<<endl;
+
+      //updating the ascii master description file
+      tmp=tmp.sprintf(this->casename+"_%d",idom);
+      file<<this->casename<<" "<<idom<<" "<<
+            tmp<<" "<<"localhost "<<distfilename<<" "<<endl;
+
+      //create mesh
+      strcpy(namelocal,tmp);
+      tmp=tmp.sprintf("domain %d among %d",idom,nbdomains);
+      strcpy(description,tmp);
+      if (this->verbose>4) cout<<"File "<<distfilename<<" : "<<description<<endl;
+      //cout<<namelocal<<":"<<description<<endl
+      err=MEDmaaCr(fid,namelocal,3,MED_NON_STRUCTURE,description);
+      if (err<0) cerr<<"Problem MEDmaaCr"<<endl;
+
+      //writing node(vertices) coordinates
+      //NBx VC=files.NoBoite Vertex Coordinates
+      //                                123456789012345612345678901234561234567890123456
+      char nomcoo[3*MED_TAILLE_PNOM+1]="x               y               z               ";
+      char unicoo[3*MED_TAILLE_PNOM+1]="?               ?               ?               ";
+      key1=key1.sprintf("NB%d VC",idom); //files.NoBoite Vertex Coordinates
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      med_int nbnodes=tab1->size/3;
+
+      /*(med_idt fid, char *maa, med_int mdim, med_float *coo,
+         med_mode_switch mode_switch, med_int n,
+         med_repere type_rep, char *nom, char *unit)*/
+      err=MEDcoordEcr(fid,namelocal,3,tab1->tmflo,MED_FULL_INTERLACE,
+                                      nbnodes,MED_CART,nomcoo,unicoo);
+      if (err<0) cerr<<"Problem MEDcoordEcr"<<endl;
+      if (this->verbose>4)cout<<"NumberOfNodes="<<nbnodes<<endl;
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key1,TRUE,FALSE));
+
+      //writing indices of nodes
+      med_int *arrayi=new med_int[nbnodes];
+      for (long i=0; i<nbnodes ; i++) arrayi[i]=i+1;
+      med_2_2::med_geometrie_element medgeoele0=(med_2_2::med_geometrie_element) 0;
+      err=MEDnumEcr(fid,namelocal,arrayi,nbnodes,MED_NOEUD,medgeoele0);
+      if (err<0) cerr<<"Problem MEDnumEcr of nodes"<<endl;
+      delete[] arrayi;
+
+      //writing connectivity of faces triangles of wrap by nodes
+      key1=key1.sprintf("FC%d",idom); //files.FaCes faces (wrap and triangles only)
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      med_int nbfaces=tab1->size/7;
+      if (this->verbose>4) cout<<"NumberOfTrianglesOfWrap="<<nbfaces<<endl;
+      arrayi=new med_int[nbfaces*3];
+      long ii=0,i=0 ;
+      for (long j=0; j<nbfaces ; j++)
+      {
+         arrayi[ii]=tab1->tmint[i]; ii++;
+         arrayi[ii]=tab1->tmint[i+1]; ii++;
+         arrayi[ii]=tab1->tmint[i+2]; ii++;
+         i=i+7;
+      }
+      err=MEDconnEcr(fid,namelocal,3,arrayi,MED_FULL_INTERLACE,nbfaces,MED_FACE,MED_TRIA3,MED_NOD);
+      if (err<0) cerr<<"Problem MEDconnEcr for triangles connectivity"<<endl;
+      delete[] arrayi;
+
+      //writing indices of faces triangles of wrap
+      //caution!
+      //generate "overlapping of numbers of elements" in "import med file" in salome
+      //if not in "//writing indices of tetraedes" -> arrayi[i]=!NBFACES!+i+1
+      arrayi=new med_int[nbfaces];
+      for (long i=0; i<nbfaces ; i++) arrayi[i]=i+1;
+      err=MEDnumEcr(fid,namelocal,arrayi,nbfaces,MED_FACE,MED_TRIA3);
+      if (err<0) cerr<<"Problem MEDnumEcr of triangles"<<endl;
+      delete[] arrayi;
+
+      //create global family wrap default
+      char nomfam[MED_TAILLE_NOM+1]="PART_OF_GLOBAL_WRAP";
+      char attdes[MED_TAILLE_DESC+1]="part of wrap of global volume";
+      char gro[MED_TAILLE_LNOM+1]="PART_OF_GLOBAL_WRAP";
+      med_int numfam,attide,attval,natt,ngro,numfam_ini_wrap=200;
+      //caution numfam_ini_wrap!=numfam_ini_nodes
+      numfam=-numfam_ini_wrap; attide=1; attval=numfam; natt=1; ngro=1;
+      err=MEDfamCr(fid,namelocal,nomfam,numfam,&attide,&attval,attdes,natt,gro,ngro);
+      if (err<0) cerr<<"Problem MEDfamCr of "<<nomfam<<endl;
+
+      //for joints
+      //init default indices of families of faces triangles of wrap = -numfam_ini_wrap
+      //(for faces not in joints=PART_OF_GLOBAL_WRAP, why not!)
+      //others -> -numfam_ini_wrap-indice_of_neighbourg ([1;number_of_neighbourg])
+      //(for existing joints)
+      int sizefamilies=nbfaces;
+      med_int *familiesi=new med_int[sizefamilies];
+      for (int i=0; i<sizefamilies ; i++) familiesi[i]=-numfam_ini_wrap;
+
+      //families known in faces in wrap PART_OF_GLOBAL_WRAP
+      //writing indices of families of faces triangles of wrap = nsd why not?
+      //not implemented yet because subdomain(s) of family PART_OF_GLOBAL_WRAP
+      /*arrayi=new med_int[nbfaces];
+      for (int i=0; i<nbfaces ; i++) arrayi[i]=tab1->tmint[(i*7)+3];
+      err=MEDfamEcr(fid,namelocal,arrayi,nbfaces,MED_FACE,MED_TRIA3);
+      if (err<0) cerr<<"Problem MEDfamEcr faces of wrap"<<endl;
+      delete[] arrayi;*/
+
+      //writing connectivity of tetraedes by nodes
+      key1=key1.sprintf("NB%d EV",idom); //files.NoBoite Elements Vertices (tetra only)
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      med_int nbtetras=tab1->size/4;
+      if (this->verbose>4) cout<<"NumberOfTetraedes="<<nbtetras<<endl;
+      //arrayi=new med_int[tab1->size];
+      //for (long i=0; i<tab1->size ; i++) arrayi[i]=tab1->tmint[i];
+      err=MEDconnEcr(fid,namelocal,3,tab1->tmint,MED_FULL_INTERLACE,nbtetras,MED_MAILLE,MED_TETRA4,MED_NOD);
+      if (err<0) cerr<<"Problem MEDconnEcr for tetra connectivity"<<endl;
+      //delete[] arrayi;
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key1,TRUE,FALSE));
+
+      //writing indices of tetraedes
+      arrayi=new med_int[nbtetras];
+      for (long i=0; i<nbtetras ; i++) arrayi[i]=nbfaces+i+1;
+      err=MEDnumEcr(fid,namelocal,arrayi,nbtetras,MED_MAILLE,MED_TETRA4);
+      if (err<0) cerr<<"Problem MEDnumEcr of tetraedes"<<endl;
+      delete[] arrayi;
+
+      //writing indices of families of nodes = nrs why not?
+      //before create families of nodes fonction of existing values of nrs of files .points
+      arrayi=new med_int[nbnodes];
+      key1=key1.sprintf("PO%d NRS",idom); //files.POints Vertex of wrap
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      med_int nbwrap=tab1->size;
+      //families known in points in wrap
+      //more than 30 families is stupid? (too many)?
+      int itest,i2,ifam[30],imax=1,imess=0,numfam_ini_nodes=numfam_ini_wrap-100;
+      //caution numfam_ini_wrap!=numfam_ini_nodes
+      //ifam[:]<-existing values of nrs (in [0,97])
+      //ifam[0]<-first family default=99 for new nodes IN volume (out of wrap)
+      ifam[0]=99;
+      for (int i=0; i<nbwrap ; i++)
+      {
+         itest=tab1->tmint[i];
+         if ((itest<0)||(itest>97))
+         {
+            if (imess==0)
+            {
+               cerr<<"Problem for domain "<<idom<<" nrs="<<itest<<
+                     " shoud be in [0;97] forced 98"<<endl;
+               imess=1; //message only once
+            }
+            itest=98; //0<=nrs<=97 precaution 98=family garbage
+         }
+         arrayi[i]=-numfam_ini_nodes-itest;
+         i2=0;
+         while (1)
+         {
+            if (i2==imax)
+            {
+               ifam[imax]=itest ; imax++ ; break;
+            }
+            if (itest==ifam[i2]) break;
+            i2++;
+            if (i2>=30) break;
+         }
+         if (imax>=30) {
+            cerr<<"Problem more than 30 families of nodes"<<endl;
+            break;
+         }
+      }
+      for (int i=0 ; i<imax ; i++)
+      {
+         //create families of nodes as nrs
+         if (i==0)
+            tmp=tmp.sprintf("IN_VOLUME");
+         else
+            tmp=tmp.sprintf("NRS_%d",ifam[i]);
+         strcpy(nomfam,tmp);
+         if (this->verbose>2) cout<<"CreateFamilyOfNodes_"<<nomfam<<endl;
+         strcpy(gro,tmp);
+         if(i==0)
+            tmp=tmp.sprintf("nodes in local volume");
+         else
+            tmp=tmp.sprintf("nodes of nrs_%d on local wrap",ifam[i]);
+         strcpy(attdes,tmp);
+         numfam=-numfam_ini_nodes-ifam[i];
+         //attide=1;
+         attval=numfam;
+         //natt=1;
+         ngro=1;
+         if (this->verbose>4) cout<<"MEDfamCr (nodes) of "<<nomfam<<" / "<<attdes<<" / FamilyNumber="<<numfam<<endl;
+         err=MEDfamCr(fid,namelocal,nomfam,numfam,&attide,&attval,attdes,natt,gro,ngro);
+         if (err<0) cerr<<"Problem MEDfamCr of "<<nomfam<<endl;
+      }
+      //defaults ifam[0] for new points in new volume
+      for (int i=nbwrap; i<nbnodes ; i++) arrayi[i]=-numfam_ini_nodes-ifam[0];
+
+      err=MEDfamEcr(fid,namelocal,arrayi,nbnodes,MED_NOEUD,medgeoele0);
+      if (err<0) cerr<<"Problem MEDfamEcr nodes"<<endl;
+      delete[] arrayi;
+
+/*Le nom du maillage local est une chaîne de MED_TAILLE_NOM (32) caractères.
+  Le tableau des numéros "num" est un tableau à 1 dimension de taille égale à "n".
+  Les numéros globaux sont obligatoirement supérieur à 1
+  Le type de l'entite "typent" est soit MED_NOEUD,MED_MAILLE, MED_FACE ou MED_ARETE.
+  Le type géométrique peut être :
+  Pour les noeuds : 0.
+  Pour les mailles : MED_POINT1, MED_SEG2, MED_SEG3, MED_TRIA3, MED_TRIA6, MED_QUAD4, MED_QUAD8, MED_POLYGONE.
+  Pour les faces : MED_TRIA3, MED_TRIA6, MED_QUAD4, MED_QUAD8, MED_POLYGONE.
+  Pour les arêtes : MED_SEG2 et MED_SEG3.*/
+
+      //writing nodes(vertices) global numbering
+      //GLx VE=files.GLo VErtices
+      key1=key1.sprintf("GL%d VE",idom);
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      nbnodes=tab1->size;
+      if (this->verbose>2)
+         cout<<"CreateMEDglobalNumerotation_Nodes "<<key1<<" "<<tab1->size<<endl;
+      if (nbnodes<=0) cerr<<"Problem MEDglobalNumEcr not in memory"<<endl;
+      //arrayi=new med_int[nbnodes];
+      //for (int i=0; i<tab1->size ; i++) arrayi[i]=tab1->tmint[i];
+      //med_2_2::med_geometrie_element toto=MED_POINT1;
+      //cout<<"MED_POINT1="<<toto<<" medgeoele0="<<medgeoele0<<endl;
+      /*MEDglobalNumEcr(med_idt fid,  char *maa, med_int *num, med_int n,
+               med_entite_maillage type_ent, med_geometrie_element type_geo)*/
+      err=MEDglobalNumEcr(fid,namelocal,tab1->tmint,nbnodes,MED_NOEUD,medgeoele0);
+      if (err<0) cerr<<"Problem MEDglobalNumEcr nodes"<<endl;
+      //cout<<"MEDglobalNumEcr vertices size="<<nbnodes<<endl;
+      //delete[] arrayi;
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key1,TRUE,FALSE));
+
+      //writing faces(triangles) global numbering
+      //GLx FA=files.GLo FAces
+      key1=key1.sprintf("GL%d FA",idom);
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      nbfaces=tab1->size;
+      //arrayi=new med_int[nbfaces];
+      //for (int i=0; i<tab1->size ; i++) arrayi[i]=tab1->tmint[i];
+      if (this->verbose>2)
+         cout<<"CreateMEDglobalNumerotation_Faces "<<key1<<" "<<tab1->size<<endl;
+      err=MEDglobalNumEcr(fid,namelocal,tab1->tmint,nbfaces,MED_FACE,MED_TRIA3);
+      if (err<0) cerr<<"Problem MEDglobalNumEcr faces"<<endl;
+      //cout<<"MEDglobalNumEcr faces size="<<nbfaces<<endl;
+      //delete[] arrayi;
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key1,TRUE,FALSE));
+
+      //writing tetraedes global numbering
+      //GLx EL=files.GLo ELements
+      key1=key1.sprintf("GL%d EL",idom);
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      med_int nbtetrasglo=tab1->size;
+      if (nbtetrasglo!=nbtetras)
+         cerr<<"Problem incorrect size of tetraedes global numbering"<<endl;
+      //arrayi=new med_int[nbtetrasglo];
+      //for (int i=0; i<tab1->size ; i++) arrayi[i]=tab1->tmint[i];
+      if (this->verbose>2)
+         cout<<"CreateMEDglobalNumerotation_Tetraedes "<<key1<<" "<<tab1->size<<endl;
+      err=MEDglobalNumEcr(fid,namelocal,tab1->tmint,nbtetrasglo,MED_MAILLE,MED_TETRA4);
+      if (err<0) cerr<<"Problem MEDglobalNumEcr tetraedes"<<endl;
+      //cout<<"MEDglobalNumEcr tetraedes size="<<nbtetrasglo<<endl;
+      //delete[] arrayi;
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key1,TRUE,FALSE));
+
+      //writing joints
+      for (int ineig=1; ineig <= this->nbfiles; ineig++)
+      {
+         char namejnt[MED_TAILLE_NOM+1];  //no more 32
+         char namedist[MED_TAILLE_NOM+1];
+         char descjnt[MED_TAILLE_DESC+1];
+
+         if (idom==ineig) continue; //impossible
+         key1=key1.sprintf("MS%d NE%d VE SE",idom,ineig); //SE or RE?
+         tab1=this->restore_key(key1);
+         if (!tab1) continue; //case (ifile,ineig) are not neighbours=>no joints
+         key1=key1.sprintf("MS%d NE%d VE RE",idom,ineig); //SE or RE
+         tab2=tab1; //tab2=this->restore_key(key1); //no need because <send> equals <receive>
+         if (!tab2) cerr<<"Problem nodes joint <send> with no <receive> in file .msg"<<endl;
+         nbnodes=tab1->size;
+
+         if (this->verbose>4)
+            cout<<"NumberOfNodesOfJoint_"<<ineig<<"="<<nbnodes<<endl;
+         strcpy(namejnt,tmp.sprintf("joint_%d",ineig));
+         tmp=tmp.sprintf("joint_%d among %d domains of ",ineig,nbdomains)+namelocal;
+         strcpy(descjnt,tmp);
+         //cout<<descjnt<<endl;
+         strcpy(namedist,tmp.sprintf("joint_%d",idom)); //or this->casename+"_%d",ineig));
+         err=MEDjointCr(fid,namelocal,namejnt,descjnt,ineig,namedist);
+         if (err<0) cerr<<"Problem MEDjointCr"<<endl;
+
+         //writing correspondence nodes-nodes
+         //two indices for one correspondence
+         arrayi=new med_int[nbnodes*2];
+         ii=0;
+         for (int i=0; i<nbnodes ; i++)
+         {
+            //no need because <send> equals <receive> tab1->tmint[i]==tab2->tmint[i]
+            arrayi[ii]=tab1->tmint[i]; ii++;
+            arrayi[ii]=tab2->tmint[i]; ii++;
+         }
+         err=MEDjointEcr(fid,namelocal,namejnt,arrayi,nbnodes,
+                           MED_NOEUD,medgeoele0,MED_NOEUD,medgeoele0);
+         if (err<0) cerr<<"Problem MEDjointEcr nodes"<<endl;
+         delete[] arrayi;
+
+         //writing correspondence triangles-triangles
+         key1=key1.sprintf("MS%d NE%d FA SE",idom,ineig); //SE or RE?
+         tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+         if (!tab1)
+         {
+            if (this->verbose>4)
+               cout<<"NumberOfTrianglesOfJoint_"<<ineig<<"="<<0<<endl;
+            continue; //case (ifile,ineig) are not neighbours=>no joints
+         }
+         key1=key1.sprintf("MS%d NE%d FA RE",idom,ineig); //SE or RE?
+         tab2=tab1; //tab2=this->restore_key(key1); //no need because <send> equals <receive>
+         if (!tab2) cerr<<"Problem triangles joint send with no receive"<<endl;
+         med_int nbtriangles=tab1->size;
+
+         if (this->verbose>4)
+            cout<<"NumberOfTrianglesOfJoint_"<<ineig<<"="<<nbtriangles<<endl;
+         arrayi=new med_int[nbtriangles*2];
+         ii=0;
+         for (int i=0; i<nbtriangles ; i++)
+         {
+            //no need because <send> equals <receive> tab1->tmint[i]==tab2->tmint[i]
+            arrayi[ii]=tab1->tmint[i]; ii++;
+            familiesi[tab1->tmint[i]-1]=-numfam_ini_wrap-ineig;
+            arrayi[ii]=tab2->tmint[i]; ii++;
+            //cout<<arrayi[ii-1]<<"="<<arrayi[ii-2]<<endl;
+         }
+         err=MEDjointEcr(fid,namelocal,namejnt,arrayi,nbtriangles,MED_FACE,MED_TRIA3,MED_FACE,MED_TRIA3);
+         if (err<0) cerr<<"Problem MEDjointEcr triangles"<<endl;
+         delete[] arrayi;
+
+         tmp=tmp.sprintf("JOINT_%d",ineig);
+         strcpy(nomfam,tmp);
+
+         //err=MEDnumEcr(fid,nomfam,arrayi,nbtriangles,MED_FACE,MED_TRIA3);
+         //if (err<0) cerr<<"Problem MEDnumEcr of triangles of "<<nomfam<<endl;
+
+         //char gro[MED_TAILLE_LNOM+1]="PART_OF_GLOBAL_WRAP_PLUS_JOINTS";
+         strcpy(gro,tmp);
+         /*char gro[MED_TAILLE_LNOM*2+1];
+         strcpy(gro,"PART_OF_GLOBAL_WRAP_PLUS_JOINTS    ");
+         for (int i=32;i<MED_TAILLE_LNOM;i++) gro[i]=' ';
+         gro[MED_TAILLE_LNOM]='\0';
+         strcat(gro,tmp);
+         //for (i=7;i<MED_TAILLE_LNOM;i++) gro[MED_TAILLE_LNOM+i]=' ';
+         //gro[2*MED_TAILLE_LNOM]='\0';*/
+
+         tmp=tmp.sprintf("joint of neighbourg_%d on local wrap",ineig);
+         strcpy(attdes,tmp);
+         numfam=-numfam_ini_wrap-ineig;
+         //attide=1;
+         attval=numfam;
+         //natt=1;
+         ngro=1;
+         if (this->verbose>2)
+            cout<<"CreateFamilyOfFaces_"<<nomfam<<endl;
+         if (this->verbose>4) cout<<"MEDfamCr (faces) of "<<nomfam<<" / "<<attdes<<" / FamilyNumber="<<numfam<<endl;
+
+         err=MEDfamCr(fid,namelocal,nomfam,numfam,&attide,&attval,attdes,natt,gro,ngro);
+         if (err<0) cerr<<"Problem MEDfamCr of "<<nomfam<<endl;
+
+      }
+      //writing indices of families of faces triangles of wrap = joint<-100 or not=100?
+      //arrayi=new med_int[nbtriangles];
+      //families known in faces in wrap
+      //for (int i=0; i<nbtriangles ; i++) arrayi[i]=-100-ineig; //tab1->tlong[(i*7)+3];
+      err=MEDfamEcr(fid,namelocal,familiesi,sizefamilies,MED_FACE,MED_TRIA3);
+      if (err<0) cerr<<"Problem MEDfamEcr faces of all joints"<<endl;
+      delete[] familiesi;
+
+      MEDfermer(fid);
+
+      //examples of test of med files ( ... for me!)
+      //../Salome_321/med_231_install/bin/medconforme exemple11.med
+      //../Salome_321/hdf5-1.6.3/bin/h5dump exemple11.med
+      //../Salome_321/med_231_install/bin/mdump exemple11.med
+   }
+   return ok;
+}
+
diff --git a/src/tepal2med/ghs3dprl_mesh_wrap.h b/src/tepal2med/ghs3dprl_mesh_wrap.h
new file mode 100755 (executable)
index 0000000..8073fa7
--- /dev/null
@@ -0,0 +1,68 @@
+
+#ifndef GHS3DPRL_MESH_WRAP_H
+#define GHS3DPRL_MESH_WRAP_H
+
+#include <qdict.h>
+#include <qregexp.h>
+
+//Med File V 2.2 attributes
+#undef MED_H
+#undef MED_PROTO_H
+namespace med_2_2 {
+  extern "C" {
+#include <med.h>
+#include <med_proto.h>
+  }
+}
+
+using namespace med_2_2;
+
+class CVWtab
+//contains size=size of vector and the vector (med_int or med_float)
+{
+public:
+   long size,type;
+   med_int *tmint;   //integer med
+   med_float *tmflo; //float med
+   QString filename;
+
+   CVWtab(long nb, med_int *pmint);
+   CVWtab(long nb, med_float *pmflo);
+   ~CVWtab();
+   bool CVWtab_deallocate();
+   bool is_equal(CVWtab *tab2);
+};
+
+class ghs3dprl_mesh_wrap
+{
+public:
+   QString casename,path;
+   long
+      nofile,nbfiles,
+      nbelem_limit_swap,
+      verbose;
+   QDict<CVWtab> mestab;
+
+   //low level
+   bool list_keys_mesh_wrap(); //list keys
+   bool list_onekey_mesh_wrap(const QString &key);
+   long remove_key_mesh_wrap(const QRegExp &rxp);
+   long remove_all_keys_mesh_wrap();
+   bool insert_key(const QString &key,CVWtab *tab);
+   CVWtab* restore_key(const QString &key);
+
+   //test level
+   bool test_msg_wrap();
+   bool test_vertices_wrap();
+
+   //hight level
+   long SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp);
+   bool ReadFileGLO(const QString FileName);
+   bool ReadFileFACES(const QString FileName);
+   bool ReadFileNOBOITE(const QString FileName);
+   bool ReadFileNOBOITEB(const QString FileName);
+   bool ReadFilePOINTS(const QString FileName);
+   bool Write_MEDfiles();
+};
+
+#endif
diff --git a/src/tepal2med/ghs3dprl_msg_parser.cxx b/src/tepal2med/ghs3dprl_msg_parser.cxx
new file mode 100755 (executable)
index 0000000..74f5a69
--- /dev/null
@@ -0,0 +1,248 @@
+
+//#include <stdio.h>
+//#include <qstring.h>
+#include <iostream>
+
+#include "ghs3dprl_msg_parser.h"
+#include "ghs3dprl_mesh_wrap.h"
+
+using namespace std;
+using namespace med_2_2;
+
+//************************************
+bool ghs3dprl_msg_parser::startDocument()
+{
+   indent="";
+   begin="distene_msg",
+   version="version",
+   neighbours="neighbours";
+   count="count";
+   neighbour="neighbour";
+   indice="indice";
+   send="send";
+   vertices="vertices";
+   edges="edges";
+   faces="faces";
+   elements="elements";
+   receive="receive";
+   etat=0;
+   neighbourscount=0;
+   neighbourcourant=0;
+   neighbourindice=0;
+   nbcount=0;
+   verbose=FALSE; //TRUE; //FALSE;
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_msg_parser::startElement(const QString &namespaceURI,
+                                   const QString &localName,
+                                   const QString &qName,
+                                   const QXmlAttributes &attrs)
+{
+   bool ok;
+   if (verbose) cout<<indent<<qName<<endl;
+   typel=qName; shorttypel="";
+   indent += "   ";
+   if (qName==version)
+   {
+      etat=1;
+      return TRUE;
+   }
+
+   if (qName==neighbours)
+   {
+      etat=2;
+      if (attrs.count()>0 && attrs.localName(0)==count)
+      {
+        neighbourscount=attrs.value(0).toLong(&ok, 10);
+        neighbourcourant=-1;
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<neighbourscount<<endl;
+      }
+      return TRUE;
+   }
+
+   if (qName==neighbour)
+   {
+      etat=3;
+      if (attrs.count()>0 && attrs.localName(0)==indice)
+      {
+        neighbourindice=attrs.value(0).toLong(&ok, 10);
+        neighbourcourant++;
+        //mailw.neighbourindices[mailw.neighbourcourant]=neighbourindice;
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<neighbourindice<<endl;
+      }
+      return TRUE;
+   }
+
+   if (qName==send)
+   {
+      etat=4;
+      sendreceive="s/r=send ";
+      shortsendreceive="SE ";
+      return TRUE;
+   }
+
+   if (qName==receive)
+   {
+      etat=9;
+      sendreceive="s/r=receive ";
+      shortsendreceive="RE ";
+      return TRUE;
+   }
+
+   if (qName==vertices)
+   {
+      etat=5;
+      shorttypel="VE ";
+      if (attrs.count()>0 && attrs.localName(0)==count)
+      {
+        nbcount=attrs.value(0).toLong(&ok, 10);
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<nbcount<<endl;
+      }
+      return TRUE;
+   }
+
+   if (qName==edges)
+   {
+      etat=6;
+      shorttypel="ED ";
+      if (attrs.count()>0 && attrs.localName(0)==count)
+      {
+        nbcount=attrs.value(0).toLong(&ok, 10);
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<nbcount<<endl;
+      }
+      return TRUE;
+   }
+
+   if (qName==faces)
+   {
+      etat=7;
+      shorttypel="FA ";
+      if (attrs.count()>0 && attrs.localName(0)==count)
+      {
+        nbcount=attrs.value(0).toLong(&ok, 10);
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<nbcount<<endl;
+      }
+      return TRUE;
+   }
+
+   if (qName==elements)
+   {
+      etat=8;
+      shorttypel="EL ";
+      if (attrs.count()>0 && attrs.localName(0)==count)
+      {
+        nbcount=attrs.value(0).toLong(&ok, 10);
+        if (verbose) cout<<indent<<attrs.localName(0)<<
+                           "="<<nbcount<<endl;
+      }
+      return TRUE;
+   }
+
+   /*for( int i=0; i<attrs.count(); i++ )
+      {
+      cout<<indent<<attrs.localName(i)<<"="<<attrs.value(i)<<endl;
+      }*/
+
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_msg_parser::endElement(const QString &namespaceURI,
+                                 const QString &localName,
+                                 const QString &qName)
+{
+   indent.remove((uint)0,3);
+   if (verbose) cout<<indent<<"\\"<<qName<<endl;
+   nbcount=0; //precaution
+   if (qName==send || qName==receive)
+   {
+      sendreceive="";
+      shortsendreceive="";
+      return TRUE;
+   }
+   if (qName==begin)
+   {
+      mailw->nbfiles++;
+      return TRUE;
+   }
+   return TRUE;
+}
+
+//************************************
+bool ghs3dprl_msg_parser::characters(const QString &strini)
+{
+   bool ok;
+   med_int *tmint=NULL;
+   long nb=0;
+   //filtre rc,lf,tab et blancs successifs
+   QString str=strini.simplifyWhiteSpace();
+   //if ( str.length() == 1 && str=="\n" )
+   if (str.length()==0)
+   {
+      //cout<<"EMPTY_LINE_CR"<<endl;
+      return TRUE;
+   }
+   else
+   {
+      if (etat==1)
+      {
+         double ver=str.toDouble(&ok);
+         if (!ok || ver!=1e0)
+         {
+            cout<<"version "<<str<<" fichier .msg inconnue"<<endl;
+            return FALSE;
+         }
+         else return TRUE;
+      }
+      nb=str.contains(' ',TRUE) + 1; //nb chiffres detectes
+      if (nb>1)
+      {
+         //lecture vecteurs d'entiers separateur blanc
+         long i=0;
+         tmint=new med_int[nb];
+         //printf("%staille attendue=%i taille vue=%i\n",(const char *)indent,nbcount,nb);
+         do
+         {
+            tmint[i]=str.section(' ',i,i).toLong(&ok);
+            //printf("tmint[%i]=%i\n",i,tmint[i]);
+            i++;
+         } while ((i<nb) && ok );
+         if (i<nb)
+         {
+            cout<<"pb conversion "<<i<<" eme entier="<<str.section(' ',i-1,i-1)<<endl;
+            cout<<indent<<"etat="<<etat<<" nb="<<nb<<endl<<str<<endl;
+         }
+      }
+      if (nb==1)
+      {
+         tmint=new med_int[nb];
+         tmint[0]=str.toLong(&ok);
+         if (!ok)
+         {
+            cout<<"pb conversion 1er entier="<<str<<endl;
+            cout<<indent<<"etat="<<etat<<" nb="<<nb<<endl;
+         }
+      }
+
+   }
+   //lecture ok stockage de tlong dans mailw.mestab
+   CVWtab *montab=new CVWtab(nb,tmint);
+   QString tmp;
+   /*cout<<"InsertKey type="<<typel<<" "<<sendreceive<<
+         " neighbour="<<neighbourindice<<
+         " file="<<mailw->nofile<<endl;*/
+   tmp=tmp.sprintf("MS%ld NE%ld ",
+       mailw->nofile,neighbourindice)+
+       shorttypel+shortsendreceive;
+   tmp=tmp.simplifyWhiteSpace();
+   ok=mailw->insert_key(tmp,montab);
+   return TRUE;
+}
+
diff --git a/src/tepal2med/ghs3dprl_msg_parser.h b/src/tepal2med/ghs3dprl_msg_parser.h
new file mode 100755 (executable)
index 0000000..7343d6e
--- /dev/null
@@ -0,0 +1,57 @@
+
+#ifndef GHS3DPRL_MSG_PARSER_H
+#define GHS3DPRL_MSG_PARSER_H
+
+#include "ghs3dprl_mesh_wrap.h"
+#include <qxml.h>
+
+/*//Med File V 2.2 attributes
+#undef MED_H
+#undef MED_PROTO_H
+namespace med_2_2 {
+  extern "C" {
+#include <med.h>
+#include <med_proto.h>
+  }
+}
+*/
+
+class ghs3dprl_msg_parser : public QXmlDefaultHandler
+{
+public:
+   bool startDocument();
+   bool startElement(const QString&,
+                     const QString&,
+                     const QString& ,
+                     const QXmlAttributes&);
+   bool endElement(const QString&,
+                   const QString&,
+                   const QString&);
+   bool characters(const QString&);
+
+   ghs3dprl_mesh_wrap *mailw; //results maillages wrap
+   bool verbose;
+
+private:
+   QString indent,
+           typel,shorttypel,
+           sendreceive,shortsendreceive,
+           begin,
+           version,
+           neighbours,
+           count,
+           neighbour,
+           indice,
+           send,
+           vertices,
+           edges,
+           faces,
+           elements,
+           receive;
+
+   long etat,
+        neighbourscount,neighbourcourant,neighbourindice,
+        nbcount; //nb faces vertices edges elements expected
+};
+
+#endif
diff --git a/src/tepal2med/moc_dlg_ghs3dmain.cxx b/src/tepal2med/moc_dlg_ghs3dmain.cxx
new file mode 100755 (executable)
index 0000000..3694255
--- /dev/null
@@ -0,0 +1,110 @@
+/****************************************************************************
+** dlg_ghs3dmain meta object code from reading C++ file 'dlg_ghs3dmain.h'
+**
+** Created: Wed Feb 14 13:34:56 2007
+**      by: The Qt MOC ($Id$)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#undef QT_NO_COMPAT
+#include "dlg_ghs3dmain.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.3. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *dlg_ghs3dmain::className() const
+{
+    return "dlg_ghs3dmain";
+}
+
+QMetaObject *dlg_ghs3dmain::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_dlg_ghs3dmain( "dlg_ghs3dmain", &dlg_ghs3dmain::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString dlg_ghs3dmain::tr( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "dlg_ghs3dmain", s, c, QApplication::DefaultCodec );
+    else
+       return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString dlg_ghs3dmain::trUtf8( const char *s, const char *c )
+{
+    if ( qApp )
+       return qApp->translate( "dlg_ghs3dmain", s, c, QApplication::UnicodeUTF8 );
+    else
+       return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* dlg_ghs3dmain::staticMetaObject()
+{
+    if ( metaObj )
+       return metaObj;
+    QMetaObject* parentObject = QDialog::staticMetaObject();
+    static const QUMethod slot_0 = {"languageChange", 0, 0 };
+    static const QUMethod slot_1 = {"init", 0, 0 };
+    static const QUMethod slot_2 = {"destroy", 0, 0 };
+    static const QUMethod slot_3 = {"slotok", 0, 0 };
+    static const QMetaData slot_tbl[] = {
+       { "languageChange()", &slot_0, QMetaData::Protected },
+       { "init()", &slot_1, QMetaData::Protected },
+       { "destroy()", &slot_2, QMetaData::Protected },
+       { "slotok()", &slot_3, QMetaData::Protected }
+    };
+    metaObj = QMetaObject::new_metaobject(
+       "dlg_ghs3dmain", parentObject,
+       slot_tbl, 4,
+       0, 0,
+#ifndef QT_NO_PROPERTIES
+       0, 0,
+       0, 0,
+#endif // QT_NO_PROPERTIES
+       0, 0 );
+    cleanUp_dlg_ghs3dmain.setMetaObject( metaObj );
+    return metaObj;
+}
+
+void* dlg_ghs3dmain::qt_cast( const char* clname )
+{
+    if ( !qstrcmp( clname, "dlg_ghs3dmain" ) )
+       return this;
+    return QDialog::qt_cast( clname );
+}
+
+bool dlg_ghs3dmain::qt_invoke( int _id, QUObject* _o )
+{
+    switch ( _id - staticMetaObject()->slotOffset() ) {
+    case 0: languageChange(); break;
+    case 1: init(); break;
+    case 2: destroy(); break;
+    case 3: slotok(); break;
+    default:
+       return QDialog::qt_invoke( _id, _o );
+    }
+    return TRUE;
+}
+
+bool dlg_ghs3dmain::qt_emit( int _id, QUObject* _o )
+{
+    return QDialog::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool dlg_ghs3dmain::qt_property( int id, int f, QVariant* v)
+{
+    return QDialog::qt_property( id, f, v);
+}
+
+bool dlg_ghs3dmain::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
diff --git a/src/tepal2med/tepal2med.cxx b/src/tepal2med/tepal2med.cxx
new file mode 100755 (executable)
index 0000000..5b19e54
--- /dev/null
@@ -0,0 +1,354 @@
+/*
+** prog principal de test de ghs3dprl
+*/
+
+#include <stdio.h> /* printf clrscr fopen fread fwrite fclose */
+#include <string>
+#include <cstring>
+#include <iostream>
+#include <fstream>
+#include "ghs3dprl_msg_parser.h"
+
+#include <qtextstream.h>
+#include <qstring.h>
+#include <qxml.h>
+#include <qwindowdefs.h>
+
+
+#include <qapplication.h>
+#include "dlg_ghs3dmain.h"
+
+using namespace std;
+using namespace med_2_2;
+
+//************************************
+int main(int argc, char **argv)
+{
+   bool ok,is_test,is_menu,is_launchtepal;
+   int nbfiles,nbelem_limit_swap,verbose;
+   QString casename,casenamemed,tmp,cmd,format;
+   QString version="V0.1 beta";
+
+
+   if ((argc > 11)||(argc < 2))
+   {
+      cerr<<"tepal2med "<<version<<endl;
+      cerr<<"Usage: "<<argv[0]<<" CaseNameTepal NumberOfFiles [LimitSwap] [Verbose[0->6]] [Test|noTest] [Menu|noMenu] [LaunchTepal|noLaunchTepal] CaseNameMed\n";
+      return 1;
+   }
+   casename=argv[1];
+   tmp=argv[2];
+   nbfiles=tmp.toLong(&ok,10);
+   if (!ok)
+   {
+      cerr<<"NumberOfFiles: an integer is expected\n\n";
+      return 1;
+   }
+   if (nbfiles<=0)
+   {
+      cerr<<"NumberOfFiles: a positive integer is expected\n\n";
+      return 1;
+   }
+   if (nbfiles>512) //delirium in 2007
+   {
+      cerr<<"NumberOfFiles: a positive integer <= 512 is expected\n\n";
+      return 1;
+   }
+
+   //default 1GOctet/8(for double)/10(for arrays in memory at the same time)
+   nbelem_limit_swap=1000000000/8/10;
+   if (argc > 3)
+   {
+      tmp=argv[3];
+      nbelem_limit_swap=tmp.toLong(&ok,10);
+      if (!ok)
+      {
+         cerr<<"LimitSwap: an integer is expected\n\n";
+         return 1;
+      }
+      if (nbelem_limit_swap<=0)
+      {
+         cerr<<"LimitSwap: a positive integer is expected\n\n";
+         return 1;
+      }
+   }
+
+   verbose=1; //default
+   if (argc > 4)
+   {
+      tmp=argv[4];
+      verbose=tmp.toLong(&ok,10);
+      if (!ok)
+      {
+         cerr<<"Verbose: an integer is expected\n\n";
+         return 1;
+      }
+      if (verbose<0)
+      {
+         cerr<<"Verbose: a positive integer is expected\n\n";
+         return 1;
+      }
+   }
+
+   is_test=FALSE; //default
+   if (argc > 5)
+   {
+      tmp=argv[5];
+      if (tmp=="Test") is_test=TRUE;
+   }
+
+   is_menu=FALSE; //default
+   if (argc > 6)
+   {
+      tmp=argv[6];
+      if (tmp=="Menu") is_menu=TRUE;
+   }
+
+   is_launchtepal=FALSE; //default
+   if (argc > 7)
+   {
+      tmp=argv[7];
+      if (tmp=="LaunchTepal") is_launchtepal=TRUE;
+   }
+
+   casenamemed=casename;
+   if (argc > 8)
+   {
+      casenamemed=argv[8];
+   }
+
+   // We must always have an application
+   if (is_menu)
+   {
+   QApplication a(argc,argv);
+   dlg_ghs3dmain *m = new dlg_ghs3dmain();
+   a.setMainWidget(m);      // It is our main widget
+   m->setCaption("tepal2med "+version);
+   m->show();               // Show it...
+   a.exec();                // And run!
+   cout<<"parameters "<<m->value_KeepFiles<<" "<<m->value_NbPart<<endl;
+   //cancel if close widget without Ok button
+   if (!m->value_Ok) return 1;
+   nbfiles=m->value_NbPart;
+   }
+
+   QString path;
+   int n=casenamemed.contains('/');
+   if (n>0)
+      path=casenamemed.section('/',-n-1,-2)+"/";
+   else
+      path="./";
+   casenamemed=casenamemed.section('/',-1);
+   if (casenamemed.length()>20)
+   {
+      cerr<<"CaseNameMed truncated (no more 20 characters)"<<endl;
+      casenamemed.truncate(20);
+   }
+
+   /*cout<<"CaseNameMed="<<casenamemed<<endl;
+   cout<<"PathMed="<<path<<endl;*/
+
+   //verbose=5;
+   if (verbose>0)
+   cout<<"CaseNameTepal="<<casename<<
+         " NumberOfFiles="<<nbfiles<<
+         " LimitSwap="<<nbelem_limit_swap<<
+         " Verbose="<<verbose<<
+         " Test="<<is_test<<
+         " Menu="<<is_menu<<
+         " LaunchTepal="<<is_launchtepal<<
+         " CaseNameMed="<<path+casenamemed<<
+         "\n";
+
+   //"tepal -f exemple1 -n 4"
+   if (is_launchtepal)
+   {
+   cmd="tepal -f "+casename+" -n "+cmd.sprintf("%d",nbfiles)+" > "+path+"tepal.out";
+   cout<<"LaunchTepal Command = "<<cmd<<endl;
+   system( (const char *) cmd ); // run
+   }
+
+   ghs3dprl_mesh_wrap *mymailw=new ghs3dprl_mesh_wrap;
+   //no constructor, later maybe
+   mymailw->nbfiles=0;
+   mymailw->nbelem_limit_swap=nbelem_limit_swap; //for huge cases big array swap in huge binary files
+   mymailw->verbose=verbose;
+   mymailw->casename=casenamemed;
+   mymailw->path=path;
+
+   ghs3dprl_msg_parser handler;
+   //constructor later maybe
+   //handler.verbose=TRUE;
+   handler.mailw=mymailw;
+
+   QXmlSimpleReader reader;
+   reader.setContentHandler(&handler);
+   format=format.sprintf("%d",nbfiles);
+   int nbf=format.length();
+   format=format.sprintf(".%%.%dd.%%.%dd",nbf,nbf);
+   //read files .msg
+   for (int i=1; i<=nbfiles; i++)
+   {
+      mymailw->nofile=i;
+      //tmp=casename+tmp.sprintf(".%d.%d.msg",nbfiles,i);
+      tmp=casename+tmp.sprintf(format,nbfiles,i)+".msg";
+      if (verbose>0) cout<<"FileName="<<tmp<<endl;
+      QFile File(tmp);
+      QXmlInputSource source(&File);
+      reader.parse(source);
+      File.close();
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesMSGAcquired="<<mymailw->nbfiles<<"\n";
+   if (mymailw->nbfiles != nbfiles)
+   {
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n";
+      return 1;
+   }
+
+   if (is_test)
+   {
+      ok=mymailw->test_msg_wrap();
+      if (ok)
+      {
+         if (verbose>0) cout<<"\nResult_test_msg_wrap=ok\n\n";
+      }
+      else
+      {
+         cerr<<"\nResult_test_msg_wrap=NO_OK!\n\n";
+         return 1;
+      }
+   }
+
+   //after verification remove unusued data
+   //"NE0 FI" for/from <version>1.0</version>
+   //after verification remove duplicates data
+   //for debug but don't do that because reliability
+   // and locality of datas files
+   //" RE " for duplicates <receive>
+   //int nb=mymailw->remove_key_mesh_wrap(QRegExp("( NE0 | RE)",TRUE,FALSE));
+
+   //because <send> equals <receive>
+   int nb=0;
+   nb=mymailw->remove_key_mesh_wrap(QRegExp("RE",TRUE,FALSE));
+   if (verbose>3) cout<<"NumberOfKeysRemoved="<<nb<<endl;
+   if (verbose>3) ok=mymailw->list_keys_mesh_wrap();
+
+   //test read files .noboiteb
+   //tmp=casename+".noboiteb";
+   //ok=mymailw->ReadFileNOBOITEB(tmp);
+
+   //read files .noboite
+   //supposed big files
+   mymailw->nbfiles=0;
+   for (int i=1; i<=nbfiles; i++)
+   {
+      mymailw->nofile=i;
+      tmp=casename+tmp.sprintf(format,nbfiles,i)+".noboite";
+      if (verbose>0) cout<<"FileName="<<tmp<<endl;
+      ok=mymailw->ReadFileNOBOITE(tmp);
+      //mymailw->SwapOutOfMemory_key_mesh_wrap(QRegExp("NB",TRUE,FALSE));
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesNOBOITEAcquired="<<mymailw->nbfiles<<"\n";
+   if (mymailw->nbfiles != nbfiles)
+   {
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n";
+      return 1;
+   }
+
+   if (is_test)
+   {
+      ok=mymailw->test_vertices_wrap();
+      if (ok)
+      {
+         if (verbose>0) cout<<"\nResult_test_vertices_wrap=ok\n\n";
+      }
+      else
+      {
+         cerr<<"\nResult_test_vertices_wrap=NO_OK!\n\n";
+         return 1;
+      }
+   }
+
+   //read files .faces
+   mymailw->nbfiles=0;
+   for (int i=1; i<=nbfiles; i++)
+   {
+      mymailw->nofile=i;
+      tmp=casename+tmp.sprintf(format,nbfiles,i)+".faces";
+      if (verbose>0) cout<<"FileName="<<tmp<<endl;
+      ok=mymailw->ReadFileFACES(tmp);
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesFACESAcquired="<<mymailw->nbfiles<<"\n\n";
+   if (mymailw->nbfiles != nbfiles)
+   {
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n\n";
+      return 1;
+   }
+
+   //read files .points
+   mymailw->nbfiles=0;
+   for (int i=1; i<=nbfiles; i++)
+   {
+      mymailw->nofile=i;
+      tmp=casename+tmp.sprintf(format,nbfiles,i)+".points";
+      if (verbose>0) cout<<"FileName="<<tmp<<endl;
+      ok=mymailw->ReadFilePOINTS(tmp);
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesPOINTSAcquired="<<mymailw->nbfiles<<"\n\n";
+   if (mymailw->nbfiles != nbfiles)
+   {
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n\n";
+      return 1;
+   }
+
+   //read files .glo
+   //supposed big files big arrays so don't read with parser
+   mymailw->nbfiles=0;
+   for (int i=1; i<=nbfiles; i++)
+   {
+      mymailw->nofile=i;
+      tmp=casename+tmp.sprintf(format,nbfiles,i)+".glo";
+      if (verbose>0) cout<<"FileName="<<tmp<<endl;
+      ok=mymailw->ReadFileGLO(tmp);
+      //mymailw->SwapOutOfMemory_key_mesh_wrap(QRegExp("GL",TRUE,FALSE));
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesGLOAcquired="<<mymailw->nbfiles<<"\n\n";
+   if (mymailw->nbfiles != nbfiles)
+   {
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n\n";
+      return 1;
+   }
+
+   /*exemples
+   ok=mymailw->list_keys_mesh_wrap();
+   tmp="FA RE NE4 FI1";
+   ok=mymailw->list_onekey_mesh_wrap(tmp);
+   tmp="FA SE NE4 FI1";
+   ok=mymailw->list_onekey_mesh_wrap(tmp);
+   tmp="FA RE NE1 FI4";
+   ok=mymailw->list_onekey_mesh_wrap(tmp);
+   tmp="FA SE NE1 FI4";
+   ok=mymailw->list_onekey_mesh_wrap(tmp);
+
+   tmp="FA RE NE4 FI1";
+   ok=mymailw->list_onekey_mesh_wrap(tmp);*/
+
+   //test remove points (type 3)
+   //nb=mymailw->remove_key_mesh_wrap(QRegExp("PO",TRUE,FALSE));
+   //cout<<"***remove_key_mesh_wrap*** remove nb="<<nb<<endl;
+   //ok=mymailw->list_keys_mesh_wrap();
+
+   ok=mymailw->Write_MEDfiles();
+   //int nb=mymailw->remove_key_mesh_wrap(QRegExp(".",TRUE,FALSE));
+   nb=mymailw->remove_all_keys_mesh_wrap();
+   if (verbose>3)
+      cout<<"***remove_all_key_mesh_wrap*** "<<nb<<" keys removed\n";
+   cout<<endl<<"===end of "<<argv[0]<<"==="<<endl;
+   return 0; //ok
+}
+