From 0484eb272afcc6ebcca567b171db889fec76bcd4 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Mon, 30 May 2022 20:42:59 +0200 Subject: [PATCH] BOPAlgo_Alerts.hxx is only available in occt > 7.1 (cf. #1951) --- src/geo/GModelIO_OCC.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/geo/GModelIO_OCC.cpp b/src/geo/GModelIO_OCC.cpp index ddff7e90f7..76b9547d2d 100644 --- a/src/geo/GModelIO_OCC.cpp +++ b/src/geo/GModelIO_OCC.cpp @@ -21,7 +21,6 @@ #if defined(HAVE_OCC) -#include <BOPAlgo_Alerts.hxx> #include <BRepAlgoAPI_Common.hxx> #include <BRepAlgoAPI_Cut.hxx> #include <BRepAlgoAPI_Fuse.hxx> @@ -115,6 +114,10 @@ #error "Gmsh requires OpenCASCADE >= 6.9" #endif +#if OCC_VERSION_HEX > 0x070100 +#include <BOPAlgo_Alerts.hxx> +#endif + #if OCC_VERSION_HEX > 0x070300 #include <BRepMesh_IncrementalMesh.hxx> #else @@ -3632,11 +3635,13 @@ bool OCC_Internals::booleanOperator( fragments.SetArguments(objectShapes); if(tolerance > 0.0) fragments.SetFuzzyValue(tolerance); fragments.Build(); +#if OCC_VERSION_HEX > 0x070100 if(fragments.HasErrors() && fragments.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments))) { Msg::Warning("Boolean fragments skipped - too few arguments"); return true; } +#endif if(!fragments.IsDone()) { Msg::Error("Boolean fragments failed"); return false; -- GitLab