# Common packages
##
SET(SUBDIRS_COMMON
- #CXX
- #SWIG
+ StudyData
+ SWIG
PY
)
+++ /dev/null
-# Copyright (C) 2012-2019 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-
-# --- options ---
-# additional include directories
-INCLUDE_DIRECTORIES(
- ${KERNEL_INCLUDE_DIRS}
- ${GEOM_INCLUDE_DIRS}
- ${OpenCASCADE_INCLUDE_DIR}
- ${SHAPER_INCLUDE_DIRS}
-)
-
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
- ${OpenCASCADE_DEFINITIONS}
-)
-
-# libraries to link to
-SET(_link_LIBRARIES
- # ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
- # ${OpenCASCADE_ModelingData_LIBRARIES}
- # ${OpenCASCADE_ApplicationFramework_LIBRARIES}
- # ${GEOM_NMTTools}
- # ${GEOM_GEOMUtils}
-)
-
-# --- headers ---
-
-# header files / no moc processing
-SET(SHAPERSTUDYCore_HEADERS
-)
-
-# --- sources ---
-
-# sources / static
-SET(SHAPERSTUDYCore_SOURCES
-)
-
-# --- rules ---
-
-ADD_LIBRARY(SHAPERSTUDYCore ${SHAPERSTUDYCore_SOURCES})
-IF(WIN32)
- TARGET_COMPILE_OPTIONS(SHAPERSTUDYCore PRIVATE /bigobj)
-ENDIF(WIN32)
-
-TARGET_LINK_LIBRARIES(SHAPERSTUDYCore ${_link_LIBRARIES} )
-INSTALL(TARGETS SHAPERSTUDYCore EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
-
-INSTALL(FILES ${SHAPERSTUDYCore_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
${KERNEL_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
- ${PROJECT_SOURCE_DIR}/src/CXX
+ ${PROJECT_SOURCE_DIR}/src/StudyData
)
# additional preprocessor / compiler flags
# libraries to link to
SET(_link_LIBRARIES
+ StudyData
+ ${PYTHON_LIBRARIES}
)
# --- headers ---
# --- sources ---
# sources / static
-SET(SHAPERSTUDY_Swig_SOURCES
- SHAPERSTUDY_Swig.i
- ${SHAPERSTUDY_Swig_HEADERS}
+SET(StudyData_Swig_SOURCES
+ StudyData_Swig.i
+ #${SHAPERSTUDY_Swig_HEADERS}
)
# workaround about SWIG_ADD_MODULE bug: remove duplicates in include directories
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_directories}")
# swig flags
-SET_SOURCE_FILES_PROPERTIES(SHAPERSTUDY_Swig.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(SHAPERSTUDY_Swig.i PROPERTIES SWIG_FLAGS "-py3")
-SET_SOURCE_FILES_PROPERTIES(SHAPERSTUDY_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
+SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES SWIG_FLAGS "-py3")
+SET_SOURCE_FILES_PROPERTIES(StudyData_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
# --- scripts ---
# scripts / swig wrappings
SET(_swig_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/SHAPERSTUDY_Swig.py
+ ${CMAKE_CURRENT_BINARY_DIR}/StudyData_Swig.py
)
# --- rules ---
IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_ADD_MODULE(SHAPERSTUDY_Swig python ${SHAPERSTUDY_Swig_SOURCES})
+ SWIG_ADD_MODULE(StudyData_Swig python ${StudyData_Swig_SOURCES})
ELSE()
- SWIG_ADD_LIBRARY(SHAPERSTUDY_Swig LANGUAGE python SOURCES ${SHAPERSTUDY_Swig_SOURCES})
+ SWIG_ADD_LIBRARY(StudyData_Swig LANGUAGE python SOURCES ${StudyData_Swig_SOURCES})
ENDIF()
-SWIG_LINK_LIBRARIES(SHAPERSTUDY_Swig ${_link_LIBRARIES})
-SWIG_CHECK_GENERATION(SHAPERSTUDY_Swig)
+SWIG_LINK_LIBRARIES(StudyData_Swig ${_link_LIBRARIES})
+SWIG_CHECK_GENERATION(StudyData_Swig)
IF(WIN32)
- SET_TARGET_PROPERTIES(_SHAPERSTUDY_Swig PROPERTIES DEBUG_OUTPUT_NAME _SHAPERSTUDY_Swig_d)
+ SET_TARGET_PROPERTIES(_StudyData_Swig PROPERTIES DEBUG_OUTPUT_NAME _StudyData_Swig_d)
ENDIF(WIN32)
-INSTALL(TARGETS _SHAPERSTUDY_Swig DESTINATION ${SALOME_INSTALL_LIBS})
+#INSTALL(TARGETS _StudyData_Swig DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES ${SHAPERSTUDY_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
+#INSTALL(FILES ${StudyData_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS} EXTRA_DPYS "${SWIG_MODULE_SHAPERSTUDY_Swig_REAL_NAME}")
+#SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS} EXTRA_DPYS "${SWIG_MODULE_SHAPERSTUDY_Swig_REAL_NAME}")
--- /dev/null
+
+
+%module StudyData_Swig
+
+%{
+#include "StudyData_Object.h"
+%}
--- /dev/null
+# Copyright (C) 2012-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+# --- options ---
+# additional include directories
+INCLUDE_DIRECTORIES(
+ ${KERNEL_INCLUDE_DIRS}
+ ${GEOM_INCLUDE_DIRS}
+ ${OpenCASCADE_INCLUDE_DIR}
+ ${SHAPER_INCLUDE_DIRS}
+)
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+ ${OpenCASCADE_DEFINITIONS}
+ ${OMNIORB_DEFINITIONS}
+)
+
+# libraries to link to
+SET(_link_LIBRARIES
+ SalomeIDLGEOM
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
+ # ${OpenCASCADE_ModelingData_LIBRARIES}
+ # ${OpenCASCADE_ApplicationFramework_LIBRARIES}
+ # ${GEOM_NMTTools}
+ # ${GEOM_GEOMUtils}
+)
+
+# --- headers ---
+
+# header files / no moc processing
+SET(STUDYDATA_HEADERS
+ StudyData_Object.h
+)
+
+# --- sources ---
+
+# sources / static
+SET(STUDYDATA_SOURCES
+ StudyData_Object.cpp
+)
+
+# --- rules ---
+
+ADD_LIBRARY(StudyData ${STUDYDATA_HEADERS} ${STUDYDATA_SOURCES})
+#IF(WIN32)
+# TARGET_COMPILE_OPTIONS(SudyData PRIVATE /bigobj)
+#ENDIF(WIN32)
+
+TARGET_LINK_LIBRARIES(StudyData ${_link_LIBRARIES} )
+INSTALL(TARGETS StudyData EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
+
+INSTALL(FILES ${STUDYDATA_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
--- /dev/null
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "StudyData_Object.h"
+
+#include <BRep_Builder.hxx>
+#include <BRepTools.hxx>
+
+StudyData_Object::StudyData_Object(SALOMEDS::TMPFile_var theFile)
+{
+ int sizebuf = theFile->length();
+ char* aBuf;
+ aBuf = (char*)&theFile[0];
+ std::istringstream streamBrep(aBuf);
+ BRep_Builder aBuilder;
+ BRepTools::Read(myShape, streamBrep, aBuilder);
+}
--- /dev/null
+// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef StudyData_Object_H
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GEOM_Gen)
+
+#include <TopoDS_Shape.hxx>
+
+class StudyData_Object
+{
+public:
+ StudyData_Object(SALOMEDS::TMPFile_var theFile);
+
+
+private:
+ TopoDS_Shape myShape;
+};
+
+#endif // !StudyData_Object_H