Legend table generation method, device and equipment for drawing based on airport engineering BIM forward design
By automating the generation of airport engineering BIM legend tables, the inefficiency and errors caused by manual legend drawing are solved, achieving consistency and efficient management between legends and models, and supporting automatic updates and unified standardization of legends.
Patent Information
- Application Number
- CN202511524652.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-24
AI Technical Summary
In airport engineering design, the generation of legends relies on manual drawing and pasting, which leads to low efficiency, errors, and inconsistencies between legends and model information, making it difficult to realize the value of BIM-based forward design.
By acquiring geometric elements from the airport BIM model, the system automatically categorizes and generates legend tables. Utilizing the extended attributes and feature definitions of BIM software, it creates legend blocks with graphic symbols and text annotations, calculates uniform cell sizes, constructs legend table models, and automatically places them onto the drawings.
It achieves consistency and accuracy between legends and model content, improves the efficiency of drawing maintenance, avoids human error, and supports automatic legend updates and unified standardized management.
Smart Images

Figure CN120995571B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building information modeling technology, specifically to a method, apparatus, and equipment for generating legend tables based on BIM forward design for airport engineering. Background Technology
[0002] In the architecture, engineering, and construction industries, Building Information Modeling (BIM) forward design has become a key technology for improving design quality and efficiency. In the BIM drawing process, the creation and arrangement of legends is a crucial component. Legends are key elements for interpreting the meaning of various symbols, line types, and fill patterns in the drawings.
[0003] Currently, in the field of airport engineering design, especially in flight area engineering, the generation of legends largely relies on designers to manually draw, paste, and format them. This involves drawing legend symbols one by one on the drawings or copying them from a library, and manually entering text descriptions and formatting them. This process is not only tedious and time-consuming, but also prone to errors such as inconsistencies between legends and model information, and inconsistent styles.
[0004] Therefore, the creation and arrangement of legends in the existing technology suffers from inefficiency and is prone to errors. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, apparatus and equipment for generating legend tables based on BIM forward design of airport engineering, so as to overcome the problems of low efficiency and error in the current creation and layout of legends.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] On the one hand, a method for generating legend tables based on BIM forward design for airport engineering is characterized by including:
[0008] Obtain the airport BIM model from which legend information is to be extracted, and determine whether the airport BIM model contains a reference model. If it does, store the reference model in the model array; if it does not, store the airport BIM model in the model array.
[0009] Iterate through each model in the model array, extract all geometric elements of each model and store them in the element array;
[0010] The element array is traversed, and the geometric elements are classified according to the extended attributes attached to the elements. The classification results are stored in the corresponding attribute classification legend array, which includes a fill legend array and a parametric point legend array. The business model of the target BIM software is read, and the geometric elements are classified according to linear features and civil point features. The classification results are stored in the linear legend array and the civil point legend array, respectively.
[0011] Based on the classified attribute classification legend array, linear legend array, and civil point legend array, corresponding attribute classification legend blocks, linear legend blocks, and civil point legend blocks are created. Each legend block includes a graphic symbol and a corresponding text annotation; the text annotation represents the element information of the legend block; the attribute classification legend block includes a filled legend block and a parameterized point legend block.
[0012] Based on the graphic symbol size and text annotation size of various legend blocks, calculate the preset width and height of the required cells respectively, and take the maximum value among all preset widths and heights as the uniform cell width and height of the legend table;
[0013] Count the number of all legend blocks, and calculate the number of rows and columns of the legend table based on the standard number of rows or columns;
[0014] Based on the number of rows and columns of the legend table, construct a legend table model and header text, and position the legend block in a cell of the table model; wherein, the header text is obtained through a preset file;
[0015] The generated legend table model is inserted into the target drawing model as a reference to complete the automatic placement of the legend.
[0016] Optionally, the extended attributes include: fill and parameterized points; the step of classifying geometric elements according to the extended attributes attached to the elements and storing the classification results in the corresponding attribute classification legend array includes:
[0017] The category name is determined based on the name to be filled; the same category name is recorded only once, and the classification result is stored in the fill legend array; and...
[0018] The classification name is determined based on the name of the parameterized point. The same classification name is recorded only once. The classification result is stored in the parameterized point legend array.
[0019] The classification based on linear features and civil point features, and the storage of the classification results in a linear legend array and a civil point legend array respectively, includes:
[0020] Obtain the name of the linear feature, count the types of linear features according to the name, and store the classification results in the linear legend array; and obtain the name of the civil point feature, count the types of civil point features according to the name, and store the classification results in the civil point legend array.
[0021] Optionally, the step of creating corresponding attribute classification legend blocks, line type legend blocks, and civil point legend blocks based on the classified attribute classification legend array, line type legend array, and civil point legend array includes:
[0022] Determine the fill category name based on the fill legend array, create text elements and a rectangle based on the fill category name, and put the fill category name and the corresponding fill legend in the fill legend array into the rectangle to obtain the fill legend block;
[0023] The parameterized point category name is determined based on the parameterized point legend array. A text element is created based on the parameterized point category name, and the definition of the parameterized point is copied. The text element and the definition of the parameterized point are used as the parameterized point legend block.
[0024] Determine the linear legend category name based on the linear legend array, create text elements and draw line types based on the linear legend category name, and use the linear legend category name and the line type as a line type legend block;
[0025] Determine the civil engineering point category name based on the civil engineering point legend array, create text elements and draw civil engineering point line types based on the civil engineering point category name, and use the civil engineering point category name and civil engineering point line type as the civil engineering point legend block.
[0026] Optionally, the method for calculating the preset width of the cells required to fill the legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the filling rectangle width, and the right margin width, and using this sum as the preset width of the cells required to fill the legend block;
[0027] The method for calculating the height of the cells required to fill the legend block includes: determining the larger value between the text annotation height and the fill rectangle height, calculating the sum of the larger value and the upper and lower margin heights, and using this sum as the height of the cells required to fill the legend block.
[0028] Optionally, the method for calculating the preset width of the cells required for the line legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the line drawing length, and the right margin width, and using this as the preset width of the cells required for the line legend block;
[0029] The method for calculating the required cell height of the line legend block includes: calculating the sum of Hs (the height of the upper margin), Ht (the height of the text annotation), and Hb (the height of the lower margin), and using this sum as the required cell height of the line legend block.
[0030] Optionally, the method for calculating the preset width of the cells required for the parameterized point legend block or civil point legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the display diameter or width of the point, and the right margin width, and using it as the preset width of the cells required for the parameterized point legend block or civil point legend block;
[0031] The method for calculating the required cell height of the parametric point legend block or civil point legend block includes: calculating the sum of the upper margin height, the text annotation height, and the lower margin height, and using this sum as the required cell height of the parametric point legend block or civil point legend block.
[0032] Optionally, the airport BIM model includes: line elements, civil point elements, parametric point element data, and fill pattern element data.
[0033] Optionally, before obtaining the airport BIM model and reference model from which legend information is to be extracted, the following may also be included:
[0034] Prepare a Dgnlib file containing layers, colors, pattern fills, and feature definitions, including line type feature definitions and civil point definitions.
[0035] On another front, a legend table generation device based on BIM-based forward design for airport engineering includes:
[0036] The acquisition module is used to acquire the airport BIM model from which legend information is to be extracted, determine whether the airport BIM model contains a reference model, if it does, store the reference model in the model array; if it does not, store the airport BIM model in the model array; iterates through each model in the model array, extracts all geometric elements of each model and stores them in the element array;
[0037] The classification module is used to traverse the element array, classify the geometric elements according to the extended attributes attached to the elements, and store the classification results in the corresponding attribute classification legend array, which includes a fill legend array and a parametric point legend array; and to read the business model of the target BIM software, classify it according to linear features and civil point features, and store the classification results in the linear legend array and the civil point legend array respectively.
[0038] The construction module is used to create corresponding attribute classification legend blocks, line legend blocks, and civil point legend blocks based on the classified attribute classification legend array, linear legend array, and civil point legend array. Each legend block includes a graphic symbol and a corresponding text annotation; the text annotation represents the element information of the legend block; the attribute classification legend block includes a filled legend block and a parameterized point legend block.
[0039] The calculation module is used to calculate the preset width and height of the required cells based on the graphic symbol size and text annotation size of various legend blocks, and take the maximum value among all preset widths and heights as the uniform cell width and height of the legend table; count the number of all legend blocks, and calculate the number of rows and columns of the legend table according to the standard number of rows or columns;
[0040] The processing module is used to construct a legend table model and header text based on the number of rows and columns of the legend table, and to position the legend block in the cell of the table model; wherein the header text is obtained through a preset file; the generated legend table model is inserted into the target drawing model as a reference to complete the automatic arrangement of the legend.
[0041] On another front, a legend table generation device based on BIM forward design for airport engineering includes a processor and a memory, wherein the processor is connected to the memory.
[0042] The processor is used to call and execute the program stored in the memory;
[0043] The memory is used to store the program, which is at least used to execute the legend table generation method for BIM forward design drawing of airport flight area engineering as described above.
[0044] The technical solution of the present invention has at least the following beneficial effects:
[0045] In this invention, the legend content is directly derived from Building Information Modeling (BIM) data and generated through an automated process. This avoids errors that might be introduced by manual copying or drawing, ensuring consistency and accuracy between the legend and the model content. Furthermore, the legend table model is placed as a whole in a designated location within the drawing model; this integration method is link-based, not embedded. That is, the engineering drawing model only stores reference information to the legend table model (such as file paths and insertion points), while the actual data of the legend table remains stored within the legend table model. When changes occur in the BIM model, requiring updates to the legend content (e.g., the addition of new equipment types), designers only need to rerun this method to update the independent legend table model. All engineering drawings referencing this legend table model will automatically load the latest legend table upon the next opening, eliminating the need for manual modification of each drawing, thus ensuring data consistency and significantly improving drawing maintenance efficiency. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A flowchart illustrating a method for generating legend tables based on BIM-based forward design of airport engineering drawings, provided as an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of the structure of a legend table generation device based on BIM forward design for airport engineering provided in an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the structure of a legend table generation device based on BIM forward design for airport engineering, provided as an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0051] As described in the background section, currently, in the field of airport engineering design, especially in flight area engineering, the generation of legends largely relies on designers manually drawing, pasting, and typesetting them. That is, drawing legend symbols one by one on the drawings or copying them from the library, and manually entering text descriptions and typesetting them. This process is not only tedious and time-consuming, but also prone to errors such as inconsistencies between legends and model information and inconsistent styles.
[0052] Therefore, the creation and arrangement of legends in the existing technology suffers from inefficiency and is prone to errors.
[0053] Specifically, the disadvantages of existing technologies are as follows:
[0054] Inefficient: Manually identifying various elements from the model, finding their corresponding symbol meanings, drawing graphics and formatting text is a tedious and time-consuming process, especially for large airport projects where there are many types of model elements and a huge workload.
[0055] Common errors: Manual operation can easily lead to inconsistencies between the legend and the symbols, line types, and fill patterns actually used in the model, resulting in "legendary discrepancy" errors, affecting the quality of the drawings, and potentially causing misunderstandings during construction.
[0056] Poor consistency: It is difficult to unify the style and layout of illustrations created by different projects and different designers, which is not conducive to standardization and normalized management.
[0057] Poor interoperability: When the model changes, the legend often cannot be updated automatically, requiring manual inspection and modification, which increases the workload and makes it difficult to realize the true positive design value of BIM.
[0058] Based on this, embodiments of the present invention provide a method, apparatus, and equipment for generating legend tables based on BIM forward design for airport engineering, so that the legend content comes directly from the building information model data and is generated through an automated process, avoiding errors that may be introduced by manual copying or drawing, ensuring the consistency and accuracy of the legend and the model content, and improving efficiency.
[0059] It is worth noting that the technical terms will be explained first:
[0060] Drawing preparation: Drawing preparation is the process of preparing data standards for the BIM model and the library files such as layers, colors, and feature fonts required for drawing before the drawing process.
[0061] Legend: In civil aviation, this refers to dots, lines, and graphic symbols of varying sizes, thicknesses, and colors used in drawings to describe various geographical features and structural characteristics.
[0062] DGNLIB: DGNLIB files are a type of MicroStation design file that contains design data and graphical information.
[0063] ORD: an abbreviation for OpenRoads Designer, is a full-featured BIM software for road design, suitable for surveying, drainage, underground facilities, airport design, and road design.
[0064] ItemType: ItemType is a mechanism in Bentley software used to define and manage project properties. ItemType allows users to create, delete, attach, modify, and manage properties.
[0065] Model: DGN Model is a model file used in ORD software that contains information about various elements and attributes in the design.
[0066] Feature Definition: A feature definition is a set of attributes defined in ORD software that describes the characteristics of a series of geographic elements such as routes, terrain, and feature points.
[0067] Figure 1 This is a flowchart illustrating a method for generating legend tables based on BIM-based forward design of airport engineering drawings, as provided in an embodiment of the present invention.
[0068] See Figure 1 This embodiment may include the following steps:
[0069] Step S101: Obtain the airport BIM model from which legend information is to be extracted, and determine whether the airport BIM model contains a reference model. If it does, store the reference model in the model array; if it does not, store the airport BIM model in the model array.
[0070] It is worth noting that, in this embodiment of the invention, the airport BIM model includes: line elements, civil point elements, parametric point element data, and fill pattern element data.
[0071] In addition, a Dgnlib file containing layers, colors, pattern fills, and feature definitions needs to be prepared in advance. The feature definitions include line type feature definitions and civil point definitions. That is, before creating the legend model, a Dgnlib file containing layers, colors, and feature definitions, as well as a pattern fill definition file, needs to be prepared. The feature definitions include line type feature definitions, civil point definitions, etc.
[0072] The airport BIM model in this application can be a Dgn model; the reference model can be a preset model.
[0073] As a specific application scenario, this method can be executed by a plugin or program installed in Building Information Modeling (BIM) design software (such as Bentley OpenRoads Designer). The program reads the current airport BIM model specified by the user. Subsequently, the program calls the software's application programming interface (API) to check whether the airport BIM model has any attached reference models. If the result is yes, the program initiates a recursive traversal process, which visits each directly referenced model one by one and checks these reference models again to see if they reference lower-level reference models. This recursive process continues until all reference models at all levels have been traversed, thus forming a complete model tree structure.
[0074] Step S102: Traverse each model in the model array, extract all geometric elements in each model and store them in the element array.
[0075] For example, iterate through all reference models in the model array, retrieve all geometric elements from the reference models, obtain all geometric elements Element, and store them in the Element array.
[0076] During the traversal, design elements are extracted uniformly from the model. It should be noted that "design element" is a broad concept, encompassing not only visible geometric elements such as points, lines, arcs, shapes, and solids, but also the non-geometric attribute information carried by these elements. All extracted design elements are aggregated into a unified data set (e.g., an array or list in memory), laying the foundation for subsequent classification processing. This recursive traversal and unified extraction method ensures that even in complex project structures with multiple files and multi-level references, a complete set of design elements for generating legends can be obtained, thus providing a solid guarantee for the accuracy and completeness of subsequent legends.
[0077] Step S103: Traverse the element array, classify the geometric elements according to the extended attributes attached to the elements, and store the classification results in the corresponding attribute classification legend array, which includes a fill legend array and a parametric point legend array; and read the business model of the target BIM software, classify it according to linear features and civil point features, and store the classification results in the linear legend array and the civil point legend array respectively.
[0078] In some specific implementations, the extended attributes include: fill and parameterized points; the process of classifying geometric elements according to the extended attributes attached to the elements and storing the classification results in the corresponding attribute classification legend array includes:
[0079] The category name is determined based on the name to be filled; the same category name is recorded only once, and the classification result is stored in the fill legend array; and...
[0080] The classification name is determined based on the name of the parameterized point. The same classification name is recorded only once. The classification result is stored in the parameterized point legend array.
[0081] The classification based on linear features and civil point features, and the storage of the classification results in a linear legend array and a civil point legend array respectively, includes:
[0082] Obtain the name of the linear feature, count the types of linear features according to the name, and store the classification results in the linear legend array; and obtain the name of the civil point feature, count the types of civil point features according to the name, and store the classification results in the civil point legend array.
[0083] Understandably, after obtaining the complete set of geometric elements, each geometric element in the set is automatically categorized to obtain multiple legend categories. The purpose of categorization is to group elements with the same engineering meaning and graphic representation into one category, where each category will ultimately correspond to an entry in the legend table.
[0084] Specifically, in an airport design project based on Bentley ORD, classification can be based on both of the following information simultaneously:
[0085] The inherent properties of design elements, especially their attached ItemType property. ItemType is a user-defined, structured data appended to an element, often used to store the element's engineering attributes. For example, different area fill patterns (such as grass or pavement) can be defined as different ItemTypes, and the program can classify them by reading the element's ItemType name (such as "Grass Area" or "Pavement Marking"). Similarly, the type information of some point-like devices created parametrically (such as navigation lights) is also stored in ItemType.
[0086] The project's associated feature library, especially the feature definition library (usually a DGNLIB file), is crucial. In civil design software like ORD, the style and behavior of elements (such as line type, point style, 3D representation, etc.) are controlled by feature definitions. For example, line type elements like road edges and center lines, as well as civil point elements like elevation points and control points, are distinguished by the applied feature definitions. The program can categorize elements by reading their associated feature definition names (such as "Road_Edge_Line" or "Survey_Control_Point").
[0087] Each element is examined for its ItemType attribute and / or the feature definition it applies to, and elements with the same attribute or definition are grouped into the same legend category. For example, all line elements with the "Road_Edge_Line" feature definition will be grouped into the "Road Edge" legend category; all fill elements with the "Grass Area" ItemType will be grouped into the "Grass Area" legend category. Finally, the program generates a list of legend categories, where each category contains a unique name or definition, as well as statistics for all design elements belonging to that category.
[0088] Specifically, the method for obtaining the fill type is as follows: when iterating through the Element array, find the elements that have the corresponding extended attribute Item Type attached, classify them according to the name of the attached attribute value, and obtain the fill name of the corresponding element. The same category name is recorded only once, and the classification results are stored in the fill legend array.
[0089] The method for obtaining parameterized points is as follows: When iterating through the Element array, find the elements that are attached with the corresponding extended attribute Item Type, classify them according to the name of the attached attribute value, and obtain the parameterized unit definition of the corresponding parameterized point. The same category name is recorded only once, and the classification results are stored in the parameterized point legend array.
[0090] Method for obtaining line element types: The types are counted by obtaining the names of the line feature definitions in the current business model of ORD, and the classification results are stored in the linear legend array.
[0091] Method for obtaining the types of civil engineering point elements: Obtain the names of the feature definitions of civil engineering points in the current business model of ORD, count the types, and store the classification results in the civil engineering point legend array.
[0092] Step S104: Based on the classified attribute classification legend array, linear legend array, and civil point legend array, create corresponding attribute classification legend blocks, linear legend blocks, and civil point legend blocks. Each legend block includes a graphic symbol and a corresponding text annotation; the text annotation represents the element information of the legend block; the attribute classification legend block includes a filled legend block and a parameterized point legend block.
[0093] After classifying the elements, a visual legend block is generated for each legend category. A legend block is a composite object that clearly displays the graphic symbol for that category and its corresponding text description.
[0094] The specific generation process is as follows: For each legend category, a sample graphic is automatically drawn as a graphic symbol according to the definition of that category. For example, if the legend category is "Grassland Area," the program draws a small rectangle with the corresponding grass fill pattern according to its definition (such as fill pattern and color); if the category is "Road Edge," the program draws a small sample line segment according to the line style specified in its feature definition (such as dashed line, color, and line width); if the category is parametric point or civil point, the program draws a sample point symbol according to its definition. At the same time, the program creates a text element whose content is a text annotation corresponding to the legend category name, such as "Grassland Area." Finally, the program combines the generated graphic symbol and text annotation according to a preset relative position (such as the text to the right or below the graphic symbol) to form a complete legend block. This legend block logically constitutes a whole and can be used as an independent object for subsequent size calculations and layout arrangement.
[0095] In some implementations, the step of creating corresponding attribute classification legend blocks, line type legend blocks, and civil point legend blocks based on the classified attribute classification legend array, line type legend array, and civil point legend array includes:
[0096] Determine the fill category name based on the fill legend array, create text elements and a rectangle based on the fill category name, and put the fill category name and the corresponding fill legend in the fill legend array into the rectangle to obtain the fill legend block;
[0097] The parameterized point category name is determined based on the parameterized point legend array. A text element is created based on the parameterized point category name, and the definition of the parameterized point is copied. The text element and the definition of the parameterized point are used as the parameterized point legend block.
[0098] Determine the linear legend category name based on the linear legend array, create text elements and draw line types based on the linear legend category name, and use the linear legend category name and the line type as a line type legend block;
[0099] Determine the civil engineering point category name based on the civil engineering point legend array, create text elements and draw civil engineering point line types based on the civil engineering point category name, and use the civil engineering point category name and civil engineering point line type as the civil engineering point legend block.
[0100] Specifically, the process of creating a fill legend block is as follows: obtain the fill name from the ItemType attachment property of the element and create a text element, create a rectangle block, and fill the rectangle with the corresponding pattern according to the fill name;
[0101] The creation process of a parameterized point legend block is as follows: obtain the name of the parameterized point by attaching the ItemType property to the element and create the corresponding text element, and copy the definition of a parameterized point.
[0102] The process for creating a line type legend block is as follows: obtain the feature definition name of the line type and create the corresponding text element, and draw a line type according to the feature definition of the line type;
[0103] The creation process of the civil point legend block is as follows: obtain the feature definition name of the civil point and create the corresponding text element, and draw a civil point according to the feature definition.
[0104] Step S105: Based on the graphic symbol size and text annotation size of various legend blocks, calculate the preset width and height of the required cells respectively, and take the maximum value among all preset widths and heights as the unified cell width and height of the legend table.
[0105] Since the graphic symbols (such as thin line samples and wide filled samples) and text descriptions (with varying text lengths) of different legend categories have different sizes, direct arrangement will result in inconsistent cell sizes in the legend table and a cluttered overall layout. Therefore, in order to achieve a regular layout of the legend table, this application proposes a scheme to determine a uniform cell size.
[0106] In some embodiments, the method for calculating the preset width of the cells required to fill the legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the filling rectangle width, and the right margin width, and using this sum as the preset width of the cells required to fill the legend block;
[0107] The method for calculating the height of the cells required to fill the legend block includes: determining the larger value between the text annotation height and the fill rectangle height, calculating the sum of the larger value and the upper and lower margin heights, and using this sum as the height of the cells required to fill the legend block.
[0108] In some embodiments, the method for calculating the preset width of the cells required for the line legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the line drawing length, and the right margin width, and using this sum as the preset width of the cells required for the line legend block;
[0109] The method for calculating the required cell height of the line legend block includes: calculating the sum of Hs (the height of the upper margin), Ht (the height of the text annotation), and Hb (the height of the lower margin), and using this sum as the required cell height of the line legend block.
[0110] In some embodiments, the method for calculating the preset width of the cells required for the parameterized point legend block or civil point legend block includes: calculating the sum of the left margin width, the text annotation width, the middle margin width, the display diameter or width of the point, and the right margin width, and using it as the preset width of the cells required for the parameterized point legend block or civil point legend block;
[0111] The method for calculating the required cell height of the parametric point legend block or civil point legend block includes: calculating the sum of the upper margin height, the text annotation height, and the lower margin height, and using this sum as the required cell height of the parametric point legend block or civil point legend block.
[0112] Specifically, the formula for filling the cells in the legend block is:
[0113] Cell width W = Wl + Wt + Wm + Wp + Wr
[0114] (Wl left margin width, Wt text width, Wm middle margin width, Wp filled rectangle width, Wr right margin width).
[0115] Cell height formula: H=Hs+Max{Ht,Hp}+Hb (Hs is the top margin height, Ht is the text height, Hp is the filled rectangle height, and Hb is the bottom margin height).
[0116] The formula for calculating the cell of the line legend block is:
[0117] Cell width W = Wl + Wt + Wm + Wli + Wr (Wl is the left margin width, Wt is the text width, Wm is the middle margin width, Wli is the line drawing length, and Wr is the right margin width).
[0118] The cell height formula is H = Hs + Ht + Hb (Hs is the top margin height, Ht is the text height, and Hb is the bottom margin height).
[0119] In the legends of civil engineering points and parametric points, the width and height of the points are relatively small. Therefore, the calculation of the two legend cells is combined into one algorithm: Cell width W = Wl + Wt + Wm + Wp + Wr (Wl is the left margin width, Wt is the text width, Wm is the middle margin width, Wp is the diameter of the point, and Wr is the right margin width). Cell height formula H = Hs + Ht + Hb (Hs is the top margin height, Ht is the text height, and Hb is the bottom margin height).
[0120] To ensure the aesthetics of the legend table, all cells have the same width and height. In this application, the width and height of all preset cells can be traversed and compared, and the maximum value is used to generate the legend table.
[0121] Step S106: Count the number of all legend blocks, and calculate the number of rows and columns of the legend table according to the standard number of rows or columns.
[0122] Specifically, it can count the total number of all legend blocks; input the table creation method according to fixed rows or columns, and input the number of rows and columns; calculate the number of rows and columns of the legend table.
[0123] For example, in this embodiment, a semi-automatic calculation method based on user input is provided to increase flexibility. The program first counts the total number N of legend units, and then prompts the user to input a fixed dimension parameter, which can be a preset fixed number of rows R or a fixed number of columns C. For example, the designer can decide to arrange the legend table with 10 rows based on the available space on the drawing page. After receiving this input (e.g., the preset fixed number of rows R=10), the row and column calculation unit 42 automatically calculates the other dimension. If the input is a fixed number of rows R, the formula for calculating the required number of columns C is: C=N / R, that is, the total number N divided by the number of rows R, and rounded up. Conversely, if the input is a fixed number of columns, the required number of rows is calculated in a similar way. In this way, the total number of rows and columns required to generate the table structure are obtained.
[0124] Step S107: Based on the number of rows and columns of the legend table, construct the legend table model and the header text, and position the legend block in the cell of the table model; wherein, the header text is obtained through a preset file (Dgnlib).
[0125] Specifically, a table model can be created. The Dgn model serves as the physical storage space for the legend table elements. The ORD API interface is called to generate the model space, which is used to store the legend table elements. During the model generation process, the model name is generated and its function is marked; the text style for creating the table header is read from the Dgnlib file and the header text is created; the table's wireframe elements are created based on the number of rows and columns; and the generated legend element blocks are moved to the corresponding cells based on the position information of the table cells.
[0126] For example, compared to the traditional approach of directly drawing legends into engineering drawing models, which leads to tight coupling, difficulty in management and reuse, this application adopts a new method. It calls the software's application programming interface to create a completely new legend carrier independent of any engineering drawing model. In this embodiment, the legend carrier is an independent legend model file, such as a Dgn file named "Airport_Legend.dgn", specifically used to store and manage legend tables. In this newly created independent legend model, the program performs the following operations to generate the legend table: First, based on the total number of rows R, the total number of columns C, and the uniform cell size (W_max, H_max) calculated in the previous step, a complete table grid is drawn; second, header text, such as "Legend" or "Symbol Explanation," is added to the top of the table as needed; finally, all legend cells are placed one by one into the cells of the table according to a predetermined order (e.g., alphabetical order of legend category names), typically aligning the center point of each legend cell with the center point of the corresponding cell to ensure it is centered within the cell. After these operations are completed, the standalone legend model file "Airport_Legend.dgn" will contain a complete and well-organized legend table.
[0127] Step S108: Insert the generated legend table model as a reference into the target drawing model to complete the automatic arrangement of the legend.
[0128] Specifically, set the legend table model to be inserted; enter the legend placement position; insert the legend model.
[0129] For example, designers open the final engineering drawing model (e.g., a drawing file named "Sheet_01.dgn"), which typically contains a title block and multiple engineering views. Then, as a reference attachment, the legend table model generated in the previous step (i.e., "Airport_Legend.dgn") is inserted into this engineering drawing model.
[0130] The program treats the legend table model as a whole and places it in a designated location on the drawing model, such as the reserved area in the lower right corner of the drawing frame. This integration method is linked, not embedded. That is, the engineering drawing model only stores reference information to the legend table model (such as file path and insertion point), while the actual data of the legend table remains stored in the legend table model. The technical advantage of this link established through reference attachments is that when the building information model changes, requiring updates to the legend content (e.g., adding a new equipment type), designers only need to rerun this method to update the independent legend table model. All engineering drawings referencing this legend table model will automatically load the latest legend table the next time they are opened, eliminating the need for manual modification of each drawing, thus ensuring data consistency and greatly improving drawing maintenance efficiency.
[0131] Based on a general inventive concept, this invention provides a legend table generation device for airport engineering BIM forward design drawing, used to implement the above method embodiments.
[0132] Figure 2 This is a schematic diagram of a legend table generation device for airport engineering BIM-based forward design drawing, provided as an embodiment of the present invention. Figure 2 As shown, the apparatus provided in this embodiment of the invention may include the following structure:
[0133] The acquisition module 21 is used to acquire the airport BIM model from which the legend information is to be extracted, determine whether the airport BIM model contains a reference model, if it does, store the reference model in the model array; if it does not, store the airport BIM model in the model array; traverse each model in the model array, extract all geometric elements of each model and store them in the element array;
[0134] The classification module 22 is used to traverse the element array, classify the geometric elements according to the extended attributes attached to the elements, and store the classification results in the corresponding attribute classification legend array, which includes a fill legend array and a parametric point legend array; and to read the business model of the target BIM software, classify it according to linear features and civil point features, and store the classification results in the linear legend array and the civil point legend array respectively.
[0135] Module 23 is used to create corresponding attribute classification legend blocks, line legend blocks, and civil point legend blocks based on the classified attribute classification legend array, linear legend array, and civil point legend array. Each legend block includes a graphic symbol and a corresponding text annotation; the text annotation represents the element information of the legend block; the attribute classification legend block includes a filled legend block and a parameterized point legend block.
[0136] The calculation module 24 is used to calculate the preset width and height of the required cells based on the graphic symbol size and text annotation size of various legend blocks, and take the maximum value among all preset widths and heights as the uniform cell width and height of the legend table; count the number of all legend blocks, and calculate the number of rows and columns of the legend table according to the standard number of rows or columns;
[0137] The processing module 25 is used to construct a legend table model and header text according to the number of rows and columns of the legend table, and to position the legend block in the cell of the table model; wherein the header text is obtained through a preset file; and to insert the generated legend table model as a reference into the target drawing model to complete the automatic arrangement of the legend.
[0138] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0139] The present invention also provides a legend table generation device based on BIM forward design of airport engineering, for implementing the above method embodiments. Figure 3 A schematic diagram of a legend table generation device based on BIM forward design for airport engineering is provided as an embodiment of the present invention, as shown below. Figure 3 As shown, the legend table generation device based on BIM forward design for airport engineering in this embodiment includes a processor 31 and a memory 32, with the processor 31 connected to the memory 32. The processor 31 is used to call and execute the program stored in the memory 32; the memory 32 is used to store the program, which is at least used to execute the legend table generation method based on BIM forward design for airport engineering in the above embodiment.
[0140] The specific implementation scheme of the legend table generation device based on BIM forward design drawing of airport engineering provided in this application embodiment can refer to the implementation scheme of the legend table generation method based on BIM forward design drawing of airport engineering in any of the above embodiments, and will not be repeated here.
[0141] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0142] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0143] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0144] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0145] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0146] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0147] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0148] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0149] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A legend table generation method based on airport engineering BIM forward design drawing, characterized in that, The method comprises the following steps: acquiring an airport BIM model to be extracted, judging whether the airport BIM model contains a reference model, and if so, storing the reference model in a model array; if not, storing the airport BIM model in the model array; traversing each model in the model array, extracting all geometric elements in each model and storing them in an element array; traversing the element array, classifying the geometric elements according to the extended attributes of the elements, and storing the classification results in a corresponding attribute classification legend array, the attribute classification legend array including a fill legend array and a parameterized point legend array; reading a business model of a target BIM software, classifying according to linear features and civil point features, and storing the classification results in a linear legend array and a civil point legend array, respectively; creating corresponding attribute classification legend blocks, linear legend blocks and civil point legend blocks according to the classified attribute classification legend array, linear legend array and civil point legend array, each legend block including a graphic symbol and corresponding text annotations; the text annotations represent the element information of the legend block; the attribute classification legend blocks include fill legend blocks and parameterized point legend blocks; based on the graphic symbol size and text annotation size of each type of legend block, calculating the preset width and height of the required cells, respectively, and taking the maximum value of all preset widths and heights as the uniform cell width and height of the legend table; counting the number of all legend blocks, calculating the number of rows and columns of the legend table according to the standard number of rows or columns; constructing a legend table model and a table header text according to the number of rows and columns of the legend table, and positioning the legend blocks in the cells of the table model; the table header text is obtained through a preset file; inserting the generated legend table model into the target drawing model as a reference to complete the automatic arrangement of the legend.
2. The method of claim 1, wherein, The extended attributes include fill and parameterized points; the classification of geometric elements according to the extended attributes of the elements is as follows: determining the classification name according to the name of the fill, recording only once for the same classification name, and storing the classification results in the fill legend array; and determining the classification name according to the name of the parameterized point, recording only once for the same classification name, and storing the classification results in the parameterized point legend array; The classification according to linear features and civil point features and the storage of the classification results in the linear legend array and the civil point legend array, respectively, include: acquiring the name of the linear feature, counting the types of linear features according to the name, storing the classification results in the linear legend array, and acquiring the name of the civil point feature, counting the types of civil point features according to the name, and storing the classification results in the civil point legend array.
3. The method of claim 1, wherein, The creation of corresponding attribute classification legend blocks, linear legend blocks and civil point legend blocks according to the classified attribute classification legend array, linear legend array and civil point legend array includes: determining a fill legend classification name according to the fill legend array, creating a text element based on the fill legend classification name and creating a rectangular box, putting the fill legend classification name and the corresponding fill legend in the fill legend array into the rectangular box to obtain a fill legend block; determining a parameterized point classification name according to the parameterized point legend array, creating a text element based on the parameterized point classification name and copying the definition of the parameterized point, taking the text element of the parameterized point and the definition of the parameterized point as a parameterized point legend block; determining a linear legend classification name according to the linear legend array, creating a text element based on the linear legend classification name and drawing a line type, taking the linear legend classification name and the line type as a line type legend block; determining a civil point classification name according to the civil point legend array, creating a text element based on the civil point classification name and drawing a civil point line type, and taking the civil point classification name and the civil point line type as a civil point legend block.
4. The method of claim 1, wherein the manner of calculating the preset width of the cell required by the fill legend block comprises: calculating the sum of the left blank width, the text note width, the middle blank width, the fill rectangle width and the right blank width, and taking the sum as the preset width of the cell required by the fill legend block. The manner of calculating the height of the cell required by the fill legend block comprises: determining the larger value of the text note height and the fill rectangle height, and calculating the sum of the larger value, the upper blank height and the lower blank height, and taking the sum as the height of the cell required by the fill legend block.
5. The method of claim 1, wherein the manner of calculating the preset width of the cell required by the line type legend block comprises: calculating the sum of the left blank width, the text note width, the middle blank width, the line type drawing length and the right blank width, and taking the sum as the preset width of the cell required by the line type legend block. The manner of calculating the height of the cell required by the line type legend block comprises: calculating the sum of Hs as the upper blank height, Ht as the text note height and Hb as the lower blank height, and taking the sum as the height of the cell required by the line type legend block.
6. The method of claim 1, wherein the manner of calculating the preset width of the cell required by the parameterized point legend block or the civil point legend block comprises: calculating the sum of the left blank width, the text note width, the middle blank width, the display diameter or width of the point and the right blank width, and taking the sum as the preset width of the cell required by the parameterized point legend block or the civil point legend block. The manner of calculating the height of the cell required by the parameterized point legend block or the civil point legend block comprises: calculating the sum of the upper blank height, the text note height and the lower blank height, and taking the sum as the height of the cell required by the parameterized point legend block or the civil point legend block. The airport BIM model comprises: line type elements, civil point elements, parameterized point element data and fill pattern element data. Before obtaining the airport BIM model and the reference model to be extracted, the method further comprises: 7. The method of claim 1, wherein, 8. The method of claim 1, wherein, A Dgnlib file is prepared, which contains layers, colors, pattern fills, and feature definitions, including linear feature definitions and civil point definitions.
9. An apparatus for generating a legend table based on airport engineering BIM forward design drawing, characterized in that, The method comprises the following steps: An acquisition module is configured to acquire an airport BIM model from which legend information is to be extracted, determine whether the airport BIM model contains a reference model, and if so, store the reference model in a model array; if not, store the airport BIM model in the model array; and traverse each model in the model array, extract all geometric elements in each model, and store the geometric elements in an element array; A classification module is configured to traverse the element array, classify the geometric elements according to extended attributes attached to the geometric elements, and store the classification results in a corresponding attribute classification legend array, which includes a fill legend array and a parametric point legend array; A business model of a target BIM software is read, linear features and civil point features are classified, and the classification results are respectively stored in a linear legend array and a civil point legend array; A construction module is configured to create corresponding attribute classification legend blocks, linear legend blocks, and civil point legend blocks according to the classified attribute classification legend array, linear legend array, and civil point legend array, each legend block including a graphic symbol and corresponding textual annotations; the textual annotations represent element information of the legend block; the attribute classification legend blocks include fill legend blocks and parametric point legend blocks; A calculation module is configured to calculate the preset width and height of each type of legend block based on the size of the graphic symbol and the size of the textual annotations, and take the maximum value of all preset widths and heights as the uniform cell width and height of the legend table; count the number of all legend blocks, calculate the number of rows and columns of the legend table according to the standard number of rows or columns, and calculate the number of rows and columns of the legend table; A processing module is configured to construct a legend table model and a table header based on the number of rows and columns of the legend table, and position the legend blocks in the cells of the table model; the table header is obtained through a preset file; the generated legend table model is inserted into a target drawing model as a reference, and the automatic arrangement of the legend is completed.
10. An equipment for generating a legend table based on airport engineering BIM forward design drawing, characterized in that, The device comprises a processor and a memory, and the processor is connected to the memory. The processor is configured to call and execute a program stored in the memory. The memory is configured to store the program, and the program is used to execute the method for generating a legend table based on a BIM forward design drawing of an airport project according to any one of claims 1-8.
Citation Information
Patent Citations
Family file processing method and device, computer equipment and storage medium
CN112148358A
Automatic legend adjustment method based on BIM forward design
CN116843797A