I can successfully read binary files of different extensions(fbx, blend, ifc and etc.) with assimp but if file is not binary assimp failed reading.
#include <string>
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <assimp/Importer.hpp>
int main() {
Assimp::Importer importer;
std::string path = "myFile.ifc";
const aiScene* scene = importer.ReadFile(path, aiProcess_Triangulate | aiProcess_GenNormals);
if (scene == nullptr
|| scene->mFlags == AI_SCENE_FLAGS_INCOMPLETE
|| scene->mRootNode == nullptr) {
return false;
}
// ProcessNode(scene->mRootNode, scene);
return 0;
}
I did not find any flags in docs for solving this problem. And nowhere is it said about file types.
For example, if .fbx file in ASCII format - aiScene* is just nullptr but if .ifc file in ASCII program throw exception
enter image description here
;
– Johnny Feb 08 '23 at 13:44