Add support for OCCT 7.8.0 (#11909)

This commit is contained in:
bgbsww
2024-01-09 20:47:25 -05:00
committed by GitHub
parent b1ee268d98
commit bd1fc0fc03
29 changed files with 161 additions and 35 deletions

View File

@@ -24,12 +24,13 @@
#define IMPORT_TOOLS_H
#include <Quantity_ColorRGBA.hxx>
#include <TDF_LabelMapHasher.hxx>
#include <TopoDS_Shape.hxx>
#include <XCAFDoc_ColorTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <App/Color.h>
#include <Standard_Version.hxx>
namespace Import
{
@@ -37,7 +38,11 @@ struct ShapeHasher
{
std::size_t operator()(const TopoDS_Shape& shape) const
{
#if OCC_VERSION_HEX >= 0x070800
return std::hash<TopoDS_Shape> {}(shape);
#else
return shape.HashCode(INT_MAX);
#endif
}
};
@@ -45,7 +50,11 @@ struct LabelHasher
{
std::size_t operator()(const TDF_Label& label) const
{
#if OCC_VERSION_HEX >= 0x070800
return std::hash<TDF_Label> {}(label);
#else
return TDF_LabelMapHasher::HashCode(label, INT_MAX);
#endif
}
};