diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx index 3b51c6e57..f3f0c06c1 100644 --- a/src/STEPImport/STEPImport.cxx +++ b/src/STEPImport/STEPImport.cxx @@ -27,42 +27,35 @@ #include "utilities.h" #include - #include #include - #include - +#include +#include #include +#include #include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include #include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC @@ -171,6 +164,13 @@ extern "C" if (aResShape.IsNull()) aResShape = compound; + // Check if any BRep entity has been read, there must be at least a vertex + if ( !TopExp_Explorer( aResShape, TopAbs_VERTEX ).More() ) + { + theError = "No geometrical data in the imported file."; + return TopoDS_Shape(); + } + // BEGIN: Store names of sub-shapes from file TopTools_IndexedMapOfShape anIndices; TopExp::MapShapes(aResShape, anIndices);