# Visual Language-Aided Construction Fire Safety Planning Approach in Building Information Modeling
## 3 Structure of Con-fire Safety Planning Approach
### Design for Construction Fire Safety (DCFS) Module
#### 3.2.1 Design for Firefighting Equipment Installation (FEI) Module  
This subsection focuses on fire protection and leverages the visual language approach to acquire BIM-based portable firefighting equipment safety planning in construction. The script is initiated with the extraction of geometric data as input from the 2D plan. As depicted in Figure 3, the method allows the user to define the following four (U1, U2, U3 and U4) conditions: U1 is importing building borderlines (BL) as a 2D plan geometry, U2 is to determine the plan interior walls (IW) as a 2D line geometry, U3 is to define stair locations (SL) as pick points, and U4 is intended to choose fire extinguisher type from the dropdown list that includes type 2A and 10B. According to the OSHA rules, 1926.150(c)(1)(i) A fire extinguisher, rated not less than 2A, shall be provided for every 3,000 square feet of the protected building area, or significant fraction thereof. Travel distance from any point of the protected area to the nearest fire extinguisher shall not exceed 100 feet. Where the Dividing Distance of 2A (DDA) fire extinguisher type is 100 ft, and the area is 3000 square feet. Similarly, The OSHA article 1926.150(c)(1)(vi) revealed the Dividing Distance of rated not less than 10B (DDB) fire extinguisher type is 50 feet.  
In the FEI Module, the algorithm uses the Voronoi Grid to generate a building centerline (CL), as shown in Figure 3. The building centerline (CL) used in this research refers to a 2D line located in the center of a closed curve of the building borderline (BL). To generate the fire extinguisher's initial locations, the program divides the building centerline by the number of the fire extinguisher obtained from the division of the surface area of the building and the advised required area by OSHA, which is 300 square feet. Thereafter, these initial locations are moved to their closest interior walls (IW) in order to create a fire extinguisher location (EL). The algorithm divides building borderline (BL) into a random number of points (A) to test the shortest walk distance between BL and EL. The algorithm verifies the appropriate location of the fire extinguishers by using the shortest walk logic. The shortest walk logic is a pre-designed component in the visual programming tool (grasshopper). It populates the building surface geometry with points then creates connection lines between points using proximity two-dimensional logic. After that, the algorithm calculates the shortest walk between the locations of random points A and their nearest fire extinguisher cluster locations (EL) and calculates a network of paths between them. The system then measures the closest route curve length (D) and evaluate it in an if statement: as, If D is less or equal to distance advised by the rule that could be DDA or DDB (based  
Figure 3: System architecture for Con-fire safety planning approach.  
on the user selection U4), then do nothing, If D is higher than U4 then divide D over U4 and round up as illustrated in the below equation.  
\[\text{if}(\text{D}\leq\text{U4}),\ Return\ Null\] \[\ else\] \[\ Roundup\left(\frac{D}{UA}\right)\]  
Based on the result of the if statement, the algorithm considers the addition of new fire extinguisher to the existing fire extinguisher cluster. Then, the system automatically moves the fire extinguisher cluster to the closest wall (interior walls imported by the user) and moves in the z-direction by 3 ft. The algorithm creates this portable firefighting equipment plan inside the rhinoceros environment as an (.obj) file. Then this plan is integrated into the BIM model inside a commercially developed Revit program using Rhinoceros WIP add-on.