Giter VIP home page Giter VIP logo

unity-ifcengine's Introduction

Unity-IFCEngine

Import scripts for IFC files.

Features working:

  • Geometry
  • Project scale in Milli, Deci and Centimeters
  • Assign materials according to material definitions in Unity component
  • Get georeference latitude, longitude, elevation from IFC file

Feature ToDo:

  • Read IFC materials and create Unity ones accordingly
  • Read IFC properties and make them usable

Note: Implementation is based on my IfcEngineWrapper project, which is currently not available as OSS, and IFCEngine http://rdf.bg/ifc-engine-dll.html?page=products Please see the license terms of IFCEngine DLL before trying to use this project.

Installation

  1. Create a new Unity 2017.2 project
  2. Import CielaSpike's ThreadNinja from the Unity Asset Store: https://www.assetstore.unity3d.com/en/#!/content/15717
  3. Download this repository as ZIP file and extract it to the project root OR
  4. Download a release package from "Releases" and import it using Assets -> Import Package -> Custom Package
  5. If you've used a release package, copy the contents of IFCImporter/IFCDefines to the Unity project root directory
  6. Open the IFCImporter/ExampleImport map to see how it's used!

Usage

The import scripts basically consist of the files ImportIFC.cs and MaterialAssignment.cs.

  1. Create an empty game object
  2. Attach the ImportIFC component to the game object
  3. Attach the MaterialAssignment component to the game object
  4. Assign the MaterialAssignment component to the ImportIFC component
  5. Change the length of the material array and add defines for "IFCClass"->"Material" (case sensitive)

MaterialAssign

  1. Create your own scripting class, calling the component and using the Init() and ImportFile() function
  2. Use the callback function to do further stuff, when the import is finished.

Calling

  1. Note: Objects created in play mode are not persistant to the game world. However, prefabs will be created upon initial import, so you can then drag and drop them in editor (or write your own serialization method). This may be needed to change texture scaling because of auto-generated UV coordinates.

Texture

  1. Import some IFC files!

  2. Access common IFC properties via the IFCVariables component attached to the child gameobjects properties

Release

Be sure to include the IFC2X3-Settings.xml +.exp and IFC4-Settings.xml + .exp, IFCEngine.dll and IfcEngineWrapper.dll into your binary directory!

Import

Contributing

Create a pull request. Only pull requests corresponding to an issue will be considered, so please create an issue accordingly to the feature or bug you're submitting code for, if there isn't any.

unity-ifcengine's People

Contributors

helpstertee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unity-ifcengine's Issues

Crashe while running on Unity 2019

Thanks for your talent work!
It works perfectly on unity 2018, But but when I use Unity2019.4.23, the editor crashes.

The crashed code is
bool result = util.ParseIFCFile(file);

So. Can you help me to solve the problem, Thank you!

Windows Build - Error parsing IFC File

Hi, Thanks for the Great Work

Can you help with Error parsing IFC File on Windows platform?
It works fine in the Editor.
Fixed a couple of small issues during the build.
But this one is related to dll which is closed for editiong.

I've tried both builds 86_64, 86.
And Dot .Net 2.0 instead of Subset.
Any Ideas?

Bellow you can see full log from the app which is pretty obvious.

Thank you very much!

Initialize engine version: 2017.2.0f3 (46dda1414e51)
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.0]
Renderer: NVIDIA GeForce GT 740M (ID=0x1292)
Vendor: NVIDIA
VRAM: 2020 MB
Driver: 21.21.13.7654
Begin MonoManager ReloadAssembly

  • Completed reload, in 0.042 seconds
    Initializing input.

Input initialized.

Initialized touch support.

Setting up 4 worker threads for Enlighten.
Thread -> id: 31c0 -> priority: 1
Thread -> id: 27cc -> priority: 1
Thread -> id: 1b00 -> priority: 1
Thread -> id: fe0 -> priority: 1
UnloadTime: 4.306400 ms

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

F:\USER\Desktop\Win_EXE\IFC_Test\IfcOpenHouseGeoRef.ifc

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Parsing geometry from IFC file

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Error parsing IFC File

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

IfcOpenHouseGeoRef is Imported!

(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

[QUESTION]can i get GUID of ifc file?

I hope to get the GUID information of the model.But I don't know if this project can be done.Or is there any other way to get a GUID?Is such a message:
image
Could you tell me how to solve it?please

(.so) libraries for Android support

We are going to use your plugin for Android, but it doesn't work with (.dll) files.
Could you build (.so) libraries for Android support?

Thank you so much.

IFCEngine error exception on import ifc file

When trying to import the ifc file I get the following excpetion:

ifcengine assembly: type: member:(null)
at (wrapper managed-to-native) IfcEngine.x86_64.sdaiOpenModelBN(int,string,string)

image

I did no changes to any script, just opened the sample scene and the manager script was called with the included ifc file

Not able to build on IfcEngine.x86_64

Having this issue while running the IFC importer script on MacOS:

ifcengine at (wrapper managed-to-native) IfcEngine.x86_64.sdaiOpenModelBN(int,string,string) at IfcEngineWrapper.IfcUtil.ParseIFCFile (System.String strPath) [0x0000a] in <735dabf5ebca4f4086cc1a84a3a58577>:0 at ImportIFC+<Import>d__21.MoveNext () [0x001a5] in /Users/felixwcf/Desktop/AR BIM/Assets/IFCImporter/ScIFC/ImportIFC.cs:106 at CielaSpike.Task.MoveNextUnity () [0x00002] in /Users/felixwcf/Desktop/AR BIM/Assets/CielaSpike/Thread Ninja/Task.cs:242 UnityEngine.Debug:LogError(Object) CielaSpike.Task:MoveNextUnity() (at Assets/CielaSpike/Thread Ninja/Task.cs:260) CielaSpike.Task:BackgroundRunner(Object) (at Assets/CielaSpike/Thread Ninja/Task.cs:233) System.Threading._ThreadPoolWaitCallback:PerformWaitCallback()

IFCUNITASSIGNMENT

Hi
Could you give me a hint about the IfcEngine functions to call in order to get Units used in the project (and geocoordinates)?
Any attempt I made was unsuccessful, I'm stuck on this issue.

Thank you so much.

Make identifying IFC attributes available in Unity

Hi,
I there any way to show complete mesh name in my mesh.

I can load my IFC file into unity and i can see the 3D data also. But i am unable to see all data string inside the hierarchy. Please find the image for your reference.

Can any please help me how i can achieve this
Image:1
This what i can see inside the IFC file in notepad
capture1

Image:1
This what i can see inside the IFC file in Unity3d
capture2

Thanks,
ESWAR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.