CSV is point inside room

Hi all,

I have the following problem that I am seeking a solution to. I have a long list of survey control points (± 2500) that are located in a large transportation hub across various levels. The floors of the building are not always at the same height (i.e 2nd floor may step numerous times). I have the accurate 2D floorplan of each level, and its ceiling height.

I want to assign the points a description based on whether they are located on a relevant floor (cannot be done by Z value of the point as per reason stated above). I want to create a few “rooms” in revit (yes it may be some enormous rooms) and then draw my points from a CSV file. Then run room.isinsideroom via revit and it needs to check in which “room” the point is in, and assign a description to the point based on the room name.

I hope this makes sense, and I think it should be possible using revit and dynamo but want to see if this is even possible and what you guys think.

Thanks

Sounds possible to me, but I don’t understand how the Z value wouldn’t correspond to the elevation.

Yes, I agree with Jacob that it is possible

An issue might be that Revit rooms are a single height (base or top not stepped) so you might need to split the rooms (say room 23A, 23B, 23C) or otherwise model them as something else (such as masses)

1 Like

@jacob.small Hi. the building steps and slopes a lot so in one area a FFL of 2.0m might be on ground floor, but as you move along the ground floor slopes down and eventually has 1st floor above you where the 1st floor FFL is 2.0m. So now two different points with same height are located on different physical levels. I need to know in which physical space its located.

@Andrew_Hannell Yeah I will probably be created a few hundred rooms at the end, but still better than manually classifying them. And once its set up it should be automated after every survey to check where the new control points are. yeah I was thinking there might be a similar but simpler answer to rooms, but the room.isinsideroom Point Inside Room will porpably be my first attempt and then see how it goes.

thanks for the input

1 Like

you’d use Geometry.DoesIntersect if they were modelled as something else (such as masses)

@Andrew_Hannell

Hi Andrew,

hoping you might be able to assist. Below is my current structure and it in essence does what is required.
I have changed it now to just show results based on selecting 1 room. If its changed to lace “all elements of category , element” to “room.isinsideroom”, then each xyz point is also checked against other rooms, but then if not in that room then lists as “check again” for each point, giving many false values.

I want to create it in such as way that it takes a point then compares to each room and only if in that room it should give a result. So I believe it should iterate through each point, check if its in a room and only if its in no room it should give “false”, otherwise it should list in which room it is

Hope this makes sense

you are on the right track

the best way to test the logic of these things is with a small data set so that you can see what is going on. For example, in the below:

  • the light fitting 1 is not within any of the objects A-E
  • fitting 2 is within A
  • fitting 3 is within B
  • fittings 4&5 are within C
  • fitting 6 is within both D&E (it is right on the boundary)

So in the true output of the List.FilterByBoolMask, you get:

  • 1 does not appear anywhere
  • A2
  • B3
  • C4 & C5
  • D6 & E6

likewise with the CSV output- just need to filter out the true values

hope that explains it

1 Like

@Andrew_Hannell

Thanks for all the help. I think I finally came to a usable script to do what I need.

It may not be complete and may need updating/revisions, but for the moment it will do and need minimal editing of the final Excel file.

For those that would like it, it is attached.

I ended up having to use room.ispointinside. The geometry.doesintersect and boundingbox methods did not work on complex polygon shapes.

CSV input it P E N Z and output file is that col1 is each point compared to if it is within room 1, if it is it return room name, otherwise return “undetermined”, col2 is each point compared to room 2. I have 15 very very big rooms so will work in my example. Adjust as neededroom points 2.DYN (19.6 KB)

@dirkiekunzuys

thanks for the update Dirk- always good to know what the outcome was

Andrew

Update

The limitations of the rooms ability to be more than a polygon extrusion has led to me use the nodes as suggested by Andrew earlier.

I am creating the comparison areas using generic models. Then at each point in the CSV file I am created a small sphere and comparing if the generic model intersects with each sphere.

So create all the spheres > select generic model to be checked > run comparison > write results

The only problem I have run into thus far (which is probably very solvable with some research) is that the sphere has a minimum radius, 10mm. In some cases control points are on glass mullions, meaning the may be inside or outside by the thickness of the glass. If the sphere is 10mm in radius, it may include into an area that it doesn’t fall within. Would be better of sphere could be 1mm in diameter.

to clarify something I said before:

that is not 100% correct. A room can have a stepped top face, but it comes with some big gotchas.
The volume computation model in the model has to be set to ‘Areas and Volumes’, then the room should be fully enclosed (but not always) with room bounding elements. Sometimes a small gap will cause it to be unenclosed, where sometimes a big gap is fine.

For example- this is ‘enclosed’

whereas this is not

If the room is properly enclosed- then you can use the geometry in Dynamo