From 2f786d22870a0837cb2c36ff578432492c55770b Mon Sep 17 00:00:00 2001 From: Shai Seger Date: Tue, 17 Oct 2017 23:33:48 +0300 Subject: [PATCH] Add initial class --- .../PathSimulator/App/AppPathSimulator.cpp | 2 +- src/Mod/Path/PathSimulator/App/CMakeLists.txt | 8 +-- .../Path/PathSimulator/App/PathSimulator.cpp | 53 +++++++++++++++++++ .../Path/PathSimulator/App/PathSimulator.h | 53 +++++++++++++++++++ .../Path/PathSimulator/App/PreCompiled.cpp | 2 +- src/Mod/Path/PathSimulator/App/PreCompiled.h | 2 +- 6 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 src/Mod/Path/PathSimulator/App/PathSimulator.cpp create mode 100644 src/Mod/Path/PathSimulator/App/PathSimulator.h diff --git a/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp b/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp index ef62700c77..c8c95c9ac8 100644 --- a/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp +++ b/src/Mod/Path/PathSimulator/App/AppPathSimulator.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) YEAR YOUR NAME * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/PathSimulator/App/CMakeLists.txt b/src/Mod/Path/PathSimulator/App/CMakeLists.txt index 611a8d74e5..b6ae8ef65b 100644 --- a/src/Mod/Path/PathSimulator/App/CMakeLists.txt +++ b/src/Mod/Path/PathSimulator/App/CMakeLists.txt @@ -13,6 +13,8 @@ set(PathSimulator_LIBS SET(PathSimulator_SRCS AppPathSimulator.cpp + PathSimulator.cpp + PathSimulator.h PreCompiled.cpp PreCompiled.h ) @@ -22,11 +24,11 @@ target_link_libraries(PathSimulator ${PathSimulator_LIBS}) fc_target_copy_resource(PathSimulator - ${CMAKE_SOURCE_DIR}/src/Mod/PathSimulator - ${CMAKE_BINARY_DIR}/Mod/PathSimulator + ${CMAKE_SOURCE_DIR}/src/Mod/Path/PathSimulator + ${CMAKE_BINARY_DIR}/Mod/Path/PathSimulator Init.py) -SET_BIN_DIR(PathSimulator PathSimulator /Mod/PathSimulator) +SET_BIN_DIR(PathSimulator PathSimulator /Mod/Path/PathSimulator) SET_PYTHON_PREFIX_SUFFIX(PathSimulator) install(TARGETS PathSimulator DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/Mod/Path/PathSimulator/App/PathSimulator.cpp b/src/Mod/Path/PathSimulator/App/PathSimulator.cpp new file mode 100644 index 0000000000..298d7fe908 --- /dev/null +++ b/src/Mod/Path/PathSimulator/App/PathSimulator.cpp @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (c) Shsi Seger (shaise at gmail) 2017 * + * * + * 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_ +#endif + +#include + +#include +#include +#include +#include + +// KDL stuff - at the moment, not used +//#include "Mod/Robot/App/kdl_cp/path_line.hpp" +//#include "Mod/Robot/App/kdl_cp/path_circle.hpp" +//#include "Mod/Robot/App/kdl_cp/rotational_interpolation_sa.hpp" +//#include "Mod/Robot/App/kdl_cp/utilities/error.h" + +#include "PathSimulator.h" + +using namespace Path; +using namespace Base; + +TYPESYSTEM_SOURCE(Path::PathSimulator , Base::Persistence); + + + + + + diff --git a/src/Mod/Path/PathSimulator/App/PathSimulator.h b/src/Mod/Path/PathSimulator/App/PathSimulator.h new file mode 100644 index 0000000000..01cf101da9 --- /dev/null +++ b/src/Mod/Path/PathSimulator/App/PathSimulator.h @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (c) Shsi Seger (shaise at gmail) 2017 * + * * + * 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 PATH_PathSimulator_H +#define PATH_PathSimulator_H + +#include +#include + +namespace Path +{ + + /** The representation of a CNC Toolpath Simulator */ + + class PathSimulatorAppExport PathSimulator : public Base::Persistence + { + TYPESYSTEM_HEADER(); + + public: + PathSimulator() {}; + ~PathSimulator() {}; + + virtual unsigned int getMemSize(void) const { + return 0; + }; + virtual void Save(Base::Writer &/*writer*/) const {}; + virtual void Restore(Base::XMLReader &/*reader*/) {}; + }; + +} //namespace Path + + +#endif // PATH_PathSimulator_H diff --git a/src/Mod/Path/PathSimulator/App/PreCompiled.cpp b/src/Mod/Path/PathSimulator/App/PreCompiled.cpp index 59619b4a2a..17da8b7b2f 100644 --- a/src/Mod/Path/PathSimulator/App/PreCompiled.cpp +++ b/src/Mod/Path/PathSimulator/App/PreCompiled.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) YEAR YOUR NAME * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * * diff --git a/src/Mod/Path/PathSimulator/App/PreCompiled.h b/src/Mod/Path/PathSimulator/App/PreCompiled.h index a27ee97cd3..428640436d 100644 --- a/src/Mod/Path/PathSimulator/App/PreCompiled.h +++ b/src/Mod/Path/PathSimulator/App/PreCompiled.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) YEAR YOUR NAME * + * Copyright (c) 2017 Shai Seger * * * * This file is part of the FreeCAD CAx development system. * * *