Model generation method, device, computer equipment and storage medium

By obtaining the target building structure of two-dimensional drawings in architectural design, identifying and generating two-dimensional outlines, and automatically building a three-dimensional model, the problem of cumbersome and inefficient in traditional mold turn is solved, and efficient three-dimensional model generation is achieved.

CN113971309BActive Publication Date: 2025-08-22JIULING (JIANGSU) DIGITAL INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111275769.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-08-22
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

In traditional architectural design, the mold turning process from two-dimensional drawings to three-dimensional models is cumbersome and inefficient.

Method used

By obtaining the target building structure in the two-dimensional drawing, identifying and distinguishing the primitives matching the target building structure, generating a two-dimensional outline, and automatically constructing a three-dimensional model based on the two-dimensional outline.

Benefits of technology

Automatic mold flip from two-dimensional drawings to three-dimensional models is realized, simplifying the mold flip process and improving mold flip efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971309B_ABST
    Figure CN113971309B_ABST
Patent Text Reader

Abstract

This application relates to a model generation method, apparatus, computer device, and storage medium. The method comprises obtaining a target building structure in a two-dimensional drawing to be processed, obtaining a target layer corresponding to the target building structure, performing basic graphic element recognition processing on each primitive in the target layer, generating a two-dimensional outline of the target building structure based on the recognized basic graphic elements, and then generating a three-dimensional model of the target building structure based on the two-dimensional outline. This method enables automatic conversion from a two-dimensional drawing to a three-dimensional model, simplifying the conversion process and improving conversion efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer-aided architectural design, and in particular to a model generation method, apparatus, computer equipment, and storage medium. Background Art

[0002] In architectural design, it is usually necessary to restore a three-dimensional model based on a two-dimensional drawing.

[0003] Traditionally, designers use computer-aided design (CAD) to obtain CAD drawings, and then manually convert them into three-dimensional models in building information modeling (BIM) based on the CAD drawings, thus achieving the conversion from two-dimensional to three-dimensional.

[0004] However, the manual mold turning process is cumbersome and inefficient. Summary of the Invention

[0005] Based on this, it is necessary to provide a model generation method, device, computer equipment and storage medium to address the above technical problems.

[0006] A model generation method, comprising:

[0007] Obtaining a target building structure in a two-dimensional drawing to be processed;

[0008] Obtain a target layer corresponding to a target building structure; the target layer includes multiple graphic elements matching the target building structure;

[0009] Basic graphic element recognition is performed on each graphic element in the target layer, a two-dimensional outline of the target building structure is generated according to the recognized basic graphic elements, and a three-dimensional model of the target building structure is generated based on the two-dimensional outline.

[0010] In one embodiment, obtaining a target building structure in a two-dimensional drawing to be processed includes:

[0011] receiving a structure selection operation on a configuration interface, and obtaining a target building structure based on the structure selection operation;

[0012] Obtaining the target layer corresponding to the target building structure includes:

[0013] In response to the structure selection operation, the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed are displayed in a differentiated manner on the configuration interface to obtain a target layer corresponding to the target building structure.

[0014] In one embodiment, the configuration interface distinguishes and displays the target building structure from other building structures in the two-dimensional drawing to be processed, including:

[0015] Using different colors to distinguish between the elements that match the target building structure and the elements that match the rest of the building structure; and / or

[0016] Use different line types to distinguish between the elements that match the target building structure and the elements that match the rest of the building structure.

[0017] In one embodiment, if the basic graphic element is a block element, generating a two-dimensional outline of the target building structure based on the identified basic graphic element includes:

[0018] The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

[0019] In one embodiment, if the basic graphic element is a line element, generating a two-dimensional outline of the target building structure based on the identified basic graphic element includes:

[0020] A closed figure is generated according to the intersecting line elements, and the closed figure is used as the two-dimensional outline of the target building structure.

[0021] In one embodiment, the target building structure includes a rectangular column; generating a closed shape based on line elements intersecting end to end includes:

[0022] Starting from i equal to 1, follow the preset direction to obtain the Nth i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, a closed figure is formed based on i+1 line elements.

[0023] In one embodiment, generating a three-dimensional model of a target building structure based on a two-dimensional outline includes:

[0024] Get the contour length, contour width and center point position of the two-dimensional contour;

[0025] The reference model of the target building structure is resized according to the outline length, outline width and model elevation, and the adjusted reference model is generated at the center point to obtain a three-dimensional model of the target building structure.

[0026] A model generating device, comprising:

[0027] A structure acquisition module is used to acquire the target building structure in the two-dimensional drawing to be processed;

[0028] A layer acquisition module is used to acquire a target layer corresponding to a target building structure; the target layer includes a plurality of graphic elements matching the target building structure;

[0029] The model generation module is used to perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure according to the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline.

[0030] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Obtaining a target building structure in a two-dimensional drawing to be processed;

[0032] Obtain a target layer corresponding to a target building structure; the target layer includes multiple graphic elements matching the target building structure;

[0033] Basic graphic element recognition is performed on each graphic element in the target layer, a two-dimensional outline of the target building structure is generated according to the recognized basic graphic elements, and a three-dimensional model of the target building structure is generated based on the two-dimensional outline.

[0034] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0035] Obtaining a target building structure in a two-dimensional drawing to be processed;

[0036] Obtain a target layer corresponding to a target building structure; the target layer includes multiple graphic elements matching the target building structure;

[0037] Basic graphic element recognition is performed on each graphic element in the target layer, a two-dimensional outline of the target building structure is generated according to the recognized basic graphic elements, and a three-dimensional model of the target building structure is generated based on the two-dimensional outline.

[0038] The above-mentioned model generation method, device, computer equipment and storage medium obtain the target building structure in the two-dimensional drawing to be processed, obtain the target layer corresponding to the target building structure, perform basic graphic element recognition processing on each graphic element in the target layer, and generate a two-dimensional outline of the target building structure based on the recognized basic graphic elements, and then generate a three-dimensional model of the target building structure based on the two-dimensional outline, thereby realizing automatic mold conversion from two-dimensional drawings to three-dimensional models, simplifying the mold conversion process and improving the mold conversion efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a diagram of the internal structure of a computer device in one embodiment;

[0040] Figure 2 A schematic flow chart of a model generation method in one embodiment;

[0041] Figure 3 is a schematic diagram of a column graphic element in one embodiment;

[0042] Figure 4 A schematic diagram of a column graphic element composed of four line elements in one embodiment;

[0043] Figure 5 A schematic diagram of a process for generating a closed graph in one embodiment;

[0044] Figure 6 A schematic diagram of a process for generating a three-dimensional model of a target building structure in one embodiment;

[0045] Figure 7 FIG. 4 is a schematic structural diagram of a model generating device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0047] The model generation method provided in this application can be applied to Figure 1 In the computer device shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a model generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0048] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0049] In one embodiment, Figure 2 As shown, a model generation method is provided, which is applied to Figure 1 The computer device in the example is used to illustrate the process, including the following steps:

[0050] S210: Obtain a target building structure in the two-dimensional drawing to be processed.

[0051] Optionally, the two-dimensional drawing to be processed may be a two-dimensional CAD drawing on which a plurality of building structures are drawn, such as columns, walls, beams, slabs, etc. The two-dimensional CAD drawing may be a top view of the entire building.

[0052] The target building structure is the building structure for which a corresponding three-dimensional model is to be generated. There are multiple building structures drawn on the two-dimensional drawing to be processed, and the target building structure can be one or more of the multiple building structures.

[0053] Optionally, the computer device may determine the building structure selected by the user as the target building structure based on the user's selection operation of multiple building structures drawn on the two-dimensional drawing to be processed. The computer device may also determine the target building structure based on building structure information input by the user. The building structure information is used to uniquely identify a specific building structure on the two-dimensional drawing to be processed, such as the number of each building structure on the two-dimensional drawing to be processed. The building structure information may also be used to uniquely identify a specific type of building structure on the two-dimensional drawing to be processed, such as the name of the building structure on the two-dimensional drawing to be processed, such as a column structure.

[0054] S220: Acquire a target layer corresponding to the target building structure.

[0055] The target layer includes multiple graphics elements that match the target building structure.

[0056] Optionally, the two-dimensional drawing to be processed includes multiple layers, each layer including graphic elements of the same type of building structure. After determining the target building structure, the computer device further obtains a target layer including graphic elements corresponding to the target building structure.

[0057] Optionally, the target layer may include only entities that match the target building structure, or may include the target building structure displayed separately and the remaining building structures in the 2D drawing to be processed.

[0058] S230: Perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure according to the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline.

[0059] The basic graphic element is the smallest unit that constitutes the graphic primitive. Optionally, the basic graphic element can be a point element, a line element, a surface element, or a block element. A block element is composed of at least one of a point element, a line element, and a surface element.

[0060] Optionally, the computer device performs basic image recognition processing on each primitive in the target layer to identify the basic graphic elements of each primitive, then generates a two-dimensional outline of the target building structure based on the identified basic graphic elements, and then generates a three-dimensional model of the target building structure based on the size and position of the two-dimensional outline. For example, if the computer device performs basic image recognition processing on a column primitive in the target layer and determines that the basic graphic element of the column primitive is a circular surface element, the computer device then obtains the radius R and center position O of the circular surface element to generate a three-dimensional cylindrical model of radius R at a preset elevation H at the center position O.

[0061] In this embodiment, the computer device obtains the target building structure in the two-dimensional drawing to be processed, obtains the target layer corresponding to the target building structure, performs basic graphic element recognition processing on each graphic element in the target layer, and generates a two-dimensional outline of the target building structure based on the recognized basic graphic elements, and then generates a three-dimensional model of the target building structure based on the two-dimensional outline, thereby realizing automatic mold conversion from the two-dimensional drawing to the three-dimensional model, simplifying the mold conversion process, and improving the mold conversion efficiency.

[0062] In one embodiment, to improve the efficiency of model generation, the above S210 includes:

[0063] Receive a structure selection operation on a configuration interface and obtain a target building structure based on the structure selection operation.

[0064] Prior to S210 , the computer device performs structural analysis on the content drawn on the two-dimensional drawing to be processed, obtaining a layer to which the graphic elements of each architectural structure belong. Each layer includes graphic elements of the same architectural structure. For example, the computer device parses the two-dimensional CAD drawing to be processed based on the ODA (Open Design Alliance) to obtain layers containing the same architectural structure in the two-dimensional CAD drawing. For example, a column layer includes graphic elements of all column structures in the two-dimensional CAD drawing, and a wall layer includes graphic elements of all wall structures in the two-dimensional CAD drawing.

[0065] Optionally, a configuration interface of the computer device displays multiple structure selection options, such as a column structure selection option, a wall structure selection option, and a beam structure selection option. The computer device receives a structure selection operation performed by the user on the configuration interface for the multiple structure selection options to obtain a target building structure in the two-dimensional drawing to be processed, selected by the user. For example, if the structure selection operation selects a column structure selection option, the target building structure is a column.

[0066] In this embodiment, the computer device determines and obtains the target building structure corresponding to the structure selection operation by receiving the structure selection operation on the configuration interface. The method of user selection to determine the target building structure is more convenient and time-saving than the method of user inputting information to determine the target building structure, thereby improving the overall model generation efficiency.

[0067] In one embodiment, to improve the comprehensiveness of model generation, the above S220 includes:

[0068] In response to the structure selection operation, the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed are displayed in a differentiated manner on the configuration interface to obtain a target layer corresponding to the target building structure.

[0069] Optionally, in response to a structure selection operation, for example, selecting a column structure option, where the target building structure is a column, the computer device obtains a column layer corresponding to the column structure, the column layer including a plurality of column elements matching the column structure. The computer device then displays the elements matching the target building structure indicated by the structure selection operation and the elements matching other building structures in the two-dimensional drawing to be processed separately on the configuration interface, thereby obtaining a target layer corresponding to the target building structure.

[0070] Optionally, to enhance the display distinction, the computer device may use different colors to distinguish between the graphics elements that match the target building structure and the graphics elements that match other building structures. For example, in the two-dimensional image to be processed, the graphics elements that match the target building structure may be displayed in black, while the graphics elements that match other building structures may be displayed in gray, thereby obtaining a target layer for the target building structure.

[0071] The computer device can use different line types to distinguish between the display elements that match the target building structure and the display elements that match the rest of the building structure. For example, in a two-dimensional drawing to be processed, the display elements that match the target building structure are displayed using solid lines, while the display elements that match the rest of the building structure are displayed using dashed lines, thereby obtaining a target layer for the target building structure.

[0072] The computer device can also use different colors and line types to distinguish between the display elements that match the target building structure and the display elements that match other building structures. For example, in the two-dimensional image to be processed, the display elements that match the target building structure are displayed using solid black lines, while the display elements that match other building structures are displayed using dashed gray lines, thereby obtaining a target layer for the target building structure.

[0073] Optionally, the computer device may also display only the graphic elements that match the target building structure in the two-dimensional drawing to be processed, and hide the graphic elements that match other building structures, so as to achieve a differentiated display effect.

[0074] Optionally, after the computer device displays the graphic elements that match the target building structure indicated by the structure selection operation and the graphic elements that match the remaining building structures in the two-dimensional drawing to be processed on the configuration interface, it can also accept adjustment instructions for the graphic elements displayed on the display interface.

[0075] The adjustment instruction is used to instruct to adjust the graphic element displayed as matching the remaining building structures to the graphic element displayed as matching the target building structure, or to adjust the graphic element displayed as matching the target building structure to the graphic element displayed as matching the remaining building structures.

[0076] In this embodiment, in response to the structure selection operation, the computer device distinguishes between the graphic elements that match the target building structure and the graphic elements that match the remaining building structures in the two-dimensional drawing to be processed in the configuration interface, and obtains the target layer corresponding to the target building structure. Specifically, different colors and / or different line types can be used to distinguish and display them, so that the user can confirm whether all the graphic elements that match the target building structure in the target layer are selected, which facilitates timely adjustment and ensures that each graphic element that matches the target building structure generates a three-dimensional model, avoiding omissions and improving the comprehensiveness of model generation.

[0077] In one embodiment, if the basic graphic element is a block element, generating a two-dimensional outline of the target building structure according to the identified basic graphic element in S230 includes:

[0078] The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

[0079] Alternatively, if the target building structure is a column structure, such as Figure 3 As shown, the basic graphic element corresponding to the column graphic element matching the column structure can be a block element composed of multiple line elements, such as a triangular block element composed of three line elements (a), a rectangular block element composed of four line elements (b), and a pentagonal block element composed of five line elements (c).

[0080] If the computer device identifies that the basic graphical element of a primitive matching the target building structure is a block element, the computer device directly extracts the outline of the basic graphical element as the two-dimensional outline of the target building structure. For example, if the computer device identifies that the basic graphical element of a column primitive is a rectangular block element composed of four line elements, the computer device extracts the outline of the rectangular block element, i.e., the rectangle, as the two-dimensional outline of the column structure.

[0081] In this embodiment, when the computer device recognizes that the basic graphic element of the graphic element matching the target building structure is a block element, the computer device directly obtains the outline of the basic graphic element as the two-dimensional outline of the target building structure, thereby realizing the process of generating a three-dimensional model of the target building structure based on the block element, thereby improving the model generation efficiency and the model accuracy.

[0082] In an optional embodiment, if the basic graphic element is a line element, generating a two-dimensional outline of the target building structure according to the identified basic graphic element in S230 includes:

[0083] A closed figure is generated according to the intersecting line elements, and the closed figure is used as the two-dimensional outline of the target building structure.

[0084] Among them, a closed figure corresponds to a two-dimensional outline, and a three-dimensional model of the corresponding target building structure is generated.

[0085] Optionally, when the computer device recognizes that the basic graphic element of the graphic element matching the target building structure is a line element, the computer device determines the line elements that end and intersect among all the line elements, and generates a closed figure based on the intersection of the line elements that end and intersect, so as to use the closed figure as the two-dimensional outline of the target building structure.

[0086] Optionally, the target building structure includes a rectangular column, Figure 4 The rectangle in the figure is the column element that matches the rectangular column. Each column element is composed of four line elements connected at the end. The above-mentioned closed figure generated by the intersecting line elements includes:

[0087] In the column element of the target layer, starting from i=1, get the column element corresponding to the Nth column element in the preset direction. i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, a closed figure is formed based on i+1 line elements.

[0088] Where i is equal to 1, N i That is N1, which is used to represent any line element in the column graphic element.

[0089] Specifically, in the column primitive of the target layer, the computer device obtains any line element in the column primitive as the N1th line element, obtains the N2th line element intersecting with the N1th line element according to the preset direction, and continues to obtain the N3th line element intersecting with the N2th line element according to the above preset direction until the N4th line element intersecting with the N3th line element is obtained, and the four line elements of the N1th line element, the N2th line element, the N3th line element and the N4th line element constitute a closed figure, that is, the following is obtained. Figure 4 A column element that matches the rectangular column shown in .

[0090] Optionally, the preset direction may be clockwise or counterclockwise.

[0091] In an optional embodiment, the closed figure can also be determined by intersection detection between line elements, such as Figure 5 As shown, the above-mentioned generation of a closed figure based on the line elements intersecting at the head and tail includes:

[0092] S510: Select an unprocessed line element from the graphics elements of the target layer to perform intersection detection.

[0093] The intersection detection includes determining multiple line elements that intersect with unprocessed line elements and marking the unprocessed line elements as processed line elements. Unprocessed line elements are line elements that have not undergone intersection detection, and processed line elements are line elements that have undergone intersection detection.

[0094] For example, if the target building structure is a column structure, the target layer is the column layer including the column elements matching the column structure. Figure 4 As shown, the column primitive is composed of four line elements a through d. When determining a closed shape, the computer device selects an unprocessed line element a from the column primitives in the column layer for intersection detection, determines the line elements b and d that intersect with the unprocessed line element a, and marks the unprocessed line element a as a processed line element.

[0095] S520: If there is an unprocessed line element among the multiple line elements, continue to perform intersection detection on any unprocessed line element among the multiple line elements until all line elements intersecting with any unprocessed line element are processed line elements.

[0096] S530: If the multiple line elements are all processed line elements, a closed graph is formed by all the processed line elements.

[0097] Continuing with the above example, line elements b and d that intersect with the unprocessed line element a are both unprocessed line elements, then continue to perform intersection detection on any of the unprocessed line elements b and d. For example, if intersection detection is performed on the unprocessed line element b, determine the line elements a and c that intersect with the unprocessed line element b, and mark the unprocessed line element b as a processed line element. Then continue to obtain any of the unprocessed line elements a and c for intersection detection. For example, if intersection detection is performed on the unprocessed line element c, determine the line elements b and d that intersect with the unprocessed line element c, and mark the unprocessed line element c as a processed line element. Then continue to obtain any of the unprocessed line elements b and d for intersection detection. For example, if intersection detection is performed on the unprocessed line element d, determine the line elements c and a that intersect with the unprocessed line element d, and mark the unprocessed line element d as a processed line element. Since line elements c and a are both processed line elements, the computer device can determine that the above-mentioned processed line elements a to d constitute a closed figure.

[0098] In this embodiment, when the computer device recognizes that the basic graphic element of the graphic element matching the target building structure is a line element, the computer device determines the line elements that end and intersect among all the line elements, and generates a closed figure based on the intersection of the line elements that end and intersect, so as to use the closed figure as the two-dimensional outline of the target building structure, thereby realizing the process of generating a three-dimensional model of the target building structure based on the line elements, thereby improving the efficiency of model generation and the accuracy of the model.

[0099] In one embodiment, in order to improve the restoration degree of the generated three-dimensional model relative to the target building structure represented in the two-dimensional drawing to be processed, Figure 6 As shown, the above-mentioned step S230 of generating a three-dimensional model of the target building structure based on the two-dimensional outline includes:

[0100] S610: Obtain the contour length, contour width, and center point position of the two-dimensional contour.

[0101] by Figure 4 Taking the two-dimensional contour formed by the centerline elements a to d as an example, the contour length l, contour width w, and center point position o of the two-dimensional contour are obtained. The center point position o is the intersection of the two diagonals of the two-dimensional contour (rectangle).

[0102] S620: Adjust the size of the reference model of the target building structure according to the outline length, outline width, and model elevation, generate the adjusted reference model at the center point, and obtain a three-dimensional model of the target building structure.

[0103] The reference model is a 3D model of default dimensions. For example, the reference model of a rectangular column structure is a 3D rectangular column model of default length, width, and elevation. Optionally, the model elevation can be preset or read based on annotation information on the primitive. In this embodiment, there is no specific limitation on how the model elevation is determined.

[0104] Optionally, if the target building structure is a rectangular column structure, the computer device may adjust the dimensions of the three-dimensional rectangular column model of the default length, width, and elevation based on the obtained outline length l, outline width w, and the preset model elevation H, and generate an adjusted reference model at the center point o to obtain a three-dimensional model of the rectangular column structure. Specifically, the computer device may directly generate a three-dimensional model of the rectangular column structure with an outline length l and an outline width w at the preset model elevation H at the center point o based on the family file of the three-dimensional rectangular column.

[0105] In this embodiment, the computer device obtains the contour length, contour width and center point position of the two-dimensional contour, and then adjusts the size of the reference model of the target building structure according to the contour length, contour width and model elevation, and generates the adjusted reference model at the center point position to obtain a three-dimensional model of the target building structure, so as to improve the restoration degree of the generated three-dimensional model relative to the target building structure represented in the two-dimensional drawing to be processed.

[0106] It should be understood that although Figure 2-6 The steps in the flowchart are shown in the order indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 2-6 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0107] In one embodiment, Figure 7 As shown, a model generation device is provided, including: a structure selection module 701, a layer acquisition module 702 and a model generation module 703, wherein:

[0108] The structure acquisition module 701 is used to acquire the target building structure in the two-dimensional drawing to be processed;

[0109] The layer acquisition module 702 is used to acquire a target layer corresponding to the target building structure; the target layer includes multiple graphic elements that match the target building structure;

[0110] The model generation module 703 is used to perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure according to the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline.

[0111] In one embodiment, the structure acquisition module 701 is specifically used to receive a structure selection operation on a configuration interface and obtain a target building structure based on the structure selection operation; the layer acquisition module 702 is specifically used to respond to the structure selection operation, distinguish between displaying the graphics elements that match the target building structure and the graphics elements that match the remaining building structures in the two-dimensional drawing to be processed on the configuration interface, and obtain a target layer corresponding to the target building structure.

[0112] In one embodiment, the layer acquisition module 702 is specifically configured to:

[0113] Different colors are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure; and / or different line types are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure.

[0114] In one embodiment, if the basic graphic element is a block element, the model generation module 703 is specifically configured to:

[0115] The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

[0116] In one embodiment, if the basic graphic element is a line element, the model generation module 703 is specifically configured to:

[0117] A closed figure is generated according to the intersecting line elements, and the closed figure is used as the two-dimensional outline of the target building structure.

[0118] In one embodiment, the target building structure includes rectangular columns, and the model generation module 703 is specifically configured to:

[0119] Starting from i equal to 1, follow the preset direction to obtain the Nth i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, a closed figure is formed based on i+1 line elements.

[0120] In one embodiment, the model generation module 703 is specifically configured to:

[0121] The contour length, contour width and center point position of the two-dimensional contour are obtained; the reference model of the target building structure is resized according to the contour length, contour width and model elevation, and the adjusted reference model is generated at the center point position to obtain a three-dimensional model of the target building structure.

[0122] For the specific definition of the model generation device, please refer to the definition of the model generation method above and will not be repeated here. Each module in the above-mentioned model generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software so that the processor can call and execute the operations corresponding to each of the above modules.

[0123] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0124] Obtain a target building structure in a two-dimensional drawing to be processed; obtain a target layer corresponding to the target building structure; the target layer includes multiple graphic elements matching the target building structure; perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure based on the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline.

[0125] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0126] receiving a structure selection operation on a configuration interface, and obtaining a target building structure based on the structure selection operation;

[0127] In response to the structure selection operation, the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed are displayed in a differentiated manner on the configuration interface to obtain a target layer corresponding to the target building structure.

[0128] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0129] Different colors are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure; and / or different line types are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure.

[0130] In one embodiment, if the basic graphic element is a block element, the processor further implements the following steps when executing the computer program:

[0131] The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

[0132] In one embodiment, if the basic graphic element is a line element, the processor further implements the following steps when executing the computer program:

[0133] A closed figure is generated according to the intersecting line elements, and the closed figure is used as the two-dimensional outline of the target building structure.

[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0135] Starting from i equal to 1, follow the preset direction to obtain the Nth i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, a closed figure is formed based on i+1 line elements.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] The contour length, contour width and center point position of the two-dimensional contour are obtained; the reference model of the target building structure is resized according to the contour length, contour width and model elevation, and the adjusted reference model is generated at the center point position to obtain a three-dimensional model of the target building structure.

[0138] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0139] Obtain a target building structure in a two-dimensional drawing to be processed; obtain a target layer corresponding to the target building structure; the target layer includes multiple graphic elements matching the target building structure; perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure based on the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline.

[0140] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0141] receiving a structure selection operation on a configuration interface, and obtaining a target building structure based on the structure selection operation;

[0142] In response to the structure selection operation, the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed are displayed in a differentiated manner on the configuration interface to obtain a target layer corresponding to the target building structure.

[0143] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0144] Different colors are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure; and / or different line types are used to distinguish between the display of graphic elements that match the target building structure and the display of graphic elements that match the rest of the building structure.

[0145] In one embodiment, if the basic graphic element is a block element, the computer program further implements the following steps when executed by a processor:

[0146] The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

[0147] In one embodiment, if the basic graphic element is a line element, the computer program further implements the following steps when executed by a processor:

[0148] A closed figure is generated according to the intersecting line elements, and the closed figure is used as the two-dimensional outline of the target building structure.

[0149] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0150] Starting from i equal to 1, follow the preset direction to obtain the Nth i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, a closed figure is formed based on i+1 line elements.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0152] The contour length, contour width and center point position of the two-dimensional contour are obtained; the reference model of the target building structure is resized according to the contour length, contour width and model elevation, and the adjusted reference model is generated at the center point position to obtain a three-dimensional model of the target building structure.

[0153] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0154] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0155] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A model generation method, characterized in that: The method comprises: Obtaining a target building structure in a two-dimensional drawing to be processed; Acquire a target layer corresponding to the target building structure; the target layer includes a plurality of graphic elements matching the target building structure; Performing basic graphic element recognition processing on each graphic element in the target layer, generating a two-dimensional outline of the target building structure according to the recognized basic graphic elements, and generating a three-dimensional model of the target building structure based on the two-dimensional outline; If the basic graphic element is a line element, generating the two-dimensional outline of the target building structure according to the identified basic graphic element includes: Generate a closed figure based on the line elements that intersect at both ends, and use the closed figure as the two-dimensional outline of the target building structure; The step of generating a closed graph based on line elements intersecting head and tail includes: Selecting an unprocessed line element from the primitives of the target layer to perform intersection detection; the intersection detection includes: determining a plurality of line elements intersecting with the unprocessed line element, and marking the unprocessed line element as a processed line element; If there is an unprocessed line element among the plurality of line elements, continue to perform intersection detection on any unprocessed line element among the plurality of line elements until all line elements intersecting with any unprocessed line element are processed line elements; If the plurality of line elements are all processed line elements, then the closed graph is formed by all the processed line elements.

2. The method according to claim 1, characterized in that The step of obtaining the target building structure in the two-dimensional drawing to be processed includes: receiving a structure selection operation on a configuration interface, and obtaining the target building structure based on the structure selection operation; The acquiring of the target layer corresponding to the target building structure comprises: In response to the structure selection operation, the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed are displayed in the configuration interface to obtain a target layer corresponding to the target building structure.

3. The method according to claim 2, characterized in that The step of distinguishing and displaying the target building structure and other building structures in the two-dimensional drawing to be processed on the configuration interface includes: Using different colors to distinguish between the graphic elements that match the target building structure and the graphic elements that match other building structures; and / or Different line types are used to distinguish and display the graphic elements that match the target building structure and the graphic elements that match other building structures.

4. The method according to claim 1, wherein If the basic graphic element is a block element, generating the two-dimensional outline of the target building structure according to the identified basic graphic element includes: The outline of the basic graphic element is obtained as the two-dimensional outline of the target building structure.

5. The method according to claim 1, wherein The target building structure includes a rectangular column; and generating a closed figure based on line elements intersecting end to end includes: Starting from i equal to 1, follow the preset direction to obtain the Nth i The Nth intersection of line elements i+1 Line elements, until i+1 is equal to 4, the closed figure is constructed based on i+1 line elements.

6. The method according to claim 1, characterized in that Generating a three-dimensional model of the target building structure based on the two-dimensional outline includes: Obtaining the contour length, contour width, and center point position of the two-dimensional contour; The reference model of the target building structure is resized according to the outline length, the outline width, and the model elevation, and the adjusted reference model is generated at the center point to obtain a three-dimensional model of the target building structure.

7. A model generation device, characterized in that: The device comprises: A structure acquisition module is used to acquire the target building structure in the two-dimensional drawing to be processed; A layer acquisition module, configured to acquire a target layer corresponding to the target building structure; the target layer includes a plurality of graphic elements matching the target building structure; a model generation module, configured to perform basic graphic element recognition processing on each graphic element in the target layer, generate a two-dimensional outline of the target building structure according to the recognized basic graphic elements, and generate a three-dimensional model of the target building structure based on the two-dimensional outline; If the basic graphic element is a line element and the target building structure includes a rectangular column, the model generation module is used to generate a closed figure based on the line elements intersecting end to end, and use the closed figure as the two-dimensional outline of the target building structure; The model generation module is further used to select an unprocessed line element from the primitives of the target layer for intersection detection; the intersection detection includes: determining multiple line elements that intersect with the unprocessed line element, and marking the unprocessed line element as a processed line element; if there is an unprocessed line element among the multiple line elements, continuing to perform intersection detection on any unprocessed line element among the multiple line elements until all line elements that intersect with any unprocessed line element are processed line elements; if all line elements are processed line elements, all the processed line elements constitute the closed figure.

8. The device according to claim 7, characterized in that The structure acquisition module is configured to receive a structure selection operation on the configuration interface and obtain the target building structure based on the structure selection operation; The layer acquisition module is used to respond to the structure selection operation and distinguish between the graphic elements matching the target building structure and the graphic elements matching other building structures in the two-dimensional drawing to be processed on the configuration interface to obtain the target layer corresponding to the target building structure.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Vertical graph identification method for converting architectural drawing into three-dimensional BIM model

    CN109993827A

  • Method and system for generating plane profile diagram based on building model and storage medium

    CN111027113A