Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor IFC support #28098

Open
harryhjsh opened this issue Apr 9, 2024 · 2 comments
Open

Editor IFC support #28098

harryhjsh opened this issue Apr 9, 2024 · 2 comments

Comments

@harryhjsh
Copy link
Contributor

harryhjsh commented Apr 9, 2024

Description

Per the discussion in #25057 and the implementation in #25440, IFCLoader was removed from addons. The editor still dynamically imports it from jsm/examples/loaders, where it obviously no longer exists, meaning the editor fails to load IFC models. (Link to editor import of IFCLoader.js)

I tried starting a PR to update the import maps for the editor as per the changes to the IFC example in #25440, which results in imports working on the first page reload after clearing my cache, but seems to result in a number of failed requests for web-ifc-mt.worker.js when trying to import after a second reload. I think this is potentially related to editor/sw.js, but I can't quite pin it down (sorry).

I imagine it'd be equally valid to remove IFC support from the editor, as it doesn't make use of any other external loaders, but this might be a bit of a shame.

Apologies for this slightly off-topic aside:

I found getting to the bottom of this was a bit difficult, I think due to the deprecation of web-ifc-three mentioned in #27467. This means that most of the documentation links on https://github.com/ThatOpen/web-ifc-three are 404s at the moment, so trying to dig into where this request for web-ifc-mt.worker.js originated from, and whether there was a way to avoid it, was a bit more challenging than it might've been. Is there still a plan to migrate the example (and potentially the editor) to https://github.com/ThatOpen/engine_components? I think it's a bit of a challenge to make use of the current example code given the temporarily missing docs.

Reproduction steps

  1. Visit https://threejs.org/editor/
  2. Try importing an IFC file (e.g. https://github.com/mrdoob/three.js/blob/dev/examples/models/ifc/rac_advanced_sample_project.ifc)
  3. Observe errors in console
@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 10, 2024

I imagine it'd be equally valid to remove IFC support from the editor, as it doesn't make use of any other external loaders, but this might be a bit of a shame.

As a first step, I suggest to remove the IFC related code in Loader.js that doesn't work right now. Would be interested in filing a PR for that?

Since web-ifc-three is deprecated, the webgl_loader_ifc example needs a different approach at some point in order to import IFC assets.

@agviegas I'm not sure about the current state but does Open BIM Components provide an easy way for devs to import IFC files into a three.js app? Is there a loader class users can import?

Regarding the roadmap, webgl_loader_ifc should be migrated to the new IFC repository Open BIM Components. When we see how this is done, we can restore IFC support in the editor.

@harryhjsh
Copy link
Contributor Author

As a first step, I suggest to remove the IFC related code in Loader.js that doesn't work right now. Would be interested in filing a PR for that?

Sure - #28108.

All makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants