Programmatically find nested surfaces - best practices

Hello everyone,

I am about to update an old project that avoided the problem of programmatically finding the relationships between nested surfaces, for example the relationship between any number of child-surfaces that occur within a larger parent-surface or the relationship between windows in a wall.

I’ve been looking around for examples before I begin work but without luck. Are there any recommended or best practices for approaching this type of problem?

Many thanks in advance.

Hello, at least for me I have no idea what you are asking. Could create a minimal example with some screenshots attached?