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

I can't load an ifc type json

Open elias2089 opened this issue 3 years ago • 8 comments

Hello, I have a problem, if you can help me. I have a requirement that is to export an ifc to json and then display it, I am using the web-ifc-three load, it works fine for me for .ifc files, but when I convert the ifc to json using the example from examples/web-ifc/ifc-to-json/node, and upload the .json file gives me the following error: Screenshot 2022-11-21 155949 These are the files that I use, the .ifc and .json: building_2.zip And this is the part of the code to load the ifc:

Get file from e input async uploadIfcFile(event: Event) { const target = event.target as HTMLInputElement; const file: File = (target.files as FileList)[0]; if (!file) return; const ifcURL = URL.createObjectURL(file); await this.sceneService.loadIfcFile(ifcURL); }

Loading file from ifcManager loadIfcFile = async (ifcURL: string) => { const ifcModel = (await this.getIfcLoader().loadAsync(ifcURL)) as IModel; };

elias2089 avatar Nov 21 '22 22:11 elias2089

::take

aka-blackboots avatar Nov 28 '22 13:11 aka-blackboots

🟢🟢🟢

::take

Hi, @aka-blackboots! Thanks for taking this bounty! The due date is December 19, 2022 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Nov 28 '22 13:11 agviegas

::drop

aka-blackboots avatar Nov 28 '22 13:11 aka-blackboots

🟢🟢🟢

::drop

Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.

agviegas avatar Nov 28 '22 13:11 agviegas

::take

aka-blackboots avatar Apr 05 '23 18:04 aka-blackboots

🟢🟢🟢

::take

Hi, @aka-blackboots! Thanks for taking this bounty! The due date is April 26, 2023 UTC.

If you need to submit some pull requests (PR) to complete the tasks, make sure that the last and only the last PR has a title that either starts with the bounty ID or is exactly the same as the bounty name. After the PR is merged, this bounty’s status will automatically changed to done.

If you do not need to make a PR, tell the manager @agviegas to run ::done command after your tasks is confirmed to be done.

Good luck!

agviegas avatar Apr 05 '23 18:04 agviegas

::drop

aka-blackboots avatar Apr 05 '23 18:04 aka-blackboots

🟢🟢🟢

::drop

Hi, @aka-blackboots! Thanks for giving it a try! It’s now once again available for anyone to take.

agviegas avatar Apr 05 '23 18:04 agviegas