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)
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
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)
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)
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
${CAS_CPPFLAGS}
${CAS_CXXFLAGS}
${KERNEL_CXXFLAGS}
- ${CORBA_CXXFLAGS}
- ${CORBA_INCLUDES}
+ ${OMNIORB_DEFINITIONS}
${BOOST_CPPFLAGS}
${GUI_CXXFLAGS}
${MED_CXXFLAGS}
TARGET_LINK_LIBRARIES(PARAVIS
${PLATFORM_LIBADD} ${PLATFORM_LDFLAGS}
- ${CORBA_LIBS}
+ ${OMNIORB_LIBRARIES}
${QT_LIBS}
${CAS_KERNEL}
${VTK_LIBS}
*/
PVGUI_Module::PVGUI_Module()
: SalomeApp_Module( "PARAVIS" ),
- LightApp_Module( "PARAVIS" ),
// Implementation( 0 ),
mySelectionControlsTb( -1 ),
mySourcesMenuId( -1 ),
)
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
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
vtkGraphics
vtkClientServer
pqCore
- ${CORBA_LIBS}
+ ${OMNIORB_LIBRARIES}
${SalomeIDLMED}
${SalomeIDLKernel}
${QT_LIBS}
- ${CORBA_LIBS}
)
TARGET_LINK_LIBRARIES(ParaMEDCorbaPlugin
ParaMEDMEM2VTK
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
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]);
da->Delete();
offset+=sizePerAxe[0];
}
- if(sizePerAxe[1]>0)
+ if(isOK[1])
{
da=vtkDoubleArray::New();
da->SetNumberOfTuples(sizePerAxe[1]);
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]);
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();
}
--- /dev/null
+// 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 <vector>
+#include <string>
+
+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;i<meshDim;i++)
+ meshStr[i]=(*tinyI)[3+i];
+ ret->SetDimensions(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;i<nbOfNodes;i++)
+ {
+ for(int j=0;j<spaceDim;j++,pt++)
+ *pt=(*bigD)[spaceDim*i+j];
+ for(int j=spaceDim;j<3;j++,pt++)
+ *pt=0.;
+ }
+ delete bigD;
+ vtkPoints *points=vtkPoints::New();
+ ret->SetPoints(points);
+ points->SetData(da);
+ points->Delete();
+ da->Delete();
+ meshPtr->UnRegister();
+}
--- /dev/null
+// 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
#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 <vector>
#include <string>
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 !");
}
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;
}