Room data phase migration -- I'm stuck!

Hello, first time posting and very new to Dynamo and Python. I’m trying to push room data in one phase to rooms in another phase. I’ve probably over-complicated this so if I’m missing something obvious please let me know!

I uploaded the file in case you want to trace my logic, but here is the summary: I gathered the rooms, used a python script I found here to separate the rooms by phase, then I found the room boundaries, turned those into polycurves, extruded those as solids (to varying heights so I can visualize the phases a bit), and used the Solid.Difference node to look at where they overlap. I then compared the overlapping solids to the room placement points assuming that if the solids overlap and the point overlaps the solid they are the same room.

One of the issues I’m having is comparing two lists of points. Using Geometry.IsAlmostEqualTo got me part of the way there, but there are still some that are the same but not coming up as true. I also tried adding a rounding node.

Another issue is where I’m using the Room.AtPoint node from the Archi-lab package to turn the points I’m comparing back into rooms. I don’t know how to tell it to only pull from one phase.

Any help / advise / criticism is welcome. ThanksPush - Rooms from phase to phase.dyn|attachment (58.2 KB)

Hey Anne - what kind of data are you looking to push and what are you looking to achieve by comparing two list of points?

Hi Azubike, I want to push the name and room number (since we’re working on two phases simultaneously and this information will be in flux). I’m comparing the room placement point with the solid to find the room that makes up that solid. As I type that I wonder if there is a better way to back-track to the room.

So essentially you have two phases with the same number of rooms right? So you are trying to make sure the rooms are always in sync or at some point can be synced with the script. If that is what you are saying, one phase (phase A) must be the driver, already containing the room names or/and numbers. So you can test the room point in the second phase (phase B) with the room boundaries in phase A. That way you establish a set of true and false to know which rooms are the same in the two phases and then use get parameter from rooms in phase A and use that to set parameters corresponding to rooms in phase B. Make sense?

The two phases won’t necessarily have the same number of rooms but some rooms will be the same. Sounds like you’re suggesting comparing the room boundaries to check if the rooms are the same, that will probably be simpler than what I was trying with the points intersecting the solids. Thanks for your help, I will try this strategy!

Using the node “element.location” from the clockwork package, you can get the location points of room elements. Then test if those point are within a room.

Hope this makes sense?

Would you use a bounding box around the room boundaries to test if a point is within a room?

Just plug the room element to geometry.boundingbox. Then use the contains in boundary box to test.