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

storeyViewPlugin images display too much or not enough objects #1400

Closed
perssam42 opened this issue Mar 6, 2024 · 7 comments
Closed

storeyViewPlugin images display too much or not enough objects #1400

perssam42 opened this issue Mar 6, 2024 · 7 comments

Comments

@perssam42
Copy link

Hello !

I use the storeyViewPlugin to display my model's Storeys and i added the planPointer to help users know where they are when using this feature.

The issue here is that images generated by createStoreyMap() are not accurate : it often displays too much objects. I already tried to display only one storey with

storeyViewsPlugin.showStoreyObjects(storeyMap.storeyId, {
hideOthers: true
});

before generating each Storey image to help the generator but it does not work.

I also noticed that in most model when i create my storeyMap from roof to first floor, storeys image are shifted by 1 storey :
-first storey image contains only few objects
-second storey image contains the roof which should have been the first storey

  • third storey image is the top floor
  • etc..
    And in some case the first storey make the viewer crash because it's not a valid selector but i guess it's just a consequence of the bug

Capture d'écran 2024-03-05 175555
Capture d'écran 2024-03-05 175724
Capture d'écran 2024-03-06 095829

To Reproduce
Execute the buildStoreyMapsMenu() function with planPointer implementation. (mine is very close to xeokit examples one)

Expected behavior
I expect generated storey images to display only the rights objects (those in the actual storey) and not the roof when not needed or any object outside the giving storey.

**Desktop **:

  • OS: Windows
  • Browser : chrome

Thx for your help
Regards

Sam

@xeolabs
Copy link
Member

xeolabs commented Mar 6, 2024

Hi,

StoreViewsPlugin depends on the IFC organizing the objects correctly within IfcBuildingStorey elements.

It works by iterating downwards through the element hierarchy, to create a storey view for each IfcBuildingStorey, that contains the elements within the subtree rooted by the IfcBuildingStorey.

Unfortunately sometimes the IFC is authored so that this containment is not done correctly, and sometimes will overlap between the storeys (eg stairwells).

A quick way to verify this containment is to view the model using a TreeViewPlugin set to "containment" hierarchy mode, then exclusively enable the checkboxes for each of the stories to see if the elements are contained, overlap etc. The IfcBuildingStoreis are the fourth level down in the tree.

In the case of Schependomlaan test model, we have a correct containment:

Screenshot from 2024-03-06 11-01-17

Try that first, and let's see if your storey's are authored OK, then we can take it from there.

I suppose we could make the StoreyViewsPlugin automatically trim the elements at the top and bottom of each storey as it creates each storey view image, however I'm not sure if that would create a true enough image.

@perssam42
Copy link
Author

Thanks for your quick answer !

My building model is not perfect but it's quite well configured tho.
Capture d'écran 2024-03-06 111304
Capture d'écran 2024-03-05 175555

As you can see "BAT A TOITURE" supposed to be the first storey displaying a roof displays only guardrails (almost invisible in image) and "BAT A R+4" displays the roof but it's supposed to be an apartment (c.f. my first message screenshots)

I already tested this with Schependomlaan and i saw the same issue :

Capture d'écran 2024-03-06 113034
Capture d'écran 2024-03-06 113122
Capture d'écran 2024-03-06 112801

"04 dak" displays only few objects, and "03 derde verdieping" displays the expected image for 04 dak.

For "-1 fundering" it displays too much objects and not only the fundering border like in the real storey.

I might have done something wrong in my code to obtain such a result but i really don't know what it can be.

Regards

Sam

@xeolabs
Copy link
Member

xeolabs commented Mar 6, 2024

When isolating each story in the tree view, do you see only the expected objects?

Also, if you can share your model publicly, we can add it to our test suite.

@perssam42
Copy link
Author

When i isolate storeys in the tree view it shows only expected objects yes.

Unfortunatly i can't share this model because its owned by a client. However here is the Schependomlaan xkt i used for the example.

geometry.zip

I noticed it's often IfcSlab that are shifted, maybe it can help.

@xeolabs
Copy link
Member

xeolabs commented Mar 6, 2024

I noticed it's often IfcSlab that are shifted, maybe it can help.

Got it - which converter tools are you using?

Also, if you're one of our enterprise users, could you please log this issue with our Jira, then we can track this one there as well.

@perssam42
Copy link
Author

Most of the time I use xeokit-convert version 1.1.15-beta-1. But for the Schependomlaan model i just sent, it's the geometry.xkt already converted i found in the examples.

I'm not one of your entreprise users, I planned to do this project using the Open Source way so I guess I can't get access to your Jira.

@xeolabs
Copy link
Member

xeolabs commented Mar 11, 2024

Could you try using the pipeline tools described here: https://www.notion.so/xeokit/Converting-IFC-Models-to-XKT-using-Open-Source-Tools-A-Simpler-Pipeline-02d45ba457eb4f808f63bcacb71a4fb3

The convert2xkt direct IFC->XKT conversion mode uses web-ifc internally, which may not be processing the IFC properly in this case, I'm not sure.

@xeolabs xeolabs closed this as completed Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants