Get corner points of rooms

Dear all,

I’m trying to get the corner points of rooms with dynamo for hours. In some cases, the script is working but in many cases, the result ist wrong. (see picture attached)

Anybody out there with an idea?

Thanks in advance,

Seems as the node only works within a given / pre definied area (marked circle):

I think you need to show more of your graph
Better is to upload it so we can check.

Here you are :slight_smile: UPLOAD.dyn (27.5 KB)

I think you can find a solution here:


Unfortunately not, because I need a list of the corner points in clockwise order. Also any intersections with another room-walls are falsely detected as a corner. I’ve tried this already. In addition, it should start in the upper left corner…

Ok, I see.Then probably this one should work:

  • Get room points
  • Find the top-right one
  • Reorder list according to it

edit: I just read you need the top-left, in this case you have to reorder the list to find the maximum PointX, and if you have multiple points with same PointX, find the one with maximum PointY. It’s a bit longer but feasible


The same story: Walls of adjoining rooms are also recognized as start-points… But smart solution using the shift-node. I’ve never used it before!

Can you please be more specific? Show a simplified clear example, with few elements, otherwise nobody will understand. What are those arcs? Separation lines?

The graph I showed you works fine for me, no conflict with other walls etc…

1 Like

I’ll be back on monday with a clear example! Thanks a lot for your help!

Hello again :slight_smile:

I want to count / mark the corners of all selected rooms. In this example I want to mark the corners of Room 3 (should be a total of six, as the blue markers show). Unfortunately, the code returns seven corner points, which results of the intersection (red mark).

Upload 1: Image with the error
Upload 2: Dynamo Script
Upload 3: Revit file

2: UPLOAD_v3.dyn (31.9 KB)
3: Example.rvt (1.8 MB)

Sorry for the late reply, I saw your post only few days ago and I was a bit busy. Now I understand it a bit better.

My strategy at the moment is:

  • Find the tangent vector at every point
  • Compare the vectors: if the vector is equal to the previous one, you get a true, if there is a change of direction, so the vectors are not equals, you get a false.
  • Use this mask to remove unwanted points (those not at the corner)

Hope this help, sadly I have no time to work more in depth.

RoomTopRightCornerPoints.dyn (38.7 KB)


Works like a charme - thank you!

Are you able to separate or count somehow the number of outward and inward corner’s?
So this would be 1 outward cornerand 13 inward corners:

Never mind, i figured it out with some basic math.
I hope this helps someone too :slight_smile:

1 Like

I’m new to Dynamo, please tell me!

What do “4” and “2” mean when they are count nodes?

We can look at rooms as basic right-angled shapes (angles are ≈ 90°).

If you look at this room layout above, count the angles and separate them as inward and outward, you will see a pattern:

Angle counter 2000
Inward Corner Outward Corner + enclosed walls (in my case allways 4) Total Number of Corners
4 0 4
5 1 6
6 2 8
7 3 10
8 4 12
9 5 14
10 6 16
11 7 18
12 8 20
13 9 22
14 10 24
. . .
. . .
. . .

Room 0 has 4 inward corners and 0 outward,
Room 1 has 5 inward corners and 1 outward… and so on…

Hence the formula:
Inward-4 = Outward

As an input for the formula I’m getting the total number of corners (ToT). As we know the total is Inward + Outward.
With some basic math we get that:
Inward = (ToT+4)/2

I have attached a test project, and the purged script
1234.rvt (1.7 MB) (Revit 2022)
1234.dyn (123.8 KB) (Dynamo for Revit 2022)

you will need to have these packages installed:


Good luck, and I hope this helps!

if you have irregular shapes you wont get whole numbers as values!


I understand !
Thank you for the very kind explanation. :blush: