diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cbae1..d277630 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -375,25 +375,20 @@ if (USE_OCC) TKGeomAlgo TKGeomBase TKHLR - TKIGES TKLCAF TKMath TKMesh TKOffset TKPrim - TKSTEP - TKSTEP209 - TKSTEPAttr - TKSTEPBase - TKSTL + TKDESTL TKService TKShHealing TKTopAlgo TKV3d TKVCAF TKXCAF - TKXDEIGES - TKXDESTEP + TKDEIGES + TKDESTEP TKXSBase TKernel ) diff --git a/libsrc/occ/Partition_Loop3d.hxx b/libsrc/occ/Partition_Loop3d.hxx index e171669..fe77b90 100644 --- a/libsrc/occ/Partition_Loop3d.hxx +++ b/libsrc/occ/Partition_Loop3d.hxx @@ -10,27 +10,17 @@ #ifndef _Partition_Loop3d_HeaderFile #define _Partition_Loop3d_HeaderFile -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile +#include #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _Standard_Version_HeaderFile #include -#endif +#include +#include -#if OCC_VERSION_HEX < 0x070000 +#if OCC_VERSION_HEX < 0x070000 || OCC_VERSION_HEX > 0x070799 #else #include #include - #include #endif class TopoDS_Shape; @@ -38,6 +28,8 @@ class TopoDS_Shape; #if OCC_VERSION_HEX < 0x070000 class TopTools_ListOfShape; class TopTools_MapOfOrientedShape; +#else +#include #endif class TopoDS_Edge; diff --git a/libsrc/occ/occ_edge.cpp b/libsrc/occ/occ_edge.cpp index 4805bb1..bb2b98e 100644 --- a/libsrc/occ/occ_edge.cpp +++ b/libsrc/occ/occ_edge.cpp @@ -55,7 +55,11 @@ namespace netgen size_t OCCEdge::GetHash() const { +#if OCC_VERSION_HEX < 0x070800 return edge.HashCode(std::numeric_limits::max()); +#else + return std::hash{}(edge); +#endif } void OCCEdge::ProjectPoint(Point<3>& p, EdgePointGeomInfo* gi) const diff --git a/libsrc/occ/occ_face.cpp b/libsrc/occ/occ_face.cpp index 239982a..ea4dd15 100644 --- a/libsrc/occ/occ_face.cpp +++ b/libsrc/occ/occ_face.cpp @@ -32,7 +32,11 @@ namespace netgen size_t OCCFace::GetHash() const { +#if OCC_VERSION_HEX < 0x070800 return face.HashCode(std::numeric_limits::max()); +#else + return std::hash{}(face); +#endif } Point<3> OCCFace::GetCenter() const diff --git a/libsrc/occ/occ_solid.hpp b/libsrc/occ/occ_solid.hpp index d598de4..416c1eb 100644 --- a/libsrc/occ/occ_solid.hpp +++ b/libsrc/occ/occ_solid.hpp @@ -17,7 +17,11 @@ namespace netgen : solid(TopoDS::Solid(dshape)) { } +#if OCC_VERSION_HEX < 0x070800 size_t GetHash() const override { return solid.HashCode(std::numeric_limits::max()); } +#else + size_t GetHash() const override { return std::hash{}(solid); } +#endif }; } diff --git a/libsrc/occ/occ_vertex.cpp b/libsrc/occ/occ_vertex.cpp index 6e83c89..be8e387 100644 --- a/libsrc/occ/occ_vertex.cpp +++ b/libsrc/occ/occ_vertex.cpp @@ -19,6 +19,10 @@ namespace netgen size_t OCCVertex::GetHash() const { +#if OCC_VERSION_HEX < 0x070800 return vertex.HashCode(std::numeric_limits::max()); +#else + return std::hash{}(vertex); +#endif } } diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index 00ed0d0..ad58ae6 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -1717,8 +1717,12 @@ namespace netgen /* // enumerate shapes and archive only integers auto my_hash = [](const TopoDS_Shape & key) { +#if OCC_VERSION_HEX < 0x070800 auto occ_hash = key.HashCode(1<<31UL); return std::hash()(occ_hash); +#else + return std::hash{}(key); +#endif }; */ TopTools_IndexedMapOfShape shape_map;