]> https://gitweb.dealii.org/ - dealii.git/commitdiff
added another ifdef to check the versions of OCC
authorNicola Giuliani <ngiuliani@sissa.it>
Wed, 13 Nov 2019 09:20:40 +0000 (10:20 +0100)
committerNicola Giuliani <ngiuliani@sissa.it>
Wed, 13 Nov 2019 09:20:40 +0000 (10:20 +0100)
source/opencascade/utilities.cc

index 50e0e3c81cac77f2bad038eda7f73b3d8e45f42b..c000c31730a806569103055b00d5dafb944c7e58 100644 (file)
@@ -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
   }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.