diff --git a/libsrc/meshing/global.hpp b/libsrc/meshing/global.hpp index 776fd93a..e6cb59de 100644 --- a/libsrc/meshing/global.hpp +++ b/libsrc/meshing/global.hpp @@ -31,7 +31,7 @@ namespace netgen DLL_HEADER extern mutex tcl_todo_mutex; - class multithreadt + class DLL_HEADER multithreadt { public: int pause; diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 4ca5b648..70cf0c02 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -334,7 +334,7 @@ namespace netgen const auto & LockedPoints() const { return lockedpoints; } /// Returns number of domains - int GetNDomains() const; + DLL_HEADER int GetNDomains() const; /// int GetDimension() const { return dimension; } void SetDimension (int dim) { dimension = dim; } @@ -416,7 +416,7 @@ namespace netgen /// DLL_HEADER void SetMaxHDomain (const Array & mhd); /// - double GetH (const Point3d & p) const; + DLL_HEADER double GetH (const Point3d & p) const; /// double GetMinH (const Point3d & pmin, const Point3d & pmax); /// diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 04be6d0c..f3446192 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -698,7 +698,7 @@ namespace netgen /// Calculates Volume of elemenet double Volume (const T_POINTS & points) const; /// - void Print (ostream & ost) const; + DLL_HEADER void Print (ostream & ost) const; /// int GetNFaces () const { @@ -1388,7 +1388,7 @@ namespace netgen /// remove secondorder void SetMaxPointNr (int maxpnum); - void Print (ostream & ost) const; + DLL_HEADER void Print (ostream & ost) const; }; diff --git a/libsrc/occ/Partition_Inter2d.hxx b/libsrc/occ/Partition_Inter2d.hxx index cfd4a9ac..c018bacb 100644 --- a/libsrc/occ/Partition_Inter2d.hxx +++ b/libsrc/occ/Partition_Inter2d.hxx @@ -27,9 +27,19 @@ #ifndef _Partition_Inter2d_HeaderFile #define _Partition_Inter2d_HeaderFile -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile -#include +#ifndef _Standard_Version_HeaderFile + #include #endif + +#if OCC_VERSION_HEX < 0x070000 + #ifndef _Handle_BRepAlgo_AsDes_HeaderFile + #include + #endif +#else + #include + #include +#endif + #ifndef _Standard_Real_HeaderFile #include #endif @@ -38,9 +48,13 @@ #endif class BRepAlgo_AsDes; class TopoDS_Face; -class TopTools_MapOfShape; + +#if OCC_VERSION_HEX < 0x070000 + class TopTools_MapOfShape; + class TopTools_ListOfShape; +#endif + class TopoDS_Vertex; -class TopTools_ListOfShape; class TopoDS_Edge; diff --git a/libsrc/occ/Partition_Inter3d.hxx b/libsrc/occ/Partition_Inter3d.hxx index d8be2c59..93af0773 100644 --- a/libsrc/occ/Partition_Inter3d.hxx +++ b/libsrc/occ/Partition_Inter3d.hxx @@ -27,8 +27,17 @@ #ifndef _Partition_Inter3d_HeaderFile #define _Partition_Inter3d_HeaderFile -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile -#include +#ifndef _Standard_Version_HeaderFile +#include +#endif + +#if OCC_VERSION_HEX < 0x070000 + #ifndef _Handle_BRepAlgo_AsDes_HeaderFile + #include + #endif +#else + #include + #include #endif #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #include @@ -42,11 +51,15 @@ #ifndef _Standard_Boolean_HeaderFile #include #endif + +#if OCC_VERSION_HEX < 0x070000 + class TopTools_ListOfShape; + class TopTools_DataMapOfShapeShape; + class TopTools_MapOfShape; +#endif + class BRepAlgo_AsDes; -class TopTools_ListOfShape; -class TopTools_DataMapOfShapeShape; class TopoDS_Face; -class TopTools_MapOfShape; class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; diff --git a/libsrc/occ/Partition_Loop.hxx b/libsrc/occ/Partition_Loop.hxx index 56e05e26..94cdfa38 100644 --- a/libsrc/occ/Partition_Loop.hxx +++ b/libsrc/occ/Partition_Loop.hxx @@ -36,9 +36,14 @@ #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #include #endif +#ifndef _Standard_Version_HeaderFile +#include +#endif class TopoDS_Face; class TopoDS_Edge; -class TopTools_ListOfShape; +#if OCC_VERSION_HEX < 0x070000 + class TopTools_ListOfShape; +#endif #ifndef _Standard_HeaderFile diff --git a/libsrc/occ/Partition_Loop2d.cxx b/libsrc/occ/Partition_Loop2d.cxx index 81e484c9..1baf1528 100644 --- a/libsrc/occ/Partition_Loop2d.cxx +++ b/libsrc/occ/Partition_Loop2d.cxx @@ -52,6 +52,8 @@ #include #include +#define PI 3.14159265358979323846 + //======================================================================= //function : Partition_Loop2d //purpose : diff --git a/libsrc/occ/Partition_Loop2d.hxx b/libsrc/occ/Partition_Loop2d.hxx index bdf1c253..d68c6c37 100644 --- a/libsrc/occ/Partition_Loop2d.hxx +++ b/libsrc/occ/Partition_Loop2d.hxx @@ -22,9 +22,16 @@ #ifndef _TopTools_MapOfShape_HeaderFile #include #endif +#ifndef _Standard_Version_HeaderFile +#include +#endif + + class TopoDS_Face; class TopoDS_Edge; -class TopTools_ListOfShape; +#if OCC_VERSION_HEX < 0x070000 + class TopTools_ListOfShape; +#endif class BRepAlgo_Image; diff --git a/libsrc/occ/Partition_Loop3d.hxx b/libsrc/occ/Partition_Loop3d.hxx index 52abd115..e1716691 100644 --- a/libsrc/occ/Partition_Loop3d.hxx +++ b/libsrc/occ/Partition_Loop3d.hxx @@ -22,9 +22,24 @@ #ifndef _Standard_Real_HeaderFile #include #endif +#ifndef _Standard_Version_HeaderFile +#include +#endif + +#if OCC_VERSION_HEX < 0x070000 +#else + #include + #include + #include +#endif + class TopoDS_Shape; -class TopTools_ListOfShape; -class TopTools_MapOfOrientedShape; + +#if OCC_VERSION_HEX < 0x070000 + class TopTools_ListOfShape; + class TopTools_MapOfOrientedShape; +#endif + class TopoDS_Edge; class TopoDS_Face; class gp_Vec; diff --git a/libsrc/occ/Partition_Spliter.hxx b/libsrc/occ/Partition_Spliter.hxx index f29917a3..e75e9893 100644 --- a/libsrc/occ/Partition_Spliter.hxx +++ b/libsrc/occ/Partition_Spliter.hxx @@ -10,6 +10,10 @@ #ifndef _Partition_Spliter_HeaderFile #define _Partition_Spliter_HeaderFile +#ifndef _Standard_Version_HeaderFile +#include +#endif + #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif @@ -28,9 +32,16 @@ #ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include #endif -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile -#include + +#if OCC_VERSION_HEX < 0x070000 + #ifndef _Handle_BRepAlgo_AsDes_HeaderFile + #include + #endif +#else + #include + #include #endif + #ifndef _BRepAlgo_Image_HeaderFile #include #endif @@ -45,7 +56,10 @@ #endif class BRepAlgo_AsDes; class TopoDS_Shape; -class TopTools_ListOfShape; + +#if OCC_VERSION_HEX < 0x070000 + class TopTools_ListOfShape; +#endif class TopoDS_Edge; diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index f0ca2501..1530a31e 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -18,7 +18,7 @@ namespace netgen #define VSMALL 1e-10 - bool merge_solids = 1; + DLL_HEADER bool merge_solids = 1; // can you please explain what you intend to compute here (JS) !!! diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index 1a6b8a46..3ffaf376 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -8,14 +8,24 @@ #include "ShapeAnalysis_CheckSmallFace.hxx" #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" #include "ShapeAnalysis_Surface.hxx" -#include "BRepAlgoAPI_Fuse.hxx" + #include "BRepCheck_Analyzer.hxx" #include "BRepLib.hxx" #include "ShapeBuild_ReShape.hxx" #include "ShapeFix.hxx" #include "ShapeFix_FixSmallFace.hxx" #include "Partition_Spliter.hxx" +#include "BRepAlgoAPI_Fuse.hxx" +#ifndef _Standard_Version_HeaderFile +#include +#endif + +#if OCC_VERSION_HEX < 0x070000 +#else + #include "StlTransfer.hxx" + #include "TopoDS_Iterator.hxx" +#endif namespace netgen { @@ -938,7 +948,11 @@ namespace netgen void OCCGeometry :: CalcBoundingBox () { Bnd_Box bb; +#if OCC_VERSION_HEX < 0x070000 BRepBndLib::Add (shape, bb); +#else + BRepBndLib::Add ((const TopoDS_Shape) shape, bb,(Standard_Boolean)true); +#endif double x1,y1,z1,x2,y2,z2; bb.Get (x1,y1,z1,x2,y2,z2); diff --git a/libsrc/occ/occgeom.hpp b/libsrc/occ/occgeom.hpp index ca74b5b0..d77c8b85 100644 --- a/libsrc/occ/occgeom.hpp +++ b/libsrc/occ/occgeom.hpp @@ -394,7 +394,7 @@ namespace netgen - class OCCParameters + class DLL_HEADER OCCParameters { public: @@ -443,11 +443,11 @@ namespace netgen extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr & mesh, MeshingParameters & mparam); - extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh); + DLL_HEADER extern void OCCSetLocalMeshSize(OCCGeometry & geom, Mesh & mesh); - extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend); + DLL_HEADER extern void OCCMeshSurface (OCCGeometry & geom, Mesh & mesh, int perfstepsend); - extern void OCCFindEdges (OCCGeometry & geom, Mesh & mesh); + DLL_HEADER extern void OCCFindEdges (OCCGeometry & geom, Mesh & mesh); } #endif