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
662 Views
6 Replies
Message 1 of 7

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
663 Views
6 Replies
Replies (6)
Message 2 of 7

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 7

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 7

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 7

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 7

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 7

kstamp0318
Enthusiast
Enthusiast

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

I appreciate your testing and sharing!

0 Likes