ThatOpen / web-ifc-viewer

Graphics engine and toolkit for client applications.
MIT License
944 stars 234 forks source link

Floor-plans do not work #221

Open JoanDuatis opened 1 year ago

JoanDuatis commented 1 year ago

Hello,

I'm doing the course exercise on floor-plans generation and it's not working properly.

What happens is that whatever plant you choose it always shows the same image.

I have also copied the code of the course exercise: javascript, html and css the only modification I made was commenting the line:

//await viewer.IFC.setWasmPath('../../../');

because I have the web-assemblies in the same project folder.

Could it be that some update of the web-ifc-viewer has damaged this functionality?

agviegas commented 1 year ago

Hi, does this happen with any IFC file, or just with specific IFC files? If you could set up a minimal repository where we can reproduce this issue, it would be nice.

JoanDuatis commented 1 year ago

It happens with any ifc file, even the same one used in the course lesson.

In the image on the right is the floor 01 - Entry Level of the course. On the left is my exercise. I have also clicked on 01 - Entry Level, but the same floor always appears even if I click on any other button. image

Attached the compressed project file. In order not to exceed the allowed limit, I have deleted the node_modules folder:

FloorPlans.zip

agviegas commented 1 year ago

It seems like there is a problem with units in the latest web-ifc. We'll take a look and should fix it very quickly. In the meantime, you can try installing the same version of web-ifc-viewer that we use in the course and it will work.

AnnaAntonovna commented 1 year ago

I have the same problem, but installing course version of web-ifc-viewer ("^1.0.207") did not help. It seems like something wrong directly with viewer.plans.**goTo**(model.modelID, plan) as it works only partly. What else might be a solution?

Here's the link to the repository - https://github.com/AnnaAntonovna/IFC-FloorPlans/tree/main Here's the web-page - https://annaantonovna.github.io/IFC-FloorPlans/

Thank you in advance!

agviegas commented 1 year ago

Hi, I solved this in the last version of web-ifc-viewer. Can you please try? Make sure to rebuild your app, avoid exporting web-ifc-three if you are already using web-ifc-viewer and make sure you are using the correct version of web-ifc (web-ifc": "^0.0.39")

AnnaAntonovna commented 1 year ago

Thank you very much! It works now!

MiguelG97 commented 1 year ago

It's happening again in this thread: https://github.com/IFCjs/web-ifc-viewer/issues/232

I'm using the latest version of WIV