Steel structure model automatic generation method and system
By using Python and Maxscript to collaboratively parse CAD files, a 3D visualized steel structure model is generated, solving the problems of low modeling efficiency and error susceptibility in existing technologies. This achieves efficient and accurate model conversion and data reuse, making it suitable for large and complex steel structure projects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI CONSTR NO 5 GRP CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies cannot efficiently convert CAD drawings into 3D visualized steel structure models, resulting in low modeling efficiency, high error rates, difficulty in modification, and a tendency for the model to become disconnected from the design data. These problems are particularly prominent in large and complex projects.
By using Python and Maxscript built into 3ds Max to work together, intermediate data files are generated by parsing the primitives and annotation information in CAD files, and a 3D visualization model is created in 3ds Max, realizing a data-driven modeling process.
It significantly improves modeling efficiency, ensures model accuracy and consistency, enables the reuse of model data, and effectively avoids the high error rate and difficulty of modification in manual modeling. It is especially suitable for large and complex steel structure projects.
Smart Images

Figure CN121936015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital construction and building information modeling (BIM) technology, and in particular to a method and system for automatically generating steel structure models. Background Technology
[0002] In the digital application of steel structure engineering, there are two main technical directions: one is the generation of finite element models for computational analysis; the other is the creation of 3D models for visualization, construction simulation and quantity statistics.
[0003] For computational analysis, existing technologies, such as the Chinese invention patent CN119885366A entitled "Model Conversion Method and Conversion Tool for Computational Analysis of Building Steel Structures," provide an effective solution. This technology defines strict CAD (Computer-Aided Design) layer naming rules, embedding information such as component element type, material properties, and construction steps into the layer names. It then utilizes AutoCAD secondary development technology to extract this information, ultimately generating an ANSYS (Analysis System) finite element analysis model.
[0004] While this method can achieve data transfer from CAD to analysis models, it still has certain drawbacks: the technology aims to generate ANSYS models for finite element analysis, which focus on mesh generation and mechanical boundary conditions rather than three-dimensional visual presentation and component information management, and cannot be directly applied to effect demonstration, construction briefing and virtual simulation.
[0005] In the field of 3D modeling, it is currently common for technicians to perform entirely manual modeling in software such as 3ds Max (3D Studio Max). This approach suffers from inefficiency, a high risk of errors, a disconnect between the model and design data, and difficulties in making modifications. These problems are particularly pronounced for large and complex steel structure projects.
[0006] Therefore, how to provide a method and system for automatically generating steel structure models that can achieve efficient and automatic 3D visualization of CAD drawings has become an urgent problem to be solved in the industry. Summary of the Invention
[0007] To address at least one problem in existing technologies, the present invention aims to provide a method and system for automatically generating steel structure models. This method and system can efficiently and accurately convert general CAD drawings into 3D visual models, thereby significantly improving modeling efficiency, ensuring model accuracy, and enabling the reuse of model data. It effectively avoids the problems of high error rates, difficult modifications, and easy disconnect between the model and design data inherent in manual modeling. The effect is particularly significant for large and complex steel structure projects.
[0008] To achieve the above objectives, the present invention provides an automatic steel structure model generation method, comprising:
[0009] Obtain drawing information from CAD files using Python;
[0010] Based on the drawing information, an intermediate data file is generated;
[0011] The intermediate data file is read using Maxscript, and the parsed data is obtained.
[0012] Based on the analyzed data, a 3ds Max steel structure model is generated.
[0013] Optionally, the step of obtaining drawing information from CAD files using Python includes:
[0014] Read the CAD file and iterate through the components in the CAD file;
[0015] Identify the graphic elements in the component and determine the associated annotations corresponding to the graphic elements;
[0016] Based on the graphic elements and the associated annotations, data structuring is performed to generate the drawing information.
[0017] Furthermore, the step of determining the associated annotation corresponding to the graphic element includes:
[0018] Search for annotations near the graphic element;
[0019] The associated annotations are determined based on the spatial relationship between the graphic elements and the annotations.
[0020] Optionally, the step of structuring the data based on the graphic elements and the associated annotations to generate the drawing information includes:
[0021] The associated annotations are parsed to extract annotation information; wherein, the component annotation information includes at least one of component type, cross-sectional dimension parameters, and component ID;
[0022] Obtain the coordinate information of the component; wherein the coordinate information includes the start coordinates and end coordinates of the component;
[0023] The annotation information and coordinate information of the component are stored accordingly.
[0024] Optionally, the parsed data is configured to include component type and / or cross-sectional dimension parameters.
[0025] Optionally, the method further includes:
[0026] The quantities are automatically calculated and output based on the 3ds Max steel structure model.
[0027] Further optionally, the step of automatically calculating and outputting quantities based on the 3ds Max steel structure model includes:
[0028] Calculate the volume of the component using Maxscript;
[0029] Obtain the material density parameter corresponding to the component;
[0030] The weight of the component is calculated based on the volume and the material density parameters;
[0031] The total weight of the steel structure model is obtained by summing the weights of all components in the CAD file.
[0032] Further optionally, the method further includes:
[0033] The total weight information of the steel structure model is displayed and output via a pop-up window in the 3ds Max interface; and / or,
[0034] Generate an exportable data file and output the quantity calculation results of the steel structure model; wherein, the quantity calculation results include the ID information, specification information, length information and weight information of the components in the steel structure model.
[0035] Optionally, the intermediate data file is configured to be in CSV, TXT, or Excel format.
[0036] To achieve the above objectives, the present invention also provides an automatic steel structure model generation system, comprising:
[0037] The module is used to retrieve drawing information from CAD files using Python.
[0038] The first generation module generates an intermediate data file based on the drawing information;
[0039] The reading module is used to read the intermediate data file using Maxscript and obtain the parsed data;
[0040] The second generation module generates a 3ds Max steel structure model based on the parsed data.
[0041] According to the automatic steel structure model generation method in this embodiment of the invention, drawing information from CAD files is obtained using Python; an intermediate data file is generated based on the drawing information; the intermediate data file is read using Maxscript to obtain parsed data; and a 3ds Max steel structure model is generated based on the parsed data. This method efficiently and accurately converts general CAD drawings into 3D visualization models, significantly improving modeling efficiency, ensuring model accuracy, offering high versatility, and enabling the reuse of model data. It effectively avoids the problems of high error rates, difficult modifications, and easy disconnect between model and design data inherent in manual modeling. The effect is particularly significant for large and complex steel structure projects.
[0042] In practical applications, the beneficial effects can be seen in at least the following four aspects.
[0043] 1. Significantly improved efficiency: The manual modeling work that originally took several days or even weeks can be completed in just a few hours, increasing modeling efficiency by more than 30 times.
[0044] 2. High model accuracy and consistency: The model is generated entirely based on data-driven processes, eliminating human error and ensuring that the model is 100% consistent with the design drawings, and that all component specifications are accurate.
[0045] 3. Excellent scalability: The framework is easy to expand and can be adapted to different CAD drawing standards and steel structure types, making it valuable for wider application.
[0046] 4. Enables model information integration and quantity calculation: The generated model is "information-based" rather than a simple geometric shape. It can not only realize automatic quantity calculation for steel structure engineering, but also achieve efficient, accurate and reliable quantity calculation results. Furthermore, it can significantly improve the efficiency of cost and material management by directly outputting reports.
[0047] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. Attached Figure Description
[0048] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0049] Figure 1 This is a flowchart of an automatic steel structure model generation method according to an embodiment of the present invention;
[0050] Figure 2 for Figure 1A flowchart illustrating the steps involved in obtaining CAD drawing information using Python.
[0051] Figure 3 A flowchart of an automatic steel structure model generation method according to another embodiment of the present invention;
[0052] Figure 4 This is a flowchart of an automatic steel structure model generation method according to another embodiment of the present invention;
[0053] Figure 5 This is a structural block diagram of an automatic steel structure model generation system according to an embodiment of the present invention. Detailed Implementation
[0054] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer from the following description and claims. The drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0055] First, it should be noted that the existing technology CN119885366A has at least the following inherent defects and limitations, which make it unable to meet the needs of 3D visualization modeling and quantity calculation.
[0056] 1. Mismatch between technical objectives: This technology is designed to generate ANSYS models for finite element analysis. These models focus on mesh generation and mechanical boundary conditions, rather than 3D visual presentation and component information management. Therefore, they cannot be directly applied to effect demonstration, construction briefing, and virtual simulation.
[0057] 2. Rigid information delivery method: This technology relies heavily on predefined, complex CAD layer naming rules. This requires design units to strictly adhere to these rules during the drafting stage, resulting in poor universality and an inability to handle a large number of existing historical drawings that were not drawn according to these rules.
[0058] 3. The model information does not meet downstream requirements: The model generated by this method lacks information such as unique component identification numbers and detailed cross-sectional dimensions, which are crucial data necessary for accurate quantity surveying of steel structures. Therefore, it cannot support automated quantity calculation.
[0059] 4. Closed technology ecosystem: Its technology path is locked in the specific process of "AutoCAD→ANSYS", which makes it impossible to achieve 3D visualization and animation demonstration, and its application scenarios are limited.
[0060] Furthermore, in the field of 3D modeling, it is currently widely relied upon for technicians to perform entirely manual modeling in software such as 3ds Max. This approach suffers from problems such as low efficiency, susceptibility to errors, disconnect between the model and design data, difficulty in modification, and inability to directly calculate quantities based on the model when dealing with large and complex steel structure projects.
[0061] Based on this, the present invention provides an automatic steel structure model generation method, specifically involving an automatic steel structure model generation method based on the collaborative work of Python scripts and the Maxscript script built into 3ds Max. This method can efficiently and accurately convert general CAD drawings into 3D visual models, thereby significantly improving modeling efficiency, ensuring model accuracy, and enabling the reuse of model data. It effectively avoids the problems of high error rates, difficult modifications, and easy disconnect between model and design data that exist in manual modeling. The effect is particularly significant for large and complex steel structure projects.
[0062] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0063] It should be noted that this invention adopts a "coordinated internal and external, data-driven" technical architecture. Python is used as the external processing engine, responsible for complex logical judgments and CAD data parsing; while Maxscript is used as the internal modeling engine, responsible for efficiently and accurately generating 3D solids in the 3ds Max environment.
[0064] Figure 1 The following is a flowchart of the automatic generation method for steel structure models according to an embodiment of the present invention, with reference to... Figure 1 The automatic generation method for steel structure models of the present invention will be described in detail.
[0065] In step 101, the drawing information of the CAD file is obtained using Python.
[0066] The CAD file can be in DWG or DXF format; the drawing information in the CAD file can include the component entity in the CAD file, the annotation associated with the component entity, the component ID, the cross-sectional dimension parameters, the geometric parameters (such as the start coordinates and end coordinates of the component) and the material density parameters.
[0067] In one embodiment, such as Figure 2 As shown, step 101 may include the following sub-steps:
[0068] Step 1011: Read the CAD file and iterate through the components in the CAD file.
[0069] In a specific example, you can use Python's PyAutoCAD library or ezdxf library to open the CAD file and traverse all entities in the model space.
[0070] Step 1012: Identify the graphic elements in the component and determine the associated annotations corresponding to the graphic elements.
[0071] As a preferred embodiment, this may specifically include: after identifying the graphic elements in the component, searching for annotations near the graphic elements; and determining associated annotations based on the spatial relationship between the graphic elements and the annotations.
[0072] In a specific example, the program automatically identifies graphic elements such as Line (straight line) and Polyline (polyline) representing components such as steel beams and steel columns, and searches for nearby annotations containing component ID and cross-sectional dimension parameters (such as "H400x200x8x12"). Then, it establishes the association between component graphic elements and annotations based on spatial position relationships.
[0073] It should be noted that the annotation can be either a Text annotation or an MText annotation.
[0074] It is understood that the association between the above-mentioned primitives and labels can be established using the nearest neighbor algorithm or other applicable methods, and this invention does not impose any specific restrictions on this.
[0075] Step 1013: Based on the graphic elements and associated annotations, perform data structuring to generate the drawing information of the CAD file.
[0076] Preferably, this sub-step may specifically include: parsing the associated annotations to extract the annotation information; obtaining the coordinate information of the component; and storing the annotation information and coordinate information of the component accordingly.
[0077] The drawing information includes at least component annotation information and coordinate information. Component annotation information includes at least one of the following: component type, cross-sectional dimension parameters, and component ID. Coordinate information includes the start and end coordinates of the component.
[0078] In a specific example, text annotations can be parsed, and annotation information such as component type, cross-sectional dimension parameters, and component ID can be extracted according to preset rules (such as "H" representing H-beams and "D" representing round pipes). This annotation information, along with the start and end coordinates of the component, can then be stored together.
[0079] In step 102, an intermediate data file is generated based on the drawing information.
[0080] The intermediate data file can be configured in CSV, TXT, or Excel format. It is understood that this invention does not impose specific limitations on this, and it can be configured to other applicable file formats.
[0081] In this specific example, the Python program writes the processed drawing information into a CSV-formatted intermediate data file. This intermediate data file contains multiple fields, such as: component ID, component type, starting point X coordinate value, starting point Y coordinate value, starting point Z coordinate value, ending point X coordinate value, ending point Y coordinate value, ending point Z coordinate value, and cross-sectional dimension parameters.
[0082] In step 103, the intermediate data file is read using Maxscript, and the parsed data is obtained.
[0083] In other words, a custom Maxscript script can be run in 3ds Max. This script first reads the aforementioned intermediate data file and parses the data line by line.
[0084] In one example, the parsed data can be configured to include the component type. In another example, the parsed data can be configured to include the cross-sectional dimension parameters. In yet another example, the parsed data can be configured to include both the component type and the cross-sectional dimension parameters.
[0085] In step 104, a 3ds Max steel structure model is generated based on the analytical data.
[0086] In a specific example, based on the component type and cross-sectional dimensions, 3ds Max's built-in modeling commands (such as Cylinder to create a circular tube, and Box or Edit_Poly to modify and generate an H-beam) are invoked to create parametric 3D solids between the corresponding coordinate points. Then, the component ID, cross-sectional dimensions, and other parsed data information can be attached to each generated 3D object as custom attributes, thus binding the geometric model with the parsed data information.
[0087] The automatic steel structure model generation method according to embodiments of the present invention obtains drawing information from CAD files using Python; generates intermediate data files based on the drawing information; reads the intermediate data files using Maxscript and obtains parsed data; and generates a 3ds Max steel structure model based on the parsed data. This method efficiently and accurately converts general CAD drawings into 3D visualization models, significantly improving modeling efficiency, ensuring model accuracy, and enabling the reuse of model data. It effectively avoids the problems of high error rates, difficult modifications, and easy disconnect between the model and design data inherent in manual modeling. The effect is particularly significant for large and complex steel structure projects.
[0088] In one embodiment, the method may further include the step of: automatically calculating and outputting quantities based on the aforementioned 3ds Max steel structure model. This enables automated quantity calculation for steel structure engineering, and the calculation results are efficient, accurate, and reliable.
[0089] Preferably, the method may specifically include: calculating the volume of the component using Maxscript; obtaining the material density parameter corresponding to the component; calculating the weight of the component based on the volume and material density parameter; and summing the weights of all components in the CAD file in the above manner to obtain the total weight of the steel structure model in the CAD file.
[0090] In one example, the method may specifically include: displaying the total weight information of the steel structure model through a pop-up window in the 3ds Max interface.
[0091] In another example, the method may specifically include: generating an exportable data file and outputting the quantity calculation results information of the steel structure model. The quantity calculation results information may include the ID information, specification information, length information, and weight information of the components in the steel structure model.
[0092] In another example, the method may specifically include: not only displaying the total weight information of the steel structure model through a pop-up window in the 3ds Max interface, but also generating an exportable data file to output the quantity calculation results of the steel structure model. In practice, this data file can be an Excel spreadsheet. This direct output of reports significantly improves the efficiency of cost and material management.
[0093] In a specific example, the Maxscript script iterates through all steel structure components in the scene that contain parsed data information, and automatically calculates the volume of each component based on its component type, cross-sectional dimensions, and geometric parameters. Then, it calculates the volume based on preset material density parameters (e.g., steel density is 7850 kg / m³). 3 The process involves calculating the weight of each component. Finally, all the calculation results (component ID, specifications, length, and weight) can be summarized and displayed in a pop-up window in the 3ds Max interface, or exported as a well-structured Excel spreadsheet for project budgeting and material management.
[0094] This embodiment enables automated estimation of steel structure quantities based on the generated 3ds Max steel structure model, resulting in highly efficient, accurate, and reliable quantity calculations. Furthermore, it allows for direct report output, significantly improving the efficiency of cost and material management.
[0095] The present invention will be further explained and illustrated below through a specific embodiment.
[0096] This specific embodiment provides a method for automatically generating steel structure models. The process is as follows: Figure 3 As shown, the specific steps include:
[0097] Step 201: Input the CAD drawing file.
[0098] Step 202: Obtain the drawing information of the CAD file using Python.
[0099] Step 203: Identify and associate components and annotations in the CAD file, and extract component types and geometric parameters, as well as cross-sectional dimension parameters and material parameters.
[0100] Step 204: Generate a structured CSV intermediate data file.
[0101] Step 205: Read the intermediate CSV data file using Maxscript.
[0102] Step 206: Generate steel structure models in batches using 3ds Max.
[0103] Step 207: Based on the generated steel structure model, perform automatic quantity calculation and output.
[0104] The present invention will be further explained and illustrated below through another specific embodiment.
[0105] In this specific embodiment, steel structure modeling and quantity calculation are prepared for a 20-story steel structure building. The CAD drawings include floor height tables, and the steel beam components in each floor's drawings are represented by straight lines and arcs, with text labels next to them, such as "GL-1H300x150x6.5x9," which include the component ID, component type, and cross-sectional dimension parameters. Figure 4 As shown, the automatic generation method for steel structure models in this embodiment may include the following steps;
[0106] Step 301: Run the Python script to generate intermediate data files.
[0107] The system uses Python scripts to automatically identify the floor height tables and generate a "Height.ini" configuration file, which records the height information of each floor. It also automatically identifies all steel structure lines and their nearby text annotations in CAD drawings.
[0108] In this step, the text annotation "GL-1H300x150x6.5x9" is parsed to identify the component's annotation information: "GL-1" is the component ID, "H" indicates an H-beam, and the cross-sectional dimensions are 300x150x6.5x9. The component's coordinate information is also recorded: the starting point coordinates (0,0,0) and ending point coordinates (6000,0,0). Finally, the component's annotation and coordinate information are written to a single line in a CSV file: GL-1,H-Beam,0,0,0,6000,0,0,300x150x6.5x9.
[0109] Step 302: Generate a 3ds Max model based on the intermediate data file.
[0110] In this step, the Maxscript script is opened in 3ds Max, and the path to the aforementioned CSV file is specified before execution. The Maxscript script reads the data from "GL-1", creates a 3ds Max steel structure model of an H-beam within the range of (0,0,0) to (6000,0,0) based on the "H-Beam" type, and accurately applies the cross-sectional dimensions of 300x150x6.5x9. Then, the component ID and cross-sectional information are recorded in the object's "Custom Properties".
[0111] Step 303: Based on the 3ds Max model, perform automatic quantity calculation and output.
[0112] In this step, after the 3ds Max steel structure model is generated, the automatic quantity calculation function is executed. The length (6 meters) and cross-sectional area of "GL-1" are calculated using Maxscript scripts to obtain the volume, and then the weight is obtained by multiplying the volume by the density.
[0113] The system summarizes the data for all components in the CAD drawing, and a pop-up window displays "Total steel consumption is 58.5 tons." It also provides an option for users to export the details to an Excel file.
[0114] In summary, the automatic steel structure model generation method provided by this invention can efficiently and accurately convert general CAD drawings into three-dimensional visual models, thereby significantly improving modeling efficiency, ensuring model accuracy, exhibiting high versatility, and enabling the reuse of model data. It effectively avoids the problems of high error rates, difficult modifications, and easy disconnect between model and design data inherent in manual modeling. The effect is particularly significant for large and complex steel structure projects.
[0115] In practical applications, its beneficial effects are at least reflected in the following aspects: Significant efficiency improvement: Manual modeling work that originally required days or even weeks can be completed in hours, increasing modeling efficiency by more than 30 times. High model accuracy and consistency: The model is generated entirely based on data-driven processes, eliminating human error and ensuring 100% consistency between the model and design drawings, with all component specifications being accurate. Good scalability: The framework is easily expandable, adaptable to different CAD drawing standards and steel structure types, and has the value for wider application. Model information integration and quantity calculation: Because the generated model is "information-based," rather than simply geometric, it enables automatic quantity calculation for steel structure projects. The calculation results are efficient, accurate, and reliable, and reports can be directly output, significantly improving the efficiency of cost and material management.
[0116] Figure 5 A structural block diagram of an automatic steel structure model generation system according to an embodiment of the present invention. (Reference) Figure 5 As shown, the automatic steel structure model generation system 400 includes an acquisition module 401, a first generation module 402, a reading module 403, and a second generation module 404.
[0117] The system comprises several modules: Module 401, which acquires drawing information from CAD files using Python; Module 402, which generates intermediate data files based on the drawing information; Module 403, which reads the intermediate data files using Maxscript and obtains parsed data; and Module 404, which generates a 3ds Max steel structure model based on the parsed data.
[0118] In one embodiment, the acquisition module 401 is specifically used to: read a CAD file, traverse the components in the CAD file; identify the graphic elements in the components and determine the associated annotations corresponding to the graphic elements; and perform data structuring based on the graphic elements and associated annotations to generate drawing information.
[0119] Optionally, the acquisition module 401 is specifically used for: searching for annotations near the graphic element; and determining associated annotations based on the spatial relationship between the graphic element and the annotation.
[0120] Optionally, the acquisition module 401 is specifically used for: parsing associated annotations to extract annotation information; acquiring the coordinate information of the component; and storing the annotation information and coordinate information of the component accordingly.
[0121] The component labeling information includes at least one of the following: component type, cross-sectional dimension parameters, and component ID. The coordinate information includes the start and end coordinates of the component.
[0122] In one embodiment, the automatic steel structure model generation system 400 further includes an automatic quantity calculation and output module (not shown in the figure). This automatic quantity calculation and output module performs automatic quantity calculation and output based on the 3ds Max steel structure model.
[0123] Optionally, the automatic quantity calculation and output module is specifically used for: calculating the volume of components using Maxscript; obtaining the material density parameters corresponding to the components; calculating the weight of the components based on the volume and material density parameters; and summing the weights of all components in the CAD file to obtain the total weight of the steel structure model.
[0124] Optionally, the automatic quantity calculation and output module is specifically used to: display the total weight information of the steel structure model through a pop-up window in the 3ds Max interface.
[0125] Optionally, the automatic quantity calculation and output module is specifically used to: generate exportable data files and output the quantity calculation results information of the steel structure model; wherein, the quantity calculation results information includes the ID information, specification information, length information and weight information of the components in the steel structure model.
[0126] In one embodiment, the automatic steel structure model generation system 400 further includes a configuration module (not shown in the figure). The configuration module can be used to configure the parsed data to include component types, or to include cross-sectional dimension parameters, or to include both component types and cross-sectional dimension parameters.
[0127] Optionally, the configuration module can also be used to configure intermediate data files as CSV, TXT, or Excel formats.
[0128] It should be noted that the explanation of the automatic steel structure model generation method in the above embodiments also applies to the automatic steel structure model generation system in the above embodiments, and will not be repeated here.
[0129] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. A method for automatically generating steel structure models, characterized in that, The method includes: Obtain drawing information from CAD files using Python; Based on the drawing information, an intermediate data file is generated; The intermediate data file is read using Maxscript, and the parsed data is obtained. Based on the analyzed data, a 3ds Max steel structure model is generated.
2. The method according to claim 1, characterized in that, The steps for obtaining drawing information from CAD files using Python include: Read the CAD file and iterate through the components in the CAD file; Identify the graphic elements in the component and determine the associated annotations corresponding to the graphic elements; Based on the graphic elements and the associated annotations, data structuring is performed to generate the drawing information.
3. The method according to claim 2, characterized in that, The step of determining the associated label corresponding to the graphic element includes: Search for annotations near the graphic element; The associated annotations are determined based on the spatial relationship between the graphic elements and the annotations.
4. The method according to claim 2, characterized in that, The step of structuring data based on the graphic elements and the associated annotations to generate the drawing information includes: The associated annotations are parsed to extract annotation information; wherein, the component annotation information includes at least one of component type, cross-sectional dimension parameters, and component ID; Obtain the coordinate information of the component; wherein the coordinate information includes the start coordinates and end coordinates of the component; The annotation information and coordinate information of the component are stored accordingly.
5. The method according to claim 1, characterized in that, The parsed data is configured to include component type and / or cross-sectional dimension parameters.
6. The method according to claim 1, characterized in that, The method further includes: The quantities are automatically calculated and output based on the 3ds Max steel structure model.
7. The method according to claim 6, characterized in that, The steps for automatically calculating and outputting quantities based on the 3ds Max steel structure model include: Calculate the volume of the component using Maxscript; Obtain the material density parameter corresponding to the component; The weight of the component is calculated based on the volume and the material density parameters; The total weight of the steel structure model is obtained by summing the weights of all components in the CAD file.
8. The method according to claim 7, characterized in that, The method further includes: The total weight information of the steel structure model is displayed and output via a pop-up window in the 3ds Max interface; and / or, Generate an exportable data file and output the quantity calculation results of the steel structure model; wherein, the quantity calculation results include the ID information, specification information, length information and weight information of the components in the steel structure model.
9. The method according to any one of claims 1-8, characterized in that, The intermediate data file is configured to be in CSV, TXT, or Excel format.
10. An automatic steel structure model generation system, characterized in that, The system includes: The module is used to retrieve drawing information from CAD files using Python. The first generation module generates an intermediate data file based on the drawing information; The reading module is used to read the intermediate data file using Maxscript and obtain the parsed data; The second generation module generates a 3ds Max steel structure model based on the parsed data.
Citation Information
Patent Citations
Model conversion method for building steel structure calculation and analysis and conversion tool thereof
CN119885366A