Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libsrc/occ/occ_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libsrc/occ/occgeom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions libsrc/occ/python_occ_shapes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -856,7 +856,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
Expand All @@ -865,7 +865,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
Expand Down Expand Up @@ -1191,7 +1191,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));
Expand Down Expand Up @@ -2526,7 +2526,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)
Expand Down Expand Up @@ -2596,7 +2596,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)
Expand Down
8 changes: 4 additions & 4 deletions libsrc/occ/vsocc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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));
Expand Down