From cfd3fe5289299191bd72022244f1f66dcd533776 Mon Sep 17 00:00:00 2001 From: prascle Date: Fri, 5 Apr 2013 09:15:06 +0000 Subject: [PATCH] PR: adaptation to new geometry and mesh packaging (geomBuilder, smeshBuilder) --- doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am | 5 +-- doc/salome/gui/GHS3DPRLPLUGIN/doxyfile.in | 7 ++++- doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in | 6 ++-- .../input/ghs3dprlplugin_python_interface.doc | 4 +-- idl/Makefile.am | 31 +++++++++++-------- resources/GHS3DPRLPlugin.xml | 2 +- ...RLPluginDC.py => GHS3DPRLPluginBuilder.py} | 6 ++-- src/GHS3DPRLPlugin/Makefile.am | 16 ++++++---- src/GHS3DPRLPlugin/__init__.py | 23 ++++++++++++++ src/gui/Makefile.am | 11 ++++--- 10 files changed, 74 insertions(+), 37 deletions(-) rename src/GHS3DPRLPlugin/{GHS3DPRLPluginDC.py => GHS3DPRLPluginBuilder.py} (96%) create mode 100644 src/GHS3DPRLPlugin/__init__.py diff --git a/doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am b/doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am index e6552f1..b6d0a75 100755 --- a/doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am +++ b/doc/salome/gui/GHS3DPRLPLUGIN/Makefile.am @@ -27,10 +27,7 @@ DOC_PYTHONPATH=$(prefix)/bin/salome:$(SMESH_ROOT_DIR)/bin/salome:$(SMESH_ROOT_DI DOC_LD_LIBRARY_PATH=$(prefix)/lib/salome:${SMESH_ROOT_DIR}/lib/salome:${MED_ROOT_DIR}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome DOC_SMESH_MeshersList=GHS3DPRLPlugin -smesh.py: $(top_srcdir)/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py - @PYTHONPATH=$(DOC_PYTHONPATH):${PYTHONPATH} LD_LIBRARY_PATH=$(DOC_LD_LIBRARY_PATH):${LD_LIBRARY_PATH} SMESH_MeshersList=$(DOC_SMESH_MeshersList) $(PYTHON) $(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py -d -o $@ GHS3DPRLPlugin - -usr_docs: doxyfile_py doxyfile smesh.py +usr_docs: doxyfile_py doxyfile @$(DOXYGEN) doxyfile_py ; \ $(DOXYGEN) doxyfile diff --git a/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile.in b/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile.in index 97f3775..f27489e 100755 --- a/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile.in +++ b/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile.in @@ -77,4 +77,9 @@ GENERATE_RTF = NO #rnv: 07.04.2011 Workaround for the doxygen 1.7.3: #because it wrongly defines location of the html files for search. TAGFILES = ghs3dprlpluginpy_doc.tag=../GHS3DPRLPLUGIN/ghs3dprlpluginpy_doc -SEARCHENGINE = YES \ No newline at end of file +SEARCHENGINE = YES + +#--------------------------------------------------------------------------- +#Custom commands +#--------------------------------------------------------------------------- +ALIASES += tui_script{1}="\include \1 Download this script" diff --git a/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in b/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in index 9ad955e..841b2f5 100755 --- a/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in +++ b/doc/salome/gui/GHS3DPRLPLUGIN/doxyfile_py.in @@ -96,9 +96,9 @@ EXAMPLE_RECURSIVE = NO #--------------------------------------------------------------------------- #Input related options #--------------------------------------------------------------------------- -INPUT = @top_srcdir@/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py \ - smesh.py \ - @SMESH_ROOT_DIR@/bin/salome/smesh_algorithm.py +INPUT = @top_srcdir@/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py \ + @SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smeshBuilder.py \ + @SMESH_ROOT_DIR@/lib/python@PYTHON_VERSION@/site-packages/salome/salome/smesh/smesh_algorithm.py FILE_PATTERNS = IMAGE_PATH = @srcdir@/images RECURSIVE = NO diff --git a/doc/salome/gui/GHS3DPRLPLUGIN/input/ghs3dprlplugin_python_interface.doc b/doc/salome/gui/GHS3DPRLPLUGIN/input/ghs3dprlplugin_python_interface.doc index 8ef266e..1f96f76 100644 --- a/doc/salome/gui/GHS3DPRLPLUGIN/input/ghs3dprlplugin_python_interface.doc +++ b/doc/salome/gui/GHS3DPRLPLUGIN/input/ghs3dprlplugin_python_interface.doc @@ -2,8 +2,8 @@ \page ghs3dprlplugin_python_interface_page Python Interface -Python package GHS3DPRLPluginDC defines several classes, destined for creation of the 3D meshes. +Python package GHS3DPRLPlugin defines several classes, destined for creation of the 3D meshes. -GHS3DPRL meshing plugin dynamically adds several methods to the smesh.Mesh class to create meshing algorithms. +GHS3DPRL meshing plugin dynamically adds several methods to the \ref SMESH_SWIG.smeshBuilder.Mesh "class Mesh" class to create meshing algorithms. */ diff --git a/idl/Makefile.am b/idl/Makefile.am index 135fc9f..0ab2ea2 100644 --- a/idl/Makefile.am +++ b/idl/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D +# Copyright (C) 2004-2013 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,10 +17,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# --- -# File : Makefile.am -# Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com) -# --- # This Makefile is responsible of generating the client and server # implementation of IDL interfaces for both C++ and python usage. # The building process of the C++ files is in charge of each source @@ -39,33 +35,40 @@ dist_salomeidl_DATA = $(BASEIDL_FILES) lib_LTLIBRARIES = libSalomeIDLGHS3DPRLPLUGIN.la # Sources built from idl files -nodist_libSalomeIDLGHS3DPRLPLUGIN_la_SOURCES = GHS3DPRLPlugin_AlgorithmSK.cc +nodist_libSalomeIDLGHS3DPRLPLUGIN_la_SOURCES = \ + GHS3DPRLPlugin_AlgorithmSK.cc \ + GHS3DPRLPlugin_AlgorithmDynSK.cc +GHS3DPRLPlugin_AlgorithmDynSK.cc: GHS3DPRLPlugin_AlgorithmSK.cc # header files must be exported: other modules have to use this library nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh) libSalomeIDLGHS3DPRLPLUGIN_la_CPPFLAGS = \ + -I$(top_builddir)/idl \ + $(CORBA_CXXFLAGS) \ + $(CORBA_INCLUDES) \ $(KERNEL_CXXFLAGS) \ $(GEOM_CXXFLAGS) \ - $(SMESH_CXXFLAGS) \ - @CORBA_CXXFLAGS@ \ - @CORBA_INCLUDES@ \ - -I$(top_builddir)/idl + $(MED_CXXFLAGS) \ + $(SMESH_CXXFLAGS) libSalomeIDLGHS3DPRLPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0 libSalomeIDLGHS3DPRLPLUGIN_la_LIBADD = \ $(KERNEL_LDFLAGS) -lSalomeIDLKernel \ - $(SMESH_LDFLAGS) -lSalomeIDLSMESH \ $(GEOM_LDFLAGS) -lSalomeIDLGEOM \ + $(MED_LDFLAGS) -lSalomeIDLMED \ + $(SMESH_LDFLAGS) -lSalomeIDLSMESH \ @CORBA_LIBS@ # These variables defines the building process of CORBA files OMNIORB_IDL = @OMNIORB_IDL@ OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@ -OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ \ +OMNIORB_IDLPYFLAGS = \ + @OMNIORB_IDLPYFLAGS@ \ -I$(top_builddir)/idl/salome \ -I$(KERNEL_ROOT_DIR)/idl/salome \ -I$(GEOM_ROOT_DIR)/idl/salome \ + -I$(MED_ROOT_DIR)/idl/salome \ -I$(SMESH_ROOT_DIR)/idl/salome IDLCXXFLAGS = \ @@ -74,11 +77,13 @@ IDLCXXFLAGS = \ -I$(top_builddir)/idl/salome \ -I$(KERNEL_ROOT_DIR)/idl/salome \ -I$(GEOM_ROOT_DIR)/idl/salome \ + -I$(MED_ROOT_DIR)/idl/salome \ -I$(SMESH_ROOT_DIR)/idl/salome IDLPYFLAGS = \ @IDLPYFLAGS@ \ -I$(KERNEL_ROOT_DIR)/idl/salome \ -I$(GEOM_ROOT_DIR)/idl/salome \ + -I$(MED_ROOT_DIR)/idl/salome \ -I$(SMESH_ROOT_DIR)/idl/salome # potential problem on parallel make on the following - multiple outputs @@ -116,7 +121,7 @@ mostlyclean-local: @for dep in $^ dummy; do \ if [ $$dep != "dummy" ]; then \ echo Building dependencies for $$dep; \ - $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \ + $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome $$dep 2>/dev/null | \ sed 's/\.o/\SK.cc/' >>$@; \ fi; \ done ; diff --git a/resources/GHS3DPRLPlugin.xml b/resources/GHS3DPRLPlugin.xml index d630a4a..c7e4816 100755 --- a/resources/GHS3DPRLPlugin.xml +++ b/resources/GHS3DPRLPlugin.xml @@ -43,7 +43,7 @@ input="TRIA,QUAD" dim="3"> - GHS3DPRL_3D=Tetrahedron(algo=smesh.GHS3DPRL) + GHS3DPRL_3D=Tetrahedron(algo=smeshBuilder.GHS3DPRL) GHS3DPRL_Parameters=Parameters() diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py b/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py similarity index 96% rename from src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py rename to src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py index e8a5bd7..85680ce 100644 --- a/src/GHS3DPRLPlugin/GHS3DPRLPluginDC.py +++ b/src/GHS3DPRLPlugin/GHS3DPRLPluginBuilder.py @@ -18,11 +18,11 @@ # ## -# @package GHS3DPRLPluginDC +# @package GHS3DPRLPluginBuilder # Python API for the GHS3DPRL meshing plug-in module. -from smesh_algorithm import Mesh_Algorithm -from smesh import AssureGeomPublished +from salome.smesh.smesh_algorithm import Mesh_Algorithm +from salome.smesh.smeshBuilder import AssureGeomPublished # import GHS3DPRLPlugin module if possible noGHS3DPRLPlugin = 0 diff --git a/src/GHS3DPRLPlugin/Makefile.am b/src/GHS3DPRLPlugin/Makefile.am index c77f847..89ab43b 100644 --- a/src/GHS3DPRLPlugin/Makefile.am +++ b/src/GHS3DPRLPlugin/Makefile.am @@ -56,12 +56,16 @@ libGHS3DPRLEngine_la_CPPFLAGS = \ -I$(top_builddir)/idl libGHS3DPRLEngine_la_LDFLAGS = \ - ../../idl/libSalomeIDLGHS3DPRLPLUGIN.la \ - $(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine \ - $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace \ + ../../idl/libSalomeIDLGHS3DPRLPLUGIN.la \ + $(CAS_KERNEL) -lTKBRep -lTKG2d -lTKG3d -lTKTopAlgo -lTKGeomBase -lTKGeomAlgo -lTKCDF \ $(MED_LDFLAGS) -lSalomeIDLMED \ - $(CAS_LDFLAGS) -lTKBRep -lTKG3d -lTKTopAlgo\ - $(SMESH_LDFLAGS) -lSMDS -lSMESHDS -lTKG2d + $(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lSMESHDS -lSMDS -lStdMeshers -lMeshDriverGMF \ + $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace -lSALOMEBasics -lSalomeNS -lOpUtil # Scripts to be installed. -dist_salomescript_DATA= GHS3DPRLPluginDC.py +#dist_salomescript_DATA= GHS3DPRLPluginDC.py +mypkgpythondir = $(salomepythondir)/salome/GHS3DPRLPlugin +mypkgpython_PYTHON = \ + __init__.py \ + GHS3DPRLPluginBuilder.py + diff --git a/src/GHS3DPRLPlugin/__init__.py b/src/GHS3DPRLPlugin/__init__.py new file mode 100644 index 0000000..72bdea5 --- /dev/null +++ b/src/GHS3DPRLPlugin/__init__.py @@ -0,0 +1,23 @@ +# Copyright (C) 2007-2013 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +## +# @package GHS3DPluginBuilder +# Python API for the GHS3D meshing plug-in module. + diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 4821988..d69217c 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -59,11 +59,14 @@ libGHS3DPRLPluginGUI_la_CPPFLAGS = \ -I$(top_builddir)/idl libGHS3DPRLPluginGUI_la_LDFLAGS = \ + ../../idl/libSalomeIDLGHS3DPRLPLUGIN.la \ $(QT_LIBS) \ - ../GHS3DPRLPlugin/libGHS3DPRLEngine.la \ - ${SMESH_LDFLAGS} -lSMESH \ - $(CAS_KERNEL) \ - $(GUI_LDFLAGS) -lsuit -lqtx -lSalomeApp + $(KERNEL_LDFLAGS) -lSALOMELocalTrace \ + $(MED_LDFLAGS) -lSalomeIDLMED \ + $(GEOM_LDFLAGS) -lGEOM \ + $(SMESH_LDFLAGS) -lSMESH -lGeomSelectionTools -lStdMeshersGUI -lSMESHFiltersSelection \ + $(GUI_LDFLAGS) -lsuit -lqtx -lSalomeApp \ + $(CAS_KERNEL) # resources files nodist_salomeres_DATA = \ -- 2.30.2