]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Merge with BR_Dev_For_4_0 (initial version)
authorapo <apo@opencascade.com>
Fri, 20 Apr 2007 15:08:45 +0000 (15:08 +0000)
committerapo <apo@opencascade.com>
Fri, 20 Apr 2007 15:08:45 +0000 (15:08 +0000)
33 files changed:
src/CONVERTOR/Makefile.am [new file with mode: 0644]
src/CONVERTOR/Makefile.in
src/CONVERTOR/VISUConvertor.cxx
src/CONVERTOR/VISUConvertor.hxx [new file with mode: 0755]
src/CONVERTOR/VISU_AppendFilter.cxx [new file with mode: 0644]
src/CONVERTOR/VISU_AppendFilter.hxx [new file with mode: 0644]
src/CONVERTOR/VISU_AppendFilterUtilities.cxx [new file with mode: 0644]
src/CONVERTOR/VISU_AppendFilterUtilities.hxx [new file with mode: 0644]
src/CONVERTOR/VISU_AppendPolyData.cxx
src/CONVERTOR/VISU_AppendPolyData.hxx
src/CONVERTOR/VISU_CommonCellsFilter.cxx [new file with mode: 0644]
src/CONVERTOR/VISU_CommonCellsFilter.hxx [new file with mode: 0644]
src/CONVERTOR/VISU_Convertor.cxx
src/CONVERTOR/VISU_Convertor.hxx
src/CONVERTOR/VISU_ConvertorDef_impl.hxx
src/CONVERTOR/VISU_ConvertorUtils.cxx
src/CONVERTOR/VISU_ConvertorUtils.hxx
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_Convertor_impl.hxx
src/CONVERTOR/VISU_ExtractUnstructuredGrid.cxx
src/CONVERTOR/VISU_ExtractUnstructuredGrid.hxx
src/CONVERTOR/VISU_IDMapper.cxx
src/CONVERTOR/VISU_IDMapper.hxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/CONVERTOR/VISU_MedConvertor.hxx
src/CONVERTOR/VISU_MergeFilter.cxx
src/CONVERTOR/VISU_MergeFilter.hxx
src/CONVERTOR/VISU_MergeFilterUtilities.cxx [new file with mode: 0644]
src/CONVERTOR/VISU_MergeFilterUtilities.hxx [new file with mode: 0644]
src/CONVERTOR/VISU_PointCoords.cxx
src/CONVERTOR/VISU_PointCoords.hxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/CONVERTOR/VISU_Structures_impl.hxx

diff --git a/src/CONVERTOR/Makefile.am b/src/CONVERTOR/Makefile.am
new file mode 100644 (file)
index 0000000..b26b7f1
--- /dev/null
@@ -0,0 +1,94 @@
+#  VISU OBJECT : interactive object for VISU entities implementation
+#
+#  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.am
+#  Module : VISU
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+lib_LTLIBRARIES = libVisuConvertor.la
+
+salomeinclude_HEADERS= \
+       VISU_TypeList.hxx \
+       VISU_IDMapper.hxx \
+       VISU_ConvertorDef.hxx \
+       VISU_Structures.hxx \
+       VISU_Convertor.hxx \
+       VISU_ConvertorDef_impl.hxx \
+       VISU_Structures_impl.hxx \
+       VISU_MeshValue.hxx \
+       VISU_PointCoords.hxx \
+       VISU_Convertor_impl.hxx \
+       VISU_ConvertorUtils.hxx \
+       VISU_MergeFilter.hxx \
+       VISU_AppendFilter.hxx \
+       VISU_AppendPolyData.hxx \
+       VISU_AppendFilterUtilities.hxx \
+       VISU_ExtractUnstructuredGrid.hxx \
+       VISU_CommonCellsFilter.hxx \
+       VISUConvertor.hxx
+
+dist_libVisuConvertor_la_SOURCES= \
+       VISU_IDMapper.cxx \
+       VISU_Structures.cxx \
+       VISU_Convertor.cxx \
+       VISU_Structures_impl.cxx \
+       VISU_MeshValue.cxx \
+       VISU_PointCoords.cxx \
+       VISU_Convertor_impl.cxx \
+       VISU_MedConvertor.cxx \
+       VISU_ConvertorUtils.cxx \
+       VISU_ExtractUnstructuredGrid.cxx \
+       VISU_AppendFilter.cxx \
+       VISU_AppendPolyData.cxx \
+       VISU_AppendFilterUtilities.cxx \
+       VISU_MergeFilter.cxx \
+       VISU_MergeFilterUtilities.cxx \
+       VISU_CommonCellsFilter.cxx
+
+libVisuConvertor_la_CPPFLAGS= \
+       -ftemplate-depth-32 \
+       $(VTK_INCLUDES) \
+       $(HDF5_INCLUDES) \
+       $(QT_INCLUDES) \
+       @CAS_CPPFLAGS@ \
+       @CAS_CXXFLAGS@ \
+       @KERNEL_CXXFLAGS@ \
+       @MED_CXXFLAGS@ \
+       @GUI_CXXFLAGS@ \
+       $(BOOST_CPPFLAGS) \
+       -I$(top_builddir)/salome_adm/unix
+
+libVisuConvertor_la_LDFLAGS= \
+       $(VTK_LIBS) \
+       $(QT_LIBS) \
+       $(CAS_KERNEL) \
+       $(CAS_MATH) \
+       $(BOOST_LIBS) -lboost_thread@BOOST_LIBSUFFIX@ \
+       $(MED_LDFLAGS) -lMEDWrapper \
+       $(GUI_LDFLAGS) -lVTKViewer
+
+# Executables targets
+bin_PROGRAMS= VISUConvertor
+dist_VISUConvertor_SOURCES= VISUConvertor.cxx
+VISUConvertor_CPPFLAGS=$(libVisuConvertor_la_CPPFLAGS)
+VISUConvertor_LDADD=$(libVisuConvertor_la_LDFLAGS) \
+       -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lMEDWrapper -lmed_V2_1 -lVTKViewer -lsuit -lqtx libVisuConvertor.la
index ba11b72f5128c0e339288c66f438410c4bbcfb1a..e9e7ed85d4b6fc97d23ef1daf3c88d84d51cde78 100644 (file)
@@ -1,3 +1,19 @@
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
 #  VISU OBJECT : interactive object for VISU entities implementation
 #
 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # 
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+#  File   : Makefile.am
+#  Module : VISU
+
 #
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
 #
-#  File   : Makefile.in
-#  Module : VISU
 
-top_srcdir=@top_srcdir@
-top_builddir=../..
-srcdir=@srcdir@
-VPATH=.:@srcdir@
-BOOST_LIBSUFFIX=@BOOST_LIBSUFFIX@
 
-@COMMENCE@
 
-EXPORT_HEADERS = \
+SOURCES = $(dist_libVisuConvertor_la_SOURCES) $(dist_VISUConvertor_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(salomeinclude_HEADERS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in \
+       $(top_srcdir)/adm_local/unix/make_common_starter.am
+bin_PROGRAMS = VISUConvertor$(EXEEXT)
+subdir = ./src/CONVERTOR
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/salome_adm/unix/config_files/ac_cxx_depend_flag.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/ac_cxx_have_sstream.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/ac_cxx_namespaces.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/ac_cxx_option.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/ac_cxx_use_std_iostream.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/ac_linker_options.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/acx_pthread.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_Kernel.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_boost.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_cas.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_corba.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_hdf5.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_htmlgen.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_mpich.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_omniorb.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_opengl.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_qt.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/check_swig.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/enable_pthreads.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/production.m4 \
+       $(top_srcdir)/salome_adm/unix/config_files/python.m4 \
+       $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
+       "$(DESTDIR)$(salomeincludedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libVisuConvertor_la_LIBADD =
+dist_libVisuConvertor_la_OBJECTS =  \
+       libVisuConvertor_la-VISU_IDMapper.lo \
+       libVisuConvertor_la-VISU_Structures.lo \
+       libVisuConvertor_la-VISU_Convertor.lo \
+       libVisuConvertor_la-VISU_Structures_impl.lo \
+       libVisuConvertor_la-VISU_MeshValue.lo \
+       libVisuConvertor_la-VISU_PointCoords.lo \
+       libVisuConvertor_la-VISU_Convertor_impl.lo \
+       libVisuConvertor_la-VISU_MedConvertor.lo \
+       libVisuConvertor_la-VISU_ConvertorUtils.lo \
+       libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo \
+       libVisuConvertor_la-VISU_AppendFilter.lo \
+       libVisuConvertor_la-VISU_AppendPolyData.lo \
+       libVisuConvertor_la-VISU_AppendFilterUtilities.lo \
+       libVisuConvertor_la-VISU_MergeFilter.lo \
+       libVisuConvertor_la-VISU_MergeFilterUtilities.lo \
+       libVisuConvertor_la-VISU_CommonCellsFilter.lo
+libVisuConvertor_la_OBJECTS = $(dist_libVisuConvertor_la_OBJECTS)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+dist_VISUConvertor_OBJECTS = VISUConvertor-VISUConvertor.$(OBJEXT)
+VISUConvertor_OBJECTS = $(dist_VISUConvertor_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+VISUConvertor_DEPENDENCIES = $(am__DEPENDENCIES_2) libVisuConvertor.la
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+depcomp = $(SHELL) $(top_srcdir)/salome_adm/unix/config_files/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(dist_libVisuConvertor_la_SOURCES) \
+       $(dist_VISUConvertor_SOURCES)
+DIST_SOURCES = $(dist_libVisuConvertor_la_SOURCES) \
+       $(dist_VISUConvertor_SOURCES)
+salomeincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(salomeinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_LIBS = @BOOST_LIBS@
+BOOST_LIBSUFFIX = @BOOST_LIBSUFFIX@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
+CAS_CPPFLAGS = @CAS_CPPFLAGS@
+CAS_CXXFLAGS = @CAS_CXXFLAGS@
+CAS_DATAEXCHANGE = @CAS_DATAEXCHANGE@
+CAS_KERNEL = @CAS_KERNEL@
+CAS_LDFLAGS = @CAS_LDFLAGS@
+CAS_LDPATH = @CAS_LDPATH@
+CAS_MATH = @CAS_MATH@
+CAS_MODELER = @CAS_MODELER@
+CAS_OCAF = @CAS_OCAF@
+CAS_OCAFVIS = @CAS_OCAFVIS@
+CAS_STDPLUGIN = @CAS_STDPLUGIN@
+CAS_TKTopAlgo = @CAS_TKTopAlgo@
+CAS_VIEWER = @CAS_VIEWER@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
+CORBA_INCLUDES = @CORBA_INCLUDES@
+CORBA_IN_GUI = @CORBA_IN_GUI@
+CORBA_LIBS = @CORBA_LIBS@
+CORBA_ROOT = @CORBA_ROOT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
+CYGPATH_W = @CYGPATH_W@
+C_DEPEND_FLAG = @C_DEPEND_FLAG@
+DEFS = @DEFS@
+DEPCC = @DEPCC@
+DEPCXX = @DEPCXX@
+DEPCXXFLAGS = @DEPCXXFLAGS@
+DEPDIR = @DEPDIR@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_WITH_PYTHON = @DOXYGEN_WITH_PYTHON@
+DOXYGEN_WITH_STL = @DOXYGEN_WITH_STL@
+DVIPS = @DVIPS@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GUI_CXXFLAGS = @GUI_CXXFLAGS@
+GUI_LDFLAGS = @GUI_LDFLAGS@
+GUI_ROOT_DIR = @GUI_ROOT_DIR@
+HAVE_SSTREAM = @HAVE_SSTREAM@
+HDF5_INCLUDES = @HDF5_INCLUDES@
+HDF5_LIBS = @HDF5_LIBS@
+HDF5_MT_LIBS = @HDF5_MT_LIBS@
+IDL = @IDL@
+IDLCXXFLAGS = @IDLCXXFLAGS@
+IDLPYFLAGS = @IDLPYFLAGS@
+IDL_CLN_CXX = @IDL_CLN_CXX@
+IDL_CLN_H = @IDL_CLN_H@
+IDL_CLN_OBJ = @IDL_CLN_OBJ@
+IDL_SRV_CXX = @IDL_SRV_CXX@
+IDL_SRV_H = @IDL_SRV_H@
+IDL_SRV_OBJ = @IDL_SRV_OBJ@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KERNEL_CXXFLAGS = @KERNEL_CXXFLAGS@
+KERNEL_LDFLAGS = @KERNEL_LDFLAGS@
+KERNEL_ROOT_DIR = @KERNEL_ROOT_DIR@
+KERNEL_SITE_DIR = @KERNEL_SITE_DIR@
+LATEX = @LATEX@
+LDEXPDYNFLAGS = @LDEXPDYNFLAGS@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_LOCATION_SUFFIX = @LIB_LOCATION_SUFFIX@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MACHINE = @MACHINE@
+MAKEINFO = @MAKEINFO@
+MED_CXXFLAGS = @MED_CXXFLAGS@
+MED_LDFLAGS = @MED_LDFLAGS@
+MED_ROOT_DIR = @MED_ROOT_DIR@
+MOC = @MOC@
+MODULE_NAME = @MODULE_NAME@
+MSG2QM = @MSG2QM@
+OBJEXT = @OBJEXT@
+OGL_INCLUDES = @OGL_INCLUDES@
+OGL_LIBS = @OGL_LIBS@
+OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@
+OMNIORB_IDL = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@
+OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
+OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
+OMNIORB_IDL_CLN_OBJ = @OMNIORB_IDL_CLN_OBJ@
+OMNIORB_IDL_SRV_CXX = @OMNIORB_IDL_SRV_CXX@
+OMNIORB_IDL_SRV_H = @OMNIORB_IDL_SRV_H@
+OMNIORB_IDL_SRV_OBJ = @OMNIORB_IDL_SRV_OBJ@
+OMNIORB_IDL_TIE_CXX = @OMNIORB_IDL_TIE_CXX@
+OMNIORB_IDL_TIE_H = @OMNIORB_IDL_TIE_H@
+OMNIORB_INCLUDES = @OMNIORB_INCLUDES@
+OMNIORB_LIBS = @OMNIORB_LIBS@
+OMNIORB_ROOT = @OMNIORB_ROOT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHONHOME = @PYTHONHOME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE = @PYTHON_SITE@
+PYTHON_SITE_EXEC = @PYTHON_SITE_EXEC@
+PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@
+PYTHON_SITE_PACKAGE = @PYTHON_SITE_PACKAGE@
+PYTHON_VERSION = @PYTHON_VERSION@
+QTDIR = @QTDIR@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LIBS = @QT_LIBS@
+QT_MT_INCLUDES = @QT_MT_INCLUDES@
+QT_MT_LIBS = @QT_MT_LIBS@
+QT_ROOT = @QT_ROOT@
+QT_VERS = @QT_VERS@
+QWT_INCLUDES = @QWT_INCLUDES@
+QWT_LIBS = @QWT_LIBS@
+RANLIB = @RANLIB@
+ROOT_BUILDDIR = @ROOT_BUILDDIR@
+ROOT_SRCDIR = @ROOT_SRCDIR@
+RST2HTML = @RST2HTML@
+RST2HTML_IS_OK_FALSE = @RST2HTML_IS_OK_FALSE@
+RST2HTML_IS_OK_TRUE = @RST2HTML_IS_OK_TRUE@
+SETX = @SETX@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDLIB = @STDLIB@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_FLAGS = @SWIG_FLAGS@
+TEMP = @TEMP@
+UIC = @UIC@
+VERSION = @VERSION@
+VTKPY_MODULES = @VTKPY_MODULES@
+VTK_INCLUDES = @VTK_INCLUDES@
+VTK_LIBS = @VTK_LIBS@
+XVERSION = @XVERSION@
+YACC = @YACC@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = $(prefix)/bin/@PACKAGE@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+
+# Standard directory for installation
+salomeincludedir = $(includedir)/@PACKAGE@
+purebindir = $(prefix)/bin
+salomescriptdir = $(bindir)
+
+# Tests environment folders
+testsenvirondir = $(prefix)/Tests/environ
+testsenvironcshdir = $(prefix)/Tests/environ/csh
+
+# Directory for installing idl files
+salomeidldir = $(prefix)/idl/@PACKAGE@
+
+# Directory for installing resource files
+salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir = $(prefix)/adm_local
+admlocalunixdir = $(admlocaldir)/unix
+admlocalm4dir = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(pkgpythondir)/shared_modules
+
+# Documentation directory
+docdir = $(datadir)/doc/@PACKAGE@
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
+lib_LTLIBRARIES = libVisuConvertor.la
+salomeinclude_HEADERS = \
        VISU_TypeList.hxx \
        VISU_IDMapper.hxx \
        VISU_ConvertorDef.hxx \
@@ -45,13 +433,14 @@ EXPORT_HEADERS = \
        VISU_Convertor_impl.hxx \
        VISU_ConvertorUtils.hxx \
        VISU_MergeFilter.hxx \
+       VISU_AppendFilter.hxx \
        VISU_AppendPolyData.hxx \
-       VISU_ExtractUnstructuredGrid.hxx
+       VISU_AppendFilterUtilities.hxx \
+       VISU_ExtractUnstructuredGrid.hxx \
+       VISU_CommonCellsFilter.hxx \
+       VISUConvertor.hxx
 
-# Libraries targets
-
-LIB = libVisuConvertor.la
-LIB_SRC = \
+dist_libVisuConvertor_la_SOURCES = \
        VISU_IDMapper.cxx \
        VISU_Structures.cxx \
        VISU_Convertor.cxx \
@@ -62,32 +451,530 @@ LIB_SRC = \
        VISU_MedConvertor.cxx \
        VISU_ConvertorUtils.cxx \
        VISU_ExtractUnstructuredGrid.cxx \
+       VISU_AppendFilter.cxx \
        VISU_AppendPolyData.cxx \
-       VISU_MergeFilter.cxx
-
-# Executables targets
-BIN = VISUConvertor
-BIN_SRC = 
+       VISU_AppendFilterUtilities.cxx \
+       VISU_MergeFilter.cxx \
+       VISU_MergeFilterUtilities.cxx \
+       VISU_CommonCellsFilter.cxx
 
-CPPFLAGS+= -ftemplate-depth-32 \
+libVisuConvertor_la_CPPFLAGS = \
+       -ftemplate-depth-32 \
        $(VTK_INCLUDES) \
        $(HDF5_INCLUDES) \
        $(QT_INCLUDES) \
-       $(OCC_INCLUDES) \
-       $(OCC_CXXFLAGS) \
-       $(KERNEL_CXXFLAGS) \
-       $(MED_CXXFLAGS) \
-       $(GUI_CXXFLAGS) \
-       $(BOOST_CPPFLAGS)
-
-LDFLAGS+= $(VTK_LIBS) \
+       @CAS_CPPFLAGS@ \
+       @CAS_CXXFLAGS@ \
+       @KERNEL_CXXFLAGS@ \
+       @MED_CXXFLAGS@ \
+       @GUI_CXXFLAGS@ \
+       $(BOOST_CPPFLAGS) \
+       -I$(top_builddir)/salome_adm/unix
+
+libVisuConvertor_la_LDFLAGS = \
+       $(VTK_LIBS) \
        $(QT_LIBS) \
        $(CAS_KERNEL) \
        $(CAS_MATH) \
-       $(BOOST_LIBS) -lboost_thread${BOOST_LIBSUFFIX} \
+       $(BOOST_LIBS) -lboost_thread@BOOST_LIBSUFFIX@ \
        $(MED_LDFLAGS) -lMEDWrapper \
        $(GUI_LDFLAGS) -lVTKViewer
 
-LDFLAGSFORBIN=$(LDFLAGS) -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lmed_V2_1 -lVTKViewer -lsuit -lqtx
+dist_VISUConvertor_SOURCES = VISUConvertor.cxx
+VISUConvertor_CPPFLAGS = $(libVisuConvertor_la_CPPFLAGS)
+VISUConvertor_LDADD = $(libVisuConvertor_la_LDFLAGS) \
+       -lMEDWrapper_V2_2 -lMEDWrapper_V2_1 -lMEDWrapperBase -lMEDWrapper -lmed_V2_1 -lVTKViewer -lsuit -lqtx libVisuConvertor.la
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/adm_local/unix/make_common_starter.am $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  ./src/CONVERTOR/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  ./src/CONVERTOR/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           f=$(am__strip_dir) \
+           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-libLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         p=$(am__strip_dir) \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+       done
+
+clean-libLTLIBRARIES:
+       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libVisuConvertor.la: $(libVisuConvertor_la_OBJECTS) $(libVisuConvertor_la_DEPENDENCIES) 
+       $(CXXLINK) -rpath $(libdir) $(libVisuConvertor_la_LDFLAGS) $(libVisuConvertor_la_OBJECTS) $(libVisuConvertor_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+            || test -f $$p1 \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
+
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         echo " rm -f $$p $$f"; \
+         rm -f $$p $$f ; \
+       done
+VISUConvertor$(EXEEXT): $(VISUConvertor_OBJECTS) $(VISUConvertor_DEPENDENCIES) 
+       @rm -f VISUConvertor$(EXEEXT)
+       $(CXXLINK) $(VISUConvertor_LDFLAGS) $(VISUConvertor_OBJECTS) $(VISUConvertor_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VISUConvertor-VISUConvertor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilterUtilities.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_AppendPolyData.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_CommonCellsFilter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_Convertor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_ConvertorUtils.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_Convertor_impl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_ExtractUnstructuredGrid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_IDMapper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_MedConvertor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilterUtilities.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_MeshValue.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_PointCoords.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_Structures.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVisuConvertor_la-VISU_Structures_impl.Plo@am__quote@
+
+.cxx.o:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libVisuConvertor_la-VISU_IDMapper.lo: VISU_IDMapper.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_IDMapper.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_IDMapper.Tpo" -c -o libVisuConvertor_la-VISU_IDMapper.lo `test -f 'VISU_IDMapper.cxx' || echo '$(srcdir)/'`VISU_IDMapper.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_IDMapper.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_IDMapper.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_IDMapper.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_IDMapper.cxx' object='libVisuConvertor_la-VISU_IDMapper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_IDMapper.lo `test -f 'VISU_IDMapper.cxx' || echo '$(srcdir)/'`VISU_IDMapper.cxx
+
+libVisuConvertor_la-VISU_Structures.lo: VISU_Structures.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_Structures.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_Structures.Tpo" -c -o libVisuConvertor_la-VISU_Structures.lo `test -f 'VISU_Structures.cxx' || echo '$(srcdir)/'`VISU_Structures.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_Structures.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_Structures.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_Structures.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_Structures.cxx' object='libVisuConvertor_la-VISU_Structures.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_Structures.lo `test -f 'VISU_Structures.cxx' || echo '$(srcdir)/'`VISU_Structures.cxx
+
+libVisuConvertor_la-VISU_Convertor.lo: VISU_Convertor.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_Convertor.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor.Tpo" -c -o libVisuConvertor_la-VISU_Convertor.lo `test -f 'VISU_Convertor.cxx' || echo '$(srcdir)/'`VISU_Convertor.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_Convertor.cxx' object='libVisuConvertor_la-VISU_Convertor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_Convertor.lo `test -f 'VISU_Convertor.cxx' || echo '$(srcdir)/'`VISU_Convertor.cxx
+
+libVisuConvertor_la-VISU_Structures_impl.lo: VISU_Structures_impl.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_Structures_impl.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_Structures_impl.Tpo" -c -o libVisuConvertor_la-VISU_Structures_impl.lo `test -f 'VISU_Structures_impl.cxx' || echo '$(srcdir)/'`VISU_Structures_impl.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_Structures_impl.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_Structures_impl.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_Structures_impl.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_Structures_impl.cxx' object='libVisuConvertor_la-VISU_Structures_impl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_Structures_impl.lo `test -f 'VISU_Structures_impl.cxx' || echo '$(srcdir)/'`VISU_Structures_impl.cxx
+
+libVisuConvertor_la-VISU_MeshValue.lo: VISU_MeshValue.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_MeshValue.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_MeshValue.Tpo" -c -o libVisuConvertor_la-VISU_MeshValue.lo `test -f 'VISU_MeshValue.cxx' || echo '$(srcdir)/'`VISU_MeshValue.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_MeshValue.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_MeshValue.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_MeshValue.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_MeshValue.cxx' object='libVisuConvertor_la-VISU_MeshValue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_MeshValue.lo `test -f 'VISU_MeshValue.cxx' || echo '$(srcdir)/'`VISU_MeshValue.cxx
+
+libVisuConvertor_la-VISU_PointCoords.lo: VISU_PointCoords.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_PointCoords.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_PointCoords.Tpo" -c -o libVisuConvertor_la-VISU_PointCoords.lo `test -f 'VISU_PointCoords.cxx' || echo '$(srcdir)/'`VISU_PointCoords.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_PointCoords.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_PointCoords.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_PointCoords.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_PointCoords.cxx' object='libVisuConvertor_la-VISU_PointCoords.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_PointCoords.lo `test -f 'VISU_PointCoords.cxx' || echo '$(srcdir)/'`VISU_PointCoords.cxx
+
+libVisuConvertor_la-VISU_Convertor_impl.lo: VISU_Convertor_impl.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_Convertor_impl.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor_impl.Tpo" -c -o libVisuConvertor_la-VISU_Convertor_impl.lo `test -f 'VISU_Convertor_impl.cxx' || echo '$(srcdir)/'`VISU_Convertor_impl.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor_impl.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor_impl.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_Convertor_impl.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_Convertor_impl.cxx' object='libVisuConvertor_la-VISU_Convertor_impl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_Convertor_impl.lo `test -f 'VISU_Convertor_impl.cxx' || echo '$(srcdir)/'`VISU_Convertor_impl.cxx
+
+libVisuConvertor_la-VISU_MedConvertor.lo: VISU_MedConvertor.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_MedConvertor.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_MedConvertor.Tpo" -c -o libVisuConvertor_la-VISU_MedConvertor.lo `test -f 'VISU_MedConvertor.cxx' || echo '$(srcdir)/'`VISU_MedConvertor.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_MedConvertor.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_MedConvertor.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_MedConvertor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_MedConvertor.cxx' object='libVisuConvertor_la-VISU_MedConvertor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_MedConvertor.lo `test -f 'VISU_MedConvertor.cxx' || echo '$(srcdir)/'`VISU_MedConvertor.cxx
+
+libVisuConvertor_la-VISU_ConvertorUtils.lo: VISU_ConvertorUtils.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_ConvertorUtils.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_ConvertorUtils.Tpo" -c -o libVisuConvertor_la-VISU_ConvertorUtils.lo `test -f 'VISU_ConvertorUtils.cxx' || echo '$(srcdir)/'`VISU_ConvertorUtils.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_ConvertorUtils.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_ConvertorUtils.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_ConvertorUtils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_ConvertorUtils.cxx' object='libVisuConvertor_la-VISU_ConvertorUtils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_ConvertorUtils.lo `test -f 'VISU_ConvertorUtils.cxx' || echo '$(srcdir)/'`VISU_ConvertorUtils.cxx
+
+libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo: VISU_ExtractUnstructuredGrid.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_ExtractUnstructuredGrid.Tpo" -c -o libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo `test -f 'VISU_ExtractUnstructuredGrid.cxx' || echo '$(srcdir)/'`VISU_ExtractUnstructuredGrid.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_ExtractUnstructuredGrid.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_ExtractUnstructuredGrid.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_ExtractUnstructuredGrid.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_ExtractUnstructuredGrid.cxx' object='libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_ExtractUnstructuredGrid.lo `test -f 'VISU_ExtractUnstructuredGrid.cxx' || echo '$(srcdir)/'`VISU_ExtractUnstructuredGrid.cxx
+
+libVisuConvertor_la-VISU_AppendFilter.lo: VISU_AppendFilter.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_AppendFilter.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilter.Tpo" -c -o libVisuConvertor_la-VISU_AppendFilter.lo `test -f 'VISU_AppendFilter.cxx' || echo '$(srcdir)/'`VISU_AppendFilter.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilter.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilter.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_AppendFilter.cxx' object='libVisuConvertor_la-VISU_AppendFilter.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_AppendFilter.lo `test -f 'VISU_AppendFilter.cxx' || echo '$(srcdir)/'`VISU_AppendFilter.cxx
+
+libVisuConvertor_la-VISU_AppendPolyData.lo: VISU_AppendPolyData.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_AppendPolyData.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_AppendPolyData.Tpo" -c -o libVisuConvertor_la-VISU_AppendPolyData.lo `test -f 'VISU_AppendPolyData.cxx' || echo '$(srcdir)/'`VISU_AppendPolyData.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendPolyData.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_AppendPolyData.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendPolyData.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_AppendPolyData.cxx' object='libVisuConvertor_la-VISU_AppendPolyData.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_AppendPolyData.lo `test -f 'VISU_AppendPolyData.cxx' || echo '$(srcdir)/'`VISU_AppendPolyData.cxx
+
+libVisuConvertor_la-VISU_AppendFilterUtilities.lo: VISU_AppendFilterUtilities.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_AppendFilterUtilities.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilterUtilities.Tpo" -c -o libVisuConvertor_la-VISU_AppendFilterUtilities.lo `test -f 'VISU_AppendFilterUtilities.cxx' || echo '$(srcdir)/'`VISU_AppendFilterUtilities.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilterUtilities.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilterUtilities.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_AppendFilterUtilities.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_AppendFilterUtilities.cxx' object='libVisuConvertor_la-VISU_AppendFilterUtilities.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_AppendFilterUtilities.lo `test -f 'VISU_AppendFilterUtilities.cxx' || echo '$(srcdir)/'`VISU_AppendFilterUtilities.cxx
+
+libVisuConvertor_la-VISU_MergeFilter.lo: VISU_MergeFilter.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_MergeFilter.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilter.Tpo" -c -o libVisuConvertor_la-VISU_MergeFilter.lo `test -f 'VISU_MergeFilter.cxx' || echo '$(srcdir)/'`VISU_MergeFilter.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilter.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilter.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_MergeFilter.cxx' object='libVisuConvertor_la-VISU_MergeFilter.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_MergeFilter.lo `test -f 'VISU_MergeFilter.cxx' || echo '$(srcdir)/'`VISU_MergeFilter.cxx
+
+libVisuConvertor_la-VISU_MergeFilterUtilities.lo: VISU_MergeFilterUtilities.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_MergeFilterUtilities.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilterUtilities.Tpo" -c -o libVisuConvertor_la-VISU_MergeFilterUtilities.lo `test -f 'VISU_MergeFilterUtilities.cxx' || echo '$(srcdir)/'`VISU_MergeFilterUtilities.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilterUtilities.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilterUtilities.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_MergeFilterUtilities.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_MergeFilterUtilities.cxx' object='libVisuConvertor_la-VISU_MergeFilterUtilities.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_MergeFilterUtilities.lo `test -f 'VISU_MergeFilterUtilities.cxx' || echo '$(srcdir)/'`VISU_MergeFilterUtilities.cxx
+
+libVisuConvertor_la-VISU_CommonCellsFilter.lo: VISU_CommonCellsFilter.cxx
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libVisuConvertor_la-VISU_CommonCellsFilter.lo -MD -MP -MF "$(DEPDIR)/libVisuConvertor_la-VISU_CommonCellsFilter.Tpo" -c -o libVisuConvertor_la-VISU_CommonCellsFilter.lo `test -f 'VISU_CommonCellsFilter.cxx' || echo '$(srcdir)/'`VISU_CommonCellsFilter.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libVisuConvertor_la-VISU_CommonCellsFilter.Tpo" "$(DEPDIR)/libVisuConvertor_la-VISU_CommonCellsFilter.Plo"; else rm -f "$(DEPDIR)/libVisuConvertor_la-VISU_CommonCellsFilter.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISU_CommonCellsFilter.cxx' object='libVisuConvertor_la-VISU_CommonCellsFilter.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libVisuConvertor_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libVisuConvertor_la-VISU_CommonCellsFilter.lo `test -f 'VISU_CommonCellsFilter.cxx' || echo '$(srcdir)/'`VISU_CommonCellsFilter.cxx
+
+VISUConvertor-VISUConvertor.o: VISUConvertor.cxx
+@am__fastdepCXX_TRUE@  if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VISUConvertor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VISUConvertor-VISUConvertor.o -MD -MP -MF "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo" -c -o VISUConvertor-VISUConvertor.o `test -f 'VISUConvertor.cxx' || echo '$(srcdir)/'`VISUConvertor.cxx; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo" "$(DEPDIR)/VISUConvertor-VISUConvertor.Po"; else rm -f "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISUConvertor.cxx' object='VISUConvertor-VISUConvertor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VISUConvertor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VISUConvertor-VISUConvertor.o `test -f 'VISUConvertor.cxx' || echo '$(srcdir)/'`VISUConvertor.cxx
+
+VISUConvertor-VISUConvertor.obj: VISUConvertor.cxx
+@am__fastdepCXX_TRUE@  if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VISUConvertor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VISUConvertor-VISUConvertor.obj -MD -MP -MF "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo" -c -o VISUConvertor-VISUConvertor.obj `if test -f 'VISUConvertor.cxx'; then $(CYGPATH_W) 'VISUConvertor.cxx'; else $(CYGPATH_W) '$(srcdir)/VISUConvertor.cxx'; fi`; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo" "$(DEPDIR)/VISUConvertor-VISUConvertor.Po"; else rm -f "$(DEPDIR)/VISUConvertor-VISUConvertor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='VISUConvertor.cxx' object='VISUConvertor-VISUConvertor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(VISUConvertor_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VISUConvertor-VISUConvertor.obj `if test -f 'VISUConvertor.cxx'; then $(CYGPATH_W) 'VISUConvertor.cxx'; else $(CYGPATH_W) '$(srcdir)/VISUConvertor.cxx'; fi`
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+install-salomeincludeHEADERS: $(salomeinclude_HEADERS)
+       @$(NORMAL_INSTALL)
+       test -z "$(salomeincludedir)" || $(mkdir_p) "$(DESTDIR)$(salomeincludedir)"
+       @list='$(salomeinclude_HEADERS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(salomeincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(salomeincludedir)/$$f'"; \
+         $(salomeincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(salomeincludedir)/$$f"; \
+       done
+
+uninstall-salomeincludeHEADERS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(salomeinclude_HEADERS)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(salomeincludedir)/$$f'"; \
+         rm -f "$(DESTDIR)$(salomeincludedir)/$$f"; \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(mkdir_p) $(distdir)/../../adm_local/unix
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs:
+       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(salomeincludedir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+       clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-salomeincludeHEADERS
+
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
+       uninstall-libLTLIBRARIES uninstall-salomeincludeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic clean-libLTLIBRARIES clean-libtool ctags \
+       distclean distclean-compile distclean-generic \
+       distclean-libtool distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-binPROGRAMS \
+       install-data install-data-am install-exec install-exec-am \
+       install-info install-info-am install-libLTLIBRARIES \
+       install-man install-salomeincludeHEADERS install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+       pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-binPROGRAMS uninstall-info-am \
+       uninstall-libLTLIBRARIES uninstall-salomeincludeHEADERS
+
+
+# common rules
+
+# moc-files generation
+%_moc.cxx: %.h
+       $(MOC) $< -o $@
+
+# qm-files generation
+%.qm: %.po
+       $(MSG2QM) $< $@
+
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx
+       rm -f @builddir@/*.qm
+
+# tests
+tests: unittest
 
-@CONCLUDE@
+unittest: $(UNIT_TEST_PROG)
+       @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+           $(UNIT_TEST_PROG);                     \
+       fi;
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index c9517fdabe08b28a2bf26ff5f7aa952f07d8f075..d92e9d8c2758bb49f232c619817ec42a35af08cc 100644 (file)
@@ -57,10 +57,12 @@ void parseFile(const char* theFileName)
   try{
 #endif
     MSG(MYDEBUG,"'"<<theFileName<<"'...");
+    //theFileName = "Apointe.med";
     auto_ptr<VISU_Convertor> aCon(CreateConvertor(theFileName));
     //aCon->GetSize();
     //return;
     aCon->BuildEntities();
+    aCon->BuildGroups();
     aCon->BuildFields();
     aCon->BuildMinMax();
     const VISU::TMeshMap& aMeshMap = aCon->GetMeshMap();
@@ -105,7 +107,7 @@ void parseFile(const char* theFileName)
              }
 #endif
            }else{
-             continue;
+             //continue;
              VISU::PIDMapper anIDMapper = 
                aCon->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
 #ifdef _DEBUG_ID_MAPPING_
diff --git a/src/CONVERTOR/VISUConvertor.hxx b/src/CONVERTOR/VISUConvertor.hxx
new file mode 100755 (executable)
index 0000000..f58b9fa
--- /dev/null
@@ -0,0 +1,47 @@
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : VISUConvertor.hxx
+//  Author : Oleg UVAROV
+//  Module : VISU
+
+#ifndef _VISUConvertor_HXX_
+#define _VISUConvertor_HXX_
+
+#ifdef WNT
+ #if defined VISU_CONVERTOR_EXPORTS
+  #if defined WIN32
+   #define VISU_CONVERTOR_EXPORT __declspec( dllexport )
+  #else
+   #define VISU_CONVERTOR_EXPORT
+  #endif
+ #else
+  #if defined WIN32
+   #define VISU_CONVERTOR_EXPORT __declspec( dllimport )
+  #else
+   #define VISU_CONVERTOR_EXPORT
+  #endif
+ #endif
+#else
+ #define VISU_CONVERTOR_EXPORT
+#endif
+
+#endif
\ No newline at end of file
diff --git a/src/CONVERTOR/VISU_AppendFilter.cxx b/src/CONVERTOR/VISU_AppendFilter.cxx
new file mode 100644 (file)
index 0000000..7f7f6e3
--- /dev/null
@@ -0,0 +1,70 @@
+//  SALOME OBJECT : kernel of SALOME component
+//
+//  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   : VISU_GeometryFilter.cxx
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#include "VISU_AppendFilter.hxx"
+
+#include <vtkObjectFactory.h>
+
+//---------------------------------------------------------------
+vtkCxxRevisionMacro(VISU_AppendFilter, "$Revision$");
+vtkStandardNewMacro(VISU_AppendFilter);
+
+
+//---------------------------------------------------------------
+VISU_AppendFilter
+::VISU_AppendFilter():
+  TAppendFilterHelper(this)
+{}
+
+
+//---------------------------------------------------------------
+VISU_AppendFilter
+::~VISU_AppendFilter()
+{}
+
+
+//---------------------------------------------------------------
+int
+VISU_AppendFilter
+::RequestData(vtkInformation *theRequest,
+             vtkInformationVector **theInputVector,
+             vtkInformationVector *theOutputVector)
+{
+  bool anIsExecuted = VISU::UnstructuredGridRequestData(theInputVector,
+                                                       this->GetNumberOfInputConnections(0),
+                                                       theOutputVector,
+                                                       GetSharedPointSet(),
+                                                       IsMergingInputs(),
+                                                       IsMappingInputs());
+  if(!anIsExecuted)
+    anIsExecuted = Superclass::RequestData(theRequest,
+                                          theInputVector,
+                                          theOutputVector);
+
+  return anIsExecuted;
+}
diff --git a/src/CONVERTOR/VISU_AppendFilter.hxx b/src/CONVERTOR/VISU_AppendFilter.hxx
new file mode 100644 (file)
index 0000000..480b623
--- /dev/null
@@ -0,0 +1,57 @@
+// Copyright (C) 2005  CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA 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
+//
+#ifndef VISU_APPENDFILTER_H
+#define VISU_APPENDFILTER_H
+
+#include "VISU_AppendFilterUtilities.hxx"
+
+#include <vtkAppendFilter.h>
+
+/*! \brief This class used same as vtkAppendFilter. See documentation on VTK for more information.
+ */
+class VISU_AppendFilter : public vtkAppendFilter,
+                         public VISU::TAppendFilterHelper
+{
+public:
+  /*! \fn static VISU_AppendFilter *New()
+   */
+  static VISU_AppendFilter *New();
+  
+  /*! \fn vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter)
+   *  \brief VTK type revision macros.
+   */
+  vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter);
+
+protected:
+  /*! \fn VISU_AppendFilter();
+   * \brief Constructor
+   */
+  VISU_AppendFilter();
+
+  /*! \fn ~VISU_AppendFilter();
+   * \brief Destructor.
+   */
+  ~VISU_AppendFilter();
+
+  virtual
+  int
+  RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+};
+
+#endif
diff --git a/src/CONVERTOR/VISU_AppendFilterUtilities.cxx b/src/CONVERTOR/VISU_AppendFilterUtilities.cxx
new file mode 100644 (file)
index 0000000..3ca1aeb
--- /dev/null
@@ -0,0 +1,468 @@
+//  SALOME OBJECT : kernel of SALOME component
+//
+//  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   : VISU_GeometryFilter.cxx
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#include "VISU_AppendFilterUtilities.hxx"
+
+#include <vtkCell.h>
+#include <vtkCellData.h>
+#include <vtkPointData.h>
+
+#include <vtkDataSetCollection.h>
+#include <vtkObjectFactory.h>
+
+#include <vtkUnstructuredGrid.h>
+#include <vtkPolyData.h>
+
+#include <vtkInformationVector.h>
+#include <vtkInformation.h>
+#include <vtkExecutive.h>
+
+#include <vtkPoints.h>
+#include <vtkIntArray.h>
+
+#include <algorithm>
+#include <vector>
+#include <map>
+
+namespace
+{
+  //---------------------------------------------------------------
+  typedef vtkIdType TCellId;
+  typedef vtkIdType TInputId;
+  typedef std::pair<TInputId, TCellId> TInputCellId;
+
+  typedef vtkIdType TObjectId;
+  typedef std::map<TObjectId, TInputCellId> TObject2InputIdMap;
+  
+
+  //---------------------------------------------------------------
+  void
+  DoMergingInputs(vtkCellData *theCellData, 
+                 TInputId theInputId,
+                 TObject2InputIdMap& theResult)
+  {
+    if(vtkDataArray *aDataArray = theCellData->GetArray("VISU_CELLS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       int aMaxId = anIntArray->GetMaxId();
+       int* aPointer = anIntArray->GetPointer(0);
+       int* anEndPointer = anIntArray->GetPointer(aMaxId + 1);
+       for(vtkIdType aCellId = 0; aPointer != anEndPointer; aPointer++, aCellId++){
+         TObjectId anObjectId = *aPointer;
+         TObject2InputIdMap::iterator anIter = theResult.find(anObjectId);
+         if(anIter != theResult.end())
+           continue;
+         TInputCellId anInputCellId(theInputId, aCellId);
+         theResult.insert(anIter, TObject2InputIdMap::value_type(anObjectId, anInputCellId));
+       }
+      }
+    }
+  }
+
+
+  //---------------------------------------------------------------
+  struct TFillFieldList
+  {
+    vtkDataSetAttributes::FieldList myFieldList;
+    bool myIsFirstCellData;
+
+    TFillFieldList(vtkIdType theNbInputs):
+      myFieldList(theNbInputs),
+      myIsFirstCellData(true)
+    {}
+
+    void
+    operator()(TInputId theInputId, vtkDataSet* theDataSet)
+    {
+      vtkCellData *aCellData = theDataSet->GetCellData();
+      if(myIsFirstCellData){
+       myFieldList.InitializeFieldList(aCellData);
+       myIsFirstCellData = false;
+      }else{
+       myFieldList.IntersectFieldList(aCellData);
+      }
+    }
+    
+    virtual
+    vtkIdType
+    GetNbCells() const = 0;
+  };
+  
+
+  //---------------------------------------------------------------
+  struct TCellCounter: TFillFieldList
+  {
+    vtkIdType myNbCells;
+    
+    TCellCounter(vtkIdType theNbInputs):
+      TFillFieldList(theNbInputs),
+      myNbCells(0)
+    {}
+
+    void
+    operator()(TInputId theInputId, vtkDataSet* theDataSet)
+    {
+      TFillFieldList::operator()(theInputId, theDataSet);
+      myNbCells += theDataSet->GetNumberOfCells();
+    }
+
+    virtual
+    vtkIdType
+    GetNbCells() const
+    {
+      return myNbCells;
+    }
+  };
+
+
+  //---------------------------------------------------------------
+  struct TCellIdMerger: TFillFieldList
+  {
+    TObject2InputIdMap myObject2InputIdMap;
+
+    TCellIdMerger(vtkIdType theNbInputs):
+      TFillFieldList(theNbInputs)
+    {}
+
+    void
+    operator()(TInputId theInputId, vtkDataSet* theDataSet)
+    {
+      TFillFieldList::operator()(theInputId, theDataSet);
+      vtkCellData *aCellData = theDataSet->GetCellData();
+      DoMergingInputs(aCellData, theInputId, myObject2InputIdMap);
+    }
+
+    virtual
+    vtkIdType
+    GetNbCells() const
+    {
+      return myObject2InputIdMap.size();
+    }
+  };
+
+
+  //---------------------------------------------------------------
+  vtkDataSet*
+  GetInput(vtkInformationVector **theInputVector, 
+          vtkIdType theId)
+  {
+    if(vtkInformation* anInformation = theInputVector[0]->GetInformationObject(theId))
+      return vtkDataSet::SafeDownCast(anInformation->Get(vtkDataObject::DATA_OBJECT()));
+    return NULL;
+  }
+
+
+  //---------------------------------------------------------------
+  vtkDataSet*
+  GetOutput(vtkInformationVector *theOutputVector)
+  {
+    if(vtkInformation* anInformation = theOutputVector->GetInformationObject(0))
+      return vtkDataSet::SafeDownCast(anInformation->Get(vtkDataObject::DATA_OBJECT()));
+    return NULL;
+  }
+
+
+  //---------------------------------------------------------------
+  template<class TFunctor>
+  void
+  ForEachInput(vtkInformationVector **theInputVector, 
+              vtkIdType theNumberOfInputConnections,
+              TFunctor& theFunctor)
+  {
+    for(vtkIdType anInputId = 0; anInputId < theNumberOfInputConnections; anInputId++)
+      if(vtkDataSet *aDataSet = GetInput(theInputVector, anInputId))
+       if(aDataSet->GetNumberOfPoints() > 0 && aDataSet->GetNumberOfCells() > 0)
+         theFunctor(anInputId, aDataSet);
+  }
+
+
+  //---------------------------------------------------------------
+  template<class TDataSet>
+  bool
+  RequestData(vtkInformationVector **theInputVector,
+             vtkIdType theNumberOfInputConnections,
+             vtkInformationVector *theOutputVector,
+             vtkPointSet* theSharedPointSet,
+             bool theIsMergingInputs,
+             bool theIsMappingInputs)
+  {
+    if(theSharedPointSet){
+      vtkPoints* aPoints = theSharedPointSet->GetPoints();
+      if(aPoints->GetNumberOfPoints() < 1)
+       return true;
+  
+      TDataSet* anOutput = TDataSet::SafeDownCast(GetOutput(theOutputVector));
+      vtkIdType anNbInputs = theNumberOfInputConnections;
+      if(theIsMergingInputs){
+       TCellIdMerger aFunctor(anNbInputs);
+       ForEachInput<TCellIdMerger>(theInputVector, anNbInputs, aFunctor);
+
+       vtkDataSetAttributes::FieldList& aFieldList = aFunctor.myFieldList;
+       TObject2InputIdMap& anObject2InputIdMap = aFunctor.myObject2InputIdMap;
+       vtkIdType aNbCells = aFunctor.GetNbCells();
+       if(aNbCells < 1)
+         return true;
+    
+       // Now can allocate memory
+       anOutput->Allocate(aNbCells); 
+       vtkCellData *anOutputCellData = anOutput->GetCellData();
+       anOutputCellData->CopyAllocate(aFieldList, aNbCells);
+      
+       // Append each input dataset together
+       // 1.points
+       anOutput->SetPoints(theSharedPointSet->GetPoints());
+       anOutput->GetPointData()->PassData(theSharedPointSet->GetPointData());
+      
+       // 2.cells
+       vtkIdList *anIdList = vtkIdList::New(); 
+       anIdList->Allocate(VTK_CELL_SIZE);
+       TObject2InputIdMap::const_iterator anIter = anObject2InputIdMap.begin();
+       TObject2InputIdMap::const_iterator anEndIter = anObject2InputIdMap.end();
+       for(; anIter != anEndIter; anIter++){
+         //TObjectId anObjectId = anIter->first;
+         const TInputCellId& anInputCellId = anIter->second;
+         TInputId anInputId = anInputCellId.first;
+         if(vtkDataSet *aDataSet = GetInput(theInputVector, anInputId)){
+           TCellId aCellId = anInputCellId.second;
+           aDataSet->GetCellPoints(aCellId, anIdList);
+           
+           vtkIdType aCellType = aDataSet->GetCellType(aCellId);
+           vtkIdType aNewCellId = anOutput->InsertNextCell(aCellType, anIdList);
+         
+           vtkCellData *aCellData = aDataSet->GetCellData();
+           anOutputCellData->CopyData(aFieldList, aCellData, anInputId, aCellId, aNewCellId);
+         }
+       }
+       anIdList->Delete();
+
+       if(theIsMappingInputs){
+         vtkIntArray *aDataArray = vtkIntArray::New();
+         aDataArray->SetName("VISU_INPUTS_MAPPER");
+         aDataArray->SetNumberOfComponents(2);
+         aDataArray->SetNumberOfTuples(aNbCells);
+
+         vtkIdType aTupleId = 0;
+         TObject2InputIdMap::const_iterator anIter = anObject2InputIdMap.begin();
+         TObject2InputIdMap::const_iterator anEndIter = anObject2InputIdMap.end();
+         for(vtkIdType aCellId = 0; anIter != anEndIter; anIter++, aCellId++){
+           const TInputCellId& anInputCellId = anIter->second;
+           TInputId anInputId = anInputCellId.first;
+           TCellId aCellId = anInputCellId.second;
+           aDataArray->SetValue(aTupleId++, anInputId);
+           aDataArray->SetValue(aTupleId++, aCellId);
+         }
+
+         anOutputCellData->AddArray(aDataArray);
+         aDataArray->Delete();
+       }
+      }else{
+       TCellCounter aFunctor(anNbInputs);
+       ForEachInput<TCellCounter>(theInputVector, anNbInputs, aFunctor);
+       
+       vtkDataSetAttributes::FieldList& aFieldList = aFunctor.myFieldList;
+       vtkIdType aNbCells = aFunctor.GetNbCells();
+       if(aNbCells < 1)
+         return true;
+       
+       // Now can allocate memory
+       anOutput->Allocate(aNbCells); 
+       vtkCellData *anOutputCellData = anOutput->GetCellData();
+       anOutputCellData->CopyAllocate(aFieldList, aNbCells);
+       
+       // Append each input dataset together
+       // 1.points
+       anOutput->SetPoints(theSharedPointSet->GetPoints());
+       anOutput->GetPointData()->PassData(theSharedPointSet->GetPointData());
+       
+       // 2.cells
+       vtkIdList *anIdList = vtkIdList::New(); 
+       anIdList->Allocate(VTK_CELL_SIZE);
+       for(vtkIdType anInputId = 0; anInputId < anNbInputs; anInputId++){
+         if(vtkDataSet *aDataSet = GetInput(theInputVector, anInputId)){
+           vtkIdType aNbCells = aDataSet->GetNumberOfCells(); 
+           vtkCellData *aCellData = aDataSet->GetCellData();
+           // copy cell and cell data
+           for(vtkIdType aCellId = 0; aCellId < aNbCells; aCellId++){
+             aDataSet->GetCellPoints(aCellId, anIdList);
+
+             vtkIdType aCellType = aDataSet->GetCellType(aCellId);
+             vtkIdType aNewCellId = anOutput->InsertNextCell(aCellType, anIdList);
+
+             anOutputCellData->CopyData(aFieldList, aCellData, anInputId, aCellId, aNewCellId);
+           }
+         }
+       }
+       anIdList->Delete();
+
+       if(theIsMappingInputs){
+         vtkIntArray *aDataArray = vtkIntArray::New();
+         aDataArray->SetName("VISU_INPUTS_MAPPER");
+         aDataArray->SetNumberOfComponents(2);
+         aDataArray->SetNumberOfTuples(aNbCells);
+
+         vtkIdType aTupleId = 0;
+         for(vtkIdType anInputId = 0; anInputId < anNbInputs; anInputId++){
+           if(vtkDataSet *aDataSet = GetInput(theInputVector, anInputId)){
+             vtkIdType aNbCells = aDataSet->GetNumberOfCells(); 
+             for(vtkIdType aCellId = 0; aCellId < aNbCells; aCellId++){
+               aDataArray->SetValue(aTupleId++, anInputId);
+               aDataArray->SetValue(aTupleId++, aCellId);
+             }
+           }
+         }
+
+         anOutputCellData->AddArray(aDataArray);
+         aDataArray->Delete();
+       }
+       return true;
+      }
+    }
+
+    return false;
+  }
+
+
+  //---------------------------------------------------------------
+}
+
+
+namespace VISU
+{
+  //---------------------------------------------------------------
+  TAppendFilterHelper
+  ::TAppendFilterHelper(vtkObject* theParent):
+    myIsMergingInputs(false),
+    myIsMappingInputs(false),
+    myParent(*theParent)
+  {}
+
+
+  //---------------------------------------------------------------
+  void
+  TAppendFilterHelper
+  ::SetSharedPointSet(vtkPointSet* thePointSet)
+  {
+    if(GetSharedPointSet() == thePointSet)
+      return;
+    
+    mySharedPointSet = thePointSet;
+    
+    myParent.Modified();
+  }
+
+
+  //---------------------------------------------------------------
+  vtkPointSet*
+  TAppendFilterHelper
+  ::GetSharedPointSet()
+  {
+    return mySharedPointSet.GetPointer();
+  }
+  
+
+  //---------------------------------------------------------------
+  void
+  TAppendFilterHelper
+  ::SetMappingInputs(bool theIsMappingInputs)
+  {
+    if(myIsMappingInputs == theIsMappingInputs)
+      return;
+    
+    myIsMappingInputs = theIsMappingInputs;
+    myParent.Modified();
+  }
+  
+  
+  //---------------------------------------------------------------
+  bool
+  TAppendFilterHelper
+  ::IsMappingInputs()
+  {
+    return myIsMappingInputs;
+  }
+  
+
+  //---------------------------------------------------------------
+  void
+  TAppendFilterHelper
+  ::SetMergingInputs(bool theIsMergingInputs)
+  {
+    if(myIsMergingInputs == theIsMergingInputs)
+      return;
+    
+    myIsMergingInputs = theIsMergingInputs;
+    myParent.Modified();
+  }
+  
+  
+  //---------------------------------------------------------------
+  bool
+  TAppendFilterHelper
+  ::IsMergingInputs()
+  {
+    return myIsMergingInputs;
+  }
+  
+
+  //---------------------------------------------------------------
+  bool
+  UnstructuredGridRequestData(vtkInformationVector **theInputVector,
+                             vtkIdType theNumberOfInputConnections,
+                             vtkInformationVector *theOutputVector,
+                             vtkPointSet* theSharedPointSet,
+                             bool theIsMergingInputs,
+                             bool theIsMappingInputs)
+  {
+    return RequestData<vtkUnstructuredGrid>(theInputVector,
+                                           theNumberOfInputConnections,
+                                           theOutputVector,
+                                           theSharedPointSet,
+                                           theIsMergingInputs,
+                                           theIsMappingInputs);
+  }
+
+
+  //---------------------------------------------------------------
+  bool
+  PolyDataRequestData(vtkInformationVector **theInputVector,
+                     vtkIdType theNumberOfInputConnections,
+                     vtkInformationVector *theOutputVector,
+                     vtkPointSet* theSharedPointSet,
+                     bool theIsMergingInputs,
+                     bool theIsMappingInputs)
+  {
+    return RequestData<vtkPolyData>(theInputVector,
+                                   theNumberOfInputConnections,
+                                   theOutputVector,
+                                   theSharedPointSet,
+                                   theIsMergingInputs,
+                                   theIsMappingInputs);
+  }
+
+
+  //---------------------------------------------------------------
+}
diff --git a/src/CONVERTOR/VISU_AppendFilterUtilities.hxx b/src/CONVERTOR/VISU_AppendFilterUtilities.hxx
new file mode 100644 (file)
index 0000000..e185dd2
--- /dev/null
@@ -0,0 +1,83 @@
+// Copyright (C) 2005  CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA 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
+//
+#ifndef VISU_APPENDFILTERUTILITIES_H
+#define VISU_APPENDFILTERUTILITIES_H
+
+class vtkInformationVector;
+class vtkPointSet;
+class vtkObject;
+
+#include <vtkSmartPointer.h>
+
+namespace VISU
+{
+  //---------------------------------------------------------------
+  class TAppendFilterHelper
+  {
+    TAppendFilterHelper(TAppendFilterHelper&);
+
+  public:
+    void
+    SetSharedPointSet(vtkPointSet* thePointSet);
+    
+    vtkPointSet*
+    GetSharedPointSet();
+    
+    void 
+    SetMappingInputs(bool theMappingInputs);
+    
+    bool
+    IsMappingInputs();
+    
+    void
+    SetMergingInputs(bool theIsMergingInputs);
+    
+    bool
+    IsMergingInputs();
+
+  protected:
+    TAppendFilterHelper(vtkObject* theParent);
+
+    vtkSmartPointer<vtkPointSet> mySharedPointSet;
+    bool myIsMergingInputs;
+    bool myIsMappingInputs;
+    vtkObject& myParent;
+  };
+
+
+  //---------------------------------------------------------------
+  bool
+  UnstructuredGridRequestData(vtkInformationVector **theInputVector,
+                             vtkIdType theNumberOfInputConnections,
+                             vtkInformationVector *theOutputVector,
+                             vtkPointSet* theSharedPointSet,
+                             bool theIsMergingInputs,
+                             bool theIsMappingInputs);
+
+  //---------------------------------------------------------------
+  bool
+  PolyDataRequestData(vtkInformationVector **theInputVector,
+                     vtkIdType theNumberOfInputConnections,
+                     vtkInformationVector *theOutputVector,
+                     vtkPointSet* theSharedPointSet,
+                     bool theIsMergingInputs,
+                     bool theIsMappingInputs);
+}
+
+#endif
index 76db3a289300a0fdb15d54a2c10315ff92e97b1a..728bbb948a5d0f595b6bf3e89ac186785c375fce 100644 (file)
 
 #include "VISU_AppendPolyData.hxx"
 
-#include <vtkCellArray.h>
-#include <vtkCellData.h>
-#include <vtkDataSetAttributes.h>
-#include <vtkDataSetCollection.h>
 #include <vtkObjectFactory.h>
-#include <vtkPointData.h>
-#include <vtkPolyData.h>
-
-#include <vtkPoints.h>
 
+//---------------------------------------------------------------
 vtkCxxRevisionMacro(VISU_AppendPolyData, "$Revision$");
 vtkStandardNewMacro(VISU_AppendPolyData);
 
-VISU_AppendPolyData
-::VISU_AppendPolyData() 
-{
-  myDoMappingFlag = false;
-}
 
+//---------------------------------------------------------------
 VISU_AppendPolyData
-::~VISU_AppendPolyData()
+::VISU_AppendPolyData():
+  TAppendFilterHelper(this)
 {}
 
-void
-VISU_AppendPolyData
-::SetDoMappingFlag(const bool theFlag)
-{
-  if(myDoMappingFlag == theFlag)
-    return;
-
-  myDoMappingFlag = theFlag;
-
-  this->Modified();
-}
-
-bool 
-VISU_AppendPolyData
-::DoMappingFlag() const
-{
-  return myDoMappingFlag;
-}
-
-void
-VISU_AppendPolyData
-::SetPoints(vtkPoints* thePoints)
-{
-  if(GetPoints() == thePoints)
-    return;
-
-  myPoints = thePoints;
-
-  this->Modified();
-}
-
-vtkPoints*
-VISU_AppendPolyData
-::GetPoints()
-{
-  return myPoints.GetPointer();
-}
-
-void
-VISU_AppendPolyData
-::Execute()
-{
-  if(myPoints.GetPointer())
-    MakeOutput();
-  else
-    Superclass::Execute();
-
-  if(myDoMappingFlag)
-    DoMapping();
-}
-
-
-void 
-VISU_AppendPolyData
-::DoMapping()
-{
-  myNodeRanges.clear();
-  myCellRanges.clear();
-
-  vtkIdType aPntStartId = 0;
-  vtkIdType aCellStartId = 0;
-
-  for(vtkIdType aDataSetId = 0; aDataSetId < this->NumberOfInputs; ++aDataSetId){
-    vtkDataSet* aDataSet = (vtkDataSet *)(this->Inputs[aDataSetId]);
-    // Do mapping of the nodes
-    if(!myPoints.GetPointer()){
-      vtkIdType aNbPnts = aDataSet->GetNumberOfPoints();
-      myNodeRanges.push_back(aPntStartId + aNbPnts);
-      aPntStartId += aNbPnts;
-    }
-    // Do mapping of the cells
-    vtkIdType aNbCells = aDataSet->GetNumberOfCells();
-    myCellRanges.push_back(aCellStartId + aNbCells);
-    aCellStartId += aNbCells;
-  }
-}
-
-namespace
-{
-  inline
-  vtkIdType
-  GetOutputID(vtkIdType theInputID,
-             vtkIdType theInputDataSetID,
-             const VISU_AppendPolyData::TVectorIds& theRanges)
-  {
-    theInputID = theInputDataSetID = -1;
-
-    vtkIdType aNbInputs = theRanges.size();
-    if(theInputDataSetID < 0 || theInputDataSetID >= aNbInputs)
-      return -1;
-    
-    vtkIdType aStartId = theRanges[theInputDataSetID];
-    return aStartId + theInputID;
-  }
-}
-
-vtkIdType
-VISU_AppendPolyData
-::GetPointOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID)
-{
-  if(myPoints.GetPointer())
-    return theInputID;
-
-  return GetOutputID(theInputID,theInputDataSetID,myNodeRanges);
-}
-
-
-vtkIdType 
-VISU_AppendPolyData
-::GetCellOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID)
-{
-  if(myPoints.GetPointer())
-    return theInputID;
-
-  return GetOutputID(theInputID,theInputDataSetID,myCellRanges);
-}
-
-
-namespace
-{
-  void
-  GetInputID(vtkIdType theOutputID,
-            vtkIdType& theInputID,
-            vtkIdType& theStartID,
-            vtkIdType& theInputDataSetID,
-            const VISU_AppendPolyData::TVectorIds& theRanges)
-  {
-    theInputID = theStartID = theInputDataSetID = -1;
-
-    if(theRanges.empty())
-      return;
 
-    const vtkIdType& aRangeEnd = theRanges.back();
-    if(theOutputID < 0 ||  theOutputID >= aRangeEnd)
-      return;
-
-    vtkIdType aStartId = 0;
-    vtkIdType aNbInputs = theRanges.size();
-    for(vtkIdType aDataSetId = 0; aDataSetId < aNbInputs; ++aDataSetId){
-      vtkIdType aRange = theRanges[aDataSetId];
-      if(aRange > theOutputID){
-       theInputID = theOutputID - aStartId;
-       theInputDataSetID = aDataSetId;
-       theStartID = aStartId;
-       break;
-      }
-      aStartId = aRange;
-    }
-  }
-}
-
-void 
+//---------------------------------------------------------------
 VISU_AppendPolyData
-::GetPointInputID(vtkIdType theOutputID,
-                 vtkIdType& theInputID,
-                 vtkIdType& theStartID,
-                 vtkIdType& theInputDataSetID)
-{
-  if(myPoints.GetPointer()) {
-    theStartID = theInputDataSetID = 0;
-    theInputID = theOutputID;
-    return;
-  }
-
-  ::GetInputID(theOutputID,
-              theInputID,
-              theStartID,
-              theInputDataSetID,
-              myNodeRanges);
-}
-
-
-void
-VISU_AppendPolyData
-::GetCellInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID)
-{
-  ::GetInputID(theOutputID,
-              theInputID,
-              theStartID,
-              theInputDataSetID,
-              myCellRanges);
-}
+::~VISU_AppendPolyData()
+{}
 
 
-void 
+//---------------------------------------------------------------
+int
 VISU_AppendPolyData
-::MakeOutput()
+::RequestData(vtkInformation *theRequest,
+             vtkInformationVector **theInputVector,
+             vtkInformationVector *theOutputVector)
 {
-  // loop over all data sets, checking to see what point data is available.
-  vtkIdType numPts = 0;
-
-  // These Field lists are very picky.  Count the number of non empty inputs
-  // so we can initialize them properly.
-  int idx;
-  int countCD = 0;
-  for (idx = 0; idx < this->NumberOfInputs; ++idx)
-    {
-    vtkPolyData *ds = (vtkPolyData *)(this->Inputs[idx]);
-    if (ds != NULL)
-      {
-      if (ds->GetNumberOfCells() > 0 )  
-        {
-        ++countCD;
-        } // for a data set that has cells
-      } // for a non NULL input
-    } // for each input
-
-  // These are used to determine which fields are available for appending
-  vtkDataSetAttributes::FieldList cellList(countCD);  
-
-  countCD = 0;
-  vtkIdType numCells = 0;
-  vtkIdType numPolys = 0;
-  vtkIdType sizePolys = 0;
-  for (idx = 0; idx < this->NumberOfInputs; ++idx)
-    {
-    vtkPolyData *ds = (vtkPolyData *)(this->Inputs[idx]);
-    if (ds != NULL)
-      {
-      // Although we cannot have cells without points ... let's not nest.
-      if (ds->GetNumberOfCells() > 0 )  
-        {
-        // keep track of the size of the poly cell array
-        if (ds->GetPolys())
-          {
-          numPolys += ds->GetPolys()->GetNumberOfCells();
-          sizePolys += ds->GetPolys()->GetNumberOfConnectivityEntries();
-          }
-        numCells += ds->GetNumberOfCells();
-        
-        vtkCellData *inCD = ds->GetCellData();
-        if ( countCD == 0 )
-          {
-          cellList.InitializeFieldList(inCD);
-          }
-        else
-          {
-          cellList.IntersectFieldList(inCD);
-          }
-        ++countCD;
-        } // for a data set that has cells
-      } // for a non NULL input
-    } // for each input
-
-  if ( numPts < 1 || numCells < 1 )
-    {
-    return;
-    }
-  this->UpdateProgress(0.10);
-
-  // Allocate geometry/topology
-  vtkCellArray* newVerts = vtkCellArray::New();
-  newVerts->Allocate(numCells*4);
-
-  vtkCellArray* newLines = vtkCellArray::New();
-  newLines->Allocate(numCells*4);
-
-  vtkCellArray* newStrips = vtkCellArray::New();
-  newStrips->Allocate(numCells*4);
-
-  vtkCellArray* newPolys = vtkCellArray::New();
-  vtkIdType *pPolys = newPolys->WritePointer(numPolys, sizePolys);
-
-  // Allocate the point and cell data
-  vtkPolyData *output = this->GetOutput();
-  vtkCellData *outputCD = output->GetCellData();
-  outputCD->CopyAllocate(cellList,numCells);
-
-  // loop over all input sets
-  vtkIdType ptOffset = 0;
-  vtkIdType cellOffset = 0;
-  countCD = 0;
-  for (idx = 0; idx < this->NumberOfInputs; ++idx)
-    {
-    this->UpdateProgress(0.2 + 0.8*idx/this->NumberOfInputs);
-    vtkPolyData *ds = (vtkPolyData *)(this->Inputs[idx]);
-    // this check is not necessary, but I'll put it in anyway
-    if (ds != NULL)
-      {
-      vtkIdType numPts = ds->GetNumberOfPoints();
-      vtkIdType numCells = ds->GetNumberOfCells();
-      if ( numPts <= 0 && numCells <= 0 )
-        {
-        continue; //no input, just skip
-        }
-
-      vtkCellData *inCD = ds->GetCellData();
-
-      vtkCellArray *inVerts = ds->GetVerts();
-      vtkCellArray *inLines = ds->GetLines();
-      vtkCellArray *inPolys = ds->GetPolys();
-      vtkCellArray *inStrips = ds->GetStrips();
-
-      if (ds->GetNumberOfCells() > 0)
-        {
-        // cell data could be made efficient like the point data,
-        // but I will wait on that.
-        // copy cell data
-       vtkIdType cellId;
-        for (cellId=0; cellId < numCells; cellId++)
-          {
-          outputCD->CopyData(cellList,inCD,countCD,cellId,cellId+cellOffset);
-          }
-        ++countCD;
-        
-        // copy the cells
-        pPolys = this->AppendCells(pPolys, inPolys, ptOffset);
-        
-        // These other cell arrays could be made efficient like polys ...
-       int i;
-       vtkIdType *pts = 0;
-       vtkIdType npts = 0;
-        for (inVerts->InitTraversal(); inVerts->GetNextCell(npts,pts); )
-          {
-          newVerts->InsertNextCell(npts);
-          for (i=0; i < npts; i++)
-            {
-            newVerts->InsertCellPoint(pts[i]+ptOffset);
-            }
-          }
-        
-        for (inLines->InitTraversal(); inLines->GetNextCell(npts,pts); )
-          {
-          newLines->InsertNextCell(npts);
-          for (i=0; i < npts; i++)
-            {
-            newLines->InsertCellPoint(pts[i]+ptOffset);
-            }
-          }
-
-        for (inStrips->InitTraversal(); inStrips->GetNextCell(npts,pts); )
-          {
-          newStrips->InsertNextCell(npts);
-          for (i=0; i < npts; i++)
-            {
-            newStrips->InsertCellPoint(pts[i]+ptOffset);
-            }
-          }
-        }
-      cellOffset += numCells;
-      }
-    }
+  bool anIsExecuted = VISU::PolyDataRequestData(theInputVector,
+                                               this->GetNumberOfInputConnections(0),
+                                               theOutputVector,
+                                               GetSharedPointSet(),
+                                               IsMergingInputs(),
+                                               IsMappingInputs());
+  if(!anIsExecuted)
+    anIsExecuted = Superclass::RequestData(theRequest,
+                                          theInputVector,
+                                          theOutputVector);
   
-  if ( newVerts->GetNumberOfCells() > 0 )
-    {
-    output->SetVerts(newVerts);
-    }
-  newVerts->Delete();
-
-  if ( newLines->GetNumberOfCells() > 0 )
-    {
-    output->SetLines(newLines);
-    }
-  newLines->Delete();
-
-  if ( newPolys->GetNumberOfCells() > 0 )
-    {
-    output->SetPolys(newPolys);
-    }
-  newPolys->Delete();
-
-  if ( newStrips->GetNumberOfCells() > 0 )
-    {
-    output->SetStrips(newStrips);
-    }
-  newStrips->Delete();
-
-  // When all optimizations are complete, this squeeze will be unecessary.
-  // (But it does not seem to cost much.)
-  output->Squeeze();
-
-  /*
-  int idx;
-  vtkIdType numPts, numCells, newCellId, cellId;
-  vtkCellData *cd;
-  vtkIdList *ptIds;
-  vtkDataSet *ds;
-  vtkPolyData *output = this->GetOutput();
-  //
-  numPts = myPoints->GetNumberOfPoints();
-  if (numPts < 1) {
-    return;
-  }
-  //
-  numCells = 0;
-  for (idx = 0; idx < this->NumberOfInputs; ++idx) {
-    ds = (vtkDataSet *)(this->Inputs[idx]);
-    if (ds != NULL)  {
-      if ( ds->GetNumberOfPoints() <= 0 && ds->GetNumberOfCells() <= 0 )  {
-        continue; //no input, just skip
-      }
-      numCells += ds->GetNumberOfCells();
-    }//if non-empty dataset
-  }//for all inputs
-  if (numCells < 1) {
-    return;
-  }
-  //
-  // Now can allocate memory
-  output->Allocate(numCells); 
-  ptIds = vtkIdList::New(); 
-  ptIds->Allocate(VTK_CELL_SIZE);
-  //
-  // Append each input dataset together
-  //
-  // 1.points
-  output->SetPoints(myPoints.GetPointer());
-  // 2.cells
-  for (idx = 0; idx < this->NumberOfInputs; ++idx) {
-    ds = (vtkDataSet *)(this->Inputs[idx]);
-    if (ds != NULL) {
-      numCells = ds->GetNumberOfCells(); 
-      cd = ds->GetCellData();
-      // copy cell and cell data
-      for (cellId=0; cellId<numCells; cellId++)  {
-        ds->GetCellPoints(cellId, ptIds);
-        newCellId = output->InsertNextCell(ds->GetCellType(cellId), ptIds);
-      }
-    }
-  }
-  //
-  ptIds->Delete();
-  */
+  return anIsExecuted;
 }
 
+
index d07757fa409a430898c6683411d24c615bf2b0cc..9f16596c92cddbd0cb14bb9f6e285087231b59d9 100644 (file)
 #define VISU_APPENDPOLYDATA_H
 
 #include <vtkAppendPolyData.h>
-#include <vtkSmartPointer.h>
 
-#include <vector>
-#include <map>
-
-class vtkPoints;
+#include "VISU_AppendFilterUtilities.hxx"
 
 /*! \brief This class used same as vtkAppendFilter. See documentation on VTK for more information.
  */
-class VISU_AppendPolyData : public vtkAppendPolyData 
+class VISU_AppendPolyData : public vtkAppendPolyData,
+                           public VISU::TAppendFilterHelper
 {
 public:
   /*! \fn static VTKViewer_AppendFilter *New()
@@ -41,62 +38,20 @@ public:
    */
   vtkTypeRevisionMacro(VISU_AppendPolyData, vtkAppendPolyData);
 
-  void SetDoMappingFlag(const bool theFlag);
-
-  bool DoMappingFlag() const;
-
-  void
-  SetPoints(vtkPoints* thePoints);
-
-  vtkPoints*
-  GetPoints();
-
-  vtkIdType
-  GetPointOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID);
-
-  vtkIdType
-  GetCellOutputID(vtkIdType theInputID,
-                 vtkIdType theInputDataSetID);
-
-  void 
-  GetPointInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID);
-
-  void
-  GetCellInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID);
-
-  typedef std::vector<vtkIdType> TVectorIds;
-
 protected:
   /*! \fn VTKViewer_AppendFilter();
    * \brief Constructor
    */
   VISU_AppendPolyData();
+
   /*! \fn ~VTKViewer_AppendFilter();
    * \brief Destructor.
    */
   ~VISU_AppendPolyData();
-  /*! \fn void Execute();
-   * \brief Filter culculation method.
-   */
-  virtual void Execute();
-  //
-  void DoMapping();
-
-  void Reset();
-
-  void MakeOutput();
 
-  bool myDoMappingFlag;
-  TVectorIds myNodeRanges;
-  TVectorIds myCellRanges;
-  vtkSmartPointer<vtkPoints> myPoints;
+  virtual
+  int
+  RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
 };
 
 #endif
diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.cxx b/src/CONVERTOR/VISU_CommonCellsFilter.cxx
new file mode 100644 (file)
index 0000000..6ca4275
--- /dev/null
@@ -0,0 +1,269 @@
+// File      : VISU_CommonCellsFilter.cxx
+// Created   : Wed Apr  4 08:45:07 2007
+// Author    : Eugeny NIKOLAEV (enk)
+// Copyright : Open CASCADE
+
+#include "VISU_CommonCellsFilter.hxx"
+
+// VTK product headers
+#include <vtkUnstructuredGrid.h>
+#include <vtkSetGet.h>
+#include <vtkObjectFactory.h>
+#include <vtkDataSet.h>
+#include <vtkCellTypes.h>
+#include <vtkPointData.h>
+#include <vtkCellData.h>
+#include <vtkIdList.h>
+#include <vtkFloatArray.h>
+#include <vtkCell.h>
+
+// STL
+#include <algorithm>
+#include <vector>
+#include <map>
+
+namespace
+{
+  typedef std::vector<int> TSortedArray;
+  typedef std::map<int,int> TId2IdMap;
+
+  inline
+  void
+  GetSortedArray(vtkIntArray *theArray, 
+                TSortedArray& theSortedArray)
+  {
+    int aMaxId = theArray->GetMaxId();
+    int* aPointer = theArray->GetPointer(0);
+    int* anEndPointer = theArray->GetPointer(aMaxId + 1);
+    TSortedArray aSortedArray(aPointer, anEndPointer);
+    std::sort(aSortedArray.begin(), aSortedArray.end());
+    theSortedArray.swap(aSortedArray);
+  }
+
+  inline
+  void
+  GetIdsForCopy(vtkUnstructuredGrid *inputUGrid, 
+                vtkIntArray* inputPointIds,
+                TSortedArray& outputSortedArray)
+  {
+    if(inputUGrid){
+      TSortedArray aSortedPointIds;
+      TSortedArray aOutputCellIds;
+      GetSortedArray(inputPointIds,aSortedPointIds);
+      
+      int nbInputCells = inputUGrid->GetNumberOfCells();
+
+      TSortedArray aPointCellIds;
+      for(int idCell=0;idCell<nbInputCells;idCell++){
+        aPointCellIds.clear();
+        vtkCell*   aCell = inputUGrid->GetCell(idCell);
+        vtkIdList* ptIds = aCell->GetPointIds();
+        int aMaxId = ptIds->GetNumberOfIds();
+        int* aPointer = ptIds->GetPointer(0);
+        int* anEndPointer = ptIds->GetPointer(aMaxId + 1);
+        TSortedArray aSortedArray(aPointer, anEndPointer);
+        std::sort(aSortedArray.begin(), aSortedArray.end());
+
+        int aMaxLength = std::max(aSortedArray.size(), aSortedPointIds.size());
+        TSortedArray anIntersectionArray(aMaxLength);
+        TSortedArray::iterator anArrayIter = anIntersectionArray.begin();
+        anArrayIter = std::set_intersection(aSortedArray.begin(),
+                                            aSortedArray.end(),
+                                            aSortedPointIds.begin(),
+                                            aSortedPointIds.end(),
+                                            anArrayIter);
+        anIntersectionArray.erase(anArrayIter, anIntersectionArray.end());
+        if(anIntersectionArray.size() == aSortedArray.size())
+          aOutputCellIds.push_back(idCell);
+      }
+
+      outputSortedArray.swap(aOutputCellIds);
+    }
+  }
+
+  inline
+  void
+  CopyElementsToOutput(vtkUnstructuredGrid* theInputUG,
+                       int& theNbElements,
+                       TSortedArray& theElementIdsForCopy,
+                       TId2IdMap& theOldId2NewIdPointsMap,
+                       vtkIntArray* theOuputIDSArray,
+                       vtkUnstructuredGrid* theOutputUG)
+  {
+    vtkIntArray* aInputCellsMapper =
+      dynamic_cast<vtkIntArray*>(theInputUG->GetCellData()->GetArray("VISU_CELLS_MAPPER"));
+    int* aInputCellsMapperPointer = aInputCellsMapper->GetPointer(0);
+    for(int aCellIndex=0;aCellIndex<theNbElements;aCellIndex++){
+      int aCellId = theElementIdsForCopy[aCellIndex];
+      vtkIdList* aOldPointIds = theInputUG->GetCell(aCellId)->GetPointIds();
+      vtkIdList* aNewPointIds = vtkIdList::New();
+      int nbPointIds = aOldPointIds->GetNumberOfIds();
+      aNewPointIds->SetNumberOfIds(nbPointIds);
+      for(int j=0;j<nbPointIds;j++){
+        int aOldId = aOldPointIds->GetId(j);
+        int aNewId = theOldId2NewIdPointsMap[aOldId];
+        aNewPointIds->SetId(j,aNewId);
+      }
+      const int aOldCellId = theElementIdsForCopy[aCellIndex];
+      theOutputUG->InsertNextCell(theInputUG->GetCellType(aOldCellId),
+                                  aNewPointIds);
+      if(aInputCellsMapperPointer)
+        theOuputIDSArray->InsertNextValue(aInputCellsMapperPointer[aOldCellId]);
+      else
+        theOuputIDSArray->InsertNextValue(aOldCellId);
+      
+      aNewPointIds->Delete();
+    }
+  }
+}
+
+vtkStandardNewMacro(VISU_CommonCellsFilter);
+
+VISU_CommonCellsFilter
+::VISU_CommonCellsFilter()
+{}
+
+VISU_CommonCellsFilter
+::~VISU_CommonCellsFilter()
+{}
+
+void
+VISU_CommonCellsFilter
+::SetProfileUG(vtkUnstructuredGrid *input)
+{
+  this->SetInput(input);
+}
+
+vtkUnstructuredGrid*
+VISU_CommonCellsFilter
+::GetProfileUG()
+{
+  return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput());
+}
+
+void
+VISU_CommonCellsFilter
+::SetCellsUG(vtkUnstructuredGrid *input)
+{
+  this->vtkProcessObject::SetNthInput(1, input);
+}
+
+vtkUnstructuredGrid*
+VISU_CommonCellsFilter
+::GetCellsUG()
+{
+  if (this->NumberOfInputs < 2)
+  {
+    return NULL;
+  }
+  return dynamic_cast<vtkUnstructuredGrid*>(this->Inputs[1]);
+}
+
+void
+VISU_CommonCellsFilter
+::Execute()
+{
+  vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
+  vtkUnstructuredGrid* anInputCellsUG   = this->GetCellsUG();
+
+  vtkUnstructuredGrid* anOutput         = this->GetOutput();
+  
+  if(anInputCellsUG == NULL){
+    anOutput->ShallowCopy(anInputProfileUG);
+  }
+  else{
+    // check if anInputProfileUG already have cells types not equal VTK_VERTEX
+    vtkCellTypes* aCellTypes = vtkCellTypes::New();
+
+    anInputProfileUG->GetCellTypes(aCellTypes);
+    if(aCellTypes){
+      if (aCellTypes->GetNumberOfTypes()!=1 )
+        anOutput->ShallowCopy(anInputProfileUG);
+      else{
+        if(aCellTypes->GetCellType(0) != VTK_VERTEX)
+          anOutput->DeepCopy(anInputProfileUG);
+        else{
+
+          vtkCellData* aInputCellData = anInputProfileUG->GetCellData();
+
+          //
+          // Calculate output points
+          //
+          vtkIdList* aPointIdsForCopy = vtkIdList::New();
+          vtkPoints* aOutputPointSet = vtkPoints::New();
+          TId2IdMap  aOldId2NewIdPointsMap;
+          
+          aOutputPointSet->Reset();
+          
+          vtkIntArray* aPointIDS =
+            dynamic_cast<vtkIntArray*>(aInputCellData->GetArray("VISU_CELLS_MAPPER"));
+          if(aPointIDS){
+            aPointIdsForCopy->SetNumberOfIds(aPointIDS->GetNumberOfTuples());
+            for(int i=0;i<aPointIDS->GetNumberOfTuples();i++){
+              aPointIdsForCopy->SetId(i,aPointIDS->GetValue(i));
+            }
+            aOutputPointSet->SetNumberOfPoints(aPointIdsForCopy->GetNumberOfIds());
+            // aOutputPointSet copy points from anInputProfileUG to aOutputPointSet, which
+            // in aPointIdsForCopy ids list
+            anInputProfileUG->GetPoints()->GetPoints(aPointIdsForCopy,aOutputPointSet);
+            for(int i=0;i<aPointIdsForCopy->GetNumberOfIds();i++)
+              aOldId2NewIdPointsMap[aPointIdsForCopy->GetId(i)] = i;
+            anOutput->SetPoints(aOutputPointSet);
+          }
+          aOutputPointSet->Delete();
+          // applay scalar,vector,normal,tensor ... values
+          anOutput->GetPointData()->CopyFieldOff("VISU_CELLS_MAPPER");
+          anOutput->GetPointData()->CopyFieldOff("VISU_POINTS_MAPPER");
+          anOutput->GetPointData()->PassData(aInputCellData);
+          //anOutput->GetPointData()->GetArray("VISU_CELLS_MAPPER")->SetName("VISU_POINTS_MAPPER");
+
+          // apply VISU_POINTS_MAPPER
+          vtkIntArray*  aNewPointsIdsArray = vtkIntArray::New();
+          aNewPointsIdsArray->SetName("VISU_POINTS_MAPPER");
+          aNewPointsIdsArray->SetNumberOfComponents(1);
+          aNewPointsIdsArray->SetNumberOfTuples(aPointIdsForCopy->GetNumberOfIds());
+          for(int i=0;i<aPointIdsForCopy->GetNumberOfIds();i++)
+            aNewPointsIdsArray->SetValue(i,aPointIdsForCopy->GetId(i));
+          anOutput->GetPointData()->AddArray(aNewPointsIdsArray);
+
+          
+            
+          aNewPointsIdsArray->Delete();
+          
+          
+          // Calculate output cells
+          int nbCells=0;
+
+          TSortedArray aCellIdsForCopy;
+          
+          GetIdsForCopy(anInputCellsUG,aPointIDS,aCellIdsForCopy);
+          nbCells = aCellIdsForCopy.size();
+
+          // copy cells to output
+          int aAllocMem = nbCells;
+          anOutput->Allocate(aAllocMem);
+          vtkIntArray* theOuputIDSArray = vtkIntArray::New();
+          theOuputIDSArray->SetName("VISU_CELLS_MAPPER");
+          theOuputIDSArray->SetNumberOfComponents(1);
+          theOuputIDSArray->SetNumberOfTuples(aAllocMem);
+          
+          if(nbCells>0 && anInputCellsUG)
+            CopyElementsToOutput(anInputCellsUG,
+                                 nbCells,
+                                 aCellIdsForCopy,
+                                 aOldId2NewIdPointsMap,
+                                 theOuputIDSArray,
+                                 anOutput);
+          
+          anOutput->GetCellData()->AddArray(theOuputIDSArray);
+
+          theOuputIDSArray->Delete();
+          aPointIdsForCopy->Delete();
+        }
+      }
+      
+    }
+    else
+      anOutput->ShallowCopy(anInputProfileUG);
+  }
+}
diff --git a/src/CONVERTOR/VISU_CommonCellsFilter.hxx b/src/CONVERTOR/VISU_CommonCellsFilter.hxx
new file mode 100644 (file)
index 0000000..1113ea4
--- /dev/null
@@ -0,0 +1,41 @@
+// File      : VISU_CommonCellsFilter.hxx
+// Created   : Tue Apr  3 16:16:53 2007
+// Author    : Eugeny NIKOLAEV (enk)
+// Copyright : Open CASCADE
+
+
+#ifndef VISU_CommonCellsFilter_HeaderFile
+#define VISU_CommonCellsFilter_HeaderFile
+
+#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+
+class VISU_CommonCellsFilter: public vtkUnstructuredGridToUnstructuredGridFilter
+{
+public:
+  static VISU_CommonCellsFilter *New();
+  vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridToUnstructuredGridFilter);
+
+  // Description:
+  // Specify the Unstructured Grid which overview
+  // nodal profile.
+  void SetProfileUG(vtkUnstructuredGrid *input);
+  vtkUnstructuredGrid* GetProfileUG();
+
+  // Description:
+  // Specify the Unstructured Grid which overview
+  // cells data on CELL_ENTITY.
+  void SetCellsUG(vtkUnstructuredGrid *input);
+  vtkUnstructuredGrid* GetCellsUG();
+
+protected:
+  VISU_CommonCellsFilter();
+  ~VISU_CommonCellsFilter();
+
+  void Execute(); //generate output data
+
+private:
+  VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
+  void operator=(const VISU_CommonCellsFilter&); // Lock copy
+};
+
+#endif
index e630d14ef0d69a3adae221b194fc9f9a76d4e7b7..1c6fd8d8c8d547bbbdb5cefa861333472e93d737 100644 (file)
@@ -68,14 +68,15 @@ VISU_Convertor
   int iEnd = strlen(aName);
   static int VtkHighLevelLength = 12; //25
   if(iEnd > VtkHighLevelLength) iEnd = VtkHighLevelLength;
-  char aNewName[iEnd+1];
+  char* aNewName = new char[iEnd+1];
   aNewName[iEnd] = '\0';
   strncpy(aNewName, aName, iEnd);
   std::replace(aNewName, aNewName + iEnd, ' ', '_');
   if(true || theTimeId == 0)
     aName = aNewName;
   else
-    aName.sprintf("%s_%d", aNewName, theTimeId);
+    aName.sprintf("%s_%d",aNewName,theTimeId);
+  delete[] aNewName;
   return aName.latin1();
 }
 
index 1d1cd451959f155a82c357a44732ead69bb41dfa..45edc030da4b94a5acddec9abb8c688ed96b1f6c 100644 (file)
@@ -49,7 +49,7 @@
   2. Get VTK representation for any existing MED entity
   Also, it can perform some additional work to calculate expected amount of memory to build defined VTK representation
 */
-class VISU_Convertor
+class VISU_CONVERTOR_EXPORT VISU_Convertor
 {
 public:
   virtual 
@@ -212,8 +212,9 @@ protected:
 
 extern "C"
 {
+VISU_CONVERTOR_EXPORT
   //! Instatiate proper VISU_Convertor subclass
-  VISU_Convertor* 
+  VISU_Convertor*
   CreateConvertor(const std::string& theFileName);
 };
 
index 441b206b4b999cc0faa4e40de28bf3f4adfb444c..9d3101215fe3e250f58a08276c3953136b0fe861 100644 (file)
@@ -43,7 +43,7 @@ class vtkPolyData;
 class VISU_AppendPolyData;
 
 class vtkUnstructuredGrid;
-class VTKViewer_AppendFilter;
+class VISU_AppendFilter;
 
 class VISU_MergeFilter;
 
@@ -66,7 +66,7 @@ namespace VISU
 
   //---------------------------------------------------------------
   typedef vtkSmartPointer<vtkUnstructuredGrid> PUnstructuredGrid;
-  typedef vtkSmartPointer<VTKViewer_AppendFilter> PAppendFilter;
+  typedef vtkSmartPointer<VISU_AppendFilter> PAppendFilter;
 
   struct TAppendFilterHolder;
   typedef MED::SharedPtr<TAppendFilterHolder> PAppendFilterHolder;
index 4bf738c59c4e4e5f6f355f55f097128087aa5d5e..8af6521ed5fb3c4d81e22568466b0d582b1d4210 100644 (file)
 #include "VISU_ConvertorUtils.hxx"
 
 #include <vtkCellType.h>
+
 #include <vtkUnstructuredGridWriter.h>
+#include <vtkUnstructuredGrid.h>
+
 #include <vtkPolyDataWriter.h>
+#include <vtkPolyData.h>
+
 #include <vtkTimerLog.h>
+#include <vtkPointData.h>
+#include <vtkCellData.h>
+#include <vtkDataSet.h>
+
+#include <vtkIntArray.h>
+#include <algorithm>
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -199,6 +210,135 @@ namespace VISU
   }
 
 
+  //---------------------------------------------------------------
+  bool 
+  IsDataOnPoints(vtkDataSet* theDataSet)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+    if(aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
+      return aDataSetAttributes->GetNumberOfArrays() > 1;
+    return aDataSetAttributes->GetNumberOfArrays() > 0;
+  }
+
+
+  //---------------------------------------------------------------
+  bool 
+  IsDataOnCells(vtkDataSet* theDataSet)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
+    if(aDataSetAttributes->GetArray("VISU_CELLS_MAPPER"))
+      return aDataSetAttributes->GetNumberOfArrays() > 1;
+    return aDataSetAttributes->GetNumberOfArrays() > 0;
+  }
+
+
+  //---------------------------------------------------------------
+  vtkIdType
+  GetElemVTKID(vtkDataSet *theDataSet, vtkIdType theID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       int aMaxId = anIntArray->GetMaxId();
+       int* aPointer = anIntArray->GetPointer(0);
+       int* anEndPointer = anIntArray->GetPointer(aMaxId + 1);
+       int* aPtr = std::find(aPointer, anEndPointer, theID);
+       return aPtr - aPointer;
+      }
+    }
+    return -1;
+  }
+
+
+  //---------------------------------------------------------------
+  vtkIdType
+  GetElemObjID(vtkDataSet *theDataSet, vtkIdType theID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       return anIntArray->GetValue(theID);
+      }
+    }
+    return -1;
+  }
+
+
+  //---------------------------------------------------------------
+  vtkIdType
+  GetNodeVTKID(vtkDataSet *theDataSet, vtkIdType theID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       int aMaxId = anIntArray->GetMaxId();
+       int* aPointer = anIntArray->GetPointer(0);
+       int* anEndPointer = anIntArray->GetPointer(aMaxId + 1);
+       int* aPtr = std::find(aPointer, anEndPointer, theID);
+       return aPtr - aPointer;
+      }
+    }
+    return -1;
+  }
+
+
+  //---------------------------------------------------------------
+  vtkIdType
+  GetNodeObjID(vtkDataSet *theDataSet, vtkIdType theID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       return anIntArray->GetValue(theID);
+      }
+    }
+    return -1;
+  }
+
+
+  //---------------------------------------------------------------
+  TGaussPointID
+  GetObjID(vtkDataSet *theDataSet, vtkIdType theID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_GAUSS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       vtkIdType anID = 2 * theID;
+       TCellID aCellID = anIntArray->GetValue(anID);
+       TLocalPntID aLocalPntID = anIntArray->GetValue(anID + 1);
+       return TGaussPointID(aCellID, aLocalPntID);
+      }
+    }
+    return TGaussPointID();
+  }
+
+
+  //---------------------------------------------------------------
+  TInputCellID
+  GetInputCellID(vtkDataSet *theDataSet, vtkIdType theObjID)
+  {
+    theDataSet->Update();
+    vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+    if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_INPUTS_MAPPER")){
+      if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+       vtkIdType aVTKID = GetElemVTKID(theDataSet, theObjID);
+       vtkIdType aTupleID = 2 * aVTKID;
+       TInputID anInputID = anIntArray->GetValue(aTupleID);
+       TCellID aCellID = anIntArray->GetValue(aTupleID + 1);
+       return TInputCellID(anInputID, aCellID);
+      }
+    }
+    return TInputCellID();
+  }
+
+
   //---------------------------------------------------------------
   TTimerLog
   ::TTimerLog(int theIsDebug,
index 348572688078dc9817c4db53b8775b8da5a89b20..bcf9773574aa631ad7f92277daf93359b4a84678 100644 (file)
 #ifndef VISU_ConvertorUtils_HeaderFile
 #define VISU_ConvertorUtils_HeaderFile
 
+#include "VISUConvertor.hxx"
+
 #include "VISU_ConvertorDef.hxx"
+#include "VISU_IDMapper.hxx"
 #include "MED_Utilities.hxx"
 
 #include <vtkSystemIncludes.h>
@@ -37,6 +40,7 @@
 class vtkUnstructuredGrid;
 class vtkPolyData;
 class vtkTimerLog;
+class vtkDataSet;
 
 #ifndef VISU_ENABLE_QUADRATIC
   #define VISU_ENABLE_QUADRATIC
@@ -55,25 +59,84 @@ namespace VISU
   vtkIdType
   VISUGeom2NbNodes(EGeometry theGeom);
 
+
+  //---------------------------------------------------------------
   //! Maps VISU geometrical type to VTK one
   vtkIdType
   VISUGeom2VTK(EGeometry theGeom);
 
+
   //---------------------------------------------------------------
   //! The utility function allows to write vtkUnstructuredGrid to a file with defined name
+  VISU_CONVERTOR_EXPORT
   void 
   WriteToFile(vtkUnstructuredGrid* theDataSet, 
              const std::string& theFileName);
 
+
   //---------------------------------------------------------------
   //! The utility function allows to write vtkPolyData to a file with defined name
+  VISU_CONVERTOR_EXPORT
   void 
   WriteToFile(vtkPolyData* theDataSet, 
              const std::string& theFileName);
 
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  bool 
+  IsDataOnCells(vtkDataSet* theDataSet);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  bool 
+  IsDataOnPoints(vtkDataSet* theDataSet);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  vtkIdType
+  GetElemVTKID(vtkDataSet *theDataSet, vtkIdType theID);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  vtkIdType
+  GetElemObjID(vtkDataSet *theDataSet, vtkIdType theID);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  vtkIdType
+  GetNodeVTKID(vtkDataSet *theDataSet, vtkIdType theID);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  vtkIdType
+  GetNodeObjID(vtkDataSet *theDataSet, vtkIdType theID);
+
+
+  //---------------------------------------------------------------
+  VISU_CONVERTOR_EXPORT
+  TGaussPointID
+  GetObjID(vtkDataSet *theDataSet, vtkIdType theID);
+
+
+  //---------------------------------------------------------------
+  typedef vtkIdType TInputID;
+  typedef vtkIdType TCellID; 
+  typedef std::pair<TInputID,TCellID> TInputCellID;
+
+  VISU_CONVERTOR_EXPORT
+  TInputCellID
+  GetInputCellID(vtkDataSet *theDataSet, vtkIdType theObjID);
+
+
   //---------------------------------------------------------------
   //! The utility class that allows to perform perfomance mesurement
-  class TTimerLog
+  class VISU_CONVERTOR_EXPORT TTimerLog
   {
     int myIsDebug;
     double myCPUTime;
@@ -87,6 +150,8 @@ namespace VISU
     ~TTimerLog();
   };
   
+
+  //---------------------------------------------------------------
 }
 
 #endif
index 1442f995a038e6d04e60f7e5cf476567565f3fc1..46342752158bbdc0aca553bf053e4b2f81047ffa 100644 (file)
@@ -29,8 +29,8 @@
 #include "VISU_PointCoords.hxx"
 #include "VISU_MeshValue.hxx"
 
+#include "VISU_AppendFilter.hxx"
 #include "VISU_AppendPolyData.hxx"
-#include "VTKViewer_AppendFilter.h"
 #include "VTKViewer_CellLocationsArray.h"
 
 #include "VISU_ConvertorUtils.hxx"
@@ -124,6 +124,20 @@ namespace
       aCellTypesArray->SetValue(anID,(unsigned char)theGeom);
     }
 
+    {
+      int aNbTuples = aNbCells;
+      vtkIntArray *aDataArray = vtkIntArray::New();
+      aDataArray->SetName("VISU_CELLS_MAPPER");
+      aDataArray->SetNumberOfComponents(1);
+      aDataArray->SetNumberOfTuples(aNbTuples);
+      for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+       int anObjID = theSubMesh->GetElemObjID(aTupleId);
+       aDataArray->SetValue(aTupleId, anObjID);
+      }
+      theSource->GetCellData()->AddArray(aDataArray);
+      aDataArray->Delete();
+    }
+
     vtkIdType *pts = 0, npts = 0;
     VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
     aCellLocationsArray->SetNumberOfComponents(1);
@@ -161,11 +175,16 @@ namespace
     VISU::TSubMeshID& aMeshID = theFamily->myMeshID;
     aMeshID.resize(aNbCells);
 
+    vtkIntArray *aDataArray = vtkIntArray::New();
+    aDataArray->SetName("VISU_CELLS_MAPPER");
+    aDataArray->SetNumberOfComponents(1);
+    aDataArray->SetNumberOfTuples(aNbCells);
+
     VISU::TID2ID& anElemObj2VTKID = theFamily->myElemObj2VTKID;
 
     const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
     VISU::TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.begin();
-    for(vtkIdType i = 0, j = 0; anIter != aGeom2SubMesh.end(); anIter++){
+    for(vtkIdType aCellId = 0; anIter != aGeom2SubMesh.end(); anIter++){
       VISU::EGeometry aEGeom = anIter->first;
       vtkIdType aVGeom = VISUGeom2VTK(aEGeom);
 
@@ -189,15 +208,20 @@ namespace
              endl);
 
       VISU::TSubMeshID::const_iterator aSubMeshIDIter = aSubMeshID.begin();
-      for(; aSubMeshIDIter != aSubMeshID.end(); aSubMeshIDIter++, i++){
+      for(; aSubMeshIDIter != aSubMeshID.end(); aSubMeshIDIter++, aCellId++){
        vtkIdType anID = *aSubMeshIDIter;
-       PrintCells(i,aConnectivity,anArray[anID]);
-       aCellTypesArray->SetValue(j++,(unsigned char)aVGeom);
+       PrintCells(aCellId, aConnectivity, anArray[anID]);
+       aCellTypesArray->SetValue(aCellId, (unsigned char)aVGeom);
        vtkIdType anObjID = aSubMesh.GetElemObjID(anID);
-       anElemObj2VTKID[anObjID] = i;
-       aMeshID[i] = anObjID;
+       aDataArray->SetValue(aCellId, anObjID);
+       anElemObj2VTKID[anObjID] = aCellId;
+       aMeshID[aCellId] = anObjID;
       }
     }
+
+    theSource->GetCellData()->AddArray(aDataArray);
+    aDataArray->Delete();
+
     vtkIdType *pts = 0, npts = 0;
     VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
     aCellLocationsArray->SetNumberOfComponents(1);
@@ -277,6 +301,20 @@ namespace
       aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts));
     theSource->SetCells(aCellTypesArray,aCellLocationsArray,aConnectivity);
     
+    {
+      int aNbTuples = aNbCells;
+      vtkIntArray *aDataArray = vtkIntArray::New();
+      aDataArray->SetName("VISU_CELLS_MAPPER");
+      aDataArray->SetNumberOfComponents(1);
+      aDataArray->SetNumberOfTuples(aNbTuples);
+      for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+       int anObjID = theSubProfile->GetElemObjID(aTupleId);
+       aDataArray->SetValue(aTupleId, anObjID);
+      }
+      theSource->GetCellData()->AddArray(aDataArray);
+      aDataArray->Delete();
+    }
+    
     aCellLocationsArray->Delete();
     aCellTypesArray->Delete();
     aConnectivity->Delete();
@@ -296,7 +334,7 @@ namespace
     if(theSubProfile->myIsVTKDone)
       return;
     
-    aSource->SetPoints(theMesh->GetPoints());
+    aSource->ShallowCopy(theMesh->GetPointSet());
     INITMSGA(MYDEBUG,0,"GetNumberOfPoints - "<<aSource->GetNumberOfPoints()<<endl);
     GetCells(aSource,theSubProfile,theProfile,theMeshOnEntity);
     BEGMSG(MYDEBUG,"GetNumberOfCells - "<<aSource->GetNumberOfCells()<<endl);
@@ -306,20 +344,22 @@ namespace
   
   
   //---------------------------------------------------------------
-  void
+  bool
   GetMeshOnProfile(const VISU::PMeshImpl& theMesh,
                   const VISU::PMeshOnEntityImpl& theMeshOnEntity,
                   const VISU::PProfileImpl& theProfile)
   {
     if(theProfile->myIsVTKDone)
-      return;
-    
+      return true;
+   
+    if(theProfile->myMeshOnEntity && theProfile->myMeshOnEntity != theMeshOnEntity.get())
+      return false;
+      
     VISU::TTimerLog aTimerLog(MYDEBUG,"GetMeshOnProfile");
-    INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<<theMeshOnEntity->myEntity<<endl);
+    INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<<theMeshOnEntity->myEntity<<std::endl);
 
-    theProfile->myMeshOnEntity = theMeshOnEntity.get();
     const VISU::PAppendFilter& anAppendFilter = theProfile->GetFilter();
-    anAppendFilter->SetPoints(theMesh->GetPoints());
+    anAppendFilter->SetSharedPointSet(theMesh->GetPointSet());
 
     if(theProfile->myIsAll){
       vtkUnstructuredGrid* aDataSet = theMeshOnEntity->GetUnstructuredGridOutput();
@@ -355,9 +395,11 @@ namespace
       }
     }
     anAppendFilter->Update(); // Fix on VTK
+    theProfile->myMeshOnEntity = theMeshOnEntity.get();
     theProfile->myNamedPointCoords = theMesh->myNamedPointCoords;
     
     theProfile->myIsVTKDone = true;
+    return true;
   }
   
   
@@ -383,8 +425,8 @@ namespace
     anIdList->Delete();
     
     const VISU::PPolyData& aSource = theGaussSubMesh->GetSource();
+    aSource->ShallowCopy(aCoords.GetPointSet());
     aSource->SetVerts(aConnectivity);
-    aSource->SetPoints(aCoords.GetPoints());
     
     aConnectivity->Delete();
   }
@@ -561,33 +603,39 @@ VISU_Convertor_impl
       if(MYVTKDEBUG) anAppendFilter->DebugOn();
 
       LoadMeshOnEntity(aMesh,aMeshOnEntity);
-      anAppendFilter->SetPoints(aMesh->GetPoints());
+      anAppendFilter->SetSharedPointSet(aMesh->GetPointSet());
       
       const VISU::TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh;
       VISU::TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.begin();
 
-      VISU::TID2ID& anElemObj2VTKID = aMeshOnEntity->myElemObj2VTKID;
-      VISU::TSubMeshArr& aSubMeshArr = aMeshOnEntity->mySubMeshArr;
-      aSubMeshArr.resize(aGeom2SubMesh.size());
-
       for(vtkIdType anID = 0, aCellID = 0; anIter != aGeom2SubMesh.end(); anIter++, anID++){
        VISU::EGeometry aEGeom = anIter->first;
        vtkIdType aVGeom = VISUGeom2VTK(aEGeom);
        VISU::PSubMeshImpl aSubMesh = anIter->second;
+
+       //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+       aSubMesh->myIsStructured = aMesh->myIsStructured;
+       aSubMesh->myType = aMesh->myType;
+       aSubMesh->myGrilleStructure = aMesh->myGrilleStructure;
+       aSubMesh->myObjID2StructureID = aMesh->myObjID2StructureID;
+       //ENK: 23.11.2006
+
        const VISU::PUnstructuredGrid& aSource = aSubMesh->GetSource();
-       aSource->SetPoints(aMesh->GetPoints());
-       GetCellsOnSubMesh(aSource,aMeshOnEntity,aSubMesh,aVGeom);
-       anAppendFilter->AddInput(aSource.GetPointer());
+       aSource->ShallowCopy(aMesh->GetPointSet());
 
        aSubMesh->myStartID = aCellID;
-       vtkIdType aNbCells = aSource->GetNumberOfCells();
-       for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
-         vtkIdType anObjID = aSubMesh->GetElemObjID(aCell);
-         anElemObj2VTKID[anObjID] = aCellID;
-       }
-       aSubMeshArr[anID] = aSubMesh;
+       GetCellsOnSubMesh(aSource, aMeshOnEntity, aSubMesh, aVGeom);
+       anAppendFilter->AddInput(aSource.GetPointer());
+       aCellID += aSource->GetNumberOfCells();
       }
       aMeshOnEntity->myNamedPointCoords = aMesh->myNamedPointCoords;
+      
+      //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+      aMeshOnEntity->myIsStructured = aMesh->myIsStructured;
+      aMeshOnEntity->myType = aMesh->myType;
+      aMeshOnEntity->myGrilleStructure = aMesh->myGrilleStructure;
+      aMeshOnEntity->myObjID2StructureID = aMesh->myObjID2StructureID;
+      //ENK: 23.11.2006
 
       aMeshOnEntity->myIsVTKDone = true;
 
@@ -646,11 +694,16 @@ VISU_Convertor_impl
       GetMeshOnEntity(theMeshName,theEntity);
 
       LoadFamilyOnEntity(aMesh,aMeshOnEntity,aFamily);
-      aSource->SetPoints(aMesh->GetPoints());
+      aSource->ShallowCopy(aMesh->GetPointSet());
       GetCellsOnFamily(aSource,aMeshOnEntity,aFamily);
 
       aFamily->myNamedPointCoords = aMesh->myNamedPointCoords;
-
+      //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+      aFamily->myIsStructured = aMesh->myIsStructured;
+      aFamily->myType = aMesh->myType;
+      aFamily->myGrilleStructure = aMesh->myGrilleStructure;
+      aFamily->myObjID2StructureID = aMesh->myObjID2StructureID;
+      //ENK: 23.11.2006
       aFamily->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
@@ -703,7 +756,7 @@ VISU_Convertor_impl
       const VISU::TFamilySet& aFamilySet = aGroup->myFamilySet;
 
       LoadMeshOnGroup(aMesh,aFamilySet);
-      anAppendFilter->SetPoints(aMesh->GetPoints());
+      anAppendFilter->SetSharedPointSet(aMesh->GetPointSet());
 
       VISU::TFamilySet::const_iterator anIter = aFamilySet.begin();
 
@@ -728,7 +781,12 @@ VISU_Convertor_impl
        aFamilyArr[anID] = aFamily;
       }
       aGroup->myNamedPointCoords = aMesh->myNamedPointCoords;
-
+      //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+      aGroup->myIsStructured = aMesh->myIsStructured;
+      aGroup->myType = aMesh->myType;
+      aGroup->myGrilleStructure = aMesh->myGrilleStructure;
+      aGroup->myObjID2StructureID = aMesh->myObjID2StructureID;
+      //ENK: 23.11.2006
       aGroup->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
@@ -771,7 +829,6 @@ VISU_Convertor_impl
   return anOutput;
 }
 
-
 //---------------------------------------------------------------
 VISU::PUnstructuredGridIDMapper 
 VISU_Convertor_impl
@@ -828,6 +885,13 @@ VISU_Convertor_impl
                                         aVTKMeshOnEntity->myEntity);
       }
 
+      //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+      anUnstructuredGridIDMapper->myIsStructured = aMesh->myIsStructured;
+      anUnstructuredGridIDMapper->myType = aMesh->myType;
+      anUnstructuredGridIDMapper->myGrilleStructure = aMesh->myGrilleStructure;
+      anUnstructuredGridIDMapper->myObjID2StructureID = aMesh->myObjID2StructureID;
+      //ENK: 23.11.2006
+
       anUnstructuredGridIDMapper->myIsVTKDone = true;
 
       if(MYDEBUGWITHFILES){
@@ -847,9 +911,9 @@ VISU_Convertor_impl
          BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
        BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
       }
-    }
+      }
 #ifndef _DEXCEPT_
-  }catch(std::exception& exc){
+    }catch(std::exception& exc){
     throw;
   }catch(...){
     throw;
@@ -1220,9 +1284,12 @@ VISU_Convertor_impl
       aVTKMeshOnEntity = aMeshOnEntityMap[VISU::CELL_ENTITY];
     else if(aMeshOnEntityMap.find(VISU::FACE_ENTITY) != aMeshOnEntityMap.end())
       aVTKMeshOnEntity = aMeshOnEntityMap[VISU::FACE_ENTITY];
-    else if(aMeshOnEntityMap.find(VISU::NODE_ENTITY) != aMeshOnEntityMap.end())
+    else if(aMeshOnEntityMap.find(VISU::EDGE_ENTITY) != aMeshOnEntityMap.end())
       aVTKMeshOnEntity = aMeshOnEntityMap[VISU::EDGE_ENTITY];
-  }
+    else if(aMeshOnEntityMap.find(VISU::NODE_ENTITY) != aMeshOnEntityMap.end())
+      aVTKMeshOnEntity = aMeshOnEntityMap[VISU::NODE_ENTITY];
+  }else
+    aVTKMeshOnEntity = aMeshOnEntity;
   
   VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
   VISU::TFieldMap::const_iterator aFieldIter= aFieldMap.find(theFieldName);
index ccb7cd20b739bb92ccb31e8becbaeb6d302c73d5..403ef72fe95de1cb3a53d74cca9711d96d848208 100644 (file)
@@ -41,7 +41,7 @@
   It implements VISU_Convertor public interface and declare new pure virtual functions
   to fill its intermediate data structure from a MED source
 */
-class VISU_Convertor_impl: public VISU_Convertor
+class VISU_CONVERTOR_EXPORT VISU_Convertor_impl: public VISU_Convertor
 {
 public:
   VISU_Convertor_impl();
index b3f59e6392d9b99b8be76048e1ece8edf2e3b1e0..ba36c3fdb0e224ae596cfe35bb0681c9e342886e 100644 (file)
@@ -32,6 +32,8 @@
 #include <vtkObjectFactory.h>
 #include <vtkIdList.h>
 #include <vtkCell.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 using namespace std;
 
@@ -71,8 +73,22 @@ namespace{
   }
 }
 
-void VISU_ExtractUnstructuredGrid::Execute(){
-  vtkUnstructuredGrid *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_ExtractUnstructuredGrid::RequestData(
+  vtkInformation *vtkNotUsed(request),
+  vtkInformationVector **inputVector,
+  vtkInformationVector *outputVector)
+{
+  // get the info objects
+  vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+  // get the input and ouptut
+  vtkUnstructuredGrid *anInput = vtkUnstructuredGrid::SafeDownCast(
+    inInfo->Get(vtkDataObject::DATA_OBJECT()));
+  vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+  
+
   vtkIdType aNbCells = anInput->GetNumberOfCells();
   anOutput->Allocate(aNbCells);
   MSG(MYDEBUG,"Execute - anInput->GetNumberOfCells() = "<<anInput->GetNumberOfCells());
@@ -97,4 +113,6 @@ void VISU_ExtractUnstructuredGrid::Execute(){
   aCellIds->Delete();
   anOutput->SetPoints(anInput->GetPoints());
   MSG(MYDEBUG,"Execute - anOutput->GetNumberOfCells() = "<<anOutput->GetNumberOfCells());
+  
+  return 1;
 }
index 6541f25901baa1530a10e7c6d38de5e30b031793..37567954f335dfb791b9cdac6fd8a81b6816e33b 100644 (file)
@@ -55,7 +55,7 @@ protected:
   VISU_ExtractUnstructuredGrid();
   ~VISU_ExtractUnstructuredGrid();
 
-  void Execute();
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
   
   std::set<vtkIdType> myRemovedCellIds;
   std::set<vtkIdType> myRemovedCellTypes;
index 66dfae5ba360b15eb4d43ec7ac8f8dcb887c1968..0fc47bb2873ee6e1f49a3b72be29e131f5325c64 100644 (file)
 
 namespace VISU
 {
+  //---------------------------------------------------------------
+  //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+  bool
+  TStructured
+  ::IsStructured() const
+  {
+    return myIsStructured;
+  }
+  
+  TIdTypeVector
+  TStructured
+  ::GetStructure()
+  {
+    return myGrilleStructure;
+  }
+
+  TIdTypeVector
+  TStructured
+  ::GetIndexesOfNode(vtkIdType theNodeId)
+  {
+    TIdTypeVector aNullVec;
+    if(!IsStructured())
+      return aNullVec;
+    TObj2IdTypeVector::const_iterator aIter = myObjID2StructureID.find(theNodeId);
+    if(aIter!=myObjID2StructureID.end())
+      return aIter->second;
+    else
+      return aNullVec;
+  }
+  
+  vtkIdType
+  TStructured
+  ::GetObjectIDByIndexes(TIdTypeVector theVec)
+  {
+    TObj2IdTypeVector::const_iterator aIter = myObjID2StructureID.begin();
+    for(;aIter!=myObjID2StructureID.end();aIter++){
+      if(theVec == aIter->second)
+       return aIter->first;
+    }
+    return -1;
+  }
+  //ENK: 23.11.2006
+
   //---------------------------------------------------------------
   vtkFloatingPointType*  
   TIDMapper
index 53960d77a0bbf1a49389aaf7a0f14822e96a0519..c947dfa1ea4a87084e4a83475ca4970d9583edc9 100644 (file)
   \brief The file contains declarations for basic interfaces that defines mapping of mesh elements
 */
 
+#include "VISUConvertor.hxx"
+
 #include "MED_SharedPtr.hxx"
+#include "MED_Vector.hxx"
 #include "VTKViewer.h"
 
 #include <string>
+#include <map>
 
 class vtkUnstructuredGrid;
 class vtkPolyData;
@@ -44,9 +48,62 @@ class vtkCell;
 
 namespace VISU
 {
+  using MED::SharedPtr;
+  using MED::TVector;
+
+  
+  typedef TVector<vtkIdType> TIdTypeVector;
+  typedef std::map<vtkIdType,TIdTypeVector> TObj2IdTypeVector;
+  
+  struct VISU_CONVERTOR_EXPORT TStructured
+  {
+    TStructured():
+      myIsStructured(false),
+      myType(true)
+    {}
+
+    virtual
+    bool
+    IsStructured() const;
+
+    /*!
+     * Get structure of grille
+     * see also MED::TGrilleInfo::GetGrilleStructure
+     * see also MED::TGrilleInfo::GetNbIndexes
+     */
+    virtual TIdTypeVector
+    GetStructure();
+    
+    /*!
+     * Gets i,j,k by object id
+     * return -1, if not found
+     */
+    virtual TIdTypeVector
+    GetIndexesOfNode(vtkIdType theNodeId);
+
+    /*!
+     * Gets object id by i,j,k
+     * return -1, if not found
+     */
+    virtual vtkIdType
+    GetObjectIDByIndexes(TIdTypeVector theVec);
+
+  public:
+    bool myIsStructured; //!< To define mesh type (structured - true, non structured - false)
+    bool myType; //!< To define structured mesh is polair
+
+    /*!provides grille structure for structured grid.
+     * Example: {3,4,5}, 3 nodes in X axe, 4 nodes in Y axe, ...
+     */
+    TIdTypeVector myGrilleStructure;
+    
+    TObj2IdTypeVector myObjID2StructureID;//!< map of object id to i,j,k ids of structured grid nodes
+    
+  };
+  
   //---------------------------------------------------------------
   //! Defines a basic class for intemediate data structures
-  struct TBaseStructure
+  struct VISU_CONVERTOR_EXPORT TBaseStructure: virtual TStructured
   {
     //! Just to provide possibility of dynamic navigation through the class hierarchy
     virtual ~TBaseStructure()
@@ -62,7 +119,7 @@ namespace VISU
     Where object ID means ID which attached to corresponding MED entity.
     For example, each MED node can have its own ID as well as any other mesh cell
   */
-  struct TIDMapper: virtual TBaseStructure
+  struct VISU_CONVERTOR_EXPORT TIDMapper: virtual TBaseStructure
   {
     //! Get node object ID for corresponding VTK ID
     virtual 
index 1c668074af32cd44bcecb80dd013374e8c174eb8..a2f0f396e5b4b1dca919cee45186ee37797daf0d 100644 (file)
@@ -645,6 +645,53 @@ namespace
     const std::string& aMeshName = theMesh->myName;
     VISU::TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
     MED::TEntityInfo::const_iterator anEntityIter = theEntityInfo.begin();
+    
+    //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+    int iMax,jMax,kMax;
+    iMax=jMax=kMax=0;
+    
+    MED::TIntVector aIntVec;
+    if(theGrilleInfo->GetGrilleType()!=MED::eGRILLE_STANDARD)
+      for(int i=0;i<theMesh->myDim;i++)
+       aIntVec.push_back(theGrilleInfo->GetNbIndexes(i));
+    else
+      aIntVec = theGrilleInfo->GetGrilleStructure();
+    
+    theMesh->myGrilleStructure = aIntVec;
+    
+    switch((theMesh->GetStructure()).size()){
+    case 3: kMax=theMesh->GetStructure()[2];
+    case 2: jMax=theMesh->GetStructure()[1];
+    case 1: iMax=theMesh->GetStructure()[0];
+    }
+    
+    int iii=0;
+    switch(theMesh->myDim){
+    case 1:
+      for(int i=1;i<=iMax;i++)
+       (theMesh->myObjID2StructureID[i-1]).push_back(i);
+      break;
+    case 2:
+      for(int j=1;j<=jMax;j++)
+       for(int i=1;i<=iMax;i++){
+         (theMesh->myObjID2StructureID[iii]).push_back(i);
+         (theMesh->myObjID2StructureID[iii]).push_back(j);
+         iii++;
+       }
+      break;
+    case 3:
+      for(int k=1;k<=kMax ;k++)
+       for(int j=1;j<=jMax;j++)
+         for(int i=1;i<=iMax;i++)
+           {
+             (theMesh->myObjID2StructureID[iii]).push_back(i);
+             (theMesh->myObjID2StructureID[iii]).push_back(j);
+             (theMesh->myObjID2StructureID[iii]).push_back(k);
+             iii++;
+           }
+    }
+    //ENK: 23.11.2006
+    
     for(; anEntityIter != theEntityInfo.end(); anEntityIter++){
       const MED::EEntiteMaillage& aMEntity = anEntityIter->first;
       const MED::TGeom2Size& aGeom2Size = anEntityIter->second;
@@ -686,7 +733,7 @@ namespace
          const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
          VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
          vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
-         TInt aNbElem = theGrilleInfo->GetNbCells();
+         TInt aNbElem = aGeom2SizeIter->second;//theGrilleInfo->GetNbCells();
          aMeshOnEntity->myNbCells += aNbElem;
          aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1);
          
@@ -704,12 +751,8 @@ namespace
              aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
          }
        }
-       
       }
-
     }
-
-    
   }
 
 
@@ -977,8 +1020,8 @@ namespace
          VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
          for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
            const std::string& aName = aFamilyMapIter->first;
-           aFamily = aFamilyMapIter->second;
            if(aName == aFamilyName){
+              aFamily = aFamilyMapIter->second;
              aVEntity = aFamily->myEntity;
              goto exit_lable;
            }
@@ -1136,10 +1179,12 @@ namespace VISU
   TMEDSubProfile
   ::GetElemObjID(vtkIdType theID) const
   {
-    if(myIsElemNum)
-      return (*myElemNum)[theID];
-    else
-      return theID;
+    if(mySubMeshID.empty())
+      if(myIsElemNum)
+        return (*myElemNum)[theID];
+      else
+        return theID;
+    return mySubMeshID[theID];
   }
   
   unsigned long int
@@ -1264,16 +1309,17 @@ VISU_Convertor*
 CreateConvertor(const string& theFileName)
 {
   if(MED::PWrapper aMed = MED::CrWrapper(theFileName,true))
-    return new VISU_MedConvertor(theFileName);
+    return new VISU_MedConvertor(theFileName, aMed);
   return NULL;
 }
 
 VISU_MedConvertor
-::VISU_MedConvertor(const string& theFileName):
+::VISU_MedConvertor(const string& theFileName, MED::PWrapper theMed):
   myIsEntitiesDone(false),
   myIsFieldsDone(false),
   myIsGroupsDone(false),
-  myIsMinMaxDone(false)
+  myIsMinMaxDone(false),
+  myMed(theMed)
 {
   myFileInfo.setFile(QString(theFileName.c_str()));
   myName = myFileInfo.baseName().latin1();
@@ -1290,9 +1336,8 @@ VISU_MedConvertor
 
   TSetIsDone aSetIsDone(myIsEntitiesDone);
   VISU::TTimerLog aTimerLog(MYDEBUG,"BuildEntities");
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
 
-  TInt aNbMeshes = aMed->GetNbMeshes();
+  TInt aNbMeshes = myMed->GetNbMeshes();
   VISU::TMeshMap& aMeshMap = myMeshMap;
 
   INITMSG(MYDEBUG,"BuildEntities aNbMeshes = "<<aNbMeshes<<"\n");
@@ -1303,7 +1348,7 @@ VISU_MedConvertor
 #endif
       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPMeshInfo");
 
-      MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
+      MED::PMeshInfo aMeshInfo = myMed->GetPMeshInfo(iMesh);
       std::string aMeshName = aMeshInfo->GetName();
       TInt aDim = aMeshInfo->GetDim();
       MED::EMaillage aType = aMeshInfo->GetType();
@@ -1321,8 +1366,8 @@ VISU_MedConvertor
 
       if(aType == MED::eNON_STRUCTURE){
 
-       if(MED::PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo)){
-         MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
+       if(MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)){
+         MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
 
          aMesh->myNbPoints = aNodeInfo->GetNbElem();
          aMesh->myEntityInfo = anEntityInfo;
@@ -1338,7 +1383,7 @@ VISU_MedConvertor
            BuildMeshOnEntityMap(aMesh,
                                 anEntityInfo,
                                 aNodeInfo,
-                              aMed);
+                                myMed);
            
 #ifndef _DEXCEPT_
          }catch(std::exception& exc){
@@ -1350,7 +1395,7 @@ VISU_MedConvertor
        }
       } // NON STRUCTURED MESH
       else {
-       MED::PGrilleInfo aGrilleInfo = aMed->GetPGrilleInfo(aMeshInfo);
+       MED::PGrilleInfo aGrilleInfo = myMed->GetPGrilleInfo(aMeshInfo);
 
        MED::TEntityInfo anEntityInfo;
        anEntityInfo[MED::eNOEUD][MED::ePOINT1] = aGrilleInfo->GetNbNodes();
@@ -1358,7 +1403,10 @@ VISU_MedConvertor
        
        aMesh->myNbPoints   = aGrilleInfo->GetNbNodes();
        aMesh->myEntityInfo = anEntityInfo;
-
+       //ENK: 23.11.2006 - PAL13176 - EDF228 VISU : Enhancement of structured datas processing
+       aMesh->myIsStructured = true;
+       aMesh->myType         = (MED::eGRILLE_POLAIRE == aGrilleInfo->GetGrilleType());
+       //ENK: 23.11.2006
 #ifndef _DEXCEPT_
        try{
 #endif
@@ -1367,7 +1415,7 @@ VISU_MedConvertor
          BuildMeshGrilleOnEntityMap(aMesh,
                                     anEntityInfo,
                                     aGrilleInfo,
-                                    aMed);
+                                    myMed);
          
 #ifndef _DEXCEPT_
        }catch(std::exception& exc){
@@ -1402,9 +1450,8 @@ VISU_MedConvertor
 
   TSetIsDone aSetIsDone(myIsFieldsDone);
   VISU::TTimerLog aTimerLog(MYDEBUG,"BuildFields");
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
 
-  TInt aNbMeshes = aMed->GetNbMeshes();
+  TInt aNbMeshes = myMed->GetNbMeshes();
   VISU::TMeshMap& aMeshMap = myMeshMap;
 
   INITMSG(MYDEBUG,"BuildFields - aNbMeshes = "<<aNbMeshes<<"\n");
@@ -1415,7 +1462,7 @@ VISU_MedConvertor
 #endif
       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPMeshInfo");
 
-      MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
+      MED::PMeshInfo aMeshInfo = myMed->GetPMeshInfo(iMesh);
       std::string aMeshName = aMeshInfo->GetName();
       
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
@@ -1427,11 +1474,11 @@ VISU_MedConvertor
 #ifndef _DEXCEPT_
       try{
 #endif
-       MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
+       MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
 
        BuildFieldMap(aMesh,
                      anEntityInfo,
-                     aMed);
+                     myMed);
 #ifndef _DEXCEPT_
       }catch(std::exception& exc){
        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
@@ -1529,12 +1576,11 @@ VISU_MedConvertor
 
   TSetIsDone aSetIsDone(myIsMinMaxDone);
   VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax");
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
 
-  MED::TKey2Gauss aKey2Gauss = MED::GetKey2Gauss(aMed);
-  MED::TMKey2Profile aMKey2Profile = MED::GetMKey2Profile(aMed);
+  MED::TKey2Gauss aKey2Gauss = MED::GetKey2Gauss(myMed);
+  MED::TMKey2Profile aMKey2Profile = MED::GetMKey2Profile(myMed);
 
-  TInt aNbMeshes = aMed->GetNbMeshes();
+  TInt aNbMeshes = myMed->GetNbMeshes();
   VISU::TMeshMap& aMeshMap = myMeshMap;
 
   INITMSG(MYDEBUG,"BuildMinMax - aNbMeshes = "<<aNbMeshes<<"\n");
@@ -1545,7 +1591,7 @@ VISU_MedConvertor
 #endif
       VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPMeshInfo");
 
-      MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
+      MED::PMeshInfo aMeshInfo = myMed->GetPMeshInfo(iMesh);
       std::string aMeshName = aMeshInfo->GetName();
       
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
@@ -1556,23 +1602,23 @@ VISU_MedConvertor
 #ifndef _DEXCEPT_
       try{
 #endif
-       TInt aNbFields = aMed->GetNbFields(); 
+       TInt aNbFields = myMed->GetNbFields(); 
 
        INITMSG(MYDEBUG,
                "- aMeshName = '"<<aMeshName<<"'"<<
                "; aNbFields = "<<aNbFields<<"\n");
 
-       MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
+       MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
 
        for(TInt iField = 1; iField <= aNbFields; iField++){
          VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPFieldInfo()");
-         MED::PFieldInfo aFieldInfo = aMed->GetPFieldInfo(aMeshInfo,iField);
+         MED::PFieldInfo aFieldInfo = myMed->GetPFieldInfo(aMeshInfo,iField);
          std::string aFieldName = aFieldInfo->GetName();
          INITMSG(MYDEBUG,"- aFieldName = '"<<aFieldName<<"'\n");
          
          MED::TGeom2Size aGeom2Size;
          MED::EEntiteMaillage aMEntity;
-         TInt aNbTimeStamps = aMed->GetNbTimeStamps(aFieldInfo,
+         TInt aNbTimeStamps = myMed->GetNbTimeStamps(aFieldInfo,
                                                     anEntityInfo,
                                                     aMEntity,
                                                     aGeom2Size);
@@ -1607,15 +1653,15 @@ VISU_MedConvertor
 #endif
 #endif
                  MED::PTimeStampInfo aTimeStampInfo = 
-                   aMed->GetPTimeStampInfo(aFieldInfo,
-                                           aMEntity,
-                                           aGeom2Size,
-                                           iTimeStamp);
+                   myMed->GetPTimeStampInfo(aFieldInfo,
+                                            aMEntity,
+                                            aGeom2Size,
+                                            iTimeStamp);
                  
                  MED::PTimeStampValueBase aTimeStampValue = 
-                   aMed->GetPTimeStampValue(aTimeStampInfo,
-                                            aMKey2Profile,
-                                            aKey2Gauss);
+                   myMed->GetPTimeStampValue(aTimeStampInfo,
+                                             aMKey2Profile,
+                                             aKey2Gauss);
                
                  const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss();
 
@@ -1691,9 +1737,8 @@ VISU_MedConvertor
 
   TSetIsDone aSetIsDone(myIsGroupsDone);
   VISU::TTimerLog aTimerLog(MYDEBUG,"BuildGroups");
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
 
-  TInt aNbMeshes = aMed->GetNbMeshes();
+  TInt aNbMeshes = myMed->GetNbMeshes();
   VISU::TMeshMap& aMeshMap = myMeshMap;
 
   INITMSG(MYDEBUG,"BuildGroups - aNbMeshes = "<<aNbMeshes<<"\n");
@@ -1704,7 +1749,7 @@ VISU_MedConvertor
 #endif
       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPMeshInfo");
 
-      MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
+      MED::PMeshInfo aMeshInfo = myMed->GetPMeshInfo(iMesh);
       std::string aMeshName = aMeshInfo->GetName();      
 
       VISU::TMeshMap::const_iterator anIter = aMeshMap.find(aMeshName);
@@ -1716,27 +1761,27 @@ VISU_MedConvertor
 
       MED::EMaillage aType = aMeshInfo->GetType();
       
-      MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
+      MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo);
       
       MED::TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = 
-       MED::GetEntity2TGeom2ElemInfo(aMed,aMeshInfo,anEntityInfo);
+       MED::GetEntity2TGeom2ElemInfo(myMed, aMeshInfo, anEntityInfo);
       
 #ifndef _DEXCEPT_
       try{
 #endif
-       MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(aMed,aMeshInfo);
+       MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(myMed, aMeshInfo);
        
        if(aType == MED::eNON_STRUCTURE)
          BuildFamilyMap(aMesh,
                         anEntityInfo,
                         anEntity2TGeom2ElemInfo,
                         aFamilyInfoSet,
-                        aMed);
+                        myMed);
        else
          BuildGrilleFamilyMap(aMesh,
                               anEntityInfo,
                               aFamilyInfoSet,
-                              aMed);
+                              myMed);
        
        BuildGroupMap(aMesh,
                      aFamilyInfoSet);
@@ -1770,15 +1815,14 @@ VISU_MedConvertor
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadMeshOnEntity");
   INITMSG(MYDEBUG,"LoadMeshOnEntity"<<endl);
 
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
   const VISU::TEntity& anEntity = theMeshOnEntity->myEntity;
 
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   if(anEntity == VISU::NODE_ENTITY){
-    isPointsUpdated += LoadPoints(aMed,theMesh);
+    isPointsUpdated += LoadPoints(myMed, theMesh);
   }else{
-    isPointsUpdated += LoadPoints(aMed,theMesh);
-    isCellsOnEntityUpdated += LoadCellsOnEntity(aMed,theMesh,theMeshOnEntity);
+    isPointsUpdated += LoadPoints(myMed, theMesh);
+    isCellsOnEntityUpdated += LoadCellsOnEntity(myMed, theMesh, theMeshOnEntity);
   }
 
   return (isPointsUpdated || isCellsOnEntityUpdated);
@@ -1795,15 +1839,14 @@ VISU_MedConvertor
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadFamilyOnEntity");
   INITMSG(MYDEBUG,"LoadFamilyOnEntity"<<endl);
 
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
   const VISU::TEntity& anEntity = theMeshOnEntity->myEntity;
 
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   if(anEntity == VISU::NODE_ENTITY){
-    isPointsUpdated += LoadPointsOnFamily(aMed,theMesh,theFamily);
+    isPointsUpdated += LoadPointsOnFamily(myMed, theMesh, theFamily);
   }else{
-    isPointsUpdated += LoadPoints(aMed,theMesh);
-    isCellsOnEntityUpdated += LoadCellsOnFamily(aMed,theMesh,theMeshOnEntity,theFamily);
+    isPointsUpdated += LoadPoints(myMed, theMesh);
+    isCellsOnEntityUpdated += LoadCellsOnFamily(myMed, theMesh, theMeshOnEntity, theFamily);
   }
 
   return (isPointsUpdated || isCellsOnEntityUpdated);
@@ -1819,18 +1862,17 @@ VISU_MedConvertor
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadMeshOnGroup");
   INITMSG(MYDEBUG,"LoadMeshOnGroup"<<endl);
 
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
   for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
     VISU::PMEDFamily aFamily = *aFamilyIter;
     const VISU::TEntity& anEntity = aFamily->myEntity;
     const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity];
-    isPointsUpdated += LoadPoints(aMed,theMesh);
+    isPointsUpdated += LoadPoints(myMed, theMesh);
     if(anEntity == VISU::NODE_ENTITY){
-      isPointsUpdated += LoadPointsOnFamily(aMed,theMesh,aFamily);
+      isPointsUpdated += LoadPointsOnFamily(myMed, theMesh, aFamily);
     }else{
-      isCellsOnEntityUpdated += LoadCellsOnFamily(aMed,theMesh,aMeshOnEntity,aFamily);
+      isCellsOnEntityUpdated += LoadCellsOnFamily(myMed,theMesh,aMeshOnEntity,aFamily);
     }
   }
 
@@ -1849,14 +1891,12 @@ VISU_MedConvertor
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadValForTimeOnMesh");
   INITMSG(MYDEBUG,"LoadValForTimeOnMesh"<<endl);
 
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
-
   const VISU::TEntity& anEntity = theMeshOnEntity->myEntity;
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
-  isPointsUpdated += LoadPoints(aMed,theMesh);
+  isPointsUpdated += LoadPoints(myMed,theMesh);
   if(anEntity != VISU::NODE_ENTITY)
-    isCellsOnEntityUpdated += LoadCellsOnEntity(aMed,theMesh,theMeshOnEntity);
-  int isFieldUpdated = LoadValForTimeOnMesh(aMed,theMesh,theMeshOnEntity,theField,theValForTime);
+    isCellsOnEntityUpdated += LoadCellsOnEntity(myMed,theMesh,theMeshOnEntity);
+  int isFieldUpdated = LoadValForTimeOnMesh(myMed,theMesh,theMeshOnEntity,theField,theValForTime);
   
   return (isPointsUpdated || isCellsOnEntityUpdated || isFieldUpdated);
 }
@@ -1873,13 +1913,11 @@ VISU_MedConvertor
   VISU::TTimerLog aTimerLog(MYDEBUG,"LoadValForTimeOnGaussPts");
   INITMSG(MYDEBUG,"LoadValForTimeOnGaussPts"<<endl);
 
-  MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
-
   const VISU::TEntity& anEntity = theMeshOnEntity->myEntity;
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   if(anEntity != VISU::NODE_ENTITY)
-    isCellsOnEntityUpdated += LoadCellsOnEntity(aMed,theMesh,theMeshOnEntity);
-  int isFieldUpdated = LoadValForTimeOnGaussPts(aMed,theMesh,theMeshOnEntity,theField,theValForTime);
+    isCellsOnEntityUpdated += LoadCellsOnEntity(myMed,theMesh,theMeshOnEntity);
+  int isFieldUpdated = LoadValForTimeOnGaussPts(myMed,theMesh,theMeshOnEntity,theField,theValForTime);
   
   return (isPointsUpdated || isCellsOnEntityUpdated || isFieldUpdated);
 }
@@ -2060,7 +2098,7 @@ VISU_MedConvertor
          vtkIdType aVNbNodes = VISUGeom2NbNodes(aEGeom);
          INITMSG(MYDEBUG,"aVNbNodes = "<<aVNbNodes<<"\n");
        
-         TInt aNbElem = aGrilleInfo->GetNbCells();
+         TInt aNbElem = aGeom2SizeIter->second;//aGrilleInfo->GetNbCells();
          
          if(aNbElem > 0){
            VISU::PMEDSubMesh aSubMesh = aGeom2SubMesh[aEGeom](new VISU::TMEDSubMesh());
index 0f3fa042326d37b0593f61b69408a23f31614307..6935b63ff05e8dacf76ed86e86ceb1cbe46de387 100644 (file)
@@ -24,6 +24,7 @@
 #include "VISU_PointCoords.hxx"
 #include "VISU_MeshValue.hxx"
 
+#include "MED_Wrapper.hxx"
 #include "MED_Common.hxx"
 #include "MED_Structures.hxx"
 #include "MED_GaussUtils.hxx"
@@ -337,7 +338,7 @@ class VISU_MedConvertor: public VISU_Convertor_impl
   bool myIsMinMaxDone;
 
 public:
-  VISU_MedConvertor(const std::string& theFileName);
+  VISU_MedConvertor(const std::string& theFileName, MED::PWrapper theMed);
 
   virtual
   VISU_Convertor* 
@@ -357,6 +358,7 @@ public:
 
 protected:
   QFileInfo myFileInfo;
+  MED::PWrapper myMed; // mpv : bug 13568: one med per converter
 
   virtual
   int
index 4cabc7fbe1bf39518abdc0076fb913eb5b901656..5a549c6c94ef1f05ee7a61fbb1f938b00cb26b5b 100644 (file)
 //  $Header$
 
 #include "VISU_MergeFilter.hxx"
+#include "VISU_MergeFilterUtilities.hxx"
 
-#include <vtkCellData.h>
 #include <vtkObjectFactory.h>
-#include <vtkPointData.h>
-#include <vtkPolyData.h>
-#include <vtkRectilinearGrid.h>
-#include <vtkStructuredGrid.h>
-#include <vtkStructuredPoints.h>
 #include <vtkUnstructuredGrid.h>
+#include <vtkPolyData.h>
 
-namespace VISU
-{
-
-  class TFieldNode
-  {
-  public:
-    TFieldNode(const char* name, vtkDataSet* ptr=0)
-    {
-      int length = static_cast<int>(strlen(name));
-      if (length > 0) {
-       this->Name = new char[length+1];
-       strcpy(this->Name, name);
-      } else {
-        this->Name = 0;
-      }
-      this->Ptr = ptr;
-      this->Next = 0;
-    }
-    ~TFieldNode()
-    {
-      delete[] this->Name;
-    }
-
-    const char* GetName()
-    {
-      return Name;
-    }
-    vtkDataSet* Ptr;
-    TFieldNode* Next;
-  private:
-    TFieldNode(const TFieldNode&) {}
-    void operator=(const TFieldNode&) {}
-    char* Name;
-  };
-
-  class TFieldList
-  {
-  public:
-    TFieldList()
-    {
-      this->First = 0;
-      this->Last = 0;
-    }
-    ~TFieldList()
-    {
-      TFieldNode* node = this->First;
-      TFieldNode* next;
-      while(node){
-        next = node->Next;
-        delete node;
-        node = next;
-      }
-    }
-
-
-    void Add(const char* name, vtkDataSet* ptr)
-    {
-      TFieldNode* newNode = new TFieldNode(name, ptr);
-      if (!this->First) {
-       this->First = newNode;
-       this->Last = newNode;
-      } else {
-        this->Last->Next = newNode;
-        this->Last = newNode;
-      }
-    }
-
-    friend class TFieldListIterator;
-    
-  private:
-    TFieldNode* First;
-    TFieldNode* Last;
-  };
-  
-  class TFieldListIterator
-  {
-  public:
-    TFieldListIterator(TFieldList* list)
-    {
-      this->List = list;
-      this->Position = 0;
-    }
-    void Begin()
-    {
-      this->Position = this->List->First;
-    }
-    void Next()
-    {
-      if (this->Position) {
-       this->Position = this->Position->Next;
-      }
-    }
-    int End()
-    {
-      return this->Position ? 0 : 1;
-    }
-    TFieldNode* Get()
-    {
-      return this->Position;
-    }
-    
-  private:
-    TFieldNode* Position;
-    TFieldList* List;
-  };
-  
-}
 
 //------------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_MergeFilter);
@@ -151,7 +40,8 @@ vtkStandardNewMacro(VISU_MergeFilter);
 //------------------------------------------------------------------------------
 
 // Create object with no input or output.
-VISU_MergeFilter::VISU_MergeFilter()
+VISU_MergeFilter::VISU_MergeFilter():
+  myIsMergingInputs(false)
 {
   this->FieldList = new VISU::TFieldList;
 }
@@ -231,188 +121,63 @@ void VISU_MergeFilter::AddField(const char* name, vtkDataSet* input)
   this->FieldList->Add(name, input);
 }
 
-void VISU_MergeFilter::Execute()
+void VISU_MergeFilter::RemoveFields()
 {
-  vtkIdType numPts, numScalars=0, numVectors=0, numNormals=0, numTCoords=0;
-  vtkIdType numTensors=0;
-  vtkIdType numCells, numCellScalars=0, numCellVectors=0, numCellNormals=0;
-  vtkIdType numCellTCoords=0, numCellTensors=0;
-  vtkPointData *pd;
-  vtkDataArray *scalars = NULL;
-  vtkDataArray *vectors = NULL;
-  vtkDataArray *normals = NULL;
-  vtkDataArray *tcoords = NULL;
-  vtkDataArray *tensors = NULL;
-  vtkCellData *cd;
-  vtkDataArray *cellScalars = NULL;
-  vtkDataArray *cellVectors = NULL;
-  vtkDataArray *cellNormals = NULL;
-  vtkDataArray *cellTCoords = NULL;
-  vtkDataArray *cellTensors = NULL;
-  vtkDataSet *output = this->GetOutput();
-  vtkPointData *outputPD = output->GetPointData();
-  vtkCellData *outputCD = output->GetCellData();
-  
-  vtkDebugMacro(<<"Merging data!");
-
-  // geometry needs to be copied
-  output->CopyStructure(this->GetInput());
-  if ( (numPts = this->GetInput()->GetNumberOfPoints()) < 1 )
-    {
-    vtkWarningMacro(<<"Nothing to merge!");
-    }
-  numCells = this->GetInput()->GetNumberOfCells();
-  
-  if ( this->GetScalars() ) 
-    {
-    pd = this->GetScalars()->GetPointData();
-    scalars = pd->GetScalars();
-    if ( scalars != NULL )
-      {
-      numScalars = scalars->GetNumberOfTuples();
-      }
-    cd = this->GetScalars()->GetCellData();
-    cellScalars = cd->GetScalars();
-    if ( cellScalars != NULL )
-      {
-      numCellScalars = cellScalars->GetNumberOfTuples();
-      }
-    }
-
-  if ( this->GetVectors() ) 
-    {
-    pd = this->GetVectors()->GetPointData();
-    vectors = pd->GetVectors();
-    if ( vectors != NULL )
-      {
-      numVectors= vectors->GetNumberOfTuples();
-      }
-    cd = this->GetVectors()->GetCellData();
-    cellVectors = cd->GetVectors();
-    if ( cellVectors != NULL )
-      {
-      numCellVectors = cellVectors->GetNumberOfTuples();
-      }
-    }
-
-  if ( this->GetNormals() ) 
-    {
-    pd = this->GetNormals()->GetPointData();
-    normals = pd->GetNormals();
-    if ( normals != NULL )
-      {
-      numNormals= normals->GetNumberOfTuples();
-      }
-    cd = this->GetNormals()->GetCellData();
-    cellNormals = cd->GetNormals();
-    if ( cellNormals != NULL )
-      {
-      numCellNormals = cellNormals->GetNumberOfTuples();
-      }
-    }
-
-  if ( this->GetTCoords() ) 
-    {
-    pd = this->GetTCoords()->GetPointData();
-    tcoords = pd->GetTCoords();
-    if ( tcoords != NULL )
-      {
-      numTCoords= tcoords->GetNumberOfTuples();
-      }
-    cd = this->GetTCoords()->GetCellData();
-    cellTCoords = cd->GetTCoords();
-    if ( cellTCoords != NULL )
-      {
-      numCellTCoords = cellTCoords->GetNumberOfTuples();
-      }
-    }
-
-  if ( this->GetTensors() ) 
-    {
-    pd = this->GetTensors()->GetPointData();
-    tensors = pd->GetTensors();
-    if ( tensors != NULL )
-      {
-      numTensors = tensors->GetNumberOfTuples();
-      }
-    cd = this->GetTensors()->GetCellData();
-    cellTensors = cd->GetTensors();
-    if ( cellTensors != NULL )
-      {
-      numCellTensors = cellTensors->GetNumberOfTuples();
-      }
-    }
+  delete this->FieldList;
+  this->FieldList = new VISU::TFieldList;
+}
 
-  // merge data only if it is consistent
-  if ( numPts == numScalars )
-    {
-    outputPD->SetScalars(scalars);
-    }
-  if ( numCells == numCellScalars )
-    {
-    outputCD->SetScalars(cellScalars);
-    }
 
-  if ( numPts == numVectors )
-    {
-    outputPD->SetVectors(vectors);
-    }
-  if ( numCells == numCellVectors )
-    {
-    outputCD->SetVectors(cellVectors);
-    }
-    
-  if ( numPts == numNormals )
-    {
-    outputPD->SetNormals(normals);
-    }
-  if ( numCells == numCellNormals )
-    {
-    outputCD->SetNormals(cellNormals);
-    }
+//---------------------------------------------------------------
+void
+VISU_MergeFilter
+::SetMergingInputs(bool theIsMergingInputs)
+{
+  if(myIsMergingInputs == theIsMergingInputs)
+    return;
 
-  if ( numPts == numTCoords )
-    {
-    outputPD->SetTCoords(tcoords);
-    }
-  if ( numCells == numCellTCoords )
-    {
-    outputCD->SetTCoords(cellTCoords);
-    }
+  myIsMergingInputs = theIsMergingInputs;
+  Modified();
+}
 
-  if ( numPts == numTensors )
-    {
-    outputPD->SetTensors(tensors);
-    }
-  if ( numCells == numCellTensors )
-    {
-    outputCD->SetTensors(cellTensors);
-    }
+  
+//---------------------------------------------------------------
+bool
+VISU_MergeFilter
+::IsMergingInputs()
+{
+  return myIsMergingInputs;
+}
+  
 
-  VISU::TFieldListIterator it(this->FieldList);
-  vtkDataArray* da;
-  const char* name;
-  vtkIdType num;
-  for(it.Begin(); !it.End() ; it.Next())
-    {
-    pd = it.Get()->Ptr->GetPointData();
-    cd = it.Get()->Ptr->GetCellData();
-    name = it.Get()->GetName();
-    if ( (da=pd->GetArray(name)) )
-      {
-      num = da->GetNumberOfTuples();
-      if (num == numPts)
-        {
-        outputPD->AddArray(da);
-        }
-      }
-    if ( (da=cd->GetArray(name)) )
-      {
-      num = da->GetNumberOfTuples();
-      if (num == numCells) // To fix a VTK bug
-        {
-        outputCD->AddArray(da);
-        }
-      }
-    }
+//---------------------------------------------------------------
+void
+VISU_MergeFilter
+::Execute()
+{
+  if(vtkUnstructuredGrid *anInput = dynamic_cast<vtkUnstructuredGrid*>(this->GetInput())){
+    vtkUnstructuredGrid *anOutput = dynamic_cast<vtkUnstructuredGrid*>(this->GetOutput());
+    VISU::Execute(anInput,
+                 anOutput,
+                 this->GetScalars(),
+                 this->GetVectors(),
+                 this->GetNormals(),
+                 this->GetTCoords(),
+                 this->GetTensors(),
+                 this->FieldList,
+                 IsMergingInputs());
+  }else if(vtkPolyData *anInput = dynamic_cast<vtkPolyData*>(this->GetInput())){
+    vtkPolyData *anOutput = dynamic_cast<vtkPolyData*>(this->GetOutput());
+    VISU::Execute(anInput,
+                 anOutput,
+                 this->GetScalars(),
+                 this->GetVectors(),
+                 this->GetNormals(),
+                 this->GetTCoords(),
+                 this->GetTensors(),
+                 this->FieldList,
+                 IsMergingInputs());
+  }
+
+  Superclass::Execute();
 }
index 29c4b701534b5978f30d430e66b94864693a4b72..35233f5166bb0337fcdfd426cd819ed45151b114 100644 (file)
@@ -36,14 +36,12 @@ namespace VISU
   class TFieldList;
 }
 
-// Following class was redefined in order to fix VTK bug 
-//  (see code for more details)
 
 class VISU_MergeFilter : public vtkDataSetToDataSetFilter
 {
 public:
   static VISU_MergeFilter *New();
-  vtkTypeMacro(VISU_MergeFilter,vtkDataSetToDataSetFilter);
+  vtkTypeMacro(VISU_MergeFilter, vtkDataSetToDataSetFilter);
 
   // Description:
   // Specify object from which to extract geometry information.
@@ -81,6 +79,19 @@ public:
   // of the field
   void AddField(const char* name, vtkDataSet* input);
 
+  // Description:
+  // Removes all previously added fields
+  void RemoveFields();
+
+  // Description:
+  // Defines whether to perform merging of data with the geometry according to
+  // the ids of the cell or not
+  void
+  SetMergingInputs(bool theIsMergingInputs);
+  
+  bool
+  IsMergingInputs();
+  
 protected:
   VISU_MergeFilter();
   ~VISU_MergeFilter();
@@ -89,6 +100,8 @@ protected:
   void Execute();
 
   VISU::TFieldList* FieldList;
+  bool myIsMergingInputs;
+
 private:
   VISU_MergeFilter(const VISU_MergeFilter&);  // Not implemented.
   void operator=(const VISU_MergeFilter&);  // Not implemented.
diff --git a/src/CONVERTOR/VISU_MergeFilterUtilities.cxx b/src/CONVERTOR/VISU_MergeFilterUtilities.cxx
new file mode 100644 (file)
index 0000000..e92c388
--- /dev/null
@@ -0,0 +1,760 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  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   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#include "VISU_MergeFilterUtilities.hxx"
+
+#include <vtkCellData.h>
+#include <vtkObjectFactory.h>
+#include <vtkPointData.h>
+#include <vtkPolyData.h>
+#include <vtkRectilinearGrid.h>
+#include <vtkStructuredGrid.h>
+#include <vtkStructuredPoints.h>
+#include <vtkUnstructuredGrid.h>
+
+#include <vtkIdList.h>
+#include <vtkCell.h>
+
+#include <algorithm>
+#include <vector>
+#include <map>
+
+namespace
+{
+  //---------------------------------------------------------------
+  typedef std::vector<int> TSortedArray;
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  GetSortedArray(vtkIntArray *theArray, 
+                TSortedArray& theSortedArray)
+  {
+    int aMaxId = theArray->GetMaxId();
+    int* aPointer = theArray->GetPointer(0);
+    int* anEndPointer = theArray->GetPointer(aMaxId + 1);
+    TSortedArray aSortedArray(aPointer, anEndPointer);
+    std::sort(aSortedArray.begin(), aSortedArray.end());
+    theSortedArray.swap(aSortedArray);
+  }
+
+
+  //---------------------------------------------------------------
+  typedef std::map<int,int> TId2IdMap;
+
+
+  //---------------------------------------------------------------
+  template <class TNumericType>
+  void DeepCopySwitchOnOutput(TNumericType *theInputPtr, 
+                             TNumericType *theOutputPtr,
+                             const TSortedArray& theIntersection,
+                             const TId2IdMap& theObj2VTKMap,
+                             vtkIdType theNbComp)
+  {
+    vtkIdType aNbIds = theIntersection.size();
+    for(vtkIdType aTargetTupleId = 0; aTargetTupleId < aNbIds; aTargetTupleId++){
+      vtkIdType aTargetId = aTargetTupleId*theNbComp;
+      vtkIdType anObjId = theIntersection[aTargetTupleId];
+      TId2IdMap::const_iterator anIter = theObj2VTKMap.find(anObjId);
+      vtkIdType aSourceTupleId = anIter->second;
+      vtkIdType aSourceId = aSourceTupleId*theNbComp;
+      for(vtkIdType aComp = 0; aComp < theNbComp; aComp++){
+       theOutputPtr[aTargetId++] = theInputPtr[aSourceId++];
+      }
+    }
+  }
+
+
+  //---------------------------------------------------------------
+  typedef vtkDataArray* (vtkDataSetAttributes::* TGetAttribute)();
+  typedef int (vtkDataSetAttributes::* TSetAttribute)(vtkDataArray*);
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  CopyArray(vtkDataArray* theDataArray,
+           vtkDataSetAttributes* theOutput, 
+           TSetAttribute theSetAttribute,
+           vtkIdType theFixedNbTuples)
+  {
+    if(theDataArray){
+      vtkIdType aNbTuples = theDataArray->GetNumberOfTuples();
+      if(theFixedNbTuples == aNbTuples)
+       (theOutput->*theSetAttribute)(theDataArray);
+    }
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  CopyAttribute(vtkDataSetAttributes* theInput, 
+               TGetAttribute theGetAttribute,
+               vtkDataSetAttributes* theOutput, 
+               TSetAttribute theSetAttribute,
+               vtkIdType theFixedNbTuples)
+  {
+    CopyArray((theInput->*theGetAttribute)(),
+             theOutput, theSetAttribute,
+             theFixedNbTuples);
+  }
+
+
+  //---------------------------------------------------------------
+  vtkDataArray*
+  DeepCopyArray(vtkDataArray* theDataArray,
+               vtkDataSetAttributes* theOutput, 
+               TSetAttribute theSetAttribute,
+               const TSortedArray& theIntersection, 
+               const TId2IdMap& theObj2VTKMap)
+  {
+    vtkDataArray *aDataArray = NULL;
+    if(theDataArray){
+      void *anInputPtr = theDataArray->GetVoidPointer(0);
+      vtkIdType aNbTuples = theIntersection.size();
+      vtkIdType aNbComp = theDataArray->GetNumberOfComponents();
+
+      aDataArray = vtkDataArray::CreateDataArray(theDataArray->GetDataType());
+      aDataArray->SetNumberOfComponents(aNbComp);
+      aDataArray->SetNumberOfTuples(aNbTuples);
+      void *anOutputPtr = aDataArray->GetVoidPointer(0);       
+
+      switch(theDataArray->GetDataType()){
+       vtkTemplateMacro5(DeepCopySwitchOnOutput, 
+                         (VTK_TT*)anInputPtr, 
+                         (VTK_TT*)anOutputPtr, 
+                         theIntersection, 
+                         theObj2VTKMap,
+                         aNbComp);
+      default:
+        vtkGenericWarningMacro(<<"Unsupported data type!");
+      }
+
+      (theOutput->*theSetAttribute)(aDataArray);
+      aDataArray->Delete();
+    }
+    return aDataArray;
+  }
+
+
+  //---------------------------------------------------------------
+  void
+  DeepCopyAttribute(vtkDataSetAttributes* theInput, 
+                   TGetAttribute theGetAttribute,
+                   vtkDataSetAttributes* theOutput, 
+                   TSetAttribute theSetAttribute,
+                   const TSortedArray& theIntersection, 
+                   const TId2IdMap& theObj2VTKMap)
+  {
+    DeepCopyArray((theInput->*theGetAttribute)(),
+                 theOutput, 
+                 theSetAttribute,
+                 theIntersection, 
+                 theObj2VTKMap);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  DeepCopyDataSetAttribute(vtkDataSet* theInput,
+                          TGetAttribute theGetAttribute,
+                          vtkDataSet* theOutput, 
+                          TSetAttribute theSetAttribute,
+                          const TSortedArray& theIntersection, 
+                          const TId2IdMap& theObj2VTKMap)
+  {
+    CopyAttribute(theInput->GetPointData(), 
+                 theGetAttribute,
+                 theOutput->GetPointData(), 
+                 theSetAttribute,
+                 theInput->GetNumberOfPoints());
+    DeepCopyAttribute(theInput->GetCellData(), 
+                     theGetAttribute,
+                     theOutput->GetCellData(), 
+                     theSetAttribute,
+                     theIntersection, 
+                     theObj2VTKMap);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  DeepCopyField(vtkDataSetAttributes* theInput, 
+               const char* theFieldName, 
+               vtkDataSetAttributes* theOutput, 
+               const TSortedArray& theIntersection,
+               const TId2IdMap& theObj2VTKMap)
+  {
+    vtkDataArray* aDataArray = 
+      DeepCopyArray(theInput->GetArray(theFieldName), 
+                   theOutput, 
+                   &vtkFieldData::AddArray,
+                   theIntersection,
+                   theObj2VTKMap);
+    if(aDataArray)
+      aDataArray->SetName(theFieldName);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  CopyField(vtkDataSetAttributes* theInput, 
+           const char* theFieldName, 
+           vtkDataSetAttributes* theOutput,
+           vtkIdType theFixedNbTuples)
+  {
+    CopyArray(theInput->GetArray(theFieldName),
+             theOutput,
+             &vtkDataSetAttributes::AddArray,
+             theFixedNbTuples);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  DeepCopyDataSetField(vtkDataSet* theInput, 
+                      const char* theFieldName, 
+                      vtkDataSet* theOutput,
+                      const TSortedArray& theIntersection, 
+                      const TId2IdMap& theObj2VTKMap)
+  {
+    CopyField(theInput->GetPointData(), theFieldName, 
+             theOutput->GetPointData(), 
+             theInput->GetNumberOfPoints());
+    DeepCopyField(theInput->GetCellData(), theFieldName, 
+                 theOutput->GetCellData(), 
+                 theIntersection, theObj2VTKMap);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  DeepCopyDataSetAttributes(vtkDataSet *theFilterOutput, 
+                           vtkDataSet* theScalarsDataSet,
+                           vtkDataSet* theVectorsDataSet,
+                           vtkDataSet* theNormalsDataSet,
+                           vtkDataSet* theTCoordsDataSet,
+                           vtkDataSet* theTensorsDataSet,
+                           VISU::TFieldList* theFieldList,
+                           const TSortedArray& theIntersection, 
+                           const TId2IdMap& theObj2VTKMap)
+  {
+    if(theScalarsDataSet)
+      DeepCopyDataSetAttribute(theScalarsDataSet, 
+                              &vtkDataSetAttributes::GetScalars,
+                              theFilterOutput, 
+                              &vtkDataSetAttributes::SetScalars,
+                              theIntersection, 
+                              theObj2VTKMap);
+    
+    if(theVectorsDataSet)
+      DeepCopyDataSetAttribute(theVectorsDataSet, 
+                              &vtkDataSetAttributes::GetVectors,
+                              theFilterOutput, 
+                              &vtkDataSetAttributes::SetVectors,
+                              theIntersection, 
+                              theObj2VTKMap);
+    
+    if(theNormalsDataSet)
+      DeepCopyDataSetAttribute(theNormalsDataSet, 
+                              &vtkDataSetAttributes::GetNormals,
+                              theFilterOutput, 
+                              &vtkDataSetAttributes::SetNormals,
+                              theIntersection, 
+                              theObj2VTKMap);
+    
+    if(theTCoordsDataSet)
+      DeepCopyDataSetAttribute(theTCoordsDataSet, 
+                              &vtkDataSetAttributes::GetTCoords,
+                              theFilterOutput, 
+                              &vtkDataSetAttributes::SetTCoords,
+                              theIntersection, 
+                              theObj2VTKMap);
+    
+    if(theTensorsDataSet)
+      DeepCopyDataSetAttribute(theTensorsDataSet, 
+                              &vtkDataSetAttributes::GetTensors,
+                              theFilterOutput, 
+                              &vtkDataSetAttributes::SetTensors,
+                              theIntersection, 
+                              theObj2VTKMap);
+
+    VISU::TFieldListIterator anIter(theFieldList);
+    for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+      vtkDataSet *aDataSet = anIter.Get()->Ptr;
+      const char* aFieldName = anIter.Get()->GetName();
+      DeepCopyDataSetField(aDataSet, 
+                          aFieldName, 
+                          theFilterOutput, 
+                          theIntersection, 
+                          theObj2VTKMap);
+    }
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  GetIdsForCopy(vtkDataSet* theInputDataSet, 
+                vtkIntArray* inputPointIds,
+                TSortedArray& outputSortedArray)
+  {
+    if(theInputDataSet){
+      TSortedArray aSortedPointIds;
+      TSortedArray aOutputCellIds;
+      GetSortedArray(inputPointIds,aSortedPointIds);
+      
+      int nbInputCells = theInputDataSet->GetNumberOfCells();
+
+      TSortedArray aPointCellIds;
+      for(int idCell=0;idCell<nbInputCells;idCell++){
+        aPointCellIds.clear();
+        vtkCell*   aCell = theInputDataSet->GetCell(idCell);
+        vtkIdList* ptIds = aCell->GetPointIds();
+        int aMaxId = ptIds->GetNumberOfIds();
+        int* aPointer = ptIds->GetPointer(0);
+        int* anEndPointer = ptIds->GetPointer(aMaxId + 1);
+        TSortedArray aSortedArray(aPointer, anEndPointer);
+        std::sort(aSortedArray.begin(), aSortedArray.end());
+
+        int aMaxLength = std::max(aSortedArray.size(), aSortedPointIds.size());
+        TSortedArray anIntersectionArray(aMaxLength);
+        TSortedArray::iterator anArrayIter = anIntersectionArray.begin();
+        anArrayIter = std::set_intersection(aSortedArray.begin(),
+                                            aSortedArray.end(),
+                                            aSortedPointIds.begin(),
+                                            aSortedPointIds.end(),
+                                            anArrayIter);
+        anIntersectionArray.erase(anArrayIter, anIntersectionArray.end());
+        if(anIntersectionArray.size() == aSortedArray.size())
+          aOutputCellIds.push_back(idCell);
+      }
+
+      outputSortedArray.swap(aOutputCellIds);
+    }
+  }
+
+
+  //---------------------------------------------------------------
+  template<class TDataSet>
+  void
+  CopyElementsToOutput(vtkDataSet* theInputDataSet,
+                       int& theNbElements,
+                       TSortedArray& theElementIdsForCopy,
+                       TId2IdMap& theOldId2NewIdPointsMap,
+                       vtkIntArray* theOuputIDSArray,
+                       TDataSet* theOutputDataSet)
+  {
+    vtkIntArray* aInputCellsMapper =
+      dynamic_cast<vtkIntArray*>(theInputDataSet->GetCellData()->GetArray("VISU_CELLS_MAPPER"));
+    
+    int* aInputCellsMapperPointer = aInputCellsMapper->GetPointer(0);
+    
+    for(int aCellIndex=0;aCellIndex<theNbElements;aCellIndex++){
+      int aCellId = theElementIdsForCopy[aCellIndex];
+      vtkIdList* aOldPointIds = theInputDataSet->GetCell(aCellId)->GetPointIds();
+      vtkIdList* aNewPointIds = vtkIdList::New();
+      int nbPointIds = aOldPointIds->GetNumberOfIds();
+      aNewPointIds->SetNumberOfIds(nbPointIds);
+      for(int j=0;j<nbPointIds;j++){
+        int aOldId = aOldPointIds->GetId(j);
+        int aNewId = theOldId2NewIdPointsMap[aOldId];
+        aNewPointIds->SetId(j,aNewId);
+      }
+      const int aOldCellId = theElementIdsForCopy[aCellIndex];
+      theOutputDataSet->InsertNextCell(theInputDataSet->GetCellType(aOldCellId),
+                                      aNewPointIds);
+      if(aInputCellsMapperPointer)
+        theOuputIDSArray->InsertNextValue(aInputCellsMapperPointer[aOldCellId]);
+      else
+        theOuputIDSArray->InsertNextValue(aOldCellId);
+      
+      aNewPointIds->Delete();
+    }
+    theOutputDataSet->GetCellData()->AddArray(theOuputIDSArray);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  CopyDataSetAttribute(vtkDataSet *theInput,
+                      TGetAttribute theGetAttribute,
+                      vtkDataSet *theOutput, 
+                      TSetAttribute theSetAttribute,
+                      vtkIdType theNbPoints, 
+                      vtkIdType theNbCells)
+  {
+    CopyAttribute(theInput->GetPointData(), 
+                 theGetAttribute,
+                 theOutput->GetPointData(), 
+                 theSetAttribute,
+                 theNbPoints);
+    CopyAttribute(theInput->GetCellData(), 
+                 theGetAttribute,
+                 theOutput->GetCellData(), 
+                 theSetAttribute,
+                 theNbCells);
+  }
+
+
+  //---------------------------------------------------------------
+  inline
+  void
+  CopyDataSetField(vtkDataSet* theInput, 
+                  const char* theFieldName, 
+                  vtkDataSet* theOutput,
+                  vtkIdType theNbPoints, 
+                  vtkIdType theNbCells)
+  {
+    CopyField(theInput->GetPointData(), theFieldName, 
+             theOutput->GetPointData(), 
+             theNbPoints);
+    CopyField(theInput->GetCellData(), theFieldName, 
+             theOutput->GetCellData(), 
+             theNbCells);
+  }
+
+
+  //---------------------------------------------------------------
+  template<class TDataSet>
+  bool
+  Execute(TDataSet *theInput,
+         TDataSet *theOutput,
+         vtkDataSet* theScalarsDataSet,
+         vtkDataSet* theVectorsDataSet,
+         vtkDataSet* theNormalsDataSet,
+         vtkDataSet* theTCoordsDataSet,
+         vtkDataSet* theTensorsDataSet,
+         VISU::TFieldList* theFieldList,
+         bool theIsMergingInputs)
+  {
+    vtkPointData *aPointData = theInput->GetPointData();
+    int nbPointsInScalars = theScalarsDataSet->GetNumberOfPoints();
+    int nbPointsInGeometr = theInput->GetNumberOfPoints();
+    vtkCellData *aCellData = theInput->GetCellData();
+  
+    vtkDataArray *aPointMapper = aPointData->GetArray("VISU_POINTS_MAPPER");
+    vtkIntArray *aGeometryPointMapper = dynamic_cast<vtkIntArray*>(aPointMapper);
+    vtkDataArray *aCellMapper = aCellData->GetArray("VISU_CELLS_MAPPER");
+    vtkIntArray *aGeometryCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper);
+    if(aGeometryCellMapper && (nbPointsInScalars == nbPointsInGeometr)){
+      vtkIntArray* aDataCellMapper = NULL;
+      VISU::TFieldListIterator anIter(theFieldList);
+      for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+       vtkCellData *aCellData = anIter.Get()->Ptr->GetCellData();
+       const char* aFieldName = anIter.Get()->GetName();
+       if(strcmp(aFieldName, "VISU_CELLS_MAPPER") == 0){
+         vtkDataArray *aCellMapper_tmp = aCellData->GetArray(aFieldName);
+         aDataCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper_tmp);
+         break;
+       }
+      }
+
+      bool anIsDifferent = aDataCellMapper &&
+       aDataCellMapper->GetNumberOfTuples() != aGeometryCellMapper->GetNumberOfTuples();
+      if(anIsDifferent || theIsMergingInputs){
+       TSortedArray aGeometryCellArray;
+       GetSortedArray(aGeometryCellMapper, aGeometryCellArray);
+       
+       TSortedArray aDataCellArray;
+       GetSortedArray(aDataCellMapper, aDataCellArray);
+       
+       int aMaxLength = std::max(aGeometryCellArray.size(), aDataCellArray.size());
+       TSortedArray anIntersectionArray(aMaxLength);
+       TSortedArray::iterator anArrayIter = anIntersectionArray.begin();
+       anArrayIter = std::set_intersection(aGeometryCellArray.begin(),
+                                           aGeometryCellArray.end(),
+                                           aDataCellArray.begin(),
+                                           aDataCellArray.end(),
+                                           anArrayIter);
+       
+       anIntersectionArray.erase(anArrayIter, anIntersectionArray.end());
+       
+       bool anIsCompletelyCoincide = 
+         anIntersectionArray.size() == aGeometryCellArray.size() && 
+         anIntersectionArray.size() == aDataCellArray.size();
+       
+       if(!anIsCompletelyCoincide || theIsMergingInputs){
+         {
+           TId2IdMap anObj2VTKGeometryMap;
+           vtkIdType aNbCells = aGeometryCellMapper->GetNumberOfTuples();
+           for(int aCellId = 0; aCellId < aNbCells; aCellId++){
+             vtkIdType anObjID = aGeometryCellMapper->GetValue(aCellId);
+             anObj2VTKGeometryMap[anObjID] = aCellId;
+           }
+           
+           vtkIdType aNbTuples = anIntersectionArray.size();
+           theOutput->Allocate(aNbTuples);
+           vtkIdList *aCellIds = vtkIdList::New();
+           for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+             vtkIdType anObjID = anIntersectionArray[aTupleId];
+             vtkIdType aCellId = anObj2VTKGeometryMap[anObjID];
+             vtkCell *aCell = theInput->GetCell(aCellId);
+             aCellIds->Reset();
+             vtkIdType aNbPointIds = aCell->PointIds->GetNumberOfIds();
+             for(vtkIdType aPointId = 0; aPointId < aNbPointIds; aPointId++)
+               aCellIds->InsertNextId(aCell->GetPointIds()->GetId(aPointId));
+             theOutput->InsertNextCell(theInput->GetCellType(aCellId), aCellIds);
+           }
+           aCellIds->Delete();
+           theOutput->SetPoints(theInput->GetPoints());
+         }
+         {
+           TId2IdMap anObj2VTKDataMap;
+           vtkIdType aNbCells = aDataCellMapper->GetNumberOfTuples();
+           for(int aCellId = 0; aCellId < aNbCells; aCellId++){
+             vtkIdType anObjID = aDataCellMapper->GetValue(aCellId);
+             anObj2VTKDataMap[anObjID] = aCellId;
+           }
+           
+           DeepCopyDataSetAttributes(theOutput, 
+                                     theScalarsDataSet,
+                                     theVectorsDataSet,
+                                     theNormalsDataSet,
+                                     theTCoordsDataSet,
+                                     theTensorsDataSet,
+                                     theFieldList,
+                                     anIntersectionArray, 
+                                     anObj2VTKDataMap);
+         }
+         return true;
+       }
+      }
+    }else if(aGeometryCellMapper && (nbPointsInScalars < nbPointsInGeometr)){
+      vtkIntArray* aDataPointMapper = NULL;
+      vtkPointData* aInputScalarsPointData = theScalarsDataSet->GetPointData();
+      VISU::TFieldListIterator anIter(theFieldList);
+      for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+       const char* aFieldName = anIter.Get()->GetName();
+       if(strcmp(aFieldName, "VISU_POINTS_MAPPER") == 0){
+         vtkDataArray *aPointMapper = aInputScalarsPointData->GetArray(aFieldName);
+         aDataPointMapper = dynamic_cast<vtkIntArray*>(aPointMapper);
+         break;
+       }
+      }
+      vtkIntArray* aDataCellMapper = NULL;
+      VISU::TFieldListIterator anIter2(theFieldList);
+      for(anIter2.Begin(); !anIter2.End() ; anIter2.Next()){
+       const char* aFieldName = anIter2.Get()->GetName();
+       if(strcmp(aFieldName, "VISU_CELLS_MAPPER") == 0){
+         vtkDataArray *aCellMapper_tmp = aInputScalarsPointData->GetArray(aFieldName);
+         aDataCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper_tmp);
+         break;
+       }
+      }
+      
+      bool anIsDifferent = aDataPointMapper &&
+       aDataPointMapper->GetNumberOfTuples() != aGeometryPointMapper->GetNumberOfTuples();
+      if(anIsDifferent){
+       TSortedArray aGeometryPointArray;
+       GetSortedArray(aGeometryPointMapper, aGeometryPointArray);
+       
+       TSortedArray aDataPointArray;
+       GetSortedArray(aDataPointMapper, aDataPointArray);
+       
+       int aMaxLength = std::max(aGeometryPointArray.size(), aDataPointArray.size());
+       TSortedArray anIntersectionArray(aMaxLength);
+       TSortedArray::iterator anArrayIter = anIntersectionArray.begin();
+       anArrayIter = std::set_intersection(aGeometryPointArray.begin(),
+                                           aGeometryPointArray.end(),
+                                           aDataPointArray.begin(),
+                                           aDataPointArray.end(),
+                                           anArrayIter);
+       
+       anIntersectionArray.erase(anArrayIter, anIntersectionArray.end());
+       
+       {
+         TId2IdMap anObj2VTKGeometryMap;
+         vtkIdType aNbCells = aDataPointMapper/*aGeometryPointMapper*/->GetNumberOfTuples();
+         for(int aCellId = 0; aCellId < aNbCells; aCellId++){
+           vtkIdType anObjID = aDataPointMapper/*aGeometryPointMapper*/->GetValue(aCellId);
+           anObj2VTKGeometryMap[anObjID] = aCellId;
+         }
+         
+         vtkIdType aNbTuples = anIntersectionArray.size();
+         
+         if ( aNbTuples == nbPointsInScalars ){
+           vtkPointSet* aScalarsPointSet = vtkPointSet::SafeDownCast(theScalarsDataSet);
+           theOutput->SetPoints(aScalarsPointSet->GetPoints());
+           theOutput->GetPointData()->ShallowCopy(aScalarsPointSet->GetPointData());
+           
+           // Calculate output cells
+           int nbCells=0;
+           TSortedArray aCellIdsForCopy;
+           GetIdsForCopy(theInput, aDataPointMapper, aCellIdsForCopy);
+           nbCells = aCellIdsForCopy.size();
+           
+           // copy cells to output
+           theOutput->Allocate(nbCells);
+           vtkIntArray* theOuputIDSArray = vtkIntArray::New();
+           theOuputIDSArray->SetName("VISU_CELLS_MAPPER");
+           theOuputIDSArray->SetNumberOfComponents(1);
+           theOuputIDSArray->SetNumberOfTuples(nbCells);
+           
+           if(nbCells>0)
+             CopyElementsToOutput(theInput,
+                                  nbCells,
+                                  aCellIdsForCopy,
+                                  anObj2VTKGeometryMap,
+                                  theOuputIDSArray,
+                                  theOutput);
+           theOuputIDSArray->Delete();
+           return true;
+         } else {
+           // not implemented yet
+         }
+       }
+      }
+    }
+    {
+      theOutput->CopyStructure(theInput);
+      vtkIdType aNbPoints = theOutput->GetNumberOfPoints();
+      vtkIdType aNbCells = theOutput->GetNumberOfCells();
+      
+      // merge data only if it is consistent
+      if(theScalarsDataSet)
+       CopyDataSetAttribute(theScalarsDataSet, 
+                            &vtkDataSetAttributes::GetScalars,
+                            theOutput,
+                            &vtkDataSetAttributes::SetScalars,
+                            aNbPoints,
+                            aNbCells);
+      
+      if(theVectorsDataSet)
+       CopyDataSetAttribute(theVectorsDataSet, 
+                            &vtkDataSetAttributes::GetVectors,
+                            theOutput, 
+                            &vtkDataSetAttributes::SetVectors,
+                            aNbPoints, 
+                            aNbCells);
+      
+      if(theNormalsDataSet)
+       CopyDataSetAttribute(theNormalsDataSet,
+                            &vtkDataSetAttributes::GetNormals,
+                            theOutput,
+                            &vtkDataSetAttributes::SetNormals,
+                            aNbPoints,
+                            aNbCells);
+      
+      if(theTCoordsDataSet)
+       CopyDataSetAttribute(theTCoordsDataSet,
+                            &vtkDataSetAttributes::GetTCoords,
+                            theOutput,
+                            &vtkDataSetAttributes::SetTCoords,
+                            aNbPoints, 
+                            aNbCells);
+      
+      if(theTensorsDataSet)
+       CopyDataSetAttribute(theTensorsDataSet, 
+                            &vtkDataSetAttributes::GetTensors,
+                            theOutput, 
+                            &vtkDataSetAttributes::SetTensors,
+                            aNbPoints, 
+                            aNbCells);
+      
+      VISU::TFieldListIterator anIter(theFieldList);
+      for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+       vtkDataSet *aDataSet = anIter.Get()->Ptr;
+       const char* aFieldName = anIter.Get()->GetName();
+       CopyDataSetField(aDataSet, 
+                        aFieldName, 
+                        theOutput, 
+                        aNbPoints, 
+                        aNbCells);
+      }
+
+      return true;
+    }
+  }
+
+
+  //---------------------------------------------------------------
+}
+
+
+namespace VISU
+{
+
+  //---------------------------------------------------------------
+  bool
+  Execute(vtkUnstructuredGrid *theInput,
+         vtkUnstructuredGrid *theOutput,
+         vtkDataSet* theScalarsDataSet,
+         vtkDataSet* theVectorsDataSet,
+         vtkDataSet* theNormalsDataSet,
+         vtkDataSet* theTCoordsDataSet,
+         vtkDataSet* theTensorsDataSet,
+         TFieldList* theFieldList,
+         bool theIsMergingInputs)
+  {
+    return ::Execute(theInput,
+                    theOutput,
+                    theScalarsDataSet,
+                    theVectorsDataSet,
+                    theNormalsDataSet,
+                    theTCoordsDataSet,
+                    theTensorsDataSet,
+                    theFieldList,
+                    theIsMergingInputs);
+  }
+
+
+  //---------------------------------------------------------------
+  bool
+  Execute(vtkPolyData *theInput,
+         vtkPolyData *theOutput,
+         vtkDataSet* theScalarsDataSet,
+         vtkDataSet* theVectorsDataSet,
+         vtkDataSet* theNormalsDataSet,
+         vtkDataSet* theTCoordsDataSet,
+         vtkDataSet* theTensorsDataSet,
+         TFieldList* theFieldList,
+         bool theIsMergingInputs)
+  {
+    return ::Execute(theInput,
+                    theOutput,
+                    theScalarsDataSet,
+                    theVectorsDataSet,
+                    theNormalsDataSet,
+                    theTCoordsDataSet,
+                    theTensorsDataSet,
+                    theFieldList,
+                    theIsMergingInputs);
+  }
+
+
+  //---------------------------------------------------------------
+}
diff --git a/src/CONVERTOR/VISU_MergeFilterUtilities.hxx b/src/CONVERTOR/VISU_MergeFilterUtilities.hxx
new file mode 100644 (file)
index 0000000..e29abba
--- /dev/null
@@ -0,0 +1,183 @@
+//  SALOME VTKViewer : build VTK viewer into Salome desktop
+//
+//  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   : 
+//  Author : 
+//  Module : SALOME
+//  $Header$
+
+#ifndef VISU_MergeFilterUtilities_H
+#define VISU_MergeFilterUtilities_H
+
+#include <string>
+
+class vtkDataSet;
+class vtkPolyData;
+class vtkUnstructuredGrid;
+
+namespace VISU
+{
+  class TFieldList;
+
+
+  //---------------------------------------------------------------
+  bool
+  Execute(vtkUnstructuredGrid *theInput,
+         vtkUnstructuredGrid *theOutput,
+         vtkDataSet* theScalarsDataSet,
+         vtkDataSet* theVectorsDataSet,
+         vtkDataSet* theNormalsDataSet,
+         vtkDataSet* theTCoordsDataSet,
+         vtkDataSet* theTensorsDataSet,
+         TFieldList* theFieldList,
+         bool theIsMergingInputs);
+
+
+  //---------------------------------------------------------------
+  bool
+  Execute(vtkPolyData *theInput,
+         vtkPolyData *theOutput,
+         vtkDataSet* theScalarsDataSet,
+         vtkDataSet* theVectorsDataSet,
+         vtkDataSet* theNormalsDataSet,
+         vtkDataSet* theTCoordsDataSet,
+         vtkDataSet* theTensorsDataSet,
+         TFieldList* theFieldList,
+         bool theIsMergingInputs);
+
+
+  //---------------------------------------------------------------
+  class TFieldNode
+  {
+  public:
+    TFieldNode(const char* name, vtkDataSet* ptr=0)
+    {
+      int length = static_cast<int>(strlen(name));
+      if (length > 0) {
+       this->Name = new char[length+1];
+       strcpy(this->Name, name);
+      } else {
+        this->Name = 0;
+      }
+      this->Ptr = ptr;
+      this->Next = 0;
+    }
+    ~TFieldNode()
+    {
+      delete[] this->Name;
+    }
+
+    const char* GetName()
+    {
+      return Name;
+    }
+    vtkDataSet* Ptr;
+    TFieldNode* Next;
+  private:
+    TFieldNode(const TFieldNode&) {}
+    void operator=(const TFieldNode&) {}
+    char* Name;
+  };
+
+
+  //---------------------------------------------------------------
+  class TFieldList
+  {
+  public:
+    TFieldList()
+    {
+      this->First = 0;
+      this->Last = 0;
+    }
+    ~TFieldList()
+    {
+      TFieldNode* node = this->First;
+      TFieldNode* next;
+      while(node){
+        next = node->Next;
+        delete node;
+        node = next;
+      }
+    }
+
+
+    void Add(const char* name, vtkDataSet* ptr)
+    {
+      TFieldNode* newNode = new TFieldNode(name, ptr);
+      if (!this->First) {
+       this->First = newNode;
+       this->Last = newNode;
+      } else {
+        this->Last->Next = newNode;
+        this->Last = newNode;
+      }
+    }
+
+    friend class TFieldListIterator;
+    
+  private:
+    TFieldNode* First;
+    TFieldNode* Last;
+  };
+  
+
+  //---------------------------------------------------------------
+  class TFieldListIterator
+  {
+  public:
+    TFieldListIterator(TFieldList* list)
+    {
+      this->List = list;
+      this->Position = 0;
+    }
+    void Begin()
+    {
+      this->Position = this->List->First;
+    }
+    void Next()
+    {
+      if (this->Position) {
+       this->Position = this->Position->Next;
+      }
+    }
+    int End()
+    {
+      return this->Position ? 0 : 1;
+    }
+    TFieldNode* Get()
+    {
+      return this->Position;
+    }
+    
+  private:
+    TFieldNode* Position;
+    TFieldList* List;
+  };
+  
+
+  //---------------------------------------------------------------
+}
+
+#endif
+
+
index 31c4ea422b887ff8cd9383cbaf33fd0d65307e2f..59bdb6399aee22c64868bb5dbb11a7ddc1cd3cb3 100644 (file)
@@ -27,7 +27,9 @@
 #include "VISU_PointCoords.hxx"
 #include "VISU_ConvertorUtils.hxx"
 
-#include <vtkPoints.h>
+#include <vtkUnstructuredGrid.h>
+#include <vtkPointData.h>
+#include <vtkIntArray.h>
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
@@ -79,17 +81,21 @@ namespace VISU
   //---------------------------------------------------------------
   TPointCoords
   ::TPointCoords():
-    myPoints(vtkPoints::New())
+    myPointSet(vtkUnstructuredGrid::New())
   {
-    myPoints->SetDataType(VTK_DOUBLE);
-    myPoints->Delete();
+    vtkPoints* aPoints = vtkPoints::New();
+    myPointSet->SetPoints(aPoints);
+    aPoints->SetDataType(VTK_DOUBLE);
+    aPoints->Delete();
+
+    myPointSet->Delete();
   }
 
   void
   TPointCoords
   ::Init(const PCoordHolder& theCoord)
   {
-    myPoints->SetNumberOfPoints(theCoord->GetNbPoints());
+    myPointSet->GetPoints()->SetNumberOfPoints(theCoord->GetNbPoints());
     myCoord = theCoord;
   }
 
@@ -125,13 +131,13 @@ namespace VISU
   TPointCoords
   ::SetVoidArray() const
   {
-    vtkDataArray* aDataArray = myPoints->GetData();
+    vtkDataArray* aDataArray = myPointSet->GetPoints()->GetData();
     aDataArray->SetVoidArray(myCoord->GetValuePtr(), myCoord->size(), true);
   }
 
-  vtkPoints*
+  vtkPointSet*
   TPointCoords
-  ::GetPoints() const
+  ::GetPointSet() const
   { 
     if(!myIsVTKDone){
       TTimerLog aTimerLog(MYDEBUG,"TPointCoords::GetPoints()");
@@ -146,6 +152,7 @@ namespace VISU
        INITMSG(MYDEBUG,"TPointCoords::GetPoints - SetVoidArray()"<<endl);
        SetVoidArray();
       }else{
+       vtkPoints* aPoints = myPointSet->GetPoints();
        for(vtkIdType aPointId = 0; aPointId < aNbPoints; aPointId++){
          TCCoordSlice aSlice = GetCoordSlice(aPointId);
       
@@ -153,14 +160,14 @@ namespace VISU
          for(vtkIdType aDimId = 0; aDimId < aDim; aDimId++)
            aCoords[aDimId] = aSlice[aDimId];
 
-         myPoints->SetPoint(aPointId, aCoords);
+         aPoints->SetPoint(aPointId, aCoords);
        }
       }
-      
+
       myIsVTKDone = true;
     }
     
-    return myPoints.GetPointer();
+    return myPointSet.GetPointer();
   }
 
   unsigned long int
@@ -168,7 +175,7 @@ namespace VISU
   ::GetMemorySize()
   {
     size_t aSize = myCoord->GetMemorySize();
-    aSize += myPoints->GetActualMemorySize() * 1024;
+    aSize += myPointSet->GetActualMemorySize() * 1024;
     return aSize;
   }
 
@@ -304,9 +311,9 @@ namespace VISU
   
 
   //---------------------------------------------------------------
-  vtkPoints*
+  vtkPointSet*
   TNamedPointCoords
-  ::GetPoints() const
+  ::GetPointSet() const
   { 
     if(!myIsVTKDone){
       TTimerLog aTimerLog(MYDEBUG,"TNamedPointCoords::GetPoints()");
@@ -354,19 +361,34 @@ namespace VISU
        INITMSG(MYDEBUG,"TNamedPointCoords::GetPoints - SetVoidArray()"<<endl);
        SetVoidArray();
       }else{
+       vtkPoints* aPoints = myPointSet->GetPoints();
        for(vtkIdType aNodeId = 0; aNodeId < GetNbPoints(); aNodeId++){ 
          TCCoordSlice aCoordSlice = GetCoordSlice(aNodeId);
-         myPoints->SetPoint(aNodeId,
-                            aCoordHelperPtr->GetCoord(aCoordSlice,eX),
-                            aCoordHelperPtr->GetCoord(aCoordSlice,eY),
-                            aCoordHelperPtr->GetCoord(aCoordSlice,eZ));
+         aPoints->SetPoint(aNodeId,
+                           aCoordHelperPtr->GetCoord(aCoordSlice,eX),
+                           aCoordHelperPtr->GetCoord(aCoordSlice,eY),
+                           aCoordHelperPtr->GetCoord(aCoordSlice,eZ));
        }
       }
       
+      {
+       vtkIdType aNbTuples = GetNbPoints();
+       vtkIntArray *aDataArray = vtkIntArray::New();
+       aDataArray->SetName("VISU_POINTS_MAPPER");
+       aDataArray->SetNumberOfComponents(1);
+       aDataArray->SetNumberOfTuples(aNbTuples);
+       for(vtkIdType aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+         vtkIdType anObjID = GetObjID(aTupleId);
+         aDataArray->SetValue(aTupleId, anObjID);
+       }
+       myPointSet->GetPointData()->AddArray(aDataArray);
+       aDataArray->Delete();
+      }
+
       myIsVTKDone = true;
     }
     
-    return myPoints.GetPointer();
+    return myPointSet.GetPointer();
   }
 
   unsigned long int
index 1ef6877298148bdf9f679f31e3b75d8753def836..6a420ec7b088c0724cd05a162b0bd4b0e181f165 100644 (file)
 
 #include <vtkSmartPointer.h>
 
-class vtkPoints;
+class vtkPointSet;
 
 namespace VISU
 {
   //---------------------------------------------------------------
-  typedef vtkSmartPointer<vtkPoints> PPoints;
+  typedef vtkSmartPointer<vtkPointSet> PPointSet;
 
   typedef MED::TFloat TCoord;
   using MED::TCoordSlice;
@@ -171,8 +171,8 @@ namespace VISU
     GetDim() const;
 
     virtual
-    vtkPoints*
-    GetPoints() const; //!< Gets corresponding VTK structure
+    vtkPointSet*
+    GetPointSet() const; //!< Gets corresponding VTK structure
 
     //! Gets memory size used by the instance (bytes).
     virtual
@@ -194,7 +194,7 @@ namespace VISU
       provide unifirm way of conversation with this coordinates (independant from mesh dimension)
     */
     PCoordHolder myCoord; //!< A pointer to the coordinates container holder
-    PPoints myPoints; //!< VTK representation for the mesh nodes
+    PPointSet myPointSet; //!< VTK representation for the mesh nodes
 
     void
     SetVoidArray() const; //!< Passes the MED node coordinates data directly to VTK
@@ -238,8 +238,8 @@ namespace VISU
     GetNodeName(vtkIdType theObjID) const;
 
     virtual
-    vtkPoints*
-    GetPoints() const; //!< Gets initialized corresponding VTK structure
+    vtkPointSet*
+    GetPointSet() const; //!< Gets initialized corresponding VTK structure
 
     //! Gets memory size used by the instance (bytes).
     virtual
index 100bcf1493eb9cfe65a11b988fc3943798d6282b..76b59d96976f2b42cbcc6b32ff0e9dea73123537 100644 (file)
 #include "VISU_PointCoords.hxx"
 #include "VISU_MeshValue.hxx"
 
-#include "VTKViewer_AppendFilter.h"
+#include "VISU_AppendFilter.hxx"
 #include "VISU_AppendPolyData.hxx"
 #include "VISU_MergeFilter.hxx"
 
+#include "VISU_ConvertorUtils.hxx"
+
 #include <vtkUnstructuredGrid.h>
 #include <vtkPolyData.h>
 #include <vtkCellType.h>
@@ -182,9 +184,9 @@ namespace VISU
   ::GetFilter() const
   {
     if(!myFilter.GetPointer()){
-      myFilter = VTKViewer_AppendFilter::New();
+      myFilter = VISU_AppendFilter::New();
       myFilter->Delete();
-      myFilter->SetDoMappingFlag(true);
+      myFilter->SetMappingInputs(true);
     }
     return myFilter;
   }
@@ -208,8 +210,8 @@ namespace VISU
   {
     if(!myFilter.GetPointer()){
       myFilter = VISU_AppendPolyData::New();
+      myFilter->SetMappingInputs(true);
       myFilter->Delete();
-      myFilter->SetDoMappingFlag(true);
     }
     return myFilter;
   }
@@ -268,11 +270,11 @@ namespace VISU
     return myDim;
   }
   
-  vtkPoints*
+  vtkPointSet*
   TMeshImpl::
-  GetPoints()
+  GetPointSet()
   {
-    return myNamedPointCoords->GetPoints();
+    return myNamedPointCoords->GetPointSet();
   }
 
 
@@ -352,31 +354,14 @@ namespace VISU
   TProfileImpl
   ::GetElemObjID(vtkIdType theID) const
   {
-    if(myIsAll)
-      return myMeshOnEntity->GetElemObjID(theID);
-
-    vtkIdType anInputID, aStartID, anInputDataSetID;
-    const PAppendFilter& anAppendFilter = GetFilter();
-    anAppendFilter->GetCellInputID(theID,anInputID,aStartID,anInputDataSetID);
-    PSubProfileImpl aSubProfileImpl = mySubProfileArr[anInputDataSetID];
-    return aSubProfileImpl->GetElemObjID(anInputID);
+    return VISU::GetElemObjID(GetFilter()->GetOutput(), theID);
   }
 
   vtkIdType
   TProfileImpl
   ::GetElemVTKID(vtkIdType theID) const
   {
-    if(myIsAll)
-      return myMeshOnEntity->GetElemVTKID(theID);
-
-    if(myElemObj2VTKID.empty())
-      return theID;
-    else{
-      TID2ID::const_iterator anIter = myElemObj2VTKID.find(theID);
-      if(anIter != myElemObj2VTKID.end())
-       return anIter->second;
-    }
-    return -1;
+    return VISU::GetElemVTKID(GetFilter()->GetOutput(), theID);
   }
 
   vtkCell* 
@@ -426,16 +411,7 @@ namespace VISU
   TProfileImpl
   ::GetElemName(vtkIdType theObjID) const
   {
-    if(myIsAll)
-      return myMeshOnEntity->GetElemName(theObjID);
-
-    vtkIdType aVTKId = GetElemVTKID(theObjID);
-    vtkIdType anInputID, aStartID, anInputDataSetID;
-    const PAppendFilter& anAppendFilter = GetFilter();
-    anAppendFilter->GetCellInputID(aVTKId,anInputID,aStartID,anInputDataSetID);
-    PSubProfileImpl aSubProfileImpl = mySubProfileArr[anInputDataSetID];
-    vtkIdType anEntityObjId = aSubProfileImpl->GetElemObjID(anInputID);
-    return myMeshOnEntity->GetElemName(anEntityObjId);
+    return myMeshOnEntity->GetElemName(theObjID);
   }
 
 
@@ -499,6 +475,8 @@ namespace VISU
       aFilter->SetScalars(aDataSet);
       aFilter->SetVectors(aDataSet);
       aFilter->AddField("VISU_FIELD",aDataSet);
+      aFilter->AddField("VISU_CELLS_MAPPER",aDataSet);
+      aFilter->AddField("VISU_POINTS_MAPPER",aDataSet);
     }
     return myFilter->GetUnstructuredGridOutput();
   }
@@ -580,6 +558,8 @@ namespace VISU
       aFilter->SetScalars(aDataSet);
       aFilter->SetVectors(aDataSet);
       aFilter->AddField("VISU_FIELD",aDataSet);
+      aFilter->AddField("VISU_CELLS_MAPPER",aDataSet);
+      aFilter->AddField("VISU_POINTS_MAPPER",aDataSet);
     }
     return myFilter->GetPolyDataOutput();
   }
@@ -675,12 +655,8 @@ namespace VISU
   TGaussMeshImpl
   ::GetObjID(vtkIdType theID) const
   {
-    vtkIdType anInputID, aStartId, anInputDataSetID;
     const PAppendPolyData& aFilter = GetFilter();
-    aFilter->GetCellInputID(theID, anInputID, aStartId, anInputDataSetID);
-    const TGaussSubMeshImpl& aSubMeshImpl = myGaussSubMeshArr[anInputDataSetID];
-
-    return aSubMeshImpl.GetObjID(anInputID,aStartId);
+    return VISU::GetObjID(aFilter->GetOutput(), theID);
   }
 
   vtkPolyData* 
@@ -789,25 +765,14 @@ namespace VISU
   TMeshOnEntityImpl
   ::GetElemVTKID(vtkIdType theID) const
   {
-    if(myElemObj2VTKID.empty())
-      return theID;
-    else{
-      TID2ID::const_iterator anIter = myElemObj2VTKID.find(theID);
-      if(anIter != myElemObj2VTKID.end())
-       return anIter->second;
-    }
-    return -1;
+    return VISU::GetElemVTKID(GetFilter()->GetOutput(), theID);
   }
 
   vtkIdType
   TMeshOnEntityImpl
   ::GetElemObjID(vtkIdType theID) const
   {
-    vtkIdType anInputID, aStartId, anInputDataSetID;
-    const PAppendFilter& anAppendFilter = GetFilter();
-    anAppendFilter->GetCellInputID(theID,anInputID,aStartId,anInputDataSetID);
-    const PSubMeshImpl& aSubMesh = mySubMeshArr[anInputDataSetID];
-    return aSubMesh->GetElemObjID(anInputID);
+    return VISU::GetElemObjID(GetFilter()->GetOutput(), theID);
   }
 
   std::string 
@@ -821,12 +786,9 @@ namespace VISU
   TMeshOnEntityImpl
   ::GetElemName(vtkIdType theObjID) const
   {
-    vtkIdType aVTKId = GetElemVTKID(theObjID);
-    vtkIdType anInputID, aStartId, anInputDataSetID;
-    const PAppendFilter& anAppendFilter = GetFilter();
-    anAppendFilter->GetCellInputID(aVTKId,anInputID,aStartId,anInputDataSetID);
-    const PSubMeshImpl& aSubMesh = mySubMeshArr[anInputDataSetID];
-    return aSubMesh->GetElemName(anInputID);
+    TInputCellID anInputCellID = VISU::GetInputCellID(GetFilter()->GetOutput(), theObjID);
+    const PSubMeshImpl& aSubMesh = mySubMeshArr[anInputCellID.first];
+    return aSubMesh->GetElemName(anInputCellID.second);
   }
 
   vtkUnstructuredGrid* 
@@ -948,11 +910,7 @@ namespace VISU
   TGroupImpl
   ::GetElemObjID(vtkIdType theID) const
   {
-    vtkIdType anInputID, aStartId, anInputDataSetID;
-    const PAppendFilter& anAppendFilter = GetFilter();
-    anAppendFilter->GetCellInputID(theID,anInputID,aStartId,anInputDataSetID);
-    const PFamilyImpl& aFamily = myFamilyArr[anInputDataSetID];
-    return aFamily->GetElemObjID(anInputID);
+    return VISU::GetElemObjID(GetFilter()->GetOutput(), theID);
   }
 
   vtkIdType 
index 7783b66c9fd6f01fef9bd48a251723067e600cc6..351b886cd960addaf5f3a6912a9f65b2085cbc9e 100644 (file)
@@ -35,6 +35,9 @@
 #include "VISU_Structures.hxx"
 #include "VISU_ConvertorDef_impl.hxx"
 
+class vtkPointSet;
+
+
 namespace VISU
 {
   //---------------------------------------------------------------
@@ -193,8 +196,8 @@ namespace VISU
     vtkIdType
     GetDim() const;
 
-    vtkPoints*
-    GetPoints(); //!< Gets initialized corresponding VTK structure
+    vtkPointSet*
+    GetPointSet(); //!< Gets initialized corresponding VTK structure
   };