Drawing system and method of building and structure based on IFC three-dimensional model
Through the graph forming system based on IFC three-dimensional model, the problems of software compatibility, detail processing, drawing update and standardized output in BIM graph forming technology are solved, and efficient and accurate two-dimensional drawing generation and update are achieved.
Patent Information
- Application Number
- CN202411313762.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-09-20
AI Technical Summary
The existing BIM drawing technology has many software compatibility problems, requires more details to be processed and deepened, cannot be updated directly on the original output drawings, and cannot directly implement company standardization regulations.
Provide a graph-forming system based on IFC three-dimensional model, including data reading module, intermediate file generation module, patch cutting and fusion module, graph-forming parameter setting module and graph-forming and output module. Through the coordinated work of these modules, it is automatically carried out. Detail processing and optimization of two-dimensional drawings, and support the update and standardized output of drawings.
It realizes compatibility of a variety of BIM software, automatically optimizes the details of two-dimensional drawings, supports the update of drawings, and can directly implement company standardization regulations, significantly improving the drawing efficiency and accuracy of designers.
Smart Images

Figure CN118821300B_ABST
Abstract
Description
Background Art
[0002] BIM technology has been widely used in the field of architectural design. BIM technology converts architectural design information from two-dimensional to three-dimensional, making the structure, performance, analysis and management of buildings clearer and more intuitive. The entire design, construction and operation process can be carried out in a visual way. However, at the construction site, construction is still carried out according to traditional two-dimensional drawings, and two-dimensional drawings (traditional CAD drawings) with official stamps are still regarded as legally effective, authoritative and binding official documents. In other words, these two-dimensional drawings are legally recognized and used to record, verify and enforce the various regulations and requirements of construction projects. Therefore, how to achieve efficient conversion of BIM models into architectural construction drawings has become an important issue. Currently, all BIM software on the market can support the conversion from three-dimensional models to two-dimensional drawings, but the following problems still exist:
[0003] Compatibility issues of multiple software: There are many different BIM software on the market, and there may be compatibility issues in file formats and data interaction between different software. This leads to the inability to draw a project at the same time if multiple BIM software are used. More details and deepening are needed: The exported two-dimensional drawings need some details and optimization to further improve their readability and accuracy. This optimization includes adding text schematics, dimensioning, adjusting the style and layout of lines and text, etc., to ensure that the exported drawings meet the specifications and requirements. Drawing update issues: After the BIM software outputs the drawings for the first time, if the model is modified again, the drawings need to be regenerated, and it is impossible to update directly on the original output drawings. This method will cause all the deepening work done by the designer on the original output drawings to be invalid and cannot be inherited to the new drawings. Unable to directly implement the company's standardized regulations: Usually, each architectural design company has its own set of standardized regulations for the expression of construction drawings, and BIM software cannot directly output drawings according to standardized expressions. Either software docking is required or the designer redraws them. High technical requirements: BIM software usually requires engineers and designers to have a certain level of computer technology and model operation capabilities. For some practitioners who have rich traditional experience but weak computer application skills, learning and applying BIM software to draw drawings may be difficult.
[0004] Therefore, the existing drawing technology has a variety of software compatibility issues, requires more detailed processing and deepening, cannot be updated directly on the original output drawings, and cannot directly implement the company's standardized regulations. Summary of the invention
[0005] In order to solve the above problems in the prior art, namely, the existing drawing technology has a variety of software compatibility problems, requires more detailed processing and deepening, cannot be directly updated on the original output drawings, and cannot directly implement the company's standardized regulations, the present invention provides a drawing system based on IFC three-dimensional model buildings and structures, the drawing system includes:
[0006] Data reading module, used to read the floor information and component data of the IFC 3D model;
[0007] An intermediate file generation module, used for writing the floor information and the component data into a binary file according to a specified format to obtain a binary intermediate file;
[0008] A facet cutting and fusion module is used to parse the binary intermediate file according to the specified format to obtain the parsed floor information and the parsed component data, and then cut and fuse the component triangle facets in the parsed component data based on a given cutting bounding box to obtain a cutting and fusion result, and save the cutting and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format;
[0009] A drawing parameter setting module, used for setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file;
[0010] The drawing and output module is used to call the cutting program for the configuration file to generate an SVG format file, then parse the SVG format file to obtain the parsed geometric data, clean and adjust the parsed geometric data, and output the cleaned and adjusted geometric data to the CAD drawing.
[0011] In a preferred embodiment, the component data includes component type, component triangular facets, component geometric dimensions, and component index; the component types include walls, beams, stair slabs, doors and windows, columns, windows, holes, and plates.
[0012] In a preferred implementation, the floor information includes floor number, elevation, standard floor number, and floor height.
[0013] In a preferred embodiment, clipping and fusing the component triangle facets in the parsed component data based on a given clipping bounding box specifically includes:
[0014] According to the given clipping bounding box, calculate the triangular facets that cannot be located in the clipping bounding box and remove them;
[0015] Marking triangular facets that may intersect with the clipping bounding box;
[0016] Use OpenGL to render all triangles, and render each triangle with a unique color according to its ID. After rendering, read the color buffer to get all the colors in the plane, get the ID of each triangle according to its color, and remove triangles that are not in the image range.
[0017] Eliminate the common edges of two triangles;
[0018] Intersect the marked triangle face with the clipping bounding box, then clip the part outside the bounding box to get a new polygon, and use the clipper library to simplify the new polygon;
[0019] For the possible intersecting triangle face pairs, clip them once.
[0020] In a preferred embodiment, the method of eliminating the common edge of two triangular facets includes:
[0021] Assign the same group_id to the triangular facets belonging to the same object in the binary intermediate file;
[0022] Calculate the triangle plane equation according to the vertex information of each triangle face, and determine whether two triangle planes are in the same plane based on the triangle plane equation;
[0023] If two triangles are on the same plane and have the same group_id, the clipper library is used to eliminate the common edges of the two triangles.
[0024] In a preferred embodiment, clipping the possibly intersecting triangular facet pairs after classification includes:
[0025] Use the clipper library to get the intersection area of the projection part of the triangle patch;
[0026] Find a point inside the intersection area, calculate the depth value of the point on the two triangles respectively, and determine the occlusion relationship based on the two depth values; and obtain the occluded surface based on the occlusion relationship;
[0027] The clipper library is used to clip away the occlusion relationship of the occluded surface.
[0028] In a preferred embodiment, cleaning and adjusting the parsed geometric data includes:
[0029] The Buffer algorithm of NTS and the DPSimplify algorithm are used to process the self-intersecting and narrow wall contour lines to finally form a straight wall contour line;
[0030] Use the algorithm for obtaining face regions in NTS's Polygonizer to create holes in the wall line;
[0031] For wall holes larger than the threshold, they are expressed with connecting beams, and for wall holes smaller than the threshold, they are displayed with wall hole markers; the wall holes expressed with connecting beams interrupt the wall, specifically, the wall holes in the lower layer interrupt the wall in the lower layer, and the wall holes in the upper layer interrupt the wall in the upper layer;
[0032] Use the wall outline or column outline to cut the beam line; specifically, where the wall outline and the beam line overlap, cut the beam line and keep the wall outline; or where the column outline and the beam line overlap, cut the beam line and keep the column outline;
[0033] Merge beam lines of the same line type;
[0034] For beam lines that are smaller than the set value, if both ends are connected to beam lines and the line types of the two lines are inconsistent with it, they will be merged into a longer line;
[0035] For T-shaped beams, cut off the section of the beam where two perpendicular beams meet;
[0036] In a preferred embodiment, cleaning and adjusting the parsed geometric data includes:
[0037] Add diagonal lines and text to stair treads;
[0038] Adjust the text direction of beam annotation according to beam line;
[0039] Grouping paired beam lines, constructing beam regions based on the paired beam lines, and deleting duplicate annotations in the beam regions; wherein the beam regions are regions between paired beam lines;
[0040] Calculate the original position of the beam marking and record it;
[0041] For beams with the same specifications and different elevations at the same location, double beams are used to express them;
[0042] Mark the beams with elevations in two lines.
[0043] In a preferred embodiment, outputting the cleaned and adjusted geometric data to a CAD drawing includes:
[0044] Print entities corresponding to different types of geometric data on different layers;
[0045] For objects that need to be expressed with fill, use Hatch to express them;
[0046] For beam annotation, use Block Reference;
[0047] Convert doors and windows to specific tiles;
[0048] Mark the door and window numbers, room names, and room area in words;
[0049] Create drawing title text, floor height table and floor fill style table;
[0050] Convert each architectural output view into a block; the types of architectural output views include wall view, column view, door view, window view, hole view, beam view, and slab view.
[0051] In a second aspect of the present invention, a method for drawing a building and a structure based on an IFC three-dimensional model is proposed, and the method comprises:
[0052] Read the floor information and component data of the IFC 3D model;
[0053] Writing the floor information and the component data into a binary file in a specified format to obtain a binary intermediate file;
[0054] Parsing the binary intermediate file according to the specified format and obtaining parsed floor information and parsed component data, then clipping and fusing the component triangles in the parsed component data based on a given clipping bounding box to obtain a clipping and fusion result, and saving the clipping and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format;
[0055] Setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file having the two-dimensional geometric data in the SVG format;
[0056] A cutting program is called for the configuration file to generate an SVG format file, and then the SVG format file is parsed to obtain parsed geometric data, the parsed geometric data is cleaned and adjusted, and the cleaned and adjusted geometric data is output to a CAD drawing.
[0057] Beneficial effects of the present invention:
[0058] (1) Using the internationally accepted IFC format, various BIM software can export IFC models and generate drawings simultaneously. It can automatically process and optimize the details of 2D drawings, further improve their readability and accuracy, and ensure that the exported drawings meet the specifications and requirements.
[0059] (2) It can be updated on the original output drawing, recording the detailed work done by the designer on the original output drawing and inheriting it to the new drawing.
[0060] (3) The operation is simple. Designers only need to upload the IFC model and set simple drawing parameters to draw the drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0062] Figure 1 It is a drawing system of an IFC three-dimensional model building and structure in an embodiment of the present invention;
[0063] Figure 2 It is a schematic diagram of processing a T-shaped beam line in a drawing system based on an IFC three-dimensional model building and structure according to an embodiment of the present invention;
[0064] Figure 3 Schematic diagram of the interface of the IFC three-dimensional model building and structure mapping system of the present invention in an embodiment of the present invention;
[0065] Figure 4 It is a structural plan view obtained by using the IFC three-dimensional model building and structure drawing system of the present invention in an embodiment of the present invention;
[0066] Figure 5 It is a structural diagram of a computer system of a server for implementing the method, system, and device embodiments of the present application. DETAILED DESCRIPTION
[0067] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0068] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0069] The present invention provides a drawing system for buildings and structures based on IFC three-dimensional models, comprising:
[0070] Data reading module, used to read the floor information and component data of the IFC 3D model;
[0071] An intermediate file generation module, used for writing the floor information and the component data into a binary file according to a specified format to obtain a binary intermediate file;
[0072] A facet cutting and fusion module is used to parse the binary intermediate file according to the specified format to obtain the parsed floor information and the parsed component data, and then cut and fuse the component triangle facets in the parsed component data based on a given cutting bounding box to obtain a cutting and fusion result, and save the cutting and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format;
[0073] A drawing parameter setting module, used for setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file;
[0074] The drawing and output module is used to call the cutting program for the configuration file to generate an SVG format file, then parse the SVG format file to obtain the parsed geometric data, clean and adjust the parsed geometric data, and output the cleaned and adjusted geometric data to the CAD drawing.
[0075] In this embodiment, the IFC (Industry Foundation Classes) format is a general data exchange format used in the fields of architecture, engineering and manufacturing. The IFC format is an internationally accepted standard that has been recognized and supported by many countries and organizations. It is a standard public data expression and storage method, and each BIM software can import and export engineering data in this format. This means that any engineering software can use IFC as an intermediary and transfer station for data exchange to complete the barrier-free circulation and linking of data, thereby achieving maximum data sharing, avoiding duplication of work, and reducing social costs. The present invention aims to automatically project the elements in the three-dimensional model through a model in a unified IFC data format, and generate construction drawings that meet the requirements of building specifications according to the expression of two-dimensional construction drawings, so as to achieve standardized and automated generation of building and structural construction drawings, effectively solve the efficiency problem of three-dimensional to two-dimensional drawing in the current construction field, and significantly improve the efficiency and accuracy of designers' drawings.
[0076] In order to more clearly explain the present invention based on IFC three-dimensional model building and structure mapping system, the following is combined with Figure 1 The modules in the embodiments of the present invention are described in detail.
[0077] The first embodiment of the present invention is a system for drawing buildings and structures based on IFC three-dimensional models. The modules are described in detail as follows:
[0078] Data reading module, used to read the floor information and component data of the IFC 3D model;
[0079] In this embodiment, the component data includes component type, component triangular facet, component geometric size, and component index; the component types include wall, beam, stair slab, door and window, column, window, hole, and slab; the floor information includes floor number, elevation, standard floor number, and floor height. Component geometric data acquisition: Use XBIM to create an entity of the IFC component and facet the entity; component attribute data acquisition: traverse the IFC component and extract attributes according to its corresponding type; floor information acquisition: traverse the IFC floor and extract the required information.
[0080] An intermediate file generation module, used for writing the floor information and the component data into a binary file according to a specified format to obtain a binary intermediate file;
[0081] A facet cutting and fusion module is used to parse the binary intermediate file according to the specified format to obtain the parsed floor information and the parsed component data, and then cut and fuse the component triangle facets in the parsed component data based on a given cutting bounding box to obtain a cutting and fusion result, and save the cutting and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format;
[0082] In this embodiment, clipping and fusing the component triangle facets in the parsed component data based on a given clipping bounding box specifically includes:
[0083] According to the given clipping bounding box, calculate the triangles that cannot be located in the clipping bounding box and remove them; mark the triangles that may intersect with the clipping bounding box; use OpenGL to render all the triangles, and render each triangle with a unique color according to the id of the triangle. After the rendering is completed, read the color buffer to obtain all the colors in the plane, and obtain the id of each triangle according to the color of each triangle, and remove the triangles that do not appear in the plane; eliminate the common edges of two triangles; intersect the bounding box with the face of the marked triangle, and then clip the part outside the bounding box to obtain a new polygon, and use the clipper library to simplify the new polygon; perform a clipping operation on the possible intersecting triangle pairs.
[0084] In this embodiment, the method for eliminating the common edges of two triangular facets includes: assigning the same group_id to the triangular facets belonging to the same object in the binary intermediate file; calculating the triangle plane equation according to the vertex information of each triangle facet, and judging whether the two triangle planes are in the same plane based on the triangle plane equation; if the two triangle facets are on the same plane and have the same group_id, using the clipper library to eliminate the common edges of the two triangle facets.
[0085] In this embodiment, clipping is performed on the triangular facet pairs that may intersect after classification, including: using the clipper library to obtain the intersection area of the projected parts of the triangular facets; finding a point inside the intersection area, calculating the depth value of the point on the two triangular facets respectively, and judging the occlusion relationship based on the two depth values; obtaining the occluded surface based on the occlusion relationship; and using the clipper library to clip off the occlusion relationship of the occluded surface.
[0086] A drawing parameter setting module, used for setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file;
[0087] In this embodiment, on the UI interface, the business parameters of the drawing are set, such as drawing type, generation by floor, etc.
[0088] Write parameters into the configuration file, such as intermediate file path, SVG save path, image type, image cutting direction, etc., for the image cutting program to call.
[0089] The drawing and output module is used to call the cutting program for the configuration file to generate an SVG format file, then parse the SVG format file to obtain the parsed geometric data, clean and adjust the parsed geometric data, and output the cleaned and adjusted geometric data to the CAD drawing.
[0090] In this implementation, the processed geometric entities are exported to CAD drawings. According to the business requirements of architecture and structure, the construction drawings are automatically deepened, textual representations, dimensioning, and the style and layout of lines and text are adjusted to form various types of construction drawings, including floor plans, elevations, sections, wall details, apartment details, staircase details, etc. Ensure that the exported drawings meet the specifications and requirements.
[0091] Cleaning and adjusting the parsed geometric data includes:
[0092] The Buffer algorithm and DPSimplify algorithm of NTS are used to process the self-intersecting and narrow wall contour lines to finally form a straight wall contour line; specifically, after the intersection and difference calculation of the surface, some contours will have sharp corners. For such contours, the Buffer algorithm of NTS is used to process them, first buffering a certain value inward, and then buffering a certain value outward, which can remove such sharp corners. Some edges of the surface have self-intersections or very small polylines. The DPSimplify algorithm of NTS is used to process them, and the processed edges form a straight line. The algorithm for obtaining the face domain in the Polygonizer of NTS is used to create holes in the wall line; according to the drawing parameters, for wall holes larger than the threshold, they are expressed with connecting beams, and for wall holes smaller than the threshold, they are displayed with wall hole markers; the wall holes expressed with connecting beams are used to interrupt the wall, specifically, the wall holes in the lower layer interrupt the wall in the lower layer, and the wall holes in the upper layer interrupt the wall in the upper layer.
[0093] Use the wall outline or column outline to clip the beam line; specifically, where the wall outline and the beam line overlap, clip the beam line and keep the wall outline; or where the column outline and the beam line overlap, clip the beam line and keep the column outline; merge beam lines of the same line type; specifically, read all beam line, wall, column and other data from the svg file, and use the SpatialIndex algorithm of NTS to create an index for the beam line. Traverse the wall and column outlines, pass the outlines into the index of the beam line, and get the beam line that intersects with the outline or is inside the outline, and then use the Clip algorithm of NTS to clip it.
[0094] For beam lines that are smaller than the set value, if both ends are connected to beam lines and the line types of the two lines are inconsistent with it, they will be merged into a longer line; Figure 2 As shown, for a T-shaped beam line, cut off the section of the beam line where two perpendicular beam lines intersect.
[0095] In this embodiment, cleaning and adjusting the parsed geometric data includes: adding diagonal lines and text to the stair treads; adjusting the text direction of the beam annotation according to the beam line; grouping the paired beam lines, constructing the beam area based on the paired beam lines, and deleting the repeated annotations in the beam area; wherein the beam area is the area between the paired beam lines; specifically, reading all the beam lines and beam annotations from the svg file, traversing each beam annotation, finding the beam lines on both sides of it through the beam annotation, and then using the NTS algorithm to calculate the OBB to obtain a single beam area. After the traversal is completed, all the beam areas can be calculated.
[0096] Calculate the original position of the beam marking and record it; for beam markings at the same position with the same specifications but different elevations, express them with double beams; express the beam markings with elevations in two lines.
[0097] In this embodiment, outputting the cleaned and adjusted geometric data to the CAD drawing includes: printing entities corresponding to different types of geometric data on different layers; expressing objects that need to be expressed by filling with Hatch; expressing beam annotations with Block Reference; converting doors and windows into specific blocks; annotating door and window numbers, room names, and room area text; creating drawing title text, floor height tables, and floor fill style tables; converting each building output view into a block, wherein the types of building output views include wall views, column views, door views, window views, hole views, beam views, and plate views.
[0098] The present invention can also update drawings according to the IFC 3D model after output. Specifically, if the user moves the beam annotation, room name, area text, etc. on the drawing, the subsequent drawing must retain the user's edited content. The text content is compared with the original position of the record. If they are consistent, the previously generated beam annotation is retained; the scope of this update is calculated, and the objects within this scope are replaced with the latest drawing data in the model.
[0099] This embodiment provides an optional environment for using the system of the present invention, specifically: the hardware environment for development is: CPUIntel(R) Core(TM) i5-8500 CPU @ 3.00GHz; RAM is: 8.0GB; the hardware environment for operation is: CPUIntel(R) Core(TM) i5-6500 CPU @ 3.20GHz 3.19 GHz; RAM is 8.0GB; the operating system for developing the software is: Windows 10 Professional Edition; the software development environment / development tool is: Visual Studio 2022; the software operating platform / operating system is: Windows 10; the software operating support environment / support software is: CAD2016 / CAD2018; the programming language is: C#, C / C++, WPF.
[0100] In practical applications, such as Figure 3 As shown, open the IFC file on the viewer side, click the drawing button on the CAD side, and the drawing configuration panel will pop up. Click OK to generate an intermediate file in the background, which will be parsed into an SVG file by the drawing software, and then the corresponding drawing will be generated on the CAD side.
[0101] like Figure 4 As shown, it is a structural plan view obtained by using the above optional environment and the IFC three-dimensional model building and structure drawing system of the present invention in the embodiment of the present invention.
[0102] It should be noted that the mapping system based on IFC three-dimensional model buildings and structures provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiment can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not regarded as improper limitations on the present invention.
[0103] A second embodiment of the present invention provides a method for drawing a building and a structure based on an IFC three-dimensional model, the method comprising:
[0104] Read the floor information and component data of the IFC 3D model;
[0105] Writing the floor information and the component data into a binary file in a specified format to obtain a binary intermediate file;
[0106] Parsing the binary intermediate file according to the specified format to obtain parsed floor information and parsed component data, then clipping and fusing the component triangles in the parsed component data based on a given clipping bounding box to obtain a clipping and fusion result, and saving the clipping and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format;
[0107] Setting drawing parameters based on the two-dimensional geometric data in SVG format, and writing the drawing parameters into a configuration file having the two-dimensional geometric data in SVG format;
[0108] A program is called for the configuration file to generate an SVG format file, and then the SVG format file is parsed, the geometric data obtained after the parsing is cleaned and adjusted, and the cleaned and adjusted geometric data is output to a CAD drawing.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0110] Although the various steps in the above embodiment are described in the above-mentioned order, those skilled in the art can understand that in order to achieve the effect of this embodiment, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple changes are within the scope of protection of the present invention.
[0111] An electronic device according to the third embodiment of the present invention comprises: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned method for drawing buildings and structures based on IFC three-dimensional models.
[0112] A fourth embodiment of the present invention is a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the computer to implement the above-mentioned method for drawing buildings and structures based on IFC three-dimensional models.
[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the electronic device and storage medium described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0114] Those skilled in the art should be able to appreciate that the modules and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0115] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system of a server for implementing the method, system, and device embodiments of the present application. Figure 5 The server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0116] like Figure 5As shown, the computer system includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603. Various programs and data required for system operation are also stored in the RAM 603. The CPU 601, ROM 602 and RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0117] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0118] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0119] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0121] The terms "first", "second", etc. are used to distinguish similar objects rather than to describe or indicate a particular order or sequence.
[0122] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus / device.
[0123] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A drawing system for buildings and structures based on IFC three-dimensional models, characterized in that: The mapping system comprises: Data reading module, used to read the floor information and component data of the IFC 3D model; An intermediate file generation module, used for writing the floor information and the component data into a binary file according to a specified format to obtain a binary intermediate file; A facet cutting and fusion module is used to parse the binary intermediate file according to the specified format to obtain the parsed floor information and the parsed component data, and then cut and fuse the component triangle facets in the parsed component data based on a given cutting bounding box to obtain a cutting and fusion result, and save the cutting and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format; A drawing parameter setting module, used for setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file; A drawing and output module, for calling a cutting program for the configuration file to generate an SVG format file, then parsing the SVG format file to obtain parsed geometric data, cleaning and adjusting the parsed geometric data, and outputting the cleaned and adjusted geometric data to a CAD drawing; Cleaning and adjusting the parsed geometric data includes: The Buffer algorithm of NTS and the DPSimplify algorithm are used to process the self-intersecting and narrow wall contour lines to finally form a straight wall contour line; Use the algorithm for obtaining face regions in NTS's Polygonizer to create holes in the wall line; For wall holes larger than the threshold, they are expressed with connecting beams, and for wall holes smaller than the threshold, they are displayed with wall hole markers; the wall holes expressed with connecting beams interrupt the wall, specifically, the wall holes in the lower layer interrupt the wall in the lower layer, and the wall holes in the upper layer interrupt the wall in the upper layer; Use the wall outline or column outline to cut the beam line; specifically, where the wall outline and the beam line overlap, cut the beam line and keep the wall outline; or where the column outline and the beam line overlap, cut the beam line and keep the column outline; Merge beam lines of the same line type; For beam lines that are smaller than the set value, if both ends are connected to beam lines and the line types of the two lines are inconsistent with it, they will be merged into a longer line; For T-shaped beam lines, cut off the beam line where two perpendicular beam lines intersect.
2. The IFC 3D model building and structure mapping system according to claim 1, characterized in that: The component data includes component type, component triangular facet, component geometric size, and component index; the component types include wall, beam, stair slab, door and window, column, window, hole, and plate.
3. The IFC 3D model building and structure mapping system according to claim 2, characterized in that: The floor information includes floor number, elevation, standard floor number, and floor height.
4. The IFC 3D model building and structure mapping system according to claim 3, characterized in that: The step of clipping and fusing the component triangle facets in the parsed component data based on a given clipping bounding box specifically includes: According to the given clipping bounding box, calculate the triangular facets that cannot be located in the clipping bounding box and remove them; Marking triangular facets that may intersect with the clipping bounding box; Use OpenGL to render all triangles, and render each triangle with a unique color according to its ID. After rendering, read the color buffer to get all the colors in the plane, get the ID of each triangle according to its color, and remove triangles that are not in the image range. Eliminate the common edges of two triangles; Intersect the marked triangle face with the clipping bounding box, then clip the part outside the bounding box to get a new polygon, and use the clipper library to simplify the new polygon; For the possible intersecting triangle face pairs, clip them once.
5. The IFC 3D model building and structure mapping system according to claim 4, characterized in that: Methods for eliminating the common edges of two triangles include: Assign the same group_id to the triangular facets belonging to the same object in the binary intermediate file; Calculate the plane equation of the triangle according to the vertex information of each triangular face, and determine whether two triangular planes are in the same plane based on the plane equation of the triangle; If two triangles are on the same plane and have the same group_id, the clipper library is used to eliminate the common edges of the two triangles.
6. The IFC 3D model building and structure mapping system according to claim 4, characterized in that: For possible intersecting triangle face pairs, a clipping includes: Use the clipper library to get the intersection area of the projection part of the triangle patch; Find a point inside the intersection area, calculate the depth value of the point on the two triangles respectively, and determine the occlusion relationship based on the two depth values; and obtain the occluded surface based on the occlusion relationship; The clipper library is used to clip away the occlusion relationship of the occluded surface.
7. The IFC 3D model building and structure mapping system according to claim 6, characterized in that: Cleaning and adjusting the parsed geometric data includes: Add diagonal lines and text to stair treads; Adjust the text direction of beam annotation according to beam line; Grouping paired beam lines, constructing beam regions based on the paired beam lines, and deleting duplicate annotations in the beam regions; wherein the beam regions are regions between paired beam lines; Calculate the original position of the beam marking and record it; For beams with the same specifications and different elevations at the same location, double beams are used to express them; Mark the beams with elevations in two lines.
8. The IFC 3D model building and structure mapping system according to claim 7, characterized in that: Exporting cleaned and adjusted geometry data to CAD drawings includes: Print entities corresponding to different types of geometric data on different layers; For objects that need to be expressed with fill, use Hatch to express them; For beam annotation, use Block Reference; Convert doors and windows to specific tiles; Mark the door and window numbers, room names, and room area in words; Create drawing title text, floor height table and floor fill style table; Convert each architectural output view into a block; the types of architectural output views include wall view, column view, door view, window view, hole view, beam view, and slab view.
9. A method for drawing buildings and structures based on IFC three-dimensional models, characterized in that: The mapping method comprises: Read the floor information and component data of the IFC 3D model; Writing the floor information and the component data into a binary file in a specified format to obtain a binary intermediate file; Parsing the binary intermediate file according to the specified format and obtaining parsed floor information and parsed component data, then clipping and fusing the component triangles in the parsed component data based on a given clipping bounding box to obtain a clipping and fusion result, and saving the clipping and fusion result, the parsed floor information, and the parsed component data in SVG format to obtain two-dimensional geometric data in SVG format; Setting drawing parameters based on the two-dimensional geometric data in the SVG format, and writing the two-dimensional geometric data in the SVG format and the drawing parameters into a configuration file having the two-dimensional geometric data in the SVG format; Invoke a cutting program for the configuration file to generate an SVG format file, then parse the SVG format file to obtain parsed geometric data, clean and adjust the parsed geometric data, and output the cleaned and adjusted geometric data to a CAD drawing; Cleaning and adjusting the parsed geometric data includes: The Buffer algorithm of NTS and the DPSimplify algorithm are used to process the self-intersecting and narrow wall contour lines to finally form a straight wall contour line; Use the algorithm for obtaining face regions in NTS's Polygonizer to create holes in the wall line; For wall holes larger than the threshold, they are expressed with connecting beams, and for wall holes smaller than the threshold, they are displayed with wall hole markers; the wall holes expressed with connecting beams interrupt the wall, specifically, the wall holes in the lower layer interrupt the wall in the lower layer, and the wall holes in the upper layer interrupt the wall in the upper layer; Use the wall outline or column outline to cut the beam line; specifically, where the wall outline and the beam line overlap, cut the beam line and keep the wall outline; or where the column outline and the beam line overlap, cut the beam line and keep the column outline; Merge beam lines of the same line type; For beam lines that are smaller than the set value, if both ends are connected to beam lines and the line types of the two lines are inconsistent with it, they will be merged into a longer line; For T-shaped beam lines, cut off the beam line where two perpendicular beam lines intersect.
Citation Information
Patent Citations
A dynamic loading method of a BIM model based on a graph database
CN108984186A
Super-large-resolution projection mapping method, system and equipment based on GPU (Graphics Processing Unit) acceleration
CN117635412A
Drawing generation method and device, equipment and storage medium
CN118114332A