web-ifc-viewer
web-ifc-viewer copied to clipboard
Add a gltf file to an IFCModel or create a new IFCModel and add geometries from gltf
Hey everyone,
I have two use-cases:
- 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).
- 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
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!
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
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!