Open axelra82 opened 2 years ago
can you please tell me that how to create tree structure in ifc when we click on asset then show all properties of asset same as forge propperties . Storey 1 <- Get all IDs including nodes that don't contain geometry Basic Wall Basic Wall Basic Wall Basic Wall Storey 2 Stairs Stairs Stairs
I'm wondering what I'm missing in regards to
createSubset
,removeSubset
andremoveFromSubset
and the intended use cases.Some more complex models I've tested contain tens of thousands of IDs in total to check/use when highlighting parts of, or the entire, model. I've notice that around 2 000 IDs things start to get sluggish. Not to mention entire floors on a larger building model (with ~30 storeys), where I've logged upwards 13 000+ IDs, per storey.
So back to my question, are we really supposed to use the
subsets
this way, i.e. re-creating a subset every time? Isn't there a "better" (i.e. easier 😅) way of dealing with showing/hiding/highlighting parts of an IFC model? 🤔Also, I've noticed that subsets have a
visible
value, which is more performant when highlighting parts of a model... however that requires a pre-existing subset, as again, creating large subsets if very heavy when it comes to larger models.In short, what I'm trying (and have been trying for a couple of weeks now, with talks in different places for IFCjs, with some very helpful people) is to get all the IDs from a specific point in the spatial structure (including nodes with no geometry data, as these group the items, and are necessary to identify all items in a group, e.g. all
Basic Walls
in theBasic Wall
group on aStorey
are hidden/highlighted etc).Then once I have all the IDs, I simple want to show/hide/highlight, without creating or removing a subset, as this doesn't work (in an acceptable way) when there are a huge number of IDs to handle. Also, the scene can contain multiple models, so there's already a lot going on for the browser, adding a "create/remove" subset with tens of thousand IDs with milliseconds appart just doesn't perform well 🤷♂️
I've looked a many different examples but haven't been able to find anything that deals with this specific scenario (or similar, that can translate well). At this point I'm also not worrying about/dealing with picking/highlighting using raycast etc. But only focusing on the interaction in the structured side menu view.
Side menu
This is shown when selecting model from list of models. When hovering each row it highlights (but larger sets can take up to 1-2 seconds to show highlight, same goes for show/hide entire storeys, groups or items).
––––––––––––––––––
––––––––––––––––––
I've gone over all the documentation on ifcjs.github.io, and while that's great for touching the surface of things and doing some "Hello world" examples, it (combined with my limited experience with IFC in general) falls short here. All the examples are more of a "proof of concept" thing, rather than complex scenarios with "heavy/large" real world models.
Any guidance or suggestions on how to optimize this would be greatly appreciated 🤓
I've tried a bunch of different ideas, but they all fall short in some aspect. One idea I've been trying out is to create the highlight subsets for
storeys
,groups
andgroupItems
durring load of the IFC model. While that adds unwanted time to the loading process it does make it more responsive once it's done. However, this requires me to run a mess of javascript just to get the right structure.Excerpt of setup
Below is an excerpt of the codebase I'm currently working with, trying to get the correct structure in place while loading and creating
highlight
subsets. This does not work for showing hiding however.Dependencies
IFC loading and grouping
Highlight toggle function
recursive
andhasChildren
functions