Apply patches for OpenCasCade 7 by Lorenz Lechner

see b443cbdb13/patches
This commit is contained in:
Matthias Hochsteger 2017-01-31 19:21:25 +01:00
parent b94c409435
commit fa9d918963
13 changed files with 111 additions and 27 deletions

View File

@ -31,7 +31,7 @@ namespace netgen
DLL_HEADER extern mutex tcl_todo_mutex; DLL_HEADER extern mutex tcl_todo_mutex;
class multithreadt class DLL_HEADER multithreadt
{ {
public: public:
int pause; int pause;

View File

@ -334,7 +334,7 @@ namespace netgen
const auto & LockedPoints() const { return lockedpoints; } const auto & LockedPoints() const { return lockedpoints; }
/// Returns number of domains /// Returns number of domains
int GetNDomains() const; DLL_HEADER int GetNDomains() const;
/// ///
int GetDimension() const { return dimension; } int GetDimension() const { return dimension; }
void SetDimension (int dim) { dimension = dim; } void SetDimension (int dim) { dimension = dim; }
@ -416,7 +416,7 @@ namespace netgen
/// ///
DLL_HEADER void SetMaxHDomain (const Array<double> & mhd); DLL_HEADER void SetMaxHDomain (const Array<double> & mhd);
/// ///
double GetH (const Point3d & p) const; DLL_HEADER double GetH (const Point3d & p) const;
/// ///
double GetMinH (const Point3d & pmin, const Point3d & pmax); double GetMinH (const Point3d & pmin, const Point3d & pmax);
/// ///

View File

@ -698,7 +698,7 @@ namespace netgen
/// Calculates Volume of elemenet /// Calculates Volume of elemenet
double Volume (const T_POINTS & points) const; double Volume (const T_POINTS & points) const;
/// ///
void Print (ostream & ost) const; DLL_HEADER void Print (ostream & ost) const;
/// ///
int GetNFaces () const int GetNFaces () const
{ {
@ -1388,7 +1388,7 @@ namespace netgen
/// remove secondorder /// remove secondorder
void SetMaxPointNr (int maxpnum); void SetMaxPointNr (int maxpnum);
void Print (ostream & ost) const; DLL_HEADER void Print (ostream & ost) const;
}; };

View File

@ -27,9 +27,19 @@
#ifndef _Partition_Inter2d_HeaderFile #ifndef _Partition_Inter2d_HeaderFile
#define _Partition_Inter2d_HeaderFile #define _Partition_Inter2d_HeaderFile
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile #ifndef _Standard_Version_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx> #include <Standard_Version.hxx>
#endif #endif
#if OCC_VERSION_HEX < 0x070000
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#endif
#else
#include <BRepAlgo_AsDes.hxx>
#include <TopTools_MapOfShape.hxx>
#endif
#ifndef _Standard_Real_HeaderFile #ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#endif #endif
@ -38,9 +48,13 @@
#endif #endif
class BRepAlgo_AsDes; class BRepAlgo_AsDes;
class TopoDS_Face; class TopoDS_Face;
class TopTools_MapOfShape;
#if OCC_VERSION_HEX < 0x070000
class TopTools_MapOfShape;
class TopTools_ListOfShape;
#endif
class TopoDS_Vertex; class TopoDS_Vertex;
class TopTools_ListOfShape;
class TopoDS_Edge; class TopoDS_Edge;

View File

@ -27,8 +27,17 @@
#ifndef _Partition_Inter3d_HeaderFile #ifndef _Partition_Inter3d_HeaderFile
#define _Partition_Inter3d_HeaderFile #define _Partition_Inter3d_HeaderFile
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile #ifndef _Standard_Version_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx> #include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX < 0x070000
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#endif
#else
#include <BRepAlgo_AsDes.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#endif #endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx> #include <TopTools_DataMapOfShapeListOfShape.hxx>
@ -42,11 +51,15 @@
#ifndef _Standard_Boolean_HeaderFile #ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#endif #endif
#if OCC_VERSION_HEX < 0x070000
class TopTools_ListOfShape;
class TopTools_DataMapOfShapeShape;
class TopTools_MapOfShape;
#endif
class BRepAlgo_AsDes; class BRepAlgo_AsDes;
class TopTools_ListOfShape;
class TopTools_DataMapOfShapeShape;
class TopoDS_Face; class TopoDS_Face;
class TopTools_MapOfShape;
class TopoDS_Shape; class TopoDS_Shape;
class TopoDS_Vertex; class TopoDS_Vertex;
class TopoDS_Edge; class TopoDS_Edge;

View File

@ -36,9 +36,14 @@
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx> #include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif #endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
class TopoDS_Face; class TopoDS_Face;
class TopoDS_Edge; class TopoDS_Edge;
class TopTools_ListOfShape; #if OCC_VERSION_HEX < 0x070000
class TopTools_ListOfShape;
#endif
#ifndef _Standard_HeaderFile #ifndef _Standard_HeaderFile

View File

@ -52,6 +52,8 @@
#include <gp_Pnt.hxx> #include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx> #include <gp_Pnt2d.hxx>
#define PI 3.14159265358979323846
//======================================================================= //=======================================================================
//function : Partition_Loop2d //function : Partition_Loop2d
//purpose : //purpose :

View File

@ -22,9 +22,16 @@
#ifndef _TopTools_MapOfShape_HeaderFile #ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
#endif #endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
class TopoDS_Face; class TopoDS_Face;
class TopoDS_Edge; class TopoDS_Edge;
class TopTools_ListOfShape; #if OCC_VERSION_HEX < 0x070000
class TopTools_ListOfShape;
#endif
class BRepAlgo_Image; class BRepAlgo_Image;

View File

@ -22,9 +22,24 @@
#ifndef _Standard_Real_HeaderFile #ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#endif #endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX < 0x070000
#else
#include <TopTools_ShapeMapHasher.hxx>
#include <TopTools_OrientedShapeMapHasher.hxx>
#include <TopTools_MapOfOrientedShape.hxx>
#endif
class TopoDS_Shape; 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_Edge;
class TopoDS_Face; class TopoDS_Face;
class gp_Vec; class gp_Vec;

View File

@ -10,6 +10,10 @@
#ifndef _Partition_Spliter_HeaderFile #ifndef _Partition_Spliter_HeaderFile
#define _Partition_Spliter_HeaderFile #define _Partition_Spliter_HeaderFile
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile #ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx> #include <TopAbs_ShapeEnum.hxx>
#endif #endif
@ -28,9 +32,16 @@
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx> #include <TopTools_DataMapOfShapeShape.hxx>
#endif #endif
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx> #if OCC_VERSION_HEX < 0x070000
#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
#include <Handle_BRepAlgo_AsDes.hxx>
#endif
#else
#include <BRepAlgo_AsDes.hxx>
#include <TopTools_MapOfShape.hxx>
#endif #endif
#ifndef _BRepAlgo_Image_HeaderFile #ifndef _BRepAlgo_Image_HeaderFile
#include <BRepAlgo_Image.hxx> #include <BRepAlgo_Image.hxx>
#endif #endif
@ -45,7 +56,10 @@
#endif #endif
class BRepAlgo_AsDes; class BRepAlgo_AsDes;
class TopoDS_Shape; class TopoDS_Shape;
class TopTools_ListOfShape;
#if OCC_VERSION_HEX < 0x070000
class TopTools_ListOfShape;
#endif
class TopoDS_Edge; class TopoDS_Edge;

View File

@ -18,7 +18,7 @@ namespace netgen
#define VSMALL 1e-10 #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) !!! // can you please explain what you intend to compute here (JS) !!!

View File

@ -8,14 +8,24 @@
#include "ShapeAnalysis_CheckSmallFace.hxx" #include "ShapeAnalysis_CheckSmallFace.hxx"
#include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
#include "ShapeAnalysis_Surface.hxx" #include "ShapeAnalysis_Surface.hxx"
#include "BRepAlgoAPI_Fuse.hxx"
#include "BRepCheck_Analyzer.hxx" #include "BRepCheck_Analyzer.hxx"
#include "BRepLib.hxx" #include "BRepLib.hxx"
#include "ShapeBuild_ReShape.hxx" #include "ShapeBuild_ReShape.hxx"
#include "ShapeFix.hxx" #include "ShapeFix.hxx"
#include "ShapeFix_FixSmallFace.hxx" #include "ShapeFix_FixSmallFace.hxx"
#include "Partition_Spliter.hxx" #include "Partition_Spliter.hxx"
#include "BRepAlgoAPI_Fuse.hxx"
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX < 0x070000
#else
#include "StlTransfer.hxx"
#include "TopoDS_Iterator.hxx"
#endif
namespace netgen namespace netgen
{ {
@ -938,7 +948,11 @@ namespace netgen
void OCCGeometry :: CalcBoundingBox () void OCCGeometry :: CalcBoundingBox ()
{ {
Bnd_Box bb; Bnd_Box bb;
#if OCC_VERSION_HEX < 0x070000
BRepBndLib::Add (shape, bb); BRepBndLib::Add (shape, bb);
#else
BRepBndLib::Add ((const TopoDS_Shape) shape, bb,(Standard_Boolean)true);
#endif
double x1,y1,z1,x2,y2,z2; double x1,y1,z1,x2,y2,z2;
bb.Get (x1,y1,z1,x2,y2,z2); bb.Get (x1,y1,z1,x2,y2,z2);

View File

@ -394,7 +394,7 @@ namespace netgen
class OCCParameters class DLL_HEADER OCCParameters
{ {
public: public:
@ -443,11 +443,11 @@ namespace netgen
extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr<Mesh> & mesh, extern int OCCGenerateMesh (OCCGeometry & occgeometry, shared_ptr<Mesh> & mesh,
MeshingParameters & mparam); 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 #endif