From: Nicola Giuliani Date: Wed, 13 Nov 2019 09:20:40 +0000 (+0100) Subject: added another ifdef to check the versions of OCC X-Git-Tag: v9.2.0-rc1~878^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bccb6d92ee44bd9dfcb130d95f1560bb2213dce;p=dealii.git added another ifdef to check the versions of OCC --- diff --git a/source/opencascade/utilities.cc b/source/opencascade/utilities.cc index 50e0e3c81c..c000c31730 100644 --- a/source/opencascade/utilities.cc +++ b/source/opencascade/utilities.cc @@ -324,6 +324,9 @@ namespace OpenCASCADE } else shape_to_be_written = shape; + // BRepMesh_IncrementalMesh automatically calls the perform method to + // create the triangulation which is stored in the argument + // `shape_to_be_written`. BRepMesh_IncrementalMesh mesh_im(shape_to_be_written, deflection, is_relative, @@ -334,8 +337,14 @@ namespace OpenCASCADE StlAPI_Writer writer; const auto error = writer.Write(shape_to_be_written, filename.c_str()); # if ((OCC_VERSION_MAJOR * 100 + OCC_VERSION_MINOR * 10) >= 690) + +# if ((OCC_VERSION_MAJOR * 100 + OCC_VERSION_MINOR * 10) < 720) AssertThrow(error == StlAPI_StatusOK, ExcMessage("Error writing STL from shape.")); +# else + AssertThrow(error == true, ExcMessage("Error writing STL from shape.")); +# endif + # endif }