From a96fa0ccff17bf3d6948df3b3529c315515e951c Mon Sep 17 00:00:00 2001 From: secher Date: Mon, 22 Jan 2007 08:18:46 +0000 Subject: [PATCH] Imported using TkCVS --- FILTER_version.h.in | 34 ++ INSTALL | 1 + LICENCE | 504 ++++++++++++++++++++ Makefile.in | 136 ++++++ README | 174 +++++++ adm_local/Makefile.in | 59 +++ adm_local/unix/config_files/README | 3 + adm_local/unix/config_files/check_Med.m4 | 54 +++ adm_local/unix/config_files/check_Med2.m4 | 191 ++++++++ adm_local/unix/config_files/with_Kernel.m4 | 27 ++ adm_local/unix/make_commence.in | 313 +++++++++++++ adm_local/unix/make_conclude.in | 399 ++++++++++++++++ adm_local/unix/make_omniorb.in | 53 +++ bin/VERSION.in | 1 + build_configure | 235 ++++++++++ configure.in.base | 428 +++++++++++++++++ envFILTERsrc.sh | 3 + idl/FILTER_Gen.idl | 77 ++++ idl/Makefile.in | 86 ++++ resources/Data.png | Bin 0 -> 1605 bytes resources/FILTER.config | 1 + resources/FILTERCatalog.xml.in | 37 ++ resources/FILTER_en.xml | 46 ++ resources/Infos.png | Bin 0 -> 1836 bytes resources/ModuleFilter.png | Bin 0 -> 831 bytes resources/SalomeApp.xml | 11 + resources/Structure.png | Bin 0 -> 1704 bytes resources/config | 1 + src/FILTER/Filter_Gen_i.cxx | 96 ++++ src/FILTER/Filter_Gen_i.hxx | 66 +++ src/FILTER/Makefile.in | 65 +++ src/FILTERGUI/FILTER_images.po | 44 ++ src/FILTERGUI/FILTER_msg_en.po | 155 +++++++ src/FILTERGUI/FILTER_msg_fr.po | 34 ++ src/FILTERGUI/FilterGUI.cxx | 381 +++++++++++++++ src/FILTERGUI/FilterGUI.h | 61 +++ src/FILTERGUI/FilterGUI_Selection.cxx | 39 ++ src/FILTERGUI/FilterGUI_Selection.h | 41 ++ src/FILTERGUI/Makefile.in | 63 +++ src/FILTERGUI/SelectField.cxx | 158 +++++++ src/FILTERGUI/SelectField.h | 70 +++ src/FILTERGUI/SelectParams.cxx | 512 +++++++++++++++++++++ src/FILTERGUI/SelectParams.h | 92 ++++ src/Makefile.in | 39 ++ 44 files changed, 4790 insertions(+) create mode 100644 FILTER_version.h.in create mode 100644 INSTALL create mode 100644 LICENCE create mode 100644 Makefile.in create mode 100644 README create mode 100644 adm_local/Makefile.in create mode 100644 adm_local/unix/config_files/README create mode 100644 adm_local/unix/config_files/check_Med.m4 create mode 100644 adm_local/unix/config_files/check_Med2.m4 create mode 100644 adm_local/unix/config_files/with_Kernel.m4 create mode 100644 adm_local/unix/make_commence.in create mode 100644 adm_local/unix/make_conclude.in create mode 100644 adm_local/unix/make_omniorb.in create mode 100755 bin/VERSION.in create mode 100755 build_configure create mode 100644 configure.in.base create mode 100644 envFILTERsrc.sh create mode 100644 idl/FILTER_Gen.idl create mode 100644 idl/Makefile.in create mode 100644 resources/Data.png create mode 100644 resources/FILTER.config create mode 100644 resources/FILTERCatalog.xml.in create mode 100644 resources/FILTER_en.xml create mode 100644 resources/Infos.png create mode 100644 resources/ModuleFilter.png create mode 100644 resources/SalomeApp.xml create mode 100644 resources/Structure.png create mode 100644 resources/config create mode 100755 src/FILTER/Filter_Gen_i.cxx create mode 100644 src/FILTER/Filter_Gen_i.hxx create mode 100644 src/FILTER/Makefile.in create mode 100644 src/FILTERGUI/FILTER_images.po create mode 100644 src/FILTERGUI/FILTER_msg_en.po create mode 100644 src/FILTERGUI/FILTER_msg_fr.po create mode 100644 src/FILTERGUI/FilterGUI.cxx create mode 100644 src/FILTERGUI/FilterGUI.h create mode 100644 src/FILTERGUI/FilterGUI_Selection.cxx create mode 100644 src/FILTERGUI/FilterGUI_Selection.h create mode 100644 src/FILTERGUI/Makefile.in create mode 100644 src/FILTERGUI/SelectField.cxx create mode 100644 src/FILTERGUI/SelectField.h create mode 100644 src/FILTERGUI/SelectParams.cxx create mode 100644 src/FILTERGUI/SelectParams.h create mode 100644 src/Makefile.in diff --git a/FILTER_version.h.in b/FILTER_version.h.in new file mode 100644 index 0000000..f2f50f5 --- /dev/null +++ b/FILTER_version.h.in @@ -0,0 +1,34 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : FILTER_version.h +// Author : Bernard SECHER +// Module : SALOME + +#if !defined(__FILTER_VERSION_H__) +#define __FILTER_VERSION_H__ + +/* + FILTER_VERSION is (major << 16) + (minor << 8) + patch. +*/ + +#define FILTER_VERSION_STR "@VERSION@" +#define FILTER_VERSION @XVERSION@ + +#endif // __FILTER_VERSION_H__ diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..b27f0b0 --- /dev/null +++ b/INSTALL @@ -0,0 +1 @@ +SALOME2 : FILTER module diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..b1e3f5a --- /dev/null +++ b/LICENCE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 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. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, 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 library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete 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 distribute a copy of this License along with the +Library. + + 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 Library or any portion +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +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 Library, 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 Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you 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. + + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be 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. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + + 9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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 with +this License. + + 11. 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 Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library 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 Library. + +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. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +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 Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. 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 LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. 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. + + + Copyright (C) + + 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, or (at your option) any later version. + + 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 + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..f775db4 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,136 @@ +# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG +# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT +# 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 +# +# -* Makefile *- +# +# Author : Patrick GOLDBRONN (CEA) +# Date : 28/06/2001 +# $Header$ +# + +# source path +top_srcdir=@top_srcdir@ +top_builddir=. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:./resources:@top_srcdir@/resources:./bin:@top_srcdir@/idl:${KERNEL_ROOT_DIR}/idl/salome + + +@COMMENCE@ + +SUBDIRS = src idl adm_local + +RESOURCES_FILES = \ +FILTERCatalog.xml \ +FILTER_en.xml \ +FILTER.config \ +SalomeApp.xml \ +Data.png \ +Infos.png \ +Structure.png \ +ModuleFilter.png + +BIN_SCRIPT= \ +VERSION + +LDFLAGS= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome +LDFLAGSFORBIN= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome + +# copy header files in common directory +include_list = include/salome/SALOMEconfig.h \ + include/salome/FILTER_version.h + +ifeq ($(HAVE_SSTREAM),no) + include_list+=include/salome/sstream +endif + +inc: idl $(include_list) + +bin: bin/salome/VERSION + +bin/salome/VERSION : bin/VERSION + -$(RM) $@ + $(LN_S) ../../$< $@ + +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) ../../$< $@ + +include/salome/FILTER_version.h: FILTER_version.h + -$(RM) $@ + $(LN_S) ../../$< $@ + +depend: depend_idl + +depend_idl: + (cd idl ; $(MAKE) $@) || exit 1 + +# doc is already build : if you want to had documents, go manually to doc and run 'make doc' +#doc: +# (cd doc && $(MAKE) $@) || exit 1 + +install-end: +# finish libtool install +# @$(LT) --mode=finish $(libdir) + +install-include: $(include_list) + $(INSTALL) -d $(includedir) + @for f in X $(include_list); do \ + if test $$f != X; then \ + (cp -p $$f $(includedir) || exit 1); \ + fi; \ + done + +# install script in $(bindir) : +install-bin: $(BIN_SCRIPT) + $(INSTALL) -d $(bindir) + for f in X $(BIN_SCRIPT); do \ + if test $$f != X; then \ + (cp -p -f ./bin/salome/$$f $(bindir) || exit 1); \ + fi; \ + done + +uninstall: uninstall-idl + +uninstall-idl: + $(RM) $(idldir)/*.idl + +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 install-include install-end + diff --git a/README b/README new file mode 100644 index 0000000..1e366e4 --- /dev/null +++ b/README @@ -0,0 +1,174 @@ +This is the Med Memory package V3.2.0 + +I : Major evolution of the Med Memory package between V2.2.x and V3.2.x : +========================================================================= + +The Med Memory may be used as a stand alone package with only the C++ and the +python layers (adding --without-kernel at the configure step). In this case +there are no links with the SALOME KERNEL. + +In this version, + +- mesh defined with polygones/polyhedra mixed with usual types of cells; + +- the Med File drivers of the Med Memory support the V2.1 as well as the + V2.2 versions of the Med File layer. The requirement of the Salome platform + is only Med File V2.2, the V2.1 version is emberked in the Med Memory. + +- Using the Med file (V2.1 and V2.2) and GIBI drivers; fields laying on a + partial support; + +- Fields defined on cells mesh with multiple gauss points, + +may be mounted in memory and treated. + +With all those new functionalities, most of the Med Memory client codes +based on previous releases of the Med Memory should work; but minor changes +should be done for the get/set field classes methods: + +- the getValue() and the setValue(T *) methods take no MED_EN::medModeSwitch + parameter; +- the getValueI (resp. setValueI) should be replaced by getRow(int ) + (resp. setRow(int ,T*) if the field is in full interlacing mode (using the + method getInterlacingType() of the classe FIELD_). If the field is stored in + no interlacing mode getValueIJ (resp. setValueIJ) should be replaced by + getColumn(int ) (resp. setColumn(int ,T*)). + +Intensive debugging was carried throughout the entire Med Memory C++ Layer: + + - especially on the major user's C++ classes (such as MED, MESH, + SUPPORT and FIELD); + + - the C++ drivers classes on those major classes. Especially the + Med File and the GIBI drivers are read/write ones. The VTK drivers + are only for the writing; and finally the PORFLOW drivers may only + be used for the MESH class in the reading mode. + +The Med Client layer of the Med Memory has been tested in a full +Server/Client configuration. + +II : MedMemory building and installation : +========================================= + +Assuming that the rather straightforward + +path_to_your_MedMemory_installation_directory, + +path_to_your_MedMemory_building_directory, + +path_to_your_MedMemory_sources_directory, + +path_to_your_MedFile_installation_directory, + +path_to_your_HDF5_installation_directory, + +directories are setted; the user/installer may use the following commands to +build the Med Memory installation as a Salome component : + +In the directory path_to_your_MedMemory_building_directory; + +path_to_your_MedMemory_sources_directory/build_configure + +path_to_your_MedMemory_sources_directory/configure --prefix=path_to_your_MedMemory_installation_directory + +make + +make install + +Eventually if the user/installer needs to build an installation of Med +Memory as a stand alone package, he/she may use always in the +path_to_your_MedMemory_building_directory, the following commands : + +path_to_your_MedMemory_sources_directory/build_configure --without-kernel + +path_to_your_MedMemory_sources_directory/configure --prefix=path_to_your_MedMemory_installation_directory + +make + +make install + +Remark : If the installer gets the sources archives from the NEPAL web site +-------- (CEA, EDF, OCC, ie hammi web site) the user may only use the + following commands : + + path_to_your_MedMemory_sources_directory/configure --prefix=path_to_your_MedMemory_installation_directory + + make + + make install + + +By default the full debug options are set: + - compilation using -g option + - Med Memory debugging information history using -D_DEBUG_ option. + +The user/installer may + +get all configure option with : + +path_to_your_MedMemory_sources_directory/configure --help + +set optimization option : + +path_to_your_MedMemory_sources_directory/configure --enable-production --disable-debug (use compiler flags -O) + +In order to avoid most of the problem the user/installer should first +check the $HDF5HOME and the $MED2HOME environment variables. In csh: + +setenv HDF5HOME path_to_your_HDF5_installation_directory + +setenv MED2HOME path_to_your_MedFile_installation_directory + +This version of Med Memory has been tested with Med File V2.2.2, V2.2.3, as +well as V2.3.0 but with the version of HDF5 V1.6.3. Thus, in the installation +process of Med File the user/installer should take care of the $HDF5HOME +environement variable. This warning is especially intended to the user of the +Med Memory in its stand alone vesion (ie without the SALOME KERNEL component). + +III : MedMemory testing : +========================= + +After installation of the Med Memory; the user/installer may find a large set +of Med File V2.1, V2.2, GIBI test files in the directory : + +path_to_your_MedMemory_installation_directory/share/salome/resources/ + +For user/installer of the Med Meory as a Salome component, sourcing the usual +Salome environement and using the usual runSalome command, all needed +environement variables (such as $MED_ROOT_DIR, $LD_LIBRARY_PATH and +$PYTHONPATH) are well setted. + +But for the user/installer of the Med Memory as a stand alone version should +set his/her environement. Assuming that $HDF5HOME $MED2HOME are setted +properly, in csh : + +setenv MED_ROOT_DIR path_to_your_MedMemory_installation_directory + +setenv PATH ${MED2HOME}/bin:${HDF5HOME}/bin:$PATH + +setenv LD_LIBRARY_PATH ${MED_ROOT_DIR}/lib/salome:${MED2HOME}/lib:${HDF5HOME}/lib:$LD_LIBRARY_PATH + +setenv PYTHONPATH ${MED_ROOT_DIR}/bin/salome:${MED_ROOT_DIR}/lib/salome:${MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome: + +To check the Med Memory installation, in the directory +path_to_your_MedMemory_installation_directory/bin/salome you may find a set of +python scripts and test executable. To ckeck the deep layers (C++, Python) of +the Med Memory, the installer may run: + +- testMedMemGeneral.py, +- medMeshing_test.py +- test_profil_MedFieldDriver.py +- testGaussLocalization.py +- med_field_anal.py +- test_MEDMEM_MeshingFlica +- test_MEDMEM_Meshing_poly +- test_MEDMEM_MeshingPoly + +To check the upper layer (CORBA, Client), the installer may run in the SALOME +Python consol: + + - Med_Gen_test.py + - medClient_test.py + - testMedAlliances1.py + - testMedAlliances.py + - testMeshAlliances.py diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in new file mode 100644 index 0000000..6c0326f --- /dev/null +++ b/adm_local/Makefile.in @@ -0,0 +1,59 @@ +# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG +# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT +# 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 +# +# source path +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:$(srcdir)/adm_local + + +all: resources + +install: + cp -rf @top_srcdir@/adm_local @prefix@ + +bin: + +resources : + cp -rf @top_srcdir@/adm_local $(top_builddir) + +inc: + +lib: + +depend: + +depend_idl: + +install-end: + +install-include: + +install-bin: + +uninstall: + +uninstall-idl: + +distclean: + +clean: + +distclean-other: + diff --git a/adm_local/unix/config_files/README b/adm_local/unix/config_files/README new file mode 100644 index 0000000..feb997b --- /dev/null +++ b/adm_local/unix/config_files/README @@ -0,0 +1,3 @@ +This file is only here for CVS: +CVS does not always create empty directory, and adm_local/unix/config_file +is needed by build_configure. diff --git a/adm_local/unix/config_files/check_Med.m4 b/adm_local/unix/config_files/check_Med.m4 new file mode 100644 index 0000000..b741c5b --- /dev/null +++ b/adm_local/unix/config_files/check_Med.m4 @@ -0,0 +1,54 @@ +# Check availability of Med binary distribution +# +# Author : Nicolas REJNERI (OPEN CASCADE, 2003) +# + +AC_DEFUN([CHECK_MED],[ +AC_REQUIRE([AC_LINKER_OPTIONS])dnl + +AC_CHECKING(for Med) + +Med_ok=no + +MED_LDFLAGS="" +MED_CXXFLAGS="" + +AC_ARG_WITH(med, + [ --with-med=DIR root directory path of MED installation ], + MED_DIR="$withval",MED_DIR="") + +if test "x${MED_DIR}" == "x" ; then + AC_MSG_RESULT(for \${MED_ROOT_DIR}: ${MED_ROOT_DIR}) +# no --with-med-dir option used + if test "x${MED_ROOT_DIR}" != "x" ; then + + # MED_ROOT_DIR environment variable defined + MED_DIR=${MED_ROOT_DIR} + + fi + +fi + +if test -f ${MED_DIR}/idl/salome/MED.idl ; then + AC_MSG_RESULT(Using Med module distribution in ${MED_DIR}) + Med_ok=yes + + if test "x$MED_ROOT_DIR" == "x" ; then + MED_ROOT_DIR=${MED_DIR} + fi + + AC_SUBST(MED_ROOT_DIR) + + MED_LDFLAGS=-L${MED_DIR}/lib${LIB_LOCATION_SUFFIX}/salome + MED_CXXFLAGS=-I${MED_DIR}/include/salome + + AC_SUBST(MED_LDFLAGS) + AC_SUBST(MED_CXXFLAGS) +else + AC_MSG_WARN("Cannot find Med module sources") +fi + +AC_MSG_RESULT(for Med: $Med_ok) + +])dnl + diff --git a/adm_local/unix/config_files/check_Med2.m4 b/adm_local/unix/config_files/check_Med2.m4 new file mode 100644 index 0000000..fded9b6 --- /dev/null +++ b/adm_local/unix/config_files/check_Med2.m4 @@ -0,0 +1,191 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_MED2],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([CHECK_HDF5])dnl + +AC_CHECKING(for MED2) + +AC_ARG_WITH(med2, + [ --with-med2=DIR root directory path to med2 installation ], + [MED2HOME="$withval" + AC_MSG_RESULT("select $withval as path to med2") + ]) + +AC_SUBST(MED2_INCLUDES) +AC_SUBST(MED2_LIBS) +AC_SUBST(MED2_MT_LIBS) + +MED2_INCLUDES="" +MED2_LIBS="" +MED2_MT_LIBS="" + +med2_ok=no + +LOCAL_INCLUDES="$HDF5_INCLUDES" +LOCAL_LIBS="-lmed $HDF5_LIBS" + +if test -z $MED2HOME +then + AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory) + AC_PATH_PROG(MDUMP, mdump) + if test "xMDUMP" != "x" ; then + MED2HOME=$MDUMP + MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + MED2HOME=`echo ${MED2HOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"` + fi +fi +if test ! -z $MED2HOME +then + LOCAL_INCLUDES="$LOCAL_INCLUDES -I$MED2HOME/include" + if test "x$MED2HOME" = "x/usr" + then + LOCAL_LIBS="-lmed $LOCAL_LIBS" + else + LOCAL_LIBS="-L$MED2HOME/lib $LOCAL_LIBS" + fi +fi + +dnl check med2 header + +f77int="F77INT32" +case $host_os in + irix5.* | irix6.* | osf4.* | osf5.* | linux* ) + + linux64="true" + expr "$host_os" : 'linux' >/dev/null && test ! x"$host_cpu" = x"x86_64" && linux64="false" + if test ! x"$linux64" = "xfalse" ; then + echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5 +echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6 + # Check whether --enable-int64 or --disable-int64 was given. +if test "${enable_int64+set}" = set; then + enableval="$enable_int64" + +fi; + case "X-$enable_int64" in + X-no) + echo "$as_me:$LINENO: result: \"disabled\"" >&5 +echo "${ECHO_T}\"disabled\"" >&6 + SUFFIXES="_32" + ;; + *) + echo "$as_me:$LINENO: result: \"enabled\"" >&5 +echo "${ECHO_T}\"enabled\"" >&6 + SUFFIXES="" + f77int="F77INT64" + ;; + esac + fi + ;; + *) + ;; +esac + +case $host_os in + linux*) + test x"$linux64" = x"true" && \ + MACHINE="PCLINUX64${SUFFIXES}" || \ + MACHINE=PCLINUX + ;; + hpux*) + MACHINE=HP9000 + ;; + aix4.*) + MACHINE=RS6000 + host_os_novers=aix4.x + ;; + irix5.*) + MACHINE="IRIX64${SUFFIXES}" + host_os_novers=irix5.x + ;; + irix6.*) + MACHINE="IRIX64${SUFFIXES}" + host_os_novers=irix6.x + ;; + osf4.*) + MACHINE="OSF1${SUFFIXES}" + host_os_novers=osf4.x + ;; + osf5.*) + MACHINE="OSF1${SUFFIXES}" + host_os_novers=osf5.x + ;; + solaris2.*) + MACHINE=SUN4SOL2 + host_os_novers=solaris2.x + ;; + uxpv*) + MACHINE=VPP5000 + ;; + *) + MACHINE= + host_os_novers=$host_os + ;; +esac + +CPPFLAGS_old="$CPPFLAGS" +dnl we must test system : linux = -DPCLINUX +dnl we must test system : Alpha-OSF = -DOSF1 +case $host_os in + linux*) + CPPFLAGS="$CPPFLAGS -D$MACHINE $LOCAL_INCLUDES" +dnl CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES" + ;; + osf*) + CPPFLAGS="$CPPFLAGS -DOSF1 $LOCAL_INCLUDES" + ;; +esac +AC_CHECK_HEADER(med.h,med2_ok=yes ,med2_ok=no) +CPPFLAGS="$CPPFLAGS_old" + +if test "x$med2_ok" = "xyes" +then + +dnl check med2 library + + LIBS_old="$LIBS" + LIBS="$LIBS $LOCAL_LIBS" + AC_CHECK_LIB(med,MEDouvrir,med2_ok=yes,med2_ok=no) + LIBS="$LIBS_old" + +fi + +if test "x$med2_ok" = "xyes" +then +case $host_os in + linux*) + MED2_INCLUDES="-D$MACHINE $LOCAL_INCLUDES" +dnl MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES" + ;; + osf*) + MED2_INCLUDES="-DOSF1 $LOCAL_INCLUDES" + ;; +esac + MED2_LIBS="$LOCAL_LIBS" + MED2_MT_LIBS="$LOCAL_LIBS" +fi + +AC_MSG_RESULT(for med2: $med2_ok) + +])dnl diff --git a/adm_local/unix/config_files/with_Kernel.m4 b/adm_local/unix/config_files/with_Kernel.m4 new file mode 100644 index 0000000..246e18f --- /dev/null +++ b/adm_local/unix/config_files/with_Kernel.m4 @@ -0,0 +1,27 @@ +# +# Check configure option --with-kernel=[yes|no|DIR] taking into account that +# MED_WITH_KERNEL may be already set during build_configure, +# Set MED_WITH_KERNEL to yes|no +# +# Author : Edawrd AGAPOV (OCC, 2005) +# + +AC_DEFUN([WITH_KERNEL],[ + +AC_ARG_WITH(kernel, + [ --with-kernel default=yes ], + withkernel="$withval",withkernel="${MED_WITH_KERNEL}") + +case $withkernel in + no) +# AC_MSG_RESULT(************************************************) +# AC_MSG_RESULT(******* WITHOUT KERNEL configuration *******) +# AC_MSG_RESULT(************************************************) + MED_WITH_KERNEL="no";; + *) + MED_WITH_KERNEL="yes" +esac + +AC_SUBST(MED_WITH_KERNEL) + +])dnl diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in new file mode 100644 index 0000000..43dfcdd --- /dev/null +++ b/adm_local/unix/make_commence.in @@ -0,0 +1,313 @@ +# common directories to put headerfiles +inc_builddir=$(top_builddir)/include/salome + +MODULE_NAME=@MODULE_NAME@ + +@SET_MAKE@ +SHELL=@SHELL@ + +# header missing + +HAVE_SSTREAM=@HAVE_SSTREAM@ + + +LIBS=@LIBS@ +LIBSFORBIN=@LIBS@ +LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome +LDFLAGSFORBIN=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome +# add libstdc++ to link c++ library with libtool ! +LDFLAGS+= @STDLIB@ +LDFLAGSFORBIN+= @STDLIB@ + +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@ +BOOST_LIBSUFFIX = @BOOST_LIBSUFFIX@ +BOOST_LIBS = @BOOST_LIBS@ + +# 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@ +# Changes from the SalomePro V1.2c +#PYTHON_SITE = @PYTHON_SITE@ +#PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@ +PYTHON_SITE = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages +PYTHON_SITE_INSTALL = $(prefix)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome + +# 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@ +CAS_KERNEL=@CAS_KERNEL@ +CAS_OCAF=@CAS_OCAF@ +CAS_VIEWER=@CAS_VIEWER@ +CAS_MODELER=@CAS_MODELER@ +CAS_DATAEXCHANGE=@CAS_DATAEXCHANGE@ +CAS_LDPATH=@CAS_LDPATH@ + +# CPPUNIT + +CPPUNIT_INCLUDES = @CPPUNIT_INCLUDES@ +CPPUNIT_LIBS = @CPPUNIT_LIBS@ + +# 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$(top_srcdir)/idl -I$(top_builddir)/salome/idl -I$(KERNEL_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$(top_srcdir)/idl -I$(top_builddir)/idl/salome -I$(KERNEL_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) + + # add corba libs when link salome application ! + #LDFLAGS+= $(CORBA_LIBS) + LIBS+=$(CORBA_LIBS) + +DOXYGEN = @DOXYGEN@ +DOXYGEN_WITH_PYTHON = @DOXYGEN_WITH_PYTHON@ +DOXYGEN_WITH_STL = @DOXYGEN_WITH_STL@ + +## 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@ + + KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@ + KERNEL_SITE_DIR=@KERNEL_SITE_DIR@ + + KERNEL_LDFLAGS=@KERNEL_LDFLAGS@ + KERNEL_CXXFLAGS=@KERNEL_CXXFLAGS@ + + GUI_ROOT_DIR=@GUI_ROOT_DIR@ + GUI_LDFLAGS=@GUI_LDFLAGS@ + GUI_CXXFLAGS=@GUI_CXXFLAGS@ + +MED_ROOT_DIR=@MED_ROOT_DIR@ +MED_LDFLAGS=@MED_LDFLAGS@ +MED_CXXFLAGS=@MED_CXXFLAGS@ + +## Installation points +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@exec_prefix@/bin/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 +incmakedir=${prefix}/salome_adm/unix + +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_conclude + +KERNEL_MAKE = +NOKERNEL_MAKE = + + LOCAL_MAKE += make_omniorb + + KERNEL_MAKE = make_module depend SALOMEconfig.h sstream + KERNEL_MAKE += F77config.h envScript + + NOKERNEL_MAKE = + +$(top_builddir)/config.status: $(top_srcdir)/configure \ + $(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \ + $(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in) \ + $(NOKERNEL_MAKE:%=$(top_srcdir)/adm_local_without_kernel/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_SRC = \ +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_qt.m4 + +ACLOCAL_GUI = \ +check_vtk.m4 check_opengl.m4 \ +check_GUI.m4 check_corba_in_GUI.m4 + +$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \ + $(ACLOCAL_GUI:%=@GUI_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 diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in new file mode 100644 index 0000000..1c6841e --- /dev/null +++ b/adm_local/unix/make_conclude.in @@ -0,0 +1,399 @@ +#======================================================================= +# This section of this makefile comes from the file +# 'adm/unix/make_conclude' which was generated with config.status +# from file adm/unix/make_conclude.in +#======================================================================= +# -* Makefile *- +# +# Authors : Patrick GOLDBRONN (CEA) - Marc Tajchman (CEA) +# Date : 6/07/2001 +# $Header$ +# + +# ORB Specifics rules +@CORBA@ + +# transform idl reference in appropriate obj file +LIB_CLIENT_SRC = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) +LIB_SERVER_SRC = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_CXX)) +LIB_MOC_SRC = $(LIB_MOC:%.h=%_moc.cxx) +LIB_SRC+=$(LIB_MOC_SRC) +LIB_SWIG_SRC = $(SWIG_DEF:%.i=%_wrap.cxx) +LIB_DEP= $(LIB_SRC) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(LIB_SWIG_SRC) + +LIB_CLIENT_OBJ = $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) +LIB_SERVER_OBJ = $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) + +# declare dependences between SWIG input files +$(LIB_SWIG_SRC): $(SWIG_DEP:%=$(inc_builddir)/%) + +# transform c file in appropriate libtool obj file (.c, .cc and .cxx) +LIB_OBJ_C = $(patsubst %.c, %.lo, $(filter %.c, $(LIB_SRC))) +LIB_OBJ_CC = $(patsubst %.cc, %.lo, $(filter %.cc, $(LIB_SRC))) +LIB_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(LIB_SRC))) +LIB_SWIG_OBJ = $(LIB_SWIG_SRC:%.cxx=%.lo) +LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC))) + +# all libtool obj file in library +LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F) + +# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la) +LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la, $(filter %.la, $(LIB))) +LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a, $(filter %.a, $(LIB))) + +ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),) +LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB))) +else +LIB_SWIG = +endif + +lib: $(LIB_BUILD) $(LIB_CLIENT_PY) +# we don't build static library ! + +$(LIB_BUILD): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.la: %.la + -$(RM) $@ + -$(RM) $(patsubst %.la, %.so, $@) + -$(RM) $(patsubst %.la, %.a, $@) + ln -sf $(CURDIR)/$< $@ || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \ + $(patsubst %.la, %.so, $@) || true + ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \ + $(patsubst %.la, %.so, $@).0 || true + + if test "X$(LIB_SWIG)" != X; then \ + ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/_$(LIB_SWIG) || true;\ + fi; + +$(LIB_BUILD_A): $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/%.a: %.a + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ || true + +$(LIB): $(LIB_OBJ) + @$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) + +# transform idl reference in appropriate obj file +BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX)) +BIN_SERVER_SRC = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_CXX)) +BIN_MOC_SRC = $(BIN_MOC:%.h=%_moc.cxx) +BIN_SRC+=$(BIN_MOC_SRC) +BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) + +BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ)) +BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ)) +# transform c file in appropriate libtool obj file (.c) +BIN_OBJ_C = $(patsubst %.c, %.o, $(filter %.c, $(BIN_SRC))) +# transform c++ file in appropriate libtool obj file (.cc and .cxx) +BIN_OBJ_CC = $(patsubst %.cc, %.o, $(filter %.cc, $(BIN_SRC))) +BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC))) +# all obj file in bin target +BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ) + +bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts + +BIN_LIB=$(LIB:lib%.la=-l%) + +$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: % + -$(RM) $@ + ln -sf $(CURDIR)/$< $@ + +$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) + $(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN) + +# copy python scripts in $(top_builddir)/bin/salome +# +DEST_PYSCRIPTS = $(EXPORT_PYSCRIPTS:%=$(top_builddir)/bin/salome/%) +pyscripts: $(DEST_PYSCRIPTS) +$(DEST_PYSCRIPTS): $(top_builddir)/bin/salome/%: % + cp -f $< $@ + +# copy pyqt files in $(PYTHON_SHARED_SITE) +# +PYTHON_SHARED_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules + +$(PYTHON_SHARED_SITE): + $(INSTALL) -d $@ + +DEST_SHAREDPYSCRIPTS = $(EXPORT_SHAREDPYSCRIPTS:%=$(PYTHON_SHARED_SITE)/%) +sharedpyscripts: $(PYTHON_SHARED_SITE) $(DEST_SHAREDPYSCRIPTS) +$(DEST_SHAREDPYSCRIPTS): $(PYTHON_SHARED_SITE)/%: % + cp -f $< $@ + +#check: test !!!! version before AG changes + +#tests: test !!!! version before AG changes + +#test: $(LIB) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%) !!!! version before AG changes + +check: tests + + + + + +runtest_%: + @( LD_LIBRARY_PATH=$(top_builddir)/src/MEDMEM/.libs:$(top_builddir)/src/MEDWrapper/V2_1/Core/.libs:$${LD_LIBRARY_PATH} ; \ + SALOME_trace=local ; \ + export SALOME_trace ; \ + x=$@ ; \ + x=$${x#runtest_*} ; \ + echo -n "Passing test : "$$x ; \ + ./$$x > /dev/null ; \ + if test $$? != "0"; then \ + echo $$'\033'[1\;31m [ FAILED ] $$'\033'[0m ; \ + exit 2; \ + else \ + echo $$'\033'[1\;32m [ OK ] $$'\033'[0m \ ; \ + fi; ) + +runpytest_%: + @( LD_LIBRARY_PATH=$(top_builddir)/src/MEDMEM/.libs:$(top_builddir)/src/MEDWrapper/V2_1/Core/.libs:$${LD_LIBRARY_PATH} ; \ + PYTHONPATH=$(top_builddir)/src/MEDMEM_SWIG:$${PYTHONPATH} ; \ + SALOME_trace=local ; \ + export SALOME_trace ; \ + x=$@ ; \ + x=$${x#runpytest_*} ; \ + echo -n "Passing python test : "$$x ; \ + python $(srcdir)/$$x > /dev/null ; \ + if test $$? != "0"; then \ + echo $$'\033'[1\;31m [ FAILED ] $$'\033'[0m ; \ + exit 2; \ + else \ + echo $$'\033'[1\;32m [ OK ] $$'\033'[0m \ ; \ + fi; ) + +ALL_CHECK_TARGETS = $(patsubst %, runtest_%, $(TEST_PROGS)) + +tests: $(LIB) $(TEST_PROGS) $(ALL_CHECK_TARGETS) + @ln -fs $(top_builddir)/src/MEDMEM_SWIG/.libs/libMEDMEM_Swigcmodule.so $(top_builddir)/src/MEDMEM_SWIG/_libMEDMEM_Swig.so ; \ + for f in $(TEST_PYSCRIPTS); do \ + if [ x"$${f#*test}" != x"$${f}" ]; then \ + $(MAKE) runpytest_$$f ; \ + if test $$? != "0"; then \ + rm -f $(top_builddir)/src/MEDMEM_SWIG/_libMEDMEM_Swig.so ; \ + exit 2; \ + fi; \ + fi; \ + done ; \ + rm -f $(top_builddir)/src/MEDMEM_SWIG/_libMEDMEM_Swig.so ; + + + + +# copy header file in $(inc_builddir) +# +DEST_HEADERS = $(EXPORT_HEADERS:%=$(inc_builddir)/%) +inc: $(DEST_HEADERS) +$(DEST_HEADERS): $(inc_builddir)/%: % + cp -f $< $@ + +# build resources file (icons and messages) : .qm file from .po file +resources: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm) + +# Make installation directories if they don't exist. +$(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir): + $(INSTALL) -d $@ && chmod 755 $@ + +# Install the library, the public header files, and programs. +install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm +#install: $(LIB) $(BIN) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm + @for f in X $(LIB); do \ + if test $$f != X; then \ + ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \ + fi; \ + done + @if test "X$(LIB_SWIG)" != X ; then \ + (cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \ + fi; + @for f in X $(BIN); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ + done +# Install tests programmes in bindir + @for f in X $(TEST_PROGS); do \ + if test $$f != X; then \ + ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \ + fi; \ + done +# Install exported includes in includedir + @for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \ + if test $$f != X; then \ + (cp -p -f $$f $(includedir) || exit 1); \ + fi; \ + done + +# Install python script in $(bindir) +install-python: $(bindir) $(EXPORT_PYSCRIPTS:%=install-%) + +$(EXPORT_PYSCRIPTS:%=install-%): install-%: % + $(INSTALL_PROGRAM) $< $(bindir)/. + +#install-python: $(bindir) $(EXPORT_PYSCRIPTS) +# @for f in X $(EXPORT_PYSCRIPTS); do \ +# if test $$f != X; then \ +# ($(INSTALL_PROGRAM) $$f $(bindir)/. || exit 1); \ +# fi; \ +# done + +# Install pyqt script in $(install-sharedpyqt) +install-sharedpyqt: $(sharedpydir) $(EXPORT_SHAREDPYSCRIPTS:%=install-%) + +$(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: % + $(INSTALL_PROGRAM) $< $(sharedpydir)/. + + +# generic rule to install .qm files : +install-qm: resources + $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME) + @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm); do \ + if test $$f != X; then \ + ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1); \ + fi; \ + done + +# Removes those things that `make install' (would have) installed. +uninstall: + @if test "X$(LIB)" != X; then \ + for f in $(LIB); do \ + $(LT_UNINSTALL) $(libdir)/$$f; \ + done; \ + fi + @if test "X$(BIN)" != X; then \ + for f in $(BIN); do \ + $(LT_UNINSTALL) $(bindir)/$$f; \ + done; \ + fi + @for f in X $(TEST_PROGS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(bindir)/$$f; \ + fi; \ + done +# Uninstall exported includes in includedir + @for f in X $(EXPORT_HEADERS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(includedir)/$$f; \ + fi; \ + done +# Uninstall python script in $(bindir) + @for f in X $(EXPORT_PYSCRIPTS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(bindir)/$$f ; \ + fi; \ + done + +# Uninstall pyqt script in $(sharedpydir) + @for f in X $(EXPORT_SHAREDPYSCRIPTS); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(sharedpydir)/$$f ; \ + fi; \ + done + +# Uninstall qm files + @for f in X $(PO_FILES:%.po=%.qm); do \ + if test $$f != X; then \ + $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ; \ + fi; \ + done + +# remove all dependencies files +# +cleandep: + -$(RM) .dep* + +# Removes temporary files without removing the final target files. That is, +# remove things like object files but not libraries or executables. +# +mostlyclean: cleandep + -$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o) + -$(RM) $(BIN_OBJ) $(BIN:%=%.o) + -$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o) + -$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN) + +# Like `mostlyclean' except it also removes the final targets: things like +# libraries and executables. This target doesn't remove any file that +# is part of the SALOME distribution. +# +clean: mostlyclean + -$(RM) $(LIB) $(TEST_PROGS) $(BIN) $(CLEAN) + -$(RM) TAGS *~ *# core *.core + -$(RM) -r .libs + -$(RM) $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB) + -$(RM) $(patsubst %,$(top_builddir)/bin/salome/%, $(BIN)) + -$(RM) $(patsubst %.la, %.so, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)) + -$(RM) $(patsubst %.la, %.a, $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome/$(LIB)) +# remove idl generated files (sources) + -$(RM) $(LIB_CLIENT_SRC) $(LIB_SERVER_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC) +# remove idl generated files (headers) + -$(RM) $(LIB_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(LIB_SERVER_IDL:%.idl=%$(IDL_SRV_H)) + -$(RM) $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_H)) $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_H)) + -$(RM) $(LIB_MOC_SRC) $(BIN_MOC_SRC) + -$(RM) $(LIB_SWIG_SRC) + +# Like `clean' except it also removes files that were created by running +# configure. If you've unpacked the source and built without creating +# any other files, then `make distclean' will leave only the files that were +# in the distribution. +# +distclean: clean + #remove qm file ! + -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm) + #remove include files + -$(RM) $(DEST_HEADERS) + -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep* + @if test -f $(srcdir)/Makefile.in; then \ + (@SETX@; $(RM) Makefile); \ + fi + + +#implicits rules +.cc.o: + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cc.lo: + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cxx.o: + $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.cxx.lo: + $(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< + +.c.lo: + $(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $< + +.f.o: + $(FC) $(FFLAGS) -c $< -o $@ + +.f.lo: + $(LT) --mode=compile $(FC) $(FFLAGS) -c $< + +.ui.h: + $(UIC) -o $@ $< + +.ui.cxx: + $(UIC) -o $@ -i $*.h $< + +#pattern rules +%_moc.cxx : %.h + $(MOC) $< -o $@ + +%_wrap.cxx : %.i + $(SWIG) $(SWIG_FLAGS) -o $@ $< + +$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po + $(MSG2QM) $< $@ ; \ + +#------------------------------------------------------------------------------ +# The following section of this makefile contains dependencies between the +# source files and the header files. If GNU make and GCC are being used then +# the dependencies are in the form of rules that cause the information to +# be kept updated automatically. Otherwise the dependencies are listed +# explicitly and come from the `.distdep' files in the various directories. +# These files are part of the distribution and are generated automatically on +# GNU/GCC systems. +#------------------------------------------------------------------------------ + +@DEPEND@ diff --git a/adm_local/unix/make_omniorb.in b/adm_local/unix/make_omniorb.in new file mode 100644 index 0000000..84679a9 --- /dev/null +++ b/adm_local/unix/make_omniorb.in @@ -0,0 +1,53 @@ +#======================================================================= +# 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 +# $Header$ +# + +# 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): ${top_srcdir}/idl/%.idl + $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $< + +# dependncies between idl files +depend_idl: .depidl + +# we use cpp to generate dependencies between idl files. +# we change cpp output to keep only idl file and transform it to get a suitable rule +.depidl: $(IDL_FILES) + @touch $@ + @for dep in $? dummy; do \ + if [ $$dep != "dummy" ]; then \ + echo Building dependencies for $$dep; \ + basedep=`basename $$dep .idl`; \ + header="$$basedep"$(IDL_CLN_H); \ + sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ + $(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \ + sed `echo "s%$$basedep\\.idl%$$header:%g"` | \ + sed 's% $(srcdir)/% %g' | \ + sed 's% $(top_srcdir)/% %g' | \ + sed 's% $(top_builddir)/% %g' | \ + sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \ + sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \ + echo '' >>$@; \ + fi; \ + done ; + +-include .depidl + +#======================================================================= +# End specific part to omniorb +#======================================================================= diff --git a/bin/VERSION.in b/bin/VERSION.in new file mode 100755 index 0000000..6a96061 --- /dev/null +++ b/bin/VERSION.in @@ -0,0 +1 @@ +THIS IS SALOME - FILTER VERSION: @VERSION@ diff --git a/build_configure b/build_configure new file mode 100755 index 0000000..212e7d8 --- /dev/null +++ b/build_configure @@ -0,0 +1,235 @@ +#!/bin/bash + +# +# Tool for updating list of .in file for the SALOME project +# and regenerating configure script +# +# Author : Marc Tajchman - CEA +# Date : 10/10/2002 +# $Header$ +# + +ORIG_DIR=`pwd` +CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` + +######################################################################## +# Test if the KERNEL_ROOT_DIR is set correctly + +if test ! -d "${KERNEL_ROOT_DIR}"; then + echo "failed : KERNEL_ROOT_DIR variable is not correct !" + exit +fi + +# Test if the KERNEL_SRC is set correctly + +#if test ! -d "${KERNEL_SRC}"; then +# echo "failed : KERNEL_SRC variable is not correct !" +# exit +#fi +######################################################################## +# Test if the GUI_ROOT_DIR is set correctly + +if test ! -d "${GUI_ROOT_DIR}"; then + echo "failed : GUI_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the MED_ROOT_DIR is set correctly + +if test ! -d "${MED_ROOT_DIR}"; then + echo "failed : MED_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# 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` + +# +# 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 + \rm -f ${CONF_DIR}/salome_adm +fi + + +# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in files +echo "" >> configure.in_tmp1 +echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1 + +echo "" >> configure.in_tmp1 +echo "AC_OUTPUT([ \\" >> configure.in_tmp1 + +# +# List of .in files in the adm/unix directory +# These files MUST be on top of AC_OUTPUT list so we +# put them "manually" +# + +echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1 +echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1 +echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1 + +\rm -f configure.in_tmp2 configure.in_tmp3 +touch configure.in_tmp2 +find_in . configure.in_tmp2 +sed -e '/^...salome_adm/d' configure.in_tmp2 > configure.in_tmp3 +sed -e '/^...adm_local.unix.make_omniorb/d' configure.in_tmp3 > configure.in_tmp2 +sed -e '/^...adm_local.unix.make_commence/d' configure.in_tmp2 > configure.in_tmp3 +sed -e '/configure.in/d' configure.in_tmp3 > configure.in_tmp2 +sed -e 's/.in / /' configure.in_tmp2 >> configure.in_tmp1 +#sed '/^.*salome_adm/d' configure.in_tmp2 > configure.in_tmp3 +#sed '/configure.in/d' configure.in_tmp3 > configure.in_tmp2 +#sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1 + +echo "])" >> configure.in_tmp1 + +# delete the link created for AC_OUTPUT +#echo "" >> configure.in_tmp1 +#echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1 +\mv configure.in_tmp1 configure.in_new +\rm -f configure.in_tmp2 configure.in_tmp3 + + +######################################################################## +# Create new (or replace old) configure.in file +# Print a message if the file is write protected +# + +echo +if test ! -f configure.in +then + echo -n "Creating new file 'configure.in' ... " + if \mv configure.in_new configure.in >& /dev/null + then + echo "done" + else + echo "error, check your file permissions" + fi +else + echo -n "Updating 'configure.in' file ... " + if ! \cp configure.in configure.in_old >& /dev/null + then + echo + echo + echo "Can't backup previous configure.in" + echo -n "Continue (you will not be able to revert) - (Y/N) ? " + read R + case "x$R" in + xn*) exit;; + xN*) exit;; + esac + echo + echo -n " " + fi + if \cp configure.in_new configure.in >& /dev/null + then + echo "done" + else + echo + echo "error, can't update previous configure.in" + fi +fi + +######################################################################## +# Use autoconf to rebuild the configure script +# + +if test -f configure +then + echo -n "Updating 'configure' script ... " +else + echo -n "Creating 'configure' script ... " +fi + +aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files +if autoconf +then + echo "done" +else + echo "failed (check file permissions and/or user quotas ...)" +fi + +cd ${ORIG_DIR} + +echo diff --git a/configure.in.base b/configure.in.base new file mode 100644 index 0000000..6d26a43 --- /dev/null +++ b/configure.in.base @@ -0,0 +1,428 @@ +# +# 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 : Marc Tajchman (CEA) +# Date : 28/06/2001 +# Modified by : Patrick GOLDBRONN (CEA) +# Modified by : Marc Tajchman (CEA) +# +# Created from configure.in.base +# + +AC_INIT(src) +AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files) +AC_CANONICAL_HOST + +PACKAGE=salome +AC_SUBST(PACKAGE) + +VERSION=3.2.4 +XVERSION=0x030204 +AC_SUBST(VERSION) +AC_SUBST(XVERSION) + +# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) +MODULE_NAME=filter +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 + +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_USE_STD_IOSTREAM +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 + +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 BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + +echo +echo --------------------------------------------- +echo Testing OpenCascade +echo --------------------------------------------- +echo + +CHECK_CAS + +echo +echo --------------------------------------------- +echo Testing qwt +echo --------------------------------------------- +echo + +CHECK_QWT + +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 FILTER module necessary full GUI !" + exit +fi + +echo +echo --------------------------------------------- +echo Testing Kernel +echo --------------------------------------------- +echo + +CHECK_KERNEL + +echo +echo --------------------------------------------- +echo Testing Med +echo --------------------------------------------- +echo + +CHECK_MED + +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 qwt_ok doxygen_ok graphviz_ok Kernel_ok Med_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/${MODULE_NAME} 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 $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/envFILTERsrc.sh b/envFILTERsrc.sh new file mode 100644 index 0000000..9237d30 --- /dev/null +++ b/envFILTERsrc.sh @@ -0,0 +1,3 @@ +#------ FILTERsrc ------ +export FILTER_SRC_DIR=${INSTALL_ROOT}/FILTER_SRC_3.2.4 +## diff --git a/idl/FILTER_Gen.idl b/idl/FILTER_Gen.idl new file mode 100644 index 0000000..ea89d21 --- /dev/null +++ b/idl/FILTER_Gen.idl @@ -0,0 +1,77 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +//============================================================================= +// File : FILTER_Gen.idl +// Project : SALOME +//============================================================================= + +#ifndef _Filter_GEN_IDL_ +#define _Filter_GEN_IDL_ + + +#include "SALOME_Exception.idl" +#include "SALOME_Component.idl" +#include "SALOMEDS.idl" + +module SALOME_FILTER +{ + interface FILTER_Gen : Engines::Component, SALOMEDS::Driver + { +// /*! +// it returns a Corba pointer %MESH on the mesh stored in the .med file +// fileName with the name meshName. +// */ +// SALOME_FILTER::MESH readMeshInFile(in string fileName, in string studyName, +// in string meshName) +// raises(SALOME::SALOME_Exception); + +// /*! +// it returns a Corba pointer %FIELD on the field instance with the order +// ordre at the iteration iter, stored in the .med +// file fileName with the name fieldName. +// */ +// SALOME_FILTER::FIELD readFieldInFile(in string fileName, in string studyName, +// in string fieldName, in long ordre, +// in long iter) +// raises (SALOME::SALOME_Exception); + +// /*! +// it returns a Corba pointer on the %MED object regrouping all objects +// (%MESH and %FIELD) stored in the file fileName. All instances +// of the fields are stored without their type. +// */ +// SALOME_FILTER::MED readStructFile(in string fileName, +// in string studyName) +// raises (SALOME::SALOME_Exception); + +// /*! +// It pushes all Corba pointers (%MED, %MESH, %FIELD) in the study named +// studyName. The %MED object regroups all objects +// (%MESH and %FIELD) stored in the file fileName and all +// instances of the fields are stored with their own type. +// */ +// void readStructFileWithFieldType(in string fileName, +// in string studyName) +// raises (SALOME::SALOME_Exception); + }; + +}; + +#endif diff --git a/idl/Makefile.in b/idl/Makefile.in new file mode 100644 index 0000000..283f14b --- /dev/null +++ b/idl/Makefile.in @@ -0,0 +1,86 @@ +# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG +# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT +# 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 +# +# +# generate dependencies for idl file : +# + +# source path +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:${KERNEL_ROOT_DIR}/idl/salome + +@COMMENCE@ + +IDL_FILES = \ + FILTER_Gen.idl + +PY_CLIENT_IDL = $(IDL_FILES) + +# we copy all idl file in $(top_builddir)/idl +inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%) + +$(top_builddir)/idl/salome: + mkdir $@ + +$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) +# $(CP) $< $@ + cp -f $^ $(top_builddir)/idl/salome + + +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: install-pyidl install-idl + +# create directory $(idldir) and copy idl files into it +install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) + $(INSTALL) -d $(idldir) + $(INSTALL_DATA) $^ $(idldir) + + +install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) + $(INSTALL) -d $(PYTHON_SITE_INSTALL) + @for file in $^ dummy; do \ + if [ $$file != "dummy" ]; then \ + $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \ + fi ; \ + done ; + +#@ CONCLUDE @ + +cleandep: + -$(RM) .dep* + +distclean: + -$(RM) *.py + -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%) + -$(RM) Makefile + diff --git a/resources/Data.png b/resources/Data.png new file mode 100644 index 0000000000000000000000000000000000000000..86eb9102642e181b779738a6df56f18d0130aeaf GIT binary patch literal 1605 zcmcK1%TE(Q7y$6?`&}pxU1@=ZDwJAVS{{P&f}znSLJ$ezXk+kk5rYkS)te{p#{a;C z#G}L$1}I2h)MTZl77!#sX{)FhHTnEzw_CPVA{W25voqiP=9``A!-4+u25pU&q9}v! zLhm3xoAAe|W!UN>HyDj&N3`dEg_Y9y-vr&ydw-ZY#?EX=KOH(Fc)AG(4+8XQqpwCBKR{X0sWq z)uO{5pW<4J#gZRko(p7k^|g#J+$Qc#rQPTFj1K`BJOSc$`G_U4l|0hu{vA#G7PWDfhOW`U92@I$^u z4w=*8u + + + + + + + + + + + + + + FILTER + Filter + VISU + Bernard SECHER + @VERSION@ + FILTER component + 1 + ModuleFilter.png + + + + + FILTER + No comment + + + + + + + + + diff --git a/resources/FILTER_en.xml b/resources/FILTER_en.xml new file mode 100644 index 0000000..1d65d00 --- /dev/null +++ b/resources/FILTER_en.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Infos.png b/resources/Infos.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2f38591d4de7bccab097ad64722a9450aaa1d GIT binary patch literal 1836 zcmbW%drVtZ7y$6LP+Ho;fH|#WEq4?5L<(%$G1N+>tc3!VR@R~|)X^8?*;Y0zf@5r% zG0`kYV#1dFW0trqBwI|-nP`F;>jsoZ7rVAp7%M|JdAKU5kQ~3$7AYjg#V_f-=YHpR zzkAO8Zu+6D_;4I!D}zKL#Yx0@rEuN}KY|_wN6GcSPQoeLkXw{XB3=E2xuT_#NaQY= zR3W;49{C@lsTp+d0h;uqi77O35BVmM??*K5LtZcPc#y}9+-`LDE^@oj^g}fL3-XMk z`!mSpLUxDu_UOdzk%|6cr+wIaYsA|>;_P?0ZaADao2{;{&R{UuM_f0DUAIQPot>RV zW35#Bg+MTTPH?VW+HNwLZjQM0dcDci!RJr$`P1F}?uNpKW>d3$)TPn47N{RzQeSF0 zrn)igG*p|_9V_b7sKmH<*?4)pt0r(kXs*%q4Gd|UdKHa-UTM5C{h4O*qVQTrsogo& zH#F2YIHYOwt86Phww}53GGCW?&~@kgp&^0a&qqkQyzIX3uzjieNhV$tihSY%hu39y zj!JubwM$EPX1=?M)cgT{<5vogy6{@5Vr;@wWj6CyR+<6<$D|zxtkW%^ zKaRAv+UGB7zAbD~sTR=EEShUMTmR{R+Hj%7)MlDPfqC@X0{VR(EmqfNq_oQG_15EBvyP-JBg%AUi>bbj*q@%6 zp(Th?UDF{VGmDp%&C5PO?1oQ(XwX`Z8i~yGtUbOh=@RJqBS~Ja;)I7h8J)5WC7&$F zl&ENG42>SkV6x)k<2S{Gf=Z=EM@3O6WO70x1u9Vz6Ubx=B?>T=ib*UEI-N#~i2;dW zBCy0Df`TzL8l8?w5(EPzz_0_hssP2tGB8PEv6##d3_Hx=fuY3#Vlr6}@$vC-EDY(P zdYgf5UR8kb9&kLhDG2{@z_vX7Ok(g+|8`)r*}$F!$HpYM^q{3Ag*TFv1SZ6`f=gy& zh<6zoVUwJk4Ar)QgAv@r!NE--h!k#c$Yw)67{Ipg*!EoL0_IYQ=XdVfy=O0x3KwAm zCt#fI`*y6d)U+4UdAy8_%&atU>lmA}f8Q!24!p?2EaN3Uv4JJC4~FmKaI+8Pyo}i^ zuL@q{uCJC0%MVve5$5FNyw1zW6XoY0PFc^yk^+!8I7A_^9BEN;etv!lv7X7qZ%9^I zsa!5syjgZcsZ^>quyWa3;xJ2jTP{~?Dk`<_D3wPyJhZC3Toz_ro!(%qsHm(oRUfO_ zu!Y*Hs&Z%nUK@v~tFOSUvY~P9g@k%)HrHA#78pabQq!#OV%Bs#{CaVkZLvTXPBgz~ z0|yaoR?GXXZ6BNrH7iK)46yc7Cz|mP2f&EdhjRD`tmAb1skH>aV60`rY+d5aT14id zTI8i=O`VC%|4$ZKB4WI;TEtZ3@W~m-{|@VesWIKzpWPs7R!NbFHpbv4?AmK(E#ZGt Nl0;OT*CVWK{~P{xD9r!> literal 0 HcmV?d00001 diff --git a/resources/ModuleFilter.png b/resources/ModuleFilter.png new file mode 100644 index 0000000000000000000000000000000000000000..16a20c116e8243a6b49ed862613d2cc49bdf4caa GIT binary patch literal 831 zcmV-F1Hk-=P)A+3!%gdoE?w?yY*XMamxaAW~()k6;QGVVf3ZPpQcy+38CrH3{Qk zoaxN-vWJ+OcH(Y#5qvHK|CitMf1CdUU;7AQ8zF4-#i736F~#EMso~pq*Ek7JMLa$}POH_T(b)M|f)>8t;^3f3 zKA)#ntMKyW+7Z-s>l6xWsZ53jrMAEC5{41RXe`Snj$`6DMr+Vop|xgsc$hE@Sz20V zb@eG)%b|Y+_m{*NND_%L1}POFH@MUObOdhQq^%&CMdWZvC2q+x@_Pg_JQ$DGG%bJbwIyVzG#2o#E=$@5yGf z#Bm5%IplY1BB@I((}Bdlpj1;;nAaqNZEDBWHP2)F0;K|LMcrchIBe@ z&Ye4p5H>e&{)pCc=qTd1Z_6|q4IIZIpUy{Fg7-dG2KQ=nb2l+s9 +
+ + + +
+
+ + +
+ diff --git a/resources/Structure.png b/resources/Structure.png new file mode 100644 index 0000000000000000000000000000000000000000..73ade29655399f3d18b36a68cdee924543fda6ba GIT binary patch literal 1704 zcmcK1T})F~902fs&=1;DsZPDK-pdu8%5-2WIMAt}y~8q!Z9zbNu`z5KlHpjhk;NCy z*mTLF#s?Fl#?J?hA<>5|VJ`*)6s4t5qoQVtiPm7HfC=t9|&&_^QlPrczxwWPTISsZ?s4 zx3Y$7KLPh2!PrB%`v6AoLt+dPcVT1{M()7y2nYhi;}9Q$p&=L?gdrZrAHn#a5Fdtn z4}s?)6cKLpCvHR&U45}opU@K(x}veJ2#?EkMq;5T-`&Ue^b5cJas2qn{oPUiFHKu&OP;0aqI=#V|X);@~tkxNNF?2dz zhE}W5sMXmv4QA5VvejyhMvGXdBP5fA(P%K}^(YCnA+seBCe#}YMk66JF-#~CN)A~{ zAy(8Fm&$1+=VnYNJs`>$e5f(Y>LqzEhdGeq-iCim?ewSY-!%dq%2#WxBL@Y zk*I58YKyO&1Y-ZNrhguUdc*}%SuGH zf!>%>>s<6Zj4S=TSY%9j;ij~s-O6kg99Jqaru>Was+F{oc`7P6yaJSXx>aj8r%IZM zck1lA(e@_|gzyX~Kl_y504zLKo{?xM0GdGq}l%Kwfvo;K4FrfnliL(uKv3 +#include +#include + +#include +#include +#include +#include "SALOMEDS_Tool.hxx" + +using namespace std; + Filter_Gen_i* Filter_Gen_i::_FILTERGen = NULL; + +//============================================================================= +/*! + * default constructor: not for use + */ +//============================================================================= + +Filter_Gen_i::Filter_Gen_i() +{ + MESSAGE("Filter_Gen_i::Filter_Gen_i"); +} + +//============================================================================= +/*! + * standard constructor + */ +//============================================================================= + +Filter_Gen_i:: Filter_Gen_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName) +{ + MESSAGE("activate object"); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + + _duringLoad=false; + // get an NamingService interface + _NS = SINGLETON_::Instance() ; + ASSERT(SINGLETON_::IsAlreadyExisting()) ; + _NS->init_orb( _orb ) ; + + //_myFilterI = 0; + _FILTERGen = this; +} + +//============================================================================= +/*! + * default destructor: not for use + */ +//============================================================================= + +Filter_Gen_i::~Filter_Gen_i() +{ + MESSAGE("Filter_Gen_i::~Filter_Gen_i"); +} + diff --git a/src/FILTER/Filter_Gen_i.hxx b/src/FILTER/Filter_Gen_i.hxx new file mode 100644 index 0000000..5320529 --- /dev/null +++ b/src/FILTER/Filter_Gen_i.hxx @@ -0,0 +1,66 @@ +// FILTER FILTER : implemetation of FILTER idl descriptions +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : Filter_Gen_i.hxx +// Author : Bernard SECHER, CEA +// Module : FILTER +// $Header$ + +#ifndef _FILTER_GEN_I_HXX_ +#define _FILTER_GEN_I_HXX_ + +#include +#include +#include CORBA_SERVER_HEADER(FILTER_Gen) +#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) + +#include "SALOME_Component_i.hxx" +#include "SALOME_NamingService.hxx" + +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + +class Filter_Gen_i: + public POA_SALOME_FILTER::FILTER_Gen, + public Engines_Component_i +{ +private: + +public: + Filter_Gen_i(); + Filter_Gen_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); + virtual ~Filter_Gen_i(); + + +private : + static Filter_Gen_i* _FILTERGen; // Point to last created instance of the class + + private: + bool _duringLoad; + SALOME_NamingService *_NS; +}; + +#endif diff --git a/src/FILTER/Makefile.in b/src/FILTER/Makefile.in new file mode 100644 index 0000000..b23d0af --- /dev/null +++ b/src/FILTER/Makefile.in @@ -0,0 +1,65 @@ +# FILTER FILTER : implemetation of FILTER idl descriptions +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : Makefile.in +# Author : Bernard SECHER, CEA +# Module : FILTER +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl + +@COMMENCE@ + +EXPORT_PYSCRIPTS = + +# Libraries targets + +LIB = libFILTEREngine.la + +LIB_SRC = Filter_Gen_i.cxx +LIB_SERVER_IDL = FILTER_Gen.idl SALOME_Component.idl SALOME_ContainerManager.idl \ + SALOME_Exception.idl + +LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_ModuleCatalog.idl SALOME_Comm.idl SALOME_GenericObj.idl + +EXPORT_HEADERS = Filter_Gen_i.hxx + +# Executables targets +BIN = +BIN_SRC = + +LDFLAGS= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome +LDFLAGSFORBIN= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome + +# additionnal information to compil and link file + +CPPFLAGS += $(OCC_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) ${KERNEL_CXXFLAGS} +CXXFLAGS += $(OCC_CXXFLAGS) ${KERNEL_CXXFLAGS} + +LDFLAGS+= $(OCC_LIBS) $(HDF5_LIBS) ${KERNEL_LDFLAGS} \ + -lSalomeContainer -lSalomeHDFPersist -lSalomeDS -lSalomeNS -lRegistry -lOpUtil + +@CONCLUDE@ diff --git a/src/FILTERGUI/FILTER_images.po b/src/FILTERGUI/FILTER_images.po new file mode 100644 index 0000000..51911bd --- /dev/null +++ b/src/FILTERGUI/FILTER_images.po @@ -0,0 +1,44 @@ +# MED MEDGUI : MED component GUI implemetation +# +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : MedGUI_icons.po +# Module : MED + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-06-14 09:11:49 PM CEST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +msgid "ICO_TB_MESHSEL" +msgstr "Data.png" + +msgid "ICO_TB_FIELDSEL" +msgstr "Infos.png" + +msgid "ICO_TB_EXPLORE" +msgstr "Structure.png" + + diff --git a/src/FILTERGUI/FILTER_msg_en.po b/src/FILTERGUI/FILTER_msg_en.po new file mode 100644 index 0000000..f2d7f2b --- /dev/null +++ b/src/FILTERGUI/FILTER_msg_en.po @@ -0,0 +1,155 @@ +# FILTER FILTERGUI : FILTER component GUI implemetation +# +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : FILTER_msg_en.po +# Module : FILTER + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-09-21 14:31:28 METDST\n" +"PO-Revision-Date: 2005-06-09 14:38+0400\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + + +#: FilterGUI.cxx:271 +msgid "FilterGUI::FILTER_MEN_ALL_FILES" +msgstr "All Files ( * )" + +#: FilterGUI.cxx:300 +#, fuzzy +msgid "FilterGUI::MEN_OPEN" +msgstr "Open a MED file" + +msgid "FilterGUI::FILTER_MEN_IMPORT" +msgstr "Open a MED file" + +#: FilterGUI.cxx:270 +msgid "FilterGUI::FILTER_MEN_IMPORT_MED" +msgstr "MED Files ( *.med )" + +#: FilterGUI.cxx:296 +msgid "FILTER_WRN_WARNING" +msgstr "Warning" + +#: FilterGUI.cxx:280 +msgid "FILTER_INF_NOTIMPL" +msgstr "Not Implemented for this Object" + +#: FilterGUI.cxx:298 +msgid "FILTER_BUT_OK" +msgstr "OK" + +#: FilterGUI.cxx:297 +msgid "FILTER_INF_NOIOR" +msgstr "Object has no IOR" + +#: FilterGUI.cxx:297 +msgid "FILTER_INF_MESHNAME" +msgstr "Please enter the name of the mesh you want to read" + +#: FilterGUI.cxx:297 +msgid "FILTER_INF_FIELDNAME" +msgstr "Please enter the name of the field you want to read" + + +# Menu items + +msgid "TOP_MESHSEL" +msgstr "Mesh selection" + +msgid "MEN_FILTERING" +msgstr "Filtering" + +msgid "STB_MESHSEL" +msgstr "Read a mesh" + +msgid "TOP_FIELDSEL" +msgstr "Field selection" + +msgid "MEN_FIELDSEL" +msgstr "Field selection" + +msgid "STB_FIELDSEL" +msgstr "Read a field" + +msgid "TOP_EXPLORE" +msgstr "Explore Med File" + +msgid "MEN_EXPLORE" +msgstr "Explore Med File" + +msgid "STB_EXPLORE" +msgstr "Explore Med File" + +msgid "TOP_DUMPMESH" +msgstr "Dump Mesh" + +msgid "MEN_DUMPMESH" +msgstr "Dump Mesh" + +msgid "STB_DUMPMESH" +msgstr "dump Mesh" + +msgid "TOP_DUMPSUBMESH" +msgstr "Dump SubMesh" + +msgid "MEN_DUMPSUBMESH" +msgstr "Dump SubMesh" + +msgid "STB_DUMPSUBMESH" +msgstr "dump Mesh" + +msgid "TOP_POPUPTEST" +msgstr "Popup test" + +msgid "MEN_POPUPTEST" +msgstr "Popup test" + +msgid "STB_POPUPTEST" +msgstr "Popup test" + +msgid "TOP_ERASE" +msgstr "Erase" + +msgid "MEN_ERASE" +msgstr "Erase" + +msgid "STB_ERASE" +msgstr "Erase" + +msgid "TOP_DISPLAY" +msgstr "Display" + +msgid "MEN_DISPLAY" +msgstr "Display" + +msgid "STB_DISPLAY" +msgstr "Display" + + + +msgid "TB_MED" +msgstr "Med Toolbar" + diff --git a/src/FILTERGUI/FILTER_msg_fr.po b/src/FILTERGUI/FILTER_msg_fr.po new file mode 100644 index 0000000..dbd99fc --- /dev/null +++ b/src/FILTERGUI/FILTER_msg_fr.po @@ -0,0 +1,34 @@ +# MED MEDGUI : MED component GUI implemetation +# +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : MED_msg_fr.po +# Module : MED + +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-09-21 14:31:28 METDST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + diff --git a/src/FILTERGUI/FilterGUI.cxx b/src/FILTERGUI/FilterGUI.cxx new file mode 100644 index 0000000..d785655 --- /dev/null +++ b/src/FILTERGUI/FilterGUI.cxx @@ -0,0 +1,381 @@ +// FILTER FILTERGUI : FILTER component GUI implemetation +// +// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : FilterGUI.cxx +// Module : FILTER + +#include "utilities.h" +#include +#include "SelectParams.h" +#include "SelectField.h" +#include "FilterGUI.h" + +// SALOME Includes +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include + +// QT Includes +#include + +//VRV: porting on Qt 3.0.5 +#if QT_VERSION >= 0x030005 +#include +#endif +//VRV: porting on Qt 3.0.5 + +using namespace std; + +static CORBA::ORB_var _orb; + +//============================================================================= +/*! + * + */ +//============================================================================= +FilterGUI::FilterGUI() : + SalomeApp_Module( "FILTER" ),_sel(0) +{ +} + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::createPopupItem( const int id, + const QString& clients, + const QString& types, + const QString& theRule, + const int pId ) +{ + int parentId = pId; + if( pId!=-1 ) + parentId = popupMgr()->actionId( action( pId ) ); + + if( !popupMgr()->contains( popupMgr()->actionId( action( id ) ) ) ) + popupMgr()->insert( action( id ), parentId, 0 ); + + QChar lc = QtxPopupMgr::Selection::defEquality(); + QString rule = "(%1)"; + if( !types.isEmpty() ) + rule += " and (%2) and (%3)"; + + rule = rule.arg( QString( "client in {%1}" ).arg( clients ) ); + + if( !types.isEmpty() ) + { + rule = rule.arg( QString( "%1>0" ).arg( QtxPopupMgr::Selection::defSelCountParam() ) ); + rule = rule.arg( QString( "%1type in {%2}" ).arg( lc ).arg( types ) ); + } + rule += theRule; + popupMgr()->setRule( action( id ), rule, true ); +} + +void FilterGUI::createFilterAction( const int id, const QString& po_id, const QString& icon_id ) +{ + QWidget* parent = application()->desktop(); + SUIT_ResourceMgr* mgr = application()->resourceMgr(); + + QPixmap pix; QIconSet icon; + if( !icon_id.isEmpty() ) + pix = mgr->loadPixmap( "FILTER", tr( icon_id ) ); +// else +// pix = mgr->loadPixmap( "FILTER", tr( QString( "ICO_" )+po_id ) ); + + if ( !pix.isNull() ) + icon = QIconSet( pix ); + + createAction( id, tr( "TOP_" + po_id ), icon, tr( "MEN_" + po_id ), tr( "STB_" + po_id ), 0, parent, false, this, SLOT( onGUIEvent() ) ); +} + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::initialize( CAM_Application* app ) +{ + SalomeApp_Module::initialize( app ); + + QWidget* parent = application()->desktop(); + + createFilterAction( 111, "OPEN" ); + + createFilterAction( 936, "FILTERING" ); + + int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ); + createMenu( 111, fileId, 11 ); + + int FilterId = createMenu( tr( "DATA REDUCTION" ), -1, 50, 10 ); + createMenu( separator(), FilterId, 10 ); + createMenu( 936, FilterId, 11 ); + +} + +void FilterGUI::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& /*title*/ ) +{ + FilterGUI_Selection sel; + SalomeApp_Application* app = dynamic_cast( application() ); + if( app ) + { + sel.init( client, app->selectionMgr() ); + popupMgr()->updatePopup( menu, &sel ); + } +} + +QString FilterGUI::engineIOR() const +{ +// SALOME_FILTER::MED_Gen_ptr aMedGen = InitMedGen(); +// if ( !CORBA::is_nil( aMedGen) ) +// return QString( getApp()->orb()->object_to_string( aMedGen )); + return QString( "" ); +} + +void FilterGUI::windows( QMap& mappa ) const +{ + mappa.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft ); + mappa.insert( SalomeApp_Application::WT_PyConsole, Qt::DockBottom ); +} + + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::onGUIEvent() +{ + const QObject* obj = sender(); + if ( !obj || !obj->inherits( "QAction" ) ) + return; + int id = actionId((QAction*)obj); + if ( id != -1 ) + OnGUIEvent( id ); +} + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::EmitSignalCloseAllDialogs() +{ + emit SignalCloseAllDialogs(); +} + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::deactivateModule( SUIT_Study* study ) +{ + setMenuShown( false ); + setToolShown( false ); + + disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), + this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); + + EmitSignalCloseAllDialogs(); + + return SalomeApp_Module::deactivateModule( study ); +} + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::activateModule( SUIT_Study* study ) +{ + bool res = SalomeApp_Module::activateModule( study ); + + setMenuShown( true ); + setToolShown( true ); + + connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), + this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); + return res; +} + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::onWindowActivated( SUIT_ViewWindow* ) +{ +} + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::OnGUIEvent (int theCommandID) +{ + setOrb(); + + SalomeApp_Study* myActiveStudy = dynamic_cast< SalomeApp_Study* >( application()->activeStudy() ); + if( !myActiveStudy ) + return false; + + _PTR(Study) aStudy = myActiveStudy->studyDS(); + //SALOME_NamingService* myNameService = parent->getNameService(); + + QString file; + QStringList filtersList ; + + filtersList.append( tr("FILTER_MEN_IMPORT_MED") ); + filtersList.append( tr("FILTER_MEN_ALL_FILES") ) ; + + SalomeApp_Application* app = dynamic_cast( application() ); + if( !app ) + return false; + + switch (theCommandID) + { + case 936: + { + MESSAGE("command " << theCommandID << " activated"); + + try { + SelectParams *filter = new SelectParams(_sel); + QFrame *fr = filter->buildFrame(); + fr->show(); + } + catch ( SALOME_Exception& S_ex ) { + } + break; + } + case 111: + { + MESSAGE("command " << theCommandID << " activated"); + + // Selection du Fichier + file = SUIT_FileDlg::getFileName(application()->desktop(), + "", + filtersList, + tr("FILTER_MEN_IMPORT"), + true); + if (!file.isEmpty() ) + { + if(_sel) delete _sel; + _sel = new SelectField(file); + QFrame *fr = _sel->buildFrame(); + fr->show(); + } + else{ + if(_sel) delete _sel; + _sel = NULL; + } + break; + } + } + + app->updateActions(); //SRN: To update a Save button in the toolbar + + return true; +} + + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::OnMousePress (QMouseEvent* pe , + SUIT_ViewWindow* wnd ) +{ + MESSAGE("FilterGUI::OnMousePress"); + return true; +} + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::OnMouseMove (QMouseEvent* pe , + SUIT_ViewWindow* wnd ) +{ + // MESSAGE("FilterGUI::OnMouseMouve"); + return true; +} + +//============================================================================= +/*! + * + */ +//============================================================================= +bool FilterGUI::OnKeyPress (QKeyEvent* pe, + SUIT_ViewWindow* wnd) +{ + MESSAGE("FilterGUI::OnKeyPress"); + return true; +} + +//============================================================================= +/*! + * + */ +//============================================================================= +void FilterGUI::setOrb() +{ + try { + ORB_INIT &init = *SINGLETON_::Instance(); + ASSERT(SINGLETON_::IsAlreadyExisting()); + _orb = init( 0 , 0 ); + } catch (...) { + INFOS("internal error : orb not found"); + _orb = 0; + } + ASSERT(! CORBA::is_nil(_orb)); +} + +extern "C" { + Standard_EXPORT CAM_Module* createModule() { + return new FilterGUI(); + } +} diff --git a/src/FILTERGUI/FilterGUI.h b/src/FILTERGUI/FilterGUI.h new file mode 100644 index 0000000..9ec37d3 --- /dev/null +++ b/src/FILTERGUI/FilterGUI.h @@ -0,0 +1,61 @@ +// FILTER FILTERGUI : FILTER component GUI implemetation +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : FILTERGUI.h +// Module : FILTER + +#ifndef _FILTERGUI_H_ +#define _FILTERGUI_H_ + +#include +#include + +#include +#include CORBA_CLIENT_HEADER(FILTER_Gen) +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + +class SelectField; + +class FilterGUI: public SalomeApp_Module +{ + Q_OBJECT + +public: + FilterGUI(); + + virtual void initialize ( CAM_Application* ); + virtual QString engineIOR() const; + virtual void windows( QMap& mappa ) const; + virtual bool OnGUIEvent (int theCommandID); + virtual bool OnKeyPress (QKeyEvent* pe, SUIT_ViewWindow* ); + virtual bool OnMousePress (QMouseEvent* pe, SUIT_ViewWindow* ); + virtual bool OnMouseMove (QMouseEvent* pe, SUIT_ViewWindow* ); + + void createFilterAction( const int, const QString&, const QString& = "" ); + void createPopupItem( const int, const QString&, const QString&, const QString& = "", const int = -1 ); + + virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& ); + + static void setOrb(); + + void EmitSignalCloseAllDialogs(); + +signals : + void SignalCloseAllDialogs(); + +public slots: + virtual bool deactivateModule( SUIT_Study* ); + virtual bool activateModule( SUIT_Study* ); + +protected: +private slots: + void onGUIEvent(); + void onWindowActivated( SUIT_ViewWindow* ); + SelectField *_sel; + +}; + +#endif diff --git a/src/FILTERGUI/FilterGUI_Selection.cxx b/src/FILTERGUI/FilterGUI_Selection.cxx new file mode 100644 index 0000000..d440828 --- /dev/null +++ b/src/FILTERGUI/FilterGUI_Selection.cxx @@ -0,0 +1,39 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "FilterGUI_Selection.h" + +//======================================================================= +//function : FilterGUI_Selection +//purpose : +//======================================================================= +FilterGUI_Selection::FilterGUI_Selection() +: LightApp_Selection() +{ +} + +//======================================================================= +//function : ~FilterGUI_Selection +//purpose : +//======================================================================= +FilterGUI_Selection::~FilterGUI_Selection() +{ +} + diff --git a/src/FILTERGUI/FilterGUI_Selection.h b/src/FILTERGUI/FilterGUI_Selection.h new file mode 100644 index 0000000..3287057 --- /dev/null +++ b/src/FILTERGUI/FilterGUI_Selection.h @@ -0,0 +1,41 @@ +// MED MEDGUI_Selection +// +// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : FILTERGUI_Selection.h +// Author : Alexander SOLOVYOV +// Module : MED +// $Header$ + +#ifndef FILTERGUI_SELECTION_HeaderFile +#define FILTERGUI_SELECTION_HeaderFile + +#include "LightApp_Selection.h" + +class FilterGUI_Selection : public LightApp_Selection +{ +public: + FilterGUI_Selection(); + virtual ~FilterGUI_Selection(); +}; + +#endif diff --git a/src/FILTERGUI/Makefile.in b/src/FILTERGUI/Makefile.in new file mode 100644 index 0000000..c795c98 --- /dev/null +++ b/src/FILTERGUI/Makefile.in @@ -0,0 +1,63 @@ +# MED MEDGUI : MED component GUI implemetation +# +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : Makefile.in +# Author : Bernard SECHER, CEA +# Module : FILTER +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl + +@COMMENCE@ + +# header files +EXPORT_HEADERS= + +# .po files to transform in .qm +PO_FILES = \ + FILTER_images.po \ + FILTER_msg_fr.po \ + FILTER_msg_en.po \ + + +# Libraries targets +LIB = libFILTER.la +LIB_SRC = FilterGUI.cxx FilterGUI_Selection.cxx SelectParams.cxx SelectField.cxx +LIB_MOC = FilterGUI.h SelectParams.h SelectField.h + +LIB_CLIENT_IDL = SALOMEDS.idl SALOME_Exception.idl SALOME_Component.idl \ + FILTER_Gen.idl \ + SALOMEDS_Attributes.idl SALOME_Comm.idl SALOME_GenericObj.idl + +LIB_SERVER_IDL = + +# additionnal information to compil and link file + +CPPFLAGS += $(MED2_INCLUDES) $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) ${KERNEL_CXXFLAGS} ${GUI_CXXFLAGS} ${BOOST_CPPFLAGS} $(QWT_INCLUDES) $(MED_CXXFLAGS) + +LDFLAGS += $(MED2_LIBS) -lSalomeApp ${MED_LDFLAGS} -lMEDMEMImpl -lmedmem -lFILTEREngine ${KERNEL_LDFLAGS} ${GUI_LDFLAGS} $(QWT_LIBS) + +@CONCLUDE@ diff --git a/src/FILTERGUI/SelectField.cxx b/src/FILTERGUI/SelectField.cxx new file mode 100644 index 0000000..164e7a6 --- /dev/null +++ b/src/FILTERGUI/SelectField.cxx @@ -0,0 +1,158 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#include "SelectField.h" + +#include +#include +#include +#include +#include +#include + +SelectField::SelectField(const QString& file) + : _file(file), + _mesh(0), + _field(0), + _ts(0), + _myList( 0 ), + _myLab( 0 ), + _mySlider( 0 ), + _fr( 0 ) +{ +} + +SelectField::~SelectField() +{ + cout << "destructor called" << endl; +} + +QFrame* SelectField::buildFrame() +{ + QListViewItem *element; + + cout << "File: " << _file << endl; + SCRUTE(_file); + _med = new ::MED(MED_DRIVER,_file); + deque meshesNames = _med->getMeshNames(); + int numberOfMeshes = meshesNames.size(); + + deque fieldsNames = _med->getFieldNames(); + int numberOfFields = fieldsNames.size(); + + QFrame* _fr = new QFrame( 0, "myframe" ); + + QGridLayout* _lay = new QGridLayout( _fr, 1, 1 ); + + QGroupBox* _GroupC1 = new QGroupBox( _fr, "GroupC1" ); + _lay->addWidget( _GroupC1,0,0 ); + + MESSAGE(basename(_file)); + QString qs("File : "); + qs.append(basename(_file)); + _GroupC1->setTitle(qs); + _GroupC1->setColumnLayout(0, Qt::Vertical ); + _GroupC1->layout()->setSpacing( 0 ); + _GroupC1->layout()->setMargin( 0 ); + _myGroupLayout = new QGridLayout( _GroupC1->layout() ); + _myGroupLayout->setAlignment( Qt::AlignTop ); + _myGroupLayout->setSpacing( 6 ); + _myGroupLayout->setMargin( 11 ); + _myGroupLayout->setColStretch( 0, 0 ); + _myGroupLayout->setColStretch( 1, 1 ); + + int row = 0; + + // 0) tree to visualize meshes and fields + _myList = new QListView( _GroupC1, "List of fields" ); + _myList->setMinimumSize( 400, 400 ); + _myList->setMaximumSize( 400, 400 ); + _myList->setRootIsDecorated(true); + _myList->addColumn("Name"); + _myList->addColumn("Type"); + + for(int i=0;isetExpandable(true); + _myList->setOpen(element,true); + + for (int j=0; j myIteration = _med->getFieldIteration (fieldsNames[j]); + string meshName = _med->getField(fieldsNames[j],myIteration[0].dt,myIteration[0].it)->getSupport()->getMesh()->getName(); + if( strcmp(meshName.c_str(),meshesNames[i].c_str()) == 0) + new QListViewItem( element, fieldsNames[j], "Field" ); + } + + element->setSelectable(false); + _myGroupLayout->addWidget( _myList, row, 0 ); + } + row++; + + // 1) label for time steps + _myLab = new QLabel("Select a time step:",_GroupC1); + _myLab->hide(); + _myGroupLayout->addWidget( _myLab, row, 0 ); + row++; + + // 2) slider to visualize time steps + _mySlider = new QSlider(_GroupC1); + _mySlider->setOrientation(Qt::Horizontal); + _mySlider->setTickmarks(QSlider::Below); + _myGroupLayout->addWidget( _mySlider, row, 0 ); + + _mySlider->hide(); + row++; + + connect( _myList, SIGNAL(clicked(QListViewItem *)), this, SLOT(fieldSelected(QListViewItem *))); + connect( _mySlider, SIGNAL(sliderReleased()), this, SLOT(tsSelected())); + + return _fr; +} + +void SelectField::fieldSelected(QListViewItem *lvi) +{ + if(lvi){ + if( strcmp(lvi->text(1),"Field") == 0){ + _field = lvi->text(0); + _mesh = lvi->parent()->text(0); + deque myIteration = _med->getFieldIteration (lvi->text(0)); + int numberOfIteration = myIteration.size(); + if( numberOfIteration > 1 ){ + _mySlider->setRange(myIteration[0].dt, + myIteration[numberOfIteration-1].dt); + _myLab->show(); + _mySlider->show(); + } + else{ + _ts = 0; + _myLab->hide(); + _mySlider->hide(); + } + } + } +} + +void SelectField::tsSelected() +{ + _ts = _mySlider->value(); + MESSAGE("File " << _file ); + MESSAGE("Mesh " << _mesh ); + MESSAGE("Field " << _field ); + MESSAGE("Time step " << _ts ); +} diff --git a/src/FILTERGUI/SelectField.h b/src/FILTERGUI/SelectField.h new file mode 100644 index 0000000..18f0ab9 --- /dev/null +++ b/src/FILTERGUI/SelectField.h @@ -0,0 +1,70 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef SELECTFIELD_HEADER +#define SELECTFIELD_HEADER + +#include "utilities.h" +#include "MEDMEM_Med.hxx" +#include +#include + +#include +class QListView; +class QListViewItem; +class QFrame; +class QSlider; +class QGridLayout; +class QGroupBox; +class QLabel; + +class SelectField: public QObject +{ + Q_OBJECT + +public: + SelectField(const QString& file); + virtual ~SelectField(); + + virtual QFrame* buildFrame(); + QString getFile() { return _file; } + QString getMesh() { return _mesh; } + QString getField() { return _field; } + int getTimeStep() { return _ts; } + +protected: + +protected slots: + virtual void fieldSelected(QListViewItem *lvi); + virtual void tsSelected(); + +private: + int _ts; + QGridLayout *_myGroupLayout, *_lay; + QGroupBox* _GroupC1; + QFrame *_fr; + QString _file, _mesh, _field; + QListView *_myList; + QLabel *_myLab; + QSlider *_mySlider; + ::MEDMEM::MED *_med; +}; + +#endif diff --git a/src/FILTERGUI/SelectParams.cxx b/src/FILTERGUI/SelectParams.cxx new file mode 100644 index 0000000..f959ef4 --- /dev/null +++ b/src/FILTERGUI/SelectParams.cxx @@ -0,0 +1,512 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include +#include +#include "SelectParams.h" +#include "utilities.h" + +#include + +#include "Utils_SALOME_Exception.hxx" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +SelectParams::SelectParams(SelectField *sel) + : _size(1024), + _myExpr( 0 ), + _myFunc( 0 ), + _myFieldB( 0 ), + _myLinear( 0 ), + _myHisto( 0 ), + _myNbThresh( 0 ), + _myCutNeg( 0 ), + _myOneThresh( 0 ), + _myTwoThresh( 0 ), + _myArea( 0 ), + _myVThresh( 0 ), + _myOutFile( 0 ), + _myOFB( 0 ), + _myProc( 0 ), + _myFScale( 0 ), + _myGroupLayout( 0 ), + _myGroupLayout2( 0 ), + _myPlot( 0 ), + _GroupC1( 0 ), + _GroupC2( 0 ), + _lay( 0 ), + _fr( 0 ) +{ + _x = new double[_size]; + _y = new double[_size]; + if(sel){ + _inputFile = sel->getFile(); + _inputMesh = sel->getMesh(); + _inputField = sel->getField(); + _inputTS = sel->getTimeStep(); + if( _inputMesh.isNull() || _inputField.isNull() ){ + MESSAGE("Select an input Field in MED file before filtering!!"); + throw SALOME_Exception("Salome Exception"); + } + } + else{ + MESSAGE("Select an input Field in MED file before filtering!!"); + throw SALOME_Exception("Salome Exception"); + } + +} + +SelectParams::~SelectParams() +{ + cout << "destructor called" << endl; +// delete _x; +// delete _y; +// delete _myExpr; +// delete _myFunc; +// delete _myFieldB; +// delete _myLinear; +// delete _myHisto; +// delete _myNbThresh; +// delete _myCutNeg; +// delete _myOneThresh; +// delete _myTwoThresh; +// delete _myArea; +// delete _myVThresh; +// delete _myOutFile; +// delete _myOFB; +// delete _myProc; +// delete _myFScale; +// delete _myGroupLayout; +// delete _myGroupLayout2; +// delete _myPlot; +// delete _GroupC1; +// delete _GroupC2; +// delete _lay; +// delete _fr; +} + +QFrame* SelectParams::buildFrame() +{ + QFrame* _fr = new QFrame( 0, "myframe" ); + QGridLayout* _lay = new QGridLayout( _fr, 1, 2 ); + + QGroupBox* _GroupC1 = new QGroupBox( _fr, "GroupC1" ); + _lay->addWidget( _GroupC1,0,0 ); + + _GroupC1->setTitle( tr( "Filtering parameters" ) ); + _GroupC1->setColumnLayout(0, Qt::Vertical ); + _GroupC1->layout()->setSpacing( 0 ); + _GroupC1->layout()->setMargin( 0 ); + _myGroupLayout = new QGridLayout( _GroupC1->layout() ); + _myGroupLayout->setAlignment( Qt::AlignTop ); + _myGroupLayout->setSpacing( 6 ); + _myGroupLayout->setMargin( 11 ); + _myGroupLayout->setColStretch( 0, 0 ); + _myGroupLayout->setColStretch( 1, 1 ); + + int row = 0; + + QString qs1("Input File : "); + qs1.append(basename(_inputFile)); + _myGroupLayout->addWidget( new QLabel( qs1, _GroupC1 ), row, 0 ); + row++; + + QString qs2("Input Mesh : "); + qs2.append(_inputMesh); + _myGroupLayout->addWidget( new QLabel( qs2, _GroupC1 ), row, 0 ); + row++; + + QString qs3("Input Field : "); + qs3.append(_inputField); + _myGroupLayout->addWidget( new QLabel( qs3, _GroupC1 ), row, 0 ); + row++; + + char strTS[128]; + sprintf(strTS,"Input Time Step : %d\0",_inputTS); + QString qs4(strTS); + _myGroupLayout->addWidget( new QLabel( qs4, _GroupC1 ), row, 0 ); + row++; + + // 0) field function to calculate histogram (radiogroup) + _myFunc = new QButtonGroup( "Select function on field", _GroupC1 ); + _myFunc->setExclusive( true ); + _myFunc->setColumnLayout( 0, Qt::Horizontal ); + + _myFieldB = new QRadioButton( "Field", _myFunc ); + _myFieldB->setChecked(true); + + QGridLayout* convLay = new QGridLayout( _myFunc->layout() ); + convLay->addWidget( _myFieldB, 0, 0 ); + convLay->addWidget( _myCutNeg = new QRadioButton( "Gradient", _myFunc ), 0, 1 ); + _myGroupLayout->addWidget( _myFunc, row, 0 ); + row++; + + // 1) scale of histogram (radiogroup) + _myFScale = new QButtonGroup( "Type of display", _GroupC1 ); + _myFScale->setExclusive( true ); + _myFScale->setColumnLayout( 0, Qt::Horizontal ); + + _myLinear = new QRadioButton( "Linear", _myFScale ); + _myLinear->setChecked(true); + + QGridLayout* scaleLay = new QGridLayout( _myFScale->layout() ); + scaleLay->addWidget( _myLinear, 0, 0 ); + scaleLay->addWidget( new QRadioButton( "Logarithm", _myFScale ), 0, 1 ); + _myGroupLayout->addWidget( _myFScale, row, 0 ); + row++; + + // 2) display histogram button (pushbutton) + _myHisto = new QPushButton( "Display Histogram", _GroupC1 ); + _myHisto->setText("Display Histogram"); + _myHisto->setAutoDefault(TRUE); + _myHisto->setDefault(TRUE); + _myGroupLayout->addWidget( _myHisto, row, 0 ); + row++; + + // 3) number of thresholds (radiogroup) + _myNbThresh = new QButtonGroup( "Select number of thresholds", _GroupC1 ); + _myNbThresh->setExclusive( true ); + _myNbThresh->setColumnLayout( 0, Qt::Horizontal ); + QGridLayout* nbtLay = new QGridLayout( _myNbThresh->layout() ); + nbtLay->addWidget( _myOneThresh = new QRadioButton( "One threshold", _myNbThresh ), 0, 0 ); + nbtLay->addWidget( _myTwoThresh = new QRadioButton( "Two thresholds", _myNbThresh ), 0, 1 ); + _myGroupLayout->addWidget( _myNbThresh, row, 0 ); + +// _myOneThresh->setChecked(true); + _myNbThresh->hide(); + row++; + + // 4) reference area on thresholds (radiogroup) + _myArea = new QButtonGroup( "Select reference area", _GroupC1 ); + _myArea->setExclusive( true ); + _myArea->setColumnLayout( 0, Qt::Horizontal ); + QGridLayout* areaLay = new QGridLayout( _myArea->layout() ); + areaLay->addWidget( _myInt = new QRadioButton( "Interior", _myArea ), 0, 0 ); + areaLay->addWidget( _myExt = new QRadioButton( "Exterior", _myArea ), 0, 1 ); + _myGroupLayout->addWidget( _myArea, row, 0 ); + + _myExt->setChecked(true); + _myArea->hide(); + row++; + + // 5) threshold values (line edit) + _myVThresh = new QButtonGroup( "Threshold values", _GroupC1 ); + _myVThresh->setExclusive( true ); + _myVThresh->setColumnLayout( 0, Qt::Horizontal ); + QGridLayout* ftLay = new QGridLayout( _myVThresh->layout() ); + ftLay->addWidget( _myLFT = new QLabel( "threshold value " , _myVThresh ), 0, 0 ); + ftLay->addWidget( _myLEFT = new QLineEdit( "", _myVThresh ), 0, 1 ); + ftLay->addWidget( _myLST = new QLabel( "2d threshold value" , _myVThresh ), 1, 0 ); + ftLay->addWidget( _myLEST = new QLineEdit( "", _myVThresh ), 1, 1 ); + _myGroupLayout->addWidget( _myVThresh, row, 0 ); + + _myVThresh->hide(); + _myLST->hide(); + _myLEST->hide(); + row++; + + // 6) output file name (line edit) + _myOutFile = new QButtonGroup( "Output file name", _GroupC1 ); + _myOutFile->setExclusive( true ); + _myOutFile->setColumnLayout( 0, Qt::Horizontal ); + + _myOFB = new QPushButton( "Browse", _myOutFile ); + _myOFB->setText("Browse"); + _myOFB->setAutoDefault(TRUE); + + QGridLayout* outLay = new QGridLayout( _myOutFile->layout() ); + outLay->addWidget( _myOFB, 0, 0 ); + outLay->addWidget( _myOFN = new QLineEdit( "", _myOutFile ), 0, 1 ); + _myGroupLayout->addWidget( _myOutFile, row, 0 ); + + _myOutFile->hide(); + row++; + + // 8) process button (pushbutton) + _myProc = new QPushButton( "Process", _GroupC1 ); + _myProc->setText("Process"); + _myProc->setAutoDefault(TRUE); + _myGroupLayout->addWidget( _myProc, row, 0 ); + _myProc->hide(); + row++; + + _GroupC2 = new QGroupBox( _fr, "GroupC2" ); + _lay->addWidget( _GroupC2,0,1 ); + + _GroupC2->setTitle( tr( "Histogram" ) ); + _GroupC2->setColumnLayout(0, Qt::Vertical ); + _GroupC2->layout()->setSpacing( 0 ); + _GroupC2->layout()->setMargin( 0 ); + _myGroupLayout2 = new QGridLayout( _GroupC2->layout() ); + + _myPlot = new QwtPlot(_GroupC2); + _myHistoCurve = _myPlot->insertCurve( QString() ); + _myPlot->setCurvePen( _myHistoCurve, QPen( Qt::red, 1 ) ); + _myPlot->setCurveTitle( _myHistoCurve, "Histogram" ); + + _myGroupLayout2->addWidget( _myPlot, 0, 0 ); + + // 9) reduction rate (label) + _myGroupLayout2->addWidget( _myLRR = new QLabel( "reduction rate = 0.23", _GroupC2 ), 1, 0 ); + + _GroupC2->hide(); + _myLRR->hide(); + + _myHistoFThresh = _myPlot->insertCurve( QString() ); + _myPlot->setCurvePen( _myHistoFThresh, QPen( Qt::black, 1 ) ); + _myHistoSThresh = _myPlot->insertCurve( QString() ); + _myPlot->setCurvePen( _myHistoSThresh, QPen( Qt::black, 1 ) ); + + connect( _myHisto, SIGNAL(clicked()), this, SLOT(displayHisto())); + connect( _myOneThresh, SIGNAL(clicked()), this, SLOT(nbThreshSelected())); + connect( _myTwoThresh, SIGNAL(clicked()), this, SLOT(nbThreshSelected())); + connect( _myInt, SIGNAL(clicked()), this, SLOT(areaSelected())); + connect( _myExt, SIGNAL(clicked()), this, SLOT(areaSelected())); + connect( _myLEFT, SIGNAL(returnPressed()), this, SLOT(displayFThresh())); + connect( _myLEST, SIGNAL(returnPressed()), this, SLOT(displaySThresh())); + connect( _myPlot, SIGNAL(plotMouseMoved(const QMouseEvent &)), this, SLOT(moveThresh(const QMouseEvent &))); + connect( _myOFB, SIGNAL(clicked()), this, SLOT(getOutFileName())); + connect( _myProc, SIGNAL(clicked()), this, SLOT(process())); + + calcHisto(); + + return _fr; +} + +void SelectParams::nbThreshSelected() +{ + if( _myOneThresh->isChecked() ){ + _myInt->setText("bottom"); + _myExt->setText("up"); + _myLFT->setText("threshold value "); + _myLST->hide(); + _myLEST->hide(); + displayFThresh(); + clearSThresh(); + } + else{ + _myInt->setText("interior"); + _myExt->setText("exterior"); + _myLFT->setText("1st threshold value"); + if(_myLST->isHidden()) + _myLST->show(); + if(_myLEST->isHidden()) + _myLEST->show(); + displayFThresh(); + displaySThresh(); + } + calcRateRed(); + if(_myArea->isHidden()) + _myArea->show(); + if(_myVThresh->isHidden()) + _myVThresh->show(); + if(_myLRR->isHidden()) + _myLRR->show(); + if(_myOutFile->isHidden()) + _myOutFile->show(); + if(_myProc->isHidden()) + _myProc->show(); +} + +void SelectParams::areaSelected() +{ + calcRateRed(); +} + +void SelectParams::calcHisto() +{ + char strth[128]; + _xmin = -50.0; + _xmax = 50.0; + _ymax = 100.0; + _ymin = _ymax; + + for(int i=0;i<_size;i++){ + _x[i]=_xmin+(i*(_xmax-_xmin))/_size; + _y[i]=80.*exp(-_x[i]*_x[i]/400.); + if( (_y[i] < _ymin) && (_y[i] != 0.0) ) + _ymin = _y[i]; + } + _myPlot->setAxisScale( _myPlot->curveXAxis( _myHistoCurve ), _xmin, _xmax ); + _myPlot->setAxisScale( _myPlot->curveYAxis( _myHistoCurve ), _ymin, _ymax ); + _myPlot->setCurveData( _myHistoCurve, _x, _y, _size ); + _fthresh = (_xmin + _xmax)/2.0; + _sthresh = (_xmin + 3.*_xmax)/4.0; + sprintf(strth,"%g",_fthresh); + _myLEFT->setText(QString(strth)); + sprintf(strth,"%g",_sthresh); + _myLEST->setText(QString(strth)); +} + +void SelectParams::displayHisto() +{ + _qmap = _myPlot->canvasMap(_myPlot->curveXAxis( _myHistoCurve )); + _qmap.setDblRange(_xmin,_xmax); + if( _myLinear->isChecked() ) + _myPlot->setAxisOptions(_myPlot->curveYAxis( _myHistoCurve ), QwtAutoScale::None ); + else + _myPlot->setAxisOptions(_myPlot->curveYAxis( _myHistoCurve ), QwtAutoScale::Logarithmic ); + _myPlot->replot(); + if(_GroupC2->isHidden()) + _GroupC2->show(); + if(_myNbThresh->isHidden()) + _myNbThresh->show(); +} + +void SelectParams::displayFThresh() +{ + _fthresh = atof(_myLEFT->text()); + + for(int i=0;i<100;i++){ + _xft[i]=_fthresh; + _yft[i]=((i-1)*_ymax)/100.0; + } + _myPlot->setCurveData( _myHistoFThresh, _xft, _yft, 100 ); + _myPlot->replot(); +} + +void SelectParams::displaySThresh() +{ + _sthresh = atof(_myLEST->text()); + + for(int i=0;i<100;i++){ + _xst[i]=_sthresh; + _yst[i]=((i-1)*_ymax)/100.0; + } + _myPlot->setCurveData( _myHistoSThresh, _xst, _yst, 100 ); + _myPlot->replot(); +} + +void SelectParams::clearSThresh() +{ + _sthresh = atof(_myLEST->text()); + + for(int i=0;i<100;i++){ + _xst[i]=_sthresh; + _yst[i]=0.0; + } + _myPlot->setCurveData( _myHistoSThresh, _xst, _yst, 100 ); + _myPlot->replot(); +} + +void SelectParams::moveThresh(const QMouseEvent &e) +{ + char strth[128]; + int delta = abs(e.x()-_qmap.transform(_fthresh)); + if( delta < 5 ){ + sprintf(strth,"%g",_qmap.invTransform(e.x())); + _myLEFT->setText(QString(strth)); + displayFThresh(); + } + else if( _myTwoThresh->isChecked() ){ + delta = abs(e.x()-_qmap.transform(_sthresh)); + if( delta < 5 ){ + sprintf(strth,"%g",_qmap.invTransform(e.x())); + _myLEST->setText(QString(strth)); + displaySThresh(); + } + } + calcRateRed(); +} + +void SelectParams::getOutFileName() +{ + QString file = QFileDialog::getSaveFileName("/home", + "*.med", + _myOFB, + "save file dialog", + "Choose a file to save" ); + if(!file.isEmpty()) + _myOFN->setText(file); + + // Selection du Fichier +// file = SUIT_FileDlg::getFileName(application()->desktop(), +// "", +// filtersList, +// "Output MED file name", +// true); +} + +void SelectParams::process() +{ + string command; + + MESSAGE("Input MED File : "<<_inputFile); + MESSAGE("Input Mesh : "<<_inputMesh); + MESSAGE("Input Field : "<<_inputField); + MESSAGE("Input Time Step : "<<_inputTS); + MESSAGE("Output file name: " << _myOFN->text() ); + command = "cd /export/home/secher/filtoo/example;filtoo -f s -o sf > /tmp/filter.log"; + MESSAGE(command); + system(command.c_str()); +// delete this; +} + +void SelectParams::calcRateRed() +{ + int i1, i2, i; + int atot=0, asel=0, atot1; + double rateRed=0.0; + char strth[128]; + + i1 = (int)((double)_size * ( _fthresh - _xmin ) / ( _xmax - _xmin )); + if( _myOneThresh->isChecked() ){ + for(i=0;iisChecked() ) + asel = atot - asel; + } + else{ + i2 = (int)((double)_size * ( _sthresh - _xmin ) / ( _xmax - _xmin )); + if( i2 < i1 ){ + i=i1; + i1=i2; + i2=i; + } + for(i=0;iisChecked() ) + asel = atot - asel; + } + rateRed = (double)asel / (double) atot; + sprintf(strth,"reduction rate = %4.2g",rateRed); + _myLRR->setText( strth ); + + +} + diff --git a/src/FILTERGUI/SelectParams.h b/src/FILTERGUI/SelectParams.h new file mode 100644 index 0000000..54eee20 --- /dev/null +++ b/src/FILTERGUI/SelectParams.h @@ -0,0 +1,92 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef SELECTPARAMS_HEADER +#define SELECTPARAMS_HEADER + +#include "SelectField.h" +#include +#include +#include +#include + +#include +/* #include CORBA_CLIENT_HEADER(MED_Gen) */ + +class QLineEdit; +class QLabel; +class QButtonGroup; +class QGridLayout; +class QRadioButton; +class QPushButton; +class QGroupBox; +class QFrame; + +class SelectParams: public QObject +{ + Q_OBJECT + +public: + SelectParams(SelectField *sel); + virtual ~SelectParams(); + + virtual QFrame* buildFrame(); + +protected: + virtual void calcHisto(); + virtual void calcRateRed(); + virtual void clearSThresh(); + +protected slots: + virtual void displayHisto(); + virtual void nbThreshSelected(); + virtual void areaSelected(); + virtual void displayFThresh(); + virtual void displaySThresh(); + virtual void moveThresh(const QMouseEvent &e); + virtual void getOutFileName(); + virtual void process(); + +private: + +private: + int _size; + long _myHistoCurve, _myHistoFThresh, _myHistoSThresh; + double _xmin, _xmax, _ymin, _ymax; + double _fthresh, _sthresh; + double *_x, *_y; + double _xft[100], _yft[100], _xst[100], _yst[100]; + + QLineEdit *_myFThresh, *_myExpr, *_myLEST, *_myLEFT, *_myOFN; + QButtonGroup *_myFunc, *_myFScale, *_myNbThresh, *_myArea, *_myVThresh, *_myOutFile; + QGridLayout *_myGroupLayout, *_myGroupLayout2, *_lay; + QRadioButton *_myCutNeg, *_myInt, *_myExt, *_myOneThresh, *_myTwoThresh, *_myFieldB, *_myLinear; + QPushButton *_myHisto, *_myOFB, *_myProc; + QGroupBox* _GroupC1, *_GroupC2; + QwtPlot *_myPlot; + QLabel *_myLFT, *_myLST, *_myLRR; + QwtDiMap _qmap; + QFrame *_fr; + QString _inputFile, _inputMesh, _inputField; + int _inputTS; + +}; + +#endif diff --git a/src/Makefile.in b/src/Makefile.in new file mode 100644 index 0000000..8c34e49 --- /dev/null +++ b/src/Makefile.in @@ -0,0 +1,39 @@ +# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# +# +# File : Makefile.in +# Author : Bernard SECHER, CEA +# Module : MED +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + +@COMMENCE@ + +SUBDIRS = FILTER FILTERGUI + +LDFLAGS= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome +LDFLAGSFORBIN= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome + +@MODULE@ -- 2.30.2