Intelligent extraction method and system for CAD drawing multi-format BOM
By employing cross-space full-volume lossless parsing and five-level progressive recognition, combined with an external JSON configuration file, the problems of low efficiency, poor accuracy, and software dependence in CAD drawing BOM extraction are solved, achieving efficient and accurate BOM data extraction and digital management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING LETSTECH CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies for extracting BOMs from CAD drawings suffer from problems such as low efficiency due to manual transcription, high error rate, heavy software dependence, poor format compatibility, and omissions in multiple spaces. They cannot meet the requirements of full format compatibility, offline lightweight design, configurable rules, and full coverage across spaces.
The method employs cross-space full lossless parsing, five-level progressive intelligent recognition, and external rule configuration. By parsing the underlying entity information of the drawings across spaces and dynamically loading recognition rules in an external JSON configuration file, standard Excel format BOM data is generated.
It achieves efficient and accurate BOM data extraction, with a single drawing extraction time of ≤10 seconds, and the error rate reduced to below 0.5%. It supports offline use on confidential intranets, has strong adaptability, full coverage across spaces, outputs standard BOM data, and supports the digital transformation of enterprise production management.
Smart Images

Figure CN122135393A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CAD drawing data processing technology, and in particular to an intelligent extraction method and system for multi-format BOMs of CAD drawings. Background Technology
[0002] In industries such as equipment manufacturing and valve production, CAD drawings are widely used in product design, manufacturing, and procurement management. The Bill of Materials (BOM) in these drawings is the core basis for extracting part names, drawing numbers, specifications, materials, and quantities. Currently, companies generally have the following technical deficiencies in the BOM extraction process: Manual transcription is inefficient and has a high error rate: relying on manual line-by-line entry is time-consuming and prone to errors, which directly affects the accuracy of production scheduling and procurement. Severe software dependency and limited deployment: Existing tools require the installation of commercial software such as CAD and Office, and cannot be used on the factory intranet, classified computers, or unauthorized terminals; Poor format compatibility: It only supports native tables or standard attribute blocks and cannot adapt to hand-drawn wireframe fake tables, plain text with scattered layouts, or old non-standard drawings; Fixed rules and high adaptation costs: Keyword, layout error tolerance and other parameters are hard-coded into the code, making it impossible to quickly adapt to the enterprise's non-standard terminology and drawing habits; Multiple spatial data omissions and the need for manual secondary verification: Only the model space is identified, and the layout space BOM is easily missed. Cross-space data cannot be automatically deduplicated and merged.
[0003] The aforementioned problems have persisted for a long time. Existing technologies cannot simultaneously meet the industrial-grade requirements of full format compatibility, offline lightweight design, configurable rules, cross-space full coverage, and high accuracy. There is an urgent need for a smart BOM extraction solution that is adapted to the actual scenarios of manufacturing enterprises. Summary of the Invention
[0004] Technical Objective: To address the shortcomings of existing technologies, such as heavy software dependency, poor format compatibility, multiple spatial omissions, low fault tolerance, and cumbersome deployment, this invention discloses an intelligent extraction method and system for multi-format BOMs of CAD drawings. It achieves cross-space full lossless parsing, five-level progressive intelligent recognition, flexible configuration of external rules, and dependency-free offline export, fundamentally solving the problem of BOM extraction for CAD drawings in manufacturing enterprises.
[0005] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.
[0006] A method for intelligent extraction of multi-format BOMs from CAD drawings includes the following steps: Step S1: Cross-space full lossless analysis; Perform cross-space full lossless analysis of the drawing in both model space and all layout space to directly read the underlying entity information of the drawing; Entity information includes text, lines, blocks, attributes, and table entities; Step S2: Dynamically load external recognition rules; load external JSON configuration file, and dynamically read header keywords and geometric fault tolerance parameters; Step S3: Execute a five-level progressive BOM priority identification strategy, identifying BOMs from standard to non-standard levels. Once the previous level is successfully identified, the next level is terminated, and the BOM data is obtained. Step S4: Clean the BOM data; Step S5: Independently construct the document structure for the cleaned BOM data according to the Office Open XML standard, and generate a standard Excel format bill of materials in an environment without CAD or Office software dependencies.
[0007] This invention also discloses an intelligent extraction system for multi-format BOMs of CAD drawings, comprising: UI interaction layer: used for drawing upload, recognition log display and result export; Business scheduling and configuration layer: includes configuration management module, which is used to dynamically load external recognition rules; load external JSON configuration files, dynamically read table header keywords and geometric fault tolerance parameters; configuration module loads external JSON rules, flexibly configures keywords and fault tolerance parameters; CAD Parsing and BOM Recognition Layer: Includes a CAD parsing module and a BOM recognition module; the CAD parsing module is used for cross-space full lossless parsing; it performs cross-space full lossless parsing of drawings in both model space and all layout space, directly reading the underlying entity information of the drawings; entity information includes text, lines, blocks, attributes, and table entities; the CAD parsing module directly parses the DWG / DXF underlying files, realizing dual-space full lossless parsing, entity extraction, and interference filtering; the BOM recognition module is used to execute a five-level progressive BOM priority recognition strategy, recognizing BOM data level by level from standard to non-standard, terminating the next level upon successful recognition of the previous level, thus obtaining the BOM data; The underlying support layer includes a data processing module and an export module. The data processing module is used to clean the BOM data, including deduplication, merging, and normalization. The export module is used to independently build a document structure for the cleaned BOM data in accordance with the OfficeOpen XML standard, generating a standard Excel format bill of materials in an environment without CAD or Office software dependencies.
[0008] Beneficial effects: 1. Significantly improved efficiency: Extraction of a single drawing takes ≤10 seconds, and batch processing efficiency is improved by more than 80%; 2. High recognition accuracy: Error rate reduced to below 0.5%, drawing compatibility rate ≥95%; 3. Convenient and secure deployment: No installation required, no software dependencies, supports offline use on confidential intranets; 4. High adaptability: External rule configuration allows for quick adaptation to non-standard drawings and enterprise terminology; 5. Full coverage across spaces: Automatic analysis of both model and layout spaces eliminates missed data collection; 6. High digital value: Outputs standard BOM data to support the digital transformation of enterprise production management. Attached Figure Description
[0009] Figure 1 This is a system architecture diagram of an embodiment of the present invention; Figure 2 This is a flowchart of a method according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the five-level progressive BOM subdivision identification principle of an embodiment of the present invention; Figure 4 This is an offline deployment and application topology diagram of an embodiment of the present invention. Detailed Implementation
[0010] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0011] Example: This example describes an intelligent extraction method and system for multi-format BOMs from CAD drawings. This method and system can automatically identify multi-format bills of materials (BOMs) in model space and layout space, and output standardized Excel files. It is applicable to the digital organization of drawings and production data management in manufacturing industries such as valves, machinery, and molds.
[0012] As attached Figure 2 As shown in this embodiment, a method for intelligent extraction of multi-format BOMs from CAD drawings includes the following steps: Step S1: Cross-space full lossless analysis; Perform cross-space full lossless analysis of DWG / DXF format drawings in model space and all layout space, directly read the underlying entity information of the drawings, extract text, lines, blocks, attributes and table entities, and filter out interference elements according to preset parameters; In this embodiment, the underlying data structure of the DWG / DXF file is read directly, and the lines, text, blocks, attributes, and table entities of the model space and the entire layout space are extracted simultaneously. They are then filtered according to preset parameters, such as threshold filtering of interfering elements and structured caching.
[0013] Step S1 involves full, lossless parsing across space, including: synchronously traversing the model space and all layout spaces to fully preserve the original coordinates, geometric attributes, and structural information of the entities; and filtering out interfering elements such as fragmented text, annotation lines, center lines, and section lines through text height thresholds, effective line segment lengths, and layer blacklists.
[0014] Step S2: Dynamically load external recognition rules; load external JSON configuration files, dynamically read header keywords and geometric fault tolerance parameters, and ensure that the recognition rules are not fixed in the code; The external JSON configuration file mentioned in step S2 includes: Keyword library for table header, Y-axis tolerance for text in the same row, X-axis spacing for column separators, tolerance for intersections of horizontal and vertical lines, minimum length of valid line segments, positioning range of attribute blocks, and rules for deduplication and merging of multiple spaces.
[0015] Step S3: Execute a five-level progressive BOM priority identification strategy, identifying BOMs from standard to non-standard levels. Once the previous level is successfully identified, the next level is terminated, and the BOM data is obtained. As attached Figure 3 As shown, the five-level progressive BOM identification strategy in step S3 includes: Level 1: Identify the native CAD table BOM in model space; Level 2: Identify BOMs with attribute tiles in the model space; Level 1 and Level 2 BOM identification are for standard BOM formats, which can be achieved using existing technologies and will not be elaborated here.
[0016] Level 3: Identify the BOM of hand-drawn wireframe fake tables in model space, reconstruct the mesh using the intersection points of horizontal and vertical lines with tolerance, and determine the text's ownership by placing the text's center point on the grid; the identification of hand-drawn wireframe fake tables includes: Valid straight lines are selected, and the distance between horizontal and vertical line segments is calculated. Lines with a distance less than a preset threshold are considered valid intersections to generate a cell grid. Text is assigned based on its center point falling within the cell area. The specific process is as follows: First, valid straight lines are filtered out, i.e., short, broken lines and invalid lines are filtered out using a threshold. In this embodiment, the filtering criterion is based on the minimum length threshold of valid line segments configured in the external JSON configuration file in step S2. Short, broken lines with a length less than this threshold, non-table-related annotation lines, center lines, and other invalid lines are removed, leaving only straight lines that may constitute a hand-drawn table. Then, the filtered valid straight lines are classified by direction. The direction of the line is determined by calculating its slope. Lines with an absolute slope value less than a preset angle threshold (adjustable via external JSON configuration, default 3°) are classified as horizontal lines, and lines with an absolute slope value greater than a preset angle threshold (default 87°) are classified as vertical lines. This achieves accurate classification of horizontal and vertical lines, avoiding interference from tilted lines in the table grid construction. Next, the horizontal and vertical line intersection fault-tolerant grid reconstruction operation is performed. This operation is the core of hand-drawn wireframe fake table recognition. The detailed process is as follows: ① Traverse all horizontal and vertical line segments, construct horizontal and vertical line pairings, and calculate the shortest distance between each horizontal and vertical line segment. This distance is the vertical distance from any point on the horizontal line segment to the vertical line segment. The calculation process retains the same coordinate precision as the CAD drawing and has no rounding error. ② Call the fault tolerance threshold for the intersection of horizontal and vertical lines configured in the external JSON configuration file in step S2, compare the calculated shortest distance with the fault tolerance threshold, and if the shortest distance is less than or equal to the fault tolerance threshold, the horizontal line segment and the vertical line segment are determined to be "valid intersection", which is regarded as a line in the hand-drawn table that should have intersected but did not completely intersect due to drawing deviation (such as broken line, small gap, drawing offset); ③ For horizontal and vertical lines that are determined to be validly intersecting, the theoretical intersection point coordinates are automatically calculated and completed. The theoretical intersection point coordinates are the intersection of the vertical bisector of the horizontal line segment and the horizontal bisector of the vertical line segment, ensuring that the position of the intersection point conforms to the reasonable layout of the table grid. ④ Organize all valid intersecting horizontal and vertical lines and their theoretical intersection points, sort them according to the Y coordinate of the horizontal line segment and the X coordinate of the vertical line segment, construct a complete and closed cell grid, and clarify the area of each cell, including the coordinates of the upper left corner (X1,Y1) and the lower right corner (X2,Y2), so as to completely solve the problem of grid construction failure caused by non-standard defects such as broken, unclosed, and small gaps in hand-drawn table lines.
[0017] After the horizontal and vertical line intersection point fault-tolerant grid reconstruction operation is completed, the text center point placement determination is performed to determine if the text center falls on a specific cell, thus obtaining the BOM of the hand-drawn wireframe mock table; the specific determination steps are as follows: ① Extract all text entities within the hand-drawn wireframe fake table area, in TEXT or MTEXT format, obtain the minimum bounding box of each character, and read the coordinates of the top left corner (Xmin, Ymin) and bottom right corner (Xmax, Ymax) of the bounding box. ② Calculate the coordinates (Xc, Yc) of the geometric center point of each character using the formula, where Xc=(Xmin+Xmax) / 2 and Yc=(Ymin+Ymax) / 2. The coordinate calculation retains the same precision as the CAD drawing, with no rounding error. ③ Iterate through all the constructed cells and match the center point (Xc, Yc) of each text. If X1≤Xc≤X2 and Y1≤Yc≤Y2, then the text belongs to that cell. If the center point falls on the cell boundary line, it belongs to the adjacent left / bottom cell by default. This rule can be flexibly adjusted through external JSON configuration. ④ If the center point of the text does not fall within any cell, it is determined to be invalid text that is not related to the BOM and is included in the interference element filter; after completing the judgment of the placement of all text, the table structure of the hand-drawn wireframe fake table is reconstructed by sorting by rows and columns to obtain the BOM of the hand-drawn wireframe fake table.
[0018] Level 4: Identifying plain text-based scattered BOMs in the model space; in this process, non-BOM-related text and irrelevant encoding interference are first filtered out, then the text is clustered into rows based on the Y-coordinate of the text center point and combined with the Y-axis error tolerance threshold, and columns are divided by the X-coordinate and column spacing threshold. The meaning of fields is determined by matching header keywords, and after data verification and completion, structured BOM data is formed; the specific process is as follows: First, plain text area filtering and interference filtering are performed to extract all text entities after cross-space parsing. Combined with the text height threshold and effective character length configured in the external JSON, non-BOM related text such as fragmented text, annotations, and drawing notes are filtered out, while text entities containing features related to the core fields of BOM (drawing number, part name, specifications, material, quantity) are retained. At the same time, irrelevant encoding interference such as Unicode signatures is excluded to ensure the validity of the text to be identified. Subsequently, coordinate clustering and row / column splitting are performed. The hierarchical clustering idea is adopted, with the geometric center point Y coordinate of the text entity as the core clustering basis. Combined with the externally configured Y-axis error tolerance threshold for text in the same row, text with Y coordinate difference less than the threshold is grouped into the same row, realizing the row splitting and clustering of scattered text. The row splitting process follows the natural reading order and ensures that the row order is consistent with the drawing layout logic. After the lines are split, for the text entities in each line, the X coordinate is used as the sorting basis. Combined with the column separation X-axis spacing threshold, the text with an X coordinate difference greater than the threshold is divided into different columns to complete the column division and sorting. At the same time, the column boundary determination is optimized through the coordinate clustering algorithm to avoid column division errors caused by text offset. Next, the header location and field matching are performed. The text content of all rows is traversed and matched against the header keyword library configured in the external JSON, such as "drawing number", "name", "specification", "material", "quantity", etc. The header row is located, and the meaning of the corresponding BOM fields in each column is determined. If the complete header is not directly matched, fuzzy matching is performed through field features (such as the coding rules of the drawing number and the numerical features of the quantity) to ensure that the fields correspond accurately. Finally, data verification and completion are performed, removing invalid data such as null values and garbled characters, and reasonably completing missing field content, such as filling in "1" for quantity and "unmarked" for material by default. At the same time, through text structuring processing, the text in each row and column is mapped to the corresponding BOM field to form structured BOM table data, completing the recognition of plain text scattered BOM. This invention adopts a two-stage paradigm of "parse the structure first and then parse the content". First, the text layout structure is determined by coordinate clustering, and then the content is recognized and matched, which greatly improves the accuracy and efficiency of scattered text BOM recognition.
[0019] Level 5: When there are no results in the model space, the first to fourth level recognition methods are automatically applied to the entire layout space, and the data is summarized to obtain the BOM extraction results.
[0020] In step S3, the BOM recognition stage performs a five-level progressive recognition, which is performed in the following order: native table → attribute block → hand-drawn wireframe fake table → plain text scattered BOM → cross-layout bottom-up scan. The next level is terminated when the previous level is successfully recognized, to ensure recognition efficiency and coverage. Step S4: Clean the BOM data by deduplication, merging, quantity accumulation, character removal, and industry specification normalization. The data cleaning in step S4 includes: The document is deduplicated based on the "drawing number + name" combination; the quantity of the same material across different spaces is automatically accumulated; spaces, line breaks, and invalid symbols are removed; and the format for describing DN / PN, material, and specifications in the valve industry is standardized. In this embodiment, the document structure is independently built according to the Office Open XML standard to generate a standard xlsx file, requiring no office software support.
[0021] Step S5: Independently construct the document structure for the cleaned BOM data according to the Office Open XML standard, and generate a standard Excel format bill of materials in an environment without CAD or Office software dependencies.
[0022] Step S5 generates an Excel file by independently constructing an XML document and encapsulation structure in accordance with the Office Open XML standard, without relying on third-party office software, achieving pure local, offline, and license-free export.
[0023] As attached Figure 1As shown, this invention also discloses an intelligent extraction system for multi-format BOMs of CAD drawings. The system adopts a four-layer decoupled architecture: UI interaction layer, business scheduling and configuration layer, CAD parsing and BOM recognition layer, and underlying support layer, to achieve full-process automation.
[0024] UI interaction layer: used for drawing upload, recognition log display and result export; The UI interaction layer includes a drawing upload portal, a recognition log display panel, a result preview window, an Excel export button, and a parameter configuration portal. The UI interaction layer provides users with a visual operation interface, receives user operation commands, such as uploading drawings through the drawing upload portal, triggering recognition, exporting results through the Excel export button, receiving feedback on the recognition process log (recognition source, number of hits, number of filtered records) through the recognition log display panel, viewing the final BOM result through the result preview window, and supporting visual adjustment of external JSON configuration parameters through the parameter configuration portal. It can be operated without professional technical personnel.
[0025] The business scheduling and configuration layer includes a configuration management module, which dynamically loads external recognition rules; loads external JSON configuration files, and dynamically reads header keywords and geometric tolerance parameters; the configuration management module loads external JSON rules and flexibly configures keywords and tolerance parameters; the business scheduling and configuration layer also includes a business scheduler and a log manager; as the core scheduling hub of the system, the business scheduling and configuration layer receives instructions from the UI interaction layer, schedules modules in the CAD parsing and BOM recognition layer (CAD parsing module, BOM recognition module, etc.) to execute operations according to the process; parses external JSON configuration files, and synchronizes parameters such as header keywords, geometric tolerance thresholds, and filtering rules to each functional module; records the entire recognition process log, providing support for users to troubleshoot problems and trace the recognition process, with log data stored locally, without network connection or leakage.
[0026] CAD Parsing and BOM Recognition Layer: Includes a CAD parsing module and a BOM recognition module. The CAD parsing module performs full, lossless parsing across spatial dimensions; it performs full, lossless parsing of drawings across model space and all layout spaces, directly reading the underlying entity information of the drawings. Entity information includes text, lines, blocks, attributes, and table entities. The CAD parsing module directly parses DWG / DXF underlying files, achieving full, lossless parsing in both spatial dimensions, entity extraction, and interference filtering. The BOM recognition module executes a five-level progressive BOM priority recognition strategy, from standard to non-standard. The BOM (Bill of Materials) data is obtained by identifying BOMs at each level. The BOM identification module performs a five-level progressive identification process, compatible with native tables, attribute blocks, hand-drawn wireframe tables, and plain text BOMs. Specifically, the BOM identification module performs a five-level progressive identification process, sequentially identifying native tables, attribute blocks, hand-drawn wireframe fake tables, and plain text scattered BOMs. The hand-drawn wireframe fake table identification integrates algorithms for fault-tolerant grid construction based on the intersection of horizontal and vertical lines and for determining the placement of text center points in the grid. The plain text scattered BOM identification uses a coordinate clustering and row / column division method to ensure full coverage identification of multi-format BOMs.
[0027] The underlying support layer includes a data processing module and an export module. The data processing module cleans the BOM data, including deduplication, merging, and normalization. The export module independently constructs a document structure for the cleaned BOM data according to the OfficeOpen XML standard, generating a standard Excel-format bill of materials in an environment without CAD or Office software dependencies. In this embodiment, the underlying support layer also includes a local cache manager. The local cache manager temporarily caches the parsed entity data and recognition results to improve system operating efficiency. The cached data is stored locally and is automatically cleared when the system is shut down, ensuring data security.
[0028] The data flow in the system is as follows: UI interaction layer → business scheduling and configuration layer → CAD parsing and BOM recognition layer → underlying support layer. The system provides feedback on the recognition logs and results, forming a complete closed-loop process to ensure that the entire process from drawing upload to BOM export is automated and requires no manual intervention.
[0029] The system enables lightweight offline operation without requiring the installation of CAD or Office software, and can be independently deployed in a classified intranet environment. Simultaneously, the system supports automatic deduplication and merging of cross-spatial recognition results, and outputs real-time visualized logs showing the source of the recognition, the number of hits, and the number of filtered entries.
[0030] As attached Figure 4 The diagram illustrates the offline deployment method and application scenarios of this system, adapted to confidential intranet environments. The specific topology is as follows: 1. Terminal Deployment: Factory confidential intranet terminals, unauthorized office terminals, and industrial terminals without CAD / Office software. The terminals do not need to be connected to the network or have any third-party software installed. The system only needs to install the executable file adapted to the corresponding terminal system (Windows / Linux, etc.). After installation, it can be run directly. The installation process is simple and does not require complicated configuration. 2. System Components: The UI interaction layer, business scheduling and configuration layer, CAD parsing and BOM recognition layer, and underlying support layer are all deployed locally on the terminal. All components run locally and have no external dependencies. 3. Input / Output: Users upload local CAD drawings (DWG / DXF format) through the terminal. The system completes the recognition, cleaning, and export locally, and outputs a standard Excel format BOM list, which can be directly imported into the local ERP / MES system on the terminal. The data is not connected to the network and is not leaked throughout the process. 4. Configuration file: The external JSON configuration file is stored locally on the terminal. Users can directly modify the configuration without modifying the system code, and quickly adapt to the enterprise's non-standard drawings and terminology.
[0031] This invention achieves lossless cross-space parsing of model space and all layout space by directly analyzing the underlying structure of drawings. It dynamically loads recognition rules through an external JSON configuration file and combines this with a unique five-level progressive BOM intelligent recognition architecture to automatically identify native tables, attribute blocks, hand-drawn wireframe pseudo-tables, and plain text scattered BOMs sequentially. The plain text scattered BOMs are identified through coordinate clustering for row and column division, header matching, and data verification and completion. For hand-drawn non-standard drawings, it employs a fault-tolerant grid construction algorithm based on the intersection of horizontal and vertical lines and a text center point grid judgment algorithm, significantly improving the robustness of old drawing recognition. After deduplication, merging, and normalization cleaning of the extracted data, an Excel file is independently generated following the Office Open XML standard, requiring no CAD or Office software dependencies throughout the process. This invention effectively solves the shortcomings of existing technologies, such as heavy software dependencies, poor format compatibility, missed data in multiple spaces, high adaptation costs, and low accuracy. It boasts advantages such as full recognition coverage, offline lightweight design, configurable rules, no omissions across spaces, convenient deployment, and data security, making it suitable for automated extraction and digital management of drawing BOMs in valve, machinery, and mold manufacturing enterprises.
[0032] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium. The memory can be various types of memory, such as random access memory, read-only memory, flash memory, etc., such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, server, or network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0033] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for intelligent extraction of multi-format BOMs from CAD drawings, characterized in that, Includes the following steps: Step S1: Cross-space full lossless parsing; Perform full, lossless cross-space parsing of drawings in both model space and all layout space to directly read the underlying entity information of the drawings; entity information includes text, lines, blocks, attributes, and table entities; Step S2: Dynamically load external recognition rules; load external JSON configuration file, and dynamically read header keywords and geometric fault tolerance parameters; Step S3: Execute a five-level progressive BOM priority identification strategy, identifying BOMs from standard to non-standard levels. Once the previous level is successfully identified, the next level is terminated, and the BOM data is obtained. Step S4: Clean the BOM data; Step S5: Independently construct the document structure for the cleaned BOM data according to the Office Open XML standard, and generate a standard Excel format bill of materials in an environment without CAD or Office software dependencies.
2. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 1, characterized in that: Cross-space full lossless parsing includes: synchronously traversing the model space and all layout spaces, fully preserving the original coordinates, geometric attributes and structural information of the entities; filtering out interfering elements through text height threshold, effective line segment length, and layer blacklist, including fragmented text, annotation lines, center lines, and section lines.
3. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 1, characterized in that: The external JSON configuration file includes: a header keyword library, text line Y-axis error tolerance, column separator X-axis spacing, horizontal and vertical line intersection error tolerance, minimum length of valid line segments, attribute block positioning range, and multi-space deduplication and merging rules.
4. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 1, characterized in that: The five-level progressive BOM identification strategy described in step S3 includes: Level 1: Identify the native CAD table BOM in model space; Level 2: Identify BOMs with attribute tiles in model space; Level 3: Identify the BOM of the hand-drawn wireframe fake table in the model space, reconstruct the mesh with tolerance through the intersection of horizontal and vertical lines, and determine the text's ownership by placing the text center point on the grid. Level 4: Identify plain text scattered BOM in the model space; first filter out non-BOM related text and irrelevant encoding interference, then cluster and divide the text into rows based on the Y coordinate of the text center point and the Y-axis fault tolerance threshold, divide the columns based on the X coordinate and column separation spacing threshold, determine the meaning of the fields by matching the header keywords, and form structured BOM data after data verification and completion. Level 5: When there are no results in the model space, the first to fourth level recognition methods are automatically applied to the entire layout space, and the data is summarized to obtain the BOM extraction results.
5. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 4, characterized in that: The hand-drawn wireframe fake table recognition includes: filtering valid straight lines, calculating the distance between horizontal and vertical line segments, and considering the intersection as valid when the distance is less than a preset threshold to generate a cell grid; text assignment is based on the center point of the text falling within the cell area.
6. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 4, characterized in that: The implementation process of fault-tolerant reconstruction mesh at the intersection of horizontal and vertical lines includes: Traverse all horizontal and vertical line segments, construct pairs of horizontal and vertical lines, and calculate the shortest distance between each horizontal and vertical line segment. Call the fault tolerance threshold for the intersection of horizontal and vertical lines configured in the external JSON configuration file in step S2, compare the calculated shortest distance with the fault tolerance threshold, and if the shortest distance is less than or equal to the fault tolerance threshold, then the horizontal line segment and the vertical line segment are determined to be "valid intersection". For horizontal and vertical lines that are determined to be validly intersecting, the theoretical intersection point coordinates are automatically calculated and completed. The theoretical intersection point coordinates are the intersection of the perpendicular bisector of the horizontal line segment and the horizontal bisector of the vertical line segment. Organize all valid intersecting horizontal and vertical lines and their theoretical intersection points, sort them according to the Y-coordinate of the horizontal line segment and the X-coordinate of the vertical line segment, construct a complete and closed cell grid, and define the area of each cell, including the coordinates of the upper left corner (X1, Y1) and the lower right corner (X2, Y2).
7. The intelligent extraction method for multi-format BOMs of CAD drawings according to claim 6, characterized in that: The process of determining the text's affiliation by placing the center point of the text within a grid, and obtaining the Bill of Materials (BOM) for the hand-drawn outline mock table, includes: Extract all text entities within the hand-drawn wireframe fake table area, obtain the minimum bounding box of each character, and read the coordinates of the top left corner (Xmin, Ymin) and bottom right corner (Xmax, Ymax) of the bounding box. Calculate the coordinates (Xc, Yc) of the geometric center point of each character, where Xc = (Xmin + Xmax) / 2 and Yc = (Ymin + Ymax) / 2; Iterate through all the constructed cells and match the center point (Xc, Yc) of each text. If X1≤Xc≤X2 and Y1≤Yc≤Y2, then the text belongs to that cell. If the center point falls on the cell boundary line, it belongs to the adjacent left / bottom cell by default. If the center point of the text does not fall within any cell, it is determined to be invalid text that is not related to the BOM and is included in the interference element filter. After completing the judgment of the placement of all text, the table structure of the hand-drawn wireframe fake table is reconstructed by sorting by rows and columns to obtain the BOM of the hand-drawn wireframe fake table.
8. An intelligent extraction system for multi-format BOMs of CAD drawings, characterized in that, include: UI interaction layer: used for drawing upload, recognition log display and result export; Business scheduling and configuration layer: includes a configuration management module, which is used to dynamically load external recognition rules; the configuration management module loads external JSON rules and flexibly configures keywords and fault tolerance parameters; CAD parsing and BOM recognition layer: includes CAD parsing module and BOM recognition module; The CAD parsing module is used for cross-space full lossless parsing; it performs cross-space full lossless parsing of drawings in model space and all layout space, and directly reads the underlying entity information of the drawings; entity information includes text, lines, blocks, attributes and table entities; the BOM recognition module is used to execute a five-level progressive BOM priority recognition strategy, recognizing from standard to non-standard level by level, and terminating the next level when the previous level is successfully recognized, thus obtaining the BOM data; The underlying support layer includes a data processing module and an export module; The data processing module is used to clean the BOM data; the export module is used to independently build a document structure for the cleaned BOM data in accordance with the Office Open XML standard, and generate a standard Excel format bill of materials in an environment without CAD or Office software dependencies.