Hi, I’m trying to make an “accessibility script” to check if you meet different requirements for sizes and widths.
With this script you can paint the rooms that are under 15 sqm in a red color - the 15 sqm you can change as you like.
Then I tried to change it to be about the dimensions. And e.g. get the rooms that have a width of less than 3500 mm. to turn red or the dimension lines to turn red. But here it reports errors.
The purpose of the script is to quickly and easily identify spaces or corridors that are too narrow according to current rules. Or to identify areas in front of lifts to ensure widths that are wide enough for wheelchair users
Someone who has an idea to solve the problem?
For rectangular-shaped, orthogonally-aligned rooms, you can use a Bounding Box Min-Point and Max-Point to get the X and Y dimensions of a room.
The problems I would expect are irregular-shaped rooms and rotated rooms. Corridors tend to be either or both of these which can complicate things.
For specific locations like areas in front of lifts, you can place an element representing the minimum clearance and then generate a clash check to see if that clearance zone is free of obstruction.
EDIT: How to find the center path of a surface - #12 by Yna_Db
This looks to be a useful read on the topic.
Hard to tell what your issue is without seeing any of your inputs or the error. I’d guess you have an invalid object.
That post is a good start. I think there is an even better solution in checking all doors via clearance zones as noted, and then generating a path of travel from the room being checked to each door and confirm it has the required clearance (which is what is really desired rather than the base value set). This would require some degree of finesse as the values the built in tool may not have a required state for clear space. Offsetting the room boundary by 1/2 of the required width could help expedite and allow an easier use of the tool.
Limited practice with Path of Travel, I remember the generated lines tend to run tight to corners vs centerline pathing, is there a way to modify this? Otherwise you run the risk of false clash positives along the pathline for oddly shaped room/door configurations.
Yes - you can add waypoints now to ‘pull off the wall’, but original points will ‘hug corners’ which can cause issues. However if you set your waypoints to be 2’ away from the door you passed though, and check the ‘closeness’ to obstruction geometry at each ‘turn’ (you can pull the geometry and you’ll see the paths are segments of lines, as can be seen in this screenshot), and that can be used to ‘confirm clearance’.
A better algorithm would avoid the need to rework the original path, but that requires writing that tool. The original link gives a great breakdown on ‘how’ that could be written.