Merge branch 'cleanup_dll_header' into 'master'

Clean up multiple definitions of DLL_HEADER

See merge request jschoeberl/netgen!369
This commit is contained in:
Matthias Hochsteger 2021-02-19 09:43:45 +00:00
commit 75e6c8217f
14 changed files with 168 additions and 204 deletions

View File

@ -1,4 +1,4 @@
add_definitions(-DNGLIB_EXPORTS)
add_definitions(-DNGINTERFACE_EXPORTS)
add_library(geom2d ${NG_LIB_TYPE} csg2d.cpp genmesh2d.cpp geometry2d.cpp python_geom2d.cpp )
if(APPLE)
set_target_properties( geom2d PROPERTIES SUFFIX ".so")

View File

@ -17,7 +17,7 @@ namespace netgen
}
DLL_HEADER void ExportGeom2d(py::module &m)
NGCORE_API_EXPORT void ExportGeom2d(py::module &m)
{
py::class_<SplineSegExt, shared_ptr<SplineSegExt>>
(m, "Spline", "Spline of a SplineGeometry object")

View File

@ -11,22 +11,15 @@
defines for graphics, testmodes, ...
*/
#include <core/ngcore.hpp>
#define PACKAGE_VERSION "6.2-dev"
// #define DEBUG
#ifdef WIN32
#if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS
#define DLL_HEADER __declspec(dllexport)
#else
#define DLL_HEADER __declspec(dllimport)
#endif
#if defined(NGINTERFACE_EXPORTS) || ( defined(WIN32) && (defined(NGLIB_EXPORTS) || defined(nglib_EXPORTS)) )
#define DLL_HEADER NGCORE_API_EXPORT
#else
#if __GNUC__ >= 4
#define DLL_HEADER __attribute__ ((visibility ("default")))
#else
#define DLL_HEADER
#endif
#define DLL_HEADER NGCORE_API_IMPORT
#endif

View File

@ -11,22 +11,13 @@
/* Date: 20. Nov. 99 */
/**************************************************************************/
#include <core/ngcore.hpp>
#include "mydefs.hpp"
/*
Application program interface to Netgen
*/
#ifndef DLL_HEADER
#if NGINTERFACE_EXPORTS || NGLIB_EXPORTS || nglib_EXPORTS
#define DLL_HEADER NGCORE_API_EXPORT
#else
#define DLL_HEADER NGCORE_API_IMPORT
#endif
#endif
// max number of nodes per element
#define NG_ELEMENT_MAXPOINTS 20

View File

@ -8,7 +8,7 @@
/* Date: May 09 */
/**************************************************************************/
#include <core/ngcore.hpp>
#include "mydefs.hpp"
/*
C++ interface to Netgen

View File

@ -1,3 +1,4 @@
add_definitions(-DNGINTERFACE_EXPORTS)
add_library(stl ${NG_LIB_TYPE}
meshstlsurface.cpp stlgeom.cpp stlgeomchart.cpp
stlgeommesh.cpp stlline.cpp stltool.cpp stltopology.cpp python_stl.cpp

View File

@ -6,10 +6,6 @@
#include <stlgeom.hpp>
#include "../meshing/python_mesh.hpp"
#ifdef WIN32
#define DLL_HEADER __declspec(dllexport)
#endif
using namespace netgen;
namespace netgen
{
@ -125,7 +121,7 @@ void CreateSTLParametersFromKwargs(STLParameters& stlparam, py::dict kwargs)
}
DLL_HEADER void ExportSTL(py::module & m)
NGCORE_API_EXPORT void ExportSTL(py::module & m)
{
py::class_<STLGeometry,shared_ptr<STLGeometry>, NetgenGeometry> (m,"STLGeometry")
.def(py::init<>())

View File

@ -1216,13 +1216,10 @@ void VisualSceneSTLMeshing :: MouseDblClick (int px, int py)
#ifdef NG_PYTHON
#ifdef WIN32
#define DLL_HEADER __declspec(dllexport)
#endif
#include <../general/ngpython.hpp>
#include <core/ngcore_api.hpp>
DLL_HEADER void ExportSTLVis(py::module &m)
NGCORE_API_EXPORT void ExportSTLVis(py::module &m)
{
using namespace netgen;

View File

@ -10,30 +10,30 @@
namespace netgen
{
class VisualSceneSTLGeometry : public VisualScene
class DLL_HEADER VisualSceneSTLGeometry : public VisualScene
{
NgArray<int> trilists;
class STLGeometry * stlgeometry;
public:
DLL_HEADER VisualSceneSTLGeometry ();
DLL_HEADER virtual ~VisualSceneSTLGeometry ();
void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }
VisualSceneSTLGeometry ();
virtual ~VisualSceneSTLGeometry ();
void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }
DLL_HEADER virtual void BuildScene (int zoomall = 0);
DLL_HEADER virtual void DrawScene ();
virtual void BuildScene (int zoomall = 0);
virtual void DrawScene ();
};
class VisualSceneSTLMeshing : public VisualScene
class DLL_HEADER VisualSceneSTLMeshing : public VisualScene
{
NgArray<int> trilists;
int selecttrig, nodeofseltrig;
class STLGeometry * stlgeometry;
public:
DLL_HEADER VisualSceneSTLMeshing ();
DLL_HEADER virtual ~VisualSceneSTLMeshing ();
VisualSceneSTLMeshing ();
virtual ~VisualSceneSTLMeshing ();
void SetGeometry (class STLGeometry * astlgeometry) { stlgeometry = astlgeometry; }

View File

@ -1,29 +1,21 @@
#include <mystdlib.h>
#include <inctcl.hpp>
#include <meshing.hpp>
#ifdef WIN32
#define DLL_HEADER_IMPORT __declspec(dllimport)
#define DLL_HEADER_EXPORT __declspec(dllexport)
#else
#define DLL_HEADER_IMPORT
#define DLL_HEADER_EXPORT
#endif
#include <core/ngcore_api.hpp>
namespace netgen
{
DLL_HEADER_EXPORT Flags parameters;
NGCORE_API_EXPORT Flags parameters;
}
DLL_HEADER_EXPORT bool nodisplay = false;
NGCORE_API_EXPORT bool nodisplay = false;
extern "C" int Ng_Init (Tcl_Interp * interp);
extern "C" int Ng_Vis_Init (Tcl_Interp * interp);
extern "C" void Ng_TclCmd(string);
// tcl package dynamic load
extern "C" int DLL_HEADER_EXPORT Gui_Init (Tcl_Interp * interp)
extern "C" int NGCORE_API_EXPORT Gui_Init (Tcl_Interp * interp)
{
if (Ng_Init(interp) == TCL_ERROR) {
cerr << "Problem in Ng_Init: " << endl;

View File

@ -2,27 +2,21 @@
#include <iostream>
#include <../general/ngpython.hpp>
#include <core/ngcore_api.hpp>
#ifdef WIN32
#define DLL_HEADER __declspec(dllimport)
#else
#define DLL_HEADER
#endif
void DLL_HEADER ExportNetgenMeshing(py::module &m);
void DLL_HEADER ExportMeshVis(py::module &m);
void DLL_HEADER ExportCSG(py::module &m);
void DLL_HEADER ExportCSGVis(py::module &m);
void DLL_HEADER ExportGeom2d(py::module &m);
void DLL_HEADER ExportSTL(py::module &m);
void DLL_HEADER ExportSTLVis(py::module &m);
void NGCORE_API_IMPORT ExportNetgenMeshing(py::module &m);
void NGCORE_API_IMPORT ExportMeshVis(py::module &m);
void NGCORE_API_IMPORT ExportCSG(py::module &m);
void NGCORE_API_IMPORT ExportCSGVis(py::module &m);
void NGCORE_API_IMPORT ExportGeom2d(py::module &m);
void NGCORE_API_IMPORT ExportSTL(py::module &m);
void NGCORE_API_IMPORT ExportSTLVis(py::module &m);
#ifdef OCCGEOMETRY
void DLL_HEADER ExportNgOCC(py::module &m);
void NGCORE_API_IMPORT ExportNgOCC(py::module &m);
#endif // OCCGEOMETRY
namespace netgen
{
std::vector<unsigned char> DLL_HEADER Snapshot( int w, int h );
std::vector<unsigned char> NGCORE_API_IMPORT Snapshot( int w, int h );
}
PYBIND11_MODULE(libngpy, ngpy)

View File

@ -78,7 +78,7 @@ namespace nglib
// initialize, deconstruct Netgen library:
DLL_HEADER void Ng_Init ()
NGLIB_API void Ng_Init ()
{
mycout = &cout;
myerr = &cerr;
@ -90,7 +90,7 @@ namespace nglib
// Clean-up functions before ending usage of nglib
DLL_HEADER void Ng_Exit ()
NGLIB_API void Ng_Exit ()
{
;
}
@ -99,7 +99,7 @@ namespace nglib
// Create a new netgen mesh object
DLL_HEADER Ng_Mesh * Ng_NewMesh ()
NGLIB_API Ng_Mesh * Ng_NewMesh ()
{
Mesh * mesh = new Mesh;
mesh->AddFaceDescriptor (FaceDescriptor (1, 1, 0, 1));
@ -110,7 +110,7 @@ namespace nglib
// Delete an existing netgen mesh object
DLL_HEADER void Ng_DeleteMesh (Ng_Mesh * mesh)
NGLIB_API void Ng_DeleteMesh (Ng_Mesh * mesh)
{
if(mesh != NULL)
{
@ -129,7 +129,7 @@ namespace nglib
// Save a netgen mesh in the native VOL format
DLL_HEADER void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename)
NGLIB_API void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename)
{
((Mesh*)mesh)->Save(filename);
}
@ -138,7 +138,7 @@ namespace nglib
// Load a netgen native VOL mesh from a given file
DLL_HEADER Ng_Mesh * Ng_LoadMesh(const char* filename)
NGLIB_API Ng_Mesh * Ng_LoadMesh(const char* filename)
{
Mesh * mesh = new Mesh;
mesh->Load(filename);
@ -149,7 +149,7 @@ namespace nglib
// Merge another mesh file into the currently loaded one
DLL_HEADER Ng_Result Ng_MergeMesh( Ng_Mesh* mesh, const char* filename)
NGLIB_API Ng_Result Ng_MergeMesh( Ng_Mesh* mesh, const char* filename)
{
Ng_Result status = NG_OK;
@ -190,7 +190,7 @@ namespace nglib
// Merge another mesh file into the currently loaded one
DLL_HEADER Ng_Result Ng_MergeMesh( Ng_Mesh* mesh1, Ng_Mesh* mesh2)
NGLIB_API Ng_Result Ng_MergeMesh( Ng_Mesh* mesh1, Ng_Mesh* mesh2)
{
return NG_ERROR;
}
@ -199,7 +199,7 @@ namespace nglib
// Manually add a point to an existing mesh object
DLL_HEADER void Ng_AddPoint (Ng_Mesh * mesh, double * x)
NGLIB_API void Ng_AddPoint (Ng_Mesh * mesh, double * x)
{
Mesh * m = (Mesh*)mesh;
m->AddPoint (Point3d (x[0], x[1], x[2]));
@ -209,7 +209,7 @@ namespace nglib
// Manually add a surface element of a given type to an existing mesh object
DLL_HEADER void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et,
NGLIB_API void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et,
int * pi)
{
Mesh * m = (Mesh*)mesh;
@ -225,7 +225,7 @@ namespace nglib
// Manually add a volume element of a given type to an existing mesh object
DLL_HEADER void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et,
NGLIB_API void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et,
int * pi)
{
Mesh * m = (Mesh*)mesh;
@ -242,7 +242,7 @@ namespace nglib
// Obtain the number of points in the mesh
DLL_HEADER int Ng_GetNP (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNP (Ng_Mesh * mesh)
{
return ((Mesh*)mesh) -> GetNP();
}
@ -251,7 +251,7 @@ namespace nglib
// Obtain the number of surface elements in the mesh
DLL_HEADER int Ng_GetNSE (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNSE (Ng_Mesh * mesh)
{
return ((Mesh*)mesh) -> GetNSE();
}
@ -260,7 +260,7 @@ namespace nglib
// Obtain the number of volume elements in the mesh
DLL_HEADER int Ng_GetNE (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNE (Ng_Mesh * mesh)
{
return ((Mesh*)mesh) -> GetNE();
}
@ -269,7 +269,7 @@ namespace nglib
// Return point coordinates of a given point index in the mesh
DLL_HEADER void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x)
NGLIB_API void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x)
{
const Point3d & p = ((Mesh*)mesh)->Point(num);
x[0] = p.X();
@ -281,7 +281,7 @@ namespace nglib
// Return the surface element at a given index "pi"
DLL_HEADER Ng_Surface_Element_Type
NGLIB_API Ng_Surface_Element_Type
Ng_GetSurfaceElement (Ng_Mesh * mesh, int num, int * pi)
{
const Element2d & el = ((Mesh*)mesh)->SurfaceElement(num);
@ -312,7 +312,7 @@ namespace nglib
// Return the volume element at a given index "pi"
DLL_HEADER Ng_Volume_Element_Type
NGLIB_API Ng_Volume_Element_Type
Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi)
{
const Element & el = ((Mesh*)mesh)->VolumeElement(num);
@ -335,7 +335,7 @@ namespace nglib
// Set a global limit on the maximum mesh size allowed
DLL_HEADER void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h)
NGLIB_API void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h)
{
((Mesh*)mesh) -> SetGlobalH (h);
}
@ -344,7 +344,7 @@ namespace nglib
// Set a local limit on the maximum mesh size allowed around the given point
DLL_HEADER void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h)
NGLIB_API void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h)
{
((Mesh*)mesh) -> RestrictLocalH (Point3d (p[0], p[1], p[2]), h);
}
@ -353,7 +353,7 @@ namespace nglib
// Set a local limit on the maximum mesh size allowed within a given box region
DLL_HEADER void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h)
NGLIB_API void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h)
{
for (double x = pmin[0]; x < pmax[0]; x += h)
for (double y = pmin[1]; y < pmax[1]; y += h)
@ -365,7 +365,7 @@ namespace nglib
// Generates volume mesh from an existing surface mesh
DLL_HEADER Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp)
NGLIB_API Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp)
{
Mesh * m = (Mesh*)mesh;
@ -388,7 +388,7 @@ namespace nglib
/* ------------------ 2D Meshing Functions ------------------------- */
DLL_HEADER void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x)
NGLIB_API void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x)
{
Mesh * m = (Mesh*)mesh;
@ -398,7 +398,7 @@ namespace nglib
DLL_HEADER void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2)
NGLIB_API void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2)
{
Mesh * m = (Mesh*)mesh;
@ -411,7 +411,7 @@ namespace nglib
DLL_HEADER int Ng_GetNP_2D (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNP_2D (Ng_Mesh * mesh)
{
Mesh * m = (Mesh*)mesh;
return m->GetNP();
@ -420,7 +420,7 @@ namespace nglib
DLL_HEADER int Ng_GetNE_2D (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNE_2D (Ng_Mesh * mesh)
{
Mesh * m = (Mesh*)mesh;
return m->GetNSE();
@ -429,7 +429,7 @@ namespace nglib
DLL_HEADER int Ng_GetNSeg_2D (Ng_Mesh * mesh)
NGLIB_API int Ng_GetNSeg_2D (Ng_Mesh * mesh)
{
Mesh * m = (Mesh*)mesh;
return m->GetNSeg();
@ -438,7 +438,7 @@ namespace nglib
DLL_HEADER void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x)
NGLIB_API void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x)
{
Mesh * m = (Mesh*)mesh;
@ -450,7 +450,7 @@ namespace nglib
DLL_HEADER Ng_Surface_Element_Type
NGLIB_API Ng_Surface_Element_Type
Ng_GetElement_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum)
{
const Element2d & el = ((Mesh*)mesh)->SurfaceElement(num);
@ -485,7 +485,7 @@ namespace nglib
DLL_HEADER void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum)
NGLIB_API void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum)
{
const Segment & seg = ((Mesh*)mesh)->LineSegment(num);
pi[0] = seg[0];
@ -498,7 +498,7 @@ namespace nglib
DLL_HEADER Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename)
NGLIB_API Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename)
{
SplineGeometry2d * geom = new SplineGeometry2d();
geom -> Load (filename);
@ -506,7 +506,7 @@ namespace nglib
}
DLL_HEADER Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom,
NGLIB_API Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom,
Ng_Mesh ** mesh,
Ng_Meshing_Parameters * mp)
{
@ -527,7 +527,7 @@ namespace nglib
DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom,
NGLIB_API void Ng_HP_Refinement (Ng_Geometry_2D * geom,
Ng_Mesh * mesh,
int levels)
{
@ -538,7 +538,7 @@ namespace nglib
DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom,
NGLIB_API void Ng_HP_Refinement (Ng_Geometry_2D * geom,
Ng_Mesh * mesh,
int levels, double parameter)
{
@ -553,7 +553,7 @@ namespace nglib
NgArray<Point<3> > readedges; //only before init stlgeometry
// loads geometry from STL file
DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary)
NGLIB_API Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary)
{
int i;
STLGeometry geom;
@ -603,7 +603,7 @@ namespace nglib
// generate new STL Geometry
DLL_HEADER Ng_STL_Geometry * Ng_STL_NewGeometry ()
NGLIB_API Ng_STL_Geometry * Ng_STL_NewGeometry ()
{
return (Ng_STL_Geometry*)(void*)new STLGeometry;
}
@ -612,7 +612,7 @@ namespace nglib
// after adding triangles (and edges) initialize
DLL_HEADER Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom)
NGLIB_API Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom)
{
STLGeometry* geo = (STLGeometry*)geom;
geo->InitSTLGeometry(readtrias);
@ -637,7 +637,7 @@ namespace nglib
// automatically generates edges:
DLL_HEADER Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom,
NGLIB_API Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom,
Ng_Mesh* mesh,
Ng_Meshing_Parameters * mp)
{
@ -683,7 +683,7 @@ namespace nglib
// generates mesh, empty mesh be already created.
DLL_HEADER Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom,
NGLIB_API Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom,
Ng_Mesh* mesh,
Ng_Meshing_Parameters * mp)
{
@ -745,7 +745,7 @@ namespace nglib
// fills STL Geometry
// positive orientation
// normal vector may be null-pointer
DLL_HEADER void Ng_STL_AddTriangle (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_AddTriangle (Ng_STL_Geometry * geom,
double * p1, double * p2, double * p3,
double * nv)
{
@ -764,7 +764,7 @@ namespace nglib
}
// add (optional) edges:
DLL_HEADER void Ng_STL_AddEdge (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_AddEdge (Ng_STL_Geometry * geom,
double * p1, double * p2)
{
readedges.Append(Point3d(p1[0],p1[1],p1[2]));
@ -777,7 +777,7 @@ namespace nglib
#ifdef OCCGEOMETRY
// --------------------- OCC Geometry / Meshing Utility Functions -------------------
// Create new OCC Geometry Object
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_NewGeometry ()
NGLIB_API Ng_OCC_Geometry * Ng_OCC_NewGeometry ()
{
return (Ng_OCC_Geometry*)(void*)new OCCGeometry;
}
@ -786,7 +786,7 @@ namespace nglib
// Delete the OCC Geometry Object
DLL_HEADER Ng_Result Ng_OCC_DeleteGeometry(Ng_OCC_Geometry * geom)
NGLIB_API Ng_Result Ng_OCC_DeleteGeometry(Ng_OCC_Geometry * geom)
{
if (geom != NULL)
{
@ -802,7 +802,7 @@ namespace nglib
// Loads geometry from STEP File
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename)
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename)
{
// Call the STEP File Load function. Note.. the geometry class
// is created and instantiated within the load function
@ -815,7 +815,7 @@ namespace nglib
// Loads geometry from IGES File
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename)
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename)
{
// Call the IGES File Load function. Note.. the geometry class
// is created and instantiated within the load function
@ -828,7 +828,7 @@ namespace nglib
// Loads geometry from BREP File
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename)
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename)
{
// Call the BREP File Load function. Note.. the geometry class
// is created and instantiated within the load function
@ -842,7 +842,7 @@ namespace nglib
// Locally limit the size of the mesh to be generated at various points
// based on the topology of the geometry
DLL_HEADER Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp)
{
@ -870,7 +870,7 @@ namespace nglib
// Mesh the edges and add Face descriptors to prepare for surface meshing
DLL_HEADER Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp)
{
@ -896,7 +896,7 @@ namespace nglib
// Mesh the edges and add Face descriptors to prepare for surface meshing
DLL_HEADER Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp)
{
@ -946,7 +946,7 @@ namespace nglib
// Extract the face map from the OCC geometry
// The face map basically gives an index to each face in the geometry,
// which can be used to access a specific face
DLL_HEADER Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom,
Ng_OCC_TopTools_IndexedMapOfShape * FMap)
{
OCCGeometry* occgeom = (OCCGeometry*)geom;
@ -973,7 +973,7 @@ namespace nglib
// ------------------ Begin - Meshing Parameters related functions ------------------
// Constructor for the local nglib meshing parameters class
DLL_HEADER Ng_Meshing_Parameters :: Ng_Meshing_Parameters()
NGLIB_API Ng_Meshing_Parameters :: Ng_Meshing_Parameters()
{
uselocalh = 1;
@ -1014,7 +1014,7 @@ namespace nglib
// Reset the local meshing parameters to the default values
DLL_HEADER void Ng_Meshing_Parameters :: Reset_Parameters()
NGLIB_API void Ng_Meshing_Parameters :: Reset_Parameters()
{
uselocalh = 1;
@ -1055,7 +1055,7 @@ namespace nglib
//
DLL_HEADER void Ng_Meshing_Parameters :: Transfer_Parameters()
NGLIB_API void Ng_Meshing_Parameters :: Transfer_Parameters()
{
mparam.uselocalh = uselocalh;
@ -1088,7 +1088,7 @@ namespace nglib
// ------------------ Begin - Second Order Mesh generation functions ----------------
DLL_HEADER void Ng_Generate_SecondOrder(Ng_Mesh * mesh)
NGLIB_API void Ng_Generate_SecondOrder(Ng_Mesh * mesh)
{
Refinement ref(*((Mesh*) mesh)->GetGeometry());
ref.MakeSecondOrder(*(Mesh*) mesh);
@ -1097,7 +1097,7 @@ namespace nglib
DLL_HEADER void Ng_2D_Generate_SecondOrder(Ng_Geometry_2D * geom,
NGLIB_API void Ng_2D_Generate_SecondOrder(Ng_Geometry_2D * geom,
Ng_Mesh * mesh)
{
( (SplineGeometry2d*)geom ) -> GetRefinement().MakeSecondOrder( * (Mesh*) mesh );
@ -1106,7 +1106,7 @@ namespace nglib
DLL_HEADER void Ng_STL_Generate_SecondOrder(Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_Generate_SecondOrder(Ng_STL_Geometry * geom,
Ng_Mesh * mesh)
{
((STLGeometry*)geom)->GetRefinement().MakeSecondOrder(*(Mesh*) mesh);
@ -1115,7 +1115,7 @@ namespace nglib
DLL_HEADER void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom,
NGLIB_API void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom,
Ng_Mesh * mesh)
{
((CSGeometry*)geom)->GetRefinement().MakeSecondOrder(*(Mesh*) mesh);
@ -1125,7 +1125,7 @@ namespace nglib
#ifdef OCCGEOMETRY
DLL_HEADER void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom,
NGLIB_API void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh)
{
((OCCGeometry*)geom )->GetRefinement().MakeSecondOrder(*(Mesh*) mesh);
@ -1137,7 +1137,7 @@ namespace nglib
// ------------------ Begin - Uniform Mesh Refinement functions ---------------------
DLL_HEADER void Ng_Uniform_Refinement (Ng_Mesh * mesh)
NGLIB_API void Ng_Uniform_Refinement (Ng_Mesh * mesh)
{
Refinement ref(*((Mesh*)mesh)->GetGeometry());
ref.Refine ( * (Mesh*) mesh );
@ -1146,7 +1146,7 @@ namespace nglib
DLL_HEADER void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom,
NGLIB_API void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom,
Ng_Mesh * mesh)
{
( (SplineGeometry2d*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh );
@ -1155,7 +1155,7 @@ namespace nglib
DLL_HEADER void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom,
Ng_Mesh * mesh)
{
( (STLGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh );
@ -1164,7 +1164,7 @@ namespace nglib
DLL_HEADER void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom,
NGLIB_API void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom,
Ng_Mesh * mesh)
{
( (CSGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh );
@ -1174,7 +1174,7 @@ namespace nglib
#ifdef OCCGEOMETRY
DLL_HEADER void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom,
NGLIB_API void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh)
{
( (OCCGeometry*)geom ) -> GetRefinement().Refine ( * (Mesh*) mesh );
@ -1191,7 +1191,7 @@ namespace netgen
{
char geomfilename[255];
DLL_HEADER void MyError2 (const char * ch)
NGLIB_API void MyError2 (const char * ch)
{
cerr << ch;
}
@ -1200,7 +1200,7 @@ namespace netgen
//Destination for messages, errors, ...
DLL_HEADER void Ng_PrintDest2(const char * s)
NGLIB_API void Ng_PrintDest2(const char * s)
{
#ifdef PARALLEL
int id = 0;
@ -1212,7 +1212,7 @@ namespace netgen
/*
DLL_HEADER double GetTime ()
NGLIB_API double GetTime ()
{
return 0;
}

View File

@ -23,15 +23,15 @@
// Philippose - 14.02.2009
// Modifications for creating a DLL in Windows
#ifndef DLL_HEADER
#ifndef NGLIB_API
#ifdef WIN32
#ifdef NGLIB_EXPORTS || nglib_EXPORTS
#define DLL_HEADER __declspec(dllexport)
#define NGLIB_API __declspec(dllexport)
#else
#define DLL_HEADER __declspec(dllimport)
#define NGLIB_API __declspec(dllimport)
#endif
#else
#define DLL_HEADER __attribute__((visibility("default")))
#define NGLIB_API __attribute__((visibility("default")))
#endif
#endif
@ -156,7 +156,7 @@ public:
- #check_overlap: 1
- #check_overlapping_boundary: 1
*/
DLL_HEADER Ng_Meshing_Parameters();
NGLIB_API Ng_Meshing_Parameters();
@ -166,7 +166,7 @@ public:
This member function resets all the meshing parameters
of the object to the default values
*/
DLL_HEADER void Reset_Parameters();
NGLIB_API void Reset_Parameters();
@ -177,7 +177,7 @@ public:
defined in the local meshing parameters structure of nglib into
the internal meshing parameters structure used by the Netgen core
*/
DLL_HEADER void Transfer_Parameters();
NGLIB_API void Transfer_Parameters();
};
@ -194,7 +194,7 @@ public:
program before beginning to use the other Netgen
specific functions.
*/
DLL_HEADER void Ng_Init ();
NGLIB_API void Ng_Init ();
/*! \brief Exit the Netgen meshing kernel in a clean manner
@ -202,7 +202,7 @@ DLL_HEADER void Ng_Init ();
Use this function to exit the meshing sub-system in
a clean and orderly manner.
*/
DLL_HEADER void Ng_Exit ();
NGLIB_API void Ng_Exit ();
/*! \brief Create a new (and empty) Netgen Mesh Structure
@ -215,7 +215,7 @@ DLL_HEADER void Ng_Exit ();
\return Ng_Mesh Pointer to a Netgen Mesh type #Ng_Mesh
*/
DLL_HEADER Ng_Mesh * Ng_NewMesh ();
NGLIB_API Ng_Mesh * Ng_NewMesh ();
/*! \brief Delete an existing Netgen Mesh Structure
@ -226,7 +226,7 @@ DLL_HEADER Ng_Mesh * Ng_NewMesh ();
\param mesh Pointer to an existing Netgen Mesh structure
of type #Ng_Mesh
*/
DLL_HEADER void Ng_DeleteMesh (Ng_Mesh * mesh);
NGLIB_API void Ng_DeleteMesh (Ng_Mesh * mesh);
/*! \brief Save a Netgen Mesh to disk
@ -243,7 +243,7 @@ DLL_HEADER void Ng_DeleteMesh (Ng_Mesh * mesh);
name of the file to which the mesh should
be saved
*/
DLL_HEADER void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename);
NGLIB_API void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename);
/*! \brief Load a Netgen VOL Mesh from disk into memory
@ -256,7 +256,7 @@ DLL_HEADER void Ng_SaveMesh(Ng_Mesh * mesh, const char* filename);
\return Ng_Mesh Pointer to a Netgen Mesh type #Ng_Mesh containing
the mesh loaded from disk
*/
DLL_HEADER Ng_Mesh * Ng_LoadMesh(const char* filename);
NGLIB_API Ng_Mesh * Ng_LoadMesh(const char* filename);
/*! \brief Merge a Netgen VOL Mesh from disk into an existing mesh in memory
@ -269,7 +269,7 @@ DLL_HEADER Ng_Mesh * Ng_LoadMesh(const char* filename);
name of the file to load
\return Ng_Result Status of the merge operation
*/
DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh, const char* filename);
NGLIB_API Ng_Result Ng_MergeMesh(Ng_Mesh * mesh, const char* filename);
/*! \brief Merge one Netgen Mesh into another Netgen Mesh in the case
@ -286,7 +286,7 @@ DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh, const char* filename);
the parent mesh
\return Ng_Result Status of the merge operation
*/
DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh1, Ng_Mesh * mesh2);
NGLIB_API Ng_Result Ng_MergeMesh(Ng_Mesh * mesh1, Ng_Mesh * mesh2);
// ------------------------------------------------------------------
@ -310,7 +310,7 @@ DLL_HEADER Ng_Result Ng_MergeMesh(Ng_Mesh * mesh1, Ng_Mesh * mesh2);
- x[1] = Y co-ordinate
- x[2] = Z co-ordinate
*/
DLL_HEADER void Ng_AddPoint (Ng_Mesh * mesh, double * x);
NGLIB_API void Ng_AddPoint (Ng_Mesh * mesh, double * x);
/*! \brief Add a surface element to a given Netgen Mesh Structure
@ -333,7 +333,7 @@ DLL_HEADER void Ng_AddPoint (Ng_Mesh * mesh, double * x);
\param pi Pointer to an array of integers containing the indices of the
points which constitute the surface element being added
*/
DLL_HEADER void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et, int * pi);
NGLIB_API void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et, int * pi);
/*! \brief Add a volume element to a given Netgen Mesh Structure
@ -357,7 +357,7 @@ DLL_HEADER void Ng_AddSurfaceElement (Ng_Mesh * mesh, Ng_Surface_Element_Type et
points which constitute the volume element being added
*/
DLL_HEADER void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et, int * pi);
NGLIB_API void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et, int * pi);
// ------------------------------------------------------------------
@ -384,7 +384,7 @@ DLL_HEADER void Ng_AddVolumeElement (Ng_Mesh * mesh, Ng_Volume_Element_Type et,
\param h Variable of type <i>double</i>, specifying the maximum
allowable mesh size
*/
DLL_HEADER void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h);
NGLIB_API void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h);
/*! \brief Locally restrict the mesh element size at the given point
@ -408,7 +408,7 @@ DLL_HEADER void Ng_RestrictMeshSizeGlobal (Ng_Mesh * mesh, double h);
\param h Variable of type <i>double</i>, specifying the maximum
allowable mesh size at that point
*/
DLL_HEADER void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h);
NGLIB_API void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h);
/*! \brief Locally restrict the mesh element size within a specified box
@ -439,7 +439,7 @@ DLL_HEADER void Ng_RestrictMeshSizePoint (Ng_Mesh * mesh, double * p, double h);
\param h Variable of type <i>double</i>, specifying the maximum
allowable mesh size at that point
*/
DLL_HEADER void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h);
NGLIB_API void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double * pmax, double h);
// ------------------------------------------------------------------
@ -470,7 +470,7 @@ DLL_HEADER void Ng_RestrictMeshSizeBox (Ng_Mesh * mesh, double * pmin, double *
details regarding the return value can be
found in the description of #Ng_Result
*/
DLL_HEADER Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp);
NGLIB_API Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameters * mp);
// ------------------------------------------------------------------
@ -489,7 +489,7 @@ DLL_HEADER Ng_Result Ng_GenerateVolumeMesh (Ng_Mesh * mesh, Ng_Meshing_Parameter
\return
Integer Data-type with the number of points in the Mesh
*/
DLL_HEADER int Ng_GetNP (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNP (Ng_Mesh * mesh);
/*! \brief Returns the Number of Surface Elements present in the specified Mesh
@ -503,7 +503,7 @@ DLL_HEADER int Ng_GetNP (Ng_Mesh * mesh);
\return
Integer Data-type with the number of surface elements in the Mesh
*/
DLL_HEADER int Ng_GetNSE (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNSE (Ng_Mesh * mesh);
/*! \brief Returns the Number of Volume Elements present in the specified Mesh
@ -517,7 +517,7 @@ DLL_HEADER int Ng_GetNSE (Ng_Mesh * mesh);
\return
Integer Data-type with the number of volume elements in the Mesh
*/
DLL_HEADER int Ng_GetNE (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNE (Ng_Mesh * mesh);
// ------------------------------------------------------------------
@ -531,15 +531,15 @@ DLL_HEADER int Ng_GetNE (Ng_Mesh * mesh);
// Return the Point Coordinates of a specified Point
// The x, y and z co-ordinates are returned in the array pointer as
// x[0] = x ; x[1] = y ; x[2] = z
DLL_HEADER void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x);
NGLIB_API void Ng_GetPoint (Ng_Mesh * mesh, int num, double * x);
// return surface and volume element in pi
DLL_HEADER Ng_Surface_Element_Type
NGLIB_API Ng_Surface_Element_Type
Ng_GetSurfaceElement (Ng_Mesh * mesh, int num, int * pi);
DLL_HEADER Ng_Volume_Element_Type
NGLIB_API Ng_Volume_Element_Type
Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi);
// ------------------------------------------------------------------
@ -554,34 +554,34 @@ Ng_GetVolumeElement (Ng_Mesh * mesh, int num, int * pi);
// feeds points and boundary to mesh
DLL_HEADER void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x);
DLL_HEADER void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2);
NGLIB_API void Ng_AddPoint_2D (Ng_Mesh * mesh, double * x);
NGLIB_API void Ng_AddBoundarySeg_2D (Ng_Mesh * mesh, int pi1, int pi2);
// ask for number of points, elements and boundary segments
DLL_HEADER int Ng_GetNP_2D (Ng_Mesh * mesh);
DLL_HEADER int Ng_GetNE_2D (Ng_Mesh * mesh);
DLL_HEADER int Ng_GetNSeg_2D (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNP_2D (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNE_2D (Ng_Mesh * mesh);
NGLIB_API int Ng_GetNSeg_2D (Ng_Mesh * mesh);
// return point coordinates
DLL_HEADER void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x);
NGLIB_API void Ng_GetPoint_2D (Ng_Mesh * mesh, int num, double * x);
// return 2d elements
DLL_HEADER Ng_Surface_Element_Type
NGLIB_API Ng_Surface_Element_Type
Ng_GetElement_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum = NULL);
// return 2d boundary segment
DLL_HEADER void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum = NULL);
NGLIB_API void Ng_GetSegment_2D (Ng_Mesh * mesh, int num, int * pi, int * matnum = NULL);
// load 2d netgen spline geometry
DLL_HEADER Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename);
NGLIB_API Ng_Geometry_2D * Ng_LoadGeometry_2D (const char * filename);
// generate 2d mesh, mesh is allocated by function
DLL_HEADER Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom,
NGLIB_API Ng_Result Ng_GenerateMesh_2D (Ng_Geometry_2D * geom,
Ng_Mesh ** mesh,
Ng_Meshing_Parameters * mp);
DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom,
NGLIB_API void Ng_HP_Refinement (Ng_Geometry_2D * geom,
Ng_Mesh * mesh,
int levels);
@ -595,35 +595,35 @@ DLL_HEADER void Ng_HP_Refinement (Ng_Geometry_2D * geom,
// loads geometry from STL file
DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary = 0);
NGLIB_API Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary = 0);
// generate new STL Geometry
DLL_HEADER Ng_STL_Geometry * Ng_STL_NewGeometry ();
NGLIB_API Ng_STL_Geometry * Ng_STL_NewGeometry ();
// fills STL Geometry
// positive orientation
// normal vector may be null-pointer
DLL_HEADER void Ng_STL_AddTriangle (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_AddTriangle (Ng_STL_Geometry * geom,
double * p1, double * p2, double * p3,
double * nv = NULL);
// add (optional) edges :
DLL_HEADER void Ng_STL_AddEdge (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_AddEdge (Ng_STL_Geometry * geom,
double * p1, double * p2);
// after adding triangles (and edges) initialize
DLL_HEADER Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom);
NGLIB_API Ng_Result Ng_STL_InitSTLGeometry (Ng_STL_Geometry * geom);
// automatically generates edges:
DLL_HEADER Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom,
NGLIB_API Ng_Result Ng_STL_MakeEdges (Ng_STL_Geometry * geom,
Ng_Mesh* mesh,
Ng_Meshing_Parameters * mp);
// generates mesh, empty mesh must be already created.
DLL_HEADER Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom,
NGLIB_API Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp);
@ -638,10 +638,10 @@ DLL_HEADER Ng_Result Ng_STL_GenerateSurfaceMesh (Ng_STL_Geometry * geom,
typedef void * Ng_ACIS_Geometry;
// loads geometry from STL file
DLL_HEADER Ng_ACIS_Geometry * Ng_ACIS_LoadGeometry (const char * filename);
NGLIB_API Ng_ACIS_Geometry * Ng_ACIS_LoadGeometry (const char * filename);
// generates mesh, empty mesh must be already created.
DLL_HEADER Ng_Result Ng_ACIS_GenerateSurfaceMesh (Ng_ACIS_Geometry * geom,
NGLIB_API Ng_Result Ng_ACIS_GenerateSurfaceMesh (Ng_ACIS_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp);
@ -657,37 +657,37 @@ DLL_HEADER Ng_Result Ng_ACIS_GenerateSurfaceMesh (Ng_ACIS_Geometry * geom,
// **********************************************************
// Create new OCC Geometry Object
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_NewGeometry ();
NGLIB_API Ng_OCC_Geometry * Ng_OCC_NewGeometry ();
// Delete an OCC Geometry Object
DLL_HEADER Ng_Result Ng_OCC_DeleteGeometry (Ng_OCC_Geometry * geom);
NGLIB_API Ng_Result Ng_OCC_DeleteGeometry (Ng_OCC_Geometry * geom);
// Loads geometry from STEP file
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename);
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_STEP (const char * filename);
// Loads geometry from IGES file
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename);
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_IGES (const char * filename);
// Loads geometry from BREP file
DLL_HEADER Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename);
NGLIB_API Ng_OCC_Geometry * Ng_OCC_Load_BREP (const char * filename);
// Set the local mesh size based on geometry / topology
DLL_HEADER Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_SetLocalMeshSize (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp);
// Mesh the edges and add Face descriptors to prepare for surface meshing
DLL_HEADER Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GenerateEdgeMesh (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp);
// Mesh the surfaces of an OCC geometry
DLL_HEADER Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GenerateSurfaceMesh (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh,
Ng_Meshing_Parameters * mp);
// Get the face map of an already loaded OCC geometry
DLL_HEADER Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom,
NGLIB_API Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom,
Ng_OCC_TopTools_IndexedMapOfShape * FMap);
#endif // OCCGEOMETRY
@ -699,22 +699,22 @@ DLL_HEADER Ng_Result Ng_OCC_GetFMap(Ng_OCC_Geometry * geom,
// **********************************************************
// uniform mesh refinement
DLL_HEADER void Ng_Uniform_Refinement (Ng_Mesh * mesh);
NGLIB_API void Ng_Uniform_Refinement (Ng_Mesh * mesh);
// uniform mesh refinement with geometry adaption:
DLL_HEADER void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom,
NGLIB_API void Ng_2D_Uniform_Refinement (Ng_Geometry_2D * geom,
Ng_Mesh * mesh);
DLL_HEADER void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_Uniform_Refinement (Ng_STL_Geometry * geom,
Ng_Mesh * mesh);
DLL_HEADER void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom,
NGLIB_API void Ng_CSG_Uniform_Refinement (Ng_CSG_Geometry * geom,
Ng_Mesh * mesh);
#ifdef OCCGEOMETRY
DLL_HEADER void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom,
NGLIB_API void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh);
#endif
@ -725,22 +725,22 @@ DLL_HEADER void Ng_OCC_Uniform_Refinement (Ng_OCC_Geometry * geom,
// **********************************************************
// convert mesh to second order
DLL_HEADER void Ng_Generate_SecondOrder (Ng_Mesh * mesh);
NGLIB_API void Ng_Generate_SecondOrder (Ng_Mesh * mesh);
// convert mesh to second order with geometry adaption:
DLL_HEADER void Ng_2D_Generate_SecondOrder (Ng_Geometry_2D * geom,
NGLIB_API void Ng_2D_Generate_SecondOrder (Ng_Geometry_2D * geom,
Ng_Mesh * mesh);
DLL_HEADER void Ng_STL_Generate_SecondOrder (Ng_STL_Geometry * geom,
NGLIB_API void Ng_STL_Generate_SecondOrder (Ng_STL_Geometry * geom,
Ng_Mesh * mesh);
DLL_HEADER void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom,
NGLIB_API void Ng_CSG_Generate_SecondOrder (Ng_CSG_Geometry * geom,
Ng_Mesh * mesh);
#ifdef OCCGEOMETRY
DLL_HEADER void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom,
NGLIB_API void Ng_OCC_Generate_SecondOrder (Ng_OCC_Geometry * geom,
Ng_Mesh * mesh);
#endif

View File

@ -27,7 +27,7 @@ void Parallel_Exit();
namespace netgen {
extern AutoPtr<Mesh> mesh;
// extern VisualSceneMesh vsmesh;
extern DLL_HEADER MeshingParameters mparam;
extern NGLIB_API MeshingParameters mparam;
}
using namespace netgen;