Stair structure calculation method based on Revit secondary development

By developing a staircase structural calculation method that conforms to Chinese building codes on the Revit platform, the functional gap in staircase component structural calculation on the Revit platform has been resolved, enabling fast and accurate structural calculations and improving design efficiency and quality.

CN120822256APending Publication Date: 2025-10-21ZHONGBEI UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510889456.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

The Revit platform has functional gaps in the structural calculation of stair components, resulting in low design efficiency and poor accuracy. Cross-system data migration also damages the integrity of key attributes, affecting design quality and cycle.

Method used

A graphical user interface (GUI) was designed to comply with Chinese building codes. Through parametric input, combined with the Revit API and C# language, a staircase structure calculation method was developed, including stair type identification, automatic calculation model selection, and data encapsulation, to achieve fast and accurate structural calculations.

Benefits of technology

It improves the efficiency and accuracy of stair structure calculations, simplifies the design process, reduces the possibility of errors, adapts to Chinese construction industry standards, and meets the needs of designers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120822256A_ABST
    Figure CN120822256A_ABST
Patent Text Reader

Abstract

A stair structure calculation method based on Revit secondary development belongs to the technical field of building information models, solves the technical problems of complexity and low efficiency of a plate type stair structure calculation method, and comprises the following steps: S1, creating a Start Window class for a user to call a GUI (Graphical User Interface) in a plug-in in Revit software; s2, a View Model class is created; s3, a Stairs Structure class is created, and the class of the Stairs Structure is created; s4, a design technology of a graph method comparison and a novel GUI interface; s5, packaging the data; s6, determining a calculation model; and S7, reinforcement calculation is carried out, and stair structure calculation is completed. The method has important practical value for improving the working efficiency of a designer, improving the design quality and meeting the requirement for rapid structure calculation of the stairs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of building information modeling, and in particular relates to a stair structure calculation method based on Revit secondary development. Background Art

[0002] Building Information Modeling (BIM) technology uses digital and information-based methods to represent building models. This not only enables the sharing of building information knowledge resources, but is also becoming a crucial platform for decision support and information sharing throughout the building lifecycle. With technological advancements, BIM is progressing towards widespread adoption, cross-disciplinary collaborative design, and improved design and construction efficiency. This is driving BIM-based construction management and the efficient delivery, review, and storage of project results. In practical applications, BIM technology has been widely adopted, particularly with software such as Autodesk Revit, which accurately reflects the real-world characteristics of complex buildings through high-precision 3D models, providing comprehensive solutions for architectural design, structural engineering, and construction. However, empirical research has shown that while the Revit platform offers significant advantages in parametric modeling, its native structural analysis module suffers from systemic incompatibility with the technical provisions of the Code for Design of Concrete Structures, particularly in key analytical dimensions such as stair component structural calculations. These limitations not only impact the efficiency and quality of structural design but also can lead to a waste of time and human resources.

[0003] Currently, the industry generally adopts the Revit-PKPM / YJK multi-platform collaborative working model. This cross-system data migration process not only compromises the integrity of key attributes such as concrete strength grade and cover thickness, but also causes a nonlinear extension of the design iteration cycle, forming a major technical barrier to the in-depth application of BIM technology. The complexity and unfriendly nature of existing methods indicate an urgent need for simpler and more efficient structural calculation methods. Therefore, it is urgent to develop a method on the Revit platform that can quickly perform slab staircase structural calculations through simple parameter input, thereby improving structural calculation efficiency, shortening the design cycle, and enhancing design quality. Summary of the Invention

[0004] The main purpose of the present invention is to overcome the deficiencies in the prior art and solve the technical problems of complex and inefficient calculation methods for plate-type staircase structures. The present invention provides a staircase structure calculation method based on Revit secondary development.

[0005] The design concept of the present invention is:

[0006] 1) Design a graphical user interface (GUI) that meets the structural calculation requirements of domestic designers;

[0007] Autodesk Revit, a key tool in Building Information Modeling (BIM), has built-in stair modeling capabilities, but this has shown significant limitations in structural calculation applications for domestic designers. Furthermore, Revit's built-in calculation methods, based on EU building standards, differ from the commonly used Chinese National Building Design Standards. This results in inconsistent units and measurement methods, posing challenges to accuracy and efficiency for domestic designers.

[0008] To address this issue, the present invention has designed a GUI that meets domestic design standards and meets the needs of designers. Through parametric input, this software can rapidly calculate the structure of stair models in accordance with Chinese building codes. The stair calculation models include AT, BT, CT, DT, and ET types, significantly improving the efficiency and accuracy of stair structural calculations. This innovation not only simplifies the architectural design process but also eliminates the need for designers to perform multiple tedious modeling steps, reducing the possibility of errors and effectively improving work efficiency.

[0009] 2) Select the stair calculation method according to design requirements and generate calculation results;

[0010] Revit software includes built-in parameters for the geometric properties of various stair types. By developing a structural calculation model, this invention incorporates a variety of stair calculation solutions. During the calculation process, it identifies the stair type selected by the user and selects the appropriate calculation method model. This automated method selection mechanism eliminates the tedious manual selection process and the risk of error, ensuring calculation accuracy and efficiency, significantly reducing operational difficulty and making it easy for even beginners to master, providing users with greater computational freedom.

[0011] The present invention is implemented through the following technical solutions: a stair structure calculation method based on secondary development of Revit, including two aspects: first, in the window class Main Window of this WPF application, independently designed modeling auxiliary graphics are referenced and controls such as Text Box, Stack Panel, Text Block, and Button are added to prompt parameter input and maintain the parameterization of the overall technology; Initialize Component is used to initialize the XAML-defined GUI; second, in the window class Main Window of the WPF application, different parameters required for stair structure calculation are interactively designed with the encapsulated stair calculation method, and the external event Stairs Structure class (calculation model) is called to complete the stair calculation; specifically, the following steps are included:

[0012] S1. Create a Start Window class for users to call the GUI interface of the plug-in in Revit software;

[0013] S1-1. Add the Transaction attribute to the Start Window class to indicate that this command will manually control the transaction.

[0014] S1-2. Create the external command interface IExternal Command. External commands allow you to execute operations from external applications in Revit. Use the Execute method in this interface as the external command entry point. It accepts three parameters: commandData, message, and elements. It creates a new window instance Main Window, which is the GUI interface, and displays it. S1-3. Create Result.Succeeded to indicate that the command was successfully executed.

[0015] S2. Create a View Model class (which defines a view model class in a WPF application), including the INotifyProperty Changed interface. The INotify Property Changed interface provides a Property Changed event for notifying the UI of data changes. That is, when a property value in the View Model changes, a PropertyChanged event must be triggered so that the UI can update the display. The View Model is responsible for managing and notifying the UI of data changes. The purpose is to automatically calculate values ​​such as the stair length and the rest platform length as the UI interface data is updated. This technology helps to simplify the operation process.

[0016] S3. Create the Stairs Structure class as an external event handler class to encapsulate the stair calculation method and implement the IExternal Event Handler interface. The IExternal Event Handler interface uses the Execute method to perform operations outside the Revit application when an external event is triggered. The IExternal EventHandler interface receives a UI Application object as a parameter, which provides access to the Revit application. The Stairs Structure class also includes the IFailures Preprocessor interface, which receives a FailuresAccessor object as a parameter, which provides access to failures. The IFailures Preprocessor interface allows the plug-in to process possible failures in the stair calculation before submitting the transaction. The Preprocess Failures method in this interface is called before submitting the transaction.

[0017] S4. Graphics comparison and new GUI interface design technology. In the present invention, the GUI interface design is performed according to the staircase data shown in the CAD drawing designed based on the Chinese national architectural design standard drawing, including the following steps:

[0018] S4-1. Create auxiliary structure calculation GUI primitives;

[0019] S4-2. Use drawing tools, combine building codes with user interface requirements, and independently design graphic auxiliary units (using the Chinese National Architectural Design Standard Atlas as a reference), and intuitively express the parameters required for modeling in the corresponding positions of the graphic auxiliary units;

[0020] S5, data encapsulation;

[0021] S5-1, user parameter input processing module;

[0022] In the user input parameter processing module, the MainWindow.xaml.cs class implements the interaction between interface controls and calculation logic through the WPF data binding mechanism. This involves the following steps: First, the numeric parameters collected by the Text Box control are converted and exception handling is performed using the int.TryParse method; then, the data is passed to the StairsStrcal class, which handles stair structure calculations, through a public property interface. The StairsStrcal class defines a series of properties to store relevant parameters. For discrete parameters such as concrete strength grade and steel bar type, a drop-down list control is used to implement enumeration type mapping to avoid the risk of illegal input.

[0023] S5-2, building model parameter extraction module, dynamically obtains geometric parameters through the Revit API interface;

[0024] Based on the stair component database encapsulated in the created building model, the building model parameter extraction module directly calls parameters including stair tread thickness and number of treads. Furthermore, the module uses a parametric derivation algorithm to calculate derived parameters including the clear span value and stair segment height value. The clear span value is the product of the number of treads and the width, and the segment height is the product of the height and the number of treads. Both directly called parameters and derived parameters are updated in real time through the Element.Parameters property to ensure data synchronization after model modifications.

[0025] S5-3. The standard parameter encapsulation module implements object-oriented management of standard parameters through the Load Standards Stairs class. This class is instantiated using the singleton model and includes permanent and variable load partial factors. Its values ​​are based on the load classification standards of the "Code for Loads on Building Structures" (GB 50009-2012) and the "Code for Design of Concrete Structures" (GB 50010-2010). The corresponding tables for parameters such as concrete strength grade are initialized according to relevant requirements. During the calculation process, the Get Material Property() method is used to dynamically call the concrete compressive strength and steel yield strength parameters.

[0026] S6. Determine the calculation model;

[0027] This module considers plastic internal force redistribution in the structural design of stair treads, adheres to the technical requirements of the "Code for Design of Concrete Structures", and achieves dual guarantees of structural safety and code compliance through systematic program design. The calculation process includes four core stages: mechanical modeling, load combination, internal force analysis, and reinforcement design. Each stage establishes a mapping relationship with the code provisions. Load calculations must consider constant loads and variable loads, and apply the corresponding load partial factors. In terms of geometric relationships, the relationship between the oblique net length and the horizontal projection net length of the stair tread is based on trigonometric functions. The specific calculation process is as follows:

[0028] (1) The inclination angle of the inclined plate is calculated by using the cosine value of the angle between the ladder plate and the horizontal direction. The calculation formula is as follows:

[0029]

[0030] (2) In the load calculation, a 1m wide plate strip calculation unit model is established to comply with the definition of the calculation width of plate components in the specification;

[0031] The calculation formula of the standard value of surface load is as follows:

[0032]

[0033] The calculation formula for the standard value of self-weight load is as follows:

[0034]

[0035] The calculation formula of the standard value of plastering load is as follows:

[0036]

[0037] The calculation formula of the constant load standard value is as follows:

[0038] Pk=gkm+gkt+gks; (1-5)

[0039] The calculation formula for the total load design value is as follows:

[0040] Pn=Y0×(Yg×Pk+Yq×B×p); (1-6)

[0041] (3) When calculating the span, consider the connection between the two ends of the ladder plate and the platform beam and the stair beam. The calculation formula is as follows:

[0042]

[0043] (4) In the calculation of internal forces, considering that the inclined plate and the platform beam are cast integrally, the platform has a certain restraining effect on the rotation of the inclined plate, so the formula for calculating the mid-span bending moment is as follows:

[0044]

[0045] (5) In the calculation of cross-section bearing capacity, the formula for calculating effective height is as follows:

[0046] h0=tc; (1-9)

[0047] (6) The calculation formula for steel bar area is as follows:

[0048]

[0049] In formula (1-1) to formula (1-13):

[0050] cosa—cosine of the angle between the staircase and the horizontal direction;

[0051] gkm—standard value of surface load (kN / m 2 );

[0052] B—computational unit (m);

[0053] gkt—standard value of deadweight load (kN / m 2 );

[0054] gks—Standard value of plastering load (kN / m 2 );

[0055] Pk—Constant load standard value (kN / m 2 );

[0056] Pn—total load design value (kN / m 2 );

[0057] L0—calculated span (m);

[0058] M—mid-span bending moment (kN·m);

[0059] h0—effective height (m);

[0060] a s —section moment resistance coefficient;

[0061] ξ—relative height of the compression zone;

[0062] γ s —internal force arm coefficient;

[0063] A s —Area of ​​tensile reinforcement (m).

[0064] Combine equations (1-1) to (1-13) with the data obtained from the main program design preparation module to complete the calculation of the ladder plate section bearing capacity and the tensile reinforcement area;

[0065] S7. Reinforcement calculation;

[0066] When the plate thickness is not greater than 150mm, the spacing of the stress-bearing steel bars shall not exceed 200mm; when the plate thickness is greater than 150mm, the spacing of the stress-bearing steel bars shall not exceed 1.5 times the plate thickness and not exceed 250mm; the diameter of the steel bars shall not be less than 8mm; in order to find the actual stress-bearing steel bar area that meets the requirements, it is necessary to select a value greater than the calculated value A. s And with A s The closest to the cross-sectional area of ​​the steel bar includes the following steps:

[0067] The first stage is data preprocessing: constructing an integer set of steel bar cross-sectional areas;

[0068] The second stage is candidate selection: the binary search algorithm is used to optimize the calculation efficiency, including the following steps: First, the reinforcement amount A is calculated s Compared with the preset threshold, if A s ≤0 triggers an Invalid Operation Exception; then, the data set is traversed to perform conditional filtering; finally, a candidate list is generated and the corresponding steel bar diameter and spacing combinations are recorded simultaneously;

[0069] The third stage is to determine the optimal solution: an improved bubble sort is performed on the candidate list, including the following steps: first, the sort key values ​​are sorted in ascending order according to the cross-sectional area of ​​a single steel bar in the steel bar specification table minus the cross-sectional area of ​​the theoretically required tensile steel bar, ensuring that the first element is the one closest to A s Then, use the switch branch statement to judge whether the reinforcement meets the minimum reinforcement ratio requirement (the minimum reinforcement ratio ρ specified in Article 8.5.1 of the Code for Design of Concrete Structures) min ), the calculated longitudinal reinforcement amount is taken as the final result; if it is not satisfied, the product of the minimum reinforcement ratio and the corresponding cross-sectional area is taken as the final result, and a corresponding prompt is popped up to inform the user to complete the stair structure calculation.

[0070] Furthermore, in step S3, the Execute method includes the following steps: obtaining the current document (Document), the current selection (Selection), and the active view (View), and creating a transaction group (TransactionGroup) for grouping multiple transactions together;

[0071] In sub-transaction 1 of the transaction group, the calculation of the encapsulated data (overall scope) of the stairs is called;

[0072] In the sub-transaction 2 of the transaction group, a specific calculation method of the ladder segment is executed.

[0073] Furthermore, in step S3, the Preprocess Failures method includes the following steps:

[0074] ①. Get the failed message accessor list;

[0075] ② If the list is empty, return FailureProcessingResult.Continue, indicating that the transaction can continue to be submitted;

[0076] ③. Traverse the list of failure message accessors; if the severity of the failure is FailureSeverity.Error, check whether the failure has a solution. If a solution exists, use the failuresAccessor.ResolveFailure method to resolve the failure; if the severity of the failure is FailureSeverity.Warning, use the failuresAccessor.DeleteWarning method to delete the warning;

[0077] ④. Return FailureProcessingResult.ProceedWithCommit, indicating that the transaction can continue to be committed.

[0078] Furthermore, in step S4-2, the graphics auxiliary unit includes an AT-type auxiliary computing primitive, a BT-type auxiliary computing primitive, a CT-type auxiliary computing primitive, a DT-type auxiliary computing primitive, or an ET-type auxiliary computing primitive.

[0079] Furthermore, in step S5, the user parameter input processing module sets parameter verification rules, and when an input that does not meet the standard value range is detected, the Result Validator is automatically triggered to issue an exception reminder.

[0080] The beneficial effects of the present invention are:

[0081] 1) Convenient and efficient: This invention combines the C# language with the Revit API interface to achieve a user-friendly parametric input interface and a one-click calculation function. Designers only need to input design parameters to quickly generate structural calculation results that meet design requirements, thereby greatly improving modeling efficiency and reducing the designer's workload;

[0082] 2) Design ideas and drawing specifications that conform to the Chinese modeling environment: The technical solution adopted by this invention fully considers the application of Chinese construction industry standards (such as China National Building Design Standard Drawing-22G101) in stair design, allowing designers to better follow domestic design ideas and drawing specifications when using this software for stair structure calculations, thereby improving design quality;

[0083] 3) Filling a technological gap: Prior art has yet to achieve structural calculations for staircases within the Revit platform. This invention, through a proprietary framework and algorithmic code, implements structural calculations for various staircase types. Within the Revit platform, based on relevant mechanical theory and the Revit API, a structural analysis and calculation module was developed through interactive window design, parameter encapsulation, and algorithmic modeling. This module addresses the shortcomings of Revit in structural calculations within the forward design process, effectively addressing this technical pain point and satisfying market demand.

[0084] In summary, the staircase structure calculation method of the present invention provides a fast and efficient structural calculation solution, which has important practical value for improving designers' work efficiency, enhancing design quality, and meeting the needs of fast staircase structural calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 This is the overall structural diagram of the system;

[0086] Figure 2 This is the schematic diagram of the method library;

[0087] Figure 3 Develop a flow chart for the plugin;

[0088] Figure 4 This is a simplified calculation diagram for the stair inclined plate;

[0089] Figure 5 This is the plug-in GUI interface diagram;

[0090] Figure 6 This is a GUI interface diagram for using the calculation method of the present invention;

[0091] Figure 7 This is a GUI interface diagram of the calculation output results using the present invention. DETAILED DESCRIPTION

[0092] The present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0093] This embodiment selects WPF application based on the .Net Framework 4.7.2 framework as the development platform. It has a modern and extensible UI and allows the creation of applications with rich interactivity and visual effects. This greatly facilitates the research on secondary development technology of Revit software and also facilitates the design of parametric calculation technology and user use.

[0094] like Figures 1 to 3 The calculation method of stair structure based on Revit secondary development shown in the figure includes the following steps:

[0095] S1. Create a Start Window class for users to call the GUI interface of the plug-in in Revit software;

[0096] S1-1. Add the Transaction attribute to the Start Window class to indicate that this command will manually control the transaction.

[0097] S1-2. Create the external command interface IExternal Command. External commands allow you to execute operations from external applications in Revit. Use the Execute method in this interface as the external command entry point. It accepts three parameters: commandData, message, and elements. It creates a new window instance Main Window, which is the GUI interface, and displays it. S1-3. Create Result.Succeeded to indicate that the command was successfully executed.

[0098] S2. Create a View Model class, including the INotify Property Changed interface. The INotify PropertyChanged interface provides a Property Changed event for notifying the UI of data changes. That is, when the property value in the View Model changes, the Property Changed event must be raised so that the UI can update the display.

[0099] S3. Create the Stairs Structure class as an external event handler class to encapsulate the stair calculation method and implement the IExternal Event Handler interface. The IExternal Event Handler interface uses the Execute method to perform operations outside the Revit application when an external event is triggered. The IExternal EventHandler interface receives a UI Application object as a parameter, which provides access to the Revit application. The Stairs Structure class also includes the IFailuresPreprocessor interface, which receives a FailuresAccessor object as a parameter, which provides access to failures. The IFailuresPreprocessor interface allows the plug-in to process possible failures in the stair calculation before submitting the transaction. In this interface, the Preprocess Failures method is called before submitting the transaction.

[0100] The Execute method includes the following steps: obtaining the current document, current selection, and active view, creating a transaction group for grouping multiple transactions together;

[0101] In sub-transaction 1 of the transaction group, the encapsulated data calculation of the stairs is called;

[0102] In the sub-transaction 2 of the transaction group, a specific calculation method of the ladder segment is executed.

[0103] The Preprocess Failures method includes the following steps:

[0104] ①. Get the failed message accessor list;

[0105] ② If the list is empty, return FailureProcessingResult.Continue, indicating that the transaction can continue to be submitted;

[0106] ③. Traverse the list of failure message accessors; if the severity of the failure is FailureSeverity.Error, check whether the failure has a solution. If a solution exists, use the failuresAccessor.ResolveFailure method to resolve the failure; if the severity of the failure is FailureSeverity.Warning, use the failuresAccessor.DeleteWarning method to delete the warning;

[0107] ④. Return FailureProcessingResult.ProceedWithCommit, indicating that the transaction can continue to be committed.

[0108] S4. Graphics-method comparison and new GUI interface design technology, including the following steps:

[0109] S4-1. Create auxiliary structure calculation GUI elements

[0110] S4-2. Use drawing tools, combine building specifications and user interface requirements, and independently design graphic auxiliary units. The parameters required for modeling are intuitively expressed in the corresponding positions of the graphic auxiliary units. The graphic auxiliary units include AT-type auxiliary calculation primitives, BT-type auxiliary calculation primitives, CT-type auxiliary calculation primitives, DT-type auxiliary calculation primitives, or ET-type auxiliary calculation primitives. In this embodiment, the graphic auxiliary units are as shown in the attached figure. Figure 5 As shown;

[0111] S5, data encapsulation;

[0112] S5-1, user parameter input processing module;

[0113] In the user input parameter processing module, the MainWindow.xaml.cs class implements the interaction between interface controls and calculation logic through the WPF data binding mechanism. The following steps are included: First, the numeric parameters collected by the Text Box control (including the lower platform beam width b1 and the upper platform beam width b2) are converted and exception handled using the int.TryParse method; then, they are passed to the StairsStrcal class used to handle stair structure calculations through the public property interface. The StairsStrcal class defines a series of properties to store relevant parameters. The corresponding codes for these parameters in the calculation formula are shown in Table 1 below. For discrete parameters such as concrete strength grade and steel bar type, a drop-down list control is used to implement enumeration type mapping to avoid the risk of illegal input.

[0114] Table 1

[0115]

[0116] The user parameter input processing module sets parameter validation rules. When an input that does not meet the specified value range is detected, the Result Validator is automatically triggered to issue an exception reminder.

[0117] S5-2, building model parameter extraction module, dynamically obtains geometric parameters through the Revit API interface;

[0118] Based on the stair component database encapsulated in the created building model, the building model parameter extraction module directly calls parameters including stair tread thickness and number of treads. Furthermore, the module uses a parametric derivation algorithm to calculate derived parameters including the clear span value and stair segment height value. The clear span value is the product of the number of treads and the width, and the segment height is the product of the height and the number of treads. Both directly called parameters and derived parameters are updated in real time through the Element.Parameters property to ensure data synchronization after model modifications. The corresponding code relationship of the relevant parameters in the calculation formula is shown in Table 2 below.

[0119] Table 2

[0120]

[0121]

[0122] S5-3. The standard parameter encapsulation module implements object-oriented management of standard parameters through the Load Standards Stairs class. The Load Standards Stairs class contains permanent load partial factors and variable load partial factors. The Get Material Property() method is used to dynamically call the concrete compressive strength and steel yield strength parameters. The corresponding code relationship of the encapsulated data in the calculation formula is shown in Table 3 below;

[0123] Table 3

[0124]

[0125] The encapsulation code is as follows:

[0126] private static readonly Lazy <loadstandardsstairs>_instance=new Lazy <Lo

[0127] adStandardsStairs>(()=>new LoadStandardsStairs());

[0128] public static LoadStandardsStairs Instance=>_instance.Value;

[0129] private LoadStandardsStairs(){

[0130] InitializeLoadFactors();

[0131] InitializeMaterialStrengths();} / / Singleton implementation

[0132] public double Yg{get;private set;} / / Permanent load partial coefficient

[0133] public double Yq{get;private set;} / / variable load partial coefficient

[0134] private readonly Dictionary<string,double> _concreteStrength=newDictio

[0135] nary<string,double> ();

[0136] private readonly Dictionary<string,double> _steelStrength=newDictionary

[0137] <string,double> (); / / Material strength database

[0138] S6. Determine the calculation model;

[0139] The calculation diagram of the inclined plate is approximately as follows Figure 4 The specific calculation process is as follows:

[0140] (1) The inclination angle of the inclined plate is calculated by using the cosine value of the angle between the ladder plate and the horizontal direction. The calculation formula is as follows:

[0141]

[0142] (2) In load calculation, a 1m wide plate calculation unit model is established;

[0143] The calculation formula of the standard value of surface load is as follows:

[0144]

[0145] The calculation formula for the standard value of self-weight load is as follows:

[0146]

[0147] The calculation formula of the standard value of plastering load is as follows:

[0148]

[0149] The calculation formula of the constant load standard value is as follows:

[0150] Pk=gkm+gkt+gks; (1-5)

[0151] The calculation formula for the total load design value is as follows:

[0152] Pn=Y0×(Yg×Pk+Yq×B×p); (1-6)

[0153] (3) When calculating the span, consider the connection between the two ends of the ladder plate and the platform beam and the stair beam. The calculation formula is as follows:

[0154]

[0155] (4) In the calculation of internal forces, considering that the inclined plate and the platform beam are cast integrally, the platform has a certain restraining effect on the rotation of the inclined plate, so the formula for calculating the mid-span bending moment is as follows:

[0156]

[0157] (5) In the calculation of cross-section bearing capacity, the formula for calculating effective height is as follows:

[0158] h0=tc; (1-9)

[0159] (6) The calculation formula for steel bar area is as follows:

[0160]

[0161]

[0162] In formula (1-1) to formula (1-13):

[0163] cosa—cosine of the angle between the staircase and the horizontal direction;

[0164] gkm—standard value of surface load (kN / m 2 );

[0165] B—computational unit (m);

[0166] gkt—standard value of deadweight load (kN / m 2 );

[0167] gks—Standard value of plastering load (kN / m 2 );

[0168] Pk—Constant load standard value (kN / m 2 );

[0169] Pn—total load design value (kN / m 2 );

[0170] L0—calculated span (m);

[0171] M—mid-span bending moment (kN·m);

[0172] h0—effective height (m);

[0173] a s —section moment resistance coefficient;

[0174] ξ—relative height of the compression zone;

[0175] γ s —internal force arm coefficient;

[0176] A s —Area of ​​tensile reinforcement (m).

[0177] Combine equations (1-1) to (1-13) with the data obtained from the main program design preparation module to complete the calculation of the ladder plate section bearing capacity and the tensile reinforcement area;

[0178] The specific code is as follows:

[0179] private static double CalculateAlphaS(double M,double a,double fc,doubl

[0180] e B,double h0){return M / (a*fc*B*Math.Pow(h0,2));}

[0181] Input Validation

[0182] if (input.h0<=0) throw new ArgumentException("The effective height h0 must be greater than 0");

[0183] var standards=LoadStandardsStairs.Instance;

[0184] if(!standards.IsValidConcreteGrade(input.ConcreteGrade)throw newArgumen

[0185] tException($"Invalid concrete grade: {input.ConcreteGrade}");

[0186] S7. Reinforcement calculation;

[0187] When the plate thickness is not greater than 150mm, the spacing between the stress-bearing steel bars shall not exceed 200mm. When the plate thickness is greater than 150mm, the spacing between the stress-bearing steel bars shall not exceed 1.5 times the plate thickness and not exceed 250mm. The diameter of the steel bars shall not be less than 8mm. Based on this, the cross-sectional area of ​​the steel bars that meet the requirements is shown in Table 4 below.

[0188] Table 4

[0189]

[0190] In order to find the required actual reinforced steel area, it is necessary to select a value greater than the calculated value A in Table 4. s And with A s The closest to the cross-sectional area of ​​the steel bar includes the following steps:

[0191] The first stage, data preprocessing: constructing an integer set containing all the steel bar cross-sectional areas in Table 4;

[0192] The second stage is candidate selection: the binary search algorithm is used to optimize the calculation efficiency, including the following steps: First, the reinforcement amount A is calculated s Compared with the preset threshold, if A s ≤0 triggers an Invalid Operation Exception; then, the data set is traversed to perform conditional filtering; finally, a candidate list is generated and the corresponding steel bar diameter and spacing combinations are recorded simultaneously;

[0193] The third stage is to determine the optimal solution: an improved bubble sort is performed on the candidate list, including the following steps: first, the sort key values ​​are sorted in ascending order according to the cross-sectional area of ​​a single steel bar in the steel bar specification table minus the cross-sectional area of ​​the theoretically required tensile steel bar, ensuring that the first element is the one closest to A s Then, use the switch branch statement to judge whether the reinforcement meets the minimum reinforcement ratio requirement (the minimum reinforcement ratio ρ specified in Article 8.5.1 of the Code for Design of Concrete Structures) min ), the calculated longitudinal reinforcement amount is taken as the final result; if it is not satisfied, the product of the minimum reinforcement ratio and the corresponding cross-sectional area is taken as the final result, and a corresponding prompt is popped up to inform the user to complete the stair structure calculation. The specific code is as follows:

[0194] private readonly List <rebaroption>_rebarTable=new List <rebaroption>{

[0195] new RebarOption(8,70,718), / / Example data

[0196] }.OrderBy(r=>r.Area).ToList(); / / One stage

[0197] while(left<=right){

[0198] int mid=(left+right) / 2;

[0199] if(_rebarTable[mid].Area>=requiredAs){

[0200] firstValid=mid;

[0201] right = mid - 1;}

[0202] else{left=mid+1;}} / / Second stage

[0203] return candidates.Select(r=>new{Option=r,Delta=r.Area-requiredAs,

[0204] DiameterPriority=r.Diameter}).OrderBy(x=>x.Delta).ThenBy(x=>x.

[0205] DiameterPriority).ThenBy(x=>x.Option.Spacing).First().Option; / / Three stages

[0206] like Figure 6 and Figure 7 As shown, select a certain staircase (demonstrating the calculation of an AT-type staircase) and enter the design parameters in the GUI interface. After entering the parameters, click the start calculation control. The system will start calling the packaged data and calculation model to perform the calculation, and finally output the calculation results in the GUI interface. It can be seen that the innovations of this invention are mainly reflected in the following aspects:

[0207] 1. Technology adapted to Chinese construction industry standards: This invention fully considers the application of Chinese construction industry standards in stair structure design, enabling designers to better follow domestic design ideas and drawing standards when using this software for stair structure calculations;

[0208] 2. Unique Interface Design Technology: This technology can quickly select the appropriate calculation method for each type of staircase based on the user's actual needs, performing accurate and efficient calculations. In particular, this technology successfully achieves rapid calculations for various staircase types within the Revit environment, eliminating the need to convert BIM models across multiple structural calculation software packages, effectively filling a gap in existing technology in this area.

[0209] 3. Design of staircase structure calculation model algorithm based on Revit secondary development developed in C# language: This invention is written in C# language and uses the API provided by Revit2019. It adopts a large number of calculation formulas and modification methods to finally form several structural calculation models and complete the structural calculation part of the stairs;

[0210] 4. User-friendly parameterized input interface: The software of the present invention provides a user-friendly parameterized input interface. Designers only need to input design parameters to complete the staircase structure calculation.

[0211] 5. Data encapsulation and processing module: The present invention integrates a complete parameter library within the software by encapsulating various types of standard parameters as a whole. During the calculation process, after the relevant features are input, the calculation model will automatically retrieve the corresponding parameters from the database, and the information transmission accuracy is high.

[0212] The above are the main innovative points and technical features required to be protected of the present invention, which together constitute the technical solution of the present invention and have important practical value in improving the work efficiency of designers and enhancing the design quality.

[0213] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.< / rebaroption> < / rebaroption> < / loadstandardsstairs>

Claims

1. The calculation method of stair structure based on Revit secondary development is characterized by: The following steps are involved: S1. Create a Start Window class for users to call the GUI interface of the plug-in in Revit software; S1-1. Add the Transaction attribute to the Start Window class to indicate that this command will manually control the transaction. S1-2. Create an external command interface IExternal Command. External commands allow you to execute operations from external applications in Revit. In this interface, use the Execute method as the external command entry point. It accepts three parameters: command Data, message, and elements. It creates a new window instance Main Window, which is the GUI interface, and displays it. S1-3. Create Result.Succeeded, indicating that the command has been successfully executed; S2. Create a View Model class, including the INotify Property Changed interface. The INotify PropertyChanged interface provides a Property Changed event for notifying the UI of data changes. That is, when the property value in the View Model changes, the Property Changed event must be raised so that the UI can update the display. S3. Create the Stairs Structure class as an external event handler class to encapsulate the stair calculation method and implement the IExternal Event Handler interface. The IExternal Event Handler interface uses the Execute method to perform operations outside the Revit application when an external event is triggered. The IExternal Event Handler interface receives a UI Application object as a parameter, which provides access to the Revit application. The StairsStructure class also includes the IFailures Preprocessor interface, which receives a Failures Accessor object as a parameter, which provides access to failures. The IFailures Preprocessor interface allows the plug-in to process possible failures in the stair calculation before submitting the transaction. The Preprocess Failures method in this interface is called before submitting the transaction. S4. Graphics-method comparison and new GUI interface design technology, including the following steps: S4-1. Create auxiliary structure calculation GUI primitives; S4-2. Use drawing tools, combine building codes and user interface requirements, independently design graphic auxiliary units, and intuitively express the parameters required for modeling in the corresponding positions of the graphic auxiliary units; S5, data encapsulation; S5-1, user parameter input processing module; In the user input parameter processing module, the MainWindow.xaml.cs class implements the interaction between interface controls and calculation logic through the WPF data binding mechanism. The following steps are included: First, the numeric parameters collected by the Text Box control are converted and exception handling is performed using the int.TryParse method; then, the values ​​are passed to the StairsStrcal class, which is used to process stair structure calculations, through the public property interface; S5-2, building model parameter extraction module, dynamically obtains geometric parameters through the Revit API interface; Based on the stair component database encapsulated in the created building model, the building model parameter extraction module directly calls parameters including stair tread thickness and number of treads. Furthermore, the module uses a parametric derivation algorithm to calculate derived parameters including the clear span value and stair segment height value. The clear span value is the product of the number of treads and the width, and the segment height is the product of the height and the number of treads. Both directly called parameters and derived parameters are updated in real time through the Element.Parameters property to ensure data synchronization after model modifications. S5-3, the standard parameter encapsulation module implements object-oriented management of standard parameters through the Load Standards Stairs class. The Load Standards Stairs class includes permanent load partial factors and variable load partial factors. The GetMaterial Property() method is used to dynamically call the concrete compressive strength and steel yield strength parameters. S6. Determine the calculation model; (1) The inclination angle of the inclined plate is calculated by using the cosine value of the angle between the ladder plate and the horizontal direction. The calculation formula is as follows: (2) In load calculation, a 1m wide plate calculation unit model is established: The calculation formula of the standard value of surface load is as follows: The calculation formula for the standard value of self-weight load is as follows: The calculation formula of the standard value of plastering load is as follows: The calculation formula of the constant load standard value is as follows: Pk=gkm+gkt+gks; (1-5) The calculation formula for the total load design value is as follows: Pn=Y0×(Yg×Pk+Yq×B×p); (1-6) (3) When calculating the span, consider the connection between the two ends of the ladder plate and the platform beam and the stair beam. The calculation formula is as follows: (4) In the calculation of internal forces, considering that the inclined plate and the platform beam are cast integrally, the platform has a certain restraining effect on the rotation of the inclined plate, so the formula for calculating the mid-span bending moment is as follows: (5) In the calculation of cross-section bearing capacity, the formula for calculating effective height is as follows: h0=tc; (1-9) (6) The calculation formula for steel bar area is as follows: In formula (1-1) to formula (1-13): cosa—cosine of the angle between the staircase and the horizontal direction; gkm—standard value of surface load (kN / m 2 ); B—computational unit (m); gkt—standard value of deadweight load (kN / m 2 ); gks—Standard value of plastering load (kN / m 2 ); Pk—Constant load standard value (kN / m 2 ); Pn—total load design value (kN / m 2 ); L0—calculated span (m); M—mid-span bending moment (kN·m); h0—effective height (m); a s —section moment resistance coefficient; ξ—relative height of the compression zone; γ s —internal force arm coefficient; A s —Area of ​​tensile reinforcement (m). Combine equations (1-1) to (1-13) with the data obtained from the main program design preparation module to complete the calculation of the ladder plate section bearing capacity and the tensile reinforcement area; S7. Reinforcement calculation; When the plate thickness is not greater than 150mm, the spacing of the stress-bearing steel bars shall not exceed 200mm; when the plate thickness is greater than 150mm, the spacing of the stress-bearing steel bars shall not exceed 1.5 times the plate thickness and not exceed 250mm; the diameter of the steel bars shall not be less than 8mm; in order to find the actual stress-bearing steel bar area that meets the requirements, it is necessary to select a value greater than the calculated value A. s And with A s The closest to the cross-sectional area of ​​the steel bar includes the following steps: The first stage is data preprocessing: constructing an integer set of steel bar cross-sectional areas; The second stage is candidate selection: the binary search algorithm is used to optimize the calculation efficiency, including the following steps: First, the reinforcement amount A is calculated s Compared with the preset threshold, if A s ≤0 triggers an Invalid Operation Exception; then, the data set is traversed to perform conditional filtering; finally, a candidate list is generated and the corresponding steel bar diameter and spacing combinations are recorded simultaneously; The third stage is to determine the optimal solution: an improved bubble sort is performed on the candidate list, including the following steps: first, the sort key values ​​are sorted in ascending order according to the cross-sectional area of ​​a single steel bar in the steel bar specification table minus the cross-sectional area of ​​the theoretically required tensile steel bar, ensuring that the first element is the one closest to A s Then, the switch branch statement is used to judge that if the reinforcement amount meets the minimum reinforcement ratio requirement, the calculated longitudinal reinforcement amount is taken as the final result; if it does not meet the requirement, the product of the minimum reinforcement ratio and the corresponding cross-sectional area is taken as the final result, and a corresponding prompt is popped up to inform the user to complete the stair structure calculation.

2. The staircase structure calculation method based on Revit secondary development according to claim 1 is characterized in that: In step S3, the Execute method includes the following steps: obtaining the current document, the current selection, and the active view, and creating a transaction group for grouping multiple transactions together; In sub-transaction 1 of the transaction group, the encapsulated data calculation of the stairs is called; In the sub-transaction 2 of the transaction group, a specific calculation method of the ladder segment is executed.

3. The staircase structure calculation method based on Revit secondary development according to claim 1 is characterized in that: In step S3, the Preprocess Failures method includes the following steps: ①. Get the failed message accessor list; ② If the list is empty, return FailureProcessingResult.Continue, indicating that the transaction can continue to be submitted; ③. Traverse the list of failure message accessors; if the severity of the failure is FailureSeverity.Error, check whether the failure has a solution. If a solution exists, use the failuresAccessor.ResolveFailure method to resolve the failure; if the severity of the failure is FailureSeverity.Warning, use the failuresAccessor.DeleteWarning method to delete the warning; ④. Return FailureProcessingResult.ProceedWithCommit, indicating that the transaction can continue to be committed.

4. The staircase structure calculation method based on Revit secondary development according to claim 1 is characterized in that: In the step S4-2, the graphics auxiliary unit includes an AT-type auxiliary computing primitive, a BT-type auxiliary computing primitive, a CT-type auxiliary computing primitive, a DT-type auxiliary computing primitive, or an ET-type auxiliary computing primitive.

5. The staircase structure calculation method based on Revit secondary development according to claim 1 is characterized in that: In step S5, the user parameter input processing module sets parameter verification rules, and when an input that does not meet the standard value range is detected, the Result Validator is automatically triggered to issue an exception reminder.