Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Mod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ add_subdirectory(Plot)

add_subdirectory(Spreadsheet)

add_subdirectory(DDA)


50 changes: 50 additions & 0 deletions src/Mod/DDA/App/AppDDA.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/***************************************************************************
* 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>


/* registration table */
extern struct PyMethodDef DDA_methods[];

PyDoc_STRVAR(module_DDA_doc,
"This module is the DDA module.");


/* Python entry */
extern "C" {
void DDAAppExport initDDA() {

// ADD YOUR CODE HERE
//
//
(void) Py_InitModule3("DDA", DDA_methods, module_DDA_doc); /* mod name, table ptr */
Base::Console().Log("Loading DDA module... done\n");
}

} // extern "C"
38 changes: 38 additions & 0 deletions src/Mod/DDA/App/AppDDAPy.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/***************************************************************************
* 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_
#endif

#include <Python.h>

#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Base/Exception.h>


/* registration table */
struct PyMethodDef DDA_methods[] = {
{NULL, NULL} /* end of table marker */
};
46 changes: 46 additions & 0 deletions src/Mod/DDA/App/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

include_directories(
${Boost_INCLUDE_DIRS}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH}
${ZLIB_INCLUDE_DIR}
${XERCESC_INCLUDE_DIR}
)

set(DDA_LIBS
FreeCADApp
)

SET(DDA_SRCS
AppDDA.cpp
AppDDAPy.cpp
PreCompiled.cpp
PreCompiled.h
)

add_library(DDA SHARED ${DDA_SRCS})
target_link_libraries(DDA ${DDA_LIBS})


fc_target_copy_resource(DDA
${CMAKE_SOURCE_DIR}/src/Mod/DDA
${CMAKE_BINARY_DIR}/Mod/DDA
Init.py)

if(MSVC)
set_target_properties(DDA PROPERTIES SUFFIX ".pyd")
set_target_properties(DDA PROPERTIES DEBUG_OUTPUT_NAME "DDA_d")
set_target_properties(DDA PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/DDA)
set_target_properties(DDA PROPERTIES PREFIX "../")
elseif(MINGW)
set_target_properties(DDA PROPERTIES SUFFIX ".pyd")
set_target_properties(DDA PROPERTIES DEBUG_OUTPUT_NAME "DDA_d")
set_target_properties(DDA PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/DDA)
set_target_properties(DDA PROPERTIES PREFIX "")
else(MSVC)
set_target_properties(DDA PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Mod/DDA)
set_target_properties(DDA PROPERTIES PREFIX "")
set_target_properties(Fem PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
endif(MSVC)

install(TARGETS DDA DESTINATION lib)
47 changes: 47 additions & 0 deletions src/Mod/DDA/App/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

lib_LTLIBRARIES=libDDA.la DDA.la

libDDA_la_SOURCES=\
AppDDAPy.cpp \
PreCompiled.cpp \
PreCompiled.h

includedir = @includedir@/Mod/DDA/App

# the library search path.
libDDA_la_LDFLAGS = -L../../../Base -L../../../App $(all_libraries) \
-version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
libDDA_la_CPPFLAGS = -DDDAAppExport=

libDDA_la_LIBADD = \
@BOOST_SYSTEM_LIB@ \
-l@PYTHON_LIB@ \
-lxerces-c \
-lFreeCADBase \
-lFreeCADApp

#--------------------------------------------------------------------------------------
# Loader of libDDA

DDA_la_SOURCES=\
AppDDA.cpp

# the library search path.
DDA_la_LDFLAGS = $(libDDA_la_LDFLAGS) -module -avoid-version
DDA_la_CPPFLAGS = $(libDDA_la_CPPFLAGS)

DDA_la_LIBADD = \
$(libDDA_la_LIBADD) \
-lDDA

DDA_la_DEPENDENCIES = libDDA.la

#--------------------------------------------------------------------------------------

# set the include path found by configure
AM_CXXFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src $(all_includes)

libdir = $(prefix)/Mod/DDA

EXTRA_DIST = \
CMakeLists.txt
24 changes: 24 additions & 0 deletions src/Mod/DDA/App/PreCompiled.cpp
Original file line number Diff line number Diff line change
@@ -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 changes: 61 additions & 0 deletions src/Mod/DDA/App/PreCompiled.h
Original file line number Diff line number Diff line change
@@ -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 DDAAppExport __declspec(dllexport)
#else // for Linux
# define DDAAppExport
#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

Loading