web-ifc-viewer icon indicating copy to clipboard operation
web-ifc-viewer copied to clipboard

Add a gltf file to an IFCModel or create a new IFCModel and add geometries from gltf

Open sh-aix opened this issue 2 years ago • 3 comments

Hey everyone,

I have two use-cases:

  1. I have an IFCModel generated from an ifc file and I want to add a geometry by loading an gltf file into the existing model (and link it with a new IFCElement in the spatial tree).
  2. Similar use-case - I want to create a new empty IFCModel, add a spatial tree and fill the IFCElements with meshes from gltf files.

The gltf files are not generated by IFCjs.

Is this possible with the current state of the library?

Best regards, Stefan

sh-aix avatar Jan 11 '23 19:01 sh-aix

Hey, creation and edition of IFC is possible but still quite raw. We expect to make progress here throughout this year. In the meantime, for IFC authoring, maybe you should take a look at other libraries like IfcOpenShell. Cheers!

agviegas avatar Jan 11 '23 23:01 agviegas

Hey Antonio, thanks for the fast response. Actually, I do not want to edit an IFC file itself, but want to add a geometry in the tree and viewer (add it to the object IfcModel).

I used IfcViewer.GLTF.load(...) with the gltf and it works fine. The gltf is added in the viewer. However it returns a Threejs Mesh. Using IfcViewer.GLTF.loadModel(...) does not work since the gltf is not generated by IFCjs. It would return an IFCModel.

I need a way to load a gltf geometry in the viewer and in the IFCModel object.

Is there really no way currently?

Regards, Stefan

ghost avatar Jan 12 '23 08:01 ghost

Not that I know of! But we hope to put a solution to this very soon. This topic has a high priority this year. Cheers!

agviegas avatar Jan 16 '23 06:01 agviegas