Hello!
How can I determine that one PlanCircuit is inside another? Any ideas?
As far as I know, plan circuits don’t have any means of collecting their geometry, boundaries, or otherwise getting any form of location from them. They do allow you to query a point inside the cell though.
This point can be used to get the associated room, and that room’s boundaries can be quarried, and if you get a point just outside the middle of every boundary, and then get the room at each point, that will give you the rooms adjacent to your room.
If any point returns null, you are either against a cell with no room, or at the limits of the topology.
If there are two or more rooms in the list of unique neighbors, your cell has more than one neighbor.
If there is only one room amongst all the neighbors, then you are encapsulated.
Interestingly, this may be easier to achieve by getting the boundaries of all rooms in the PlanTopology, patching those into a surface, and merging those surfaces into a polysurface. From there you can take any face, pull it’s edges, and then get the adjacent faces from each edge. From there you can pull the unique set of faces from each sublist.
If any edge returns only on face (by default the original) the original face is on the limits of the topology.
If the unique set of all faces returned by the bounding edges is more than two faces, the original face is not encapsulated.
If the unique set of all faces returned by the bounding edges is only two faces, then the original face is encapsulated.