From: vsr Date: Tue, 12 Feb 2013 15:10:41 +0000 (+0000) Subject: Merge from V6_main 11/02/2013 X-Git-Tag: V6_6_0_SIMAN X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1eb23ff388682331691712a69cd96107c5a4fef6;p=modules%2Fparavis.git Merge from V6_main 11/02/2013 --- diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 1c116fae..b9e5566b 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -21,7 +21,7 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) #INCLUDE(vtkWrapHierarchy.cmake) #SET(VTK_WRAP_HIERARCHY_EXE vtkWrapHierarchy) @@ -58,14 +58,14 @@ ADD_LIBRARY(SalomeIDLPARAVIS SHARED ${srcs}) ENDIF(WINDOWS) SET(flags) -FOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${CORBA_INCLUDES} ${CORBA_CXXFLAGS} ${KERNEL_CXXFLAGS}) +FOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${OMNIORB_DEFINITIONS} ${KERNEL_CXXFLAGS}) SET(flags "${flags} ${f}") -ENDFOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${CORBA_INCLUDES} ${CORBA_CXXFLAGS} ${KERNEL_CXXFLAGS}) +ENDFOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${OMNIORB_DEFINITIONS} ${KERNEL_CXXFLAGS}) SET_TARGET_PROPERTIES(SalomeIDLPARAVIS PROPERTIES COMPILE_FLAGS "${flags}") SET_TARGET_PROPERTIES(SalomeIDLPARAVIS PROPERTIES VERSION ${VERSION_INFO} SOVERSION ${SOVERSION_INFO}) -TARGET_LINK_LIBRARIES(SalomeIDLPARAVIS ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${CORBA_LIBS}) +TARGET_LINK_LIBRARIES(SalomeIDLPARAVIS ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${OMNIORB_LIBRARIES}) INSTALL(TARGETS SalomeIDLPARAVIS DESTINATION lib/salome) ADD_EXECUTABLE(vtkWrapIDL @@ -115,7 +115,7 @@ FOREACH(input ${BASEIDL_FILES} ${WRAP_IDL}) ENDIF(${BASE_INDEX} EQUAL -1) ADD_CUSTOM_COMMAND( OUTPUT ${outputs} - COMMAND ${OMNIORB_IDL} -bcxx ${IDLCXXFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${KERNEL_ROOT_DIR}/idl/salome ${OMNIORB_IDLCXXFLAGS} ${input} + COMMAND ${OMNIORB_IDL_COMPILER} -bcxx ${IDLCXXFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR} -I${KERNEL_ROOT_DIR}/idl/salome ${OMNIORB_IDLCXXFLAGS} ${input} MAIN_DEPENDENCY ${input} ) INSTALL(FILES ${input} DESTINATION idl/salome) diff --git a/src/ENGINE/CMakeLists.txt b/src/ENGINE/CMakeLists.txt index 918e68af..85b6170a 100644 --- a/src/ENGINE/CMakeLists.txt +++ b/src/ENGINE/CMakeLists.txt @@ -21,19 +21,19 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_BINARY_DIR}/idl) ADD_LIBRARY(PARAVISEngine SHARED PARAVIS_Engine_i.cc) SET(flags) -FOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${KERNEL_CXXFLAGS} ${CORBA_CXXFLAGS} ${CORBA_INCLUDES}) +FOREACH(f ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${KERNEL_CXXFLAGS} ${OMNIORB_DEFINITIONS}) SET(flags "${flags} ${f}") ENDFOREACH(f ${var}) SET_TARGET_PROPERTIES(PARAVISEngine PROPERTIES COMPILE_FLAGS "${flags}") SET_TARGET_PROPERTIES(PARAVISEngine PROPERTIES VERSION ${VERSION_INFO} SOVERSION ${SOVERSION_INFO}) -TARGET_LINK_LIBRARIES(PARAVISEngine ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${KERNEL_LDFLAGS} ${SalomeIDLKernel} ${SalomeNS} ${SalomeContainer} ${SALOMELocalTrace} ${CORBA_LIBS} SalomeIDLPARAVIS) +TARGET_LINK_LIBRARIES(PARAVISEngine ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} ${KERNEL_LDFLAGS} ${SalomeIDLKernel} ${SalomeNS} ${SalomeContainer} ${SALOMELocalTrace} ${OMNIORB_LIBRARIES} SalomeIDLPARAVIS) INSTALL(TARGETS PARAVISEngine DESTINATION lib/salome) INSTALL(FILES PARAVIS_Engine_i.hh DESTINATION include/salome) diff --git a/src/PVGUI/CMakeLists.txt b/src/PVGUI/CMakeLists.txt index 514e7686..d729a8c8 100644 --- a/src/PVGUI/CMakeLists.txt +++ b/src/PVGUI/CMakeLists.txt @@ -21,7 +21,7 @@ SET(VERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MAINTENANCE}) SET(SOVERSION_INFO ${VERSION_MAJOR}.${VERSION_MINOR}) ADD_DEFINITIONS(-DHAVE_SALOME_CONFIG) -INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${KERNEL_ROOT_DIR}/include/salome ${CMAKE_CURRENT_SOURCE_DIR}/../ParaView ${CMAKE_BINARY_DIR}/idl ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) IF(WITH_VISU) SET(VISU_PARAVIS_LIBS @@ -115,8 +115,7 @@ SET(libPARAVIS_la_CPPFLAGS ${CAS_CPPFLAGS} ${CAS_CXXFLAGS} ${KERNEL_CXXFLAGS} - ${CORBA_CXXFLAGS} - ${CORBA_INCLUDES} + ${OMNIORB_DEFINITIONS} ${BOOST_CPPFLAGS} ${GUI_CXXFLAGS} ${MED_CXXFLAGS} @@ -158,7 +157,7 @@ SET_TARGET_PROPERTIES(PARAVIS PROPERTIES VERSION ${VERSION_INFO} SOVERSION ${SOV TARGET_LINK_LIBRARIES(PARAVIS ${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS} - ${CORBA_LIBS} + ${OMNIORB_LIBRARIES} ${QT_LIBS} ${CAS_KERNEL} ${VTK_LIBS} diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index 9c285391..99221e82 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -326,7 +326,6 @@ void paravisCleanUp() */ PVGUI_Module::PVGUI_Module() : SalomeApp_Module( "PARAVIS" ), - LightApp_Module( "PARAVIS" ), // Implementation( 0 ), mySelectionControlsTb( -1 ), mySourcesMenuId( -1 ), diff --git a/src/Plugins/ParaMEDCorba/CMakeLists.txt b/src/Plugins/ParaMEDCorba/CMakeLists.txt index 77bc1149..06cce60c 100644 --- a/src/Plugins/ParaMEDCorba/CMakeLists.txt +++ b/src/Plugins/ParaMEDCorba/CMakeLists.txt @@ -39,7 +39,7 @@ PROJECT( ParaMEDCorba ) ) ADD_LIBRARY (ParaMEDMEM2VTK SHARED VTKMEDCouplingMeshClient.cxx VTKMEDCouplingUMeshClient.cxx VTKMEDCouplingCMeshClient.cxx - VTKMEDCouplingFieldClient.cxx VTKParaMEDFieldClient.cxx VTKMEDCouplingMultiFieldsClient.cxx ) + VTKMEDCouplingFieldClient.cxx VTKParaMEDFieldClient.cxx VTKMEDCouplingMultiFieldsClient.cxx VTKMEDCouplingCurveLinearMeshClient.cxx) ADD_PARAVIEW_PLUGIN( ParaMEDCorbaPlugin "1.0" SERVER_MANAGER_XML ParaMEDCorbaServerManager.xml @@ -47,14 +47,9 @@ PROJECT( ParaMEDCorba ) ParaMEDCorbaUserInterfaceSources.xml SERVER_MANAGER_SOURCES ${PARACORBAPLUG_SRCS} ) - SET(flags) - FOREACH(f ${CORBA_INCLUDES} ${CORBA_CXXFLAGS}) - SET(flags "${flags} ${f}") - ENDFOREACH(f ${CORBA_INCLUDES} ${CORBA_CXXFLAGS}) - - INCLUDE_DIRECTORIES(${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) - SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${flags}") - SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${flags}") + INCLUDE_DIRECTORIES(${OMNIORB_INCLUDE_DIR} ${MED_ROOT_DIR}/include/salome ${KERNEL_ROOT_DIR}/include/salome) + SET_TARGET_PROPERTIES(ParaMEDMEM2VTK PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") + SET_TARGET_PROPERTIES(ParaMEDCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") TARGET_LINK_LIBRARIES(ParaMEDMEM2VTK vtkCommon @@ -62,11 +57,10 @@ PROJECT( ParaMEDCorba ) vtkGraphics vtkClientServer pqCore - ${CORBA_LIBS} + ${OMNIORB_LIBRARIES} ${SalomeIDLMED} ${SalomeIDLKernel} ${QT_LIBS} - ${CORBA_LIBS} ) TARGET_LINK_LIBRARIES(ParaMEDCorbaPlugin ParaMEDMEM2VTK @@ -79,7 +73,7 @@ PROJECT( ParaMEDCorba ) ADD_EXECUTABLE( testParaMEDCorba ${ParaMEDCorba_SOURCE_DIR}/testParaMEDCorba.cxx ) - # SET_TARGET_PROPERTIES(testCorbaPlugin PROPERTIES COMPILE_FLAGS "${flags}") + # SET_TARGET_PROPERTIES(testCorbaPlugin PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}") TARGET_LINK_LIBRARIES( testParaMEDCorba ParaMEDCorbaPlugin diff --git a/src/Plugins/ParaMEDCorba/VTKMEDCouplingCMeshClient.cxx b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCMeshClient.cxx index d9f78864..92068e00 100644 --- a/src/Plugins/ParaMEDCorba/VTKMEDCouplingCMeshClient.cxx +++ b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCMeshClient.cxx @@ -33,19 +33,24 @@ void ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(SALOME_MED::MEDCouplingCMe SALOME_TYPES::ListOfLong *tinyI; SALOME_TYPES::ListOfString *tinyS; meshPtr->getTinyInfo(tinyD,tinyI,tinyS); - int sizePerAxe[3]; - sizePerAxe[0]=(*tinyI)[0]; - sizePerAxe[1]=(*tinyI)[1]; - sizePerAxe[2]=(*tinyI)[2]; + int sizePerAxe[3]={1,1,1}; + bool isOK[3]={false,false,false}; + if((*tinyI)[0]>0) + { sizePerAxe[0]=(*tinyI)[0]; isOK[0]=true; } + if((*tinyI)[1]>0) + { sizePerAxe[1]=(*tinyI)[1]; isOK[1]=true; } + if((*tinyI)[2]>0) + { sizePerAxe[2]=(*tinyI)[2]; isOK[2]=true; } ret->SetDimensions(sizePerAxe[0],sizePerAxe[1],sizePerAxe[2]); delete tinyI; delete tinyS; + delete tinyD; SALOME_TYPES::ListOfDouble *bigD; meshPtr->getSerialisationData(tinyI,bigD); delete tinyI; int offset=0; vtkDoubleArray *da=0; - if(sizePerAxe[0]>0) + if(isOK[0]) { da=vtkDoubleArray::New(); da->SetNumberOfTuples(sizePerAxe[0]); @@ -57,7 +62,7 @@ void ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(SALOME_MED::MEDCouplingCMe da->Delete(); offset+=sizePerAxe[0]; } - if(sizePerAxe[1]>0) + if(isOK[1]) { da=vtkDoubleArray::New(); da->SetNumberOfTuples(sizePerAxe[1]); @@ -69,7 +74,12 @@ void ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(SALOME_MED::MEDCouplingCMe da->Delete(); offset+=sizePerAxe[1]; } - if(sizePerAxe[2]>0) + else + { + da=vtkDoubleArray::New(); da->SetNumberOfTuples(1); da->SetNumberOfComponents(1); + double *pt=da->GetPointer(0); *pt=0.; ret->SetYCoordinates(da); da->Delete(); + } + if(isOK[2]) { da=vtkDoubleArray::New(); da->SetNumberOfTuples(sizePerAxe[2]); @@ -80,6 +90,11 @@ void ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(SALOME_MED::MEDCouplingCMe ret->SetZCoordinates(da); da->Delete(); } + else + { + da=vtkDoubleArray::New(); da->SetNumberOfTuples(1); da->SetNumberOfComponents(1); + double *pt=da->GetPointer(0); *pt=0.; ret->SetZCoordinates(da); da->Delete(); + } delete bigD; meshPtr->UnRegister(); } diff --git a/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.cxx b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.cxx new file mode 100644 index 00000000..75924571 --- /dev/null +++ b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.cxx @@ -0,0 +1,73 @@ +// Copyright (C) 2010-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "VTKMEDCouplingCurveLinearMeshClient.hxx" + +#include "vtkPoints.h" +#include "vtkErrorCode.h" +#include "vtkDoubleArray.h" +#include "vtkStructuredGrid.h" + +#include +#include + +void ParaMEDMEM2VTK::FillMEDCouplingCurveLinearMeshInstanceFrom(SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr meshPtr, vtkStructuredGrid *ret) +{ + meshPtr->Register(); + SALOME_TYPES::ListOfDouble *tinyD; + SALOME_TYPES::ListOfLong *tinyI; + SALOME_TYPES::ListOfString *tinyS; + meshPtr->getTinyInfo(tinyD,tinyI,tinyS); + int meshStr[3]={1,1,1}; + int meshDim=(*tinyI)[2]; + if(meshDim<0 || meshDim>3) + vtkErrorWithObjectMacro(ret,"Internal error in ParaMEDCorba plugin : distant curvilinear mesh has a mesh dimension not in [0,3] !"); + for(int i=0;iSetDimensions(meshStr); + int nbOfNodes=(*tinyI)[3+meshDim]; + int spaceDim=(*tinyI)[3+meshDim+1]; + delete tinyD; + delete tinyI; + delete tinyS; + // + vtkDoubleArray *da=vtkDoubleArray::New(); + da->SetNumberOfComponents(3); + da->SetNumberOfTuples(nbOfNodes); + double *pt=da->GetPointer(0); + SALOME_TYPES::ListOfDouble *bigD; + meshPtr->getSerialisationData(tinyI,bigD); + delete tinyI; + if(bigD->length()!=nbOfNodes*spaceDim) + vtkErrorWithObjectMacro(ret,"Internal error in ParaMEDCorba plugin : distant curvilinear mesh, mismatch between informations ! Internal error !"); + for(int i=0;iSetPoints(points); + points->SetData(da); + points->Delete(); + da->Delete(); + meshPtr->UnRegister(); +} diff --git a/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.hxx b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.hxx new file mode 100644 index 00000000..add1858f --- /dev/null +++ b/src/Plugins/ParaMEDCorba/VTKMEDCouplingCurveLinearMeshClient.hxx @@ -0,0 +1,32 @@ +// Copyright (C) 2010-2012 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef __VTKMEDCOUPLINGCURVELINEARMESHCLIENT_HXX__ +#define __VTKMEDCOUPLINGCURVELINEARMESHCLIENT_HXX__ + +#include "ParaMEDCouplingCorbaServant.hh" + +class vtkStructuredGrid; + +namespace ParaMEDMEM2VTK +{ + void FillMEDCouplingCurveLinearMeshInstanceFrom(SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_ptr meshPtr, vtkStructuredGrid *ret); +} + +#endif diff --git a/src/Plugins/ParaMEDCorba/VTKMEDCouplingMeshClient.cxx b/src/Plugins/ParaMEDCorba/VTKMEDCouplingMeshClient.cxx index 2d53a14e..455e39da 100644 --- a/src/Plugins/ParaMEDCorba/VTKMEDCouplingMeshClient.cxx +++ b/src/Plugins/ParaMEDCorba/VTKMEDCouplingMeshClient.cxx @@ -20,10 +20,12 @@ #include "VTKMEDCouplingMeshClient.hxx" #include "VTKMEDCouplingUMeshClient.hxx" #include "VTKMEDCouplingCMeshClient.hxx" +#include "VTKMEDCouplingCurveLinearMeshClient.hxx" #include "vtkErrorCode.h" #include "vtkUnstructuredGrid.h" #include "vtkRectilinearGrid.h" +#include "vtkStructuredGrid.h" #include #include @@ -56,6 +58,18 @@ void ParaMEDMEM2VTK::FillMEDCouplingMeshInstanceFrom(SALOME_MED::MEDCouplingMesh ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(cmeshPtr,ret1); return ; } + SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var clmeshPtr=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtr); + if(!CORBA::is_nil(clmeshPtr)) + { + vtkStructuredGrid *ret1=vtkStructuredGrid::SafeDownCast(ret); + if(!ret1) + { + vtkErrorWithObjectMacro(ret,"Internal error in ParaMEDCorba plugin : mismatch between VTK type and CORBA type CurveLinearMesh !"); + return ; + } + ParaMEDMEM2VTK::FillMEDCouplingCurveLinearMeshInstanceFrom(clmeshPtr,ret1); + return ; + } vtkErrorWithObjectMacro(ret,"Error : CORBA mesh type ! Mesh type not managed !"); } @@ -75,6 +89,13 @@ vtkDataSet *ParaMEDMEM2VTK::BuildFromMEDCouplingMeshInstance(SALOME_MED::MEDCoup ParaMEDMEM2VTK::FillMEDCouplingCMeshInstanceFrom(cmeshPtr,ret1); return ret1; } + SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface_var clmeshPtr=SALOME_MED::MEDCouplingCurveLinearMeshCorbaInterface::_narrow(meshPtr); + if(!CORBA::is_nil(clmeshPtr)) + { + vtkStructuredGrid *ret1=vtkStructuredGrid::New(); + ParaMEDMEM2VTK::FillMEDCouplingCurveLinearMeshInstanceFrom(clmeshPtr,ret1); + return ret1; + } vtkOutputWindowDisplayErrorText("Error : CORBA mesh type ! Mesh type not managed #2 !"); return 0; }