From 3709ea8f946fd6786efde01b722b40a5e58db71c Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Fri, 21 Jun 2024 15:16:47 +0200 Subject: [PATCH] allow reading of binary brep files --- libsrc/occ/occgeom.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index 0d1c8c44..c942a50d 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -14,6 +14,7 @@ #include "occgeom.hpp" #include "Partition_Spliter.hxx" +#include #include #include #include @@ -1638,8 +1639,12 @@ namespace netgen if(!result) { - delete occgeo; - return NULL; + result = BinTools::Read(occgeo->shape, filename.string().c_str()); + if (!result) + { + delete occgeo; + throw Exception("Could not read BREP file " + filename.string()); + } } occgeo->changed = 1;