A graph model drawing method, device, equipment and system based on a gnomonic identification
Patent Information
- Application Number
- CN202310144085.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-02-17
AI Technical Summary
[0004]本发明目的为了解决现有对图模一致性审查过程中,耗时长、易出错、效率低的问题,为了解决该问题,本发明实施例提供了如下技术方案:
[0037] The present invention provides a method, apparatus, and device for drawing models based on grid line recognition. A terminal device uploads the 3D model file and 2D drawing file of the building to be reviewed to a server. The server establishes a correspondence between at least one 2D drawing and the 3D model, and determines the grid line data for each 2D drawing and the 3D model. These correspondences and grid line data are used to align the 2D drawings and 2D views. Based on the user's selection, the selected target 2D drawing and target 2D view are overlaid to generate a drawing view. Finally, the drawing view is displayed on a window interface. Because the 2D drawing, 2D view, and overlapping parts are displayed in different ways in this drawing view, differences between the drawings and the model can be directly identified, avoiding manual review and comparison. This method saves review time, improves review efficiency, and enhances review accuracy through grid line data alignment, automatic recognition, and overlay generation of the drawing view.
Smart Images

Figure CN116012490B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer-aided design technology, and in particular to a method, apparatus, device and system for aligning graphic patterns based on grid recognition. Background Technology
[0002] With the increasing application of Building Information Modeling (BIM) technology in the construction industry, the application scenarios where 3D BIM models and 2D construction drawings coexist and complement each other are becoming more common. Currently, the process of generating both 3D models and 2D drawings for the same project during the design phase is highly complex, and inconsistencies between the 3D model and 2D drawings can easily arise. Therefore, it is necessary to review and verify the consistency between the model and the drawings. Consequently, in the construction drawing review phase, checking the consistency between the 3D BIM model and the 2D construction drawings for the same project has become a new review requirement. The aim is to ensure the consistency and accuracy of the descriptions in the 3D model and 2D drawings, ensuring high-quality delivery of design results and contributing to the successful construction of the project.
[0003] Existing methods for reviewing the consistency between drawings and models include manual review and machine review. These methods have the following drawbacks: First, because the visual representations of 2D drawings and 3D BIM models are unstructured and contain a vast amount of information, manually comparing every component in the drawings and models requires enormous effort and time, and is prone to omissions or errors. Second, due to the inherent inconsistencies in representation between 2D drawings and 3D BIM models, reviewing components with discrepancies presents difficulties and is prone to errors during the review process. Summary of the Invention
[0004] The purpose of this invention is to solve the problems of long processing time, error-proneness, and low efficiency in the existing process of reviewing the consistency of drawing models. To address this problem, embodiments of this invention provide the following technical solutions:
[0005] In a first aspect, embodiments of the present invention disclose a method for drawing a model based on grid line recognition. This method can be applied to a terminal device equipped with a construction drawing review system. The method includes:
[0006] When a user logs into the construction drawing review system, they upload the 3D model file and 2D drawing file of the building to be reviewed to the server. The server then determines at least one correspondence between a 2D drawing and a 3D model based on the 3D model file and the 2D drawing file, as well as the grid data of each 2D drawing and each 3D model. Each 3D model corresponds to one or more 2D views, and each 2D view corresponds to one 2D drawing.
[0007] The server receives at least one set of alignment data generated based on the grid data of each two-dimensional drawing and each three-dimensional model, as well as at least one of the correspondence relationships. Each set of alignment data is used to determine the transformation relationship between a set of two-dimensional drawings and two-dimensional views.
[0008] In response to a user's selection operation in at least one set of alignment data, the target 2D drawing and target 2D view determined by the target alignment data selected by the user are loaded on the window interface, and the target 2D drawing and target 2D view are overlaid according to the target transformation relationship to generate a drawing view;
[0009] The target 2D drawing, the target 2D view, and the views of overlapping parts are marked in the drawing view and displayed on the window interface.
[0010] Optionally, in one possible implementation of the first aspect, after receiving at least one set of alignment data generated by the server, the method further includes: determining, based on the at least one set of alignment data, a transformation matrix of the coordinate system between the two-dimensional drawing and the two-dimensional view in each set of alignment data; determining target alignment data and the target transformation relationship corresponding to the target alignment data based on the user's selection operation in the at least one set of alignment data, wherein the target transformation relationship is the transformation relationship between the target two-dimensional drawing and the target two-dimensional view.
[0011] Optionally, in another possible implementation of the first aspect, the target transformation relation is a target transformation matrix;
[0012] The step of performing overlay processing on the target 2D drawing and the target 2D view according to the target transformation relationship to generate the drawing view includes: using the target transformation matrix on the target 2D drawing to convert the points in the target 2D view coordinate system to the points in the target 2D drawing coordinate system, so that the target 2D view and the target 2D drawing are superimposed to generate the drawing view.
[0013] Optionally, in another possible implementation of the first aspect, uploading the 3D model file and 2D drawing file of the building to be inspected to the server includes:
[0014] The 3D model file is uploaded to the server; after receiving it, the server parses the 3D model file to obtain a list of model views, and exports at least one 3D model view file based on the list of model views, wherein the at least one 3D model view includes the grid data of the 3D model; the 2D drawing file is uploaded to the server.
[0015] After receiving the data, the server parses the two-dimensional drawing file to obtain at least one two-dimensional drawing, and performs grid identification on the at least one two-dimensional drawing to obtain grid data for each two-dimensional drawing.
[0016] Optionally, in another possible implementation of the first aspect, grid identification is performed on the at least one two-dimensional drawing to obtain grid data for each two-dimensional drawing, including:
[0017] The at least one two-dimensional drawing is broken down and structured to generate basic line primitives;
[0018] Perform geometric relationship calculations on the basic line primitives to identify the axis lines;
[0019] The axis number is identified based on the intersection relationship between the axis and the circle;
[0020] Based on the perpendicular and intersecting relationships between axes, the intersection points between axes are determined to obtain the grid data of the two-dimensional drawing; the grid data of the two-dimensional drawing includes: the axis, the axis number, and the intersection point.
[0021] Optionally, in another possible implementation of the first aspect, determining the target transformation matrix includes: determining a scaling matrix, a rotation matrix, and a translation matrix between the target 2D drawing and the target 2D view based on the target alignment data; and generating the target transformation matrix based on the scaling matrix, the rotation matrix, and the translation matrix.
[0022] Optionally, in another possible implementation of the first aspect, displaying on the viewport includes: filling two-dimensional drawing elements with color and drawing the target two-dimensional drawing using a first color; filling a two-dimensional view of the three-dimensional model with color and drawing the target two-dimensional view using a second color, the second color being different from the first color; displaying the target two-dimensional drawing on the viewport using the first color, displaying the target two-dimensional view using the second color, and displaying the view of the overlapping portion using a third color.
[0023] Secondly, embodiments of the present invention also disclose a drawing device based on grid recognition, the device being equipped with a construction drawing review system, the device comprising:
[0024] The sending unit is used to upload the three-dimensional model file and two-dimensional drawing file of the building to be reviewed to the server after the user logs into the construction drawing review system, so that the server determines at least one correspondence between two-dimensional drawing and three-dimensional model based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing.
[0025] The receiving unit is configured to receive at least one set of alignment data generated by the server based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, wherein each set of alignment data is used to determine the transformation relationship between a set of two-dimensional drawings and two-dimensional views;
[0026] The determining unit is used to respond to a user's selection operation in at least one set of alignment data, load the target two-dimensional drawing and target two-dimensional view determined by the target alignment data selected by the user on the window interface, and perform overlay processing on the target two-dimensional drawing and the target two-dimensional view according to the target transformation relationship to generate a drawing view;
[0027] A marking unit is used to mark the target two-dimensional drawing, the target two-dimensional view, and the views of overlapping parts in the drawing view;
[0028] The display unit is used to display the marked target two-dimensional drawing, the target two-dimensional view, and the view of the overlapping part on the window interface.
[0029] Thirdly, embodiments of the present invention also provide a drawing system, the system including a terminal device and a server, and the terminal device is equipped with a construction drawing review system;
[0030] After a user logs into the construction drawing review system, the terminal device uploads the three-dimensional model file and two-dimensional drawing file of the building to be reviewed to the server;
[0031] After receiving the data, the server determines the correspondence between at least one two-dimensional drawing and the three-dimensional model based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing.
[0032] The server generates at least one set of alignment data based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, and sends the at least one set of alignment data to the terminal device; each set of alignment data is used to determine the conversion relationship between a set of two-dimensional drawings and two-dimensional views;
[0033] The terminal device receives the at least one set of alignment data, and determines target alignment data in response to a user's selection operation in the at least one set of alignment data. It loads the target 2D drawing and target 2D view determined according to the target alignment data onto the window interface, and performs overlay processing on the target 2D drawing and the target 2D view according to the target transformation relationship to generate a drawing view. The drawing view marks the target 2D drawing, the target 2D view, and the views of the overlapping parts, and displays them on the window interface.
[0034] Fourthly, embodiments of the present invention also disclose an electronic device, including a processor and a memory, wherein the memory is coupled to the processor; the memory stores computer-readable program instructions, which, when executed by the processor, implement the drawing method based on grid recognition described in the first aspect or any implementation thereof.
[0035] Optionally, the electronic device is a terminal device or a server.
[0036] In addition, embodiments of the present invention also disclose a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the method for drawing a graphic model based on grid recognition as described in the first aspect or any implementation thereof.
[0037] The present invention provides a method, apparatus, and device for drawing models based on grid line recognition. A terminal device uploads the 3D model file and 2D drawing file of the building to be reviewed to a server. The server establishes a correspondence between at least one 2D drawing and the 3D model, and determines the grid line data for each 2D drawing and the 3D model. These correspondences and grid line data are used to align the 2D drawings and 2D views. Based on the user's selection, the selected target 2D drawing and target 2D view are overlaid to generate a drawing view. Finally, the drawing view is displayed on a window interface. Because the 2D drawing, 2D view, and overlapping parts are displayed in different ways in this drawing view, differences between the drawings and the model can be directly identified, avoiding manual review and comparison. This method saves review time, improves review efficiency, and enhances review accuracy through grid line data alignment, automatic recognition, and overlay generation of the drawing view. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of a drawing review system provided in an embodiment of the present invention;
[0039] Figure 2 A flowchart illustrating a graphic model drawing method based on grid line recognition, provided in an embodiment of the present invention;
[0040] Figure 3 A schematic diagram illustrating a user-associated model view and a two-dimensional drawing provided in an embodiment of the present invention;
[0041] Figure 4a This is a schematic diagram illustrating the drawing and generation of a two-dimensional model view, provided by an embodiment of the present invention.
[0042] Figure 4b This is a schematic diagram illustrating the process of drawing and generating a two-dimensional drawing, provided by an embodiment of the present invention.
[0043] Figure 4c This is a schematic diagram illustrating the drawing and generation of a target view, provided by an embodiment of the present invention.
[0044] Figure 5 A flowchart for determining target alignment data is provided in an embodiment of the present invention;
[0045] Figure 6 A flowchart for generating grid data for two-dimensional drawings is provided as an embodiment of the present invention;
[0046] Figure 7 This is a structural block diagram of a pattern drawing device provided in an embodiment of the present invention;
[0047] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0048] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] The technical solution of this application relates to the field of engineering and construction, such as the interactive application of two-dimensional drawings and three-dimensional models throughout the entire engineering and construction process. Additionally, it also relates to the consistency review of two-dimensional construction drawings and three-dimensional BIM models during the construction drawing review stage.
[0050] First, let's introduce the technical terms related to the technical solution of this application.
[0051] "Drawings and models" is a shorthand term referring to two-dimensional construction drawings and three-dimensional architectural models. Two-dimensional construction drawings are also called 2D drawings, and three-dimensional architectural models are also called 3D models. If the 2D drawings and 3D models originate from the same data source, they are called "drawings and models from the same source"; conversely, if they originate from different data sources—for example, if the source file of the 3D model is obtained from original building information / data, and the source file of the 2D drawings is exported from the 3D model source file and then modified or edited—then the drawings and models are called "not from the same source."
[0052] The technical solution of this application enables the review of two-dimensional drawings and three-dimensional models using BIMFACE software. BIMFACE software is a lightweight BIM (Building Information Modeling) engine with completely independent intellectual property rights. Software developers in the construction industry can perform secondary development on the basic functions provided by BIMFACE to offer end users richer and more valuable BIM applications.
[0053] BIMFACE software features engineering file format conversion, lightweight model / drawing display, and BIM data management. For example, it supports cloud-based conversion of over fifty engineering file formats without requiring plugins, fully preserving the original file information; it allows direct opening of models / drawings on browsers, mobile phones, and tablets without installing specialized software, maximizing model size compression and minimizing CPU, memory, and graphics card overhead. Furthermore, it supports structured cloud storage of massive amounts of BIM data (such as component information, spatial information, and view information), making data retrieval convenient and fast.
[0054] The technical solution of this invention, when applied to the BIMFACE software, can achieve lightweight display of two-dimensional drawings and three-dimensional models, as well as effects such as linked review of drawings and models.
[0055] Generally, two methods can be used to perform consistency checks on drawings and models:
[0056] One method is manual review, which involves opening a two-dimensional drawing and a three-dimensional model simultaneously on a terminal device (client). Reviewers examine whether the building structure described at location A1 in the two-dimensional drawing matches the building structure described at location A2 in the three-dimensional model, including its attributes and geometric structure. If they match, it means that the component at location A1 in the two-dimensional drawing and the three-dimensional model are consistent. Otherwise, they do not match, and if they do not match, further investigation is needed to identify all inconsistent results.
[0057] Another method is machine review, which involves importing a two-dimensional drawing and a three-dimensional model into a computer. The computer program then uses pre-set judgment rules (or algorithm rules) to calculate whether the architectural structure depicted in the two-dimensional drawing and the three-dimensional model are consistent. If they are inconsistent, the set of inconsistent results is identified.
[0058] Manual review, which relies on human labor to compare every component in the two-dimensional drawings and three-dimensional models, is extremely time-consuming and labor-intensive, and prone to omissions. Furthermore, since two-dimensional drawings represent the building in two dimensions and three-dimensional models in three dimensions, their representational methods are inherently inconsistent. This makes it difficult and error-prone to manually determine the consistency of components with inconsistent representations. Therefore, this application aims to address the technical problems of time-consuming, error-prone, and inefficient processes in reviewing the consistency between drawings and models.
[0059] The technical solution provided in this application embodiment is as follows: the three-dimensional model is converted into a two-dimensional model, and the converted two-dimensional model view is superimposed on the two-dimensional drawing. After superposition, the same parts are grayed out using technical means, and only the inconsistent parts between the model view and the two-dimensional drawing are filled with different colors. In this way, the differences between the drawing and the model are intuitively reflected by the color difference. Thus, when reviewing consistency, only the parts with different colors need to be compared and judged to complete the work of reviewing the consistency between the drawing and the model, thereby improving review efficiency and saving time and labor costs.
[0060] The technical solutions provided in the embodiments of this application will be described in detail below.
[0061] The technical solution of this application can be applied to a drawing and model review system, such as... Figure 1 As shown, the system includes a server 100 and terminal devices 200, wherein the server 100 and the terminal devices 200 are connected via a network. Furthermore, the server 100 can be a standalone server, a server cluster consisting of multiple servers, or a server providing basic cloud computing services such as cloud services / cloud computing, data centers, web servers, network services, cloud communication, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0062] Terminal device 200 can also be referred to as user equipment (UE) or client, and includes, but is not limited to, various personal computers (PCs), laptops, smartphones, tablets, and portable wearable devices. Figure 1 As shown, at least one UE includes: a laptop (UE1), a desktop computer (UE2), and a mobile phone (UE3).
[0063] In addition, the network connecting server 100 and terminal device 200 can include various connection types, such as wired and wireless communication links, such as wireless local area network (WLAN) or fiber optic cable, etc.
[0064] It should be understood that the above network system may also include more or fewer other devices or apparatuses, such as switches, etc., and this embodiment does not impose any limitations on this. In addition, the above-mentioned terminal device 200 can be referred to as a front-end device, and the server 100 is a back-end device. The front-end device and the back-end device can be two end devices for the same server. In this case, the terminal device is a front-end device of the server, while the back-end device is a network server or a server cluster.
[0065] Additionally, it should be noted that this system is designed to process design models and design drawing files generated during the architectural design process. Design models are 3D architectural models, and design drawings are 2D drawings. The generation process of 3D architectural models and 2D drawings is not detailed here; users / clients can use design tools to generate them during the production process. The 3D architectural model files and 2D drawing files do not need to originate from the same source; this application does not impose any restrictions on this.
[0066] This application provides a method for drawing a diagram based on grid line recognition. This method can be executed by a front-end device, such as a terminal device or a web page, and the terminal device is pre-installed with a construction drawing review system, such as... Figure 2 As shown, the method includes:
[0067] Step 101: After logging into the construction drawing review system, the user uploads the 3D model file and 2D drawing file of the building to be reviewed to the server. Correspondingly, the server receives the 3D model file and 2D drawing file sent by the terminal device.
[0068] The construction drawing review system can be an engineering review software or an engineering review application module. After logging into the construction drawing review system with a username and password, users can upload three-dimensional model files and two-dimensional drawing files to the system.
[0069] Specifically, one implementation involves the user first uploading the 3D model file to the server through a construction drawing review system, and then uploading the 2D drawing file. The 2D drawing file includes at least one 2D drawing of the building.
[0070] After receiving the 3D model file, the server parses it to obtain a list of model views, and exports at least one 3D model view file based on the list, for example, exporting N model view files. During the export process, the grid data of the 3D model is also obtained; that is, the at least one 3D model view includes the grid data of the 3D model. For example, the grid data of each model view can be exported from at least one model view file in the model view list using a conversion module.
[0071] After receiving the two-dimensional drawing file uploaded by the terminal device, the server parses the two-dimensional drawing file to obtain at least one two-dimensional drawing, and performs grid line recognition on the at least one two-dimensional drawing to obtain grid line data for each two-dimensional drawing.
[0072] The process involves identifying the grid lines on a 2D drawing to obtain grid data for the 2D drawing file. This grid data includes the grid line name and the grid line intersection matrix. Specifically, the grid line identification process includes: performing a lightweight transformation on the 2D drawing file to obtain lightweight drawing data, i.e., 2D drawing data; and then using AI technology to identify the grid lines on the 2D drawing file to obtain the grid data for that drawing file. This grid data is used for coordinate system alignment and correction between subsequent views and the drawing.
[0073] The server determines at least one correspondence between two-dimensional drawings and three-dimensional models (e.g., M correspondences) based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing.
[0074] It also includes: the server generating at least one set of alignment data after conversion based on the correspondence between at least one two-dimensional drawing and a three-dimensional model, as well as the grid data of the aforementioned two-dimensional drawing and three-dimensional model, and sending at least one set of alignment data to the terminal device.
[0075] Step 102: The terminal device receives at least one set of alignment data generated by the server based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, wherein each set of alignment data is used to determine the conversion relationship between a set of two-dimensional drawings and two-dimensional views, and each set of alignment data is based on a two-dimensional drawing.
[0076] For example, given N sets of alignment data, each set can determine the transformation relationship between a 2D drawing and a 2D view, such as the coordinate system transformation relationship between the 2D drawing and the 2D view. Specifically, the alignment method can obtain the coordinate system transformation relationship by selecting feature points on the 2D drawing and the 2D view, thereby determining the alignment data.
[0077] Step 103: In response to the user's selection operation in at least one set of alignment data, load the target 2D drawing and target 2D view determined by the target alignment data selected by the user on the window interface, and perform overlay processing on the target 2D drawing and the target 2D view according to the target transformation relationship to generate a drawing view.
[0078] The target transformation relationship is determined by the target alignment data. When the user selects a target alignment data, the target transformation relationship is determined. Further, the target transformation relationship is a transformation matrix between the target 2D drawing and the target 2D view.
[0079] After the terminal device receives at least one set of alignment data, the user can click on the drawing or model view they want to display or review on the construction drawing review system, for example... Figure 3 As shown, the file directory displays the uploaded file name and file type, such as the Guangzhou Fangshi project under the categories of architecture and residential. It also displays information such as the model view type, model view, associated drawings, and association status. For example, the floor plan model view name is "1F-Output," which is associated with the 2D drawing name "JC3BY-S-FSFJ-JZ-01001," the first floor plan of Building #1, and the association status is "Associated."
[0080] When a user selects one of the all associated models or drawings, the selected model view becomes the target 2D view, and the drawing associated with the target 2D view becomes the target 2D drawing. Through the target transformation relationship in the previous step, the target 2D drawing and the target 2D view are overlaid. The specific processing can be implemented through a preset algorithm, and finally, the drawing view is generated.
[0081] Step 104: Mark the target 2D drawing, the target 2D view, and the views of the overlapping parts in the drawing view, and display them on the window interface.
[0082] Specifically, color fill is applied to the model view of the 3D model, for example... Figure 4a As shown, the 2D model view of the 3D model is filled with color using the second color, Color2. In this example, a model view of a patient information desk is selected. Figure 4a The grayscale area represents the model view of the patient information desk, and the name of this model view is: Model 1-1F.
[0083] Additionally, it includes: filling the two-dimensional drawing elements with color, and drawing the target two-dimensional drawing using the first color Color1; for example... Figure 4b As shown, the target two-dimensional drawing is a schematic diagram of a floor plan _t3, which is also a two-dimensional drawing of the aforementioned information desk. The file format is .dwg.
[0084] A two-dimensional view of the 3D model is filled with a second color, which is different from the first color. For example, the first color can be blue, and the second color can be pink.
[0085] The target 2D drawing is displayed in the first color on the window interface, the target 2D view is displayed in the second color, and the view of the overlapping portion is displayed in the third color. For example... Figure 4c As shown, this is the target view after overlay rendering. Figure 4a Model 1-1F and Figure 4b The layer _t3 is generated by overlaying the drawn plan view. The overlapping part is the area marked by slashes. In the actual software drawing process, the overlapping part can be displayed using the third color Color3.
[0086] Specifically, the underlying tools for drawing 2D drawings and 3D model views can be implemented using WebGL (Web Graphics Library). WebGL's color blending strategy can be customized. When redrawing the view, the color blending strategy blendFunc(ctx.ONE, ctx.ONE) is used, and the depth test is disabled(ctx.DEPTH_TEST). This results in the following blending effect when redrawing the model view: the element color in the drawing is displayed as Color1, the element color in the model view is displayed as Color2, and the element color in the overlapping part of the drawing and the model is displayed as Color3. In this way, the differences between the target 2D drawing and the target 2D model view can be clearly shown through different color displays, which facilitates finding the differences between the two and the consistency review work.
[0087] The drawing method provided in this embodiment involves the terminal device uploading the 3D model file and 2D drawing file of the building to be reviewed to the server. The server establishes a correspondence between at least one 2D drawing and the 3D model, and determines the grid data for each 2D drawing and the 3D model. These correspondences and grid data are used to align the 2D drawings and 2D views. Based on the user's selection, the selected target 2D drawing and target 2D view are overlaid to generate a drawing view. Finally, the drawing view is displayed on the window interface. Since the 2D drawing, 2D view, and their overlapping parts are displayed in different ways in this drawing view, i.e., the alignment and overlay effect of the 2D drawing and model view are presented, the differences between the drawings and the model can be directly identified, avoiding manual review and comparison. This method saves review time, improves review efficiency, and also improves review accuracy through grid data alignment, automatic recognition, and overlay generation of drawing views.
[0088] It should be noted that the use of different colors to render and overlay two-dimensional drawings and three-dimensional model views in this embodiment is only one display method. Other display methods can also be used, and this embodiment does not limit this.
[0089] As an optional embodiment of the present invention, step 102 above, after the terminal device receives at least one set of alignment data generated by the server, such as Figure 5 As shown, it also includes:
[0090] Step 102-1: Based on the at least one set of alignment data, determine the transformation matrix between the coordinate systems of the two-dimensional drawing and the two-dimensional view in each set of alignment data. Each transformation matrix represents the transformation relationship between the coordinate systems of the two-dimensional drawing and the two-dimensional view in a set of alignment data.
[0091] Each set of alignment data can be obtained by converting the grid data of the two-dimensional drawing and the grid data of the two-dimensional view. The grid data of the two-dimensional drawing is obtained by the server after performing grid recognition on the two-dimensional drawing file in step 101 above. Similarly, the grid data of the two-dimensional view is obtained by the server after parsing the model file.
[0092] Step 102-2: Determine the target alignment data and the target transformation relationship corresponding to the target alignment data based on the user's selection operation in at least one set of alignment data. The target transformation relationship is the transformation relationship between the target two-dimensional drawing and the target two-dimensional view.
[0093] The terminal device determines the target alignment data based on the user's selection. This target alignment data includes the target transformation relationship, namely the coordinate system transformation matrix between the target 2D drawing and the target 2D view.
[0094] Furthermore, the target transformation relationship is a target transformation matrix; the step of overlaying the target 2D drawing and the target 2D view according to the target transformation relationship to generate the drawing view includes: using the target transformation matrix on the target 2D drawing to convert the points in the target 2D view coordinate system into the points in the target 2D drawing coordinate system, so that the target 2D view and the target 2D drawing are overlaid to generate the drawing view.
[0095] For example, if the selected target alignment data is p1(x1,y1), p2(x2,y2), p3(x3,y3), and p4(x4,y4), its code includes:
[0096]
[0097] Determining the target transformation matrix, in one embodiment, includes: determining a scaling matrix, a rotation matrix, and a translation matrix between the target 2D drawing and the target 2D view based on the target alignment data; and generating the target transformation matrix based on the scaling matrix, the rotation matrix, and the translation matrix.
[0098] Specifically, the coordinate transformation matrix between the first and second coordinate systems is obtained based on the target alignment data. The calculation process for obtaining the coordinate transformation matrix between the two coordinate systems is as follows:
[0099] The first step is to calculate the scaling matrix.
[0100] The scaling factor can be calculated as: scale = sqrt((y2-y1)^2+(x2-x1)^2) / sqrt((y4-y3)^2+(x4-x3)^2).
[0101] The scaling matrix A is determined as follows:
[0102]
[0103] The second step is to calculate the rotation matrix based on the scaling matrix.
[0104] The rotation angle is calculated as follows: angle = Math.atan2((x2-x1)*(y3-y4) / scale-(y2-y1)*(x3-x4) / scale,(x2-x1)*(x3-x4) / scale+(y2-y1)*(y3-y4) / scale). Math is an open-source JavaScript library method.
[0105] The rotation matrix B is determined as follows:
[0106]
[0107] The third step is to calculate the translation matrix.
[0108] Calculate the translation distance xD: xD=x3 / scale*Math.cos(-(angle*Math.PI) / 180)-y3 / scale*Math.sin(-(angle*Math.PI) / 180)-x1;
[0109] Calculate the translation distance xD in y-coordinate: yD=y3 / scale*Math.cos(-(angle*Math.PI) / 180)+x3 / scale*Math.sin(-(angle*Math.PI) / 180)-y1
[0110] Based on the above xD and yD, the translation matrix is determined to be C:
[0111]
[0112] Step 4: Matrix merging
[0113] The scaling matrix A, rotation matrix B, and translation matrix C are combined to generate the coordinate transformation matrix D, which is the target transformation matrix. The coordinate transformation matrix D is:
[0114] D = C[BA],
[0115] The specific calculation process is not limited in this embodiment.
[0116] The fifth step is to transform the coordinates in the model view according to the coordinate transformation matrix D, so that the target two-dimensional model view and the target two-dimensional drawing are superimposed to draw the target view.
[0117] As another optional embodiment of the present invention, in step 102 above, the server performs grid identification on the at least one two-dimensional drawing to obtain grid data for each two-dimensional drawing, such as... Figure 6 As shown, it specifically includes:
[0118] Step 201: Disassemble and structure the at least one two-dimensional drawing to generate basic line primitives.
[0119] In addition, the processed data also generates information such as text elements, line types, and styles.
[0120] Step 202: Perform geometric relationship calculations on the basic line primitives to identify the axis lines.
[0121] Step 203: Identify the axis number based on the intersection relationship between the axis and the circle.
[0122] Step 204: Based on the perpendicular and intersecting relationships between the axes, determine the intersection points between the axes to obtain the grid data of the two-dimensional drawing; the grid data of the two-dimensional drawing includes: the axes, the axis numbers, and the intersection points.
[0123] In addition, the grid data also includes dimension annotations, dimension lines, etc.
[0124] Based on the drawing preprocessing on the server, geometric relationship calculations such as intersection and parallelism are performed on basic graphic elements to calculate the parallel connectivity group, identify the axis, and identify the axis number based on the intersection relationship between the axis and the circle; then, based on the perpendicular relationship of the line graphic elements, the vertical dimension line and its surrounding text annotation are identified.
[0125] Optionally, after step 204, the process further includes post-processing the identified 2D drawing. This mainly involves stitching the identified axes together, completing and correcting axis numbers, and providing the intersection points and axis number information for different axes. For example, one implementation of axis number completion is to search for circled text elements in the 2D drawing and determine whether the center of the circle is connected to the endpoint of an axis (extension). If so, the text is identified as an axis number; if not, for example, when the identified axis number is not located at the start or end direction of the axis, the axis number identification of the text is determined to be incorrect. In this case, the axis number completion logic is followed, and completion processing is performed.
[0126] It should be noted that during the post-processing of drawings, the splicing of axes, completion of axis numbers, and error correction are optional steps. Furthermore, step 201 can be executed by the drawing preprocessing module, while steps 202 to 204 are handled by the axis grid core structure recognition module.
[0127] The method provided in this embodiment generates basic line primitives by breaking down and structuring at least one two-dimensional drawing; the axis is identified through the basic line primitives, and the axis number is identified based on the intersection relationship between the axis and the circle; finally, the axis grid data of the two-dimensional drawing is obtained, providing a basis for the alignment data of the two-dimensional view and the drawing.
[0128] This invention also discloses a drawing template drawing device based on grid recognition. The device is equipped with a construction drawing review system and is used to implement the aforementioned... Figure 2 , Figure 5 and Figure 6 For the specific steps shown, please refer to [link / reference]. Figure 7 As shown, the device includes: a transmitting unit 710, a receiving unit 720, a determining unit 730, a marking unit 740, and a display unit 750. Furthermore, the device may include other, more or fewer, structures or units, such as a storage unit, etc., and this embodiment does not impose any limitations on this.
[0129] The sending unit 710 is used to upload the three-dimensional model file and two-dimensional drawing file of the building to be reviewed to the server after the user logs into the construction drawing review system.
[0130] After receiving the data, the server determines the correspondence between at least one two-dimensional drawing and the three-dimensional model based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing.
[0131] The receiving unit 720 is configured to receive at least one set of alignment data generated by the server based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, wherein each set of alignment data is used to determine the conversion relationship between a set of two-dimensional drawings and two-dimensional views.
[0132] The determining unit 730 is configured to, in response to a user's selection operation in at least one set of alignment data, load the target two-dimensional drawing and the target two-dimensional view determined by the target alignment data selected by the user on the window interface, and perform overlay processing on the target two-dimensional drawing and the target two-dimensional view according to the target transformation relationship to generate a drawing view.
[0133] The marking unit 740 is used to mark the target two-dimensional drawing, the target two-dimensional view, and the views of overlapping parts in the drawing view.
[0134] Display unit 750 is used to display the marked target two-dimensional drawing, the target two-dimensional view, and the view of the overlapping part on the window interface.
[0135] Optionally, the device is a front-end device, such as a terminal device or a client.
[0136] In addition, the aforementioned sending unit 710, receiving unit 720, determining unit 730, marking unit 740 and display unit 750 are also used to implement other method steps of the drawing method based on grid recognition in the foregoing embodiments.
[0137] Optionally, in another embodiment, the device can also be a backend device, such as a server, for executing the method steps of the backend device in the foregoing embodiments, thereby aligning and overlaying the drawings and model views, performing a comparison and representation of the differences between the drawings and the model, making the drawn view displayed after the overlay processing clear and easy to understand, intuitively presenting the consistency results of the drawings and the model, improving review efficiency, saving manual review costs, and improving the accuracy of the review.
[0138] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 8As shown, the electronic device may include a processor 110 and a memory 120, wherein the processor 110 and the memory 120 may be connected via a bus or other means. Figure 8 For example, the connection is via a bus. Furthermore, the electronic device also includes at least one interface 130, which can be a communication interface or other interface; this embodiment does not impose any limitations on this.
[0139] The electronic device can be the terminal device in the above embodiments, or it can be a backend device, such as a server.
[0140] The processor 110 can be a central processing unit (CPU). The processor 110 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0141] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the grid-based drawing method in this embodiment of the invention. The processor 110 executes various processor functions and data processing by running the non-transitory software programs, instructions, and modules stored in the memory 120, thereby implementing the grid-based drawing method in the above embodiment.
[0142] The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 110, etc. Furthermore, the memory 120 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 120 may optionally include memory remotely located relative to the processor 110, and these remote memories may be connected to the processor 110 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0143] In addition, at least one interface 130 is used for communication between the electronic device and external devices, such as communication with a server. Optionally, at least one interface 130 can also be used to connect peripheral input / output devices, such as a keyboard or display screen.
[0144] The one or more modules are stored in the memory 120, and when executed by the processor 110, they perform actions such as... Figure 2 , Figure 5 and Figure 6 The diagram shown is a drawing method based on grid recognition.
[0145] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0146] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for drawing a graphic model based on grid line recognition, characterized in that, Applied to a terminal device, the terminal device being equipped with a construction drawing review system, the method includes: When a user logs into the construction drawing review system, they upload the 3D model file and 2D drawing file of the building to be reviewed to the server. The server then determines at least one correspondence between a 2D drawing and a 3D model based on the 3D model file and the 2D drawing file, as well as the grid data of each 2D drawing and each 3D model. Each 3D model corresponds to one or more 2D views, and each 2D view corresponds to one 2D drawing. The server receives at least one set of alignment data generated based on the grid data of each two-dimensional drawing and each three-dimensional model, as well as at least one of the correspondence relationships. Each set of alignment data is used to determine the transformation relationship between a set of two-dimensional drawings and two-dimensional views. In response to a user's selection operation in at least one set of alignment data, the target 2D drawing and target 2D view determined by the target alignment data selected by the user are loaded on the window interface, and the target 2D drawing and target 2D view are overlaid according to the target transformation relationship to generate a drawing view; The target 2D drawing, the target 2D view, and the views of overlapping parts are marked in the drawing view and displayed on the window interface; After receiving at least one set of alignment data generated by the server, the method further includes: Based on the at least one set of alignment data, determine the transformation matrix between the coordinate systems of the two-dimensional drawing and the two-dimensional view in each set of alignment data; The target alignment data is determined based on the user's selection operation in at least one set of alignment data, and the target transformation relationship corresponding to the target alignment data is the transformation relationship between the target two-dimensional drawing and the target two-dimensional view; The target transformation relationship is the target transformation matrix; The step of overlaying the target 2D drawing and the target 2D view according to the target transformation relationship to generate a drawing view includes: The target transformation matrix is used on the target 2D drawing to convert the points in the target 2D view coordinate system into points in the target 2D drawing coordinate system, so that the target 2D view and the target 2D drawing are superimposed to generate the drawing view.
2. The method according to claim 1, characterized in that, Uploading the 3D model file and 2D drawing file of the building to be reviewed to the server includes: Upload the 3D model file to the server; After receiving the data, the server parses the 3D model file to obtain a list of model views, and exports at least one 3D model view file based on the list of model views. The at least one 3D model view file includes the grid data of the 3D model. Upload the two-dimensional drawing file to the server; After receiving the data, the server parses the two-dimensional drawing file to obtain at least one two-dimensional drawing, and performs grid identification on the at least one two-dimensional drawing to obtain grid data for each two-dimensional drawing.
3. The method according to claim 2, characterized in that, Perform grid identification on at least one two-dimensional drawing to obtain grid data for each two-dimensional drawing, including: The at least one two-dimensional drawing is broken down and structured to generate basic line primitives; Perform geometric relationship calculations on the basic line primitives to identify the axis lines; The axis number is identified based on the intersection relationship between the axis and the circle; Based on the perpendicular and intersecting relationships between axes, the intersection points between axes are determined to obtain the grid data of the two-dimensional drawing; the grid data of the two-dimensional drawing includes: the axis, the axis number, and the intersection point.
4. The method according to claim 1, characterized in that, Determining the target transformation matrix includes: Based on the target alignment data, determine the scaling matrix, rotation matrix, and translation matrix between the target 2D drawing and the target 2D view; The target transformation matrix is generated based on the scaling matrix, the rotation matrix, and the translation matrix.
5. The method according to any one of claims 1-4, characterized in that, The following are displayed on the window interface: Fill the elements of the two-dimensional drawing with color, and draw the target two-dimensional drawing using the first color; The two-dimensional view of the three-dimensional model is filled with color, and the target two-dimensional view is drawn using a second color, which is different from the first color; The target two-dimensional drawing is displayed in the first color on the window interface, the target two-dimensional view is displayed in the second color, and the view of the overlapping part is displayed in the third color.
6. A drawing device based on grid line recognition, characterized in that, The device is equipped with a construction drawing review system, and the device includes: The sending unit is used to upload the three-dimensional model file and two-dimensional drawing file of the building to be reviewed to the server after the user logs into the construction drawing review system, so that the server determines at least one correspondence between two-dimensional drawing and three-dimensional model based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing. The receiving unit is configured to receive at least one set of alignment data generated by the server based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, wherein each set of alignment data is used to determine the transformation relationship between a set of two-dimensional drawings and two-dimensional views; The determining unit is used to respond to a user's selection operation in at least one set of alignment data, load the target two-dimensional drawing and target two-dimensional view determined by the target alignment data selected by the user on the window interface, and perform overlay processing on the target two-dimensional drawing and the target two-dimensional view according to the target transformation relationship to generate a drawing view; A marking unit is used to mark the target two-dimensional drawing, the target two-dimensional view, and the views of overlapping parts in the drawing view; The display unit is used to display the marked target two-dimensional drawing, the target two-dimensional view, and the view of the overlapping part on the window interface; The receiving unit is further configured to determine, based on the at least one set of alignment data, a transformation matrix between the coordinate systems of the two-dimensional drawing and the two-dimensional view in each set of alignment data; and to determine, based on the user's selection operation in the at least one set of alignment data, target alignment data and the target transformation relationship corresponding to the target alignment data, wherein the target transformation relationship is the transformation relationship between the target two-dimensional drawing and the target two-dimensional view. The target transformation relationship is a target transformation matrix; the determining unit is further configured to use the target transformation matrix on the target two-dimensional drawing to convert the points in the target two-dimensional view coordinate system into the points in the target two-dimensional drawing coordinate system, so that the target two-dimensional view and the target two-dimensional drawing are superimposed to generate the drawing view.
7. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory is coupled to the processor; The memory stores computer-readable program instructions, which, when executed by the processor, implement the drawing method based on grid recognition as described in any one of claims 1 to 5.
8. A drawing system for creating graphics, characterized in that, The system includes terminal equipment and a server, and the terminal equipment is equipped with a construction drawing review system; After a user logs into the construction drawing review system, the terminal device uploads the three-dimensional model file and two-dimensional drawing file of the building to be reviewed to the server; After receiving the data, the server determines the correspondence between at least one two-dimensional drawing and the three-dimensional model based on the three-dimensional model file and the two-dimensional drawing file, as well as the grid data of each two-dimensional drawing and each three-dimensional model, wherein each three-dimensional model corresponds to one or more two-dimensional views, and each two-dimensional view corresponds to one two-dimensional drawing. The server generates at least one set of alignment data based on the grid data of each of the two-dimensional drawings and each of the three-dimensional models, as well as at least one of the correspondence relationships, and sends the at least one set of alignment data to the terminal device; Each set of alignment data is used to determine the transformation relationship between a set of two-dimensional drawings and two-dimensional views; The terminal device receives the at least one set of alignment data, and determines target alignment data in response to the user's selection operation in the at least one set of alignment data, loads the target two-dimensional drawing and target two-dimensional view determined according to the target alignment data on the window interface, and performs overlay processing on the target two-dimensional drawing and the target two-dimensional view according to the target transformation relationship to generate a drawing view; The target 2D drawing, the target 2D view, and the views of overlapping parts are marked in the drawing view and displayed on the window interface; After receiving at least one set of alignment data generated by the server, the terminal device further includes: Based on the at least one set of alignment data, determine the transformation matrix between the coordinate systems of the two-dimensional drawing and the two-dimensional view in each set of alignment data; The target alignment data is determined based on the user's selection operation in at least one set of alignment data, and the target transformation relationship corresponding to the target alignment data is the transformation relationship between the target two-dimensional drawing and the target two-dimensional view; The target transformation relationship is a target transformation matrix; the step of overlaying the target 2D drawing and the target 2D view according to the target transformation relationship to generate a drawing view includes: The target transformation matrix is used on the target 2D drawing to convert the points in the target 2D view coordinate system into points in the target 2D drawing coordinate system, so that the target 2D view and the target 2D drawing are superimposed to generate the drawing view.
Citation Information
Patent Citations
Axial network generation method, electronic device and storage medium
CN109670469A
Two-dimensional and three-dimensional linkage and superposition display method based on structured BIM model
CN110688692A