diff --git a/libsrc/occ/occ_utils.hpp b/libsrc/occ/occ_utils.hpp index 12a89693..9dca74f4 100644 --- a/libsrc/occ/occ_utils.hpp +++ b/libsrc/occ/occ_utils.hpp @@ -21,7 +21,7 @@ #include "meshing.hpp" -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4) || OCC_VERSION_MAJOR>=8 #define OCC_HAVE_DUMP_JSON #endif diff --git a/libsrc/occ/occgeom.hpp b/libsrc/occ/occgeom.hpp index 6d2abbc8..9c91c4f6 100644 --- a/libsrc/occ/occgeom.hpp +++ b/libsrc/occ/occgeom.hpp @@ -31,7 +31,7 @@ #include #include -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4) || OCC_VERSION_MAJOR>=8 #define OCC_HAVE_HISTORY #endif diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 553a835f..78974ba6 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -14,7 +14,7 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6) || OCC_VERSION_MAJOR>=8 #include #endif // OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 #include @@ -865,7 +865,7 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) { if(binary) { -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6) || OCC_VERSION_MAJOR>=8 BinTools_FormatVersion v = version ? BinTools_FormatVersion(*version) : BinTools_FormatVersion_CURRENT; BinTools::Write(shape, filename.c_str(), withTriangles, withNormals, v); # else // OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6 @@ -874,7 +874,7 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) } else { -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6) || OCC_VERSION_MAJOR>=8 TopTools_FormatVersion v = version ? (TopTools_FormatVersion)(*version) : TopTools_FormatVersion_CURRENT; BRepTools::Write(shape, filename.c_str(), withTriangles, withNormals, v); #else // OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=6 @@ -1200,7 +1200,7 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) }, py::arg("edges"), py::arg("r"), "make fillets for edges 'edges' of radius 'r'") .def("MakeChamfer", [](const TopoDS_Shape & shape, std::vector edges, double d) { -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4) || OCC_VERSION_MAJOR>=8 BRepFilletAPI_MakeChamfer mkChamfer(shape); for (auto e : edges) mkChamfer.Add (d, TopoDS::Edge(e)); @@ -2535,7 +2535,7 @@ tangents : Dict[int, gp_Vec] points.SetValue(i+1, j+1, gp_Pnt(pnts_unchecked(i, j, 0), pnts_unchecked(i, j, 1), pnts_unchecked(i, j, 2))); GeomAPI_PointsToBSplineSurface builder; -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4) || OCC_VERSION_MAJOR>=8 builder.Init(points, approx_type, deg_min, deg_max, continuity, tol, periodic); #else if(periodic) @@ -2605,7 +2605,7 @@ degen_tol : double points.SetValue(i+1, j+1, gp_Pnt(pnts_unchecked(i, j, 0), pnts_unchecked(i, j, 1), pnts_unchecked(i, j, 2))); GeomAPI_PointsToBSplineSurface builder; -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4) || OCC_VERSION_MAJOR>=8 builder.Interpolate(points, approx_type, periodic); #else if(periodic) diff --git a/libsrc/occ/vsocc.cpp b/libsrc/occ/vsocc.cpp index d3b84092..91789714 100644 --- a/libsrc/occ/vsocc.cpp +++ b/libsrc/occ/vsocc.cpp @@ -464,7 +464,7 @@ namespace netgen for (int j = 1; j <= nbnodes; j++) { /* -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5) || OCC_VERSION_MAJOR>=8 gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); #else gp_Pnt p = T -> Nodes()(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); @@ -518,7 +518,7 @@ namespace netgen for (int j = 1; j <= nbnodes; j++) { /* -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5) || OCC_VERSION_MAJOR>=8 gp_Pnt p = T -> Node(aEdgePoly->Node(j)).Transformed(aEdgeLoc); #else gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); @@ -584,7 +584,7 @@ namespace netgen for (int j = 1; j <= ntriangles; j++) { /* -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5) || OCC_VERSION_MAJOR>=8 Poly_Triangle triangle = triangulation -> Triangle(j); #else Poly_Triangle triangle = triangulation -> Triangles()(j); @@ -598,7 +598,7 @@ namespace netgen for (int k = 1; k <= 3; k++) { -#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5 +#if (OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=5) || OCC_VERSION_MAJOR>=8 uv = triangulation -> UVNode(triangle(k)); #else uv = triangulation -> UVNodes()(triangle(k));