Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.24k stars 380 forks source link

[Feature] Support for IFC format #3156

Open daker opened 1 month ago

daker commented 1 month ago

Motivation

Support for the Industry Foundation Classes (IFC) format.

Detailed Description

Add a new vtkIFCImporter

vtkResourceLoader
    .loadScript('https://cdn.jsdelivr.net/npm/web-ifc@0.0.55/web-ifc-api-iife.js')
    .then(() => {
        vtkIFCImporter.setIFCAPI(window.WebIFC);

        importer
            .setUrl('http://example.com/model.ifc');

        importer.onReady(() => {
            importer.getActors().forEach((actor) => renderer.addActor(actor));
            resetCamera();
            render();
        });
    });
daker commented 3 weeks ago

vtk.js + web-ifc.js

https://github.com/user-attachments/assets/a85cc323-07be-4d11-9da7-805da2c9b1c7

finetjul commented 3 weeks ago

That would be a great addition indeed !

finetjul commented 3 weeks ago

It might have to be like GLTF: split between a reader and an importer.