# Complex Room Numbering for A Stadium

Hello community,
This is my first topic to raise the problem if I can find the solution that I will be the hero.
I have some background on Grasshopper-Rhino environment. However, I face additional problems needs to be solved in Revit environment as well.
I have a stadium model which its rooms must be numbered according to the rules mentioned in the following capture.

How should I combine Primary, Secondary and Tertiary rules, I need some supplementary ideas which I don’t have for now.

1 Like

Let me be more clear and simplify it. I guess it would be better if I run script bay by bay. So we do not need the Primary rule. Secondary and Tertiary rules would be OK.
The secondary is along with the Radial direction it will be ascending toward to center of the radial grid of the stadium.
The tertiary is related to the Clockwise.
Below capture indicates rooms which need to be numbered in zone A-B.

The problem with rules like this is there is always an exception and so programmatically won’t get things 100% right. As such a human factor is needed to work it out.

My method to accomplish this and save tons of time would be to use a renumber by spline technique.

Draw a model line as a spline which follows your rules, and then select by that and renumber acordingly. Search the forums for renumber by spline as that will be easier. Remember you can edit this after the fact as needed.

3 Likes

Possible steps …

1. First group the seats by Primary Direction (AB,BC,CD and EF)
2. Within each group create sub groups based on Tertiary Direction
3. Within each sub group sort by Secondary Direction (001-003,004-007,…022-025,027-028)
4. Flatten (fully or partially) and number sequentially

@brsdmrc Give it a shot and share your attempts. Though each of the above steps would require quite a bit of work, you might actually find it far less daunting than you now think it is.

1 Like

Was this for seats or rooms? Seats are easy by comparison as they have a more consistent shape/location point.

I guess the spline method will not be an entire solution due to multiple pass conditions in many cases. Maybe I can think about adding one more rule to eliminate 2nd and 3rd pass of the spline.

By the way this is for rooms, not seats.

List.Unique items.

Anyway, drawing spline or similar path requires some workmanship. Instead, I convinced my manager to change the rule to more simple one such as counting room centroid as per northing value ( stadium layout x and y axis perfectly match with global northing and easting). We do not have to solve every problem in the digital environment, sometimes negotiation and convincing people with different solutions can be more reliable and applicable for future usage.

Clicking to define the room number would be the simplest way to resolve this and avoid the problem anomalies which you would invariably encounter as @JacobSmall mentioned. ARUtils and ProruBIM I believe have tools which already do this which you could use as precedents.

Answering to your first option for numbering, sorting points radially is quite simple by giving a centre and location points (see file attached and gif below).

The difficult part would be in your case to define which location point to consider per room, theoretically (considering only room point location) :

1. Group rooms per Bay (using Revit spaces, they can be group under Zones which would help, using rooms maybe worth adding a parameter to identify which bay they belong to? Good for scheduling later on as well ).

2. For each group > get all room locations and sort them by angle. In case two rooms have the same angle, I would group them by distance to centre and sort them descending, so the furthest will come first.

3. Flatten list per group, assign numbering and add bay code.

You need to take into consideration which vector is used to measure the angles on each bay, as in the case of the northern one using the Y axis will sort them starting from the middle.

On the second example from the dyn file, it is tested how points with same angle from centre point are handled (in this case, further points come first).

Hope it helps

SortPointsByAngle.dyn (50.0 KB)

2 Likes

Here is a little example, considering a bay. The Room location point determines it’s number …

Before…

After…

2 Likes

When I was developing simplified rules, what you did(radial sequencing) was my 2nd option which is not preferred by the decision maker. However, scriypt you added seems useful, I am gonna inspired from it to combine with my stuff. Thanks a lot.

Have used a reference line to indicate the direction towards the FOP, in my example below
To alter the sequence shift the room center or change the grouping interval (currently 5000mm)

1 Like

Nice! Please share the final outcome for further references

@Vikram_Subbaiah
Vikram thanks for your full support. Still, I am trying to understand your approach (which is completely different than mine with similar results) in each step of code to earn new things and I learned from you shortcut of set room number

I have one more issue that I need to solve: Sorting rooms as per centroid( volume center) point of room or base area.
Our sorting above works as per manually defined room point which I do not like. In addition you may think make those points centroid, however, I have many L type rooms which its centroid is out of room boundary.

When I use Room.CenterRoom node this happens

1 Like

Obtain the centroid of the element from the solid geometry of the room element.
Like this…