mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
37 lines
675 B
C++
37 lines
675 B
C++
// a wrapper to load netgen-dll into python
|
|
|
|
#include <iostream>
|
|
#include <boost/python.hpp>
|
|
|
|
#ifdef WIN32
|
|
#define DLL_HEADER __declspec(dllimport)
|
|
#else
|
|
#define DLL_HEADER
|
|
#endif
|
|
|
|
|
|
void DLL_HEADER ExportNetgenMeshing();
|
|
void DLL_HEADER ExportMeshVis();
|
|
void DLL_HEADER ExportCSG();
|
|
void DLL_HEADER ExportCSGVis();
|
|
void DLL_HEADER ExportGeom2d();
|
|
|
|
BOOST_PYTHON_MODULE(libngpy)
|
|
{
|
|
ExportCSG();
|
|
ExportCSGVis();
|
|
ExportNetgenMeshing();
|
|
ExportMeshVis();
|
|
ExportGeom2d();
|
|
}
|
|
|
|
// Force linking libnglib to libnetgenpy
|
|
namespace netgen
|
|
{
|
|
void MyBeep (int i);
|
|
void MyDummyToForceLinkingNGLib()
|
|
{
|
|
MyBeep(0);
|
|
}
|
|
}
|