A method and system for automatically generating a bill of quantities based on CAD drawing information
By parsing CAD drawings, identifying and processing pipeline system layers and text annotations, and generating a bill of quantities, the problem of low efficiency and error-proneness in manual compilation is solved, realizing automated bill of quantities generation and improving compilation efficiency and accuracy.
Patent Information
- Application Number
- CN202610777145.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-08-25
AI Technical Summary
In existing technologies, the preparation of bills of quantities relies on manual methods, which is inefficient, prone to errors, and inconsistent results due to differences in understanding among different personnel. Existing CAD plugins cannot intelligently associate layers with pipe diameter attributes and have difficulty handling the relationships between scattered annotation text and node detail indexes.
By analyzing CAD drawings, identifying pipeline system layers, extracting graphic elements and geometric parameters, building a topology network, parsing text annotations, logically deducing pipe diameter information, identifying block reference objects, and generating a structured bill of quantities, automated data processing is achieved.
It has achieved automated conversion from CAD drawings to bill of quantities, improving compilation efficiency and accuracy, reducing manpower input, and lowering the error rate.
Smart Images

Figure CN122636291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building information modeling and computer-aided design automation technology, specifically to a method and system for automatically generating a bill of quantities based on CAD drawing information. Background Technology
[0002] In municipal, building water supply and drainage, HVAC, and electrical pipeline projects, the preparation of the bill of quantities relies heavily on the design CAD drawings and is mainly done manually. This requires cost estimators to manually read the pipeline layers in the CAD drawings, measure lengths, count pipe diameter changes, identify the quantity of valves and accessories, and verify the detailed drawings of nodes. However, this process has the following problems: 1) Inefficient, requiring a large amount of manpower and time; 2) Eye strain or complex drawings can easily lead to omissions or errors. 3) Differences in the understanding of annotations and attributes among different personnel lead to inconsistent list results. Furthermore, some existing CAD plugins can only achieve simple line segment length accumulation, and cannot intelligently associate layers with pipe diameter attributes, nor can they handle the annotation text, block attributes, and node detail index relationships scattered in the drawing.
[0003] Therefore, there is an urgent need for a method that can comprehensively analyze the multi-dimensional information of CAD pipeline drawings and automatically generate a bill of quantities that conforms to pricing specifications. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a method and system for automatically generating bills of quantities based on CAD drawing information. This method solves the problems of low efficiency, poor accuracy, and difficulty in associating detailed node information in the existing technology of manually compiling bills of quantities.
[0005] This invention adopts the following technical solution: a method for automatically generating a bill of quantities based on CAD drawing information, comprising the following steps: S1. Obtain the CAD drawing to be processed, and based on the preset layer feature word library, identify the pipeline layer set corresponding to the pipeline system according to the engineering professional classification; S2. Extract various graphic elements and geometric parameters from the corresponding pipeline layer, build a pipeline topology network based on the endpoint connection relationship, and determine the connected pipe segments and branch nodes. S3. Parse the text and dimension annotations in the corresponding pipeline layer, extract the pipe diameter information using regular expressions, and associate the pipe diameter information with the pipeline segment accordingly; for pipeline segments lacking pipe diameter information, logically deduce and complete the information based on the pipe diameter values of adjacent or upstream pipeline segments. S4. Identify the reference objects within the drawing blocks, find the corresponding node details based on the detail drawing index marks, and extract information on various engineering components within the details; S5. Based on the data information extracted in steps S1 to S4, and according to the preset engineering quantity calculation rule library, summarize the engineering quantities and generate a structured engineering quantity list. Finally, output a standardized engineering quantity list report in the format specified by the user.
[0006] Furthermore, in step S1, the CAD drawings to be processed include DWG and DXF formats; the pipeline system includes, but is not limited to, water supply, drainage, and gas supply. Furthermore, in step S2, the graphic elements include straight lines, polylines, arcs, and circles, and the geometric parameters include coordinates, length, and area parameters. Furthermore, the logical derivation in step S3 includes: when a diameter change block is detected, the original pipeline is interrupted at the diameter change position, and the lengths of pipeline segments with different diameters are independently accumulated. This invention also provides a system for automatically generating a bill of quantities based on CAD drawing information, comprising: The drawing parsing module is used to read and parse the CAD drawings to be processed. The layer classification module is used to perform the layer recognition and classification described in step S1. The pipeline extraction and topology construction module is used to perform the pipeline information extraction and topology construction described in step S2. The text and annotation extraction module is used to perform the pipe diameter and attribute extraction described in step S3; The device block and attribute parsing module is used to perform the block reference and large sample parsing described in step S4. The quantity summary and bill of quantities output module is used to perform the quantity summary and document output described in step S5.
[0007] The present invention also provides a computer-readable storage medium storing computer instructions for causing the computer to execute a method for automatically generating a bill of quantities based on CAD drawing information.
[0008] The present invention also provides a computer device, including: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform a method for automatically generating a bill of quantities based on CAD drawing information.
[0009] The beneficial effects of this invention are that it can realize full-chain automation of CAD drawing parsing, component identification, engineering quantity summary, and result output, eliminating the need for cost estimators to manually measure, calculate, and match the bill of quantities. This can effectively reduce the manpower input of enterprise cost estimators, reduce project operating costs, and, through deep information integration, reduce the error rate of bill of quantities preparation from the source, improve the efficiency of cost preparation, and facilitate large-scale promotion and application in the industry. Attached Figure Description
[0010] Figure 1 This is a flowchart of the present invention; Figure 2 This is a structural block diagram of the present invention. Detailed Implementation
[0011] like Figure 1 , Figure 2 As shown, the present invention provides a method for automatically generating a bill of quantities based on CAD drawing information, comprising the following steps: S1. Obtain the CAD drawings (DWG or DXF format) to be processed in the target pipeline project, parse all layer names in the drawings, match them with the preset layer feature word library, and identify the pipeline layer set corresponding to the pipeline system according to the engineering professional classification. For unmatched layers, a user interface can be provided for manual mapping. Pipeline systems include but are not limited to water supply, hot water, drainage, gas, and fire protection. The layer feature word library includes WATER (water supply), GAS (gas), DRAIN (sewage), ELEC (power supply), etc. S2. Traverse the pipeline elements in the identified pipeline layers, extract various graphic elements and geometric parameters, build a pipeline topology network based on the endpoint connection relationship, and determine the connected pipe segments and branch nodes. In step S2, the graphic elements include straight lines, polylines, arcs, and circles, and the geometric parameters include coordinates, length, and area parameters. S3. Parse the text and dimension annotations in the corresponding pipeline layer, extract the pipe diameter information through regular expression rules, and associate the pipe diameter information with the pipeline segment according to the shortest distance between the text insertion point and the pipeline element; for pipeline segments with missing pipe diameter information, that is, a certain pipe segment is not directly associated with the pipe diameter annotation, logically deduce and complete it based on the pipe diameter values of adjacent pipe segments or upstream pipe segments. Furthermore, the logical derivation in step S3 includes: when a diameter change block is detected, the original pipeline is interrupted at the diameter change location, and the lengths of pipeline segments with different diameters are independently accumulated. S4. Identify the reference objects of blocks in the drawing, parse the block name, attribute and insertion point, find the corresponding node detail according to the detail index mark, and extract the information of various engineering components in the detail, that is, extract the detailed components (such as the quantity of bolts, gaskets and flanges) in the detail drawing and include them in the engineering quantity. S5. Based on the data information extracted in steps S1 to S4, and according to the preset engineering quantity calculation rule library (e.g., anti-corrosion area and insulation volume coefficient corresponding to different pipe diameters; valves are measured by "piece"; pipes are measured by "meter" of the corresponding pipe diameter, etc.), the engineering quantity is summarized and a structured engineering quantity list is generated. Finally, the engineering quantity list report conforming to national standards is output in the format specified by the user, and the output is in Excel, XML or CSV file.
[0012] This invention also provides a system for automatically generating a bill of quantities based on CAD drawing information, comprising: The drawing parsing module is used to read and parse the CAD drawings to be processed. The layer classification module is used to perform layer recognition and classification in step S1; The pipeline extraction and topology construction module is used to perform pipeline information extraction and topology construction in step S2; The text and annotation extraction module is used to extract the pipe diameter and attributes in step S3; The device block and attribute parsing module is used to perform block reference and large sample parsing in step S4; The quantity summary and bill of quantities output module is used to perform the quantity summary and document output of step S5.
[0013] The present invention also provides a computer-readable storage medium storing computer instructions for causing a computer to execute a method for automatically generating a bill of quantities based on CAD drawing information.
[0014] The present invention also provides a computer device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform a method for automatically generating a bill of quantities based on CAD drawing information.
[0015] This embodiment uses CAD drawings of a building's water supply, drainage, and fire protection pipelines as the processing object. Specifically: S1. Obtain the drawing: Water supply drawing of an office building.dwg, identify different layer names (such as "PLUMBCOLDWATER", "PLUMBHOTWATER", "FIRESPINKLER", etc.), and match the different pipeline layers to the corresponding "Water Supply Pipeline System", "Hot Water Pipeline System", and "Fire Protection Pipeline System". S2. In the "Water Supply Pipeline System" pipeline layer, a multi-segment pipeline with a length of 35.2 meters is extracted. This pipeline is connected through multiple endpoints to form a water supply main and branch pipe topology. S3. In the "Water Supply Pipeline System" pipeline layer, if the shortest distance between the insertion point of the text "DN50" and the pipeline element is found, then it can be determined that the multi-segment pipeline is associated with a DN50 pipe diameter. At the same time, when a diameter change label or diameter change block is detected, the original pipeline element is automatically broken at the diameter change position, and the length of the pipe segments of different diameters is independently accumulated. For example, if the text "diameter change and label DN32" is found in the multi-segment pipeline, then the multi-segment pipeline is logically broken into two segments at the diameter change text insertion point: segment 1 is DN50 (28.7 meters) and segment 2 is DN32 (6.5 meters). Wherein, DN50 indicates a pipe diameter of 50mm; DN32 indicates a pipe diameter of 32mm; DN50 (28.7 meters) indicates a pipe diameter of 50mm and a length of 28.7 meters; DN32 (6.5 meters) indicates a pipe diameter of 32mm and a length of 6.5 meters; S4. If a block reference object is identified in the "Water Supply Pipeline System" pipeline layer, such as "VALVEGATE100", it will be identified as "DN100 gate valve" and counted as 1. If there is another block "DETAILREF" with the attribute value "Node Detail 3", it will be located in the layer with the drawing name "Node Detail 3" and parsed to contain 4 M20 bolts and 2 flanges. These quantities can then be mapped back to the index position in the "Water Supply Pipeline System" pipeline layer. Finally, the extracted detailed components (such as the number of bolts, gaskets, and flanges) will be included in the project quantity. S5. Based on the preset engineering quantity calculation rule library, summarize the engineering quantities and generate an Excel-formatted bill of quantities report.
[0016] This invention solves the problems of low efficiency, error-proneness, and difficulty in associating detailed node information when manually compiling cost lists from CAD drawings. It realizes the automated conversion from design drawings to cost list data, greatly improving the efficiency and accuracy of engineering cost work.
[0017] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0018] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A method for automatically generating a bill of quantities based on CAD drawing information, characterized in that: Includes the following steps: S1. Obtain the CAD drawing to be processed, and based on the preset layer feature word library, identify the pipeline layer set corresponding to the pipeline system according to the engineering professional classification; S2. Extract various graphic elements and geometric parameters from the corresponding pipeline layer, build a pipeline topology network based on the endpoint connection relationship, and determine the connected pipe segments and branch nodes. S3. Parse the text and dimension annotations in the corresponding pipeline layer, extract the pipe diameter information using regular expressions, and associate the pipe diameter information with the pipeline segment accordingly; for pipeline segments lacking pipe diameter information, logically deduce and complete the information based on the pipe diameter values of adjacent or upstream pipeline segments. S4. Identify the reference objects within the drawing blocks, find the corresponding node details based on the detail drawing index marks, and extract information on various engineering components within the details; S5. Based on the data information extracted in steps S1 to S4, and according to the preset engineering quantity calculation rule library, summarize the engineering quantities and generate a structured engineering quantity list. Finally, output a standardized engineering quantity list report in the format specified by the user.
2. The method for automatically generating a bill of quantities based on CAD drawing information according to claim 1, characterized in that: In step S1, the CAD drawings to be processed include DWG and DXF formats; the pipeline system includes, but is not limited to, water supply, drainage, and gas supply.
3. The method for automatically generating a bill of quantities based on CAD drawing information according to claim 1, characterized in that: In step S2, the graphic elements include straight lines, polylines, arcs, and circles, and the geometric parameters include coordinates, length, and area parameters.
4. The method for automatically generating a bill of quantities based on CAD drawing information according to claim 1, characterized in that: The logical derivation in step S3 includes: when a diameter change block is detected, the original pipeline is interrupted at the diameter change position, and the lengths of pipeline segments with different diameters are independently accumulated.
5. A system for automatically generating a bill of quantities based on CAD drawing information, characterized in that: include: The drawing parsing module is used to read and parse the CAD drawings to be processed. The layer classification module is used to perform the layer recognition and classification described in step S1. The pipeline extraction and topology construction module is used to perform the pipeline information extraction and topology construction described in step S2. The text and annotation extraction module is used to perform the pipe diameter and attribute extraction described in step S3; The device block and attribute parsing module is used to perform the block reference and large sample parsing described in step S4. The quantity summary and bill of quantities output module is used to perform the quantity summary and document output described in step S5.
6. A computer-readable storage medium storing computer instructions for causing the computer to perform a method for automatically generating a bill of quantities based on CAD drawing information as described in any one of claims 1-4.
7. A computer device, comprising: The system includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform a method for automatically generating a bill of quantities based on CAD drawing information as described in any one of claims 1-4.