allow reading of binary brep files

This commit is contained in:
Christopher Lackner 2024-06-21 15:16:47 +02:00
parent af5e003790
commit 3709ea8f94

View File

@ -14,6 +14,7 @@
#include "occgeom.hpp" #include "occgeom.hpp"
#include "Partition_Spliter.hxx" #include "Partition_Spliter.hxx"
#include <BinTools.hxx>
#include <BOPAlgo_Builder.hxx> #include <BOPAlgo_Builder.hxx>
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
#include <BRepBuilderAPI_Copy.hxx> #include <BRepBuilderAPI_Copy.hxx>
@ -1637,9 +1638,13 @@ namespace netgen
Standard_Boolean result = BRepTools::Read(occgeo->shape, filename.string().c_str(), aBuilder); Standard_Boolean result = BRepTools::Read(occgeo->shape, filename.string().c_str(), aBuilder);
if(!result) if(!result)
{
result = BinTools::Read(occgeo->shape, filename.string().c_str());
if (!result)
{ {
delete occgeo; delete occgeo;
return NULL; throw Exception("Could not read BREP file " + filename.string());
}
} }
occgeo->changed = 1; occgeo->changed = 1;