How can l load .ifc file to jME?

The Industry Foundation Classes (IFC) data model is intended to describe building and construction industry data. It is the general format of BIM, So I want to know if there are methods to load .ifc files to JME for modeling? Or is it possible to load the file by myself ??

Sure, read up on the file format and create a loader that constructs the mesh and material, see here:
http://wiki.jmonkeyengine.org/doku.php/jme3:advanced:custom_meshes

thanks for your reply, and is this means that i can load models from any format files?

Files are made to store data and later read it again, yes.

1 Like

You can register your reader class to JME:
getAssetManager().registerLoader(YourLoaderClassHere.class, “fileExtensionHere”);

Your loader:
public class YourLoaderClassHere implements AssetLoader

This is how you can natively integrate your model loader to JME and use it like any other.

oh, that is a good way, thank you so much

so it is also possible to save models as custom format, that is right?

Java is a programming language allowing you to do everything a computer is capable of…

1 Like

I once worked with BIM / CAD for architecture. The software was able to export to .dae (Collada), which could then be imported into Blender (which meant it could be imported to jME too). Maybe you find a similar solution for your CAD software.
The other answers will lead you to implement an importer for jME, which can be quite a big task (but achievable, for experienced coders).
You could also look for importers to Blender, which then allow to import to jME too (usually).
Edit: The .ifc importer to jME would be the best solution if you want to do things with IFC and not only visualize the 3d model. You probably start from scratch (better search IFC for Java first).

Another software which is able to convert 3D-Models (but not *.ifc): MeshLab

I post this, cause of Oglis posting and his idea to export in another format. MeshLab allows to convert a lot of formats and is free.

Here is another piece of software which should be able to open *.ifc-files: FreeCAD and on GitHub.

Sorry, but I like this free stuff, particularly when you are in the state of tinkering around.

I advise you to write a loader, you can use JSDAI to do it.

I have found a java library for ifc models:IFCJAVATOOLBOX, I think maybe it is more useful.
And, I doubt the JSDAI is to load model definition rather than model data.

Its Java toolbox has been unmaintained since May 2013. Its Java viewer uses Java3D; if you plan to use it, please switch to Java3D 1.6.0 (actively maintained by the JogAmp community) as Java3D 1.5.2 is totally unmaintained and abandoned.