Research on the Intelligent Construction of the Rebar Project Based on BIM

: Rebar engineering in the construction industry lacks effective technical means and has a high processing cost and high waste rate. Under the background of intelligent construction, the centralized processing mode of steel bars in prefabricated factories realizes the automatic processing of steel bars and improves the processing efﬁciency of steel bars. Using the C# programming language, combined with Revit secondary development technology, the automatic generation of the rebar model and the automatic export of rebar drawing are realized, which saves time for the designers to build the model. The calculation method of the cutting length of the steel bar is analyzed in this paper, which can be used as a reference for the subsequent optimization research of steel bar cutting. The assembly position information of the steel bar was introduced into an Excel table to help realize the automatic assembly of the steel bar cage and the intelligent construction of the steel bar. Combined with mixed reality technology, project personnel can interact with the reinforced BIM model through the mixed reality device Hololens2 to guide construction remotely.


Introduction
With the continuous development of information technology, especially the deepening of the application of BIM technology, it is possible to realize the application of informatization in the steel bar construction process with low standardization, complex type and specification information, high process connection requirements, and limited operator quality.It will effectively promote the improvement, transformation, and upgrading of the professional management level of steel bars [1,2].Intelligent construction has been used in various fields of construction engineering, such as the development of building management systems, the application of smart construction sites, and the construction of smart stadiums [3][4][5].Intelligent construction can realize the use of programs to extract the location information of the rebar in the BIM model of the column, and use the rebar installation robot to install the rebar according to the specific location of the rebar, which greatly reduces the labor cost and solves the problem of irregular rebar installation.The staff can stay away from arc light and metal spatter during the welding process, and only need to perform welding inspection at a distance.The rebar installation robot can automatically weld several sections of the rebar in place efficiently and accurately, avoiding the possible harm to workers caused by molten metal.Especially in high temperature weather, the labor intensity of front-line workers is greatly reduced, and the project progress is accelerated [6][7][8].Moreover, the welding accuracy is higher than that of manual work, the welding consistency is good, and the welding quality is stable and reliable.This whole process can directly produce steel bar raw materials into finished steel bar cages, which solves various problems caused by the fast construction progress of the project, the large demand for components, and the limited storage space on the construction site [9][10][11].
At present, BIM technology has been widely used in the field of public civil buildings and municipal areas, and many scholars have conducted research on BIM technology in various fields.F Troncoso-Pastoriza [12] introduced an automatic monitoring method for the lighting elements of buildings; R Bortolini [13] introduced the application of BIM technology in the field of prefabricated buildings; E Kamel [14] described the use of BIM in energy simulation for the application of BIM; and G Yilmaz [15] developed several reference models to evaluate the engineering efficiency improved by BIM in the building construction process.A Basta [16] proposed a method to evaluate the deconstruction ability of steel structures based on BIM.
The research in this paper is mainly based on Revit.The use of Revit software in the field of construction engineering, combined with other software, can run through the entire project life cycle from the early conceptual design, mid-term visualization [17], and force analysis to post-construction, improving the efficiency and accuracy of project construction [18].In the early conceptual design stage, Revit and Insight can be used in combination; Insight can be used to analyze the energy consumption of the model, and explore more energy-efficient design concepts.Revit is combined with Formlt software for preliminary collaborative designs; preliminary design and sketch modeling can be carried out in Formlt, and then the design can be directly sent to Revit for subsequent detailed design.After the design is completed, the Robot Structural Analysis Professional finite element structural analysis software can be used to perform structural stress analysis on the concrete and steel structures in the Revit model to verify the rationality of the structural design.Before the start of the construction phase, Navisworks can be used to check the collision of the Revit model, carry out construction simulation, predict various problems that may occur in the construction process in advance, and eliminate the hidden engineering problems often encountered by the owner in the design and construction phases [19][20][21].Overall, Autodesk's suite of software for architectural engineering enables high-quality and highperformance architectural design, optimizing projects using integrated analysis, generative design, and visualization and simulation tools.It can maximize the constructability and coordination of the project, and improve the predictability during the construction process of the project site.
Mixed reality technology (Mixed Reality, MR) refers to a new way of visualizing the surrounding environment generated by the combination of the real world and virtual digital world [22].The concept of mixed reality was first proposed by the Canadian Paul Milgram and Japanese Fumio Kishino, and is a technology that combines the "virtual" with the "real" [23].Similar technologies include Virtual Reality (VR) and Augmented Reality (AR).In virtual reality scenes, objects are all virtual [24], such as VR games; wearing VR glasses, only the wearer can see the objects inside, but cannot see the objects outside.Augmented reality technology brings virtual objects into the real environment, such as various popular photography software, which can add rabbit-like ears to the user.There are also AR measurement apps that come with mobile phones that scan the current environment, identify objects, and measure objects [25].These technologies that bring virtual objects into reality are augmented reality technologies.Furthermore, mixed reality technology also has both virtual objects and real environments.The difference between mixed reality technology and augmented reality is that, when using mixed reality technology to place an object in the real environment, the object will always exist in the specific placement position and will not move as the user's perspective moves [26].For example, when placing a block in a specific location, the block always exists in the specific actual location.Augmented reality, on the other hand, places an object in the environment that moves with the person's perspective [27].
Milgram P [28] et al. clarified the concept of MR for the first time, proposing that mixed reality includes Augment Reality and Virtual Reality; Allen J [29] introduced the specific implementation process of a remote interaction system in a collaborative space; Al-Barhamtoshy H M [30] conducted an analysis and research on a cloud-oriented mixed reality learning system, described the learning scenarios, and made an effective evaluation of the system.
On the basis of previous research, we study and discuss the more complicated steel bar engineering in the construction process.Based on the Revit secondary development platform, using the object-oriented C# programming language and the Revit API development interface, through the Visual Studio 2019 programming tool, an automatic generation program for the 3D parametric modeling of steel bars is developed, in order to significantly improve the efficiency of steel bar engineering designs.Based on the automatically generated parametric rebar model, we program and automatically export 2D rebar construction drawings, from the traditional 2D design mode relying on Auto Cad, into a 3D forward design mode from 3D model to 2D drawings.From the automatically generated BIM model of the column rebar, the processing information of the rebar model is extracted, exported as an Excel table of rebar processing information, and provided to the rebar automatic processing machine.From the automatically generated BIM model of the column rebar, the position information of the rebar in the column is extracted, exported as an Excel table of rebar position information, and docked with the automatic rebar installation robot.Thereby, data are provided for the automatic assembly of the whole process from the raw material of the steel bar to the finished steel cage.Based on the steel bar information of the BIM model, the basic theory of steel bar cutting is studied, and the mathematical model for the problem of steel bar cutting is analyzed.Finally, mixed reality technology is used to realize the interaction between the 3D model of the steel bar and the human hand, improve the collaboration of the project participants, and promote the informatization and intelligent development of the steel bar project.

Methods
Revit software can be combined with other software to design, record, coordinate, and manage projects, and then perform necessary force analysis on reinforced concrete structural engineering or steel structures; based on the pipeline model drawn in Revit, other software can be used for collision checking.The work can be visualized to ensure the rationality of the construction process.It can be observed in the Table 1 below that each link is carried out around Revit software, so this paper selected the Revit software as the development object to study the intelligent construction process of rebar engineering.RevitLookup is an official plug-in developed by Autodesk.In Revit, a component can be selected and RevitLookup can be used to intuitively see the information of the component and the available APIs for the component.AddinManager is also an official plug-in of Autodesk, which is used to load external programs to operate Revit.It is possible to modify the plug-in code and load and run again in Revit without restarting the Revit software, and it is included in the Revit SDK folder.The basic process of Revit secondary development is shown in Figure 1.
The development tools for Revit secondary development are: Visual Studio, Revit SDK, Revit, Revit Look up, and AddinManager.Revit SDK is the official software development kit for Revit, containing help documentation for the Revit API and examples with source code.RevitLookup is an official plug-in developed by Autodesk.In Revit, a component can be selected and RevitLookup can be used to intuitively see the information of the component and the available APIs for the component.AddinManager is also an official plug-in of Autodesk, which is used to load external programs to operate Revit.It is possible to modify the plug-in code and load and run again in Revit without restarting the Revit software, and it is included in the Revit SDK folder.The basic process of Revit secondary development is shown in Figure 1.Using the function generated by the rebar in the Revit API, there are five methods for creating a rebar, and the parameters in the methods are slightly different, which are: 1. Rebar.CreateFreeForm Method(): to create a constrained free-form rebar.2. Rebar.CreateFreeForm Method(): to create an unconstrained free-form rebar.3. Rebar.CreateFromCurves Method(): to create a steel bar according to the shape of the curve.4. Rebar.CreateFromCurvesAndShape Method(): to create steel bars according to curves and shapes.5. Rebar.CreateFromRebarShape Method(): to create a steel bar through the shape of the steel bar.
When creating a rebar using a parametric method that includes the rebar shape, the size of the rebar is difficult to control, and the rebar may be created outside the host or in the wrong location.Therefore, the automatic reinforcing bar generation program in this paper adopted the third method to create reinforcing bars according to the shape of the curve.
In order to make the program more usable and experience better, this article used WPF (Windows Presentation Foundation) technology to develop a more readable program interface.The steel bar type and diameter, hook angle, and cover thickness can be read in the current document in the drop-down menu of the UI interface, so that users can make selections intuitively.If no rebar diameter, rebar protective layer, etc., are required by the user, the program provides options, such as new rebar diameter.The user can create a new rebar diameter according to the actual project situation, and the rebar diameter will be saved in the project.The WPF interface is shown in Figure 2. Using the function generated by the rebar in the Revit API, there are five methods for creating a rebar, and the parameters in the methods are slightly different, which are: Rebar.CreateFreeForm Method(): to create a constrained free-form rebar.

3.
Rebar.CreateFromCurves Method(): to create a steel bar according to the shape of the curve.4.
Rebar.CreateFromCurvesAndShape Method(): to create steel bars according to curves and shapes.

5.
Rebar.CreateFromRebarShape Method(): to create a steel bar through the shape of the steel bar.
When creating a rebar using a parametric method that includes the rebar shape, the size of the rebar is difficult to control, and the rebar may be created outside the host or in the wrong location.Therefore, the automatic reinforcing bar generation program in this paper adopted the third method to create reinforcing bars according to the shape of the curve.
In order to make the program more usable and experience better, this article used WPF (Windows Presentation Foundation) technology to develop a more readable program interface.The steel bar type and diameter, hook angle, and cover thickness can be read in the current document in the drop-down menu of the UI interface, so that users can make selections intuitively.If no rebar diameter, rebar protective layer, etc., are required by the user, the program provides options, such as new rebar diameter.The user can create a new rebar diameter according to the actual project situation, and the rebar diameter will be saved in the project.The WPF interface is shown in Figure 2.
The structural rebar model is imported in Revit into Unity3D for mixed reality development and can be interacted with using HoloLens2.The mixed reality development software officially recommended by HoloLens2 is Unity3D, and the C# programming language is recommended.The C# programming language is an object-oriented programming language derived from C and C++ released by Microsoft in 2000.The code security is high, and applications based on the Microsoft.NET platform can be quickly written.NET is a virtual execution system and a set of class libraries called CLR (Common Language Runtime).The .NET framework can write Windows applications, web applications, and web services.The C# programming language is the official language for the secondary development of Revit.Due to the good cross-platform nature of the C# programming language, both the WPF and rebar generation programs can be written in the C# language.The Unity3D version used in this article was Unity2021.1.23.We avoided using the 2020.The structural rebar model is imported in Revit into Unity3D for mixed reality development and can be interacted with using HoloLens2.The mixed reality development software officially recommended by HoloLens2 is Unity3D, and the C# programming language is recommended.The C# programming language is an object-oriented programming language derived from C and C++ released by Microsoft in 2000.The code security is high, and applications based on the Microsoft.NET platform can be quickly written.NET is a virtual execution system and a set of class libraries called CLR (Common Language Runtime).The .NET framework can write Windows applications, web applications, and web services.The C# programming language is the official language for the secondary development of Revit.Due to the good cross-platform nature of the C# programming language, both the WPF and rebar generation programs can be written in the C# language.The Unity3D version used in this article was Unity2021.1.23.We avoided using the 2020.3.21f and 2020.3.22fversions of Unity3D when developing HoloLens2.These two versions cause the holographic display of HoloLens2 to flicker.There is no separate SDK for Windows Mixed Reality development, and Visual Studio and Windows10 SDK are generally used.

Read the Rebar Information in the Project File to the WPF Interface
The program needs to know which structural columns are used to generate the rebar, which requires reading the information of the structural columns selected by the user.Since the size and type of each structural column are different, the size of the generated rebar is also different, so the structural columns selected by the user should be distinguished by type.The structural column type information selected by the user is out of order, so it needs to be sorted first, and then a loop is used to compare the order, and then filter out the structural column types that are needed to generate a rebar.The screening calculation process is shown in Figure 3, in which A-F represent different types of structural columns.After the screening is completed, the number of structural columns is read into the WPF interface, which is convenient for users to check how many structural columns they selected.

Read the Rebar Information in the Project File to the WPF Interface
The program needs to know which structural columns are used to generate the rebar, which requires reading the information of the structural columns selected by the user.Since the size and type of each structural column are different, the size of the generated rebar is also different, so the structural columns selected by the user should be distinguished by type.The structural column type information selected by the user is out of order, so it needs to be sorted first, and then a loop is used to compare the order, and then filter out the structural column types that are needed to generate a rebar.The screening calculation process is shown in Figure 3, in which A-F represent different types of structural columns.After the screening is completed, the number of structural columns is read into the WPF interface, which is convenient for users to check how many structural columns they selected.
By reading the existing rebar type information and cover information in the Revit document into the WPF interface, it is convenient for users to select the structural column type.This program needs to read the structural column type selected by the user, the rebar type and diameter in the document, the rebar cover (top surface, bottom surface, and other surfaces), stirrup type, start point hook, and end-point bending structure information into WPF.The drop-down control ComboBox is used to achieve the user's selection function.By reading the existing rebar type information and cover information in the Revit document into the WPF interface, it is convenient for users to select the structural column type.This program needs to read the structural column type selected by the user, the rebar type and diameter in the document, the rebar cover (top surface, bottom surface, and other surfaces), stirrup type, start point hook, and end-point bending structure information into WPF.The drop-down control ComboBox is used to achieve the user's selection function.

Longitudinal Rebar Generation
The basic idea of this program to generate longitudinal rebar is: Calculate the coordinates of the two end points of the longitudinal rebar through the position coordinates of the structural column and use the Line.Create() method in the Revit API to create a line based on the calculated coordinates of the two end points.Use the Rebar.CreatForm-Curves() method to generate longitudinal rebar from the created lines.First, create longitudinal ribs at the four corners of the structural column, and longitudinal ribs at the midpoints of the four sides of the top or bottom surface.Based on these eight longitudinal bars, use the method of replication to generate longitudinal bars at other positions.
First, the position coordinates of the longitudinal rebar bars at the four corners of the structural column are calculated, as shown in  rebar2 xlocation: rebar2 ylocation: Similarly, the endpoint coordinates of the No. 6, No. 7, and No. 8 steel bars can also be calculated.Next, use the copied method to generate longitudinal ribs at other locations.Of course, if the number of longitudinal bars in the b direction of the structural column input by the user is less than 3, the No. 5, No. 6, No. 7, and No. 8 steel bars will not be generated, that is, only the longitudinal bars at the four corners of the structural column will be generated.When the number of longitudinal bars entered by the user is greater than or equal to 3, use the ElementTransformUtils.CopyElement() method in the Revit API to copy the No. 5, No. 6, No. 7, and No. 8 steel bars.The copied distance is the Longi space, which can be calculated from information such as the number of longitudinal bars and the diameter of stirrups.Assuming that the number of longitudinal bars is Longi count, that is, the Longi space of longitudinal bars is: When the number of longitudinal ribs is odd, for example, if the user inputs five longitudinal ribs in the b direction, it is necessary to copy two longitudinal ribs from No. 5 and No. 7 longitudinal ribs, and to copy one longitudinal rib to the left and right sides, respectively.Then, if i bars are input, the number N of longitudinal bars that need to be copied on the left and right is: The copied distance is the Longi space.When the number of longitudinal bars input by the user is an even number, the No. 5 and No. 7 steel bars need to be moved to the right by a distance of 0.5 longitudinal bar spacing.If the user inputs 6 longitudinal ribs, one longitudinal rib is copied to the right and two longitudinal ribs to the left.If the user inputs i bars, the number of longitudinal bars to be copied on the left and right is: The method of generating longitudinal ribs in the h direction is the same as that of the longitudinal ribs in the b direction.
After the longitudinal bars, stirrups, and additional stirrups are generated, it is considered that the structural column may have a rotation angle.Therefore, the rotation angle of the structural column is obtained by the LocationPoint.Rotation() method in the Revit API, and all the reinforcing bars in the structural column are rotated by the ElementTransformUtils.RotateElements() method.

Stirrup Rebar Generation
Stirrup generation path: first obtain the coordinates of the four corners of the stirrup and draw the curve shape through the four corners, as shown in Figure 5.

longicount −
When the number of longitudinal ribs is odd, for example, if the user inputs five longitudinal ribs in the b direction, it is necessary to copy two longitudinal ribs from No. 5 and No. 7 longitudinal ribs, and to copy one longitudinal rib to the left and right sides, respectively.Then, if i bars are input, the number N of longitudinal bars that need to be copied on the left and right is: The copied distance is the Longi space.When the number of longitudinal bars input by the user is an even number, the No. 5 and No. 7 steel bars need to be moved to the right by a distance of 0.5 longitudinal bar spacing.If the user inputs 6 longitudinal ribs, one longitudinal rib is copied to the right and two longitudinal ribs to the left.If the user inputs i bars, the number of longitudinal bars to be copied on the left and right is: The method of generating longitudinal ribs in the h direction is the same as that of the longitudinal ribs in the b direction.
After the longitudinal bars, stirrups, and additional stirrups are generated, it is considered that the structural column may have a rotation angle.Therefore, the rotation angle of the structural column is obtained by the LocationPoint.Rotation() method in the Revit API, and all the reinforcing bars in the structural column are rotated by the ElementTrans-formUtils.RotateElements() method.

Stirrup Rebar Generation
Stirrup generation path: first obtain the coordinates of the four corners of the stirrup and draw the curve shape through the four corners, as shown in Figure 5.The coordinates of the four corners of the stirrups are calculated by obtaining the coordinates of the origin of the structural column and the thickness of the cover input by the user.For example, the coordinates of the X, Y, and Z directions of the bottom surface of the structural column are XColumn, YColumn, and ZColumn, respectively; the thickness of the rebar protective layer is RebarCover; the diameter of the stirrup is StirrupDiameter; and the width and height of the top and bottom surface of the structural column are b and h, respectively.Then, the coordinates location stirx and location stiry in the X and Y directions of the corner point 1 in the upper right corner of the bottom stirrup are obtained as: Since the currently acquired origin coordinates are the coordinates of the bottom surface of the structural column, the coordinates of the corner point 1 in the Z direction, that is, the coordinates in the height direction, are the Z coordinates of the bottom surface of the structural column plus the protective layer of the bottom surface of the rebar plus half the diameter of the stirrup.The calculated coordinates location stirz are: As shown in Figure 6, the coordinates of the four corners of the stirrups on the top surface of the structural column and the coordinates of the four corners of the stirrups on the bottom of the structural column are different only in the Z direction, that is, the height direction.The Z coordinate of the stirrups on the top surface of the structural column, Tlocation stirz , is: Since the currently acquired origin coordinates are the coordinates of the bottom surface of the structural column, the coordinates of the corner point 1 in the Z direction, that is, the coordinates in the height direction, are the Z coordinates of the bottom surface of the structural column plus the protective layer of the bottom surface of the rebar plus half the diameter of the stirrup.The calculated coordinates locationstirz are: As shown in Figure 6, the coordinates of the four corners of the stirrups on the top surface of the structural column and the coordinates of the four corners of the stirrups on the bottom of the structural column are different only in the Z direction, that is, the height direction.The Z coordinate of the stirrups on the top surface of the structural column, Tlocationstirz, is: ColumnHight is the height of the current structural column.
The method in the Revit API to get the height of a structural column is get_Parameter().In this way, the coordinates of the four corner points needed to generate the stirrups on the top surface of the structural column can be calculated.
When the coordinates of all corner points of the top and bottom stirrups of the structural column are calculated, use the Line.CreateBound() method in the Revit API and pass the coordinates of two points in the parameters of the method to create a line.Pass through corner 1 and corner 2 to create the first line; pass through corner 2 and corner 3 to create the second line; pass through corner 3 and corner 4 to create the third line; pass through ColumnHight is the height of the current structural column.The method in the Revit API to get the height of a structural column is get_Parameter().In this way, the coordinates of the four corner points needed to generate the stirrups on the top surface of the structural column can be calculated.
When the coordinates of all corner points of the top and bottom stirrups of the structural column are calculated, use the Line.CreateBound() method in the Revit API and pass the coordinates of two points in the parameters of the method to create a line.Pass through corner 1 and corner 2 to create the first line; pass through corner 2 and corner 3 to create the second line; pass through corner 3 and corner 4 to create the third line; pass through corner 4 and corner 1 to create a fourth line.The final result is a closed quadrilateral wireframe.Add four lines to the List<Curve> collection.
Use the Rebar.CreateFromCurves() method for creating bars from curves in the Revit API.Enter the parameters, such as the diameter of the stirrup, the hook of the stirrup, and the direction of the bending structure entered by the user in the parentheses, and pass in the List<Curve> collection containing four lines, and then the stirrup is generated according to the quadrilateral wire frame formed by the four lines.If the four incoming lines are not connected end to end, the program will report an error and cannot generate stirrups normally.

Additional Stirrup Generation
The number of additional stirrups is generated according to the number of longitudinal bars, as shown in Figure 7.By finding the relationship between the number of additional stirrups and the number of longitudinal bars, and considering the least cost direction, this program develops a calculation method, so that the program can automatically calculate the form and size of the additional stirrups through the number of longitudinal bars input by the user according to quantity and automatically arrange it in the structural column.
dinal bars, as shown in Figure 7.By finding the relationship between the number of additional stirrups and the number of longitudinal bars, and considering the least cost direction, this program develops a calculation method, so that the program can automatically calculate the form and size of the additional stirrups through the number of longitudinal bars input by the user according to quantity and automatically arrange it in the structural column.
In fact, it can be found that, when (Nlon − 3) is a multiple of three, such as 6, 9, and 12, the additional stirrups are all in the form of hooping two longitudinal bars.When (Nlon − 3) is a multiple of four, such as 7, 11, and 15, the additional stirrups are all in the form of three longitudinal bars.When (Nlon − 3) is a multiple of five, such as 8, 13, and 18, the In Figure 7, from left to right, stirrups are organized in accordance with one-by-one and one-by-one arrangement: additional stirrups hooping two longitudinal bars, additional stirrups hooping three longitudinal bars, and additional stirrups hooping four longitudinal bars.It can be seen that the number of the remaining longitudinal bars after removing the three longitudinal bars is divided by three, which is the number of additional stirrups that hoop the two longitudinal bars, and divided by four, which is the number of additional stirrups that hoop the three longitudinal bars.The number, divided by five, is the number of additional stirrups that hoop the four longitudinal bars.
First declare three variables of int-type N stirrup4 , N stirrup3 , and N stirrup2 , which respectively represent the number of additional stirrups that hoop four longitudinal bars, the number of additional stirrups that hoop three longitudinal bars, and the number of additional stirrups that hoop two longitudinal bars.Use the int-type variable N lon to represent the number of longitudinal bars; then, the number of additional stirrups can be calculated: In fact, it can be found that, when (N lon − 3) is a multiple of three, such as 6, 9, and 12, the additional stirrups are all in the form of hooping two longitudinal bars.When (N lon − 3) is a multiple of four, such as 7, 11, and 15, the additional stirrups are all in the form of three longitudinal bars.When (N lon − 3) is a multiple of five, such as 8, 13, and 18, the additional stirrups are all in the form of four longitudinal bars.Then, when the number of longitudinal bars is 10 or 14, that is, (N lon − 3) is not a multiple of three, four, or five, it is necessary to combine different additional stirrup forms.
Calculate the number of additional stirrups that hoop the four longitudinal bars: N stirrup4 = (a − 3)/5.Then, calculate the number of remaining longitudinal bars N remainLo : Determine whether the number of remaining longitudinal bars meets the form of additional stirrups for hooping three longitudinal bars; if not, judge whether it meets the form of additional stirrups for hooping two longitudinal bars.
By calculating the coordinates of the four corners of the additional stirrups, connecting the coordinates of the four corners to generate a wireframe, and then generating the additional stirrups through the wireframe path, the calculation of the corner coordinates of the X-axis and Z-axis directions of the additional stirrups is different from that of the stirrups.The following describes the calculation of the corner coordinates of the additional stirrups in the b direction of the structural column.
As shown in Figure 8 below, after the coordinates of corner point 1 and corner point 2 are calculated, the coordinates of the two symmetrical corners only need to invert the Y-axis coordinates of corner 1 and corner 2.
additional stirrups through the wireframe path, the calculation of the corner coordinates of the X-axis and Z-axis directions of the additional stirrups is different from that of the stirrups.The following describes the calculation of the corner coordinates of the additional stirrups in the b direction of the structural column.
As shown in Figure 8 below, after the coordinates of corner point 1 and corner point 2 are calculated, the coordinates of the two symmetrical corners only need to invert the Yaxis coordinates of corner 1 and corner 2. In a manner that is the same as above, the distance between longitudinal bars is Longi space; the thickness of the protective layer is Prot thickness; the diameter of stirrups is Stir dia; the diameter of longitudinal bars is Longi dia; and the diameter of additional stirrups is Add dia.The coordinate locationaddx1 in the X direction of point 1 is: The additional stirrup form in the current figure is an additional stirrup that hoops two longitudinal bars.It can be seen that the X-direction coordinate locationaddx1 of the corner point 1 of the i-th additional stirrup is: In a manner that is the same as above, the distance between longitudinal bars is Longi space; the thickness of the protective layer is Prot thickness; the diameter of stirrups is Stir dia; the diameter of longitudinal bars is Longi dia; and the diameter of additional stirrups is Add dia.The coordinate location addx1 in the X direction of point 1 is: The additional stirrup form in the current figure is an additional stirrup that hoops two longitudinal bars.It can be seen that the X-direction coordinate location addx1 of the corner point 1 of the i-th additional stirrup is: If the current additional stirrups are in the form of three bars or four bars, the X-direction coordinate location addx1 of the corner point 1 of the i-th additional stirrup is: Compared with the corner point 1, the X coordinate of the corner point 2 has an extra distance of the longitudinal rib spacing longi space and the longitudinal rib diameter longi dia; then, the X direction coordinate location addx2 of the corner point 2 is: Compared with the corner point 2, the corner point 2-1 of the second additional stirrup in the above figure has three more longitudinal rebar distances longi space.For the same reason, the X-direction coordinate location addx2 at the corner point 2 of the i-th additional stirrup can be obtained as: When the additional stirrup type is the additional stirrup form that hoops three or four longitudinal bars, the X-direction coordinate location addx2 of the corner point 2 of the i-th additional stirrup is: There are seven cases in the form of additional stirrups proposed above, and only three cases are currently discussed.That is, there are only additional stirrups that hoop two longitudinal bars, only additional stirrups that hoop three longitudinal bars, and only additional stirrups that hoop four longitudinal bars.In the above three cases, the additional stirrups are generated in sequence from right to left.
When the additional stirrup form for hooping two longitudinal bars and the additional stirrup form for hooping three longitudinal bars exist at the same time, first, the additional stirrup forms that hoop three longitudinal bars are generated from left to right, and then the additional stirrup forms that hoop two longitudinal bars are generated sequentially from right to left.Declare three int-type variables N stirrup4 , N stirrup3 , N stirrup2 , which represent the number of generated three additional stirrup forms.From right to left, first generate additional stirrups that hoops three longitudinal bars, and generate N stirrup3 times in a loop.Then, from left to right, additional stirrups are generated to hoop the two longitudinal bars, and the loop is generated N stirrup4 times.
The last case is that there is an additional stirrup form that hoops two longitudinal bars, an additional stirrup form that hoops three longitudinal bars, and an additional stirrup form that hoops four longitudinal bars.In this case, the additional stirrups that hoop the four longitudinal bars are first generated from right to left, and the loops are generated N stirrup4 times.Then, generate additional stirrups that hoop the three longitudinal bars in the opposite direction, and cycle to generate N stirrup3 times.Then, calculate the X-direction coordinate location addx1 of the corner point 1 of the additional stirrups that hoop the two longitudinal bars:

Rebar Annotation Generation and Drawing Export
Use the GetShapeDrivenAccessor().ComputeDrivingCurves() method to obtain the four edge sets of stirrups.Iterate over the lines in the collection.Use the properties of Line.Origin to obtain the coordinates of the four corners of the stirrup.The acquisition sequence is to start from the upper right corner of the stirrup and acquire counterclockwise.Obtain the coordinates of the midpoints of the two edges of the stirrup and deduce the coordinates of the two ends of the line segment to be drawn.Use the Line.CreatBound() method to draw line segments and use the Creat.NewDetailCurve() method to generate detail lines.Draw an oblique line segment at the intersection of the detail line and the stirrup, and highlight it, as shown in Figure 9. the coordinates of the two ends of the line segment to be drawn.Use the Line.Creat-Bound() method to draw line segments and use the Creat.NewDetailCurve() method to generate detail lines.Draw an oblique line segment at the intersection of the detail line and the stirrup, and highlight it, as shown in Figure 9.After the structural column rebar information annotation is generated, use the Document.Export() method to export the current view to the CAD format.Use the DetailLevel property to set the current view to fine mode and use the DisplayStyle property to set the current view to wireframe mode.The exported CAD drawings are exported in the After the structural column rebar information annotation is generated, use the Document.Export() method to export the current view to the CAD format.Use the DetailLevel property to set the current view to fine mode and use the DisplayStyle property to set the current view to wireframe mode.The exported CAD drawings are exported in the wireframe mode, which can clearly express information such as the number of longitudinal bars and the location of stirrups.Name the currently exported CAD drawing as the name of the current Revit view plus "rebar structure drawing".If the current view name is level 2, the name of the exported CAD drawing is "level 2 rebar structure drawing".

Information Export
Use Revit secondary development technology to export rebar information to Excel.It is convenient for the rebar assembly robot and the rebar automatic processing machine to read, which avoids the tedious work of manual input of information and the problem of easy errors.Using the NPOI toolkit, which is an open source development tool downloaded from the NuGet package manager of visual studio, Excel versions 97-2003 and Excel and Word from versions 2007 and above can be read and written.Additionally, NPOI can read and write to Word or Excel when the user does not have Office installed.
In the Revit API, the rebar only has location information, that is, the Location point.It cannot be used for rebar installation, so this article uses the method of obtaining the centerline of the rebar.That is, the center line of the longitudinal bar is obtained, and then the coordinates of the two ends of the line are obtained.For stirrups, the center line of the stirrups is obtained, and the three-dimensional coordinates of the midpoints of the four sides of the stirrups are calculated.So, the longitudinal bar needs to obtain two points, and the stirrup needs four points.
The steel bar cutting length in Revit was included in the steel bar model information, and the steel bar cutting length can be exported by exporting the schedule.Schedules display information extracted from element properties in a project in tabular form.The user can select the attributes of the element to export to the schedule, such as rebar length and volume.
Before exporting the rebar list, more options need to be selected, and due to the large number of rebars, the rebar information in the list is not very clear, and there is a considerable amount of repeated information.The Revit schedule cannot be directly exported into Excel.It needs to be exported as a TXT text first, and then read using Excel.
The export steps are cumbersome.This section introduces the use of Revit secondary development technology to directly export the rebar model information in Revit into an Excel table, which improves the information export efficiency and helps the staff to operate the data later.The export method is the same as the export coordinate method.

Rebar Cutting Length Calculation
To calculate the cutting length of the steel bar, the difference in the size of the steel bar skin under different bending angles of the steel bar should be calculated first.When the bending angle of the steel bar is less than or equal to 90 degrees, as shown in Figure 10, the difference between JK+KL and arc ab is calculated.The calculation steps are as follows.

Rebar Cutting Length Calculation
To calculate the cutting length of the steel bar, the difference in the size of the steel bar skin under different bending angles of the steel bar should be calculated first.When the bending angle of the steel bar is less than or equal to 90 degrees, as shown in Figure 10, the difference between JK+KL and arc ab is calculated.The calculation steps are as follows.
10. Schematic diagram of the calculation of the steel bar cutting length.

JK KL R d tan
2 180 The steel bar skin difference with a bending angle of less than or equal to 90 degrees can be calculated by applying the above formula.Only the bending angle α of the steel bar, the bending radius R of the steel bar, and the diameter d of the steel bar are needed to calculate the difference of the steel bar skin.Combined with the steel bar skin size in the construction drawing, the steel bar cutting length can be obtained by using the difference between the steel bar skin size and the calculated difference value of the steel bar skin.
A variety of optimization algorithms can be used to optimize the steel bar cutting method, such as linear programming methods and genetic algorithms.The steel bar skin difference with a bending angle of less than or equal to 90 degrees can be calculated by applying the above formula.Only the bending angle α of the steel bar, the bending radius R of the steel bar, and the diameter d of the steel bar are needed to calculate the difference of the steel bar skin.Combined with the steel bar skin size in the construction drawing, the steel bar cutting length can be obtained by using the difference between the steel bar skin size and the calculated difference value of the steel bar skin.
A variety of optimization algorithms can be used to optimize the steel bar cutting method, such as linear programming methods and genetic algorithms.

Research and Application of BIM Technology in MR
Mixed reality technology is now used in the medical, manufacturing, and retail industries.Microsoft has cooperated with companies in various industries, such as ANSYS, Honeywell, and ABB, in mixed reality technology to help them to build their own ecosystems.
At present, mixed reality technology still has a large space for development in the field of construction engineering, improve project efficiency and reduce rework, improve the coordination between various disciplines, realize digital construction, and visualize construction data, and promote the transformation of the construction industry to intelligence and data.In this section, the structural rebar model in Revit is imported into Unity3D for mixed reality development and interaction with the model in HoloLens2.This enables better communication to facilitate faster and more effective decision making to win bids, detect errors earlier, avoid harm, among others.It also facilitates interactive design reviews among all project stakeholders.
Create a new 3D project, enter the project name, and select the project save location to create a new Unity3D file.Unity3D has high requirements on computer configuration.If the computer configuration is general, such as a computer without a discrete graphics card, it may take a long time to load as computers for 3D modeling and scene rendering use discrete graphics cards whenever possible.The interface for creating a new Unity3D file is shown in Figure 11.
The Unity3D interface can be adjusted according to personal habits.The following figure is the interface that was adjusted.Frequently used function panels include Hierarchy view, Project view, Scene view, Game view, and Inspector view.The Hierarchy view shows the names of all objects in the current scene.Select the name to highlight the current object in the scene view.The project view stores all the resources in the entire project, including 3D model files, pictures, music, scripts, and text.You can directly drag and drop the files required by the project to the Project list by dragging and dropping.The list has a separate folder at the root of the file.The Scene view is used to display objects that the current user created.The user can choose to create a new 3D or 2D object in the GameObject option of the menu bar, and the new object will appear in the scene view.
Unity3D for mixed reality development and interaction with the model in HoloLens2.This enables better communication to facilitate faster and more effective decision making to win bids, detect errors earlier, avoid harm, among others.It also facilitates interactive design reviews among all project stakeholders.
Create a new 3D project, enter the project name, and select the project save location to create a new Unity3D file.Unity3D has high requirements on computer configuration.If the computer configuration is general, such as a computer without a discrete graphics card, it may take a long time to load as computers for 3D modeling and scene rendering use discrete graphics cards whenever possible.The interface for creating a new Unity3D file is shown in Figure 11.The Unity3D interface can be adjusted according to personal habits.The following figure is the interface that was adjusted.Frequently used function panels include Hierarchy view, Project view, Scene view, Game view, and Inspector view.The Hierarchy view shows the names of all objects in the current scene.Select the name to highlight the current object in the scene view.The project view stores all the resources in the entire project, including 3D model files, pictures, music, scripts, and text.You can directly drag and drop the files required by the project to the Project list by dragging and dropping.The list has a separate folder at the root of the file.The Scene view is used to display objects that the current user created.The user can choose to create a new 3D or 2D object in the GameObject option of the menu bar, and the new object will appear in the scene view.
Microsoft provides the Mixed Reality Toolkit (MRTK) for users who use Unity3D for mixed reality development.Click the Start button to start setting up the toolkit to import the project.Select the project path; the project must contain the Asset folder or, otherwise, the export will be unsuccessful.Microsoft provides the Mixed Reality Toolkit (MRTK) for users who use Unity3D for mixed reality development.Click the Start button to start setting up the toolkit to import the project.Select the project path; the project must contain the Asset folder or, otherwise, the export will be unsuccessful.
After selecting the project path, several extension package options will appear on the interface, allowing users to choose the toolkit to be imported.There are mixed reality case toolkits, extension packages, among others.Generally, there are three kinds of packages that need to be imported, namely, the mixed reality basic toolkit, Mixed Reality Toolkit Foundation; the mixed reality extension package, Mixed Reality Toolkit Extensions; and the mixed reality case package, Mixed Reality Toolkit Examples.The basic toolkit is a requirement, as it contains the basic files needed for mixed reality development.The development kit interface is shown in Figure 12 interface, allowing users to choose the toolkit to be imported.There are mixed reality case toolkits, extension packages, among others.Generally, there are three kinds of packages that need to be imported, namely, the mixed reality basic toolkit, Mixed Reality Toolkit Foundation; the mixed reality extension package, Mixed Reality Toolkit Extensions; and the mixed reality case package, Mixed Reality Toolkit Examples.The basic toolkit is a requirement, as it contains the basic files needed for mixed reality development.The development kit interface is shown in Figure 12.In order to more accurately view and manipulate the model in HoloLens2, the user needs to mount the Object Manipulator script and the NearInteractionGrabbable script to the model in Unity.The Object Manipulator script enables users to rotate and move objects and is suitable for joint hand and hand ray operations in HoloLens2.The NearInter-actionGrabbable script can make the object's gesture input response more accurate.The result is shown in Figure 13.In order to more accurately view and manipulate the model in HoloLens2, the user needs to mount the Object Manipulator script and the NearInteractionGrabbable script to the model in Unity.The Object Manipulator script enables users to rotate and move objects and is suitable for joint hand and hand ray operations in HoloLens2.The NearInteraction-Grabbable script can make the object's gesture input response more accurate.The result is shown in Figure 13.The model provides a new way of project presentation for designers in the field of construction engineering.In the process of construction management, the project is displayed in real time based on the BIM model information of the column steel bar, so that the relevant personnel of the project can better deal with the quality problems that may occur during the construction process for possible design changes and timely technical communication.Moreover, because the steel bar is a hidden project, it cannot be reworked and viewed after the concrete is poured, which increases the burden on the entity understanding of the hidden project.Through the Revit model combined with the mixed reality technology, the relevant personnel of the project can view the steel bar information at any time.
In this section, the rebar cage model in Revit was imported into Unity3D, and MRTK The model provides a new way of project presentation for designers in the field of construction engineering.In the process of construction management, the project is displayed in real time based on the BIM model information of the column steel bar, so that the relevant personnel of the project can better deal with the quality problems that may occur during the construction process for possible design changes and timely technical communication.Moreover, because the steel bar is a hidden project, it cannot be reworked and viewed after the concrete is poured, which increases the burden on the entity understanding of the hidden project.Through the Revit model combined with the mixed reality technology, the relevant personnel of the project can view the steel bar information at any time.
In this section, the rebar cage model in Revit was imported into Unity3D, and MRTK was configured through the above method.Mount the corresponding components to the rebar cage model, write corresponding scripts, and realize the interaction with the Revit model in mixed reality.

Conclusions
In this work, a program for automatic generation of rebar parametric model in Revit was developed, which improves the modeling efficiency and modeling accuracy of rebar engineering.Combined with WPF technology, the program operation interface was developed to increase the operability of the program, realize the automatic export of 2D rebar CAD drawings from the 3D model of rebar, complete the forward design process from 3D model to 2D drawings, and provide a reference for the subsequent research on the forward design of rebar engineering automation.Reinforcing bar information was exported, and the bar cutting method was analyzed.Through the development of the mixed reality device HoloLens2, the interaction between the rebar model and the human hand was realized, which improves the visualization of the rebar engineering, and provides a reference for the follow-up construction operation and maintenance research.Based on the above steps, the process of intelligent construction of steel bars was realized, and we conclude the following: 1.
Use the C# programming language for secondary development based on Revit and use the rebar generation method in the Revit API.Realize the automatic generation of longitudinal rebar model, stirrup model and additional stirrup model in Revit.The user can customize the diameter of the rebar to be generated, the thickness of the protective layer, and the number of longitudinal rebar.According to the height of the rebar area entered by the user, the program can automatically generate stirrups in the encryption area and stirrups in the non-encryption area.At the same time, various annotation information of the steel bar BIM model can be automatically generated, and CAD drawings can be automatically exported.To a large extent, the repetitive work is reduced, the modeling efficiency is improved, and the inaccurate and nonstandard models caused by human errors are avoided.The forward drawing of the rebar project is realized, which can better improve the work efficiency of the designer.

2.
In order to realize the fully automatic processing of steel bars, using Revit secondary development technology combined with Visual Studio NuGet toolkit, the function of exporting the location information and cutting information of the steel bar BIM model was realized.The steel bar information can be directly exported to an Excel table, which can be used to read the information of the steel bar automatic processing equipment.The whole process of automatic processing of steel bars was realized, avoiding the mistakes that may be caused by manual operation.It can improve the rebar processing rate and save labor costs.At the same time, it also avoids the safety problem of workers directly operating the machine to a certain extent.

3.
A study on the application of BIM+MR technology in steel bar engineering.Unity3D develops the HoloLens2, a mixed reality device.The Revit structural rebar model was imported into Unity3D to realize the interaction of the Revit model with the human hand in mixed reality.It enables owners, design, engineering, construction and other parties in the engineering construction industry to experience and interact with realistic 3D models in a virtual environment, accelerate design iteration, and help to realize digital construction guidance.
Accordingly, it makes the intelligent construction of steel bars possible and provides a reference for subsequent steel bar construction research.

Figure 1 .
Figure 1.Basic process of Revit secondary development.Developers can use the external command interface IExternalCommand to add their own applications, which has only one abstract execution function, Execute.The secondary function is called the primary function of the external command.When using Revit secondary development to modify the model of the document, the transaction needs to be named.Any operation that modifies a document needs to be included in an open transaction belonging to the document; otherwise, an exception will be executed.A document can have only one open transaction, but a transaction can have multiple operations that modify the document.Using the function generated by the rebar in the Revit API, there are five methods for creating a rebar, and the parameters in the methods are slightly different, which are:

Figure 1 .
Figure 1.Basic process of Revit secondary development.Developers can use the external command interface IExternalCommand to add their own applications, which has only one abstract execution function, Execute.The secondary function is called the primary function of the external command.When using Revit secondary development to modify the model of the document, the transaction needs to be named.Any operation that modifies a document needs to be included in an open transaction belonging to the document; otherwise, an exception will be executed.A document can have only one open transaction, but a transaction can have multiple operations that modify the document.Using the function generated by the rebar in the Revit API, there are five methods for creating a rebar, and the parameters in the methods are slightly different, which are:

Figure 4 .
The figure shows the bottom section of the structural column model.The length and width of the bottom surface of the structural column are b and h, and the center coordinates of the bottom surface of the structural column are XColumn, YColumn, and ZColumn.Calculate the position coordinates of No. 1~8 steel bars.The thickness of the protective layer is: Prot thickness; the diameter of the stirrup is: Stir dia; the diameter of the longitudinal bar is: Longi dia; and the numbers are rebar1~rebar8; then, calculate the coordinates of the X, Y, and Z directions of rebar2 in the first quadrant of the above figure as follows: rebar2 xlocation:

Figure 3 . 4 .
Figure 3. Screening calculation process.4.The Program Calculates How the Rebar Model Is Generated 4.1.Longitudinal Rebar Generation The basic idea of this program to generate longitudinal rebar is: Calculate the coordinates of the two end points of the longitudinal rebar through the position coordinates of the structural column and use the Line.Create() method in the Revit API to create a line based on the calculated coordinates of the two end points.Use the Rebar.CreatFormCurves() method to generate longitudinal rebar from the created lines.First, create longitudinal ribs at the four corners of the structural column, and longitudinal ribs at the midpoints of the four sides of the top or bottom surface.Based on these eight longitudinal bars, use the method of replication to generate longitudinal bars at other positions.First, the position coordinates of the longitudinal rebar bars at the four corners of the structural column are calculated, as shown in Figure 4.The figure shows the bottom section of the structural column model.The length and width of the bottom surface of the structural column are b and h, and the center coordinates of the bottom surface of the structural column are XColumn, YColumn, and ZColumn.Calculate the position coordinates of No. 1~8 steel bars.The thickness of the protective layer is: Prot thickness; the diameter of the stirrup is: Stir dia; the diameter of the longitudinal bar is: Longi dia; and the numbers are rebar1~rebar8; then, calculate the coordinates of the X, Y, and Z directions of rebar2 in the first quadrant of the above figure as follows: rebar2 xlocation: rebar2 zlocation: ZColumn + Prot thickness (3) The coordinates of the end points of No. 1, No. 3, and No. 4 longitudinal bars can also be calculated in the same way.coordinates of the end points of No. 1, No. 3, and No. 4 longitudinal bars can also be calculated in the same way.

Figure 4 .
Figure 4. Schematic diagram of the calculation of the longitudinal rebar position coordinates.Calculate the X, Y, and Z coordinates of the rebar5 on the Y axis in the above figure as follows: rebar5 xlocation: XColumn (4)

Figure 6 .
Figure 6.Schematic diagram of the stirrup height coordinate calculations.

Figure 6 .
Figure 6.Schematic diagram of the stirrup height coordinate calculations.

Figure 7 .
Figure 7.Additional stirrup arrangement rules.In Figure 7, from left to right, stirrups are organized in accordance with one-by-one and one-by-one arrangement: additional stirrups hooping two longitudinal bars, additional stirrups hooping three longitudinal bars, and additional stirrups hooping four longitudinal bars.It can be seen that the number of the remaining longitudinal bars after removing the three longitudinal bars is divided by three, which is the number of additional stirrups that hoop the two longitudinal bars, and divided by four, which is the number of additional stirrups that hoop the three longitudinal bars.The number, divided by five, is the number of additional stirrups that hoop the four longitudinal bars.First declare three variables of int-type Nstirrup4, Nstirrup3, and Nstirrup2, which respectively represent the number of additional stirrups that hoop four longitudinal bars, the number of additional stirrups that hoop three longitudinal bars, and the number of additional stirrups that hoop two longitudinal bars.Use the int-type variable Nlon to represent the number of longitudinal bars; then, the number of additional stirrups can be calculated: ( ) ( ) ( ) 4 3 2 3 3 3 5 4 3 stirrup stirrup stirrup a a a N N N − − − = = =

Figure 8 .
Figure 8. T schematic diagram of the coordinates of the corner points of the additional stirrups.

Figure 8 .
Figure 8. T schematic diagram of the coordinates of the corner points of the additional stirrups.

Figure 9 .
Figure 9. Schematic diagram of the rebar dimension line.

Figure 9 .
Figure 9. Schematic diagram of the rebar dimension line.

Figure 10 .
Figure 10.Schematic diagram of the calculation of the steel bar cutting length.

Figure 11 .
Figure 11.Create a new unity project.

Figure 11 .
Figure 11.Create a new unity project.
. Set OpenXR options.Under the Edit option in the menu bar, find Project Settings to open the project settings interface.Select the Player option and enter the package name.Select the Open XR option, check the Microsoft HoloLens option, and select features, such as hand tracking.After setting, click Apply.Select Mixed Reality Toolkit in the Hierarchy panel, check whether the mounted script is DefaultMixedRealityToolkitConfigurationProfile in the Inspector, and save the current scene after checking.After the scene is saved, the user needs to compile the current project with Visual Studio.Click Build Settings under the File option in the menu bar; the Build Settings window pops up and check whether the Platform is Windows Platform.Set the target device to HoloLens, click the Build button, and select a folder to build the scene.After the build is complete, a solution of type sln file is generated in the folder.Use Visual Studio to open this file, select the Release architecture as ARM64 to be compatible with HoloLens2, and use ×86 for HoloLens1.Connect the HoloLens2 device to the computer and select Start Without Debugging under the Debug option in the Visual Studio menu bar to complete the compilation.

Figure 12 .
Figure 12.Mixed Reality Toolkit.Set OpenXR options.Under the Edit option in the menu bar, find Project Settings to open the project settings interface.Select the Player option and enter the package name.Select the Open XR option, check the Microsoft HoloLens option, and select features, such as hand tracking.After setting, click Apply.Select Mixed Reality Toolkit in the Hierarchy panel, check whether the mounted script is DefaultMixedRealityToolkitConfiguration-Profile in the Inspector, and save the current scene after checking.After the scene is saved, the user needs to compile the current project with Visual Studio.Click Build Settings under the File option in the menu bar; the Build Settings window pops up and check whether the Platform is Windows Platform.Set the target device to HoloLens, click the Build button, and select a folder to build the scene.After the build is complete, a solution of type sln file is generated in the folder.Use Visual Studio to open this file, select the Release architecture as ARM64 to be compatible with HoloLens2, and use ×86 for HoloLens1.Connect the HoloLens2 device to the computer and select Start Without Debugging under the Debug option in the Visual Studio menu bar to complete the compilation.In order to more accurately view and manipulate the model in HoloLens2, the user needs to mount the Object Manipulator script and the NearInteractionGrabbable script to the model in Unity.The Object Manipulator script enables users to rotate and move objects and is suitable for joint hand and hand ray operations in HoloLens2.The NearInter-actionGrabbable script can make the object's gesture input response more accurate.The result is shown in Figure13.

Figure 13 .
Figure 13.Interaction with the Revit model in mixed reality.

Figure 13 .
Figure 13.Interaction with the Revit model in mixed reality.

Table 1 .
Software property sheet.Revit secondary development technology was used to obtain the automatic generation of the rebar model, the automatic generation of the rebar annotation, and the automatic export of the rebar data and drawings.The development tools for Revit secondary development are: Visual Studio, Revit SDK, Revit, Revit Look up, and AddinManager.Revit SDK is the official software development kit for Revit, containing help documentation for the Revit API and examples with source code.
3.21f and 2020.3.22fversions of Unity3D when developing HoloLens2.These two versions cause the holographic display of HoloLens2 to flicker.There is no separate SDK for Windows Mixed Reality development, and Visual Studio and Windows10 SDK are generally used.