Length and width formula for NOT square rooms, exist or no?

Length and width formula for NOT square rooms, exist or no?

kstamp0318
Enthusiast Enthusiast
1,597 Views
11 Replies
Message 1 of 12

Length and width formula for NOT square rooms, exist or no?

kstamp0318
Enthusiast
Enthusiast

I have seen and used multiple formulas for the length in the room tag. 
Every formula tried for length (listed below) can be inaccurate to the point of useless.

*Width is always area/length. 

(Perimeter + sqrt(Perimeter^2 - 16 * Area)) / 4

if(Area = (Perimeter / 4) ^ 2, Perimeter / 4, ((Perimeter / 2) - sqrt((Perimeter / 2) ^ 2 - 4 * Area)) / 2)

((Perimeter / 2) - sqrt((Perimeter / 2) ^ 2 - 4 * Area)) / 2

 

These barely work for rectangular rooms, sometimes giving one decent output with the other being way off.

They don't work at all for L shaped rooms - which is the main application other than rectangular rooms I would need. 
I'm really not talking about diagonal or oblong shaped rooms.  

 

Does a formula exist for these rooms or not? 
I can do it manually, but it would be ideal if someone could share the formula- if its even possible.

TIA

0 Likes
1,598 Views
11 Replies
Replies (11)
Message 2 of 12

Basam.Yousif
Advisor
Advisor

I believe an API or Dynamo script would be able to do this? it would extract the individual segments of each room's perimeter then identify the longest or whatever else you want. Or did I misunderstand? are you looking for the room's length to be listed in its tag?

Message 3 of 12

TripleM-Dev.net
Advisor
Advisor

How do you define a room Width or length?

Mostly we want the smallest width x length that fits the room.

 

In short there's no way in Revit to do this OOTB anyway, with formulas or otherwise

2 options sort of, manual with API/Dynamo.

 

But as rooms in a group can vary in shape/size, because the boundary can be different this won't be possible as length parameters.

 

Message 4 of 12

RDAOU
Mentor
Mentor

@kstamp0318 Thats because the formula you have picked up only works for Rectangular/Square shaped spaces. Quadratic Equations do not work for trapezoidal/rhombus shaped or L Shaped rooms. When a Quadratic Equation is aquarate however when it is used on trapezoidal/rhombus shaped quadrilaterals it will return the dimensions of the "Rectangle" with the area equal to that of the Rhombus or Trapizoid. (ie: instead of Lmin and Lmax it derives an L value in between to match the given width for that specified area)

 

For a reliable formula for quadrilaterals in general it should be based on BRETSCHNEIDER's equation and not the Quadratic Equation. When the quadratic-based solution was originally posted about 10–12 years ago (on a different forum), it was picked up and used by many users, including some who later reposted it here. However, very few understood how it works and why it only applies to quadrilaterals.

 

When the shape becomes L-shaped or anything other than a quadrilateral (e.g., triangular or pentagonal and beyond), things get more complicated. Geometrically speaking, formulas do exist, but in practice, it's much easier to handle such cases programmatically rather than using multiple tags with multiple formulas.

 

Quadratic.png

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 5 of 12

kstamp0318
Enthusiast
Enthusiast

Thank you for this informative and detailed response!
Often I think I know the answer to my own questions, but not having an extensive understanding of Revit's limitations - I'd really rather ask a more experienced professional. 
I think I was looking for an equation to compute Lmax and Lmin - as you kindly and clearly label in your response. 

For now I'll get to labelling my rooms manually, client's tend to dislike it when I present one room dimension and it's dramatically different from what will be built:/ 

 

Thank you again for taking the time to explain this question so well, it's appreciated!

0 Likes
Message 6 of 12

Basam.Yousif
Advisor
Advisor

Put together this quick Dynamo to test the theory - and it seems promising. A WIP for now ...

 

BasamYousif_0-1746225454123.png

 

Message 7 of 12

kstamp0318
Enthusiast
Enthusiast

Thank you! I keep meaning to test Dynamo, this gives me another reason.

I appreciate your testing and sharing!

0 Likes
Message 8 of 12

rcorza
Participant
Participant

Thanks for sharing this. Any updates on the testing? I've been looking for a way to calculate the length and width of irregular rooms, but as mentioned here, there's no exact way to do it with formulas.

0 Likes
Message 9 of 12

RLY_15
Advisor
Advisor

I don't really understand the intent behind portraying a room's area value with a configured length/width dimension if it's irregular, can you clarify what the goal is? What @Basam.Yousif posted already provides the pieces that you would need to interpret the answer - you may also get some value from pulling the axis-aligned BoundingBox of the space and comparing the box's length/width against the perimeter curves.

0 Likes
Message 10 of 12

kstamp0318
Enthusiast
Enthusiast

No update on my end. 
I created a substandard symbol with a calculation that as stated above only works with box rooms. So I rarely use that. 

I created another that has labels and I just hand write the dimension in. It sucks, but the best I could do for my small scale application.

If you find something, please let us all know. 

0 Likes
Message 11 of 12

kstamp0318
Enthusiast
Enthusiast

For me specifically; I design small custom homes where I create a preliminary design given to clients for approval before full construction drawings. Every client wants to know the simple dimensions of their rooms and a calculation symbol that does that for me would be amazing. I can do it by hand and I do, I recognize that this isn't a huge application but it would change my work flow and increase my efficiency. 

Thank you for your suggestion to pull the axis-aligning. It's a bit too much work for my need, but I appreciate it!

0 Likes
Message 12 of 12

RLY_15
Advisor
Advisor

Looking at RDAOU's example with trapezoidal shapes where the simplified dimensions run the full extent of the layout, I'm thinking the bounding box method actually is the way to go about it, since that would provide useful figures for things like purchasing flooring materials. Axis-aligned bounding boxes are also a newer feature in Dynamo (last 2-3 years?), so that may explain why it wasn't the previous go-to method.

0 Likes