assimp / assimp-net

Automatically exported from code.google.com/p/assimp-net
191 stars 82 forks source link

Issue with Importing IFC files #33

Open ani-rudh opened 7 years ago

ani-rudh commented 7 years ago

Hi, I have 2 issues with importing IFC files using AssimpNET (keep in mind that I am noob in the topic):

(A) I'm trying to import IFC files with AssimpNet 3.3.2. There is an error (attached Image) when I try to import the IFC file.

(B) I have read on forums that AssimpNet 3.0 imports IFC. The issue here is that I cannot link AssimpNet.dll and Assimp64.dll to my c# project on VS 2015. I forked the AssimpNet 3.0 from the Git repository and built the AssimpNet.sln and then placed the resulting dlls to my c3 projects bin/x64 folder where the exe resides. Anyway, the VS cannot find the Assimp libraries when I try to declare Assimp with "using Assimp".

But, when I tried placing the assimp 3.0 dlls in my Unity project assets folder and called assimp from a c# script in unity, it works and also imports the IFC file.

What am I doing wrong when linking the AssimpNet 3.0 with VS 2015 c# project?

This is my code:

using System;
using System.IO;
using System.Reflection;
using Assimp;
using Assimp.Configs;
namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {

            String fileName = "F:/rst_basic_sample_project.ifc";

            AssimpContext importer = new AssimpContext();

            Scene model = importer.ImportFile(fileName);

            Console.WriteLine("no. of meshes in the model is: " + model.MeshCount);

            importer.Dispose();

        }
    }
}

issue_ifc