I’d like to share my exploration into a topic that initially seemed relatively simple but quickly revealed its complexity.
I was in search of a script, component, or plugin that could generate a max reachability polygon—what I later discovered is also known as wavefront propagation. This method can be extremely useful for designing fire safety plans, especially in complex layouts.
After a few days of coding (and more vibecoding than I care to admit), I managed to put together a piece of code that, while a bit buggy, is somewhat functional. However, I’m aware that my skills are limited, and I’m feeling a bit exhausted by the process.
Here’s a brief rundown of my approach:
Clipping Polygons: This method didn’t yield the results I was looking for and tends to be too slow for handling complex geometries.
Mass Dijkstra: While this approach can work, it is heavily dependent on the grid resolution and will never provide a 100% accurate representation.
Normal Isovist: Although a standard approach, it suffers from speed and accuracy issues—the resolution is directly tied to the number of rays cast, and it often encounters problems with self-intersections around corners.
Given these challenges, I decided to create a custom, fast isovist-like logic specifically designed to address the issue of self-intersections at corners.
If anyone is interested in this topic, has alternative solutions, or would like to help fix the bugs, please feel free to share your insights. I’d be very grateful and curious to see what others have to offer!
For those of us not familiar with Fire Safety Planning, do you have a link to a diagram, building code, or more info to read up on for this topic that inspired you to go down the scripting route on it?
-does one need to show a polygon and/or path in their fire safety plans?
-is this for visualization only or for construction documentation?
I think that would be helpful to gauge the algorithm and help improve it or provide ideas.
The the general rule in most fire codes is that from every point of the room/hall/factory floor etc. there should be a fire exit at no more than X meters.
The idea is to visually ispect the area covered by the 2 or 3 or whatever number of fire escape exits that a room has, if they overlap or don’t. At every point of this polygon one will have a path shorter than X.
Yes I checked that. I call that Mass djisktra because from I understand - you still make a mesh,right? And the results are -“raster”, right?. My approach is entirely geometric - and the results are “vector”.
Not an answer as you want exact value, but here an example using Heat Method from CGAL.
Not super precise, but seem to be near the percent (1%). Not sure when I will publish it.