Salome HOME
Merge from BR_V5_DEV 16Feb09
authorvsr <vsr@opencascade.com>
Tue, 17 Feb 2009 07:32:17 +0000 (07:32 +0000)
committervsr <vsr@opencascade.com>
Tue, 17 Feb 2009 07:32:17 +0000 (07:32 +0000)
66 files changed:
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
GHS3DPRLPLUGIN_version.h.in [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
Makefile.in [deleted file]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
adm_local/Makefile.am [new file with mode: 0644]
adm_local/Makefile.in [deleted file]
adm_local/unix/Makefile.am [new file with mode: 0644]
adm_local/unix/config_files/Makefile.am [new file with mode: 0644]
adm_local/unix/config_files/check_GHS3DPRL.m4 [new file with mode: 0755]
adm_local/unix/config_files/check_GHS3DPRLPLUGIN.m4
adm_local/unix/make_commence.in [deleted file]
adm_local/unix/make_common_starter.am [new file with mode: 0644]
adm_local/unix/make_omniorb.in [deleted file]
bin/Makefile.am [new file with mode: 0644]
build_configure
clean_configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
configure.in.base [deleted file]
env_GHS3DPRLplugin-Src.sh [deleted file]
idl/GHS3DPRLPlugin_Algorithm.idl
idl/Makefile.am [new file with mode: 0644]
idl/Makefile.in [deleted file]
install [deleted file]
resources/Makefile.am [new file with mode: 0644]
resources/SalomeApp.xml [new file with mode: 0644]
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.cxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL_i.hxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.cxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis.hxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.cxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_Hypothesis_i.hxx
src/GHS3DPRLPlugin/GHS3DPRLPlugin_i.cxx
src/GHS3DPRLPlugin/Makefile.am [new file with mode: 0644]
src/GHS3DPRLPlugin/Makefile.in [deleted file]
src/Makefile.am [new file with mode: 0644]
src/Makefile.in [deleted file]
src/gui/GHS3DPRLPluginGUI.cxx
src/gui/GHS3DPRLPluginGUI_HypothesisCreator.cxx
src/gui/GHS3DPRLPluginGUI_HypothesisCreator.h
src/gui/GHS3DPRLPlugin_images.po [deleted file]
src/gui/GHS3DPRLPlugin_images.ts [new file with mode: 0644]
src/gui/GHS3DPRLPlugin_msg_en.po [deleted file]
src/gui/GHS3DPRLPlugin_msg_en.ts [new file with mode: 0644]
src/gui/Makefile.am [new file with mode: 0644]
src/gui/Makefile.in [deleted file]
src/tepal2med/.depend [deleted file]
src/tepal2med/Makefile [deleted file]
src/tepal2med/Makefile.am [new file with mode: 0644]
src/tepal2med/Makefile.in [deleted file]
src/tepal2med/dlg_ghs3dmain.cxx
src/tepal2med/dlg_ghs3dmain.h
src/tepal2med/dlg_ghs3dmain.ui [new file with mode: 0644]
src/tepal2med/dlg_ghs3dmain.ui.h [deleted file]
src/tepal2med/ghs3dprl_mesh_wrap.cxx
src/tepal2med/ghs3dprl_mesh_wrap.h
src/tepal2med/ghs3dprl_msg_parser.cxx
src/tepal2med/ghs3dprl_msg_parser.h
src/tepal2med/moc_dlg_ghs3dmain.cxx [deleted file]
src/tepal2med/tepal2med.cxx

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..d59af62
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,44 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : AUTHORS
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+#
+# The format of this file was inspired by the Linux kernel CREDITS file.
+#
+# Authors and contributors are listed alphabetically.
+#
+# The fields are: name (N), email (E), web-address (W), CVS account login (C),
+# PGP key ID and fingerprint (P), description (D), and snail-mail address (S).
+#
+# ---
+
+N: Christian VAN WAMBEKE (CEA)
+D: Initial development
+
+N: Edward AGAPOV, Open CASCADE S.A.S
+E: edward.agapov@opencascade.com
+D: Debug, improve meshing algorithms
+
+N: Vadim SANDLER, Open CASCADE S.A.S
+E: vadim.sandler@opencascade.com
+D: Porting to automake, porting to SALOME series 5x
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..d60c31a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..2d8966e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,44 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : ChangeLog
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+#
+# Changes are listed by modification time in the descending order,
+# i.e. newer changes are listed at the top of the file.
+#
+# Each record lists the modification date, author and short description of
+# the made changes.
+#
+# ---
+
+2008-08-29 Vadim SANDLER
+
+    * Porting to automake, porting to SALOME series 5x
+
+2007-2008 Edward AGAPOV
+
+    * Debug, improve meshing algorithms
+
+2007 Christian VAN WAMBEKE (CEA)
+
+    * Initial development
diff --git a/GHS3DPRLPLUGIN_version.h.in b/GHS3DPRLPLUGIN_version.h.in
new file mode 100644 (file)
index 0000000..76ecf03
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : GHS3DPRLPLUGIN_version.h
+// Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+//
+// ---
+
+#if !defined(__GHS3DPRLPLUGIN_VERSION_H__)
+#define __GHS3DPRLPLUGIN_VERSION_H__
+
+/*
+  GHS3DPRLPLUGIN_VERSION is (major << 16) + (minor << 8) + patch.
+*/
+
+#define GHS3DPRLPLUGIN_VERSION_STR "@VERSION@"
+#define GHS3DPRLPLUGIN_VERSION     @XVERSION@
+
+#endif // __GHS3DPRLPLUGIN_VERSION_H__
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..827ab1b
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,29 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : INSTALL
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+SALOME2 : GHS3DPRLPLUGIN module (SMESH plugin)
+
+For installation instructions and other information, please refer to
+the README file.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..5a82da2
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+if GHS3DPRLPLUGIN_ENABLE_GUI
+  ACLOCAL_AMFLAGS = -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
+else !GHS3DPRLPLUGIN_ENABLE_GUI
+  ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
+                    -I ${KERNEL_ROOT_DIR}/salome_adm/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
+endif
+
+SUBDIRS = idl adm_local resources src bin
+
+DIST_SUBDIRS = idl adm_local resources src bin 
+
+DISTCLEANFILES = a.out aclocal.m4 configure
+
+salomeinclude_DATA = GHS3DPRLPLUGIN_version.h
+
+EXTRA_DIST += \
+       build_configure \
+       clean_configure
+
+dist-hook:
+       rm -rf `find $(distdir) -name CVS`
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100755 (executable)
index 7c007cf..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#  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/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..4c13d67
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,29 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : NEWS
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+#
+# Changes are listed by modification time in the descending order,
+# i.e. newer changes are listed at the top of the file.
+#
+# ---
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..7289e65
--- /dev/null
+++ b/README
@@ -0,0 +1,128 @@
+SALOME platform
+GHS3DPRL meshing plugin
+------------------------------
+
+Contents:
+
+1. Pre-requisites
+2. Installation
+3. Launch SALOME with GHS3DPRLPLUGIN
+4. GHS3DPRLPLUGIN plugin usage
+
+-----------------
+1. Pre-requisites
+-----------------
+
+The information in this file assumes that:
+
+* The SALOME platform is installed to the directory <salome>
+* The GHS3DPRL (Tepal) product is installed to the directory <salome>/ghs3dprl
+
+---------------
+2. Installation
+---------------
+
+2.1. Unpack GHS3DPRLPLUGIN module sources
+
+cd <salome>
+tar zxf GHS3DPRLPLUGIN_SRC.tgz
+
+2.2. Build GHS3DPRLPLUGIN module
+
+* set environment 
+
+bash
+cd <salome>
+source env_build.sh
+export GHS3DPRLHOME=<salome>/ghs3dprl
+
+Note: you can avoid setting GHS3DPRLHOME environment variable but use
+--with-ghs3dprl key of configure script instead. You can also compile
+plugin withour GHS3DPRL product installation. But you'll need to add
+path to the tepal executable to the PATH environment variable in order
+to use GHS3DPRL meshing plugin within SALOME.
+
+* configure build system
+
+cd GHS3DPRLPLUGIN_SRC
+./build_configure
+
+cd ..
+mkdir GHS3DPRLPLUGIN_BUILD
+cd GHS3DPRLPLUGIN_BUILD
+../GHS3DPRLPLUGIN_SRC/configure --prefix=<salome>/GHS3DPRLPLUGIN_INSTALL
+
+Note: you can use --with-ghs3dprl option to pass the root directory of
+ghs3dprl product to the configure script. In this case you can avoid
+setting GHS3DPRLHOME environment variable. Try 'configure --help'
+command to learn more about available configure script options.
+
+Check "Summary" area in the log output of the configure script to
+verify that all pre-requisites required for the successful compilation
+of GHS3DPRLPLUFIN module have been found. All pre-requisite products
+should have status "yes". If any product has status "no", the
+compilation procedure will fail (the only exception is GHS3DPRL
+product which is not required for the successful compilation of the
+plugin; it is needed in run-time only).
+
+* compile and install plugin module 
+
+make
+make install
+
+exit
+
+If the compilation is finished successfully (make and make install
+steps are finished without errors) the GHS3DPRLPLUGIN meshing module
+should be installed in the directory <salome>/GHS3DPRLPLUGIN_INSTALL.
+
+----------------------------------
+3. Launch SALOME with GHS3DPRLPLUGIN
+----------------------------------
+
+* set environment
+
+bash
+cd <salome>
+source env_products.sh
+
+export GHS3DPRLPLUGIN_ROOT_DIR=<salome>/GHS3DPRLPLUGIN_INSTALL
+export SalomeAppConfig=${GHS3DPRLPLUGIN_ROOT_DIR}/share/salome/resources/ghs3dprlplugin
+export PATH=<salome>/ghs3dprl:${PATH
+
+* run SALOME
+
+runSalome
+
+----------------------------
+4. GHS3DPRLPLUGIN plugin usage
+----------------------------
+
+* Create new study
+
+* Activate Geometry module and create simple geometry object
+
+* Activate Mesh module
+
+* Invoke menu "Mesh/Create Mesh"
+
+* Select previously created geometry object by clicking it with the
+mouse in the Object Browser
+
+* In the "Create mesh" dialog box:
+- activate "3D" page
+- In the "Algorithm" combo box select "GHS3DPRL"
+- Click on the button at the right of the "Hypothesis" combo box and
+select "GHS3DPRL parameters" item in the drop-down menu
+
+* In the "Hypothesis Construction" dialog box set parameters of GHS3DPRL
+  meshing algorithm and click "OK" button
+
+* In the "Create mesh" dialog box Click "Apply & Close" button to
+  define mesh and close the dialog box
+
+* In the Object Browser select "Mesh_1" object, invoke context popup
+menu for it by clicking right mouse button and select "Compute" item
+
+The resulting mesh created with GHS3DPRL plugin will be shown in the 3D
+viewer.
diff --git a/adm_local/Makefile.am b/adm_local/Makefile.am
new file mode 100644 (file)
index 0000000..6516664
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = unix
diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in
deleted file mode 100755 (executable)
index b19e7c1..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#  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/Makefile.am b/adm_local/unix/Makefile.am
new file mode 100644 (file)
index 0000000..386058f
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = config_files
diff --git a/adm_local/unix/config_files/Makefile.am b/adm_local/unix/config_files/Makefile.am
new file mode 100644 (file)
index 0000000..52d567c
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_admlocalm4_DATA =         \
+       check_GHS3DPRL.m4       \
+       check_GHS3DPRLPLUGIN.m4
diff --git a/adm_local/unix/config_files/check_GHS3DPRL.m4 b/adm_local/unix/config_files/check_GHS3DPRL.m4
new file mode 100755 (executable)
index 0000000..604d3be
--- /dev/null
@@ -0,0 +1,83 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : check_GHS3DPRL.m4
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+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 GHS3DPRL (Tepal) installation])
+
+GHS3DPRL_ok=no
+
+if test "$with_ghs3dprl" == "no" ; then
+    AC_MSG_WARN(You have choosen building plugin without GHS3DPRL)
+else
+    if test "$with_ghs3dprl" == "yes" || test "$with_ghs3dprl" == "auto"; then
+        GHS3DPRL_HOME=""
+    else
+        GHS3DPRL_HOME="$with_ghs3dprl"
+    fi
+    
+    if test "$GHS3DPRL_HOME" == "" ; then
+        if test "x$GHS3DPRLHOME" != "x" ; then
+            GHS3DPRL_HOME=$GHS3DPRLHOME
+        else
+            AC_MSG_WARN(Build plugin without GHS3DPRL)
+        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_CHECKING(for GHS3DPRL(Tepal) executable)
+    
+      AC_CHECK_PROG(GHS3DPRL,tepal,found)
+    
+      if test "x$GHS3DPRL" == x ; then
+        AC_MSG_WARN(Tepal program not found in PATH variable)
+        AC_MSG_WARN(Build plugin without GHS3DPRL)
+      else
+        GHS3DPRL_ok=yes
+      fi
+    
+    fi
+fi
+
+AC_MSG_RESULT(for GHS3DPRL(Tepal): $GHS3DPRL_ok)
+AC_LANG_RESTORE
+
+])dnl
index e775e94c07fbd8e130a517e21cbcef7f86e2ea3c..5b9fbb88d954f2d67d2caf38007676a872a08d74 100755 (executable)
@@ -1,53 +1,68 @@
-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
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : check_GHS3DPRLPLUGIN.m4
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+AC_DEFUN([CHECK_GHS3DPRLPLUGIN],[
+
+AC_CHECKING(for GHS3DPRL mesh plugin)
+
+GHS3DPRLplugin_ok=no
+
+GHS3DPRLPLUGIN_LDFLAGS=""
+GHS3DPRLPLUGIN_CXXFLAGS=""
+
+AC_ARG_WITH(GHS3DPRLplugin,
+           [  --with-GHS3DPRLplugin=DIR root directory path of GHS3DPRL mesh plugin installation ])
+
+if test "$with_GHS3DPRLplugin" != "no" ; then
+    if test "$with_GHS3DPRLplugin" == "yes" || test "$with_GHS3DPRLplugin" == "auto"; then
+       if test "x$GHS3DPRLPLUGIN_ROOT_DIR" != "x" ; then
+            GHS3DPRLPLUGIN_DIR=$GHS3DPRLPLUGIN_ROOT_DIR
+        fi
+    else
+        GHS3DPRLPLUGIN_DIR="$with_GHS3DPRLplugin"
+    fi
+
+    if test "x$GHS3DPRLPLUGIN_DIR" != "x" ; then
+       if test -f ${GHS3DPRLPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libGHS3DPRLEngine.so ; then
+           GHS3DPRLplugin_ok=yes
+           AC_MSG_RESULT(Using GHS3DPRL mesh plugin distribution in ${GHS3DPRLPLUGIN_DIR})
+           GHS3DPRLPLUGIN_ROOT_DIR=${GHS3DPRLPLUGIN_DIR}
+           GHS3DPRLPLUGIN_LDFLAGS=-L${GHS3DPRLPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+           GHS3DPRLPLUGIN_CXXFLAGS=-I${GHS3DPRLPLUGIN_DIR}/include/salome
+       else
+           AC_MSG_WARN("Cannot find compiled GHS3DPRL mesh plugin distribution")
+       fi
+    else
+       AC_MSG_WARN("Cannot find compiled GHS3DPRL mesh plugin distribution")
+    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
+AC_MSG_RESULT(for GHS3DPRL mesh plugin: $GHS3DPRLplugin_ok)
 
+AC_SUBST(GHS3DPRLPLUGIN_ROOT_DIR)
+AC_SUBST(GHS3DPRLPLUGIN_LDFLAGS)
+AC_SUBST(GHS3DPRLPLUGIN_CXXFLAGS)
 ])dnl
diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in
deleted file mode 100755 (executable)
index 6d07a77..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-# 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_common_starter.am b/adm_local/unix/make_common_starter.am
new file mode 100644 (file)
index 0000000..1ea9fb9
--- /dev/null
@@ -0,0 +1,93 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : make_common_starter.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+#
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
+#
+
+# Standard directory for installation
+salomeincludedir   = $(includedir)/salome
+libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+bindir             = $(prefix)/bin/salome
+salomescriptdir    = $(bindir)
+salomepythondir    = $(pythondir)/salome
+salomepyexecdir    = $(pyexecdir)/salome
+
+# Directory for installing idl files
+salomeidldir       = $(prefix)/idl/salome
+
+# Directory for installing resource files
+salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir        = $(prefix)/adm_local
+admlocalunixdir    = $(admlocaldir)/unix
+admlocalm4dir      = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(salomepythondir)/shared_modules
+
+# Documentation directory
+docdir             = $(datadir)/doc/salome
+
+# common rules
+
+# meta object implementation files generation (moc)
+%_moc.cxx: %.h
+       $(MOC) $< -o $@
+
+# translation (*.qm) files generation (lrelease)
+%.qm: %.ts
+       $(LRELEASE) $< -qm $@
+
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+       $(QRCC) $< -o $@ -name $(*F)
+
+# qt forms files generation (uic)
+ui_%.h: %.ui
+       $(UIC) -o $@ $<
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+             $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts)
+
+# customize clean operation
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx
+       rm -f @builddir@/*.qm
+       rm -f @builddir@/ui_*.h
+       rm -f @builddir@/qrc_*.cxx
+
+# tests
+tests: unittest
+
+unittest: $(UNIT_TEST_PROG)
+       @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+           $(UNIT_TEST_PROG);                     \
+       fi;
diff --git a/adm_local/unix/make_omniorb.in b/adm_local/unix/make_omniorb.in
deleted file mode 100755 (executable)
index 217e040..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#=======================================================================
-# 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/Makefile.am b/bin/Makefile.am
new file mode 100644 (file)
index 0000000..7839332
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# non-distributed files 
+nodist_salomescript_DATA = VERSION
+
+# distributed files
+dist_salomescript_SCRIPTS =
index d3790d2ee924e6ae1010f7890e38a001064692c2..c0fa009bf5cfe3ce09a4467a99cd3bcf034b42b3 100755 (executable)
@@ -1,15 +1,33 @@
 #!/bin/bash
 
+# Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 #
-# Tool for updating list of .in file for the SALOME project 
-# and regenerating configure script
+# 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.
 #
-# Author : Marc Tajchman - CEA
-# Date : 10/10/2002
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
 #
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : build_configure
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
 
 ORIG_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+GHS3DPRLPLUGIN_WITH_GUI="yes"
 
 ########################################################################
 # Test if the KERNEL_ROOT_DIR is set correctly
@@ -25,12 +43,27 @@ fi
 #    echo "failed : KERNEL_SRC variable is not correct !"
 #    exit
 #fi
+
+for option
+do
+  case $option in
+      -with-gui | --with-gui)
+          GHS3DPRLPLUGIN_WITH_GUI="yes"
+          break;;
+      -without-gui | --without-gui | -with-gui=no | --with-gui=no)
+          GHS3DPRLPLUGIN_WITH_GUI="no"
+          break;;
+  esac
+done
+
 ########################################################################
 # 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
+if test ${GHS3DPRLPLUGIN_WITH_GUI} = yes; then
+    if test ! -d "${GUI_ROOT_DIR}"; then
+        echo "failed : GUI_ROOT_DIR variable is not correct !"
+        exit
+    fi
 fi
 
 ########################################################################
@@ -57,206 +90,93 @@ if test ! -d "${SMESH_ROOT_DIR}"; then
     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 ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \
-                                       -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"
+#######################################################################
+# Update configure.ac script: to set GHS3DPRLPLUGIN_WITH_GUI variable
+sed -e s/GHS3DPRLPLUGIN_WITH_GUI=[a-z]*/GHS3DPRLPLUGIN_WITH_GUI=${GHS3DPRLPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
+mv -f configure.tmp configure.ac
+
+mkdir -p salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
+
+cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+
+#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${MED_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+
+# remove KERNEL deprecated configure files
+#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
+#    check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
+#    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
+#    do
+#      rm -f salome_adm/unix/config_files/${deprecated}
+#    done
+                     
+
+# ____________________________________________________________________
+# aclocal creates the aclocal.m4 file from the standard macro and the
+# custom macro embedded in the directory salome_adm/unix/config_files
+# and KERNEL config_files directory.
+# output:
+#   aclocal.m4
+#   autom4te.cache (directory)
+echo "====================================================== aclocal"
+
+if test ${GHS3DPRLPLUGIN_WITH_GUI} = yes; then
+  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 || exit 1
 else
-       echo "failed (check file permissions and/or user quotas ...)"
+  aclocal -I adm_local/unix/config_files \
+          -I ${KERNEL_ROOT_DIR}/salome_adm/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 || exit 1
 fi
 
-cd ${ORIG_DIR}
-
-echo
+# ____________________________________________________________________
+# libtoolize creates some configuration files (ltmain.sh,
+# config.guess and config.sub). It only depends on the libtool
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
+# output:
+#   salome_adm/unix/config_files/config.guess
+#   salome_adm/unix/config_files/config.sub
+#   salome_adm/unix/config_files/ltmain.sh
+#echo "====================================================== libtoolize"
+
+libtoolize --force --copy --automake || exit 1
+
+# ____________________________________________________________________
+# autoconf creates the configure script from the file configure.ac (or
+# configure.in if configure.ac doesn't exist)
+# output:
+#   configure
+echo "====================================================== autoconf"
+
+autoconf
+
+# ____________________________________________________________________
+# automake creates some scripts used in building process
+# (install-sh, missing, ...). It only depends on the automake
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
+# creates the Makefile.in files from the Makefile.am files.
+# output:
+#   salome_adm/unix/config_files/compile
+#   salome_adm/unix/config_files/depcomp
+#   salome_adm/unix/config_files/install-sh
+#   salome_adm/unix/config_files/missing
+#   salome_adm/unix/config_files/py-compile
+#   Makefile.in (from Makefile.am)
+echo "====================================================== automake"
+
+automake --copy --gnu --add-missing
diff --git a/clean_configure b/clean_configure
new file mode 100755 (executable)
index 0000000..9f42b6d
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : clean_configure
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+rm -rf autom4te.cache aclocal.m4 configure make_config
+find . -name "*~" -print -exec rm {} \;
+find . -name "*.pyc" -print -exec rm {} \;
+
+# ... 
+
+find bin -name Makefile.in | xargs rm -f
+find doc -name Makefile.in | xargs rm -f
+find idl -name Makefile.in | xargs rm -f
+find resources -name Makefile.in | xargs rm -f
+find salome_adm -name Makefile.in | xargs rm -f
+find src -name Makefile.in | xargs rm -f
+rm -f Makefile.in
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..23af624
--- /dev/null
@@ -0,0 +1,441 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : configure.ac
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+AC_INIT([Salome2 Project GHS3DPRLPLUGIN module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeGHS3DPRLPLUGIN])
+AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE
+
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+AC_SUBST(XVERSION)
+
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=ghs3dprlplugin
+AC_SUBST(MODULE_NAME)
+
+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
+
+echo
+echo ---------------------------------------------
+echo testing Fortran
+echo ---------------------------------------------
+echo
+
+fortran_ok=no
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+AC_PROG_FC
+AC_FC_LIBRARY_LDFLAGS
+if test "X$FC" != "X" ; then
+   fortran_ok=yes
+fi
+
+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
+
+echo
+echo ---------------------------------------------
+echo BOOST Library
+echo ---------------------------------------------
+echo
+
+CHECK_BOOST
+
+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
+
+AM_PATH_PYTHON(2.3)
+
+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
+
+GHS3DPRLPLUGIN_WITH_GUI=yes
+
+AM_CONDITIONAL(GHS3DPRLPLUGIN_ENABLE_GUI, [test "${GHS3DPRLPLUGIN_WITH_GUI}" = "yes"])
+
+if test "${GHS3DPRLPLUGIN_WITH_GUI}" = "yes"; then
+    echo
+    echo ---------------------------------------------
+    echo testing openGL
+    echo ---------------------------------------------
+    echo
+
+    CHECK_OPENGL
+
+    echo
+    echo ---------------------------------------------
+    echo testing QT
+    echo ---------------------------------------------
+    echo
+
+    CHECK_QT
+
+    echo
+    echo ---------------------------------------------
+    echo testing VTK
+    echo ---------------------------------------------
+    echo
+
+    CHECK_VTK
+
+    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
+fi
+
+echo
+echo ---------------------------------------------
+echo testing HDF5
+echo ---------------------------------------------
+echo
+
+CHECK_HDF5
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+CHECK_CAS
+
+echo
+echo ---------------------------------------------
+echo Testing html generators
+echo ---------------------------------------------
+echo
+
+CHECK_HTML_GENERATORS
+
+echo
+echo ---------------------------------------------
+echo Testing GHS3DPRL
+echo ---------------------------------------------
+echo
+
+CHECK_GHS3DPRL
+
+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 SMesh
+echo ---------------------------------------------
+echo
+
+CHECK_SMESH
+
+
+echo
+echo ---------------------------------------------
+echo testing LIBXML2
+echo ---------------------------------------------
+echo libxml_ok=no
+CHECK_LIBXML
+dnl libxml_ok is set to yes by CHECK_LIBXML
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+#AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
+
+if test "${GHS3DPRLPLUGIN_WITH_GUI}" = "yes"; then
+variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok SalomeGUI_ok libxml_ok"
+opt_variables="GHS3DPRL_ok"
+fi
+if test "${GHS3DPRLPLUGIN_WITH_GUI}" = "no"; then
+variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok SMesh_ok libxml_ok"
+opt_variables="GHS3DPRL_ok"
+fi
+
+echo
+echo --- Mandatory products :
+echo
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo --- Optional products :
+echo
+
+for var in $opt_variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+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
+
+dnl copy shells and utilities contained in the bin directory
+dnl excluding .in files (treated in AC-OUTPUT below) and CVS
+dnl directory
+
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+#AC_OUTPUT_COMMANDS([ \
+#  chmod +x ./bin/*; \
+#  chmod +x ./bin/salome/*;
+#])
+
+# This list is initiated using autoscan and must be updated manually
+# when adding a new file <filename>.in to manage. When you execute
+# autoscan, the Makefile list is generated in the output file configure.scan.
+# This could be helpfull to update de configuration.
+AC_OUTPUT([ \
+  ./salome_adm/unix/SALOMEconfig.h \
+  ./adm_local/Makefile \
+  ./adm_local/unix/Makefile \
+  ./adm_local/unix/config_files/Makefile \
+  ./bin/VERSION \
+  ./bin/Makefile \
+  ./idl/Makefile \
+  ./resources/Makefile \
+  ./src/Makefile \
+  ./src/GHS3DPRLPlugin/Makefile \
+  ./src/gui/Makefile \
+  ./src/tepal2med/Makefile \
+  ./GHS3DPRLPLUGIN_version.h \
+  Makefile \
+])
diff --git a/configure.in.base b/configure.in.base
deleted file mode 100755 (executable)
index 018a311..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-#
-#  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/DEPRECATED)
-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
deleted file mode 100755 (executable)
index 8f3c0c3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#------ GHS3DPRLplugin-Src ------
-export GHS3DPRLPLUGIN_SRC_DIR=${INSTALL_ROOT}/GHS3DPRLPLUGIN_SRC_NEW
-##
index c5105f34c037d6989fa1c4998856ce15c2785590..952a3001f50876a446e5e268201e224bbc51f5a3 100755 (executable)
@@ -1,26 +1,27 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2008 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// ---
 //
+// File   : GHS3DPRLPlugin_Algorithm.idl
+// Author : Christian VAN WAMBEKE (CEA)
 //
-//  File    : GHS3DPRLPlugin_Algorithm.idl
-//  Author  : Christian VAN WAMBEKE (CEA)
+// ---
 
 #ifndef _SMESH_GHS3DPRLALGORITHM_IDL_
 #define _SMESH_GHS3DPRLALGORITHM_IDL_
@@ -52,6 +53,12 @@ module GHS3DPRLPlugin
 
     void SetKeepFiles(in boolean value);
     boolean GetKeepFiles();
+
+    void SetBackground(in boolean value);
+    boolean GetBackground();
+
+    void SetToMeshHoles(in boolean value);
+    boolean GetToMeshHoles();
   };
 
 };
diff --git a/idl/Makefile.am b/idl/Makefile.am
new file mode 100644 (file)
index 0000000..3f15614
--- /dev/null
@@ -0,0 +1,122 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+#
+# This Makefile is responsible of generating the client and server
+# implementation of IDL interfaces for both C++ and python usage.
+# The building process of the C++ files is in charge of each source
+# package and then is not manage here.
+#
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+BASEIDL_FILES = GHS3DPRLPlugin_Algorithm.idl
+
+# This variable defines the files to be installed
+dist_salomeidl_DATA = $(BASEIDL_FILES)
+
+# GUI idl common library
+lib_LTLIBRARIES = libSalomeIDLGHS3DPRLPLUGIN.la
+
+# Sources built from idl files
+nodist_libSalomeIDLGHS3DPRLPLUGIN_la_SOURCES = GHS3DPRLPlugin_AlgorithmSK.cc
+
+# header files must be exported: other modules have to use this library
+nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
+
+libSalomeIDLGHS3DPRLPLUGIN_la_CPPFLAGS = \
+       $(KERNEL_CXXFLAGS) \
+       $(GEOM_CXXFLAGS) \
+       $(SMESH_CXXFLAGS) \
+       @CORBA_CXXFLAGS@ \
+       @CORBA_INCLUDES@ \
+       -I$(top_builddir)/salome_adm/unix \
+       -I$(top_builddir)/idl
+
+libSalomeIDLGHS3DPRLPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0
+libSalomeIDLGHS3DPRLPLUGIN_la_LIBADD  = \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel \
+       $(SMESH_LDFLAGS) -lSalomeIDLSMESH \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM \
+       @CORBA_LIBS@
+
+# These variables defines the building process of CORBA files
+OMNIORB_IDL         = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS  = @OMNIORB_IDLPYFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome \
+       -I$(SMESH_ROOT_DIR)/idl/salome
+
+IDLCXXFLAGS = \
+       -bcxx \
+       @IDLCXXFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome \
+       -I$(SMESH_ROOT_DIR)/idl/salome \
+       -I$(top_builddir)/salome_adm/unix
+IDLPYFLAGS  = \
+       @IDLPYFLAGS@ \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome \
+       -I$(SMESH_ROOT_DIR)/idl/salome
+
+# potential problem on parallel make on the following - multiple outputs
+SUFFIXES = .idl .hh SK.cc
+.idlSK.cc:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+.idl.hh:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
+       $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
+       ls $^ | while read file; do \
+         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
+       done
+
+# uninstall-local removes too much, but it works in distcheck
+uninstall-local:
+       rm -rf $(DESTDIR)$(salomepythondir)/*
+
+mostlyclean-local:
+       -rm -f *.hh *.cc .depidl
+
+# we use cpp to generate dependencies between idl files.
+# option x c tells the preprocessor to consider idl as a c file.
+# if an idl is modified, all idl dependencies are rebuilt
+
+.depidl: $(BASEIDL_FILES)
+       @echo "" > $@
+       @for dep in $^ dummy; do \
+         if [ $$dep != "dummy" ]; then \
+           echo Building dependencies for $$dep; \
+           $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome -I$(top_builddir)/salome_adm/unix $$dep 2>/dev/null | \
+           sed 's/\.o/\SK.cc/' >>$@; \
+         fi; \
+       done ;
+
+-include .depidl
diff --git a/idl/Makefile.in b/idl/Makefile.in
deleted file mode 100755 (executable)
index 0fa27a4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#  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
deleted file mode 100755 (executable)
index 23602e6..0000000
--- a/install
+++ /dev/null
@@ -1,5 +0,0 @@
-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/Makefile.am b/resources/Makefile.am
new file mode 100644 (file)
index 0000000..d310ed8
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_salomeres_DATA =                  \
+       GHS3DPRLPlugin.xml              \
+       SalomeApp.xml
+
+if GHS3DPRLPLUGIN_ENABLE_GUI
+  dist_salomeres_DATA +=               \
+       GHS3DPRL.png                    \
+       mesh_algo_GHS3DPRL.png          \
+       mesh_hypo_GHS3DPRL.png          \
+       mesh_tree_algo_GHS3DPRL.png     \
+       mesh_tree_hypo_GHS3DPRL.png
+endif
diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml
new file mode 100644 (file)
index 0000000..c03dd1a
--- /dev/null
@@ -0,0 +1,9 @@
+<document>
+  <section name="resources">
+    <parameter name="GHS3DPRLPlugin" value="${GHS3DPRLPLUGIN_ROOT_DIR}/share/salome/resources/ghs3dprlplugin"/>
+  </section>
+  <section name="SMESH">
+    <!-- Default SMESH module plugins -->
+    <parameter name="plugins" value="NETGENPlugin,GHS3DPlugin,GHS3DPRLPlugin"/>
+  </section>
+</document>
index 46f7df423a134abb86885e5c54ac906d36958fbd..0278eacc40d2762c10828897594a3ea4a0e7de33 100755 (executable)
@@ -1,34 +1,30 @@
-//  GHS3DPRLPlugin : C++ implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-// 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"
@@ -56,8 +52,17 @@ using namespace std;
 #include <list>
 #include <TCollection_AsciiString.hxx>
 
-//=============================================================================
+/* 
+extern "C" {
+#include <med.h>
+//#include <med_config.h>
+#include <med_utils.h>
+//#include <med_misc.h>
+#include <stdlib.h>
+}
+using namespace med_2_2;*/
 
+//=============================================================================
 GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL(int hypId, int studyId, SMESH_Gen* gen)
   : SMESH_3D_Algo(hypId, studyId, gen)
 {
@@ -70,21 +75,18 @@ GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL(int hypId, int studyId, SMESH_G
 }
 
 //=============================================================================
-
 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");
-
+  //MESSAGE("GHS3DPRLPlugin_GHS3DPRL::CheckHypothesis");
   _hypothesis = NULL;
 
   list<const SMESHDS_Hypothesis*>::const_iterator itl;
@@ -115,13 +117,13 @@ bool GHS3DPRLPlugin_GHS3DPRL::CheckHypothesis
 }
 
 //=======================================================================
-
 static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
                                 SMESHDS_Mesh *                   theMesh,
                                 map <int,int> &                  theSmdsToGHS3DPRLIdMap,
                                 map <int,const SMDS_MeshNode*> & theGHS3DPRLIdToNodeMap)
 {
    bool Ok;
+   int ifam=0;
    TCollection_AsciiString namefile(GHS3DPRL_In);
    namefile+=".points";
    OSD_File(namefile).Remove();
@@ -137,6 +139,7 @@ static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
       INFOS("Can't write into "<<namefile.ToCString());
       return false;
    }
+   cout<<endl<<"writeGHS3DPRLFiles version 2.1 "<<endl;
    cout<<endl<<"Creating GHS3DPRL processed mesh file : "<<namefile<<endl;
 
    int nbVertices=theMesh->NbNodes();
@@ -147,16 +150,20 @@ static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
    // Writing SMESH points into GHS3DPRL File.points
    theFile<<nbVertices<<endl;
 
-   int aSmdsNodeID = 1;
+   int aSmdsNodeID=1;
    const SMDS_MeshNode* node_2;
-   SMDS_NodeIteratorPtr itOnNode = theMesh->nodesIterator();
+   SMDS_NodeIteratorPtr itOnNode=theMesh->nodesIterator();
+   //int ifam=100;//test famille
+   theFile.precision(15); theFile.setf(ios::scientific,ios::floatfield);
+   //cout<<"set precision 15 on float\n";
    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));
+      theFile<<node_2->X()<<space<<node_2->Y()<<space<<node_2->Z()<<space<<ifam<<endl;
       aSmdsNodeID++;
-      theFile<<node_2->X()<<space<<node_2->Y()<<space<<node_2->Z()<<space<<dummyint<<endl;
+      //if (aSmdsNodeID==11) ifam++;
    }
    //no specified points;
    theFile.close();
@@ -185,12 +192,15 @@ static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
    SMDS_ElemIteratorPtr itOnFaceNode;
    SMDS_FaceIteratorPtr itOnSmdsFace = theMesh->facesIterator();
    long nbNoTriangles=0;
+   int ifaces=0;
+   //ifam=300;
    while (itOnSmdsFace->more())
    {
       aFace=itOnSmdsFace->next();
       itOnFaceNode=aFace->nodesIterator();
       const int nbNodes=aFace->NbNodes();
       if (nbNodes!=3) nbNoTriangles++;
+      ifaces++;
       theFile<<nbNodes<<space;        // NB_NODES
       while (itOnFaceNode->more())
       {
@@ -200,7 +210,9 @@ static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
           theFile<<space<<(*itOnSmdsNode).second; //NODE_1 NODE_2 ...
       }
       //(NB_NODES+1) times: DUMMY_INT
-      for ( int i=0; i<=nbNodes; i++) theFile<<space<<dummyint;
+      //if (ifaces==11) ifam++;
+      theFile<<space<<ifam;
+      for ( int i=1; i<=nbNodes; i++) theFile<<space<<200+i;
       theFile<<endl;
    }
    theFile.close();
@@ -215,7 +227,6 @@ static bool writeGHS3DPRLFiles (const TCollection_AsciiString &  GHS3DPRL_In,
 }
 
 //=======================================================================
-
 static bool getInt( int & theValue, char * & theLine )
 {
   char *ptr;
@@ -231,7 +242,6 @@ static bool getInt( int & theValue, char * & theLine )
 }
 
 //=======================================================================
-
 static bool getDouble( double & theValue, char * & theLine )
 {
   char *ptr;
@@ -251,7 +261,6 @@ static bool getDouble( double & theValue, char * & theLine )
 {  aPtr = fgets( aBuf, GHS3DPRLPlugin_BUFLENGTH - 2, aFile ); aLineNb++; DUMP(endl); }
 
 //=======================================================================
-
 static bool readResult(FILE *                           theFile,
                        SMESHDS_Mesh *                   theMesh,
                        const TopoDS_Shape &             theShape,
@@ -375,24 +384,26 @@ static bool readResult(FILE *                           theFile,
 
 //=============================================================================
 // Pass parameters to GHS3DPRL
-
-void GHS3DPRLPlugin_GHS3DPRL::SetParameters(const GHS3DPRLPlugin_Hypothesis* hyp) {
+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();
+    _Background = hyp->GetBackground();
+    _ToMeshHoles = hyp->GetToMeshHoles();
   }
 }
 
 //=======================================================================
-
+//before launching salome
+//SALOME_TMP_DIR (for keep tepal intermediates files) could be set in user's directories
 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) Tmp_dir = getenv("TMP");
   if(Tmp_dir != NULL)
   {
     aTmpDir = Tmp_dir;
@@ -407,76 +418,65 @@ static TCollection_AsciiString getTmpDir()
 #ifdef WIN32
       aTmpDir = TCollection_AsciiString("C:\\");
 #else
-      aTmpDir = TCollection_AsciiString("/export/home/");
+      aTmpDir = TCollection_AsciiString("/tmp/");
 #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 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)
-  {
+   TCollection_AsciiString pluginerror("ghs3dprl: ");
+   SMESHDS_Mesh* meshDS = theMesh.GetMeshDS();
+   //cout<<"GetMeshDS done\n";
+   if (_countSubMesh==0){
+      MESSAGE("GHS3DPRLPlugin_GHS3DPRL::Compute");
       _countTotal=0;
       TopExp_Explorer expf(meshDS->ShapeToMesh(), TopAbs_SOLID);
-      for ( ; expf.More(); expf.Next() )
-          _countTotal++;
-  }
-
-  _countSubMesh++;
-
-  if (_countSubMesh == _countTotal )
-  {
+      for ( ; expf.More(); expf.Next() ) _countTotal++;
+   }
+   _countSubMesh++;
+   //cout<<"Compute _countSubMesh "<<_countSubMesh<<endl;
+   //no stuff if multiples submesh, multiple call compute
+   //mesh all in one pass tepal (the last)
+   if (_countSubMesh != _countTotal ) return true;
+
+   //stuff on last call 
+   if (_hypothesis==NULL){
+      pluginerror += "No existing parameters/hypothesis for GHS3DPRL";
+      cout <<"\n"<<pluginerror<<"\n\n";
+      error(COMPERR_ALGO_FAILED, pluginerror.ToCString() );
+      return false;
+   }
+   SetParameters(_hypothesis);
+   cout << "\n" << _name << " parameters :\n" << endl;
+   cout << "     generic path/name of MED Files = " << _MEDName << endl;
+   cout << "     number of partitions = " << _NbPart << endl;
+   cout << "     mesh holes = " << _ToMeshHoles << endl;
+   cout << "     keep intermediates files (from tepal) = " << _KeepFiles << endl;
+   cout << "     background (from tepal) = " << _Background << "\n\n";
+
+      //string tmpDir=getTmpDir_new();
       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
+         GHS3DPRL_In,GHS3DPRL_Out,GHS3DPRL_Outxml,
+         run_GHS3DPRL("tepal2med "),rm("rm "),run_nokeep_files,
+         NbPart,fileskinmed(""),path,casenamemed;  //_MEDName.c_str());
 
-      TCollection_AsciiString path;
-      TCollection_AsciiString casenamemed;//_MEDName.c_str());
       casenamemed += (char *)_MEDName.c_str();
       int n=casenamemed.SearchFromEnd('/');
-      if (n>0)
-      {
+      if (n>0) {
          path=casenamemed.SubString(1,n);
-         casenamemed=casenamemed.SubString(n+1,casenamemed.Length());
+         casenamemed=casenamemed.SubString(n+1,casenamemed.Length()); 
       }
       else
          path=tmpDir;
 
-      if (casenamemed.Length()>20)
-      {
+      if (casenamemed.Length()>20){
          casenamemed=casenamemed.SubString(1,20);
          cerr<<"MEDName truncated (no more 20 characters) = "<<casenamemed<<endl;
       }
@@ -485,69 +485,141 @@ bool GHS3DPRLPlugin_GHS3DPRL::Compute(SMESH_Mesh&          theMesh,
 
       map <int,int> aSmdsToGHS3DPRLIdMap;
       map <int,const SMDS_MeshNode*> aGHS3DPRLIdToNodeMap;
-      GHS3DPRL_In=path + "GHS3DPRL";
-      GHS3DPRL_Out=path + casenamemed;
+      GHS3DPRL_In = path + "GHS3DPRL";
+      GHS3DPRL_Out = path + casenamemed;
+      GHS3DPRL_Outxml = path + casenamemed + ".xml"; //master file
       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
+      //tepal2med --casename=/home/whoami/tmp/GHS3DPRL --number=5 --medname=DOMAIN 
+      //          --limitswap=1000 --verbose=0 --test=no --menu=no --launchtepal=yes;
+      
+      run_GHS3DPRL = run_GHS3DPRL +
+                     " --casename=" + GHS3DPRL_In + 
+                     " --number=" + NbPart + 
+                     " --medname=" + GHS3DPRL_Out +
+                     " --launchtepal=yes";
+      if (_ToMeshHoles) run_GHS3DPRL += " --meshholes=yes"; else run_GHS3DPRL += " --meshholes=no";
+      if (_Background) run_GHS3DPRL += " --background=yes"; else run_GHS3DPRL += " --background=no";
+      run_nokeep_files = rm +GHS3DPRL_In + "* " + path + "tepal.log";
+      system( run_nokeep_files.ToCString() ); //clean files
+      run_nokeep_files = rm + GHS3DPRL_In + "* ";
+
+      cout<<"GHS3DPRL command : "<<run_GHS3DPRL.ToCString()<<endl;
+      cout<<"Write files .faces .point ...";
+      GHS3DPRL_Out = path + casenamemed;
+      OSD_File( GHS3DPRL_Outxml ).Remove(); //only the master xml file
       Ok=writeGHS3DPRLFiles(GHS3DPRL_In, meshDS, aSmdsToGHS3DPRLIdMap, aGHS3DPRLIdToNodeMap);
+      if (Ok) {cout<<" ...done\n";}
+      else {
+         cout<<" ...NOT done\n";
+         pluginerror = pluginerror + "problem writing input tepal files " + GHS3DPRL_In + "[.faces|.points]";
+      }
+
+      //Ecriture dans un fichier MED ?v2.? meme si not Ok
+      //create empty file -> avoid warning message
+      //med_idt fid=MEDouvrir((const char *)fileskinmed.ToCString(),MED_CREATION);
+      //med_err ret=MEDfermer(fid);
+      //fileskinmed=fileskinmed + "cp /home/wambeke/empty.med "+ path + "GHS3DPRL_skin.med";
+      //system( fileskinmed.ToCString() );
+      fileskinmed=path + "GHS3DPRL_skin.med";
+      cout<<"Write file "<<fileskinmed<<"...";
+      theMesh.ExportMED(fileskinmed.ToCString(),"SKIN_INITIAL",true,1);
+      cout<<" ...done\n";
+
+      if (!Ok) {
+         error(COMPERR_ALGO_FAILED, pluginerror.ToCString());
+         return false; //pb abandonne
+      }
+
+      //sometimes it is better to wait flushing files on slow filesystem...
+      system( "sleep 3" );
+      system( run_GHS3DPRL.ToCString() );
+      system( "sleep 3" );
 
-      if (Ok) system( run_GHS3DPRL.ToCString() );
+      //cout<<"!!!reprise plugin!!!"<<endl;
+
+      if (_Background) {
+         pluginerror = pluginerror + "backgrounding... plugin is not waiting for output files "+ casenamemed + "_*.med";
+         cout<<pluginerror<<endl;
+         error(COMPERR_ALGO_FAILED, pluginerror.ToCString());
+         return false; //but it is not a problem but if true my message is overwritten
+         //return true; //but it is not a problem, 
+      }
 
       // read a result, GHS3DPRL_Out is the name of master file (previous xml format)
-      FILE * aResultFile = fopen( GHS3DPRL_Out.ToCString(), "r" );
-      if (aResultFile)
-      {
+      FILE * aResultFile = fopen( GHS3DPRL_Outxml.ToCString(), "r" );
+      if (aResultFile){
           //Ok = readResult( aResultFile, meshDS, theShape, aGHS3DPRLIdToNodeMap, GHS3DPRL_Out, _nodeRefNumber );
           Ok = true;
+          Ok = false; //but it is not a problem but if true my message is overwritten
           fclose(aResultFile);
-          cout << "GHS3DPRL OK output file "<<GHS3DPRL_Out<<" exist !\n\n";
-          if (!_KeepFiles)
-          {
-             system( run_keep_files.ToCString() );
-          }
+          cout<<"GHS3DPRL OK output master file "<<casenamemed<<".xml exist !\n\n";
+          pluginerror = pluginerror + "new tetaedra not in memory, but stored in files "+ casenamemed + "_*.med";
+          cout<<pluginerror<<endl;
+          error(COMPERR_ALGO_FAILED, pluginerror.ToCString());
+          if (!_KeepFiles) system( run_nokeep_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() );
+      else{
+          Ok = false; //it is a problem AND my message is NOT overwritten
+          pluginerror = pluginerror + "output master file " + casenamemed + ".xml do not exist";
+          cout<<pluginerror<<endl;
+          error(COMPERR_ALGO_FAILED, pluginerror.ToCString() );
+          cout<<"GHS3DPRL KO output files "<<GHS3DPRL_Out<<" do not exist ! see intermediates files keeped:\n";
+          TCollection_AsciiString run_list_files("ls -alt ");
+          run_list_files +=  GHS3DPRL_Out + "* " + GHS3DPRL_In + "* " + path + "tepal.log";
+          system( run_list_files.ToCString() );
           cout<<endl;
       }
       _countSubMesh=0;
 
-  }
-  return Ok;
+
+    return Ok;
+   /*pid_t pid = fork();
+   if (pid > 0) {
+      //Processus père
+      cout<<"le pere est la\n";
+      system("echo le pere > lepere.tmp");
+      system("sleep 10");
+      system("ps -edf |grep wambeke > pslepere.tmp");
+      cout<<"le pere return 0\n";
+      return 0; //ok
+      //exit(0);
+   } else if (pid == 0) {
+      //Processus fils
+      cout<<"le fils est la\n";
+      //On rend le fils indépendant de tout terminal
+      setsid();
+      system("sleep 20");
+      system("echo le fils > lefils.tmp");
+      system("sleep 20");
+      system("ps -edf |grep wambeke > pslefils.tmp");
+      cout<<"le fils return 0\n";
+      return 0; //ok
+   } else {
+      //Traitement d'erreur
+      cout<<"ya probleme sur fork()\n";
+      return 1; //ko
+   }*/
 }
 
 //=============================================================================
-
 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 );
index b98eb64fbd221969692cdca11f044e9bb728263c..e641e7d9293a251675c625808c6acdeb03b4893a 100755 (executable)
@@ -1,29 +1,27 @@
-//  GHS3DPRLPlugin : C++ implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-// 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_
@@ -62,9 +60,11 @@ private:
   int   _countTotal;
   int   _nodeRefNumber;
 
-  string _MEDName;    //number of partitions
+  string _MEDName;
   int   _NbPart;      //number of partitions
   bool  _KeepFiles;   //tepal file .noboite binary or not
+  bool  _Background;  //true for big meshes
+  bool  _ToMeshHoles;
 };
 
 #endif
index 7179b480e9182329942525552d450ca5c9cf6c37..c3dc77dd26e3cd1738bf367738161d3d709d9481 100755 (executable)
@@ -1,30 +1,28 @@
-//  GHS3DPRLPlugin : idl implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//  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"
@@ -41,17 +39,17 @@ using namespace std;
 //=============================================================================
 
 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 )
+                                                     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 );
+                                             theStudyId,
+                                             theGenImpl );
 }
 
 //=============================================================================
index 5c4ec042d7a0c78dd81fe279fa7e228e3856e665..4db91a809926be83421397878e58fabb4057a92b 100755 (executable)
@@ -1,28 +1,27 @@
-//  GHS3DPRLPlugin : idl implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//  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_
@@ -44,8 +43,8 @@ class GHS3DPRLPlugin_GHS3DPRL_i:
 public:
   // Constructor
   GHS3DPRLPlugin_GHS3DPRL_i (PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl );
+                            int                     theStudyId,
+                            ::SMESH_Gen*            theGenImpl );
   // Destructor
   virtual ~GHS3DPRLPlugin_GHS3DPRL_i();
 
index 866a76eff8f95beaab48d1debc6f5a95db231734..8f29b51162a26fc7070e26c972b61bb4fa19a6e0 100755 (executable)
@@ -1,6 +1,4 @@
-//  GHS3DPRLPlugin : C++ implementation
-//
-//  Copyright (C) 2006  OPEN CASCADE, CEA/DEN, EDF R&D
+//  Copyright (C) 2007-2008 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 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
-//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// File      : GHS3DPRLPlugin_Hypothesis.cxx
-// Author    : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
-// Date      : 2007/02/01
-// Project   : SALOME
-//=============================================================================
+// ---
+// File   : GHS3DPRLPlugin_Hypothesis.cxx
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// ---
 
-using namespace std;
 #include <GHS3DPRLPlugin_Hypothesis.hxx>
 #include <utilities.h>
 
@@ -39,7 +34,9 @@ GHS3DPRLPlugin_Hypothesis::GHS3DPRLPlugin_Hypothesis (int hypId, int studyId,
   : SMESH_Hypothesis(hypId, studyId, gen),
     _MEDName( GetDefaultMEDName() ),
     _NbPart( GetDefaultNbPart() ),
-    _KeepFiles( GetDefaultKeepFiles() )
+    _KeepFiles( GetDefaultKeepFiles() ),
+    _Background( GetDefaultBackground() ),
+    _ToMeshHoles( GetDefaultToMeshHoles() )
 {
   MESSAGE("GHS3DPRLPlugin_Hypothesis::GHS3DPRLPlugin_Hypothesis");
   _name = "GHS3DPRL_Parameters";
@@ -51,10 +48,46 @@ GHS3DPRLPlugin_Hypothesis::GHS3DPRLPlugin_Hypothesis (int hypId, int studyId,
  *
  */
 //=============================================================================
+static std::string cutOrReplaceBlancs(std::string theIn)
+{
+  // cut all blancs at the beginning and at the end of the string,
+  // replace each blancs sequence of maximum length inside the string by one '_' symbol,
+  // as blancs consider: 9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR) and 32 (Space)
+  int len = theIn.length();
+  int lastgood = 0;
+  const char* str1 = theIn.c_str();
+  char* str2 = new char [len + 1];
+  bool del = true;
+
+  for (int i = 0, j = 0; i < len; i++)
+  {
+    ushort ucs = (ushort)(str1[i]);
+    if ((9 <= ucs && ucs <= 13) || ucs == 32)
+    {
+      if (!del)
+      {
+        str2[j++] = '_';
+        del = true;
+      }
+    }
+    else
+    {
+      str2[j++] = str1[i];
+      lastgood = j;
+      del = false;
+    }
+  }
+  str2[lastgood] = '\0';
+  std::string anOut = str2;
+  return anOut;
+}
 
-void GHS3DPRLPlugin_Hypothesis::SetMEDName(string theVal) {
-  if (theVal != _MEDName) {
-    _MEDName = theVal;
+void GHS3DPRLPlugin_Hypothesis::SetMEDName(std::string theVal) {
+  //without whitespaces! ..from python?
+  std::string tmp1 = cutOrReplaceBlancs(theVal);
+  std::string tmp2 = _MEDName;
+  if (tmp1 != tmp2) {
+    _MEDName = tmp1.c_str();
     NotifySubMeshesHypothesisModification();
   }
 }
@@ -73,19 +106,39 @@ void GHS3DPRLPlugin_Hypothesis::SetKeepFiles(bool theVal) {
   }
 }
 
+void GHS3DPRLPlugin_Hypothesis::SetBackground(bool theVal) {
+  if (theVal != _Background) {
+    _Background = theVal;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+void GHS3DPRLPlugin_Hypothesis::SetToMeshHoles(bool theVal) {
+  if (theVal != _ToMeshHoles) {
+    _ToMeshHoles = theVal;
+    NotifySubMeshesHypothesisModification();
+  }
+}
+
+
 //=============================================================================
 /*!
  *
  */
 //=============================================================================
-ostream & GHS3DPRLPlugin_Hypothesis::SaveTo(ostream & save)
+std::ostream& GHS3DPRLPlugin_Hypothesis::SaveTo(std::ostream& save)
 {
-  save << "MEDName=" << _MEDName;
-  save << "NbPart=" << _NbPart;
-  save << "KeepFiles=" << (int)_KeepFiles;
-  cout << endl;
-  cout << "save : " << save << endl;
-  cout << endl;
+  /*save << _MEDName ; //without whitespaces!
+  save << " " << _NbPart;
+  save << " " << (int)_KeepFiles;*/
+
+  //explicit outputs for future code compatibility of saved .hdf
+  //save without any whitespaces!
+  save<<"MEDName="<<_MEDName<<";";
+  save<<"NbPart="<<_NbPart<<";";
+  save<<"ToMeshHoles="<<(int) _ToMeshHoles<<";";
+  save<<"KeepFiles="<<(int) _KeepFiles<<";";
+  save<<"Background="<<(int) _Background<<";";
   return save;
 }
 
@@ -94,57 +147,36 @@ ostream & GHS3DPRLPlugin_Hypothesis::SaveTo(ostream & save)
  *
  */
 //=============================================================================
-istream & GHS3DPRLPlugin_Hypothesis::LoadFrom(istream & load)
+std::istream& GHS3DPRLPlugin_Hypothesis::LoadFrom(std::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;
+   //explicit inputs for future code compatibility of saved .hdf
+   bool isOK = true;
+   std::string str1,str2,str3,str4;
+
+   //save without any whitespaces!
+   isOK = (load >> str1);
+   if (!(isOK)) {
+     //defaults values assumed
+     load.clear(std::ios::badbit | load.rdstate());
+     return load;
+   }
+   int pos = 0;
+   int len = str1.length();
+   while (pos < len) {
+     int found = str1.find(';',pos);
+     str2 = str1.substr(pos,found-pos);
+     int eqpos = str2.find('=',0);
+     str3 = str2.substr(0,eqpos);
+     str4 = str2.substr(eqpos+1);
+     pos = found + 1;
+
+     if (str3=="MEDName") _MEDName = str4.c_str();
+     if (str3=="NbPart") _NbPart = atoi(str4.c_str());
+     if (str3=="KeepFiles") _KeepFiles = (bool) atoi(str4.c_str());
+     if (str3=="ToMeshHoles") _ToMeshHoles = (bool) atoi(str4.c_str());
+     if (str3=="Background") _Background = (bool) atoi(str4.c_str());
+   }
+   return load;
 }
 
 //=============================================================================
@@ -152,7 +184,7 @@ istream & GHS3DPRLPlugin_Hypothesis::LoadFrom(istream & load)
  *
  */
 //=============================================================================
-ostream & operator <<(ostream & save, GHS3DPRLPlugin_Hypothesis & hyp)
+std::ostream& operator <<(std::ostream& save, GHS3DPRLPlugin_Hypothesis& hyp)
 {
   return hyp.SaveTo( save );
 }
@@ -162,7 +194,7 @@ ostream & operator <<(ostream & save, GHS3DPRLPlugin_Hypothesis & hyp)
  *
  */
 //=============================================================================
-istream & operator >>(istream & load, GHS3DPRLPlugin_Hypothesis & hyp)
+std::istream& operator >>(std::istream& load, GHS3DPRLPlugin_Hypothesis& hyp)
 {
   return hyp.LoadFrom( load );
 }
@@ -177,13 +209,25 @@ istream & operator >>(istream & load, GHS3DPRLPlugin_Hypothesis & hyp)
  */
 //================================================================================
 bool GHS3DPRLPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh*   theMesh,
-                                                      const TopoDS_Shape& theShape)
+                                                   const TopoDS_Shape& theShape)
+{
+  return false;
+}
+//================================================================================
+/*!
+ * \brief Initialize my parameter values by default parameters.
+ *  \retval bool - true if parameter values have been successfully defined
+ */
+//================================================================================
+
+bool GHS3DPRLPlugin_Hypothesis::SetParametersByDefaults(const TDefaults&  /*dflts*/,
+                                                        const SMESH_Mesh* /*theMesh*/)
 {
   return false;
 }
 
 //=============================================================================
-string GHS3DPRLPlugin_Hypothesis::GetDefaultMEDName()
+std::string GHS3DPRLPlugin_Hypothesis::GetDefaultMEDName()
 {
   return "DOMAIN\0";
 }
@@ -194,8 +238,20 @@ int GHS3DPRLPlugin_Hypothesis::GetDefaultNbPart()
   return 16;
 }
 
+//=============================================================================
 bool GHS3DPRLPlugin_Hypothesis::GetDefaultKeepFiles()
 {
   return false;
 }
 
+//=============================================================================
+bool GHS3DPRLPlugin_Hypothesis::GetDefaultBackground()
+{
+  return false;
+}
+
+//=============================================================================
+bool GHS3DPRLPlugin_Hypothesis::GetDefaultToMeshHoles()
+{
+  return false;
+}
index 2640c71499c105a6dae79bd469bdd894bf93bdad..7dd85b34f8b46e3aab38b182080cdce5b2e89c74 100755 (executable)
@@ -1,6 +1,4 @@
-//  GHS3DPRLPlugin : C++ implementation
-//
-//  Copyright (C) 2006  OPEN CASCADE, CEA/DEN, EDF R&D
+//  Copyright (C) 2007-2008 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 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
-//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// File      : GHS3DPRLPlugin_Hypothesis.hxx
-// Author    : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
-// Date      : 2007/02/01
-// Project   : SALOME
-// $Header   :
-//=============================================================================
+// ---
+// File   : GHS3DPRLPlugin_Hypothesis.hxx
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// ---
 
 #ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
 #define _GHS3DPRLPlugin_Hypothesis_HXX_
@@ -39,28 +34,36 @@ class GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
 {
 public:
 
-  GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen * gen);
+  GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
+
+  void                  SetMEDName(std::string theVal);
+  std::string           GetMEDName() const { return _MEDName; }
 
-  void SetMEDName(string theVal);
-  string GetMEDName() const { return _MEDName; }
+  void                  SetNbPart(int theVal);
+  int                   GetNbPart() const { return _NbPart; }
 
-  void SetNbPart(int theVal);
-  int GetNbPart() const { return _NbPart; }
+  void                  SetKeepFiles(bool theVal);
+  bool                  GetKeepFiles() const { return _KeepFiles; }
 
-  void SetKeepFiles(bool theVal);
-  bool GetKeepFiles() const { return _KeepFiles; }
+  void                  SetBackground(bool theVal);
+  bool                  GetBackground() const { return _Background; }
+
+  void                  SetToMeshHoles(bool theVal);
+  bool                  GetToMeshHoles() const { return _ToMeshHoles; }
 
   // the parameters default values
 
-  static string GetDefaultMEDName();
-  static int GetDefaultNbPart();
-  static bool GetDefaultKeepFiles();
+  static std::string    GetDefaultMEDName();
+  static int            GetDefaultNbPart();
+  static bool           GetDefaultKeepFiles();
+  static bool           GetDefaultBackground();
+  static bool           GetDefaultToMeshHoles();
 
   // 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);
+  virtual std::ostream& SaveTo(std::ostream& save);
+  virtual std::istream& LoadFrom(std::istream& load);
+  friend std::ostream&  operator <<(std::ostream& save, GHS3DPRLPlugin_Hypothesis& hyp);
+  friend std::istream&  operator >>(std::istream& load, GHS3DPRLPlugin_Hypothesis& hyp);
 
   /*!
    * \brief Does nothing
@@ -68,16 +71,23 @@ public:
    * \param theShape - the geometry of interest
    * \retval bool - always false
    */
-  virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+  virtual bool          SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
+  /*!
+   * \brief Initialize my parameter values by default parameters.
+   *  \retval bool - true if parameter values have been successfully defined
+   */
+  virtual bool          SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
 
 private:
-  int   _countSubMesh;
-  int   _countTotal;
-  int   _nodeRefNumber;
+  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
+  std::string  _MEDName;     // generic path/name of med files
+  int          _NbPart;      // number of partitions
+  bool         _KeepFiles;   // keep intermediates tepal files or not
+  bool         _Background;  // tepal in background
+  bool         _ToMeshHoles;
 };
 
 #endif
index 4deb48892763736f451da0fd31153a36a113ec9f..c7f044d13ebaeee6c468101aa90c9eb6e150962b 100755 (executable)
@@ -1,30 +1,27 @@
-//  GHS3DPRLPlugin : C++ implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-// 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"
@@ -42,15 +39,15 @@ using namespace std;
 //=============================================================================
 GHS3DPRLPlugin_Hypothesis_i::
 GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl)
+                            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);
+                                               theStudyId,
+                                               theGenImpl);
 }
 
 //=============================================================================
@@ -70,6 +67,8 @@ GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
  *  GHS3DPRLPlugin_Hypothesis_i::SetMEDName
  *  GHS3DPRLPlugin_Hypothesis_i::SetNbPart
  *  GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
+ *  GHS3DPRLPlugin_Hypothesis_i::SetBackground
+ *  GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles
  */
 //=============================================================================
 
@@ -97,11 +96,29 @@ void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
   SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
 }
 
+void GHS3DPRLPlugin_Hypothesis_i::SetBackground (CORBA::Boolean theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetBackground");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetBackground(theValue);
+  SMESH::TPythonDump() << _this() << ".SetBackground( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles (CORBA::Boolean theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetToMeshHoles(theValue);
+  SMESH::TPythonDump() << _this() << ".SetToMeshHoles( " << theValue << " )";
+}
+
 //=============================================================================
 /*!
  *  GHS3DPRLPlugin_Hypothesis_i::GetMEDName
  *  GHS3DPRLPlugin_Hypothesis_i::GetNbPart
  *  GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
+ *  GHS3DPRLPlugin_Hypothesis_i::GetBackground
+ *  GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles
  */
 //=============================================================================
 
@@ -128,6 +145,20 @@ CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
   return this->GetImpl()->GetKeepFiles();
 }
 
+CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetBackground()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetBackground");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetBackground();
+}
+
+CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetToMeshHoles();
+}
+
 //=============================================================================
 /*!
  *  GHS3DPRLPlugin_Hypothesis_i::GetImpl
@@ -144,8 +175,8 @@ CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
 //================================================================================
 /*!
  * \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
+ * \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)
  */
index 72f19171f1d0901c316faedb21e26adc43f29c3e..e62fb301d8c34d9efaf32c8efb665cbf1a43a5cf 100755 (executable)
@@ -1,29 +1,27 @@
-//  GHS3DPRLPlugin : C++ implementation
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-// 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_
@@ -45,8 +43,8 @@ class GHS3DPRLPlugin_Hypothesis_i:
  public:
   // Constructor
   GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
-                             int                     theStudyId,
-                             ::SMESH_Gen*            theGenImpl);
+                              int                     theStudyId,
+                              ::SMESH_Gen*            theGenImpl);
   // Destructor
   virtual ~GHS3DPRLPlugin_Hypothesis_i();
 
@@ -60,6 +58,12 @@ class GHS3DPRLPlugin_Hypothesis_i:
   void SetKeepFiles(CORBA::Boolean theVal);
   CORBA::Boolean GetKeepFiles();
 
+  void SetBackground(CORBA::Boolean theVal);
+  CORBA::Boolean GetBackground();
+
+  void SetToMeshHoles(CORBA::Boolean theVal);
+  CORBA::Boolean GetToMeshHoles();
+
   // Get implementation
   ::GHS3DPRLPlugin_Hypothesis* GetImpl();
 
index ffa910d7320e775c3ec0de810c45a633c1acef7b..bd5fd319e7642e22a672850d7897d12bc18ae69d 100755 (executable)
@@ -1,32 +1,28 @@
-//  SMESH GHS3DPRLPlugin : implementaion of SMESH idl descriptions
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//
-//  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"
diff --git a/src/GHS3DPRLPlugin/Makefile.am b/src/GHS3DPRLPlugin/Makefile.am
new file mode 100644 (file)
index 0000000..cafa635
--- /dev/null
@@ -0,0 +1,61 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS =
+
+# Libraries targets
+lib_LTLIBRARIES = libGHS3DPRLEngine.la
+
+dist_libGHS3DPRLEngine_la_SOURCES =    \
+       GHS3DPRLPlugin_GHS3DPRL.hxx             \
+       GHS3DPRLPlugin_GHS3DPRL.cxx             \
+       GHS3DPRLPlugin_GHS3DPRL_i.hxx   \
+       GHS3DPRLPlugin_GHS3DPRL_i.cxx   \
+       GHS3DPRLPlugin_Hypothesis.hxx   \
+       GHS3DPRLPlugin_Hypothesis.cxx   \
+       GHS3DPRLPlugin_Hypothesis_i.hxx \
+       GHS3DPRLPlugin_Hypothesis_i.cxx \
+       GHS3DPRLPlugin_i.cxx
+
+libGHS3DPRLEngine_la_CPPFLAGS =        \
+        $(KERNEL_CXXFLAGS)     \
+        $(GUI_CXXFLAGS)                \
+       $(MED_CXXFLAGS)         \
+       $(GEOM_CXXFLAGS)        \
+       $(CAS_CPPFLAGS)         \
+       $(SMESH_CXXFLAGS)       \
+       $(CORBA_CXXFLAGS)       \
+       $(CORBA_INCLUDES)       \
+       $(BOOST_CPPFLAGS)       \
+       -I$(top_builddir)/idl   \
+       -I$(top_builddir)/salome_adm/unix
+
+libGHS3DPRLEngine_la_LDFLAGS  =                        \
+       ../../idl/libSalomeIDLGHS3DPRLPLUGIN.la \
+       $(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine   \
+       $(KERNEL_LDFLAGS) -lSalomeGenericObj
diff --git a/src/GHS3DPRLPlugin/Makefile.in b/src/GHS3DPRLPlugin/Makefile.in
deleted file mode 100755 (executable)
index 525c23f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#  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.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..57db467
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = GHS3DPRLPlugin
+
+if GHS3DPRLPLUGIN_ENABLE_GUI
+  SUBDIRS += gui tepal2med
+endif
+
+DIST_SUBDIRS = GHS3DPRLPlugin gui tepal2med
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100755 (executable)
index f954477..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#  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@
index 73d49648667cc20ebc6a74bc2c836d24575ef76d..b5210f1948a8c87f608be8cd4ba05ad0ecabae10 100755 (executable)
@@ -1,28 +1,27 @@
-//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//
-//  File   : GHS3DPRLPluginGUI.cxx
-//  Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
-//  Module : GHS3DPRLPlugin
+// ---
 
 #include "GHS3DPRLPluginGUI_HypothesisCreator.h"
 
index ccb2df8027e84024b2304b4c8a77856913a479fc..5927a6ced2a2b4f4d228ba1d591e26f418be6df7 100755 (executable)
@@ -1,29 +1,27 @@
-//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//
-//  File   : GHS3DPRLPluginGUI_HypothesisCreator.cxx
-//  Author  : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
-//  Module : GHS3DPRLPlugin
-//  $Header:
+// ---
 
 #include "GHS3DPRLPluginGUI_HypothesisCreator.h"
 
 #include CORBA_SERVER_HEADER(GHS3DPRLPlugin_Algorithm)
 
 #include <SUIT_Session.h>
-
+#include <SUIT_ResourceMgr.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>
 
+#include <QFrame>
+#include <QGroupBox>
+#include <QLabel>
+#include <QLineEdit>
+#include <QCheckBox>
+#include <QVBoxLayout>
+#include <QGridLayout>
 
 GHS3DPRLPluginGUI_HypothesisCreator::GHS3DPRLPluginGUI_HypothesisCreator( const QString& theHypType )
 : SMESHGUI_GenericHypothesisCreator( theHypType ),
-  myIs3D(true)
+  myIs3D( true )
 {
 }
 
@@ -65,48 +59,64 @@ bool GHS3DPRLPluginGUI_HypothesisCreator::checkParams() const
   readParamsFromHypo( data_old );
   readParamsFromWidgets( data_new );
   bool res = storeParamsToHypo( data_new );
+  storeParamsToHypo( data_old );
   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 );
+  QFrame* fr = new QFrame( 0 );
+  QVBoxLayout* lay = new QVBoxLayout( fr );
+  lay->setMargin( 5 );
+  lay->setSpacing( 0 );
 
-  QGroupBox* GroupC1 = new QGroupBox( 2, Qt::Horizontal, fr, "GroupC1" );
+  QGroupBox* GroupC1 = new QGroupBox( tr( "SMESH_ARGUMENTS" ), fr );
   lay->addWidget( GroupC1 );
 
-  GroupC1->setTitle( tr( "SMESH_ARGUMENTS" ) );
-  GroupC1->layout()->setSpacing( 6 );
-  GroupC1->layout()->setMargin( 11 );
+  QGridLayout* l = new QGridLayout( GroupC1 );
+  l->setSpacing( 6 );
+  l->setMargin( 11 );
 
+  int row = 0;
   myName = 0;
   if( isCreation() ) {
-    myNameText = new QLabel( tr( "SMESH_NAME" ), GroupC1 );
-    QWhatsThis::add( myNameText, tr( "GHS3DPRL_WhatsThis_Name" ) );
+    QLabel* aNameLab = new QLabel( tr( "SMESH_NAME" ), GroupC1 );
+    aNameLab->setWhatsThis( tr( "GHS3DPRL_WhatsThis_Name" ) );
+    l->addWidget( aNameLab, row, 0, 1, 1 );
     myName = new QLineEdit( GroupC1 );
+    l->addWidget( myName, row++, 1, 1, 1 );
   }
 
-  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis_var h =
-  GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis::_narrow( initParamsHypothesis() );
+  //GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis_var h =
+  //GHS3DPRLPlugin::GHS3DPRLPlugin_Hypothesis::_narrow( initParamsHypothesis() );
 
-  myMEDNameText = new QLabel( tr( "GHS3DPRL_MEDName" ), GroupC1 );
-  QWhatsThis::add( myMEDNameText, tr( "GHS3DPRL_WhatsThis_MEDName" ) );
+  QLabel* aMEDNameText = new QLabel( tr( "GHS3DPRL_MEDName" ), GroupC1 );
+  aMEDNameText->setWhatsThis( tr( "GHS3DPRL_WhatsThis_MEDName" ) );
+  l->addWidget( aMEDNameText, row, 0, 1, 1 );
   myMEDName = new QLineEdit( GroupC1 );
-  QLabel* myNbPartText = new QLabel( tr( "GHS3DPRL_NbPart" ), GroupC1 );
-  QWhatsThis::add( myNbPartText, tr( "GHS3DPRL_WhatsThis_NbPart" ) );
+  l->addWidget( myMEDName, row++, 1, 1, 1 );
+
+  QLabel* aNbPartText = new QLabel( tr( "GHS3DPRL_NbPart" ), GroupC1 );
+  aNbPartText->setWhatsThis( tr( "GHS3DPRL_WhatsThis_NbPart" ) );
+  l->addWidget( aNbPartText, row, 0, 1, 1 );
   myNbPart = new QtxIntSpinBox( GroupC1 );
-  // myHexesMinLevel->setMinValue( 3 );
-  myNbPart->setMinValue( 1 );
-  myNbPart->setMaxValue( 256 );
-  myNbPart->setLineStep( 1 );
+  l->addWidget( myNbPart, row++, 1, 1, 1 );
+  myNbPart->setMinimum( 1 );
+  myNbPart->setMaximum( 256 );
+  myNbPart->setSingleStep( 1 );
 
   myKeepFiles = new QCheckBox( tr( "GHS3DPRL_KeepFiles" ), GroupC1 );
-  QWhatsThis::add( myKeepFiles, tr( "GHS3DPRL_WhatsThis_KeepFiles" ) );
+  myKeepFiles->setWhatsThis( tr( "GHS3DPRL_WhatsThis_KeepFiles" ) );
+  l->addWidget( myKeepFiles, row++, 0, 1, 2 );
+  
+  myBackground = new QCheckBox( tr( "GHS3DPRL_Background" ), GroupC1 );
+  myBackground->setWhatsThis( tr( "GHS3DPRL_WhatsThis_Background" ) );
+  l->addWidget( myBackground, row++, 0, 1, 2 );
+
+  myToMeshHoles = new QCheckBox( tr( "GHS3DPRL_ToMeshHoles" ), GroupC1 );
+  myToMeshHoles->setWhatsThis( tr( "GHS3DPRL_WhatsThis_ToMeshHoles" ) );
+  l->addWidget( myToMeshHoles, row++, 0, 1, 2 );
 
-  GroupC1->addSpace(0);
   myIs3D = true;
 
   return fr;
@@ -117,11 +127,13 @@ void GHS3DPRLPluginGUI_HypothesisCreator::retrieveParams() const
   GHS3DPRLHypothesisData data;
   readParamsFromHypo( data );
 
-  if( myName ) myName->setText( data.myName );
+  if ( myName ) myName->setText( data.myName );
   myMEDName->setText( data.myMEDName );
   myNbPart->setValue( data.myNbPart );
   myKeepFiles->setChecked( data.myKeepFiles );
-  myNbPart->setEnabled(true);
+  myBackground->setChecked( data.myBackground );
+  myToMeshHoles->setChecked( data.myToMeshHoles );
+  //myNbPart->setEnabled( true );
 }
 
 QString GHS3DPRLPluginGUI_HypothesisCreator::storeParams() const
@@ -131,9 +143,11 @@ QString GHS3DPRLPluginGUI_HypothesisCreator::storeParams() const
   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 ) + "; ";
+  valStr += tr( "GHS3DPRL_MEDName" ) + " = " + data.myMEDName + "; ";
+  valStr += tr( "GHS3DPRL_NbPart" ) + " = " + QString::number( data.myNbPart )   + "; ";
+  valStr += tr( "GHS3DPRL_ToMeshHoles" )  + " = " + QString::number( data.myToMeshHoles ) + "; ";
+  valStr += tr( "GHS3DPRL_KeepFiles" )  + " = " + QString::number( data.myKeepFiles ) + "; ";
+  valStr += tr( "GHS3DPRL_Background" )  + " = " + QString::number( data.myBackground ) + "; ";
 
   return valStr;
 }
@@ -144,10 +158,12 @@ bool GHS3DPRLPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DPRLHypothesis
     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.myName      = isCreation() && data ? hypName() : "";
+  h_data.myMEDName   = h->GetMEDName(); //"DOMAIN\0";
+  h_data.myNbPart    = h->GetNbPart();
   h_data.myKeepFiles = h->GetKeepFiles();
+  h_data.myBackground = h->GetBackground();
+  h_data.myToMeshHoles = h->GetToMeshHoles();
 
   return true;
 }
@@ -160,16 +176,18 @@ bool GHS3DPRLPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DPRLHypot
   bool ok = true;
   try
   {
-    if( isCreation() )
-      SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.latin1() );
+    if ( isCreation() )
+      SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().constData() );
 
-    h->SetMEDName( h_data.myMEDName );
+    h->SetMEDName( h_data.myMEDName.toLatin1().constData() );
     h->SetNbPart( h_data.myNbPart );
     h->SetKeepFiles( h_data.myKeepFiles );
+    h->SetBackground( h_data.myBackground );
+    h->SetToMeshHoles( h_data.myToMeshHoles );
   }
-  catch(const SALOME::SALOME_Exception& ex)
+  catch ( const SALOME::SALOME_Exception& ex )
   {
-    SalomeApp_Tools::QtCatchCorbaException(ex);
+    SalomeApp_Tools::QtCatchCorbaException( ex );
     ok = false;
   }
   return ok;
@@ -177,26 +195,33 @@ bool GHS3DPRLPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DPRLHypot
 
 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.myName      = myName ? myName->text() : "";
+  h_data.myMEDName   = myMEDName->text().simplified().replace(' ', '_');
+  h_data.myNbPart    = myNbPart->value();
   h_data.myKeepFiles = myKeepFiles->isChecked();
-
+  h_data.myBackground = myBackground->isChecked();
+  h_data.myToMeshHoles = myToMeshHoles->isChecked();
   return true;
 }
 
 QString GHS3DPRLPluginGUI_HypothesisCreator::caption() const
 {
-  return tr( QString( "GHS3DPRL_%1_TITLE" ).arg(myIs3D?QString("3D"):QString("3D")) );
+  return myIs3D ? tr( "GHS3DPRL_3D_TITLE" ) : tr( "GHS3DPRL_3D_TITLE" ); // ??? 3D/2D ???
 }
 
 QPixmap GHS3DPRLPluginGUI_HypothesisCreator::icon() const
 {
-  QString hypIconName = tr( QString("ICON_DLG_GHS3DPRL_PARAMETERS%1").arg(myIs3D?QString(""):QString("")) );
+  QString hypIconName = myIs3D ? tr( "ICON_DLG_GHS3DPRL_PARAMETERS" ) : tr( "ICON_DLG_GHS3DPRL_PARAMETERS" ); // ??? 3D/2D ???
   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")) );
+  return myIs3D ? tr( "GHS3DPRL_3D_HYPOTHESIS" ): tr( "GHS3DPRL_3D_HYPOTHESIS" ); // ??? 3D/2D ???
+}
+
+QString GHS3DPRLPluginGUI_HypothesisCreator::helpPage() const
+{
+  return "ghs3dprl_hypo_page.html";
 }
+
index 995e7a91ccc80d7a932894697a4e34f7640eff25..fd59e9ce3032478499be141af143d680414a6d64 100755 (executable)
@@ -1,37 +1,34 @@
-//  GHS3DPRLPlugin GUI: GUI for plugged-in mesher GHS3DPRLPlugin
+// Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
 //
-//  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 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.
 //
-//  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
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  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)
 //
-//
-//  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
+#ifndef GHS3DPRLPLUGINGUI_HypothesisCreator_H
+#define GHS3DPRLPLUGINGUI_HypothesisCreator_H
 
 #include <SMESHGUI_Hypotheses.h>
 
 class QtxIntSpinBox;
-class QtxDblSpinBox;
 class QCheckBox;
 class QLineEdit;
 
@@ -41,7 +38,9 @@ typedef struct
   QString  myMEDName;
   int      myNbPart;
   bool     myKeepFiles;
-} GHS3DPRLHypothesisData;
+  bool     myBackground;
+  bool    myToMeshHoles;
+ } GHS3DPRLHypothesisData;
 
 /*!
  * \brief Class for creation of GHS3DPRL hypotheses
@@ -54,31 +53,31 @@ public:
   GHS3DPRLPluginGUI_HypothesisCreator( const QString& );
   virtual ~GHS3DPRLPluginGUI_HypothesisCreator();
 
-  virtual bool checkParams() const;
+  virtual bool    checkParams() const;
+  virtual QString helpPage() const;
 
 protected:
-  virtual QFrame*  buildFrame    ();
-  virtual void     retrieveParams() const;
-  virtual QString  storeParams   () const;
+  virtual QFrame* buildFrame    ();
+  virtual void    retrieveParams() const;
+  virtual QString storeParams   () const;
 
-  virtual QString  caption() const;
-  virtual QPixmap  icon() const;
-  virtual QString  type() 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;
+  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;
+ QCheckBox*       myBackground;
+ QCheckBox*       myToMeshHoles;
+ bool             myIs3D;
 };
 
-#endif
+#endif // GHS3DPRLPLUGINGUI_HypothesisCreator_H
diff --git a/src/gui/GHS3DPRLPlugin_images.po b/src/gui/GHS3DPRLPlugin_images.po
deleted file mode 100755 (executable)
index d64a0fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#  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_images.ts b/src/gui/GHS3DPRLPlugin_images.ts
new file mode 100644 (file)
index 0000000..b46d1aa
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE TS>
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ICON_DLG_GHS3DPRL_PARAMETERS</source>
+            <translation>mesh_hypo_GHS3DPRL.png</translation>
+        </message>
+        <message>
+            <source>ICON_DLG_GHS3DPRL_PARAMETERS_3D</source>
+            <translation>mesh_hypo_GHS3DPRL.png</translation>
+        </message>
+        <message>
+            <source>ICON_SMESH_TREE_ALGO_GHS3DPRL_2D3D</source>
+            <translation>mesh_tree_algo_GHS3DPRL.png</translation>
+        </message>
+        <message>
+            <source>ICON_SMESH_TREE_ALGO_GHS3DPRL_3D</source>
+            <translation>mesh_tree_algo_GHS3DPRL.png</translation>
+        </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_GHS3DPRL_Parameters</source>
+            <translation>mesh_tree_hypo_GHS3DPRL.png</translation>
+        </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_GHS3DPRL_Parameters_3D</source>
+            <translation>mesh_tree_hypo_GHS3DPRL.png</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/gui/GHS3DPRLPlugin_msg_en.po b/src/gui/GHS3DPRLPlugin_msg_en.po
deleted file mode 100755 (executable)
index b685489..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#  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/GHS3DPRLPlugin_msg_en.ts b/src/gui/GHS3DPRLPlugin_msg_en.ts
new file mode 100644 (file)
index 0000000..5c65fc0
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE TS>
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>GHS3DPRL_3D_HYPOTHESIS</source>
+            <translation>GHS3DPRL 3D</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_3D_TITLE</source>
+            <translation>Hypothesis Construction</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_KeepFiles</source>
+            <translation>Keep_Files</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_Background</source>
+            <translation>Tepal_in_Background</translation>
+        </message>
+         <message>
+            <source>GHS3DPRL_ToMeshHoles</source>
+            <translation>To_Mesh_Holes</translation>
+        </message>
+       <message>
+            <source>GHS3DPRL_MEDName</source>
+            <translation>MED_Name</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_NbPart</source>
+            <translation>Nb_Part</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_KeepFiles</source>
+            <translation>Keep intemediates tepal Files (.faces,.points,.msg,.noboite...)</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_Background</source>
+            <translation>lanch tepal in background (for a big mesh, a long time...)</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_ToMeshHoles</source>
+            <translation>tepal meshes holes</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_MEDName</source>
+            <translation>Generic path/name of finals outputs files (.med)</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_Name</source>
+            <translation>Name of applied hypothese</translation>
+        </message>
+        <message>
+            <source>GHS3DPRL_WhatsThis_NbPart</source>
+            <translation>Number of partitions of initial wrap</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am
new file mode 100644 (file)
index 0000000..185164e
--- /dev/null
@@ -0,0 +1,71 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS =
+
+# Libraries targets
+lib_LTLIBRARIES = libGHS3DPRLPluginGUI.la
+
+dist_libGHS3DPRLPluginGUI_la_SOURCES =         \
+       GHS3DPRLPluginGUI.cxx                   \
+       GHS3DPRLPluginGUI_HypothesisCreator.h   \
+       GHS3DPRLPluginGUI_HypothesisCreator.cxx
+
+MOC_FILES = \
+       GHS3DPRLPluginGUI_HypothesisCreator_moc.cxx
+
+nodist_libGHS3DPRLPluginGUI_la_SOURCES = \
+       $(MOC_FILES)
+
+# additionnal information to compil and link file
+
+libGHS3DPRLPluginGUI_la_CPPFLAGS =     \
+       $(QT_INCLUDES)                  \
+       $(CAS_CPPFLAGS)                 \
+       $(PYTHON_INCLUDES)              \
+       $(KERNEL_CXXFLAGS)              \
+       $(GUI_CXXFLAGS)                 \
+       $(GEOM_CXXFLAGS)                \
+       $(MED_CXXFLAGS)                 \
+       $(SMESH_CXXFLAGS)               \
+       $(BOOST_CPPFLAGS)               \
+       $(CORBA_CXXFLAGS)               \
+       $(CORBA_INCLUDES)               \
+       -I$(srcdir)/../GHS3DPRLPlugin   \
+       -I$(top_builddir)/idl           \
+       -I$(top_builddir)/salome_adm/unix
+
+libGHS3DPRLPluginGUI_la_LDFLAGS =              \
+       ../GHS3DPRLPlugin/libGHS3DPRLEngine.la  \
+       ${SMESH_LDFLAGS} -lSMESH                \
+       $(CAS_KERNEL)
+
+# resources files
+nodist_salomeres_DATA =                        \
+       GHS3DPRLPlugin_images.qm        \
+       GHS3DPRLPlugin_msg_en.qm
diff --git a/src/gui/Makefile.in b/src/gui/Makefile.in
deleted file mode 100755 (executable)
index 919e89f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#  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
deleted file mode 100644 (file)
index c192e5b..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-# 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
deleted file mode 100755 (executable)
index 7d6dd27..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-.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.am b/src/tepal2med/Makefile.am
new file mode 100644 (file)
index 0000000..a64fd0a
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ---
+#
+# File   : Makefile.am
+# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+#
+# ---
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+bin_PROGRAMS = tepal2med
+
+dist_tepal2med_SOURCES = \
+       ghs3dprl_mesh_wrap.h    \
+       ghs3dprl_mesh_wrap.cxx  \
+       ghs3dprl_msg_parser.h   \
+       ghs3dprl_msg_parser.cxx \
+       dlg_ghs3dmain.h         \
+       dlg_ghs3dmain.cxx       \
+       tepal2med.cxx
+
+MOC_FILES = dlg_ghs3dmain_moc.cxx
+
+UIC_FILES = ui_dlg_ghs3dmain.h
+
+BUILT_SOURCES = $(UIC_FILES)
+
+nodist_tepal2med_SOURCES = $(MOC_FILES) $(UIC_FILES)
+
+tepal2med_CPPFLAGS = $(QT_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) $(LIBXML_INCLUDES)
+
+tepal2med_LDADD = $(QT_LIBS) $(MED2_LIBS) $(HDF5_LIBS) $(LIBXML_LIBS)
diff --git a/src/tepal2med/Makefile.in b/src/tepal2med/Makefile.in
deleted file mode 100755 (executable)
index d9bc726..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#  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@
index 3dae43ddea476f7b87d70469532b9c45bcf37906..d56048c8ee38960b107ed7cfe78d25f0a4880ac4 100755 (executable)
@@ -1,94 +1,46 @@
-/****************************************************************************
-** 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!
-****************************************************************************/
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : dlg_gsh3dmain.cxx
+// Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+//
+// ---
 
 #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 )
+dlg_ghs3dmain::dlg_ghs3dmain()
 {
-    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();
+  ui.setupUi( this );
+  connect( ui.Ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
 }
 
-/*
- *  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()
+int dlg_ghs3dmain::NbPart() const
 {
-    //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 ) );
+    return ui.NbPart->value();
 }
 
+bool dlg_ghs3dmain::KeepFiles() const
+{
+    return ui.KeepFiles->isChecked();
+}
index 140cc7a5f8399ad44d6d4d08699a13a865b81c63..cc10918b600ca6ae8adaea0b97d875ff7b524ac4 100755 (executable)
@@ -1,56 +1,49 @@
-/****************************************************************************
-** 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!
-****************************************************************************/
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : dlg_gsh3dmain.h
+// Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
+//
+// ---
 
 #ifndef DLG_GHS3DMAIN_H
+
 #define DLG_GHS3DMAIN_H
 
-#include <qvariant.h>
-#include <qdialog.h>
-#include <qstring.h>
+#include <QDialog>
 
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QSpacerItem;
-class QGroupBox;
-class QSpinBox;
-class QLabel;
-class QRadioButton;
-class QPushButton;
+#include "ui_dlg_ghs3dmain.h"
 
 class dlg_ghs3dmain : public QDialog
 {
-    Q_OBJECT
+  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();
+  dlg_ghs3dmain();
+  ~dlg_ghs3dmain();
 
+  int  NbPart() const;
+  bool KeepFiles() const;
 
+private:
+  Ui::dlg_ghs3dmain ui;
 };
 
 #endif // DLG_GHS3DMAIN_H
diff --git a/src/tepal2med/dlg_ghs3dmain.ui b/src/tepal2med/dlg_ghs3dmain.ui
new file mode 100644 (file)
index 0000000..c6da925
--- /dev/null
@@ -0,0 +1,104 @@
+<ui version="4.0" >
+ <class>dlg_ghs3dmain</class>
+ <widget class="QDialog" name="dlg_ghs3dmain" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>209</width>
+    <height>145</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <property name="sizeGripEnabled" >
+   <bool>true</bool>
+  </property>
+  <property name="modal" >
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" colspan="3" >
+    <widget class="QGroupBox" name="Parameters" >
+     <property name="title" >
+      <string>Parameters</string>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="textNbPart" >
+        <property name="text" >
+         <string>Nb of partitions</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QSpinBox" name="NbPart" >
+        <property name="minimumSize" >
+         <size>
+          <width>70</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="minimum" >
+         <number>1</number>
+        </property>
+        <property name="maximum" >
+         <number>256</number>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0" colspan="2" >
+       <widget class="QCheckBox" name="KeepFiles" >
+        <property name="whatsThis" >
+         <string>Keep outputs files of tepal</string>
+        </property>
+        <property name="text" >
+         <string>Keep files</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="1" >
+    <widget class="QPushButton" name="Ok" >
+     <property name="text" >
+      <string>&amp;OK</string>
+     </property>
+     <property name="default" >
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/tepal2med/dlg_ghs3dmain.ui.h b/src/tepal2med/dlg_ghs3dmain.ui.h
deleted file mode 100755 (executable)
index 748ae85..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-** 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();
-}
index 6a699c249812b3e76deab797c9452a41593599d2..090425d76450f0ba1cc85cae6646e78db5fef538 100755 (executable)
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : ghs3dprl_mesh_wrap.cxx
+// Author : Christian VAN WAMBEKE (CEA) 
+//
+// ---
+
+#include "ghs3dprl_mesh_wrap.h"
 
 #include <string>
 #include <iostream>
 #include <sstream>
 #include <fstream>
-#include <qstring.h>
-#include <qfile.h>
-#include "ghs3dprl_mesh_wrap.h"
+
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+#include <QFile>
+#include <QRegExp>
 
 using namespace std;
 using namespace med_2_2;
 
+//utils procedures
+
+//************************************
+string i2a(const int &v)
+{
+   ostringstream ss;
+   ss<<v;
+   return ss.str();
+}
+
+//************************************
+QString endspace(QString deb,int lg)
+//better fill by spaces for char unicoo[3*MED_TAILLE_PNOM+1]; etc...
+{
+   QString fin,spa;
+   //spa.fill(' ',lg);
+   //fin=deb+spa;
+   //fin.truncate(lg);
+   fin=deb.leftJustified(lg,' ',true);
+   return fin;
+}
+
+//************************************
+void charendnull(char *p, QString deb, int lg)
+{
+   QString fin;
+   fin=deb;
+   fin.truncate(lg-1);
+   strcpy(p,fin.toLatin1().constData()); // 0 at end
+   for (int i=fin.length();i<lg-1;i++){
+       p[i]='\0';
+   }
+}
+
+//class familles
+//************************************
+   void familles::newfam(QString nom){
+      //cout<<"newfam "<<nom<<endl;
+      if (fam.find(nom)!=fam.end()){
+         cout<<"***newfam*** "<<nom.toLatin1().constData()<<" deja present\n";
+         return;
+      }
+      fend gb;
+      fam[nom]=gb;
+   }
+
+//************************************
+   void familles::newgro(QString nom){
+      //cout<<"newgro "<<nom<<endl;
+      if (gro.find(nom)!=gro.end()){
+         cout<<"***newgro*** "<<nom.toLatin1().constData()<<" deja present\n";
+         return;
+      }
+      fend gb;
+      gro[nom]=gb;
+   }
+   
+//************************************
+   void familles::write(){
+      fend gb;
+      fagr::iterator it1;
+      fend::iterator it2;
+      //cout<<"\n***familles.write()***\n";
+      for (it1=fam.begin(); it1!=fam.end(); ++it1){
+         cout<<"Family=<"<<(*it1).first.toLatin1().constData()<<">\tGroups=";
+         gb=(*it1).second;
+         for (it2=gb.begin(); it2!=gb.end(); ++it2){
+            cout<<"<"<<(*it2).first.toLatin1().constData()<<"> ";
+         }
+         cout<<endl;
+      }
+      for (it1=gro.begin(); it1!=gro.end(); ++it1){
+         cout<<"Group=<"<<(*it1).first.toLatin1().constData()<<">\tFamilies=";
+         gb=(*it1).second;
+         for (it2=gb.begin(); it2!=gb.end(); ++it2){
+            cout<<"<"<<(*it2).first.toLatin1().constData()<<"> ";
+         }
+         cout<<endl;
+      }
+   }
+
+//************************************
+   xmlNodePtr familles::xml_groups(){
+      fend gb;
+      fagr::iterator it1;
+      fend::iterator it2;
+      int nb=0,nbf;
+      string ss;
+      xmlNodePtr res,node;
+      res=xmlNewNode(NULL, BAD_CAST "groups");
+      for (it1=gro.begin(); it1!=gro.end(); ++it1){
+         node = xmlNewChild(res, 0, BAD_CAST "group",0);
+         ss=(*it1).first.toLatin1().constData();
+         xmlNewProp(node, BAD_CAST "name", BAD_CAST ss.c_str());
+         nb++;
+         gb=(*it1).second;
+         nbf=0; ss="";
+         for (it2=gb.begin(); it2!=gb.end(); ++it2){
+            ss=ss+" "+(*it2).first.toLatin1().constData();
+            nbf++;
+         }
+         xmlNewProp(node, BAD_CAST "families_number", BAD_CAST i2a(nbf).c_str());
+         xmlNewProp(node, BAD_CAST "families", BAD_CAST ss.substr(1).c_str());
+         //cout<<endl;
+      }
+      xmlNewProp(res, BAD_CAST "number", BAD_CAST i2a(nb).c_str());
+      return res;
+   }
+
+//************************************
+   void familles::add(QString nomfam, QString nomgro)
+   {
+      //cout<<"add family <"<<nomfam<<">\t<"<<nomgro<<">\n";
+      fagr::iterator it;
+      it=fam.find(nomfam);
+      if (it==fam.end()){
+         //cout<<"add new family <"<<nomfam<<">\t<"<<nomgro<<">\n";
+         newfam(nomfam);
+         it=fam.find(nomfam);
+      }
+      if (nomgro=="") return; //no group
+      (*it).second[nomgro]=0;
+      it=gro.find(nomgro);
+      if (it==gro.end()){
+         //cout<<"***new*** "<<nomgro<<" non present\n";
+         newgro(nomgro);
+         it=gro.find(nomgro);
+      }
+      (*it).second[nomfam]=0;
+
+   }
+
+
+//************************************
+bool familles::get_number_of_new_family(int sign, med_int *ires, QString *tmp)
+//if sign < 0 families faces or tria3 etc...
+//if sign >= 0 family zero and family nodes
+//outputs in *ires and *tmp
+{
+   int pas,i,ii;
+   QString nomfam;
+   fagr::iterator it;
+   if (sign>=0) pas=1; else pas=-1;
+   *tmp="0"; *ires=0;
+   ii=pas;
+   for (i=0;i<10000;i++) { //mefiance
+      nomfam=nomfam.sprintf("%d",ii);
+      it=fam.find(nomfam);
+      if (it==fam.end()) {
+         *tmp=nomfam; *ires=ii;
+         //cout<<"NewFamily Found<"<<*ires<<"><"<<*tmp<<">\n";
+         return true;
+      }
+      ii=ii+pas;
+   }
+   cerr<<"***get_number_of_new_family*** Problem new family not found"<<endl;
+   return false;
+}
+
+//************************************
+   med_int familles::find_family_on_groups(med_int fam1, med_int fam2)
+   {
+      med_int ires=0;
+      if (fam1==fam2) {ires=fam1; return ires;}
+      //find one family whith groups of fam1 and groups of fam2
+      fend gb=fuse_goups(fam1,fam2);
+      //find if one family have theses groups
+      fagr::iterator it1;
+      fend::iterator it2;
+      for (it1=fam.begin(); it1!=fam.end(); ++it1){
+         if (gb==(*it1).second){
+            ires=(*it1).first.toLong();
+            //cout<<"find_family_on_groups old <"<<ires<<"> from <"<<
+            //       fam1<<"><"<<fam2<<">\n";
+            return ires;
+         }
+      }
+      //cout<<"no family found!!! - groups of "<<fam1<<" and "<<fam2<<endl;
+      QString tmp;
+      //fam1 positive for nodes negative faces & mailles
+      bool oktmp=get_number_of_new_family(fam1,&ires,&tmp);
+      fend::iterator it;
+      for (it=gb.begin(); it!=gb.end(); ++it){
+          this->add(tmp,(*it).first);
+      }
+      //cout<<"new family <"<<ires<<"> intersection of <"<<fam1<<"><"<<fam2<<">\n";
+      return ires;
+   }
+   
+//************************************
+   fend familles::fuse_goups(med_int fam1, med_int fam2)
+   //concatenation/fusion deux map groupes
+   {
+      QString nom1,nom2;
+      fagr::iterator it1,it2;
+      nom1=nom1.sprintf("%d",fam1);
+      it1=fam.find(nom1);
+      nom2=nom2.sprintf("%d",fam2);
+      it2=fam.find(nom2);
+      if ( (it1==fam.end())||(it2==fam.end()) ) {
+         cerr<<"***fuse_goups*** non existing family "<<fam1<<" or "<<fam2<<endl;
+         fend gb;
+         return gb; //empty
+      }
+      fend gb=(*it1).second; //firt groups
+      gb.insert((*it2).second.begin(),(*it2).second.end()); //other groups
+      return gb;
+      //for debug
+      cout<<"fuse_goups "<<fam1<<" "<<fam2<<" ";
+      fend::iterator it;
+      for (it=gb.begin(); it!=gb.end(); ++it){
+            cout<<"<"<<(*it).first.toLatin1().constData()<<"> ";
+      }
+      cout<<endl;
+      return gb;
+   }
+
+long CVWtab::memoryuse=0; //static
+long CVWtab::memorymax=1000*1000000; //static
+
 //************************************
 CVWtab::CVWtab(long nb, med_int *pmint)
 //constructor with pmint allocated yet with new
@@ -19,6 +270,12 @@ CVWtab::CVWtab(long nb, med_int *pmint)
    type=1;  //only tmint valide
    tmint=pmint;
    tmflo=NULL;
+   memoryuse=memoryuse+sizeof(med_int)*nb;
+   //cout<<"memoryuse int "<<sizeof(med_int)<<" "<<nb<<" "<<memoryuse<<" "<<memorymax<<endl;
+   if (memoryuse>memorymax) {
+      cout<<"***WARNING*** memory max reached "<<memorymax<<endl;
+      //cout<<"memoryuse int "<<sizeof(med_int)<<" "<<nb<<" "<<memoryuse<<endl;
+   }
 }
 
 //************************************
@@ -30,6 +287,12 @@ CVWtab::CVWtab(long nb, med_float *pmflo)
    type=2;   //only tmflo valide
    tmint=NULL;
    tmflo=pmflo;
+   memoryuse=memoryuse+sizeof(med_float)*nb;
+   //cout<<"memoryuse float "<<sizeof(med_float)<<" "<<nb<<" "<<memoryuse<<" "<<memorymax<<endl;
+   if (memoryuse>memorymax) {
+      cout<<"***WARNING*** memory max reached "<<memorymax<<endl;
+      //cout<<"memoryuse float "<<sizeof(med_float)<<" "<<nb<<" "<<memoryuse<<endl;
+   }
 }
 
 //************************************
@@ -41,7 +304,7 @@ CVWtab::~CVWtab()
    //remove temporary file
    if (this->filename!="_NO_FILE")
    {
-      remove(this->filename); //#include <stdio.h>
+      remove(this->filename.toLatin1().constData()); //#include <stdio.h>
       //cout<<this->filename<<" successfully deleted\n";
    }
 
@@ -51,18 +314,22 @@ CVWtab::~CVWtab()
 bool CVWtab::CVWtab_deallocate()
 {
    //cout<<"   deallocate CVWtab*** "<<size<<endl;
-   if (size <= 0) return FALSE;
+   if (size <= 0) return false;
    if (tmint)
    {
       delete[] tmint;
+      memoryuse=memoryuse-sizeof(med_int)*size;
       size=-size; //precaution
    }
    if (tmflo)
    {
       delete[] tmflo;
+      memoryuse=memoryuse-sizeof(med_float)*size;
       size=-size; //precaution
    }
-   return TRUE;
+   if (memoryuse<0) cout<<"***WARNING*** memoryuse <0 "<<memoryuse<<endl;
+   if (memoryuse==0) cout<<"***CVWtab_deallocate*** memoryuse=0 "<<endl;
+   return true;
 }
 
 //************************************
@@ -71,27 +338,27 @@ 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->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;
+         return false;
       }
       for (long i=0; i < this->size; i++)
-         if (this->tmint[i]!=tab2->tmint[i]) return FALSE;
+         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;
+         return false;
       }
       for (long i=0; i < this->size; i++)
-         if (this->tmflo[i]!=tab2->tmflo[i]) return FALSE;
+         if (this->tmflo[i]!=tab2->tmflo[i]) return false;
    }
-   return TRUE;
+   return true;
 }
 
 //************************************
@@ -102,7 +369,7 @@ bool CVW_is_equal_vertices(CVWtab *tab1, long i1,
 //verbose 2 for print also vertices equals (debug)
 {
    //cout<<"is_equal_vertice size="<<tab1->size<<" "<<tab2->size<<endl;
-   bool ok=FALSE;
+   bool ok=false;
    med_float *p1,*p2;
    //vertices indices from 1 not 0!
    long di1=(i1-1)*3, di2=(i2-1)*3;
@@ -110,17 +377,17 @@ bool CVW_is_equal_vertices(CVWtab *tab1, long i1,
    {
       cerr<<"BadIndice tab1 in is_equal_vertices "<<
             di1<<" not in "<<tab1->size<<endl;
-      return FALSE;
+      return false;
    }
    if (di2<0 || di2>=tab2->size)
    {
       cerr<<"BadIndice tab2 in is_equal_vertices "<<
             di2<<" not in "<<tab2->size<<endl;
-      return FALSE;
+      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 (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]);
@@ -137,6 +404,7 @@ bool CVW_FindString(const string &str,fstream &Ff, long &count)
 //converts count value expected after "='" in line found
 {
    string line;
+   QString tmp;
    do
    {
       if (getline(Ff,line))
@@ -145,7 +413,7 @@ bool CVW_FindString(const string &str,fstream &Ff, long &count)
          {
             if (line.find(str)==0)
             {
-            QString tmp=line;
+            tmp=line.c_str();
             bool ok;
             count=tmp.section('\'',1,1).toLong(&ok);
             return ok;
@@ -155,75 +423,146 @@ bool CVW_FindString(const string &str,fstream &Ff, long &count)
       else
       {
          cerr<<"Problem line '"<<str<<"' not found in file\n"<<endl;
-         return FALSE;
+         return false;
       }
    } while (1);
-   return TRUE;
+   return true;
 }
 
 //************************************
+bool ghs3dprl_mesh_wrap::ReadFileMSGnew(const QString FileName)
+//read file .glo with no parser xml because big file (volume)
+//no read of <receive> for speed (and so no test)
+{
+   QString tmp;
+   fstream Ff(FileName.toLatin1().constData(),ios_base::in);
+   string line;
+   long i,count,nbneighbour,ineighbour;
+   bool ok;
+
+   if (!Ff.is_open())
+   {
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' not open\n"<<endl;
+      return false;
+   }
+
+   //Lit les données :
+   if (!CVW_FindString("<neighbours count=",Ff,nbneighbour)) return false;
+   if (verbose>2) cout<<"NeighboursCount="<<nbneighbour<<endl;
+   for (i=1; i<=nbneighbour; i++)
+   {
+      if (!CVW_FindString("<neighbour indice=",Ff,ineighbour)) return false;
+      if (!CVW_FindString("<vertices count=",Ff,count)) return false;
+      if (count>0){
+         med_int *tmint=new med_int[count];
+         for (int i=0; i<count; i++) Ff>>tmint[i];
+         if (verbose>4) cout<<"Vertices "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+         CVWtab *montab=new CVWtab(count,tmint);
+         tmp=tmp.sprintf("MS%ld NE%ld VE SE",this->nofile,ineighbour);
+         ok=this->insert_key(tmp,montab);
+      }
+      if (!CVW_FindString("<edges count=",Ff,count)) return false;
+      if (count>0){
+         med_int *tmint=new med_int[count];
+         for (int i=0; i<count; i++) Ff>>tmint[i];
+         if (verbose>4) cout<<"Edges "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+         CVWtab *montab=new CVWtab(count,tmint);
+         tmp=tmp.sprintf("MS%ld NE%ld ED SE",this->nofile,ineighbour);
+         ok=this->insert_key(tmp,montab);
+      }
+      if (!CVW_FindString("<faces count=",Ff,count)) return false;
+      if (count>0){
+         med_int *tmint=new med_int[count];
+         for (int i=0; i<count; i++) Ff>>tmint[i];
+         if (verbose>4) cout<<"Faces "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+         CVWtab *montab=new CVWtab(count,tmint);
+         tmp=tmp.sprintf("MS%ld NE%ld FA SE",this->nofile,ineighbour);
+         ok=this->insert_key(tmp,montab);
+      }
+      if (!CVW_FindString("<elements count=",Ff,count)) return false;
+      if (count>0){
+         med_int *tmint=new med_int[count];
+         for (int i=0; i<count; i++) Ff>>tmint[i];
+         if (verbose>4) cout<<"Elements "<<tmint[0]<<" "<<tmint[1]<<"... "<<tmint[count-1]<<endl;
+
+         CVWtab *montab=new CVWtab(count,tmint);
+         tmp=tmp.sprintf("MS%ld NE%ld EL SE",this->nofile,ineighbour);
+         ok=this->insert_key(tmp,montab);
+      }
+   }
+
+   //Ferme le fichier :
+   Ff.close();
+   this->nbfiles++;
+   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);
+   fstream Ff(FileName.toLatin1().constData(),ios_base::in);
    string line;
    long count;
    bool ok;
 
    if (!Ff.is_open())
    {
-      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
-      return FALSE;
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' 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 (!CVW_FindString("<vertices count=",Ff,count)) return false;
+   if (verbose>3) cout<<"GloVerticesCount="<<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;
+      if (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 (!CVW_FindString("<edges count=",Ff,count)) return false;
+   if (verbose>3) cout<<"GloEdgesCount="<<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;
+      if (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 (!CVW_FindString("<faces count=",Ff,count)) return false;
+   if (verbose>3) cout<<"GloFacesCount="<<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;
+      if (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 (!CVW_FindString("<elements count=",Ff,count)) return false;
+   if (verbose>3) cout<<"GloElementsCount="<<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;
+      if (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);
@@ -232,7 +571,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLO(const QString FileName)
    //Ferme le fichier :
    Ff.close();
    this->nbfiles++;
-   return TRUE;
+   return true;
 }
 
 //************************************
@@ -240,30 +579,30 @@ bool ghs3dprl_mesh_wrap::ReadFileFACES(const QString FileName)
 //read file .faces (wrap)
 {
    QString tmp;
-   fstream Ff((const char *)FileName,ios_base::in);
+   fstream Ff(FileName.toLatin1().constData(),ios_base::in);
    string line;
    long nbelem,ntype;
    bool ok;
 
    if (!Ff.is_open())
    {
-      cerr<<"Problem File '"<<FileName<<"' not open\n"<<endl;
-      return FALSE;
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' 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;
+      tmp=line.c_str();
       nbelem=tmp.section(' ',0,0).toLong(&ok);
    }
    else
    {
       cerr<<"Problem on first line of file"<<endl;
-      return FALSE;
+      return false;
    }
-   if (this->verbose>2) cout<<"NumberOfElements="<<nbelem<<endl;
+   if (verbose>3) cout<<"FacesNumberOfElements="<<nbelem<<endl;
    med_int *tmint=new med_int[nbelem*7];
    for (int i=0; i<nbelem*7; i=i+7)
    {
@@ -271,12 +610,12 @@ bool ghs3dprl_mesh_wrap::ReadFileFACES(const QString FileName)
       if (ntype!=3) //only triangles
       {
          cerr<<"Problem on ntype != 3"<<endl;
-         return FALSE;
+         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;
+   if (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);
@@ -284,7 +623,7 @@ bool ghs3dprl_mesh_wrap::ReadFileFACES(const QString FileName)
 
    Ff.close();
    this->nbfiles++;
-   return TRUE;
+   return true;
 }
 
 //************************************
@@ -294,29 +633,28 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITE(const QString FileName)
 //(parameter option of ghs3d but NOT tepal)
 {
    QString tmp;
-   fstream Ff((const char *)FileName,ios_base::in);
+   fstream Ff(FileName.toLatin1().constData(),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;
+   if (!Ff.is_open()){
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' 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;
+   if (verbose>3){
+      cout<<"NoboiteNumberOfElements="<<ne<<endl;
+      cout<<"NoboiteNumberOfVertices="<<np<<endl;
+      cout<<"NoboiteNumberOfSpecifiedPoints="<<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;
+   if (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);
@@ -324,27 +662,31 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITE(const QString FileName)
 
    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;
+   if (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;
+   if (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;
+   if (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);
 
+   //swap on file if too big for memory in one cpu
+   //default 1GOctet/8(for double)/10(for arrays in memory at the same time)
+   if (np*3>this->nbelem_limit_swap)
+     this->SwapOutOfMemory_key_mesh_wrap(QRegExp("NB",Qt::CaseSensitive,QRegExp::RegExp));
    //beware record 6 lenght 1
    //ferme le fichier :
    Ff.close();
    this->nbfiles++;
-   return TRUE;
+   return true;
 }
 
 //************************************
@@ -355,48 +697,38 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
 //idem ReadFileNOBOITE with read unformatted
 {
    bool ok;
-
+   QString tmp;
    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;*/
+   FILE *Ff=fopen(FileName.toLatin1().constData(),"rb");
+   long ne,np,npfixe,reste,subnumber;
 
    //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;
+   if (!Ff){
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' 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;
+   if (r1[0]!=68){
+      cerr<<"First FORTRAN record of File '"<<FileName.toLatin1().constData()<<"' 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;
+   if (verbose>3){
+      cout<<"NoboitebNumberOfElements="<<ne<<endl;
+      cout<<"NoboitebNumberOfVertices="<<np<<endl;
+      cout<<"NoboitebNumberOfSpecifiedPoints="<<npfixe<<endl;
    }
-   ///etc...could be done if necessary not debugged
+   //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];
@@ -404,7 +736,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
    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;
+   if (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);
@@ -418,7 +750,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
    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]);
+   if (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);
@@ -427,12 +759,12 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
    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;
+   if (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]);
+   if (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];
@@ -441,12 +773,16 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName)
    tmp=tmp.sprintf("NB%ld SN",this->nofile);
    ok=this->insert_key(tmp,montab);
 
+   //swap on file if too big for memory in one cpu
+   //default 1GOctet/8(for double)/10(for arrays in memory at the same time)
+   if (np*3>this->nbelem_limit_swap)
+     this->SwapOutOfMemory_key_mesh_wrap(QRegExp("NB",Qt::CaseSensitive,QRegExp::RegExp));
+
    //beware record 6 lenght 1
    //ferme le fichier :
    fclose(Ff);
    this->nbfiles++;
-   return TRUE;
-
+   return true;
 }
 
 //************************************
@@ -455,89 +791,79 @@ bool ghs3dprl_mesh_wrap::ReadFilePOINTS(const QString FileName)
 {
    QString tmp;
    long nb;
-   Q_ULONG maxlen=128;
-   Q_LONG lg;
-   bool ok=TRUE;
+   long maxlen=128;
+   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;
+   //qt3 ok=Ff.open(IO_ReadOnly|IO_Translate);
+   ok=Ff.open(QIODevice::ReadOnly|QIODevice::Text);
+   if (!ok){
+      cerr<<"Problem File '"<<FileName.toLatin1().constData()<<"' not open\n"<<endl;
+      return false;
    }
-
-   lg=Ff.readLine(tmp,maxlen);
-   tmp=tmp.simplifyWhiteSpace();
+   tmp=Ff.readLine(maxlen);
+   tmp=tmp.simplified();
    nb=tmp.toLong(&ok);
-   if (!ok)
-   {
-      cerr<<"Problem conversion File '"<<FileName<<"\n"<<endl;
-      return FALSE;
+   if (!ok){
+      cerr<<"Problem conversion File '"<<FileName.toLatin1().constData()<<"\n"<<endl;
+      return false;
    }
-   if (this->verbose>2) cout<<"NumberOfVertices="<<nb<<endl;
+   if (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++ )
-      {
+   for ( long il=0; il<nb; il++ ){
+      tmp=Ff.readLine(maxlen);
+      tmp=tmp.simplified();
+      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;
+         if (!ok){
+            cerr<<"Problem conversion File '"<<FileName.toLatin1().constData()<<"\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;
+      if (!ok){
+         cerr<<"Problem conversion File '"<<FileName.toLatin1().constData()<<"\n"<<endl;
+         return false;
       }
    }
    //beware no examples with each specified points (if any) here
-
-   {CVWtab *montab=new CVWtab(nb,tmint); //init montab->tmint nrs
+   CVWtab *montab=new CVWtab(nb,tmint); //init montab->tmint nrs
    tmp=tmp.sprintf("PO%ld NRS",this->nofile);
-   ok=this->insert_key(tmp,montab);}
+   ok=this->insert_key(tmp,montab);
 
-   {CVWtab *montab=new CVWtab(nb,tmflo); //init montab->tmflo xyz
+   montab=new CVWtab(nb,tmflo); //init montab->tmflo xyz
    tmp=tmp.sprintf("PO%ld XYZ",this->nofile);
-   ok=this->insert_key(tmp,montab);}
+   ok=this->insert_key(tmp,montab);
 
    //Ferme le fichier :
    Ff.close();
    this->nbfiles++;
-   return TRUE;
+   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;
+   QHashIterator<QString,CVWtab*> it( this->mestab);
+   while ( it.hasNext() ) {
+     it.next();
+     QString nom = it.key().leftJustified(32,' ');
+     cout<<nom.toLatin1().constData()<<"-> size="<<it.value()->size<<endl;
    }
-   return TRUE;
+   return true;
 }
 
 //************************************
 long ghs3dprl_mesh_wrap::remove_all_keys_mesh_wrap()
 {
-   long nb=this->remove_key_mesh_wrap(QRegExp(".",TRUE,FALSE));
+   long nb=this->remove_key_mesh_wrap(QRegExp(".",Qt::CaseSensitive,QRegExp::RegExp));
    return nb;
 }
 
@@ -545,93 +871,97 @@ long ghs3dprl_mesh_wrap::remove_all_keys_mesh_wrap()
 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);
+   QMutableHashIterator<QString,CVWtab*> it(this->mestab);
+   while ( it.hasNext() ){
+     it.next();
+     if (it.key().contains(rxp)) {
+        nbremove++;
+        if (this->verbose>6) cout<<"remove key "<<it.key().toLatin1().constData()<<endl;
+        delete it.value();
+        it.remove();
+     }
    }
    return nbremove;
 }
 
+//************************************
+long ghs3dprl_mesh_wrap::nb_key_mesh_wrap(const QRegExp &rxp)
+{
+   long nbremove=0;
+   //cout<<"nb_key_mesh_wrap on "<<endl;
+   QMutableHashIterator<QString,CVWtab*> it(this->mestab);
+   while ( it.hasNext() ){
+     it.next();
+     if (it.key().contains(rxp)) nbremove++;
+   }
+   //cout<<"nb_key_mesh_wrap found "<<nbremove<<endl;
+   return nbremove;
+}
+
 //************************************
 bool SwapOnFile(const QString &key,const QString &path,CVWtab *tab,int verbose)
 //
 {
-   //return TRUE;
-   if (tab->filename=="_NO_FILE")
-   {
+   //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");
+      FILE *fichier=fopen(tab->filename.toLatin1().constData(),"wb");
       long taille;
       taille=tab->size;
       fwrite(&taille,sizeof(taille),1,fichier);
-      if (tab->tmint)
-      {
+      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;
+         cout<<"SwapOnFile_binary "<<tab->filename.toLatin1().constData()<<
+         " NbElements "<<taille<<
+         " SizeElement_med_int   "<<sizeof(med_int)<<
+         " TotalSizeBinary " <<taille*sizeof(med_int)<<endl;
          fwrite(tab->tmint,sizeof(med_int),taille,fichier);
          //fread(&gagnants,sizeof(gagnants),1,fichier);
       }
-      if (tab->tmflo)
-      {
+      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;
+         cout<<"SwapOnFile_binary "<<tab->filename.toLatin1().constData()<<
+         " NbElements "<<taille<<
+         " SizeElement_med_float "<<sizeof(med_float)<<
+         " TotalSizeBinary " <<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;
+   else{
+      if (verbose>3) cout<<"SwapOnFile in binary file done yet "<<
+         tab->filename.toLatin1().constData()<<endl;
    }
    //deallocate because swap disk binary mode
    tab->CVWtab_deallocate(); //free memory
-   return TRUE;
+   return true;
 }
 
 //************************************
-long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp)
-//
+long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp,
+                                                       long ifgreaterthan)
+//swap on file if not yet and if size greater than ifgreaterthan
 {
    long nb=0;
    bool ok;
-   QDictIterator<CVWtab> it(this->mestab);
-   for ( ; it.current(); ++it )
-   {
-     long i=it.currentKey().contains(rxp);
-     if (i>0)
-     {
+   QHashIterator<QString,CVWtab*> it(this->mestab);
+   while ( it.hasNext() ) {
+     it.next();
+     if (it.key().contains(rxp)) {
         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;
+        if ((it.value()->size>0)&&(it.value()->size>ifgreaterthan)){
+           if (verbose>3)
+              cout<<"SwapOutOfMemory_key_mesh_wrap on demand "<<
+                   it.key().toLatin1().constData()<<
+                   " size "<<it.value()->size<<">"<<ifgreaterthan<<endl;
+           //free memory
+           ok=SwapOnFile(it.key(),this->path,it.value(),this->verbose);
+       }
      }
    }
    return nb;
@@ -640,8 +970,7 @@ long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp)
 bool ghs3dprl_mesh_wrap::list_onekey_mesh_wrap(const QString &key)
 {
    CVWtab *montab=this->mestab[key];
-   if (montab)
-   {
+   if (montab){
       //cout<<"key "<<key<<"trouvee -> size="<<montab->size<<endl;
       if (montab->type==1)
          for ( long i=0; i<montab->size; i++ )
@@ -652,8 +981,8 @@ bool ghs3dprl_mesh_wrap::list_onekey_mesh_wrap(const QString &key)
       cout<<endl;
    }
    else
-      cout<<"key "<<key<<" not found"<<endl;
-   return TRUE;
+      cout<<"key "<<key.toLatin1().constData()<<" not found"<<endl;
+   return true;
 }
 
 //************************************
@@ -663,13 +992,17 @@ bool ghs3dprl_mesh_wrap::insert_key(const QString &key,CVWtab *tab)
 //alors swap disque dans getenv(tmp) fichier temporaire binaire
 {
    bool ok;
-   if (this->verbose>4)
-      cout<<"InsertKey "<<key<<" size="<<tab->size<<endl;
+   if (verbose>4)
+      cout<<"insert key "<<key.toLatin1().constData()<<
+            " size="<<tab->size<<endl;
    tab->filename="_NO_FILE";
-   if (this->nbelem_limit_swap < tab->size)
+   if (this->nbelem_limit_swap<tab->size) {
+      if (verbose>3) cout<<"insert key automatic SwapOnFile "<<
+                           key.toLatin1().constData()<<endl;
       ok=SwapOnFile(key,this->path,tab,this->verbose);
+   }
    this->mestab.insert(key,tab);
-   return TRUE;
+   return true;
 }
 //************************************
 CVWtab* ghs3dprl_mesh_wrap::restore_key(const QString &key)
@@ -684,38 +1017,34 @@ CVWtab* ghs3dprl_mesh_wrap::restore_key(const QString &key)
    else cout<<" -> tab NULL\n";*/
    if (!tab) //it is NOT a problem
    {
-      if (this->verbose>6) cout<<"restore_key key not found "<<key<<endl;
+      if (verbose>6) cout<<"restore key not found "<<key.toLatin1().constData()<<endl;
       return NULL;
    }
-   if (tab->size > 0)
-   {
-      if (this->verbose>5) cout<<"restore_key direct from memory "<<key<<" size="<<tab->size<<endl;
+   if (tab->size > 0){
+      if (verbose>5) cout<<"restore key direct from memory "<<key.toLatin1().constData()<<" 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<<
+   if ((tab->type<1)||(tab->type>2)){
+      cerr<<"Problem restore key from binary file "<<tab->filename.toLatin1().constData()<<
                " 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");
+   FILE *fichier=fopen(tab->filename.toLatin1().constData(),"rb");
    long taille;
    fread(&taille,sizeof(long),1,fichier);
-   if (taille!=-tab->size)
-   {
-      cerr<<"Problem restore_key from binary file "<<tab->filename<<
+   if (taille!=-tab->size){
+      cerr<<"Problem restore_key from binary file "<<tab->filename.toLatin1().constData()<<
             " 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<<
+   if (tab->type==1){
+      if (verbose>5)
+      cout<<"restore key from binary file "<<tab->filename.toLatin1().constData()<<
             " number of elements "<<taille<<
             " size_element med_float "<<sizeof(med_float)<<
             " total_size_binary " <<taille*sizeof(med_float)<<endl;
@@ -724,10 +1053,9 @@ CVWtab* ghs3dprl_mesh_wrap::restore_key(const QString &key)
       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<<
+   if (tab->type==2){
+      if (verbose>5)
+      cout<<"restore key from binary file "<<tab->filename.toLatin1().constData()<<
             " number of elements "<<taille<<
             " size_element med_float "<<sizeof(med_float)<<
             " total_size_binary " <<taille*sizeof(med_float)<<endl;
@@ -749,10 +1077,10 @@ bool ghs3dprl_mesh_wrap::test_msg_wrap()
 {
    QString key1,key2,typ="FA VE ED EL"; //pour faces vertice edges elements
    CVWtab *tab1,*tab2;
-   bool ok=TRUE;
+   bool ok=true;
    //test send=receive
    //numerotations locales sont identiques
-   long nb=typ.contains(' ',TRUE) + 1; //nb chiffres detectes
+   long nb=typ.count(' ',Qt::CaseSensitive) + 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++)
@@ -768,19 +1096,19 @@ bool ghs3dprl_mesh_wrap::test_msg_wrap()
       //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;
+      {  cout<<"key "<<key1.toLatin1().constData()<<" inexistante avec key "<<key2.toLatin1().constData()<<" existante"<<endl;
+         ok=false;
       }
       else
       {
        if (!tab2)
-       {  cout<<"key "<<key2<<" inexistante avec key "<<key1<<" existante"<<endl;
-          ok=FALSE;
+       {  cout<<"key "<<key2.toLatin1().constData()<<" inexistante avec key "<<key1.toLatin1().constData()<<" existante"<<endl;
+          ok=false;
        }
        else
         if (!tab1->is_equal(tab2))
-        {  cout<<"key "<<key1<<" et key "<<key2<<" de contenu differents"<<endl;
-           ok=FALSE;
+        {  cout<<"key "<<key1.toLatin1().constData()<<" et key "<<key2.toLatin1().constData()<<" de contenu differents"<<endl;
+           ok=false;
         }
       }
       /*else
@@ -802,19 +1130,19 @@ bool ghs3dprl_mesh_wrap::test_msg_wrap()
       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;
+      {  cout<<"key "<<key1.toLatin1().constData()<<" inexistante avec key "<<key2.toLatin1().constData()<<" existante"<<endl;
+         ok=false;
       }
       else
       {
        if (!tab2)
-       {  cout<<"key "<<key2<<" inexistante avec key "<<key1<<" existante"<<endl;
-          ok=FALSE;
+       {  cout<<"key "<<key2.toLatin1().constData()<<" inexistante avec key "<<key1.toLatin1().constData()<<" 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;
+        {  cout<<"key "<<key1.toLatin1().constData()<<" et key "<<key2.toLatin1().constData()<<" de type ou tailles differents"<<endl;
+           ok=false;
         }
       }
    }
@@ -827,13 +1155,14 @@ bool ghs3dprl_mesh_wrap::test_vertices_wrap()
 {
    QString key1,key2,key11,key22,key11old,key22old;
    CVWtab *tab1,*tab2,*tab11,*tab22;
-   bool ok=TRUE;
+   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++)
+   bool swap=false;
    for (int ifile=this->nbfiles; ifile >= 1; ifile--)
    for (int ineig=this->nbfiles; ineig >= ifile+1; ineig--)
    {
@@ -847,31 +1176,37 @@ bool ghs3dprl_mesh_wrap::test_vertices_wrap()
       if (!tab1 && !tab2) continue; //cas non voisins
       if (!tab1)
       {
-         cerr<<"TestEqualityCoordinates key "<<key1<<" NOT existing but key "<<key2<<" existing"<<endl;
-         ok=FALSE; continue;
+         cerr<<"TestEqualityCoordinates key "<<key1.toLatin1().constData()<<
+               " NOT existing but key "<<key2.toLatin1().constData()<<" existing"<<endl;
+         ok=false; continue;
       }
       if (!tab2)
       {
-         cerr<<"TestEqualityCoordinates key "<<key2<<" NOT existing but key "<<key1<<" existing"<<endl;
-         ok=FALSE; continue;
+         cerr<<"TestEqualityCoordinates key "<<key2.toLatin1().constData()<<
+               " NOT existing but key "<<key1.toLatin1().constData()<<" existing"<<endl;
+         ok=false; continue;
       }
       if (tab1->size!=tab2->size)
       {
-         cerr<<"TestEqualityCoordinates key "<<key1<<" and key "<<key2<<" NOT same size"<<endl;
-         ok=FALSE; continue;
+         cerr<<"TestEqualityCoordinates key "<<key1.toLatin1().constData()<<
+               " and key "<<key2.toLatin1().constData()<<" 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));
-
+         if (swap) {
+            //Swap out of memory if no use
+            if ((key11old!=key11)&&(key11old!=key22))
+               this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key11old,Qt::CaseSensitive,QRegExp::RegExp));
+            if ((key22old!=key11)&&(key22old!=key22))
+               this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key22old,Qt::CaseSensitive,QRegExp::RegExp));
+         }
          tab11=this->restore_key(key11); //tab11=this->mestab[key11];
          tab22=this->restore_key(key22); //tab22=this->mestab[key22];
+         if (tab11->size>this->nbelem_limit_swap ||
+             tab22->size>this->nbelem_limit_swap) swap=true ;
          long i1,i2;
-         bool ok1=TRUE;
+         bool ok1=true;
          //test on equality of xyz_coordinates of commons vertices
          for  (long j=0; j < tab1->size-1; j++)
          {
@@ -881,440 +1216,964 @@ bool ghs3dprl_mesh_wrap::test_vertices_wrap()
             if (!CVW_is_equal_vertices(tab11,i1,tab22,i2,1))
             {
                cerr<<j<<" Vertice "<<i1<<" != Vertice "<<i2<<"\n"<<endl;
-               ok=FALSE; ok1=FALSE;
+               ok=false; ok1=false;
             }
          }
-         if ((this->verbose>2)&&(ok1))
+         if ((verbose>2)&&(ok1))
             cout<<"TestEqualityCoordinates "<<tab1->size<<
-                  " Vertices "<<key1<<" and "<<key2<<" ok"<<endl;
+                  " Vertices "<<key1.toLatin1().constData()<<" and "<<key2.toLatin1().constData()<<" ok"<<endl;
          if (!ok1)
             cerr<<"TestEqualityCoordinates "<<tab1->size<<
-                  " Vertices "<<key1<<" and "<<key2<<" NO_OK"<<endl;
+                  " Vertices "<<key1.toLatin1().constData()<<" and "<<key2.toLatin1().constData()<<" 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));
+   if (swap) {
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key11old,Qt::CaseSensitive,QRegExp::RegExp));
+      this->SwapOutOfMemory_key_mesh_wrap(QRegExp(key22old,Qt::CaseSensitive,QRegExp::RegExp));
+   }
    return ok;
 }
 
 //************************************
-bool ghs3dprl_mesh_wrap::Write_MEDfiles()
+bool ghs3dprl_mesh_wrap::Find_VerticesDomainToVerticesSkin()
+//initialise correspondances vertice skin et vertices locaux pour chaque domaine
+//calcule un med_int new tab[nb_vertices_of_domain]
+//avec nieme vertice of skin=tab[ieme vertice de domain]
+//apres verification tepal garde bien dans la global numbering "GLi VE"
+//les indices initiaux des noeuds (attention: de 1 a nbNodes) 
 {
-   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];
+   QString key1,key2,tmp;
+   CVWtab *cooskin,*coodom,*glodom,*montab;
+   bool ok=true;
+   med_float *p1,*p2;
+   med_int i,nb,jd,js;
+
+   cooskin=this->restore_key(QString("SKIN_VERTICES_COORDINATES"));
+   if (verbose>4)cout<<"NumberVerticesSKIN="<<cooskin->size/3<<endl;
+   if (!cooskin) return false;
+   //ici pourrait creer BBtree sur skin
+   for (int ifile=1; ifile<=this->nbfiles; ifile++)
+   {
+      key1=key1.sprintf("NB%ld VC",ifile);
+      coodom=this->restore_key(key1);
+      if (!coodom) continue; //Problem
+      key2=key2.sprintf("GL%ld VE",ifile);
+      glodom=this->restore_key(key2);
+      if (verbose>4)
+         cout<<"NumberVerticesDOMAIN_"<<ifile<<"="<<glodom->size<<endl;
+      if (coodom->size!=glodom->size*3)
+      {
+         cerr<<"Find_VerticesDomainToVerticesSkin key "<<key1.toLatin1().constData()<<
+               " and key "<<key2.toLatin1().constData()<<" NOT coherent sizes"<<endl;
+         ok=false; continue;
+      }
+      //test on equality of xyz_coordinates of commons vertices
+      med_int *tab=new med_int[glodom->size];
+      i=0;
+      nb=0; //nb equals vertices
+    if (verbose>8){
+      cout<<"\nglobal numbering nodes: no iglo\n";
+      for  (jd=0; jd < glodom->size; jd++) 
+           cout<<"\t"<<jd<<"\t"<<glodom->tmint[jd]<<endl;
+      cout<<"\nresults: no i js iglo\n";
+      for  (jd=0; jd < coodom->size; jd=jd+3)
+      {
+         p2=(coodom->tmflo+jd);
+         tab[i]=0;
+         //ici pourrait utiliser BBtree
+         for  (js=0; js < cooskin->size; js=js+3)
+         {
+            p1=(cooskin->tmflo+js);
+            if (p1[0]==p2[0] && p1[1]==p2[1] && p1[2]==p2[2]) 
+            {
+               cout<<"\t"<<nb<<"\t"<<i<<"\t"<<js/3<<"\t"<<glodom->tmint[i]-1<<
+                 key2.sprintf("\t%13.5e%13.5e%13.5e",p1[0],p1[1],p1[2]).toLatin1().constData()<<endl;
+               tab[i]=js/3; nb++; continue;
+            }
+         }
+         i++;
+      }
+      montab=new CVWtab(glodom->size,tab);
+      tmp=tmp.sprintf("NB%ld GL_SKIN",ifile);
+      ok=this->insert_key(tmp,montab);
+      if (verbose>4){
+         cout<<"NumberOfEqualsVerticesDOMAIN_"<<ifile<<"="<<nb<<endl;
+      }
+    }
+   }
+   return ok;
+}
+
+//fin utils procedures
 
+//************************************
+bool ghs3dprl_mesh_wrap::Write_masterxmlMEDfile()
+{
+   QString tmp;
+
+   //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!first call
+   if (idom==1)
+   {
+   //define master file (.xml) in memory
+   tmp=path+medname+".xml";
+   filemaster=tmp.toLatin1().constData();
+   domainname=medname.toLatin1().constData();
+   char buff[256];
+
+   //Creating the XML document
+   master_doc = xmlNewDoc(BAD_CAST "1.0");
+   root_node = xmlNewNode(0, BAD_CAST "root");
+   xmlDocSetRootElement(master_doc,root_node);
+
+   //Creating child nodes
+   //Version tag
+   med_int majeur,mineur,release;
+   //Quelle version de MED est utilisée
+   MEDversionDonner(&majeur,&mineur,&release);
+   if (verbose>0) fprintf(stdout,"Files write with MED V%d.%d.%d\n",majeur,mineur,release);
+   node = xmlNewChild(root_node, 0, BAD_CAST "version",0);
+   //xmlNewProp(node, BAD_CAST "maj", BAD_CAST int2string2(majeur).c_str());
+   xmlNewProp(node, BAD_CAST "maj", BAD_CAST i2a(majeur).c_str());
+   xmlNewProp(node, BAD_CAST "min", BAD_CAST i2a(mineur).c_str());
+   xmlNewProp(node, BAD_CAST "ver", BAD_CAST i2a(release).c_str());
+
+   //Description tag
+   node = xmlNewChild(root_node,0, BAD_CAST "description",0);
+   xmlNewProp(node, BAD_CAST "what", BAD_CAST "tetrahedral mesh by tepal");
+   time_t present;
+   time(&present);
+   struct tm *time_asc = localtime(&present);
+   sprintf(buff,"%04d/%02d/%02d %02dh%02dm",
+           time_asc->tm_year+1900,time_asc->tm_mon+1,time_asc->tm_mday,
+           time_asc->tm_hour,time_asc->tm_min);
+   xmlNewProp(node, BAD_CAST "when", BAD_CAST buff);
+   xmlNewProp(node, BAD_CAST "from", BAD_CAST "tepal2med");
+
+   //Content tag
+   node =xmlNewChild(root_node,0, BAD_CAST "content",0);
+   node2 = xmlNewChild(node, 0, BAD_CAST "mesh",0);
+   xmlNewProp(node2, BAD_CAST "name", BAD_CAST domainname.c_str());
+   info_node = xmlNewChild(node, 0, BAD_CAST "tepal2med_info",0);
+
+   //Splitting tag
+   node=xmlNewChild(root_node,0,BAD_CAST "splitting",0);
+   node2=xmlNewChild(node,0,BAD_CAST "subdomain",0);
+   xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbfilestot).c_str());
+   node2=xmlNewChild(node,0,BAD_CAST "global_numbering",0);
+   xmlNewProp(node2, BAD_CAST "present", BAD_CAST "yes");
+
+   //Files tag
+   files_node=xmlNewChild(root_node,0,BAD_CAST "files",0);
+
+   //Mapping tag
+   node = xmlNewChild(root_node,0,BAD_CAST "mapping",0);
+   mesh_node = xmlNewChild(node, 0, BAD_CAST "mesh",0);
+   xmlNewProp(mesh_node, BAD_CAST "name", BAD_CAST domainname.c_str());
+   }
+
+   //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!all calls
+   {
+   char *hostname = getenv("HOSTNAME");
+   node = xmlNewChild(files_node,0,BAD_CAST "subfile",0);
+   xmlNewProp(node, BAD_CAST "id", BAD_CAST i2a(idom).c_str());
+   node2 = xmlNewChild(node, 0, BAD_CAST "name", BAD_CAST distfilename);
+   if (hostname == NULL)
+      node2 = xmlNewChild(node, 0, BAD_CAST "machine",BAD_CAST "localhost");
+   else
+      node2 = xmlNewChild(node, 0, BAD_CAST "machine",BAD_CAST hostname);
+
+   node = xmlNewChild(mesh_node,0,BAD_CAST "chunk",0);
+   xmlNewProp(node, BAD_CAST "subdomain", BAD_CAST i2a(idom).c_str());
+   node2 = xmlNewChild(node, 0, BAD_CAST "name", BAD_CAST nomfinal);
+
+   //tepal2med_info
+   node = xmlNewChild(info_node, 0, BAD_CAST "chunk",0);
+   xmlNewProp(node, BAD_CAST "subdomain", BAD_CAST i2a(idom).c_str());
+   xmlNewProp(node, BAD_CAST "nodes_number", BAD_CAST i2a(nbnodes).c_str());
+   xmlNewProp(node, BAD_CAST "faces_number", BAD_CAST i2a(nbtria3).c_str());
+   xmlNewProp(node, BAD_CAST "tetrahedra_number", BAD_CAST i2a(nbtetra4).c_str());
+   //node2 = xmlNewChild(node, 0, BAD_CAST "name", BAD_CAST nomfinal);
+
+   //node2 = xmlNewChild(node, 0, BAD_CAST "nodes", 0);
+   //xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbnodes).c_str());
+   //node2 = xmlNewChild(node, 0, BAD_CAST "faces", 0);
+   //xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbtria3).c_str());
+   //node2 = xmlNewChild(node, 0, BAD_CAST "tetrahedra", 0);
+   //xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbtetra4).c_str());
+
+   //tepal2med_info about joints of one subdomain
+   xmlAddChild(node,joints_node);
+   //tepal2med_info about groups and families of one subdomain
+   xmlAddChild(node,families.xml_groups());
+   }
+
+   //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!last call
+   if (idom==nbfilestot)
+   {
+   node2 = xmlNewChild(info_node, 0, BAD_CAST "global",0);
+   xmlNewProp(node2, BAD_CAST "tetrahedra_number", BAD_CAST i2a(nbtetrastotal).c_str());
+   //save masterfile
+   xmlSaveFormatFileEnc(filemaster.c_str(), master_doc, "UTF-8", 1);
+   xmlFreeDoc(master_doc);
+   xmlCleanupParser();
+   }
+   return true;
+}
+
+
+//************************************
+bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool deletekeys)
+//deletekeys=true to delete non utils keys and arrays "au fur et a mesure"
+{
+   bool ok=true,oktmp;
+   QString tmp,cmd;
+   char description[MED_TAILLE_DESC];
+   med_int nb;
+   
    //remove path
-   //precaution because casename->med_namelocal no more 32 character
+   //precaution because casename->med_nomfinal 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)
-   {
+   if (verbose>0)cout<<"\nWrite_MEDfiles_v2\n";
+   if (verbose>6){cout<<"\nInitialFamilies\n"; families.write();}
+
+   medname=medname.section('/',-1);
+   if (medname.length()>20) {
       cerr<<"CaseNameMed truncated (no more 20 characters)"<<endl;
-      this->casename.truncate(20);
+      medname.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;
+
+   //create file resume DOMAIN.joints.med of all joints for quick display (...may be...)
+   tmp=path+medname+tmp.sprintf("_joints.med",idom);
+   charendnull(distfilename,tmp,MED_TAILLE_DESC);
+   fidjoint=MEDouvrir(distfilename,MED_CREATION);
+   if (fidjoint<0) cerr<<"Problem MEDouvrir "<<distfilename<<endl;
+   if (verbose>0) cout<<"CreateMEDFile for all joints <"<<distfilename<<">\n";
+
+   //copy file source/GHS3DPRL_skin.med as destination/DOMAIN.skin.med
+   tmp=path+medname+"_skin.med";
+   cmd="cp "+pathini+casename+"_skin.med "+tmp;
+   //cout<<"Copy skin.med Command = "<<cmd<<endl;
+   system(cmd.toLatin1().constData()); 
+   if (verbose>0)cout<<"CreateMEDFile for initial skin <"<<tmp.toLatin1().constData()<<">\n";
+
+   //define family 0 if not existing, no groups
+   families.add("0","");
+   //define family Group_of_New_Nodes (which not exists before tetrahedra)
+   famallnodes=0;
+   if (QString("All_Nodes").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(1,&famallnodes,&tmp);
+      families.add(tmp,"All_Nodes");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"All_Nodes\"\n";
+   
+   famalltria3=0;
+   if (QString("All_Faces").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(-1,&famalltria3,&tmp);
+      families.add(tmp,"All_Faces");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"All_Faces\"\n";
+
+   famalltetra4=0;
+   if (QString("All_Tetrahedra").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(-1,&famalltetra4,&tmp);
+      families.add(tmp,"All_Tetrahedra");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"All_Tetrahedra\"\n";
+
+   famnewnodes=0;
+   if (QString("New_Nodes").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(1,&famnewnodes,&tmp);
+      families.add(tmp,"New_Nodes");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"New_Nodes\"\n";
+   
+   famnewtria3=0;
+   if (QString("New_Faces").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(-1,&famnewtria3,&tmp);
+      families.add(tmp,"New_Faces");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"New_Faces\"\n";
+   
+   famnewtetra4=0;
+   if (QString("New_Tetrahedra").contains(deletegroups)==0){
+      oktmp=families.get_number_of_new_family(-1,&famnewtetra4,&tmp);
+      families.add(tmp,"New_Tetrahedra");
+   }
+   else if (verbose>3) cout<<"--deletegroups matches \"New_Tetrahedra\"\n";
+
+   if (verbose>6){cout<<"\nIntermediatesFamilies\n"; families.write();}
+   if (verbose>6) cout<<"\nNumber0fFiles="<<nbfilestot<<endl;
+   familles intermediatesfamilies=families;
+   //initialisations on all domains
+   nbtetrastotal=0;
 
    //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;
+   //for (idom=1; idom<=nbfilestot; idom++) {
+   for (idom=1; idom<=nbfilestot; idom++) {
+   
+      this->nofile=idom;
+      //restore initial context of families
+      if (idom>1) families=intermediatesfamilies;
+      //if (idom>1) continue;
+      tmp=path+medname+tmp.sprintf("_%d.med",idom);
+      charendnull(distfilename,tmp,MED_TAILLE_DESC);
+
+      //cout<<"<"<<distfilename<<">"<<endl;
+      fid=MEDouvrir(distfilename,MED_CREATION);
+      if (fid<0) {cerr<<"Problem MEDouvrir "<<distfilename<<endl; goto erreur;}
+      if (verbose>0){
+         if (verbose>2) cout<<endl;
+         cout<<"CreateMEDFile "<<idom<<" <"<<distfilename<<">\n";
       }
+      //create mesh
+      tmp=medname+tmp.sprintf("_%d",idom);
+      charendnull(nomfinal,tmp,MED_TAILLE_NOM);
+      tmp=tmp.sprintf("domain %d among %d",idom,nbfilestot);
+      charendnull(description,tmp,MED_TAILLE_DESC);
+
+      if (verbose>4) cout<<"Description : "<<description<<endl;
+      err=MEDmaaCr(fid,nomfinal,3,MED_NON_STRUCTURE,description);
+      if (err<0) {cerr<<"Problem MEDmaaCr"<<nomfinal<<endl; goto erreur;}
+
+      if (!idom_nodes()) {cerr<<"Problem on Nodes"<<endl; goto erreur;}
+      if (!idom_edges()) {cerr<<"Problem on Edges"<<endl; goto erreur;}
+      if (!idom_faces()) {cerr<<"Problem on Faces"<<endl; goto erreur;}
+      if (!idom_tetras()) {cerr<<"Problem on tetrahedra"<<endl; goto erreur;}
+      if (!idom_joints()) {cerr<<"Problem on Joints"<<endl; goto erreur;}
+
+      if (verbose>6){cout<<"\nFinalsFamilies\n"; families.write();}
+      //for nodes families
+      nb=create_families(fid,1);
+      if (verbose>5)cout<<"NumberOfFamiliesNodes="<<nb<<endl;
+
+      err=MEDfamEcr(fid,nomfinal,famnodes,nbnodes,MED_NOEUD,MED_NONE);
+      if (verbose>8)
+         cout<<"MEDfamEcr nodes "<<nbnodes<<":"<<
+               famnodes[0]<<"..."<<famnodes[nbnodes-1]<<" "<<endl;
+      delete[] famnodes;
+      if (err<0) cerr<<"Problem MEDfamEcr nodes"<<endl;
 
-      med_idt fid=MEDouvrir(distfilename,MED_CREATION);
-      if (fid<0) cerr<<"Problem MEDouvrir "<<distfilename<<endl;
+      //for others families
+      nb=create_families(fid,-1);
+      if (verbose>5)cout<<"NumberOfFamiliesFacesAndEdgesEtc="<<nb<<endl;
+
+      err=MEDfamEcr(fid,nomfinal,famtria3,nbtria3,MED_MAILLE,MED_TRIA3);
+      if (verbose>8)
+         cout<<"MEDfamEcr tria3 "<<nbtria3<<":"<<
+               famtria3[0]<<"..."<<famtria3[nbtria3-1]<<" "<<endl;
+      delete[] famtria3;
+      if (err<0) cerr<<"Problem MEDfamEcr tria3"<<endl;
+
+      err=MEDfamEcr(fid,nomfinal,famtetra4,nbtetra4,MED_MAILLE,MED_TETRA4);
+      if (verbose>8)
+         cout<<"MEDfamEcr tetra4 "<<nbtetra4<<":"<<
+               famtetra4[0]<<"..."<<famtetra4[nbtria3-1]<<" "<<endl;
+      delete[] famtetra4;
+      if (err<0) cerr<<"Problem MEDfamEcr tria3"<<endl;
+
+      MEDfermer(fid); //no error
+      //master.xml writings
+      oktmp=Write_masterxmlMEDfile();
+      continue;       //and loop on others domains
+
+      erreur:         //error
+      ok=false;
+      MEDfermer(fid); //but loop on others domains
 
-      //updating the ascii master description file
-      tmp=tmp.sprintf(this->casename+"_%d",idom);
-      file<<this->casename<<" "<<idom<<" "<<
-            tmp<<" "<<"localhost "<<distfilename<<" "<<endl;
+   }
+   MEDfermer(fidjoint); //no error
+   if (verbose>0)cout<<"\nTotalNumberOftetrahedra="<<nbtetrastotal<<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;
+   return ok;
+}
+
+//************************************
+bool ghs3dprl_mesh_wrap::idom_nodes()
+{
+   bool ok=true;
+   QString tmp,key,key1,key2,key3;
+   CVWtab *tab,*tab1,*tab2,*tab3;
+   med_int i,j,*arrayi;
+   int xx;
 
       //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));
+      key=key.sprintf("NB%d VC",idom); //files.NoBoite Vertex Coordinates
+      tab=this->restore_key(key); //tab1=this->mestab[key1];
+      if (!tab) {
+         tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".noboite";
+         ok=this->ReadFileNOBOITE(tmp);
+         tab=this->restore_key(key); //tab1=this->mestab[key1];
+         if (!tab) return false;
+      }
+      tmp=tmp.sprintf("NB%d SN",idom);
+      //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+      xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+      nbnodes=tab->size/3;
+      err=MEDcoordEcr(fid,nomfinal,3,tab->tmflo,MED_FULL_INTERLACE,
+                       nbnodes,MED_CART,nomcoo,unicoo);
+      if (err<0) {cerr<<"Problem MEDcoordEcr"<<endl; return false;}
+      if (verbose>4)cout<<"NumberOfNodes="<<nbnodes<<endl;
 
       //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;
+      arrayi=new med_int[nbnodes];
+      for (i=0; i<nbnodes ; i++) arrayi[i]=i+1;
+      err=MEDnumEcr(fid,nomfinal,arrayi,nbnodes,MED_NOEUD,MED_NONE);
       delete[] arrayi;
+      if (err<0) {cerr<<"Problem MEDnumEcr of nodes"<<endl; return false;}
 
-      //writing connectivity of faces triangles of wrap by nodes
-      key1=key1.sprintf("FC%d",idom); //files.FaCes faces (wrap and triangles only)
+      key1=key1.sprintf("GL%d VE",idom); //global numerotation 
       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;
+      if (!tab1) {
+         tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".glo";
+         ok=this->ReadFileGLO(tmp);
+         if (!ok) {cerr<<"Problem file "<<tmp.toLatin1().constData()<<endl; return false;}
+         tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+         if (!tab1) return false;
       }
-      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;
+      if (nbnodes!=tab1->size){cerr<<"Problem size GLi VE!=nbnodes!"<<endl; return false;}
+
+      key2=key2.sprintf("SKIN_VERTICES_FAMILIES",idom); //on global numerotation 
+      tab2=this->restore_key(key2); //tab1=this->mestab[key1];
+      med_int nbskin=tab2->size;
+      //for (i=0; i<nbskin; i++) cout<<i<<" "<<tab2->tmint[i]<<endl;
+
+      //set families of nodes existing in GHS3DPRL_skin.med
+      med_int nb=nbnodes;
+      famnodes=new med_int[nb];
+      for (i=0; i<nb ; i++) famnodes[i]=famallnodes;
+      med_int * fammore=new med_int[nb];
+      for (i=0; i<nb ; i++) fammore[i]=famnewnodes;
+
+      //set families of nodes of skin
+      for (i=0; i<nb ; i++){
+         j=tab1->tmint[i]-1; //
+         if (j<nbskin){
+            fammore[i]=tab2->tmint[j];
+         }
+      }
+      ok=set_one_more_family(famnodes,fammore,nb);
+      delete[] fammore;
 
-      //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;
+      //cout<<"nodes loc "<<i<<" = gl "<<j<<"\t << "<<tab2->tmint[j]<<
+      //      tmp.sprintf("\t%23.15e%23.15e%23.15e",tab3->tmflo[i*3],
+      //      tab3->tmflo[i*3+1],tab3->tmflo[i*3+2])<<endl;
 
-      //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;
+      //writing nodes(vertices) global numbering
+      err=MEDglobalNumEcr(fid,nomfinal,tab1->tmint,nbnodes,MED_NOEUD,MED_NONE);
+      if (err<0){cerr<<"Problem MEDglobalNumEcr nodes"<<endl; return false;}
 
-      //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;
+   return ok;
+}
 
-      //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
+/*
+//************************************
+bool ghs3dprl_mesh_wrap::set_one_more_family_old(med_int *fami, med_int *more, med_int nb)
+//fuse array of med_int families more et fami as kind of groups 
+//because there are possibilities of intersections
+{
+   QString tmp;
+   med_int i,newfam,morfam,oldfam;
+   for (i=0; i<nb ; i++) {
+      if (more[i]==0) continue;
+      if (fami[i]==0) {
+         fami[i]=more[i];
+         //cout<<"sur "<<i<<" en plus "<<more[i]<<endl;
+      }
+      else { //intersection
+         if (fami[i]==more[i]) continue; //same families
+         oldfam=fami[i];
+         morfam=more[i];
+         //create new family intersection if needed
+         newfam=families.find_family_on_groups(oldfam,morfam);
+         //cout<<"oldfam "<<oldfam<<" morfam "<<morfam<<" -> newfam "<<newfam<<endl;
+         fami[i]=newfam;
+      }
+   }
+   return true;
+}*/
+
+//************************************
+bool ghs3dprl_mesh_wrap::set_one_more_family(med_int *fami, med_int *more, med_int nb)
+//fuse array of med_int families more et fami as kind of groups 
+//because there are possibilities of intersections
+{
+   QString tmp;
+   med_int i,ii,j,newfam,morfam,oldfam,morfami,oldfami,i_zero,nb_fam,nb_max,nb_tot,nb_mess;
+   med_int *newfami;
+
+   nb_fam=families.fam.size(); //on families negative and positive
+   //cout<<"size families "<<nb_fam<<endl;
+   if (nb_fam<=0) nb_fam=5;    //precaution
+   i_zero=nb_fam*2;            //offset for negative indices of families
+   nb_max=nb_fam*4;
+   if (nb_fam>300) cout<<
+      "***set_one_more_family*** warning many initial families could decrease speed "<<nb_fam<<endl;
+   nb_tot=nb_max*nb_max;       //max oversizing *2 on families
+   //newfami is for speed (avoid calls find_family_on_groups)
+   //it is an array[nb_fam*4][nb_fam*4] implemented on vector[nb_max]
+   //to memorize newfam in array[oldfam][morfam]
+   newfami=new med_int[nb_tot];
+   for (i=0; i<nb_tot ; i++) newfami[i]=0; //not yet met!
+
+   nb_mess=0;
+   for (i=0; i<nb ; i++) {
+      if (more[i]==0) continue;
+      if (fami[i]==0) {
+         fami[i]=more[i];
+         //cout<<"sur "<<i<<" en plus "<<more[i]<<endl;
+      }
+      else { //intersection
+         if (fami[i]==more[i]) continue; //same families
+         oldfam=fami[i]; oldfami=oldfam+i_zero;
+         morfam=more[i]; morfami=morfam+i_zero;
+         //not yet met?
+         ii=oldfami+morfami*nb_max; //array 2d on vector
+         if ((ii>=0)&&(ii<nb_tot)) {
+            newfam=newfami[ii];
          }
-         arrayi[i]=-numfam_ini_nodes-itest;
-         i2=0;
-         while (1)
-         {
-            if (i2==imax)
-            {
-               ifam[imax]=itest ; imax++ ; break;
+         else {
+            if (nb_mess<3) {
+               nb_mess++;
+               cout<<"***set_one_more_family*** warning many new families decrease speed "<<nb_fam<<endl;
             }
-            if (itest==ifam[i2]) break;
-            i2++;
-            if (i2>=30) break;
+            ii=-1;
+            newfam=0;
          }
-         if (imax>=30) {
-            cerr<<"Problem more than 30 families of nodes"<<endl;
-            break;
+         if (newfam==0) {
+            //create new family intersection if needed
+            newfam=families.find_family_on_groups(oldfam,morfam);
+            //cout<<"new oldfam "<<oldfam<<" morfam "<<morfam<<" -> newfam "<<newfam<<endl;
+            if (ii>=0) newfami[ii]=newfam;
          }
+         /*else {
+            cout<<"!!! oldfam "<<oldfam<<" morfam "<<morfam<<" -> newfam "<<newfam<<endl;
+         }*/
+         fami[i]=newfam;
       }
-      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];
+   }
+   delete[] newfami;
+   return true;
+}
 
-      err=MEDfamEcr(fid,namelocal,arrayi,nbnodes,MED_NOEUD,medgeoele0);
-      if (err<0) cerr<<"Problem MEDfamEcr nodes"<<endl;
-      delete[] arrayi;
+//************************************
+bool ghs3dprl_mesh_wrap::idom_edges()
+{
+   bool ok=true;
+   QString tmp;
+   nbseg2=0;
+   return ok;
+}
 
-/*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.*/
+//************************************
+bool ghs3dprl_mesh_wrap::idom_faces()
+{
+   bool ok=true;
+   QString tmp,key,key1,key2,key3;
+   CVWtab *tab,*tab1,*tab2,*tab3;
+   med_int ii,i,j,*arrayi;
+   int xx;
 
-      //writing nodes(vertices) global numbering
-      //GLx VE=files.GLo VErtices
-      key1=key1.sprintf("GL%d VE",idom);
+      //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];
-      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));
+      if (!tab1) {
+         tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".faces";
+         ok=this->ReadFileFACES(tmp);
+         tab1=this->restore_key(key1);
+         if (!tab1) return false;
+      }
+      nbtria3=tab1->size/7;
+      if (verbose>4) cout<<"NumberOfTriangles="<<nbtria3<<endl;
+      arrayi=new med_int[nbtria3*3];
+      ii=0,i=0 ;
+      for (j=0; j<nbtria3 ; 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,nomfinal,3,arrayi,MED_FULL_INTERLACE,nbtria3,MED_MAILLE,MED_TRIA3,MED_NOD);
+      delete[] arrayi; //need immediately more little array
+      if (err<0){cerr<<"Problem MEDconnEcr for triangles connectivity"<<endl; return false;}
+      
+      //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 tetrahedra" -> arrayi[i]=!NBFACES!+i+1
+      arrayi=new med_int[nbtria3]; 
+      for (i=0; i<nbtria3 ; i++) arrayi[i]=nbseg2+i+1;
+      err=MEDnumEcr(fid,nomfinal,arrayi,nbtria3,MED_MAILLE,MED_TRIA3);
+      delete[] arrayi;
+      if (err<0){cerr<<"Problem MEDnumEcr of triangles"<<endl; return 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));
+      if (nbtria3!=tab1->size){cerr<<"Problem size GLi FA!=nbtria3!"<<endl; return false;}
+
+      key2=key2.sprintf("SKIN_TRIA3_FAMILIES",idom); //on global numerotation 
+      tab2=this->restore_key(key2); //tab1=this->mestab[key1];
+      med_int nbskin=tab2->size;
+
+      //set families of faces existing in GHS3DPRL_skin.med
+      med_int nb=nbtria3;
+      famtria3=new med_int[nb];
+      for (i=0; i<nb ; i++) famtria3[i]=famalltria3;
+      med_int * fammore=new med_int[nb];
+      for (i=0; i<nb ; i++) fammore[i]=famnewtria3;
+
+      //set families of faces of skin
+      for (i=0; i<nb ; i++){
+         j=tab1->tmint[i]-1; //
+         if (j<nbskin){
+            fammore[i]=tab2->tmint[j];
+         }
+      }
+      ok=set_one_more_family(famtria3,fammore,nb);
+      delete[] fammore;
 
-      //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];
+      //writing faces(triangles) global numbering
+      //if (verbose>2)
+      //   cout<<"CreateMEDglobalNumerotation_Faces "<<key1<<" "<<tab1->size<<endl;
+      err=MEDglobalNumEcr(fid,nomfinal,tab1->tmint,tab1->size,MED_MAILLE,MED_TRIA3);
+      if (err<0){cerr<<"Problem MEDglobalNumEcr faces"<<endl; return false;}
+
+      //xx=this->remove_key_mesh_wrap(QRegExp("FC*",true,true));
+      tmp=tmp.sprintf("GL%d FA",idom);
+      //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+      xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+      tmp=tmp.sprintf("GL%d VE",idom);
+      //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+      xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+
+   return ok;
+}
 
+//************************************
+bool ghs3dprl_mesh_wrap::idom_joints()
+{
+   bool ok=true;
+   QString tmp,namejoint,key,key1,key2;
+   CVWtab *tab,*tab1,*tab2;
+   med_int ineig,ii,jj,i,j,k,*arrayi,nb,famjoint,*fammore,*inodes,*arrayfaces;
+   med_float *arraynodes;
+   char namejnt[MED_TAILLE_NOM+1];  //no more 32
+   char namedist[MED_TAILLE_NOM+1];
+   char descjnt[MED_TAILLE_DESC+1];
+   med_int numfam_ini_wrap=100;
+   joints_node=xmlNewNode(NULL, BAD_CAST "joints");  //masterfile.xml
+   med_int nbjoints=0,nbnodesneig,nbtria3neig;
+   string sjoints=""; //which domains are neighbourg
+   int xx;
+
+      tmp=tmp.sprintf("MS%d *",idom);
+      //read file .msg if not done
+      //qt3 if (this->nb_key_mesh_wrap(QRegExp(tmp,true,true))<=0) {
+      if (this->nb_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp))<=0) {
+         this->nofile=idom;
+         /*old version with xml parser too slow
+         ghs3dprl_msg_parser handler;
+         handler.mailw=this;
+         QXmlSimpleReader reader;
+         reader.setContentHandler(&handler);
+         tmp=pathini+casename+tmp.sprintf(format,nbfilestot,idom)+".msg";
+         QFile File(tmp);
+         QXmlInputSource source(&File);
+         reader.parse(source);
+         File.close();*/
+         tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".msg";
+         ok=this->ReadFileMSGnew(tmp);
+         if (!ok) {
+            cerr<<"Problem in file "<<tmp.toLatin1().constData()<<endl;
+            return false;
+         }
+      }
+
+      //writing joints
+      for (ineig=1; ineig <= nbfilestot; ineig++) {
          if (idom==ineig) continue; //impossible
+
+         //!*************nodes
+         //cout<<"\n    nodes joints\n";
          key1=key1.sprintf("MS%d NE%d VE SE",idom,ineig); //SE or RE?
-         tab1=this->restore_key(key1);
+         tab1=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);
+         nb=tab1->size; nbnodesneig=nb;
+
+         nbjoints++; //one more joint for this domain
+         sjoints=sjoints+" "+i2a(ineig);
+         if (verbose>4)
+            cout<<"NumberOfNodesOfJoint_"<<idom<<"_"<<ineig<<"="<<nb<<endl;
+         namejoint=namejoint.sprintf("JOINT_%d_%d_Nodes",idom,ineig);
+         strcpy(namejnt,namejoint.toLatin1().constData());
+         tmp=tmp.sprintf("JOINT_%d_%d among %d domains of ",idom,ineig,nbfilestot)+nomfinal;
+         strcpy(descjnt,tmp.toLatin1().constData());
+         tmp=medname+tmp.sprintf("_%d",ineig);
+         strcpy(namedist,tmp.toLatin1().constData());
+         err=MEDjointCr(fid,nomfinal,namejnt,descjnt,ineig,namedist);
          if (err<0) cerr<<"Problem MEDjointCr"<<endl;
 
+         ok=families.get_number_of_new_family(1,&famjoint,&tmp);
+         families.add(tmp,namejoint);
+
+         key=key.sprintf("NB%d VC",idom); //files.NoBoite Vertex Coordinates
+         tab=this->restore_key(key); //tab1=this->mestab[key1];
+         //nbnodes=tab->size/3;
+
          //writing correspondence nodes-nodes
          //two indices for one correspondence
-         arrayi=new med_int[nbnodes*2];
-         ii=0;
-         for (int i=0; i<nbnodes ; i++)
-         {
+         arrayi=new med_int[nb*2];
+         arraynodes=new med_float[nbnodesneig*3];  //for file DOMAIN_join.med
+         inodes=new med_int[nbnodes];            //for file DOMAIN_join.med
+         med_int * fammore=new med_int[nbnodes];
+         for (i=0; i<nbnodes ; i++) {fammore[i]=0; inodes[i]=-1;}
+         ii=0; jj=0; k=0;
+         for (i=0; i<nb ; i++){
             //no need because <send> equals <receive> tab1->tmint[i]==tab2->tmint[i]
+            j=tab1->tmint[i]-1; //contents of tab1 1 to nb
+            inodes[j]=k; k++;   //indices 0->n-1 of nodes of joint from nodes of domain
+            arraynodes[jj]=tab->tmflo[j*3]; jj++;
+            arraynodes[jj]=tab->tmflo[j*3+1]; jj++;
+            arraynodes[jj]=tab->tmflo[j*3+2]; jj++;
+
+            fammore[j]=famjoint;
             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);
+         ok=set_one_more_family(famnodes,fammore,nbnodes);
+         delete[] fammore;
+
+         err=MEDjointEcr(fid,nomfinal,namejnt,arrayi,nb,
+                           MED_NOEUD,MED_NONE,MED_NOEUD,MED_NONE);
          if (err<0) cerr<<"Problem MEDjointEcr nodes"<<endl;
          delete[] arrayi;
 
+         //!*************TRIA3
          //writing correspondence triangles-triangles
+         //cout<<"\n    faces joints\n";
+         nbtria3neig=0;
          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
+         if (!tab1){
+            if (verbose>4)
+               cout<<"NumberOfTrianglesOfJoint_"<<idom<<"_"<<ineig<<"=0"<<endl;
+            //continue; //case (ifile,ineig) are not neighbours=>no joints
          }
+         else //have to set xml may be no faces but nodes in a joint!
+         {
          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++)
-         {
+         namejoint=namejoint.sprintf("JOINT_%d_%d_Faces",idom,ineig);
+         
+         ok=families.get_number_of_new_family(-1,&famjoint,&tmp);
+         families.add(tmp,namejoint);
+
+         key=key.sprintf("FC%d",idom); //files.FaCes faces (wrap and triangles only)
+         tab=this->restore_key(key); //tab1=this->mestab[key1];
+
+         med_int nb=tab1->size; nbtria3neig=nb;
+         if (verbose>4)
+            cout<<"NumberOfTrianglesOfJoint_"<<idom<<"_"<<ineig<<"="<<nb<<endl;
+         arrayi=new med_int[nb*2];
+         arrayfaces=new med_int[nbtria3neig*3];  //for file DOMAIN_join.med
+         fammore=new med_int[nbtria3];
+         for (i=0; i<nbtria3 ; i++) fammore[i]=0;
+         ii=0; jj=0;
+         for (i=0; i<nb ; 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;
+            fammore[tab1->tmint[i]-1]=famjoint;
+            //famtria3[tab1->tmint[i]-1]=famjoint;
             arrayi[ii]=tab2->tmint[i]; ii++;
             //cout<<arrayi[ii-1]<<"="<<arrayi[ii-2]<<endl;
+            k=(tab1->tmint[i]-1)*7; //indice of node connectivity
+            arrayfaces[jj]=inodes[tab->tmint[k]-1]+1; jj++;
+            arrayfaces[jj]=inodes[tab->tmint[k+1]-1]+1; jj++;
+            arrayfaces[jj]=inodes[tab->tmint[k+2]-1]+1; jj++;
          }
-         err=MEDjointEcr(fid,namelocal,namejnt,arrayi,nbtriangles,MED_FACE,MED_TRIA3,MED_FACE,MED_TRIA3);
+         ok=set_one_more_family(famtria3,fammore,nbtria3);
+         delete[] fammore;
+
+         err=MEDjointEcr(fid,nomfinal,namejnt,arrayi,nb,MED_MAILLE,MED_TRIA3,MED_MAILLE,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;
+         //!write in file resume DOMAIN.joints.med of all joints for quick display (...may be...)
+         if (idom<=ineig) { //no duplicate joint_1_2 and joint_2_1
+          //create mesh
+          namejoint=namejoint.sprintf("JOINT_%d_%d",idom,ineig);
+          charendnull(namejnt,namejoint,MED_TAILLE_NOM);
+          tmp=tmp.sprintf("joint between %d and %d",idom,ineig);
+          charendnull(descjnt,tmp,MED_TAILLE_DESC);
+          err=MEDmaaCr(fidjoint,namejnt,3,MED_NON_STRUCTURE,descjnt);
+          if (err<0) cerr<<"Problem MEDmaaCr "<<namejnt<<endl;
+          //write nodes
+          err=MEDcoordEcr(fidjoint,namejnt,3,arraynodes,MED_FULL_INTERLACE,
+                         nbnodesneig,MED_CART,nomcoo,unicoo);
+          if (err<0) cerr<<"Problem MEDcoordEcr "<<namejnt<<endl;
+          arrayi=new med_int[nbnodesneig];
+          for (i=0; i<nbnodesneig ; i++) arrayi[i]=i+1;
+          err=MEDnumEcr(fidjoint,namejnt,arrayi,nbnodesneig,MED_NOEUD,MED_NONE);
+          delete[] arrayi;
+          if (err<0) cerr<<"Problem MEDnumEcr of nodes "<<namejnt<<endl;
+
+          //write tria3
+          if (nbtria3neig>0) {
+           //for (i=0; i<nbtria3neig ; i++) cout<<i+1<<" "<<
+           //    arrayfaces[i*3]<<" "<<arrayfaces[i*3+1]<<" "<<arrayfaces[i*3+2]<<endl;
+           err=MEDconnEcr(fidjoint,namejnt,3,arrayfaces,MED_FULL_INTERLACE,
+                        nbtria3neig,MED_MAILLE,MED_TRIA3,MED_NOD);
+           if (err<0) cerr<<"Problem MEDconnEcr for triangles connectivity "<<namejnt<<endl;
+           //writing indices of faces triangles of joint
+           arrayi=new med_int[nbtria3neig]; 
+           for (i=0; i<nbtria3neig ; i++) arrayi[i]=i+1;
+           err=MEDnumEcr(fidjoint,namejnt,arrayi,nbtria3neig,MED_MAILLE,MED_TRIA3);
+           delete[] arrayi;
+           if (err<0) cerr<<"Problem MEDnumEcr of triangles "<<namejnt<<endl;
+          }
+         }
 
+         delete[] arraynodes;
+         if (nbtria3neig>0) delete[] arrayfaces;
+         delete[] inodes;
+
+         //!masterfile.xml
+         node=xmlNewChild(joints_node, 0, BAD_CAST "joint", 0);
+         xmlNewProp(node, BAD_CAST "id", BAD_CAST i2a(ineig).c_str());
+         xmlNewProp(node, BAD_CAST "nodes_number", BAD_CAST i2a(nbnodesneig).c_str());
+         xmlNewProp(node, BAD_CAST "faces_number", BAD_CAST i2a(nbtria3neig).c_str());
+         //node2 = xmlNewChild(node, 0, BAD_CAST "nodes", 0);
+         //xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbnodesneig).c_str());
+         //node2 = xmlNewChild(node, 0, BAD_CAST "faces", 0);
+         //xmlNewProp(node2, BAD_CAST "number", BAD_CAST i2a(nbtria3neig).c_str());
       }
-      //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);
+   //masterfile.xml
+   xmlNewProp(joints_node, BAD_CAST "number", BAD_CAST i2a(nbjoints).c_str());
+   xmlNewChild(joints_node, 0, BAD_CAST "id_neighbours", BAD_CAST sjoints.substr(1).c_str());
+   
+   tmp=tmp.sprintf("NB%d VC",idom);
+   //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+   xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+   tmp=tmp.sprintf("MS%d NE*",idom);
+   //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+   xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+   tmp=tmp.sprintf("FC%d",idom);
+   //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+   xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+   tmp=tmp.sprintf("GL%d *",idom);
+   //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+   xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
+   return ok;
+}
 
-      //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
-   }
+//************************************
+bool ghs3dprl_mesh_wrap::idom_tetras()
+{
+   bool ok=true;
+   QString tmp,key1;
+   CVWtab *tab1;
+   med_int i,*arrayi;
+   int xx;
+
+      //writing connectivity of tetrahedra by nodes
+      key1=key1.sprintf("NB%d EV",idom); //files.NoBoite Elements Vertices (tetra only)
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      nbtetra4=tab1->size/4;
+      nbtetrastotal=nbtetrastotal + nbtetra4;
+      if (verbose>5)cout<<"NumberOftetrahedra="<<nbtetra4<<endl;
+      err=MEDconnEcr(fid,nomfinal,3,tab1->tmint,MED_FULL_INTERLACE,nbtetra4,MED_MAILLE,MED_TETRA4,MED_NOD);
+      if (err<0){cerr<<"Problem MEDconnEcr for tetra connectivity"<<endl; return false;}
+
+      //writing indices of tetrahedra
+      arrayi=new med_int[nbtetra4];
+      for (i=0; i<nbtetra4 ; i++) arrayi[i]=nbseg2+nbtria3+i+1;
+      //for (i=0; i<nbtria3 ; i++) cout<<i<<" "<<arrayi[i]<<endl;
+      err=MEDnumEcr(fid,nomfinal,arrayi,nbtetra4,MED_MAILLE,MED_TETRA4);
+      delete[] arrayi;
+      if (err<0){cerr<<"Problem MEDnumEcr of tetrahedra"<<endl; return false;}
+
+      famtetra4=new med_int[nbtetra4];
+      for (i=0; i<nbtetra4 ; i++) famtetra4[i]=famnewtetra4;
+
+      //writing tetrahedra global numbering
+      //GLx EL=files.GLo ELements
+      key1=key1.sprintf("GL%d EL",idom);
+      tab1=this->restore_key(key1); //tab1=this->mestab[key1];
+      if (!tab1) {
+         tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".glo";
+         ok=this->ReadFileGLO(tmp);
+         tab1=this->restore_key(key1);
+         if (!tab1) return false;
+      }
+
+      if (tab1->size!=nbtetra4){
+         cerr<<"Problem incorrect size of tetrahedra global numbering"<<endl; return false;}
+      if (verbose>2)
+         cout<<"CreateMEDglobalNumerotation_tetrahedra "<<key1.toLatin1().constData()<<" "<<tab1->size<<endl;
+      err=MEDglobalNumEcr(fid,nomfinal,tab1->tmint,tab1->size,MED_MAILLE,MED_TETRA4);
+      if (err<0){cerr<<"Problem MEDglobalNumEcr tetrahedra"<<endl; return false;}
+
+      tmp=tmp.sprintf("NB%d EV",idom);
+      //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true));
+      xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp));
    return ok;
 }
 
+//************************************
+med_int ghs3dprl_mesh_wrap::create_families(med_idt fid, int sign)
+//if sign < 0 families faces or tria3 etc...
+//if sign >= 0 family zero and family nodes
+{
+   med_int pas,ires;
+   char nomfam[MED_TAILLE_NOM+1];  //it.current()->name;
+   char attdes[MED_TAILLE_DESC+1]="_NO_DESCRIPTION";
+   char *gro;
+   med_int i,attide=1,attval=1,natt=1,num,ngro;
+   
+   if (sign>=0) pas=1; else pas=-1;
+   ires=0;
+   fend gb;
+   fagr::iterator it1;
+   fend::iterator it2;
+   for (it1=families.fam.begin(); it1!=families.fam.end(); ++it1){
+      num=(*it1).first.toLong();
+      if ((pas==-1) && (num>=0)) continue; //not good families
+      if ((pas== 1) && (num< 0)) continue; //not good families
+      charendnull(nomfam,(*it1).first,MED_TAILLE_NOM);
+      ires++;
+      //med_int natt=0;
+      ngro=(*it1).second.size();
+      if (verbose>5) 
+         cout<<"CreateFamilyInMEDFile <"<<nomfam<<">\tNbGroups="<<ngro;
+      gro=new char[MED_TAILLE_LNOM*ngro+2];
+      gb=(*it1).second;
+      i=0;
+      for (it2=gb.begin(); it2!=gb.end(); ++it2){
+         charendnull(&gro[i*MED_TAILLE_LNOM],(*it2).first,MED_TAILLE_LNOM);
+         if (verbose>5)cout<<" <"<<&gro[i*MED_TAILLE_LNOM]<<"> ";
+         i++;
+      }
+      if (verbose>5)cout<<endl;
+      err=MEDfamCr(fid,nomfinal,nomfam,num,NULL,NULL,NULL,0,gro,ngro);
+                              //&attide,&attval,attdes,natt,gro,ngro);
+      if (err<0) cerr<<"Problem MEDfamCr"<<endl;
+      delete[] gro;
+      if (err<0) cerr<<"Problem MEDfamCr of "<<nomfam<<endl;
+   }
+   return ires;
+}
+
+
index 8073fa7ab36b3275bbc2fc51de231137b4d2468d..e4670360e549b7197d9e2a51862661d7faa62c3f 100755 (executable)
@@ -1,9 +1,34 @@
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : ghs3dprl_mesh_wrap.h
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//
+// ---
 
 #ifndef GHS3DPRL_MESH_WRAP_H
 #define GHS3DPRL_MESH_WRAP_H
 
-#include <qdict.h>
-#include <qregexp.h>
+#include <QHash>
+#include <map>
+#include <QRegExp>
 
 //Med File V 2.2 attributes
 #undef MED_H
@@ -15,12 +40,21 @@ namespace med_2_2 {
   }
 }
 
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
+using namespace std;
 using namespace med_2_2;
 
 class CVWtab
 //contains size=size of vector and the vector (med_int or med_float)
 {
+
 public:
+   static long memoryuse;
+   static long memorymax;
    long size,type;
    med_int *tmint;   //integer med
    med_float *tmflo; //float med
@@ -33,36 +67,102 @@ public:
    bool is_equal(CVWtab *tab2);
 };
 
+typedef map<QString,  int> fend;
+typedef map<QString, fend> fagr;
+class familles{
+   private:
+   void newfam(QString nom);
+   void newgro(QString nom);
+   public:
+   int no;
+   fagr fam;
+   fagr gro;
+   void write();
+   xmlNodePtr xml_groups();
+   void add(QString nomfam, QString nomgro);
+   void addgro();
+   bool get_number_of_new_family(int sign,med_int *num,QString *tmp);
+   med_int find_family_on_groups(med_int fam1, med_int fam2);
+   fend fuse_goups(med_int fam1, med_int fam2);
+};
+
 class ghs3dprl_mesh_wrap
 {
 public:
-   QString casename,path;
+   QString medname,casename,path,pathini,filemed,format;
+   QRegExp deletegroups; //regular expression 
    long
-      nofile,nbfiles,
+      nbtetrastotal,
+      nofile,nbfiles,nbfilestot,
       nbelem_limit_swap,
       verbose;
-   QDict<CVWtab> mestab;
+   med_err err;
+   med_idt fid,fidjoint;
+   med_int idom;
+
+   //master.xml
+   string filemaster,domainname;
+   char distfilename[MED_TAILLE_DESC];
+   xmlDocPtr master_doc;
+   xmlNodePtr root_node,node,node2,
+              joints_node,info_node,files_node,mesh_node;
+
+   QHash<QString,CVWtab*> mestab;
+   familles families;
+
+   //from skin.med
+   char nommaa[MED_TAILLE_NOM+1];
+   char maillage_description[MED_TAILLE_DESC+1];
+   char nomcoo[3*MED_TAILLE_PNOM+1];
+   char unicoo[3*MED_TAILLE_PNOM+1];
+   med_int *famnodesskin;    //from skin.med...
+   med_int *famseg2skin;     //...valid on global index/numerotation
+   med_int *famtria3skin;
+
+   //to final files .med with tetrahedra
+   char nomfinal[MED_TAILLE_NOM+1];
+   med_int *famnodes,nbnodes,famnewnodes,famallnodes;  //to final files .med with tetrahedra
+   med_int *famseg2,nbseg2,famnewseg2,famallseg2;
+   med_int *famtria3,nbtria3,famnewtria3,famalltria3;
+   med_int *famtetra4,nbtetra4,famnewtetra4,famalltetra4;
 
    //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 nb_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);
 
+   //family level
+   bool set_one_more_family(med_int *fami, med_int *more, med_int nb);
+   med_int create_families(med_idt fid,int sign);
+   void add_family(med_int num,QString newgro);
+   void cout_families_and_groups();
+   bool idom_nodes();
+   bool idom_edges();
+   bool idom_faces();
+   bool idom_joints();
+   bool idom_tetras();
+
    //test level
    bool test_msg_wrap();
    bool test_vertices_wrap();
 
    //hight level
-   long SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp);
+   long SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp,long ifgreaterthan=0);
+   bool ReadFileMSGnew(const QString FileName);
    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();
+   bool Find_VerticesDomainToVerticesSkin();
+   bool Write_masterxmlMEDfile();
+   bool Write_MEDfiles_v0(bool deletekeys=FALSE); 
+   bool Write_MEDfiles_v1(bool deletekeys=FALSE); 
+   bool Write_MEDfiles_v2(bool deletekeys=FALSE);
 };
 
 #endif
index 74f5a6911a5276c96099d79cbbd0d2bf20e92f79..08badd1ab39a80686d57e9a845acf304a25b4067 100755 (executable)
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : ghs3dprl_mesh_parser.cxx
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//
+// ---
 
-//#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;
+  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)
+                                      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 ok;
+  if (verbose) std::cout<<indent.toLatin1().constData()<<qName.toLatin1().constData()<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<neighbourscount<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<neighbourindice<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<nbcount<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<nbcount<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<nbcount<<std::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) std::cout<<indent.toLatin1().constData()<<attrs.localName(0).toLatin1().constData()<<
+                    "="<<nbcount<<std::endl;
+    }
+    return true;
+  }
+  
+  /*for( int i=0; i<attrs.count(); i++ )
+  {
+    std::cout<<indent.toLatin1().constData()<<attrs.localName(i).toLatin1().constData()<<"="<<attrs.value(i)<<std::endl;
+  }*/
+  
+  return true;
 }
 
 //************************************
 bool ghs3dprl_msg_parser::endElement(const QString &namespaceURI,
-                                 const QString &localName,
-                                 const QString &qName)
+                                    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;
+  indent.remove((uint)0,3);
+  if (verbose) std::cout<<indent.toLatin1().constData()<<"\\"<<qName.toLatin1().constData()<<std::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)
+  bool ok;
+  med_int *tmint=NULL;
+  long nb=0;
+  //filtre rc,lf,tab et blancs successifs
+  QString str=strini.simplified();
+  //if ( str.length() == 1 && str=="\n" )
+  if (str.length()==0)
+  {
+    //std::cout<<"EMPTY_LINE_CR"<<std::endl;
+    return true;
+  }
+  else
+  {
+    if (etat==1)
+    {
+      double ver=str.toDouble(&ok);
+      if (!ok || ver!=1e0)
       {
-         double ver=str.toDouble(&ok);
-         if (!ok || ver!=1e0)
-         {
-            cout<<"version "<<str<<" fichier .msg inconnue"<<endl;
-            return FALSE;
-         }
-         else return TRUE;
+       std::cout<<"version "<<str.toLatin1().constData()<<" fichier .msg inconnue"<<std::endl;
+       return false;
       }
-      nb=str.contains(' ',TRUE) + 1; //nb chiffres detectes
-      if (nb>1)
+      else return true;
+    }
+    nb=str.count(' ',Qt::CaseSensitive) + 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.toLatin1().constData(),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)
       {
-         //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;
-         }
+       std::cout<<"pb conversion "<<i<<" eme entier="<<str.section(' ',i-1,i-1).toLatin1().constData()<<std::endl;
+       std::cout<<indent.toLatin1().constData()<<"etat="<<etat<<" nb="<<nb<<std::endl<<str.toLatin1().constData()<<std::endl;
       }
-      if (nb==1)
+    }
+    if (nb==1)
+    {
+      tmint=new med_int[nb];
+      tmint[0]=str.toLong(&ok);
+      if (!ok)
       {
-         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;
-         }
+       std::cout<<"pb conversion 1er entier="<<str.toLatin1().constData()<<std::endl;
+       std::cout<<indent.toLatin1().constData()<<"etat="<<etat<<" nb="<<nb<<std::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;
+    }
+    
+  }
+  //lecture ok stockage de tlong dans mailw.mestab
+  CVWtab *montab=new CVWtab(nb,tmint);
+  QString tmp;
+  /*std::cout<<"InsertKey type="<<typel<<" "<<sendreceive<<
+    " neighbour="<<neighbourindice<<
+    " file="<<mailw->nofile<<std::endl;*/
+  tmp=tmp.sprintf("MS%ld NE%ld ",
+                 mailw->nofile,neighbourindice)+
+    shorttypel+shortsendreceive;
+  tmp=tmp.simplified();
+  ok=mailw->insert_key(tmp,montab);
+  return true;
 }
 
index 7343d6eaa46aab70694313cd97371ea4abb61e10..dafc39ceeb4fb36e2fc7dfbec0ab00ee2c6041e2 100755 (executable)
@@ -1,24 +1,37 @@
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : ghs3dprl_mesh_parser.h
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+//
+// ---
 
 #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>
-  }
-}
-*/
+#include <QXmlDefaultHandler>
 
 class ghs3dprl_msg_parser : public QXmlDefaultHandler
 {
-public:
+ public:
    bool startDocument();
    bool startElement(const QString&,
                      const QString&,
diff --git a/src/tepal2med/moc_dlg_ghs3dmain.cxx b/src/tepal2med/moc_dlg_ghs3dmain.cxx
deleted file mode 100755 (executable)
index 3694255..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************************
-** 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
index 5b19e5408a0e9d465dac203df8b4cf1b0691bdaa..d6c27b09cd07ffbcc22c4bfe4b50b47abb3c8c03 100755 (executable)
+// Copyright (C) 2007-2008 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// ---
+//
+// File   : tepal2med.cxx
+// Author : Christian VAN WAMBEKE (CEA) 
+//
+// ---
+
 /*
-** prog principal de test de ghs3dprl
+** prog principal de ghs3dprl
 */
 
 #include <stdio.h> /* printf clrscr fopen fread fwrite fclose */
 #include <string>
 #include <cstring>
 #include <iostream>
+#include <sstream>
 #include <fstream>
-#include "ghs3dprl_msg_parser.h"
 
-#include <qtextstream.h>
 #include <qstring.h>
-#include <qxml.h>
-#include <qwindowdefs.h>
-
+#include <QXmlSimpleReader>
+#include <QXmlInputSource>
+#include <QApplication>
 
-#include <qapplication.h>
+#include "ghs3dprl_msg_parser.h"
 #include "dlg_ghs3dmain.h"
 
+//#include "MEDMEM_Exception.hxx"
+//#include "MEDMEM_define.hxx"
+
+extern "C" {
+#include <med.h>
+//#include <med_config.h>
+#include <med_utils.h>
+//#include <med_misc.h>
+#include <stdlib.h>
+}
+
 using namespace std;
 using namespace med_2_2;
 
 //************************************
-int main(int argc, char **argv)
+med_idt ouvre_fichier_MED(char *fichier,int verbose)
 {
-   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";
+  med_idt fid = 0;
+  med_err ret = 0;
+  med_int majeur,mineur,release;
+
+  /* on regarde si le fichier existe */
+  ret = (int) access(fichier,F_OK);
+  if (ret < 0) return fid;
+
+  /* on regarde s'il s'agit d'un fichier au format HDF5 */
+  ret = MEDformatConforme(fichier);
+  if (ret < 0){
+     cerr<<"File "<<fichier<<" not HDF V5 formatted\n";
+     return fid;
+  }
+
+  /* Quelle version de MED est utilise par mdump ? */
+  MEDversionDonner(&majeur,&mineur,&release);
+  if (verbose>0)fprintf(stdout,"\nReading %s with MED V%d.%d.%d",
+                        fichier,majeur,mineur,release);
+
+  /* Ouverture du fichier MED en lecture seule */
+  fid = MEDouvrir(fichier,MED_LECTURE);
+  if (ret < 0) return fid;
+
+  MEDversionLire(fid, &majeur, &mineur, &release);
+  if (majeur < 2 || majeur == 2 && mineur < 2) {
+    fprintf(stderr,"File %s from MED V%d.%d.%d not assumed\n",
+                   fichier,majeur,mineur,release);
+    //" version est antérieure Ã  la version 2.2";
+    ret = MEDfermer(fid);
+    fid=0; }
+  else {
+    if (verbose>0)fprintf(stdout,", file from MED V%d.%d.%d\n",majeur,mineur,release); }
+
+  return fid;
+}
 
+//************************************
+bool ReadFileMED(QString nomfilemed,ghs3dprl_mesh_wrap *mymailw)
+{
+   med_err ret;
+   med_idt fid=0;
+   med_int i,j,mdim,nmaa,edim,majeur_lu,mineur_lu,release_lu,nprofils;
+   med_maillage type_maillage;
+   int numero=1;
+   med_connectivite typ_con=MED_NOD;
+   QString key,tmp;
+
+   //version qt3
+   char chaine[nomfilemed.length()+1];
+   strncpy(chaine,nomfilemed.toLatin1().constData(),nomfilemed.length()+1);
+   //cout<<"*** ReadFileMED *** "<<chaine<<"\n";
+
+   /*version qt4
+   char chaine[nomfilemed.length() + 1];
+   strncpy(chaine, nomfilemed.toStdString().c_str(), nomfilemed.length());
+   //?chaine[nomfilemed.length()]= '\0';
+   cout<<"fichier "<<chaine<<"\n";*/
+
+   //char *pt=chaine;
+   fid=ouvre_fichier_MED(chaine,mymailw->verbose);
+   if (fid == 0) {
+      cerr<<"Problem opening file "<<nomfilemed.toLatin1().constData()<<"\n";
+      //ret = MEDfermer(fid);
+      return false;
+   }
 
-   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";
+   nmaa = MEDnMaa(fid);
+   if (nmaa <= 0){
+      cerr<<"No meshes in "<<nomfilemed.toLatin1().constData()<<"\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (nmaa > 1) cout<<"More than one mesh in "<<nomfilemed.toLatin1().constData()<<", first one taken\n";
+   ret = MEDmaaInfo(fid,numero,mymailw->nommaa,&mdim,&type_maillage,
+                               mymailw->maillage_description);
+   if (ret < 0){
+      cerr<<"Problem MEDmaaInfo in "<<nomfilemed.toLatin1().constData()<<"\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (mdim != 3){
+      cerr<<"Problem dimension mesh should be 3: "<<mdim<<"\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   edim = MEDdimEspaceLire(fid,mymailw->nommaa);
+   if (!((edim == 3)||(edim == -1))){
+      cerr<<"Problem dimension Espace should be 3 or -1: "<<edim<<"\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (type_maillage != MED_NON_STRUCTURE){
+      cerr<<"Problem type mesh should be MED_NON_STRUCTURE: "<<type_maillage<<endl;
+      ret = MEDfermer(fid);
+      return false;
+   }
+
+   //lecture nb de noeuds
+   med_int nnoe=MEDnEntMaa(fid,mymailw->nommaa,MED_COOR,MED_NOEUD,
+                           (med_geometrie_element)0,(med_connectivite)0);
+   if (nnoe<1){
+      cerr<<"Problem number of Vertices < 1\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+
+   //nombre d'objets MED : mailles, faces, aretes , ... 
+   med_int nmailles[MED_NBR_GEOMETRIE_MAILLE],nbtria3;
+   med_int nfaces[MED_NBR_GEOMETRIE_FACE];
+   med_int naretes[MED_NBR_GEOMETRIE_ARETE],nbseg2;
+   //polygones et polyedres familles equivalences joints
+   med_int nmpolygones,npolyedres,nfpolygones,nfam,nequ,njnt;
+
+   //Combien de mailles, faces ou aretes pour chaque type geometrique ?
+   /*for (i=0;i<MED_NBR_GEOMETRIE_MAILLE;i++){
+      nmailles[i]=MEDnEntMaa(fid,mymailw->nommaa,MED_CONN,MED_MAILLE,typmai[i],typ_con);
+      //lecture_nombre_mailles_standards(fid,nommaa,typmai[i],typ_con,i);
+      if (mymailw->verbose>6) cout<<"NumberOf"<<nommai[i]<<"="<<nmailles[i]<<endl;
+   }*/
+   nbtria3=MEDnEntMaa(fid,mymailw->nommaa,MED_CONN,MED_MAILLE,MED_TRIA3,typ_con);
+   nbseg2=MEDnEntMaa(fid,mymailw->nommaa,MED_CONN,MED_MAILLE,MED_SEG2,typ_con);
+
+   //Combien de mailles polygones quelconques ?
+   //nmpolygones = lecture_nombre_mailles_polygones(fid,nommaa,typ_con);
+   //Combien de mailles polyedres quelconques ?
+   //npolyedres = lecture_nombre_mailles_polyedres(fid,nommaa,typ_con);
+
+   //combien de familles ?
+   nfam=MEDnFam(fid,mymailw->nommaa);
+   if (mymailw->verbose>2) {
+      cout<<"\nNumberOfFamilies="<<nfam<<endl;
+      cout<<"NumberOfVertices="<<nnoe<<endl;
+      cout<<"NumberOfMED_SEG2="<<nbseg2<<endl;
+      cout<<"NumberOfMED_TRIA3="<<nbtria3<<"\n\n";
+   }
+   if (nbtria3<3){
+      cerr<<"Problem number of MED_TRIA3 < 3, not a skin of a volume\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+
+med_int famdelete[nfam],ifamdelete=0,idelete;
+{
+  med_int natt,ngro;
+  char *attdes,*gro;
+  med_int *attval,*attide;
+  char nomfam[MED_TAILLE_NOM+1];
+  med_int numfam;
+  char str1[MED_TAILLE_DESC+1];
+  char str2[MED_TAILLE_LNOM+1];
+  med_err ret = 0;
+  
+  for (i=0;i<nfam;i++) famdelete[i]=0;
+  for (i=0;i<nfam;i++) {
+
+    //nombre de groupes
+    ngro = MEDnGroupe(fid,mymailw->nommaa,i+1);
+    if (ngro < 0){
+       cerr<<"Problem reading number of groups of family\n";
+       continue;
+    }
+
+    //nombre d'attributs
+    natt = MEDnAttribut(fid,mymailw->nommaa,i+1);
+    if (natt < 0){
+       cerr<<"Problem reading number of attributes of family\n";
+       continue;
+    }
+
+    //nom,numero,attributs,groupes
+    //allocation memoire par exces
+    attide = (med_int*) malloc(sizeof(med_int)*(natt+1));
+    attval = (med_int*) malloc(sizeof(med_int)*(natt+1));
+    attdes = (char *) malloc(MED_TAILLE_DESC*(natt+1));
+    gro = (char*) malloc(MED_TAILLE_LNOM*(ngro+1));
+    
+    ret = MEDfamInfo(fid,mymailw->nommaa,i+1,nomfam,&numfam,attide,attval,
+                    attdes,&natt,gro,&ngro);
+    if (ret < 0){
+       cerr<<"Problem reading informations of family\n";
+       continue;
+    }
+
+    if (mymailw->verbose>8) {
+     cout<<"Family "<<numfam<<" have "<<natt<<" attributes and "<<ngro<<" groups\n";
+     //affichage des resultats
+     for (j=0;j<natt;j++) {
+      if (j==0) cout<<"  Attributes :\n";
+      strncpy(str1,attdes+j*MED_TAILLE_DESC,MED_TAILLE_DESC);
+      str1[MED_TAILLE_DESC] = '\0';
+      fprintf(stdout,"    ident = %d\t value = %d\t description = %s\n",
+                     *(attide+j),*(attval+j),str1);
+     }
+     for (j=0;j<ngro;j++) {
+      if (j==0) cout<<"  Groups :\n";
+      strncpy(str2,gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+      str2[MED_TAILLE_LNOM] = '\0';
+      fprintf(stdout,"    name = %s\n",str2);
+     }
+     if (i==nfam-1) cout<<endl;
+    }
+    QString sfam,sgro;
+    sfam=sfam.sprintf("%d",numfam);
+    idelete=0;
+    for (j=0;j<ngro;j++){
+       strncpy(str2,gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+       str2[MED_TAILLE_LNOM]='\0';
+       sgro=str2;
+       if (sgro.contains(mymailw->deletegroups)>0) {
+          //cout<<"idelete++ "<<sgro<<endl;
+          idelete++;
+       }
+    }
+
+    if (idelete==ngro && ngro>0) { //only delete family whith all delete groups
+       //cout<<"famdelete++ "<<numfam<<" "<<ifamdelete<<" "<<ngro<<endl;
+       famdelete[ifamdelete]=numfam;
+       ifamdelete++;
+    }
+
+    else {
+     for (j=0;j<ngro;j++){
+       strncpy(str2,gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+       str2[MED_TAILLE_LNOM]='\0';
+       sgro=str2;
+       QRegExp qgroup=QRegExp("Group_Of_All",Qt::CaseSensitive,QRegExp::RegExp);
+       if (sgro.contains(mymailw->deletegroups)==0){
+          if (sgro.contains(qgroup)>0) {
+             sgro="Skin_"+sgro; //pas sur que ce soit pertinent
+          }
+          if (mymailw->verbose>8) cout<<"families.add("<<sfam.toLatin1().constData()<<
+                                        ","<<sgro.toLatin1().constData()<<")\n";
+          mymailw->families.add(sfam,sgro);
+       }
+       else {
+          //sgro="Skin_"+sgro; //pas sur que ce soit pertinent
+          //cout<<"--deletegroups matches \""<<sfam<<","<<sgro<<"\"\n";
+          if (mymailw->verbose>3) cout<<"--deletegroups matches \""<<
+                                        sgro.toLatin1().constData()<<
+                                        "\" in family "<<numfam<<endl;
+       }
+     }
+    }
+    
+    /*for (j=0;j<ngro;j++){
+       strncpy(str2,gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+       str2[MED_TAILLE_LNOM]='\0';
+       sgro=str2;
+       //cout<<"families.add("<<sfam<<","<<sgro<<")\n";
+       if (sgro.contains(mymailw->deletegroups)==0){
+          //sgro="Skin_"+sgro; //pas sur que ce soit pertinent
+          cout<<"families.add("<<sfam<<","<<sgro<<")\n";
+          mymailw->families.add(sfam,sgro);
+       }
+       else {
+          cout<<"--deletegroups matches \""<<sgro<<"\"\n";
+          famdelete[ifamdelete]=numfam
+          ifamdelete++;
+       }
+    }*/
+
+    //on libere la memoire
+    free(attide);
+    free(attval);
+    free(attdes);
+    free(gro);
+  }
+}
+
+//cout<<"famdelete"; for (j=0;j<ifamdelete;j++) cout<<" "<<famdelete[j]; cout<<endl;
+
+if (mymailw->verbose>3){
+   cout<<"\nFamiliesAndGroupsOf "<<nomfilemed.toLatin1().constData()<<endl;
+   mymailw->families.write();
+}
+
+   med_repere rep;
+   med_mode_switch mode_coo=MED_FULL_INTERLACE;
+  
+   /* Allocations memoires */
+   /* table des coordonnees profil : (dimension * nombre de noeuds ) */
+   med_float *coo=new med_float[nnoe*mdim];
+   /* table des numeros de familles des noeuds profil : (nombre de noeuds) */
+   med_int *famnodesskin=new med_int[nnoe];
+   med_int *pfltab=new med_int[1]; //inutilise car on lit tout 
+   //lecture des noeuds : coordonnees
+   ret=MEDcoordLire(fid,mymailw->nommaa,mdim,coo,
+                       mode_coo,MED_ALL,
+                       pfltab,0,&rep,mymailw->nomcoo,mymailw->unicoo);
+   if (ret < 0){
+      cerr<<"Problem reading nodes\n";
+      ret = MEDfermer(fid);
+      //return false;
+   }
+   ret=MEDfamLire(fid,mymailw->nommaa,famnodesskin,nnoe,MED_NOEUD,(med_geometrie_element) 0);
+   if (ret < 0){
+      cerr<<"Problem reading families of nodes\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (mymailw->verbose>9) {
+     cout<<"\nVertices: no x y z family\n";
+     for (i=0;i<nnoe*mdim;i=i+3) {
+      fprintf(stdout,"%5d %13.5e %13.5e %13.5e %5d \n",
+          (i/3+1), coo[i], coo[i+1], coo[i+2], famnodesskin[i/3]);
+     } 
+     cout<<endl;
+   }
+
+   med_int *conn2=new med_int[nbseg2*2];
+   ret=MEDconnLire(fid,mymailw->nommaa,mdim,conn2,mode_coo,
+                       pfltab,0,MED_MAILLE,MED_SEG2,MED_NOD);
+   if (ret < 0){
+      cerr<<"Problem reading MED_SEG2\n";
+      ret = MEDfermer(fid);
+      //return false;
+   }
+   med_int *famseg2skin=new med_int[nbseg2];
+   ret=MEDfamLire(fid,mymailw->nommaa,famseg2skin,nbseg2,MED_MAILLE,MED_SEG2);
+   if (ret < 0){
+      cerr<<"Problem reading families of MED_SEG2\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (mymailw->verbose>9) {
+     cout<<"\nConnectivity MED_SEG2: no node1 node2 family\n";
+     for (i=0;i<nbseg2*2;i=i+2) {
+      fprintf(stdout,"%5d %5d %5d %5d \n",
+          (i/2+1), conn2[i], conn2[i+1], famseg2skin[i/2]);
+     } 
+     cout<<endl;
+   }
+
+   med_int *conn3=new med_int[nbtria3*3];
+   ret=MEDconnLire(fid,mymailw->nommaa,mdim,conn3,mode_coo,
+                       pfltab,0,MED_MAILLE,MED_TRIA3,MED_NOD);
+   if (ret < 0){
+      cerr<<"Problem reading MED_TRIA3\n";
+      ret = MEDfermer(fid);
+      //return false;
+   }
+   med_int *famtria3skin=new med_int[nbtria3];
+   ret=MEDfamLire(fid,mymailw->nommaa,famtria3skin,nbtria3,MED_MAILLE,MED_TRIA3);
+   if (ret < 0){
+      cerr<<"Problem reading families of MED_TRIA3\n";
+      ret = MEDfermer(fid);
+      return false;
+   }
+   if (mymailw->verbose>9) {
+     cout<<"\nConnectivity MED_TRIA3: no node1 node2 node3 family\n";
+     for (i=0;i<nbtria3*3;i=i+3) {
+      fprintf(stdout,"%5d %5d %5d %5d %5d \n",
+          (i/3+1), conn3[i], conn3[i+1], conn3[i+2], famtria3skin[i/3]);
+     } 
+     cout<<endl;
+   }
+
+  /*liberation memoire?
+  delete[] coo;
+  delete[] nomnoe;
+  delete[] numnoe;
+  delete[] nufano;*/
+
+  if (ifamdelete>0) {
+   //cout<<"!!!!!!!!nodes "<<famnodesskin[0]<<" "<<nnoe<<famdelete[1]<<endl;
+   for (i=0;i<nnoe;i++) {
+    for (j=0;j<ifamdelete;j++) {
+      if (famnodesskin[i]==famdelete[j]) {
+       //cout<<"nodes "<<famnodesskin[i]<<" "<<i<<" "<<famdelete[j]<<endl;
+       famnodesskin[i]=0; }
+    }
+   }
+   for (i=0;i<nbseg2;i++) {
+    for (j=0;j<ifamdelete;j++) {
+      if (famseg2skin[i]==famdelete[j]) famseg2skin[i]=0;
+    }
+   }
+   for (i=0;i<nbtria3;i++) {
+    for (j=0;j<ifamdelete;j++) {
+      if (famtria3skin[i]==famdelete[j]) famtria3skin[i]=0;
+    }
+   }
+  }
+   //stocks data for future use 
+   CVWtab *montab;
+   bool ok;
+
+   montab=new CVWtab(nnoe*mdim,coo);
+   tmp="SKIN_VERTICES_COORDINATES";
+   ok=mymailw->insert_key(tmp,montab);
+
+   montab=new CVWtab(nnoe,famnodesskin);
+   tmp="SKIN_VERTICES_FAMILIES";
+   ok=mymailw->insert_key(tmp,montab);
+   
+   montab=new CVWtab(nbseg2*2,conn2);
+   tmp="SKIN_SEG2_CONNECTIVITIES";
+   ok=mymailw->insert_key(tmp,montab);
+
+   montab=new CVWtab(nbtria3,famseg2skin);
+   tmp="SKIN_SEG2_FAMILIES";
+   ok=mymailw->insert_key(tmp,montab);
+
+   montab=new CVWtab(nbtria3*3,conn3);
+   tmp="SKIN_TRIA3_CONNECTIVITIES";
+   ok=mymailw->insert_key(tmp,montab);
+
+   montab=new CVWtab(nbtria3,famtria3skin);
+   tmp="SKIN_TRIA3_FAMILIES";
+   ok=mymailw->insert_key(tmp,montab);
+
+   //if (mymailw->verbose>6) ok=mymailw->list_keys_mesh_wrap();
+
+   ret = MEDfermer(fid);
+   if (ret < 0){
+      cerr<<"Problem closing "<<nomfilemed.toLatin1().constData()<<"\n";
+      return false;
+   }
+   return true;
+}
+
+/*
+//************************************
+string char2string(char *d, int lg)
+{
+   string fin;
+   for (int i=0;i<lg-1;i++){
+       fin=fin+d[i];
+   }
+   return fin;
+}
+
+//************************************
+bool string2int(const string &s, int *v)
+//string s=argv[1] ; int ii;
+//ok=string2int(s,&ii);
+//cout<<"test "<<ii<<" "<<ok<<endl;
+{
+   string splus=s + " -1"; //evite conversion ok sur "+9truc" qui passe sinon
+   istringstream ss(splus);
+   int v2;
+   if (ss >> *v >> v2) return true; else {*v=0 ;return false;}
+}
+
+//************************************
+bool string2float(const string &s, float *v)
+//float ff;
+//ok=string2float(s,&ff);
+//cout<<"test3 "<<ff<<" "<<ok<<endl;
+{
+   string splus=s + " -1"; //evite conversion ok sur "+9truc" qui passe sinon
+   istringstream ss(splus);
+   float v2;
+   if (ss >> *v >> v2) return true; else {*v=0. ;return false;}
+}
+
+//************************************
+string int2string(const int &v)
+{
+   ostringstream ss;
+   ss<<v;
+   return ss.str();
+}
+
+//************************************
+string float2string(const float &v)
+{
+   ostringstream ss;
+   ss<<v;
+   return ss.str();
+}
+*/
+
+//************************************
+int main(int argc, char *argv[])
+{
+   bool ok;
+   int i,nb,nbfiles,limit_swap,nbelem_limit_swap,limit_swap_defaut,verbose;
+   QString path,pathini,casename,casenamemed,fileskinmed,
+           tmp,cmd,format,
+           test,menu,launchtepal,background,meshholes,deletegroups,
+           version="V1.4";
+   
+   char *chelp=NULL,
+        *ccasename=NULL,
+        *cnumber=NULL,
+        *cmedname=NULL,
+        *climitswap=NULL,
+        *cverbose=NULL,
+        *ctest=NULL,
+        *cmenu=NULL,
+        *claunchtepal=NULL,
+        *cbackground=NULL,
+        *cmeshholes=NULL,
+        *cdeletegroups=NULL;
+
+   for (i = 0; i < argc; i++){
+      if (!strncmp (argv[i], "--help", sizeof ("--help"))) chelp = &(argv[i][0]);
+      else if (!strncmp (argv[i], "--casename=", sizeof ("--casename"))) ccasename = &(argv[i][sizeof ("--casename")]);
+      else if (!strncmp (argv[i], "--number=", sizeof ("--number"))) cnumber = &(argv[i][sizeof ("--number")]);
+      else if (!strncmp (argv[i], "--medname=", sizeof ("--medname"))) cmedname = &(argv[i][sizeof ("--medname")]);
+      else if (!strncmp (argv[i], "--limitswap=", sizeof ("--limitswap"))) climitswap = &(argv[i][sizeof ("--limitswap")]);
+      else if (!strncmp (argv[i], "--verbose=", sizeof ("--verbose"))) cverbose = &(argv[i][sizeof ("--verbose")]);
+      else if (!strncmp (argv[i], "--test=", sizeof ("--test"))) ctest = &(argv[i][sizeof ("--test")]);
+      else if (!strncmp (argv[i], "--menu=", sizeof ("--menu"))) cmenu = &(argv[i][sizeof ("--menu")]);
+      else if (!strncmp (argv[i], "--launchtepal=", sizeof ("--launchtepal"))) claunchtepal = &(argv[i][sizeof ("--launchtepal")]);
+      else if (!strncmp (argv[i], "--background=", sizeof ("--background"))) cbackground = &(argv[i][sizeof ("--background")]);
+      else if (!strncmp (argv[i], "--meshholes=", sizeof ("--meshholes"))) cmeshholes = &(argv[i][sizeof ("--meshholes")]);
+      else if (!strncmp (argv[i], "--deletegroups=", sizeof ("--deletegroups"))) cdeletegroups = &(argv[i][sizeof ("--deletegroups")]);
+      }
+
+   if (argc < 2 || chelp){
+      cout<<"Available options:\n"
+      "   --help         : produces this help message\n"<<
+      "   --casename     : path and name of input tepal2med files which are\n"<<
+      "                       - output files of tepal .msg .noboite .faces .points .glo\n"<<
+      "                       - output file of GHS3DPRL_Plugin casename_skin.med (optional)\n"<<
+      "                         with initial skin and its initial groups\n"<<
+      "   --number       : number of partitions\n"<<
+      "   --medname      : path and name of output MED files\n"<<
+      "   --limitswap    : max size of working cpu memory (Mo) (before swapping on .temp files)\n"<<
+      "   --verbose      : trace of execution (0->6)\n"<<
+      "   --test         : more tests about joints, before generation of output files\n"<<
+      "   --menu         : a GUI menu for option number\n"<<
+      "   --launchtepal  : also launch tepal on files casename.faces and casename.points and option number\n"<<
+      "   --background   : force background mode from launch tepal and generation of final MED files (big meshes)\n"<<
+      "   --meshholes    : force parameter component of tetmesh-ghs3d to mesh holes\n"<<
+      "   --deletegroups : regular expression (see QRegExp) which matches unwanted groups in final MED files\n"<<
+      "                    (try --deletegroups=\"(\\bAll_Nodes|\\bAll_Faces)\"\n"<<
+      "                    (try --deletegroups=\"((\\bAll_|\\bNew_)(N|F|T))\"\n";
+      cout<<"example:\n"<<
+            "   tepal2med --casename=/tmp/GHS3DPRL --number=2 --medname=DOMAIN\n"<<
+            "             --limitswap=1000 --verbose=0 --test=yes --menu=no --launchtepal=no\n\n";
+      return 1;  //no output files
+   }
+   
+   if (!ccasename){
+      cerr<<"--casename: a path/name is expected\n\n";
+      return 1;
+   }
+   casename=ccasename;
+   if (!cnumber){
+      cerr<<"--number: an integer is expected\n\n";
       return 1;
    }
-   casename=argv[1];
-   tmp=argv[2];
+   tmp=cnumber;
    nbfiles=tmp.toLong(&ok,10);
-   if (!ok)
-   {
-      cerr<<"NumberOfFiles: an integer is expected\n\n";
+   if (!ok){
+      cerr<<"--number: an integer is expected\n\n";
       return 1;
    }
-   if (nbfiles<=0)
-   {
-      cerr<<"NumberOfFiles: a positive integer is expected\n\n";
+   if (nbfiles<=0){
+      cerr<<"--number: 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";
+   if (nbfiles>2048){ //delirium in 2008
+      cerr<<"--number: a positive integer <= 2048 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";
+   if (!cmedname) cmedname=ccasename;
+   casenamemed=cmedname;
+   limit_swap_defaut=1000; //1000Mo
+   limit_swap=limit_swap_defaut;
+   if (climitswap){
+      tmp=climitswap;
+      limit_swap=tmp.toLong(&ok,10);
+      if (!ok){
+         cerr<<"--limitswap: an integer is expected. try 1000\n\n";
          return 1;
       }
-      if (nbelem_limit_swap<=0)
-      {
-         cerr<<"LimitSwap: a positive integer is expected\n\n";
+      if (limit_swap<1 || limit_swap>32000){
+         cerr<<"--limitswap: [1->32000] expected. try 1000\n\n";
          return 1;
       }
    }
+   //default 1GOctet/8(for float)
+   nbelem_limit_swap=limit_swap*1000000; //100%
+   CVWtab::memorymax=nbelem_limit_swap;
 
    verbose=1; //default
-   if (argc > 4)
-   {
-      tmp=argv[4];
+   if (cverbose){
+      tmp=cverbose;
       verbose=tmp.toLong(&ok,10);
-      if (!ok)
-      {
-         cerr<<"Verbose: an integer is expected\n\n";
+      if (!ok){
+         cerr<<"--verbose: an integer is expected\n\n";
          return 1;
       }
-      if (verbose<0)
-      {
-         cerr<<"Verbose: a positive integer is expected\n\n";
+      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;
+   test="no"; //default
+   if (ctest){
+      tmp=ctest;
+      if (tmp=="yes") test="yes";
    }
 
-   is_menu=FALSE; //default
-   if (argc > 6)
-   {
-      tmp=argv[6];
-      if (tmp=="Menu") is_menu=TRUE;
+   menu="no"; //default
+   if (cmenu){
+      tmp=cmenu;
+      if (tmp=="yes") menu="yes";
    }
 
-   is_launchtepal=FALSE; //default
-   if (argc > 7)
-   {
-      tmp=argv[7];
-      if (tmp=="LaunchTepal") is_launchtepal=TRUE;
+   launchtepal="no"; //default
+   if (claunchtepal){
+      tmp=claunchtepal;
+      if (tmp=="yes") launchtepal="yes";
    }
-
-   casenamemed=casename;
-   if (argc > 8)
-   {
-      casenamemed=argv[8];
+   
+   background="no"; //default
+   if (cbackground){
+      tmp=cbackground;
+      if (tmp=="yes") background="yes";
+   }
+   
+   meshholes="no"; //default
+   if (cmeshholes){
+      tmp=cmeshholes;
+      if (tmp=="yes") meshholes="yes";
    }
 
+   
    // 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 (menu=="yes") {
+    QApplication a(argc,argv);
+    dlg_ghs3dmain *m = new dlg_ghs3dmain();
+    m->setWindowTitle("tepal2med 2.1");
+    m->show();
+    a.exec();
+    if ( m->result() == QDialog::Accepted ) {
+      cout<<"parameters "<<m->KeepFiles()<<" "<<m->NbPart()<<endl;
+      nbfiles=m->NbPart();
+    }
+    else {
+      return 1;
+    }
+    delete m;
+   }
+
+   int n=casenamemed.count('/');
    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=casenamemed.section('/',-1);
+   if (casenamemed.length()>20){
+      cerr<<"--medname truncated (no more 20 characters)"<<endl;
       casenamemed.truncate(20);
    }
 
+   n=casename.count('/');
+   if (n>0)
+      pathini=casename.section('/',-n-1,-2)+"/";
+   else
+      pathini="./";
+      casename=casename.section('/',-1);
+   if (casename.length()>20){
+      cerr<<"--casename truncated (no more 20 characters)"<<endl;
+      casename.truncate(20);
+   }
+
    /*cout<<"CaseNameMed="<<casenamemed<<endl;
    cout<<"PathMed="<<path<<endl;*/
 
+   deletegroups="(\\bxyz)"; //default improbable name
+   if (cdeletegroups){
+      deletegroups=cdeletegroups;
+   }
+   
    //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";
+   cout<<"tepal2med "<<version.toLatin1().constData()<<" parameters:"<<
+         "\n   --casename="<<pathini.toLatin1().constData()<<casename.toLatin1().constData()<<
+         "\n   --number="<<nbfiles<<
+         "\n   --medname="<<path.toLatin1().constData()<<casenamemed.toLatin1().constData()<<
+         "\n   --limitswap="<<limit_swap<<
+         "\n   --verbose="<<verbose<<
+         "\n   --test="<<test.toLatin1().constData()<<
+         "\n   --menu="<<menu.toLatin1().constData()<<
+         "\n   --launchtepal="<<launchtepal.toLatin1().constData()<<
+         "\n   --background="<<background.toLatin1().constData()<<
+         "\n   --meshholes="<<meshholes.toLatin1().constData()<<
+         "\n   --deletegroups=\""<<deletegroups.toLatin1().constData()<<"\"\n";
+   
+   //med_idt fid=MEDouvrir("/tmp/empty.med",MED_CREATION);
+   //med_err ret=MEDfermer(fid);
+   //system("sleep 30");
+   //return 0; //ok
+   
+   //utile si appel par plugin ghs3dprl sur big meshes et tepal sur plusieurs jours
+   if (background=="yes"){
+      pid_t pid = fork();
+      if (pid > 0) {
+         //Process father
+         exit(0); //temporary ok for plugin
+      }
+      //process children
+      //On rend le fils independant de tout terminal
+      //from here everything in background: tepal AND generation of final MED files
+      setsid();
+      system("sleep 10");  //for debug
+   }
 
    //"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
+   if (launchtepal=="yes"){
+      //tepal64.exe  -f /home/wambeke/tmp/GHS3DPRL -n 5 --tetmesh_args  "-c 0" 
+      //cmd="tepal --tetmesh_args \"-c 0\" -f "+pathini+casename+" -n "+cmd.sprintf("%d",nbfiles)+" > "+path+"tepal.log";
+      cmd="tepal -f "+pathini+casename+" -n "+cmd.sprintf("%d",nbfiles);
+      if (meshholes=="yes") cmd=cmd+" --tetmesh_args \"-c 0\"";
+      cmd=cmd+" > "+path+"tepal.log";
+      cout<<"\nlaunchtepal command: background="<<cbackground<<
+            "\n      "<<cmd.toLatin1().constData()<<endl;
+      system(cmd.toLatin1().constData()); // run
+      //sometimes it is better to wait flushing files on slow filesystem...
+      system("sleep 3");
    }
-
    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->nbfilestot=nbfiles;
+   //for huge cases big array swap in huge binary files
+   mymailw->nbelem_limit_swap=nbelem_limit_swap;
    mymailw->verbose=verbose;
-   mymailw->casename=casenamemed;
+   mymailw->casename=casename;
+   mymailw->medname=casenamemed;
    mymailw->path=path;
-
+   mymailw->pathini=pathini;
+   mymailw->deletegroups=QRegExp(deletegroups,Qt::CaseSensitive,QRegExp::RegExp);
    ghs3dprl_msg_parser handler;
    //constructor later maybe
-   //handler.verbose=TRUE;
+   //handler.verbose=true;
    handler.mailw=mymailw;
-
-   QXmlSimpleReader reader;
-   reader.setContentHandler(&handler);
+   mymailw->families.no=1;
+   //cout<<"coucou1 "<<mymailw->families.no<<endl;
+   //mymailw->families.add(casename,casenamemed);
    format=format.sprintf("%d",nbfiles);
    int nbf=format.length();
    format=format.sprintf(".%%.%dd.%%.%dd",nbf,nbf);
+   mymailw->format=format;
+   
+   //something like "/home/wambeke/tmp/GHS3DPRL_skin.med"
+   fileskinmed=pathini+casename+"_skin.med";
+   //fileskinmed="/home/wambeke/tmp/GHS3DPRL_skin.med";
+   /*for debug
+   {
+   char ctmp[fileskinmed.length()+1] ; strcpy(ctmp,fileskinmed);
+   int res=dumpMED(&ctmp[0],1);
+   }*/
+   ok=ReadFileMED(fileskinmed,mymailw);
+
+//if test read all files before (only small files)
+ if (test=="yes"){
+   if (verbose>0) cout<<"\nReading output files of tepal as input files of tepal2med...\n";
+   
+   //read files .msg
+   //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=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfiles,i)+".msg";
+      if (verbose>0) cout<<"FileName="<<tmp.toLatin1().constData()<<endl;
+      ok=mymailw->ReadFileMSGnew(tmp);
+   }
+   if (verbose>0)
+      cout<<"NumberOfFilesMSGacquired="<<mymailw->nbfiles<<"\n\n";
+   if (mymailw->nbfiles != nbfiles){
+      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n\n";
+      return 1;
+   }
+
+   /*old version with xml parser too slow
+   QXmlSimpleReader reader;
+   reader.setContentHandler(&handler);
    //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";
+      tmp=pathini+casename+tmp.sprintf(format,nbfiles,i)+".msg";
       if (verbose>0) cout<<"FileName="<<tmp<<endl;
       QFile File(tmp);
       QXmlInputSource source(&File);
@@ -200,25 +849,22 @@ int main(int argc, char **argv)
    }
    if (verbose>0)
       cout<<"NumberOfFilesMSGAcquired="<<mymailw->nbfiles<<"\n";
-   if (mymailw->nbfiles != nbfiles)
-   {
-      cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n";
+   if (mymailw->nbfiles != nbfiles){
+      cerr<<"Problem NumberOfFiles != NumberOfFilesAcquired\n";
       return 1;
    }
 
-   if (is_test)
-   {
+   if (test=="yes"){
       ok=mymailw->test_msg_wrap();
-      if (ok)
-      {
+      if (ok){
          if (verbose>0) cout<<"\nResult_test_msg_wrap=ok\n\n";
       }
-      else
-      {
+      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>
@@ -226,11 +872,11 @@ int main(int argc, char **argv)
    //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));
+   //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));
+   nb=0;
+   nb=mymailw->remove_key_mesh_wrap(QRegExp("RE",Qt::CaseSensitive,QRegExp::RegExp));
    if (verbose>3) cout<<"NumberOfKeysRemoved="<<nb<<endl;
    if (verbose>3) ok=mymailw->list_keys_mesh_wrap();
 
@@ -241,60 +887,52 @@ int main(int argc, char **argv)
    //read files .noboite
    //supposed big files
    mymailw->nbfiles=0;
-   for (int i=1; i<=nbfiles; i++)
-   {
+   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;
+      tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfiles,i)+".noboite";
+      if (verbose>0) cout<<"FileName="<<tmp.toLatin1().constData()<<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)
-   {
+   if (mymailw->nbfiles != nbfiles){
       cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n";
       return 1;
    }
 
-   if (is_test)
-   {
+   //if (test=="yes"){
       ok=mymailw->test_vertices_wrap();
-      if (ok)
-      {
+      if (ok){
          if (verbose>0) cout<<"\nResult_test_vertices_wrap=ok\n\n";
       }
-      else
-      {
+      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++)
-   {
+   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;
+      tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfiles,i)+".faces";
+      if (verbose>0) cout<<"FileName="<<tmp.toLatin1().constData()<<endl;
       ok=mymailw->ReadFileFACES(tmp);
    }
    if (verbose>0)
       cout<<"NumberOfFilesFACESAcquired="<<mymailw->nbfiles<<"\n\n";
-   if (mymailw->nbfiles != nbfiles)
-   {
+   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++)
-   {
+   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;
+      tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfiles,i)+".points";
+      if (verbose>0) cout<<"FileName="<<tmp.toLatin1().constData()<<endl;
       ok=mymailw->ReadFilePOINTS(tmp);
    }
    if (verbose>0)
@@ -304,22 +942,21 @@ int main(int argc, char **argv)
       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++)
-   {
+   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;
+      tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfiles,i)+".glo";
+      if (verbose>0) cout<<"FileName="<<tmp.toLatin1().constData()<<endl;
       ok=mymailw->ReadFileGLO(tmp);
-      //mymailw->SwapOutOfMemory_key_mesh_wrap(QRegExp("GL",TRUE,FALSE));
+      //mymailw->SwapOutOfMemory_key_mesh_wrap(QRegExp("GL",true,false));
    }
    if (verbose>0)
       cout<<"NumberOfFilesGLOAcquired="<<mymailw->nbfiles<<"\n\n";
-   if (mymailw->nbfiles != nbfiles)
-   {
+   if (mymailw->nbfiles != nbfiles){
       cerr<<"NumberOfFiles != NumberOfFilesAcquired is unexpected\n\n";
       return 1;
    }
@@ -339,16 +976,22 @@ int main(int argc, char **argv)
    ok=mymailw->list_onekey_mesh_wrap(tmp);*/
 
    //test remove points (type 3)
-   //nb=mymailw->remove_key_mesh_wrap(QRegExp("PO",TRUE,FALSE));
+   //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));
+   ok=mymailw->Find_VerticesDomainToVerticesSkin();
+ }  //end if test
+   ok=mymailw->Write_MEDfiles_v2(true); //deletekeys=true
+   
    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;
+   if (verbose>3)cout<<"***remove_all_key_mesh_wrap*** "<<nb<<" keys removed\n";
+   if (verbose>0)cout<<endl<<"===end of "<<argv[0]<<"==="<<endl;
+
+   //for debug
+   //int res=dumpMED("/home/wambeke/tmp/DOMAIN_1.med",1);
+
    return 0; //ok
 }