Merge 430601bbe60d40907176b5aa6cffee0c7b7cb91b into 3d3eecba3cda720256ad621453f5fe9b6439c588

This commit is contained in:
Sebastian Hirnschall 2025-05-13 18:15:06 +02:00 committed by GitHub
commit aa29eb9f45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -31,7 +31,7 @@
#include <TopoDS_Shape.hxx>
#include <Transfer_FinderProcess.hxx>
#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

View File

@ -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 <BinTools_ShapeWriter.hxx>
#endif // OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4
#include <BOPAlgo_Builder.hxx>
@ -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<TopoDS_Shape> 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)

View File

@ -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));