opensourceBIM / BIMsurfer-before2019

This is the repository of the v1 and v2 version of BIM Surfer. It is not maintained anymore. Find the most recent version on https://github.com/opensourceBIM/BIMsurfer
MIT License
432 stars 195 forks source link

setvisibility IfcBuildingStorey #276

Open halmsx opened 5 years ago

halmsx commented 5 years ago

hi all. is it possible to set visibility to a specific building storey? dont look like its working using type or specific IfcBuildingStorey oid. thanks in advance

aothms commented 5 years ago

I assume you mean that the children of the building storey would be hidden as well? Currently the setVisibility() call is not recursive like that [1]. Take a look at the code for the tree renderer [2], in a couple of lines you can adapt something to recurse to the tree data to get the childen of the storey yourself and toggle visibility for them explicitly.

[1] https://github.com/opensourceBIM/BIMsurfer/blob/6b20a7aac69cee5a472df482a2d8b317854fe2a2/bimsurfer/src/xeoViewer/xeoViewer.js#L574 [2] https://github.com/opensourceBIM/BIMsurfer/blob/6b20a7aac69cee5a472df482a2d8b317854fe2a2/bimsurfer/src/StaticTreeRenderer.js#L124