Parameterized bench generation method based on SketchUp

By using the parameterized ladder segment generation method on SketchUp, combined with HTML, JavaScript and Ruby API, the problems of low efficiency and error-prone in stair design by traditional 3D modeling software are solved, and the rapid and accurate generation of stairs that meet the needs is achieved. Model.

CN119442424AActive Publication Date: 2025-02-14ZHEJIANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411582093.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-14
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

Traditional three-dimensional modeling software is inefficient and prone to errors when generating and managing complex stair models, making it difficult to quickly generate models that meet actual needs.

Method used

The parameterized ladder segment generation method based on SketchUp is adopted, and the easy-to-interactive UI panel written in HTML and JavaScript and the parametric model algorithm written in Ruby are automatically generated to meet various needs.

Benefits of technology

It significantly reduces design time, improves model accuracy and consistency, and meets complex needs in modern architectural design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442424A_ABST
    Figure CN119442424A_ABST
Patent Text Reader

Abstract

The invention discloses a parameterized stair flight generation method and device based on SketchUp, a set of parameterized panel constructed by using HTML / CSS and JavaScript and a set of stair flight parameterized generation algorithm based on SketchUp Ruby API are designed in the SketchUp, parameters are bound with a model based on historical parameterized stair flight editing, so that generation parameters of an old model can be reserved and identified, and the generation efficiency of the model is improved. Production parameters of the model are allowed to be obtained when drawings are transmitted among different users, and parameters of an old model can be edited to generate a new model under the condition that external operations (moving, rotating and the like on the model) of the users are reserved. According to the invention, various types of stair sections including double-step stairs, scissor ladders, PC stairs, steel ladders and bicycle ramps can be generated. After the parameterization panel is opened, the stair flight name, the floor name, the stair flight type, the general parameters and the stair flight specific parameters are respectively set, and the stair flight can be generated by one key, so that the time-consuming and complex manual modeling process is avoided, and the design process is greatly accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial three-dimensional model generation, and in particular to a parameterized staircase generation method based on SketchUp. Background Art

[0002] With the widespread application of 3D modeling technology in fields such as architecture, engineering, and manufacturing, how to effectively generate and manage complex 3D models has become a key issue. Traditional 3D modeling methods often require manual adjustment and creation of models, which is not only time-consuming and labor-intensive, but also prone to errors. In the field of architectural design, especially when it comes to multi-story buildings and complex structures, designers need to frequently create and adjust stair models to ensure the accuracy and operability of the design.

[0003] However, although traditional modeling software such as SketchUp has been widely used in 3D modeling, it still has certain limitations when generating and managing complex stair models. For example, the design of stairs involves multiple parameters, such as step height, step width, number of steps, etc. The adjustment of these parameters often needs to be done manually, and each modification may require re-creating the model, which is inefficient and prone to errors. In addition, for different floors and different types of stairs, traditional methods are difficult to quickly generate models that meet actual needs, resulting in a complex and time-consuming design process.

[0004] In order to solve these problems, parametric design methods have gradually attracted attention. Parametric design can automatically generate and adjust models by associating design elements with variables and rules, greatly improving the efficiency and accuracy of design. In this context, a parametric stair segment generation and use method based on SketchUp is developed to automatically generate stair models that meet various requirements, which can not only significantly reduce design time, but also improve the accuracy and consistency of the model, thereby meeting the increasingly complex needs of modern architectural design. Summary of the invention

[0005] The purpose of the present invention is to provide a parametric staircase generation and use method based on SketchUp on the basis of parametric modeling in view of the shortcomings of the prior art. The method provides an easy-to-interact UI panel written in HTML and JavaScript and a parametric model algorithm written in Ruby, so that users can accurately and quickly construct the required staircase model according to the set parameters, solve the problems of low efficiency and easy errors in traditional 3D modeling software in staircase design, and meet the operation requirements in the BIM industry.

[0006] The object of the present invention is achieved through the following technical solution: a parametric staircase generation method based on SketchUp, comprising the following steps:

[0007] (1) Open the parametric panel, edit and design the stair segment parameters, click Apply, and use JavaScript to package the data into a specific JSON format and pass it to the parametric stair segment generation algorithm written in the SketchUp Ruby API;

[0008] (2) After obtaining the designed JSON parameters, the global stair parameters and the specific parameters of the stair segments based on the floor can be obtained from them. The parametric generation class of the stair segments is initialized according to the global stair parameters to mark the components to be generated, and the old model and view information in SketchUp are recorded at the same time; the specific parameter data of the stair segments are sorted from low to high according to the floor, the parameters are recorded and the relevant parameters for filling the connected stair segment platforms and determining the location of the generated stair segments are initialized;

[0009] (3) Take an ungenerated lowest floor data from the specific parameters of the stair segment, read its general stair parameters, and obtain the number of stair segments on the current floor; traverse the num stair segment parameters in the current floor, update the specific parameters of the current stair segment each time, and call different stair segment parameterization generation algorithms for different stair segment types, add the generated stair segment to the generation result list, and generate and fill the connected stair segment platform according to the generation result of the previous stair segment, and add it to the generation result list; and merge the list into a stair segment group for subsequent processing;

[0010] (4) Select "Generate all floors" to view the floor names, where the floor names are x~yF. Copy the staircase group generated in step (3) upward yx times and name them according to the floors.

[0011] (5) Repeat steps (3) and (4) until all floors are generated; generate floor plans and top extension platforms, and merge them into one group to obtain a total model containing all models; if there is an old model, move the total model to the old position, and finally complete the generation of the parametric staircase.

[0012] Furthermore, the step (1) is implemented by the following sub-steps:

[0013] (1.1) Click the parametric generation panel icon to pop up the parametric staircase UI panel;

[0014] (1.2) Detect whether there is a selected model in the current SketchUp. If there is a selected model and the model is a stair segment generated based on SketchUp's parametric stair segment, read the parametric generation data stored in the model and pass it to the parametric panel built by HTML / CSS and JavaScript, and use JavaScript to read and display the parameters; if no model is selected or no data is read, the parametric panel is the preset parameters;

[0015] (1.3) After editing the parameters, click the Apply button, and the parameters in the panel will be converted into specific JSON format data and transmitted to the parametric stair generation algorithm written by the SketchUp Ruby API.

[0016] Furthermore, the step (2) is implemented by the following sub-steps:

[0017] (2.1) After obtaining the JSON data in step (1), initialize the stair segment parametric generation class object and read the stair segment global generation parameters, including whether to generate the evacuation radius volume, whether to generate all floors, whether there is a top extension platform, and whether floor display is required;

[0018] (2.2) Traverse the existing models in SketchUp to find out whether there is a staircase with the same name. If so, record the transformation matrix of the model; if not, set the transformation matrix to the unit matrix; at the same time, record the layer status in the current SketchUp to restore the display and hiding of the layer in SketchUp after the subsequent generation is completed;

[0019] (2.3) Identify the floor names in the data, and sort the parameter data by the floor names to form an order similar to [B3~B2F, B1F, 1F, 2~5F, RF];

[0020] (2.4) Maintain a standard point for model generation. When the stair segment model is generated at the origin, the model can be placed in the correct position by transforming it with reference to this standard point. The model is updated according to the stair segment parameters each time a stair segment is produced. At the same time, the data structure used to record the width, length, height and platform length of the previous stair segment is initialized to generate a connection component.

[0021] Furthermore, the step (3) is implemented by the following sub-steps:

[0022] (3.1) Take an ungenerated lowest floor data and read its general stair parameters, including stair type, stair height, stair width, step height, step width, and total number of steps;

[0023] (3.1) Get the number of staircases num, that is, the floor is composed of num staircases. If the staircase type of the floor is a scissors staircase, then the floor is composed of 2*num staircases.

[0024] (3.2) Read the stair parameters in sequence according to the stair number, call different stair parameterization generation algorithms according to the stair type, and update the model to generate standard points; normally, a stair group contains a staircase and a surface layer, two platforms and a surface layer, a clear height volume and a railing; if it is a double-run staircase, generate a zigzag wireframe on the side of the stair according to the number of steps, step width and step height, and then push and pull it into a stair according to the stair width; the stair surface layer and the platform are also produced in the same way; the positions of different components are derived from the given parameters; if it is a scissor staircase, it is necessary to apply a mirror matrix to the original stair group based on the double-run staircase, and obtain the stair group on the other side according to the stair width offset;

[0025] (3.3) Every time a staircase is generated, the missing platform caused by the stairwell needs to be filled;

[0026] (3.4) The models generated by step (3.2) and step (3.3) are grouped into the generated result list in sequence to obtain the floor stair model of one layer.

[0027] Furthermore, step (4) is implemented by the following sub-steps:

[0028] (4.1) Check whether the global parameter selects "Generate all layers". If so, proceed to step (4.2); otherwise, end step (4);

[0029] (4.2) Check whether the current floor name is in the form of "X~YF". If so, it means that the same parameters are applied to all floors from XF to YF, and the floor stair model of the XF layer generated in step (3) needs to be copied upwards;

[0030] (4.3) In order to obtain the floor stair model of X+iF, it is necessary to copy the floor stair model of the XF layer and offset it upward by i stairwell heights to obtain the floor stair model of X+iF.

[0031] Furthermore, step (5) is implemented by the following sub-steps:

[0032] (5.1) Repeat steps (3) and (4) according to the number of floor names obtained to generate all models into groups;

[0033] (5.2) Group all the models generated in step (5.1) to obtain the total ladder model;

[0034] (5.3) If "Floor Display" is selected, a transparent plane will be constructed at the initial height of each floor to indicate the floor according to the number of floor initial height groups; if "Top Extension Platform" is selected, a symmetrical stair platform plate needs to be generated on the other side of the top platform;

[0035] (5.4) merging the total stair segment model in step (5.2) and the other models in step (5.3) to obtain the final stair segment model group;

[0036] (5.5) Apply the transformation matrix obtained in step (2.2) to the final stair model, store the JSON data generated in step (1.3) in the model, and restore the view.

[0037] The benefits of the present invention are as follows:

[0038] In the parametric generation process, the present invention adds a set of parametric panels constructed using HTML / CSS and JavaScript. The panel provides a user-program interaction method that is easy to use and convenient and concise, so that users can accurately and quickly construct the required stair model according to the set parameters, thereby greatly accelerating the efficiency of modeling and improving the accuracy of modeling. At the same time, the present invention uses a set of stair segment parametric generation algorithms based on the SketchUp Ruby API, which can directly generate models in SketchUp through the parameters provided by the UI panel, avoiding the problem of conversion between models. The algorithm can generate stair segment models and various stair segment-related components including stair segment platforms, stair segment railings, clear height volumes, stair segment surface layers, etc., to meet actual usage needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a framework diagram of the parametric staircase generation and use method based on SketchUp of the present invention;

[0040] Figure 2 The present invention uses HTML / CSS and JavaScript to construct a parameterized UI panel diagram;

[0041] Figure 3 It is a schematic diagram of the net height volume generated by the present invention;

[0042] Figure 4 Schematic diagrams of stair models generated by the present invention are, from left to right, double-tread staircases, scissor stairs and PC stairs;

[0043] Figure 5 1 is a generated stair model of the present invention, which includes a steel staircase and a bicycle ramp from left to right. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example: a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] like Figure 1 As shown, a method for generating and using a parametric stair segment based on SketchUp includes the following steps:

[0047] Step 1: Open the parameterized panel, edit the panel, and click the "Apply" button to construct the data of the UI panel into JSON data and transmit it to the parameterized generation algorithm.

[0048] Step one is the technical basis of the present invention, which takes structured JSON data as the processing unit and fundamentally meets the operational requirements of parameterized generation. In addition, the UI panel in step one is one of the core invention parts, which constructs a clear and interactive UI panel to avoid difficulties in use and greatly speed up the design process.

[0049] The step 1 includes the following sub-steps:

[0050] (1.1) Use HTML / CSS and JavaScript to build parameterized UI panels, such as Figure 2 A series of rules are set in the panel, such as the clear height of the stair section must not be less than 2000, the step height is equal to the height of the staircase divided by the total number of steps, and the options of double-run staircases and scissor ladders are mutually exclusive, etc.

[0051] (1.2) When you click the parameterized panel, a UI::HtmlDialog object dialog is constructed in SketchUp. This object is bound to the HTML file in step (1.1) and a series of callback actions are set for the dialog so that the HTML dialog can call the Ruby method in SketchUp.

[0052] (1.3) After the dialog is generated and initialized, it will check whether there is a model with parametric data currently selected, extract the parametric data, and use the execute_script method to execute the JavaScript method in HTML to fill the panel. When setting the stair segment name, it will also call back the Ruby method in SketchUp to ensure that there is no duplication of names.

[0053] (1.4) After editing the parameters and clicking "Apply", the panel data is packaged into a specific JSON file in HTML. The JSON file mainly includes two parts: "uidata" for storing UI panel data and "stairdata" for generating models; the data in "stairdata" is based on floors, the key is the floor name, and the value contains the general stair parameters of the floor (number of flights, step width, total number of steps, step height, etc.) and the specific parameters of multiple flights (number of steps, flight height, and various offset values). After the JSON is generated, JavaScript will pass it to Ruby and call the parameterized stair generation algorithm.

[0054] Step 2: Process the JSON data submitted in step 1, read the UI panel data, set the global parameters according to the global settings, and control the subsequent parametric generation process. Then, according to the stair segment name submitted by the user, find out whether there is an object with the same name in the current workspace, and record the current status information of the object. At the same time, provide preprocessing support for the subsequent parametric generation algorithm, including floor sorting, positioning standard generation points, displaying and hiding components, etc.

[0055] Step 2 is a connection between step 1 and step 3. After obtaining the JSON data of the UI panel, the data is preprocessed, which includes the following sub-steps.

[0056] (2.1) First, extract uiData from the incoming data, which contains the parameters set by various UI panels, including the name of the stair segment, floor configuration, and other signs and parameter information required for generation. The system will perform a series of initialization operations based on these parameter configurations (global stair parameters and specific parameters of stair segments based on floors can be obtained from them, and the stair segment parametric generation class is initialized according to the global stair parameters. The stair segment parametric generation class is a class used for parametric generation. This class needs to determine which components need to be produced based on the global stair parameters, and the floor stair segment parameters are required for the subsequent algorithm generation.), including setting the stair segment name and various iconic parameters, such as generating signs for all floors, whether to generate evacuation radius volumes, and whether to extend the top platform parameters.

[0057] (2.2) Before generating, the system will traverse all group objects in the current SketchUp model to find out whether there is a model group with the same name as the current stair segment. If a stair segment group with the same name is found, the system will record its transformation matrix and obtain the inverse transformation matrix (if any) and Z-axis offset value associated with the group. To avoid naming conflicts, the found stair segment group will be renamed to the original name with the suffix "old".

[0058] (2.3) In floor data processing, the system parses the floor configuration from the incoming uiData and sorts the floors according to their heights. This sorting process ensures that the generated staircases are generated in order from low to high, thus meeting the actual requirements of the building design.

[0059] (2.4) In order to ensure the consistency of stair segment generation, the system maintains a standard generation point, which is used to determine the initial position of each stair segment. After each stair segment is generated, the system updates the position of the standard point based on the stair segment's width, length, height and other parameters. At the same time, the system initializes a data structure to record the parameters of the last generated stair segment, which will be used when generating connected components.

[0060] (2.5) During the generation process, the system will save the layer display status in the current SketchUp model and set all layers to be visible for subsequent model processing. After the generation is completed, the system will restore the original layer display status to maintain the overall consistency and operability of the model.

[0061] Step 3: Read the floor data processed in step 2, take out the lowest ungenerated floor, read the parameters of all the constructed stair sections, and generate the stair sections in sequence from bottom to top according to the parameters of each stair section; for each stair section, starting from the initial generation point, construct the stair section body, clear height volume, handrails and other components respectively. After all components are generated, group them and obtain a complete stair section model through matrix transformation.

[0062] Step three is the second part of the core invention, and the parametric generation process basically takes place here. In this step, the generation points of all components are at the origin. After the component is parametrically generated, the relationship between the standard production point and the origin is used to determine whether flipping and other operations are required to obtain a change matrix. The matrix is ​​applied to the generated stair model to obtain a stair model with the correct final position and direction, and then the standard production point is updated. This avoids the inconvenience of directly processing the stair direction and height in parametric generation.

[0063] The step three includes the following sub-steps:

[0064] (3.1) The system first initializes the height, width, depth and other parameters of the stair segment, sets the initial X-axis offset, and reserves platform parameters for the generated stair segment. These parameters will be used to generate the stair segment and adjust the direction of the stair segment in the future.

[0065] (3.2) The system traverses the user-defined floor array and generates stair sections for each floor in turn. For each floor, the system generates and copies stair sections according to the floor number and parameters. The logic for generating stair sections is as follows:

[0066] (3.2.1) Generate the main body of the stair segment. The main body of the stair segment is divided into the surface layer part and the stair segment entity. First, we need to set different generation methods according to the given stair segment type. For steel stairs, we only need to generate the surface layer part, and for PC stairs, we only need to generate the entity part. Next, we will describe the generation of the entity part. The algorithm for generating the main body of the stair segment starts from the origin ORIGIN (0,0,0), walks one step height to (0,0,stepHeight) along the Z axis, and then walks one step width to (0,stepWidth,stepHeight) along the Y axis to get a step. This process will loop according to the given number of steps num. Each loop will generate a riser and a tread, and finally form a jagged line segment shaped like the upper side of the main body of the stair segment. The end point of this jagged line segment will be at (0,0+num*stepWidth,0+num*stepHeight). In order to make the stair segment and the platform plate smoothly connected, it is necessary to calculate the top beam offset and top beam offset according to the parameters. After the top beam offset, go down one platform plate thickness to get the upper end point of the hypotenuse of the stair segment, and the same goes for the lower end. Connect all the points to get a closed side frame line of the stair segment entity. Use this frame line to form a surface and push and pull a stair segment width to get the stair segment entity component. The modeling of the stair segment surface layer is simpler than the stair segment entity. You only need to generate two stair segment serrations and connect them. Different stair segment types require different stair segment components to be generated. Double-run stairs follow the above stair segment and stair segment surface layer parts; scissor stairs need to be mirrored after generating a stair segment; PC stairs do not contain stair segment surface layers; steel stairs only contain stair segment surface layers; bicycle ramps require an additional ramp to be generated in the center of the stair segment.

[0067] (3.2.2) Generate the clear height volume. Figure 3As shown in the net height volume, A is the line segment a drawn 2200 upwards from the first step tip of the stair section, and then a line segment b is drawn 2200 upwards from the top step tip. The parallelogram formed by the line segment a\b is the cross section of A, and then the A block is formed by pushing and pulling with the width of the stair section. B is the line segment a plus a step height downwards, and then translated 300 toward the platform to form the cross section of B, and then pushed and pulled with the width of the stair section to form the B block. C is the line segment b directly translated 300 toward the platform to form the cross section of C, and then pushed and pulled with the width of the stair section to form the C block. D is the intersection of the first step riser of the stair section and the bottom platform surface as the starting point, extending one stair section width toward the platform, and then 2000 upwards to form the cross section of D (the overlapping part with B needs to be deducted), and then pushed and pulled with the width of the stair section to form the D block. E starts from the intersection of the top step riser and the bottom platform surface, extends one step width toward the platform, and then goes up 2000 to form the cross section of E (need to deduct the overlapping part with C), and then pushes and pulls with the step width to form the E block. The 2.2m clear height volume of a step is A+B+C+D+E.

[0068] (3.2.3) Generate handrails. Starting from the intersection of the first step structure riser and its building tread, draw upwards 900 (this is the default value of the handrail height parameter and is adjustable), and then starting from the intersection of the top step structure riser and the building tread, draw upwards 900, and then connect the end points of the two lines to draw the section handrail of this stair segment. According to the section generation logic, the walking path of the handrail can be determined, and then according to its relationship with the edge of the stair segment, the handrail offset and handrail width can be given to generate a three-dimensional model of the handrail.

[0069] (3.2.4) Integrate components. Bind the above-obtained stair main body, clear height volume, stair handrail and other components into a group, and "stack" this group to the highest point of the currently generated stair through matrix transformation to obtain a complete and correct stair component.

[0070] (3.3) When the system generates stair segments, it will automatically add text labels such as "front", "back", "left", and "right" to the model to identify the direction of the stair segment. These labels will be dynamically adjusted according to the direction of the stair segment. In addition, the generated stair segments will also be given corresponding names for subsequent identification and operation.

[0071] Step 4: This step is a continuation of step 3. For the floor named "x~yF", all the stair sections of the xF layer have been generated in step 3. In order to generate all the floors, the stair sections of the xF layer need to be copied and moved, and the obtained floors need to be named. After all the stair sections of the modified floor are generated, the construction parameters need to be updated to ensure that the floors generated later are in the correct direction and position.

[0072] Step 4 is an extension of step 3 and is an optional step. In the process of modeling and debugging, users generally do not need to check the option of "Generate all layers". This will only generate the xF model, which can speed up the generation efficiency and retain the connection structure between floors, which is more conducive to debugging. When all debugging work is completed, check this option to generate a complete model.

[0073] The step 4 includes the following sub-steps:

[0074] (4.1) After generating a staircase of a floor, if it is detected that all floors need to be generated and the name of the current floor is x~y, the system will copy it and apply it to other floors. The number of floors fnum=y-x+1 is calculated, and then through a loop (from 2 to fnum), the transform! method is used to copy and translate the base layer along the Z axis according to the height of the staircase @tjg, and the newly copied staircase is named "x+k-1"+"F", that is, the current floor number plus "F" (number of floors) to ensure that the generated staircase meets the architectural design requirements.

[0075] (4.2) After the staircases for all floors under this parameter are generated, the algorithm adds the new staircase to the model array and updates the offsets of some global variables to record the total height, offset and standard floor generation point of the staircase to ensure that the generated staircase is correctly connected with other parts of the overall model.

[0076] Step 5: Repeat steps 3 and 4, continuously extract and generate floor data from the sorted floor name data, and package the generated results into a new group, so that a basic parametric stair model is obtained. After that, it is the finishing work after generation, including additional component generation, data preservation and scene recovery. The additional construction mainly includes "floor display" and "top extension platform". Data preservation refers to storing the parameters generated by parametrics and the parameters of the UI panel directly in the final model to ensure that the model system can directly read and display the parameters of the current model later, and also provide support for transferring models between different users. After the model is generated correctly and stored, the scene needs to be restored. First, delete the old model, and then apply the transformation matrix of the old model to the new model to ensure the correct position of the model and restore the layer display of the scene.

[0077] Step 5: Repeat Step 3 and Step 4, and complete the parametric generation to generate the final model. Some of the generated stair models are as follows: Figure 4 , Figure 5 shown.

[0078] The step five includes the following sub-steps:

[0079] (5.1) Repeat steps (3) and (4) to combine all stair segments and dimensions into a new group and add it to the current entity.

[0080] (5.2) If the floor display option is turned on, it means that a floor plan needs to be generated: create a new group and add it to the current entity, and set the layer of the group to the "Floor Plan" layer with the name "Floor Plan". Take the floor models in step 5.1, calculate the minimum height, maximum and minimum boundaries of the entire stair combination, and add a 500 mm buffer zone based on these boundaries to ensure that the floor plan covers the entire area. Create a plane for each floor height, and add a text label of the floor name on the plane. Combine the generated stair group and floor plan group into a new group again.

[0081] (5.3) Perform exception capture. If an error occurs, the old staircase needs to be restored. Traverse all groups in the current model, find the old staircase group named stairname+"old", and restore its name to , so as to prevent the loss of the old model due to improper operation.

[0082] (5.4) If no error occurs, perform the final configuration of the model. Combine all the obtained components into a new group, which is the final model group. Set its name to the name of the stair segment given by the user, and use the set_attribute method to store the offset and inverse transformation matrix of the stairs as custom attributes of the group. If the transformation matrix in step 2.2 exists, that is, the old model exists, the stair group is adjusted in a specific transformation order: first apply the transformation matrix and then adjust the offset in the Z-axis direction. If it does not exist, only the offset in the Z-axis direction is adjusted. Store the relevant data of the stairs as custom attributes of the group.

[0083] (5.5) Iterate through all groups in the model again, find the old stair group named stairname+"old", clear its contents, and restore the visibility status of each layer.

[0084] The specific embodiments described herein are merely examples of the present invention. A person skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner without departing from the spirit of the present invention or exceeding the scope defined by the appended claims.

[0085] Although the terms such as staircase and net height are used more frequently in this article, the possibility of using other terms is not excluded. These terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional restrictions is contrary to the spirit of the present invention.

Claims

1. A parametric staircase generation method based on SketchUp, characterized in that: The following steps are involved: (1) Open the parametric panel, edit and design the stair segment parameters, click Apply, and use JavaScript to package the data into a specific JSON format and pass it to the parametric stair segment generation algorithm written in the SketchUp Ruby API; (2) After obtaining the designed JSON parameters, the global stair parameters and the specific parameters of the stair segments based on the floor can be obtained from them. The parametric generation class of the stair segments is initialized according to the global stair parameters to mark the components to be generated, and the old model and view information in SketchUp are recorded at the same time; the specific parameter data of the stair segments are sorted from low to high according to the floor, the parameters are recorded and the relevant parameters for filling the connected stair segment platforms and determining the location of the generated stair segments are initialized; (3) Take an ungenerated lowest floor data from the specific parameters of the stair segment, read its general stair parameters, and obtain the number of stair segments on the current floor; traverse the num stair segment parameters in the current floor, update the specific parameters of the current stair segment each time, and call different stair segment parameterization generation algorithms for different stair segment types, add the generated stair segment to the generation result list, and generate and fill the connected stair segment platform according to the generation result of the previous stair segment, and add it to the generation result list; and merge the list into a stair segment group for subsequent processing; (4) Select "Generate all floors" to view the floor names, where the floor names are x~yF. Copy the staircase group generated in step (3) upward yx times and name them according to the floors. (5) Repeat steps (3) and (4) until all floors are generated; Generate the floor plan and top extension platform and merge them into one group to get the overall model that includes all models. If there is an old model, move and transform the overall model to the old position to finally complete the generation of the parametric stair section.

2. The method for generating parametric staircases based on SketchUp according to claim 1, characterized in that: The step (1) is implemented by the following sub-steps: (1.1) Click the parametric generation panel icon to pop up the parametric staircase UI panel; (1.2) Detect whether there is a selected model in the current SketchUp. If there is a selected model and the model is a stair segment generated based on SketchUp's parametric stair segment, read the parametric generation data stored in the model and pass it to the parametric panel built by HTML / CSS and JavaScript, and use JavaScript to read and display the parameters; if no model is selected or no data is read, the parametric panel is the preset parameters; (1.3) After editing the parameters, click the Apply button, and the parameters in the panel will be converted into specific JSON format data and transmitted to the parametric stair generation algorithm written by the SketchUp Ruby API.

3. The method for generating parametric staircases based on SketchUp according to claim 1, characterized in that: The step (2) is implemented by the following sub-steps: (2.1) After obtaining the JSON data in step (1), initialize the stair segment parametric generation class object and read the stair segment global generation parameters, including whether to generate the evacuation radius volume, whether to generate all floors, whether there is a top extension platform, and whether floor display is required; (2.2) Traverse the existing models in SketchUp to find out whether there is a staircase with the same name. If so, record the transformation matrix of the model; if not, set the transformation matrix to the unit matrix; at the same time, record the layer status in the current SketchUp to restore the display and hiding of the layer in SketchUp after the subsequent generation is completed; (2.3) Identify the floor names in the data, and sort the parameter data by the floor names to form an order similar to [B3~B2F, B1F, 1F, 2~5F, RF]; (2.4) Maintain a standard point for model generation. When the stair segment model is generated at the origin, the model can be placed in the correct position by transforming it with reference to this standard point. The model is updated according to the stair segment parameters each time a stair segment is produced. At the same time, the data structure used to record the width, length, height and platform length of the previous stair segment is initialized to generate a connection component.

4. The method for generating parametric staircases based on SketchUp according to claim 1, characterized in that: The step (3) is implemented by the following sub-steps: (3.1) Take an ungenerated lowest floor data and read its general stair parameters, including stair type, stair height, stair width, step height, step width, and total number of steps; (3.1) Get the number of staircases num, that is, the floor is composed of num staircases. If the staircase type of the floor is a scissors staircase, then the floor is composed of 2*num staircases. (3.2) Read the stair parameters in sequence according to the stair number, call different stair parameterization generation algorithms according to the stair type, and update the model to generate standard points; normally, a stair group contains a staircase and a surface layer, two platforms and a surface layer, a clear height volume and a railing; if it is a double-run staircase, generate a zigzag wireframe on the side of the stair according to the number of steps, step width and step height, and then push and pull it into a stair according to the stair width; the stair surface layer and the platform are also produced in the same way; the positions of different components are derived from the given parameters; if it is a scissor staircase, it is necessary to apply a mirror matrix to the original stair group based on the double-run staircase, and obtain the stair group on the other side according to the stair width offset; (3.3) Every time a staircase is generated, the missing platform caused by the stairwell needs to be filled; (3.4) The models generated by step (3.2) and step (3.3) are grouped into the generated result list in sequence to obtain the floor stair model of one layer.

5. The method for generating parametric staircases based on SketchUp according to claim 1, characterized in that: The step (4) is implemented by the following sub-steps: (4.1) Check whether the global parameter selects "Generate all layers". If so, proceed to step (4.2); otherwise, end step (4); (4.2) Check whether the current floor name is in the form of "X~YF". If so, it means that the same parameters are applied to all floors from XF to YF, and the floor stair model of the XF layer generated in step (3) needs to be copied upwards; (4.3) In order to obtain the floor stair model of X+iF, it is necessary to copy the floor stair model of the XF layer and offset it upward by i stairwell heights to obtain the floor stair model of X+iF.

6. The method for generating parametric staircases based on SketchUp according to claim 1, characterized in that: The step (5) is implemented by the following sub-steps: (5.1) Repeat steps (3) and (4) according to the number of floor names obtained to generate all models into groups; (5.2) Group all the models generated in step (5.1) to obtain the total ladder model; (5.3) If "Floor Display" is selected, a transparent plane will be constructed at the initial height of each floor to indicate the floor according to the number of floor initial height groups; if "Top Extended Platform" is selected, a symmetrical stair platform plate needs to be generated on the other side of the top platform; (5.4) merging the total stair segment model in step (5.2) and the other models in step (5.3) to obtain the final stair segment model group; (5.5) Apply the transformation matrix obtained in step (2.2) to the final stair model, store the JSON data generated in step (1.3) in the model, and restore the view.

Citation Information

Patent Citations

  • Spatial hyperbolic steel structure main arch ladder stand modeling method

    CN111460555A

  • Escalator parametric modeling method based on BIM

    CN112966319A

  • Rapid drawing method for detailed drawing of structural stairs based on parameterization design

    CN115081062A

  • BIM (Building Information Modeling)-based digital forward design method for parameterized steel stair system

    CN117932724A

  • Korean-English Status Notification And Korean-English Conversion System, Method, Recording Medium And Program

    KR1020250030093A