DEVELOPMENT OF BIM-BASED QUANTITY TAKEOFF FOR LIGHT-GAUGE STEEL WALL FRAMING SYSTEMS

SUMMARY: Quantity takeoff based on building information modeling (BIM) is more reliable, accurate, and rapid than the traditional quantity takeoff approach. However, the quality of BIM models affects the quality of BIM-based quantity takeoff. Our research focuses on drywalls, which consist of wall framings and wall panels. If BIM models from the design phases do not contain wall framing models, contractors or sub-contractors cannot perform quantity takeoff for purchasing materials. Developing wall framing models under a tight schedule in the construction phase is time-consuming, cost-intensive, and error-prone. The increased geometries in a BIM model also slow down the software performance. Therefore, in this research, an automatic method is proposed for calculating quantities of wall framings from drywalls in a BIM model. Building elements that overlap with the drywalls are subtracted from the drywall surfaces before calculation. The quantities of wall framings are then embedded into the properties of drywall in the BIM model and hence they can be extracted directly from the BIM model. A prototype system is developed and the proposed method is validated in an actual construction project. The results of the case study showed that the prototype system took 282 s to deliver accurate quantities of wall framings with deviations of 0.11 to 0.30% when compared to a baseline, and the file size of the BIM model after applying the proposed method was increased very slightly from 47.0 MB to 47.1 MB. This research contributes to developing an approach for quantity takeoff of wall framings that are not present in a BIM model. Accurate quantities of wall framings can be obtained while the time and cost of developing wall framings for quantity takeoff can be saved. The proposed method does not increase the geometries in the BIM model; therefore, the file size of the model does not increase greatly, which stabilizes the software performance.


INTRODUCTION
Quantity takeoff is a process in which building materials or work tasks are measured and calculated (Holm et al., 2005). Traditionally, the process is done manually based on 2D construction drawings, which include floor plans, elevations, sections, and other detail drawings. The development of computer-aided design (CAD) and spreadsheet software improves the ease and efficiency of measurement and calculation (Brook, 2017). However, the process still requires manual work and human interpretation, which are time-consuming and error-prone (Juszczyk et al., 2014;Monteiro and Martins, 2013).
Building information modeling (BIM) is a recent technology that has allowed a new approach to quantity takeoff called BIM-based quantity takeoff. All building elements in a BIM model consist of computable graphics and data attributes; therefore, the quantities of building elements can be obtained directly from a BIM model (National Institute of Building Sciences, 2007;Sacks et al., 2018). This approach reduces the measurement time and enables more reliable quantity takeoff (Bečvarovská and Matějka, 2014;Nadeem et al., 2015;Sacks et al., 2018;Sattineni and Bradford, 2011). However, BIM-based quantity takeoff is not completely flawless and automatic. If building elements in a BIM model are incomplete or incorrect, the material quantities can deviate from actual values or cannot be extracted from the model. Therefore, building elements in a BIM model must contain appropriate details to allow accurate quantity takeoff (Andersson et al., 2016;Hardin and McCool, 2015).
Building elements that consist of sub-components or multi-material layers complicate quantity takeoff. Examples of these elements include walls, floors, ceilings, and roofs. In the traditional quantity takeoff method, each subcomponent or material layer must be measured manually by quantity surveyors. In BIM-based quantity takeoff, building elements must contain all sub-components or material layers required for quantity takeoff. Furthermore, the sub-components or material layers must be modeled by an appropriate method that represents the actual construction to obtain accurate quantities (Khosakitchalert et al., 2019c;Zima, 2017).
Among these building elements, the research focuses on the wall element because it is the most difficult element to perform quantity takeoff. Walls usually have regions that overlap with other building elements, such as doors, windows, columns, beams, and floors, which should be subtracted before measuring quantity. In addition, the research specifically focuses on drywall, which is a wall type that consists of a wall framing system as a core structural layer and wall panels, such as plasterboard, gypsum board, or wood board, as finish layers. In the tendering phase, only the area of each wall layer needs to be measured for cost estimation (Packer, 2016; Royal Institution of Chartered Surveyors (RISC), 2012). Nevertheless, in the construction phase, the sub-components in a drywall, which are wall framings, must be measured by a general contractor or sub-contractor for material purchase. Therefore, the wall framings must be created in a BIM model if BIM-based quantity takeoff is going to be used. However, BIM models from the design phase may not contain some components, including wall framings, and hence contractors must develop their own BIM models (Olsen and Taylor, 2017;Sattineni and Bradford, 2011). Developing BIM models manually under a tight schedule during the construction phase is challenging and time-consuming for construction practitioners (Liu et al., 2018;Sattineni and Bradford, 2011). Model errors due to time constraints can occur and cause deviations in the material quantities. Furthermore, the increased geometries in BIM models for large-scale projects also affect the file size and the software performance (Khosakitchalert et al., 2019c;Sacks et al., 2018). Therefore, a new approach to calculating quantities of wall framings from a BIM model that does not contain wall framing elements is required. This paper presents a BIM-based quantity takeoff approach for calculating quantities of wall framings from drywalls in a BIM model. The objectives of this research are as follows: (1) to develop and improve the algorithms for calculating accurate quantities of wall framings, (2) to develop a method for embedding quantities of wall framings into the drywall elements in a BIM model, and (3) to reduce the working time and avoid human error in obtaining quantities of wall framings. The wall framing system used in this research is a light-gauge steel wall framing system for non-load bearing walls because it is commonly used nowadays instead of a wood framing system (Packer, 2016). The proposed method automatically generates drywall surfaces from a BIM model and subtracts the regions of the surfaces that overlap with doors, windows, columns, beams, and floors. The surfaces after subtraction are used to calculate the location and the length of each member of the wall framing. The quantities of wall framings are embedded into the drywall properties in the BIM model, and quantities can be obtained directly from the model. Our method is faster and easier than creating detailed wall framing models for quantity takeoff. The proposed method is based on our previous research (Khosakitchalert et al., 2019b), significantly improves the calculation algorithms, and extends the ability to store the calculation results in the drywall elements of a BIM model. This paper begins with a literature review. An overview of the proposed method is described, and then the development of the prototype system in Autodesk Revit 2018.2 and Dynamo 1.3.3.4111 is explained in detail. A case study, which is an actual construction project, is used to verify the prototype system and validate the proposed method. The quantities of wall framings from the proposed method are compared with the quantities of wall framings from the BIM model containing wall framing models and traditional quantity takeoff methods. Then, the results and limitations are discussed and the conclusions are summarized.

BIM-based quantity takeoff
BIM is the use of a digital representation of a built asset as a shared knowledge resource to form a reliable basis for decisions during the design, construction, and operation process (ISO, 2018;National Institute of Building Sciences, 2007). Because all building elements in BIM are object-based models, BIM can be used to extract quantities and other information directly from the building model elements (Sacks et al., 2018); thus, BIM-based quantity takeoff is more reliable, accurate, and rapid than the traditional quantity takeoff (Bečvarovská and Matějka, 2014;Nadeem et al., 2015;Sacks et al., 2018;Sattineni and Bradford, 2011).
In traditional quantity takeoff, the lack of details in construction drawings lowers the accuracy of quantity takeoff (Nani and Adjei-Kumi, 2007;Smith, 2014). Similarly, the lack of details in BIM models affects the quality of BIM-based quantity takeoff (Khosakitchalert et al., 2019c;S. Kim et al., 2019;Smith, 2014). Moreover, checking the quality of complex BIM models is challenging for construction practitioners (Smith, 2014(Smith, , 2016. Therefore, the level of development (LOD) and modeling guidelines should be determined before developing BIM models for quantity takeoff (Firat et al., 2010;Smith, 2016;Wood et al., 2014). The LOD specifies the degree of geometry and attached information of each building element in a BIM model (BIMForum, 2019), which affects the accuracy of quantity takeoff directly (Peansupap and Thuanthongdee, 2016).
The effects of the modeling method and the LOD on BIM-based quantity takeoff have been studied. Monteiro and Martins (2012) surveyed the strengths and weaknesses of different modeling methods for walls and floors. Zima (2017) found that separating each wall layer according to the actual construction provided the best quantity takeoff accuracy. Yun and Kim (2013) studied various modeling methods for reinforced concrete structure and proposed a suitable modeling method for BIM-based quantity takeoff. S. Kim et al. (2019) examined the deviation of material quantities of building interior components for different modeling methods. Peansupap and Thuanthongdee (2016) investigated the LOD for a precast concrete floor to use for cost estimations during bidding and material purchasing. They found that the BIM model of the precast concrete floor for material purchasing needed additional details, which are wire mesh and rebar models.
In general, modeling problems in BIM-based quantity takeoff have been tackled by methods to automate the modeling process or by algorithms to calculate the material quantity from the existing BIM models. S. A. Kim et al. (2009) developed an automatic system that generates interior wall finishes for accurate BIM-based quantity takeoff. Kannan and Santhi (2013) created parametric BIM components for concrete formwork and used them in a high-rise BIM model. Liu et al. (2015Liu et al. ( , 2018 reported an automatic system to generate the boarding layout of drywalls in a BIM model with the lowest material waste. Lim et al. (2016) proposed an automatic algorithm to calculate quantities of rebar from 3D structural models. Cho and Chun (2015) developed a method that integrates quantity takeoff logics and data mining techniques to estimate quantities of reinforced concrete structures based on BIM models. Rajabi et al. (2015) created a system to estimate quantities of lighting and heating appliances from BIM models that do not contain those appliances. Khosakitchalert et al. (2018Khosakitchalert et al. ( , 2019c reported a method that uses the capability of BIM-based clash detection to subtract the overlapping quantities and add missing quantities of walls and floors. Khosakitchalert et al. (2019a) proposed an algorithm to calculate quantities of concrete formwork from BIM models with no concrete formwork models.

Light-gauge steel framing system
At present, a light-gauge steel framing system is used as an alternative to a wood framing system in drywall construction (Packer, 2016). The system is similar to the wood framing system in principle although the wood members are replaced with light-gauge steel members. According to the installation guides for a light-gauge steel framing system for non-load bearing walls from the wall framing suppliers (The Siam Cement Group Public Company Limited, 2016; The Siam Gypsum Industry (Saraburi) Company Limited, 2015; USG Australasia, 2011), the horizontal members have a U-shaped steel section and are called U-tracks, whereas the vertical members have a C-shaped steel section and are called C-studs. The components in a light-gauge steel framing system are illustrated in Fig. 1. The U-track at the top of the wall attached to a ceiling or a soffit of a floor above is called the top track. The U-track at the bottom of the wall attached to a floor is called the bottom track. The U-track between the top and bottom tracks is called the nogging track. The spacing value of the nogging tracks depends on the need for bracing to prevent studs from rotating and buckling. The U-track at the top of a door or window is called the header track. The U-track at the bottom of a window is called the sill trimmer track. The C-stud installed between the top track and the bottom track is called the common stud. The C-stud installed between the top tracks and the headers or the sill trimmers and the bottom tracks is called the jack stud. The general spacing value of C-studs is a maximum of 600 mm center-to-center. The C-stud at each side of the opening should use two C-studs combined into one boxed stud for better strength. Furthermore, extra C-studs are needed at the intersections and the corners of drywalls. Two possible details, which depend on the construction site, are shown in Fig. 2 (The Siam Cement Group Public Company Limited, 2016; The Siam Gypsum Industry (Saraburi) Company Limited, 2015; USG Australasia, 2011). Construction detail A has one extra C-stud at a corner and a T-intersection and has two extra C-studs at a cross intersection. Construction detail B only has one extra C-stud at a cross intersection.

Quantity takeoff of a wall framing system
Light-gauge steel framing members are sold by the linear meter; therefore, their quantity is measured by length. Traditionally, there are two quantity takeoff methods for wall framings: by wall framing spacing and by wall framing per area (Holm et al., 2005). Additional interviews with quantity surveyors in Thailand, where the case study in the validation section took place, gathered more details about both methods.
The first method calculates the lengths of the wall framings from the wall dimensions (lengths and heights) and spacing values of C-studs and U-tracks. The length of the U-tracks is calculated by the following method. The wall height is divided by the spacing of the U-tracks and the result is rounded up to a whole number and one is added for the end track. This yields the number of U-tracks. Finally, the number of U-tracks is multiplied by the wall length to get the total length of the U-tracks. The length of the C-studs is calculated by the following method. The wall length is divided by the spacing of the C-studs, and the result is rounded up to a whole number and one is added for the end stud. This yields the number of C-studs. The number of extra C-studs at the intersections, corners, and openings is counted and added to the number of C-studs. Finally, the number of C-studs is multiplied by the wall height to get the total length of the C-studs.
The second method calculates the lengths of the wall framings from the wall areas and the lengths of the C-studs and U-tracks per square meter. The wall areas should be the net areas with the doors, windows, and other elements that overlap with the walls subtracted. The length of the U-tracks is calculated by multiplying the wall areas by the lengths of the U-tracks per square meter. The length of the C-studs is calculated by multiplying the wall areas by the lengths of the C-studs per square meter. Then, the length of extra C-studs at the intersections, corners, and openings, which is calculated by multiplying the number of extra C-studs by the wall height, is added for more accurate results.
Both methods are estimations; therefore, the results could deviate from the actual values. However, the methods are faster and more practical than counting the actual number of wall framings. Furthermore, most construction drawings contain only typical details of wall framings, not the full details of the wall framings. Therefore, it is impossible to count the actual number of wall framings from the construction drawings.
When using BIM for quantity takeoff, wall framings must be created in a BIM model to extract the accurate quantities of wall framings. According to the LOD specification 2019 (BIMForum, 2019), the drywall at LOD 350 and higher contains wall framings in the drywall model, which can be used for quantity takeoff. However, wall framing is a building model element that is usually absent from the BIM models given to contractors or subcontractors (Olsen and Taylor, 2017). Therefore, contractors or sub-contractors must develop their own BIM models for quantity takeoff, which is difficult, time-consuming, and costly (Franco et al., 2015;Liu et al., 2018;Sattineni and Bradford, 2011). Modeling time can increase by a factor of 2 to 11 when switching from one LOD to another (Leite et al., 2011). Moreover, manual modeling under time pressure can result in model errors, resulting in inaccurate material quantities (Liu et al., 2018).
The automation of modeling wall framing systems has been proposed, but most work has focused on the wood framing system. Manrique et al. (2015) proposed a system that automatically creates 3D CAD models and shop drawings of the wood framing system. Abushwereb et al. (2019) developed a prototype system for generating wood framing models in the Autodesk Revit platform. Also, there are some commercial Revit plug-ins that can be used to generate wall framings, such as Wood Framing Wall and Metal Framing Wall (AGACAD, 2020). However, the approach that generates wall framing models causes increased geometries in a BIM model, which consume more memory resources and slow down the processing time of the software (Khosakitchalert et al., 2019c;Sacks et al., 2018). The proposed method will introduce another approach by calculating quantities of wall framings and embedding them into the drywall elements in a BIM model, and hence the wall framing models are not necessary to be created for quantity takeoff. Furthermore, the previous systems and commercial plug-ins do not consider the overlapping regions of drywalls with other building elements, which can result in excess wall framing quantities. Therefore, our proposed method in this study will include an algorithm that can detect and subtract the regions of drywalls that overlap with other building elements.

OVERVIEW OF THE PROPOSED METHOD
In our BIM-based wall framing quantity takeoff (BWFQT) method, building model elements, including walls, columns, beams, floors, doors, and windows, are imported from a BIM model to the system via an application programming interface (API). The building model elements should be at least at LOD 300, which will have the exact size, shape, orientation, and location (BIMForum, 2019), for accurate calculation. The algorithms automatically generate drywall surfaces from the imported building model elements and then calculate the location and length of wall framings (C-studs and U-tracks) from the drywall surfaces and the input spacing values of the wall framings. After that, the quantities of the wall framings are stored in the drywall properties in the BIM model to allow the model to be used for quantity takeoff.
The BWFQT method comprises six major processes (see ). Process 1 generates drywall surfaces from a BIM model. The drywall elements are selected from a BIM model. The drywall surfaces along the length of the walls are created, and then building elements, which are columns, beams, floors, doors, and windows, that overlap with the drywalls, are subtracted from the drywall surfaces. This yields the subtracted drywall surfaces that can be used to generate lines that represent wall framings. Process 2 generates lines that represent U-tracks (horizontal members), which consist of top tracks, bottom tracks, nogging tracks, header tracks, and sill trimmer tracks. The lines that represent top tracks are obtained from the lines at the top edge of the drywall surfaces. The lines that represent bottom tracks are obtained from the lines at the bottom edge of the drywall surfaces. The lines that represent nogging tracks are generated from the input spacing value of U-tracks and the distance between the top and bottom tracks. The lines that represent header tracks are obtained from the lines at the top edge of the door and windows. The lines that represent sill trimmer tracks are obtained from the lines at the bottom edge of the windows.
Process 3 generates lines that represent C-studs (vertical members), which consist of common studs and jack studs. The lines that represent common studs are generated from the input spacing value of common studs and the length of each segment of drywall. The lines that represent jack studs are generated from the input spacing value of jack studs and the length of each header or sill trimmer.
Process 4 generates lines that represent extra C-studs at intersections and corners. These lines are generated according to different construction details. For construction detail A (see Fig. 2), one extra C-stud is needed at a corner and a T-intersection, and two extra C-studs are needed at a cross intersection. For construction detail B (see Fig. 2), one extra C-stud is needed at a cross intersection. Users choose construction detail A or B as an input. Then an algorithm generates the lines that represent extra C-studs at each intersection and corner.
Process 5 generates lines that represent extra C-studs at both sides of openings. Users can enable this process when two C-studs combined into boxed studs are used at both sides of openings (door and windows). If this process is enabled, the algorithm generates the lines that represent extra C-studs at both sides of openings.
Process 6 calculates quantities of wall framings and embeds them into the properties of the drywalls in the BIM model. New parameters, including the lengths and the number of U-tracks and C-studs, are added to the properties of the wall elements. All lines that represent wall framings from processes 2-5 are separated into each drywall. The lengths and the number of lines in each drywall are calculated and written to each new parameter. All the drywall elements contain the quantities of wall framings, which can be extracted directly from the BIM model.

DEVELOPMENT OF THE PROTOTYPE SYSTEM
Autodesk Revit 2018.2 and Dynamo 1.3.3.4111 were used to develop the BWFQT prototype system. Dynamo is an open-source visual programming extension in Autodesk Revit that allows users without a programming background to develop algorithms and visualize results (Autodesk, 2016). Dynamo scripts can also be run directly in Autodesk Revit using the Dynamo Player feature, which is faster and easier than opening the Dynamo extension.
The explanation of the development of the prototype system is divided into six major processes according to the proposed method in Section 3. All the processes are general for any BIM software product, except the parts that relate to Revit API, including the part that inputs model elements from a Revit model in process 1 and the parts that create new parameters for wall elements and write data to those parameters in process 6. A small BIM model, which consists of precast concrete walls and drywalls that overlap with structural columns, structural framings (beams), floors, doors, and windows, was created as an example to illustrate the prototype system (see Fig. 4).  Fig. 5 shows the flowchart for process 1: generate drywall surfaces from a BIM model. First, building model elements, including walls, structural columns, structural framings (beams), floors, doors, and windows, are imported from a BIM model to the system (see Fig. 6a). The wall type name of a target drywall is input manually into the system by a user. The system extracts the wall type names from the input wall elements and compares them with the wall type names input by the user. The wall elements with the same wall type name as the input wall type name are selected and the rest are discarded (see Fig. 6b). The wall location lines and wall heights are extracted from the selected wall elements (drywalls). The wall surfaces are created by extruding the wall location lines by the wall heights (see Fig. 6c). In the second step, the input structural columns, structural framings (beams), floors, doors, and windows are converted into geometries and combined into an integrated geometry. The wall surfaces are checked for their intersection with the integrated geometry and overlapping regions of the wall surfaces are subtracted (see Fig. 6d). Process 1 provides the subtracted wall surfaces, the wall location lines, and the wall heights, which are used in processes 2-6.   Fig. 7 shows the flowchart for process 2: generate lines that represent U-tracks. The process is broken down into processes for the top, bottom, nogging, header, and sill trimmer tracks. For the top tracks and the bottom tracks, the perimeter lines of the subtracted wall surfaces from process 1 are extracted. The algorithm selects the lines at the top edge of the wall surfaces to obtain the lines that represent the top tracks (see Fig. 8a). Another algorithm selects the lines at the bottom edge of the wall surfaces to obtain the lines that represent the bottom tracks (see Fig.  8b).  For the nogging tracks, first, the number of nogging tracks on a wall is calculated by dividing the wall heights from process 1 by the input spacing value of U-tracks and rounding up the results to a whole number. The number of nogging tracks and the spacing value of U-tracks are used to create a sequence of points on the Z-axis of the subtracted wall surfaces. Second, the wall location lines are duplicated to the points except for the first point, which is the location of the bottom track. The lines are intersected with the subtracted wall surfaces. The parts of the lines that are outside the subtracted wall surfaces, such as the regions of doors and windows, are eliminated to obtain the lines that represent nogging tracks (see Fig. 8c).

Process 2: Generate lines that represent U-tracks
For the header tracks and the sill trimmer tracks, first, the door and window surfaces are created. The input doors and windows are converted into geometries and bounding boxes are created on the geometries. The wall surfaces before subtraction in process 1 are intersected with the bounding boxes. The results are the surfaces inside the bounding boxes, which are door surfaces and window surfaces. Second, the perimeter lines are extracted from these surfaces. The algorithm selects the lines at the top edge of the door surfaces to obtain the lines that represent header tracks at the doors (see Fig. 8d). Another algorithm selects the lines at the top edge and bottom edge of the window surfaces to obtain the lines that represent header tracks and sill trimmer tracks at the windows (see Fig.  8e).
Process 2 gives the lines that represent top tracks, bottom tracks, nogging tracks, header tracks, and sill trimmer tracks, which are used in process 6. Fig. 9 shows the flowchart for process 3: generate lines that represent C-studs. The process is broken down into processes for common studs and jack studs. For the common studs, first, the wall location lines are divided into segments by the locations of doors and windows. The corner points of the door surfaces and the window surfaces from process 2 are extracted and projected on the wall location lines from process 1. The points are used to divide the wall location lines into segments. Second, the divided wall location lines are used to calculate the location of the common studs. The divided wall location lines are calculated for the segment lengths, which are then divided by the input spacing value of the common studs. The results, which are the number of common studs on each wall segment, are rounded up to whole numbers. The number and spacing value of common studs are used to create a sequence of points on the divided wall location lines. The end points of the divided wall location lines are extracted and added to the lists of the sequence of points. The results are the points where the vertical lines that represent common studs are created. The wall heights from process 1 are used to define the height of the vertical lines. Finally, the vertical lines are intersected with the subtracted wall surfaces from process 1 and the parts of the lines that are outside the subtracted wall surfaces are eliminated to obtain the lines that represent the common studs (see Fig. 10a).

Fig. 10: Lines that represent (a) common studs and (b) jack studs.
For the jack studs, first, the locations of the jack studs are calculated. The perimeter lines of the door surfaces and the window surfaces from process 2 are extracted. The algorithm selects the lines at the top edge of the door surfaces. Another algorithm selects the lines at the top edge and bottom edge of the window surfaces. The lengths are calculated from the selected lines and divided by the input spacing value of the jack studs, and the results are rounded up to a whole number to give the number of jack studs on each door and window. The number and spacing value of the jack studs are used to create a sequence of points on the lines. Second, the vertical lines that represent the jack studs are created. For the jack studs between the top tracks and the header tracks, the vertical lines are created from the points at the top edge of the doors and the windows to the top of the walls. For the jack studs between the sill trimmer tracks and the bottom tracks, the vertical lines are created from the points on the bottom edge of the windows to the base of the walls. Finally, the vertical lines are intersected with the subtracted wall surfaces from process 1 and the parts of lines that are outside the subtracted wall surfaces are eliminated to obtain the lines that represent jack studs (see Fig. 10b).
The final products of process 3 are the lines that represent common studs and jack studs, which are used in process 6. Fig. 11 shows the flowchart for process 4: generate lines that represent extra C-studs at intersections and corners. Initially, construction detail A or B is chosen by a user. If construction detail A is chosen, the system generates one line that represents extra C-studs at corners and T-intersections and two lines that represent extra C-studs at cross intersections. To do this, an algorithm finds intersection points on the wall location lines from process 1. The duplicate points that are in the same locations are removed. Each point is then checked for an intersection with the lines that represent common studs from process 3. The lines that intersect the points are collected into a list as lines that represent extra studs at corners, T-intersections, and cross intersections (see Fig. 12a). Next, the algorithm finds the second extra studs at cross intersections. The cross intersection points are identified by finding the intersection points on the wall location lines that have four duplicates at the same position. The cross intersection points are then checked for intersections with the lines that represent common studs. The lines that intersect the points are collected into another list as the lines that represent the second extra stud at cross intersections (see Fig.  12b).

Process 4: Generate lines that represent extra C-studs at intersections and corners
If construction detail B is chosen, the system generates one line that represents extra C-studs at cross intersections. To do this, the algorithm finds intersection points on the wall location lines from process 1. The points of cross intersections are identified by finding the intersection points on the wall location lines that have four duplicates at the same position. The cross intersection points are then checked for intersections with the lines that represent common studs. The lines that intersect the points are collected into a list as the lines that represent extra studs at cross intersections (see Fig. 12c).

Fig. 12: Lines that represent (a) extra studs at corners, T-intersections, and cross intersections for construction detail A, (b) second extra studs at cross intersections for construction detail A, and (c) extra studs at cross intersections for construction detail B.
The final products of process 4 are the lines that represent extra C-studs at intersections and corners, which are used in process 6.  Initially, users choose whether two C-studs combined into boxed studs are used at both sides of openings via a Boolean data type. If the Boolean value is false, this process is skipped. If the Boolean value is true, the system generates lines that represent extra C-studs at both sides of openings. First, the perimeter lines of the door surfaces and the window surfaces from process 2 are extracted. Then the vertical lines are selected. Second, the vertical lines are checked for intersections with the lines that represent common studs from process 3. Finally, the lines representing common studs that intersect the vertical lines are collected into a list as the lines that represent extra studs at both sides of openings (see Fig. 14), which are used in process 6.   First, the system automatically creates new parameters for wall elements in a Revit project using shared parameters. The new parameters are "U-tracks Length", "U-tracks Count", "C-studs Length", and "C-studs Count." Second, the lines that represent top tracks, bottom tracks, header tracks, sill trimmer tracks, and nogging tracks from process 2 are combined into a list of U-tracks. A list of C-studs is generated from the lines that represent common studs and jack studs from process 3, the extra C-studs at intersection and corners from process 4, and the extra C-studs at both sides of openings from process 5. Third, the lines in the lists of U-tracks and C-studs are checked for intersections with each subtracted wall surface from process 1. The lines that intersect the same surface are grouped into the same sub-lists. Fourth, the system calculates the lengths of lines and counts the number of lines in every list. Finally, the results are embedded into the properties of each drywall. The lengths of the U-tracks and C-studs are written to the "U-tracks Length" and "C-studs Length" parameters, respectively. The numbers of U-tracks and C-studs are written to the "U-tracks Count" and "C-studs Count" parameters, respectively. Fig. 16 shows the properties of a wall in Autodesk Revit that contains quantities of U-tracks and C-studs after applying the BWFQT prototype system.

VALIDATION
The BWFQT method was validated in an actual construction project. Quantities of wall framings from the BWFQT prototype system were compared with the quantities of wall framings from the complete detailed BIM model and two traditional quantity takeoff methods. Furthermore, the execution time of the BWFQT prototype system was compared with the modeling time of the BIM model and the manual calculation times of the traditional methods. Autodesk Revit 2018.2, Dynamo 1.3.3.4111, and a computer with an Intel Core i7-8770 3.2 GHz CPU, 32 GB RAM, and NVIDIA GeForce GTX 1060 6 GB graphics card were used to perform the prototype system.

Overview of the case study
The case study was an interior project on the fifth and sixth floors of Chulapat 14 building located at Chulalongkorn University, Bangkok, Thailand (see Fig. 17a). The fifth and sixth floors were chosen because they contain drywalls meeting at corners, T-intersections, and cross intersections. Furthermore, these floors contain drywalls intersecting with doors, windows, structural columns, beams, and floors. The gross internal area of these floors is about 2,560 m 2 . There are 28 rooms on the fifth floor and 25 rooms on the sixth floor separated by drywalls.
The typical height of the drywall is 3.65 m and the height of the drywall under the beams is 3.45 m. The spacing of C-studs, including common studs and jack studs, is a maximum of 600 mm center-to-center. The spacing of Utracks is a maximum of 600 mm center-to-center. The construction detail of the intersections and corners is construction detail A (see Fig. 2). One extra C-stud is needed at a corner and a T-intersection and two extra Cstuds are needed at a cross intersection. The C-studs at both sides of openings are two C-studs combined into boxed studs. Fig. 17b shows the wall framings in the construction site.
The incomplete and complete detailed BIM models were both used in the validation. Both BIM models were created by a graduate student with a background in architecture who has been using Autodesk Revit for seven years and has obtained a Revit Architecture Certified Professional certification in 2016. The incomplete detailed BIM model was created based on the 2D construction drawings obtained from the contractor. This model was used to test the prototype system (see Fig. 18). The drywalls are single model elements with defined material layers, which were equivalent to walls at LOD 300. Wall framings were not created in this model. The drywalls were created to overlap with structural columns, beams, and floors. The BWFQT prototype system was applied to this BIM model. The execution time of the prototype system was recorded for comparison. Fig. 19 shows the blue lines that are generated from the prototype system representing the wall framings in the incomplete detailed BIM model. The calculated quantities of C-studs and U-tracks were embedded into the properties of drywalls in the BIM model. The quantities schedule of drywall was created in Autodesk Revit to obtain the C-studs length and the U-tracks length (see Fig. 20). The schedule was exported to a spreadsheet file for comparison.   The complete detailed BIM model was modeled based on the incomplete detailed BIM model and was used as a baseline for the comparison. Wall framings were modeled manually at the core of the drywall according to the actual construction details (see Fig. 21). The modeling time of the wall framings was recorded to compare with the execution time of the prototype system. The wall framing quantities were obtained directly from the model by creating the quantities schedule of wall framings in Autodesk Revit (see Fig. 22). The lengths of the C-studs and U-tracks were exported to a spreadsheet file for comparison.  Manual quantity takeoff was performed with the two traditional quantity takeoff methods in Section 2.3 by a graduate student with a background in architecture who has three years of experience in quantity surveying. The calculation times of the two methods were recorded for comparison.
Traditional method 1 is the manual method in which the length of wall framings is calculated from the wall dimensions and spacing values of the C-studs and U-tracks. The calculation used the following information: the total length of the wall measured from the 2D construction drawings of 621.20 m, wall height of 3.65 m, and the spacing of C-studs and U-tracks of 600 mm. Additionally, the extra studs at corners, T-intersections, and cross intersections, and the studs at both sides of openings were measured separately and added to the length of C-studs. There were 48 corners, 46 T-intersections, four cross intersections, 92 doors, and five windows, which were equal to 1,788.50 m of additional C-studs.
Traditional method 2 is the manual method in which the length of wall framings is calculated from wall areas and the lengths of C-studs and U-tracks per square meter. The calculation used the net wall area measured from the 2D construction drawings of 1,899.32 m 2 , which excluded the areas of doors, windows, and of walls that overlapped with structural columns and beams. The lengths of C-studs and U-tracks per square meter were 2 m; there were two C-studs and two U-tracks per square meter because the spacing of C-studs and U-tracks was 600 mm. Similar to traditional method 1, the extra studs at corners, T-intersections, and cross intersections, and the studs at both sides of openings were measured separately and added to the length of C-studs. Table 1 shows a comparison of the wall framing quantities obtained from the complete detailed BIM model (baseline), the BWFQT method, traditional method 1, and traditional method 2. Table 2 shows a comparison of the execution time of the BWFQT prototype system, the modeling time of the complete detailed BIM model, and the manual calculation times of traditional methods 1 and 2.

Comparative analysis
The BWFQT method provided similar quantities of wall framings compared with the complete detailed BIM model, which was the baseline (see Table 1). The quantities of C-studs from the BWFQT method had deviations of 0.12% on the fifth floor, 0.11% on the sixth floor, and 0.11% in total. The quantities of U-tracks from the BWFQT method had deviations of 0.16% on the fifth floor, 0.44% on the sixth floor, and 0.30% in total. The deviation of C-studs and U-tracks may arise from the thickness of the wall framings in the complete detailed BIM model making the lengths of wall framings shorter when they connect to each other. The quantities from traditional methods 1 and 2 were less accurate than those from the BWFQT method and had deviations ranging from −3.84% to 12.05%. A negative deviation indicates that the quantity is less than the baseline.
The quantities of C-studs from traditional method 1 had deviations of 4.83% on the fifth floor, 1.83% on the sixth floor, and 3.35% in total. The quantities of U-tracks from traditional method 1 had deviations of 11.56% on the fifth floor, 12.05% on the sixth floor, and 11.80% in total. The excess C-studs and U-tracks were calculated because traditional method 1 does not consider wall openings, such as doors and windows, and the parts of walls that overlap with structural elements.
The quantities of C-studs from traditional method 2 had deviations of 4.08% on the fifth floor, 3.10% on the sixth floor, and 3.60% in total. The quantities of U-tracks from traditional method 1 had deviations of −3.84% on the fifth floor, −0.79% on the sixth floor, and −2.34% in total. The excess C-studs and the insufficient U-tracks were calculated because the method calculates the lengths of wall framings based on the average wall framings per square meter, which may not perfectly fit walls that have doors and windows. The BWFQT prototype system took the least time (4 min 42 s [282 s]) to find the quantities of wall framings (see Table 2). Modeling the complete detailed BIM model took the most time (25 h 40 min [92,400 s]). The calculation time of traditional method 1 was 27 min (1,620 s). In this method, most of the time was spent measuring the wall lengths and counting the numbers of corners, intersections, doors, and windows from the 2D construction drawings. The calculation time of traditional method 2 was 53 min (3,180 s). In this method, most of the time was spent measuring the wall areas from the 2D construction and subtracting the areas of doors, windows, columns, and beams that overlap with the walls. The BWFQT prototype system was 328 times faster than the modeling time of the complete detailed BIM model, 6 times faster than traditional method 1, and 11 times faster than traditional method 2.

DISCUSSION
In the case study, the BWFQT prototype system calculated the quantities of wall framings and embedded them into the properties of drywalls in the BIM model. The quantities of wall framings obtained from the BWFQT method were as accurate as those extracted from the complete detailed BIM model, and the execution time of the BWFQT method was much faster than the manual modeling time of the complete detailed BIM model. The BWFQT method can reduce the working time and cost of creating wall framings in a BIM model for quantity takeoff. The quantities of wall framings are embedded into wall elements; therefore, this information can be extracted directly from the BIM model.
However, if wall framing models are needed for other tasks, such as visualizing a construction process or generating shop drawing documents, modeling for wall framings is still required. The BWFQT method could be developed by the converting lines that represent the wall framings generated from the system to the wall framing components in a BIM model. Nevertheless, the increased wall framings in a BIM model result in a larger file size that would consume more memory resources and slow down the software performance. According to the case study, the file size of the complete detailed BIM model that contains wall framings is 66% larger than the file size of the incomplete detailed BIM model that does not contains wall framings, while the file size of the incomplete detailed BIM model after applying the BWFQT prototype system is still similar to the original model (see Fig.  23). The impact of difference in file sizes between the BIM model that contains wall framings and does not contain wall framings would be bigger in a large-scale building that has a huge number of drywalls. Therefore, the BWFQT method is a better approach for BIM-based quantity takeoff, and if the wall framing models are needed for producing shop drawing documents, they should only be created in a selection of representative areas. The BWFQT method also delivers more accurate quantities of wall framings than the traditional methods because it calculates the lengths of wall framings based on the lines that represent the wall framings in the correct positions in the BIM model. Traditional method 1 calculates rough quantities of wall framings based on the lengths of walls and spacing values of wall framing without considering wall openings. Traditional method 2 calculates approximate quantities of wall framings based on the wall surface area and the wall framings per area. Both methods also need to add the extra studs at corners, T-intersections, and cross intersections, and the studs at both sides of openings to the length of C-studs. In this case study, the total additional C-stud was 1,788.50 m. If this quantity were not added to the length of C-studs, the deviation of the quantity of C-studs would be −29.82% instead of 3.35% in traditional method 1 and −29.56% instead of 3.60% in traditional method 2. Therefore, the deviations could vary if quantity surveyors with different levels of experience perform the quantity takeoff.
The BWFQT method is also faster than traditional methods 1 and 2. Most of the time is spent on measuring wall length and net wall area in traditional methods 1 and 2, respectively. The traditional methods could be sped up by using semi-automatic BIM-based methods to extract the length and the area of walls from a BIM model. However, the walls in the BIM model must be checked and the overlapping regions corrected manually, whereas the BWFQT method eliminates the overlapping regions automatically.
In future research, more case studies should be used to validate the BWFQT method. Furthermore, because the accuracy and speed of the traditional methods could vary depending on the experience and expertise of the quantity surveyors, different quantity surveyors should be invited to validate the BWFQT method.
The BWFQT method has some limitations. First, the building model elements in a BIM model used for the BWFQT method should be at least at LOD 300, which will have the exact size, shape, orientation, and location (BIMForum, 2019), in order to calculate the accurate location and length of wall framings. Otherwise, the accuracy may be reduced. Moreover, if the construction project does not implement BIM in the design phases, contractors have to create their own BIM model from the beginning. In this case, using traditional quantity takeoff methods may be faster and cheaper. Second, the prototype system can be used only for straight walls; it is unsuitable for slanted walls and curved walls. Algorithms for generating wall surfaces and lines that represent wall framings from slanted walls and curved walls should be developed. Third, the prototype system uses bounding boxes for doors and windows in the calculation. Therefore, doors and windows that are not rectangular or square may cause inaccuracies. Algorithms for generating the exact outline of the doors and windows should be developed to replace the bounding boxes. Finally, the prototype system cannot calculate wall framings for different drywall types simultaneously. A parallel calculation for different drywall types at the same time should be developed in future research.

CONCLUSION
General contractors or sub-contractors require the quantities of wall framings during the construction phase. Traditionally, the quantities of wall framings are estimated using manual calculations. However, BIM can improve the accuracy and speed of quantity takeoff by allowing quantities of building elements to be extracted directly from a BIM model. However, wall framings are detailed elements that are not usually present in BIM models. Creating wall framing models only for quantity takeoff is a time-consuming, costly task. Our approach provides an alternative method of calculating quantities of wall framings from a BIM model that does not contain wall framing models.
The BWFQT method calculates quantities of wall framings from drywalls in a BIM model. The algorithms automatically calculate the locations and the lengths of wall framings from the drywall surfaces and the input spacing values of wall framings. The results are embedded into the properties of drywalls in the BIM model, and the quantities of wall framings can then be obtained from the model directly.
The BWFQT prototype system was developed using the Dynamo extension in Autodesk Revit. Validation was conducted using an actual construction project. The BWFQT method provided accurate quantities of wall framings compared with the complete detailed BIM model in which the wall framings were modeled manually. The BWFQT method was more accurate than the traditional quantity takeoff methods, and the execution time for the prototype system was faster than the modeling time of the complete detailed BIM model and the calculation times of the traditional methods.
The BWFQT method contributes to developing an approach for quantity takeoff of wall framings that are not present in a BIM model. Using this method, construction practitioners can obtain accurate quantities of wall framings from a BIM model that does not contain wall framing models. Deviations due to manual calculations can be reduced and the time and cost of creating wall framings in a BIM model for quantity takeoff can be saved. The accurate quantities of wall framings are beneficial for purchasing materials and reducing the costs associated with excess materials. The BWFQT method does not increase the geometries in the BIM model; therefore, the file size of the model does not increase, which stabilizes performance, and the model is easy to be edited. Furthermore, the study highlights the issues when performing quantity takeoff from an incomplete detailed BIM model. The case study in this research also provides an understanding of deviations of material quantities of wall framings from the traditional quantity takeoff methods, which is beneficial for academic use. Finally, the logic of BWFQT method can be applied to other research that deals with other types of framing systems and can be used to develop a wall framing calculation system in any BIM software product.
Future research could focus on two areas. First, the accuracy and speed of the BWFQT method could be validated by further case studies and various quantity surveyors. Second, the BWFQT method could be extended and improved. For example, the BWFQT method could be used as a base to develop a system that can generate wall framing components in a BIM model automatically, which is beneficial for producing shop drawings and as-built drawings. Moreover, the limitations of the BWFQT method should be addressed. The method should be extended to calculate quantities of wall framings in slanted walls and curved walls and to calculate wall framings for different drywall types simultaneously. In addition, other wall openings shapes than rectangular should be supported in future systems.