Add generated PathSimulation Module
This commit is contained in:
committed by
Yorik van Havre
parent
eef61c54ff
commit
84798a6aa6
@@ -1,5 +1,6 @@
|
||||
add_subdirectory(App)
|
||||
add_subdirectory(libarea)
|
||||
add_subdirectory(PathSimulator)
|
||||
|
||||
if(BUILD_GUI)
|
||||
add_subdirectory(Gui)
|
||||
|
||||
68
src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp
Normal file
68
src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp
Normal file
@@ -0,0 +1,68 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <Python.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
|
||||
#include <CXX/Extensions.hxx>
|
||||
#include <CXX/Objects.hxx>
|
||||
|
||||
|
||||
namespace PathSimulator {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("PathSimulator")
|
||||
{
|
||||
initialize("This module is the PathSimulator module."); // register with Python
|
||||
}
|
||||
|
||||
virtual ~Module() {}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return (new Module)->module().ptr();
|
||||
}
|
||||
|
||||
|
||||
} // namespace PathSimulator
|
||||
|
||||
|
||||
/* Python entry */
|
||||
PyMOD_INIT_FUNC(PathSimulator)
|
||||
{
|
||||
// ADD YOUR CODE HERE
|
||||
//
|
||||
//
|
||||
PyObject* mod = PathSimulator::initModule();
|
||||
Base::Console().Log("Loading PathSimulator module... done\n");
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
32
src/Mod/Path/PathSimulator/App/CMakeLists.txt
Normal file
32
src/Mod/Path/PathSimulator/App/CMakeLists.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
include_directories(
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(PathSimulator_LIBS
|
||||
FreeCADApp
|
||||
)
|
||||
|
||||
SET(PathSimulator_SRCS
|
||||
AppPathSimulator.cpp
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
)
|
||||
|
||||
add_library(PathSimulator SHARED ${PathSimulator_SRCS})
|
||||
target_link_libraries(PathSimulator ${PathSimulator_LIBS})
|
||||
|
||||
|
||||
fc_target_copy_resource(PathSimulator
|
||||
${CMAKE_SOURCE_DIR}/src/Mod/PathSimulator
|
||||
${CMAKE_BINARY_DIR}/Mod/PathSimulator
|
||||
Init.py)
|
||||
|
||||
SET_BIN_DIR(PathSimulator PathSimulator /Mod/PathSimulator)
|
||||
SET_PYTHON_PREFIX_SUFFIX(PathSimulator)
|
||||
|
||||
install(TARGETS PathSimulator DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
24
src/Mod/Path/PathSimulator/App/PreCompiled.cpp
Normal file
24
src/Mod/Path/PathSimulator/App/PreCompiled.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
61
src/Mod/Path/PathSimulator/App/PreCompiled.h
Normal file
61
src/Mod/Path/PathSimulator/App/PreCompiled.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 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 Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef APP_PRECOMPILED_H
|
||||
#define APP_PRECOMPILED_H
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
// Exporting of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
# define PathSimulatorAppExport __declspec(dllexport)
|
||||
#else // for Linux
|
||||
# define PathSimulatorAppExport
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// standard
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
// STL
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif
|
||||
|
||||
13
src/Mod/Path/PathSimulator/CMakeLists.txt
Normal file
13
src/Mod/Path/PathSimulator/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
add_subdirectory(App)
|
||||
# if(BUILD_GUI)
|
||||
# add_subdirectory(Gui)
|
||||
# endif(BUILD_GUI)
|
||||
|
||||
# install(
|
||||
# FILES
|
||||
# Init.py
|
||||
# InitGui.py
|
||||
# DESTINATION
|
||||
# Mod/PathSimulator
|
||||
# )
|
||||
3
src/Mod/Path/PathSimulator/PathSimulator.dox
Normal file
3
src/Mod/Path/PathSimulator/PathSimulator.dox
Normal file
@@ -0,0 +1,3 @@
|
||||
/** \defgroup TEMPLATE PathSimulator
|
||||
* \ingroup WORKBENCHES */
|
||||
|
||||
Reference in New Issue
Block a user