Whats the ideal structure for filtering

Obviously each object contains lists and children and can be endlessly nested. But I wonder what is ideal in terms of the filtering within the viewer. Is it relatively shallow and simple?

1 Like

Ideally, yes - flat things help when dealing with objects in code. If you though want end-user filtering, structuring things a-la layers in Rhino seemed universally “legible”.

The filtering api is quite powerful, though you need to wrap your brain around it first (see: speckle-server/packages/viewer at main · specklesystems/speckle-server · GitHub).

I’ve just got fme writing and I have an opportunity to structure any which way. I’d noticed the qgis streams not exposing data attributes at quite a shallow level hence the question.

Will experiment - ootb fme will be as generic as possible.

1 Like

Also interested in this, I am writing some code that writes to a stream and looking at the ideal way to save the properties. Typically our property sets can be extensive and nested, so as a temporary workaround all the “important” properties are stored on the top level of the object which is just a getter to the nested property within the PropertySet.

I have noticed that sometimes the viewer is showing some nested properties but I have been having some mixed results there?

Thanks,
Daniel

Your parent-level Getter seems a perfect fit, but without knowing what isn’t being picked up by the viewer’s filter, it is hard to tell what to do differently. Do you have an example stream?

image
Here you can see some of the fields are being picked up which are nested, like Origin.X, but it’s not picking up all nested properties and I can’t work out why some are picked up and others not.

Example stream: Speckle

Ultimately I would love for the user to be able to go filter on: Properties.Carbon.Embodied and that applies the filter, I don’t mind if they have to type it out.

Cheers,
Daniel

Yes, that makes sense. Just for curiosity, is it the same outcome if the nest Properties object is a naked Object and not derived from Speckle Base? Apologies thats putting the work back on you.


Very interesting, so I added a Dictionary to the property of my EngItems and the keys of the dictionary came up as filterable items. Was this what you were interested in testing @jonathon ?