Conversion Method, Device, Storage Medium and Processor for CAD Files
By reading and processing the display data of the detailed list object in the CAD software, generating the target original data and constructing the detailed list, the problem of low cross-soft editing efficiency is solved, and data conversion and editing efficiency is improved across software is achieved.
Patent Information
- Application Number
- CN202111518730.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2041-12-13
AI Technical Summary
Existing CAD software is less efficient in editing when processing schedule objects and cannot be compatible and edited across software.
By reading the display data of the detailed list object in the target CAD software, random grouping and bounding box calculations are performed, the target original data is generated and the target detailed list is constructed, and data conversion across software is realized.
It improves the editing efficiency of CAD software, so that the detailed list object data in different CAD software can be publicly utilized, realizes secondary editing, and improves user experience.
Smart Images

Figure CN114168531B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of CAD software processing. Specifically, it relates to a method, device, storage medium, and processor for converting CAD files. Background Technique
[0002] In CAD software, the DWG file, as a file format for 2D CAD, has gradually become the de facto standard for 2D CAD file formats and is compatible with all CAD software. Some basic elements in DWG files, such as lines, circles, etc., are compatible with all CAD software. However, for the bill of materials object, since this object is not defined in the DWG file, each CAD manufacturer has its own implementation and it is not publicly available. For example, in AutoCAD Mechanical Edition, the bill of materials object is the proxy object AcmPartList, and the bill of materials in ZWCAD is a bunch of scattered blocks. When users switch CAD software or receive drawings sent by other manufacturers, they often find that although the bill of materials is displayed correctly, it cannot be edited and can only be treated as an ordinary block, which is extremely inconvenient and results in low software editing efficiency.
[0003] Regarding the problem of low editing efficiency of CAD software in the related art, no effective solution has been proposed yet. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, storage medium, and processor for converting CAD files to solve the problem of low editing efficiency of CAD software in the related art.
[0005] To achieve the above objective, according to one aspect of this application, a method for converting CAD files is provided. The method includes: in the target CAD software, reading the target file object of the preset CAD software; if the target file object is a bill of materials object, reading the display data corresponding to the bill of materials object, where the display data is data used to describe the bill of materials object; processing the display data to obtain the target original data; and generating a target bill of materials according to the target original data.
[0006] Further, after reading the target file object of the preset CAD software, the method further includes: obtaining the identification information of the target file object, where the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; and determining whether the target file object is a bill of materials object according to the identification information.
[0007] Further, after reading the display data corresponding to the bill of materials object, the method further includes: randomly grouping the display data to obtain the grouped display data; determining whether there is text object data in the grouped display data; and if there is text object data in the grouped display data, obtaining the text object data.
[0008] Further, before processing the display data to obtain the target original data, the method further includes: calculating the bounding box of the text object data; and constructing target cell information according to the bounding box, where the target cell information at least includes the row number information of the target cell and the column number information of the target cell.
[0009] Further, processing the display data to obtain the target original data includes: determining the data information of each row in the text object data according to the target cell information; and determining the target original data according to the data information.
[0010] Further, determining the target original data according to the data information includes: obtaining the non-text object data in the display data; and determining the target original data according to the data information and the non-text object data.
[0011] To achieve the above object, according to another aspect of the present application, there is provided a conversion device for CAD files. The device includes: a first reading unit for reading a target file object of a preset CAD software in a target CAD software; a second reading unit for reading the display data corresponding to the bill of materials object if the target file object is a bill of materials object, where the display data is data for describing the bill of materials object; a processing unit for processing the display data to obtain the target original data; and a generating unit for generating a target bill of materials according to the target original data.
[0012] Further, the device further includes: a first obtaining unit for obtaining the identification information of the target file object after reading the target file object of the preset CAD software, where the identification information includes at least one of the following: the class name information of the target file object and the data block name information of the target file object; and a first judging unit for judging whether the target file object is a bill of materials object according to the identification information.
[0013] Further, the device further includes: a grouping unit for randomly grouping the display data after reading the display data corresponding to the bill of materials object to obtain the grouped display data; a second judging unit for judging whether there is text object data in the grouped display data; and a second obtaining unit for obtaining the text object data if there is text object data in the grouped display data.
[0014] Further, the device further includes: a calculation unit configured to calculate a bounding box of the text object data before processing the display data to obtain the target raw data; a construction unit configured to construct target cell information according to the bounding box, where the target cell information at least includes the number of rows information of the target cell and the number of columns information of the target cell.
[0015] Further, the processing unit includes: a first determination module configured to determine the data information of each row in the text object data according to the target cell information; a second determination module configured to determine the target raw data according to the data information.
[0016] Further, the second determination module includes: an acquisition sub-module configured to acquire the non-text object data in the display data; a determination sub-module configured to determine the target raw data according to the data information and the non-text object data.
[0017] According to another aspect of the embodiments of the present application, a processor is further provided, and the processor is configured to run a program, where when the program runs, it executes the method in any one of the above.
[0018] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided, on which a computer program / instructions are stored, and when the computer program / instructions are executed by a processor, the method in any one of the above is executed.
[0019] Through the present application, the following steps are adopted: in the target CAD software, read the target file object of the preset CAD software; if the target file object is a bill of materials object, read the display data corresponding to the bill of materials object, where the display data is the data used to describe the bill of materials object; process the display data to obtain the target raw data; generate a target bill of materials according to the target raw data. The problem of low editing efficiency of CAD software in the related art is solved. By processing the display data to obtain the target raw data and generating a target bill of materials according to the target raw data, the effect of improving the editing efficiency of CAD software is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0021] Figure 1 is a flowchart of the CAD file conversion method provided by the embodiments of the present application;
[0022] Figure 2 is a flowchart of reverse derivation of raw data from display data of the CAD file conversion method provided by the embodiments of the present application;
[0023] Figure 3 It is the overall operation flowchart of the CAD file conversion method provided by the embodiments of the present application;
[0024] Figure 4 It is a schematic diagram of the CAD file conversion device provided by the embodiments of the present application. Detailed implementation manners
[0025] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances for the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these process, method, product or device.
[0028] According to the embodiments of the present application, a CAD file conversion method is provided.
[0029] Figure 1 It is the flowchart of the CAD file conversion method according to the embodiments of the present application. As Figure 1 shown, the method includes the following steps:
[0030] Step S101, in the target CAD software, read the target file object of the preset CAD software.
[0031] For example, in ZWCAD software, read the target file object in GstarCAD. Among them, the target file object may be some basic elements in a DWG file, such as a line, a circle, etc., or a bill of materials object.
[0032] Step S102, if the target file object is a bill of materials object, read the display data corresponding to the bill of materials object, where the display data is the data used to describe the bill of materials object.
[0033] Specifically, if the target file object is a bill of materials object, since this object is not defined in the DWG file, it is necessary to identify the bill of materials object in the DWG file.
[0034] Optionally, in the CAD file conversion method provided in the embodiments of the present application, after reading the target file object of the preset CAD software, the method further includes: obtaining the identification information of the target file object, where the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; determining whether the target file object is a bill of materials object according to the identification information.
[0035] Specifically, the bill of materials object can be identified through the class name or block name of the DWG file and the specific identification information of the target file object. By identifying the bill of materials object, the parsing efficiency of the display data is further improved.
[0036] Optionally, in the CAD file conversion method provided in the embodiments of the present application, after reading the display data corresponding to the bill of materials object, the method further includes: randomly grouping the display data to obtain the grouped display data; determining whether there is text object data in the grouped display data; if there is text object data in the grouped display data, obtaining the text object data.
[0037] For example, the display data can be the coordinate position data of the objects in the bill of materials, as well as the color information, string text content, and font of the data in the objects in the bill of materials. They are randomly grouped after being scattered, and all text objects are filtered out. For example, the text objects can include string objects. By identifying the text object data, the bill of materials generated by other CAD software can be converted into a bill of materials object that can be recognized by the current CAD, which can greatly improve the editing efficiency.
[0038] Step S103, process the display data to obtain the target original data.
[0039] Specifically, analyze the text objects in the display data to further obtain the specifications of the bill of materials object.
[0040] Optionally, in the CAD file conversion method provided in the embodiments of the present application, before processing the display data to obtain the target original data, the method further includes: calculating the bounding box of the text object data; constructing the target cell information according to the bounding box, where the target cell information at least includes the row number information of the target cell and the column number information of the target cell.
[0041] For example, Figure 2 is a flowchart for reverse-deriving the original data from the display data of the CAD file conversion method provided by an embodiment of the present application. As Figure 2 shown, when the text object data is "Text A" and "Text B", calculate the bounding box sizes of Text A and Text B. Based on the bounding box, the M*N cells in the bill of materials (corresponding to the target cells in the present application) can be derived. Here, M represents the row information of the target cells, and N represents the column information of the target cells. By constructing the target cell information, the parsing efficiency of the target original data is improved, which can greatly improve the editing efficiency.
[0042] Optionally, in the CAD file conversion method provided by an embodiment of the present application, processing the display data to obtain the target original data includes: determining the data information of each row in the text object data according to the target cell information; determining the target original data according to the data information.
[0043] Specifically, as Figure 2 shown, determine the row information M in the M*N cells according to the text object, generate the data information of each row based on the cells, and determine the target original data based on the data information of each row. Here, the first row can be used as the header. By determining the target original data, the data of the bill of materials objects in different CAD software can be publicly utilized and can be edited secondarily, further improving the user experience.
[0044] Optionally, in the CAD file conversion method provided by an embodiment of the present application, determining the target original data according to the data information includes: obtaining the non-text object data in the display data; determining the target original data according to the data information and the non-text object data.
[0045] For example, the non-text object can be the distance between the upper and lower horizontal lines enclosing each row of data in a chart. The target original data is generated by adding all the row data and the non-text object data. By determining the target original data, the data of the bill of materials objects in different CAD software can be publicly utilized and can be edited secondarily, further improving the user experience.
[0046] Step S104, generating a target bill of materials according to the target original data.
[0047] Figure 3 is the overall operation flowchart of the CAD file conversion method provided by an embodiment of the present application. As Figure 3As shown in the figure, when reading a DWG file, for each bill of materials object, if it is an unknown bill of materials object, it is determined whether it is a bill of materials generated by other CAD software. The judgment basis can be the class name, block name, or some special identifiers, etc. If it is a bill of materials object, the display data is first read, and the display data is reversely deduced into the original data, and the original data of the target is used to generate the bill of materials object of the current CAD software, realizing that the data of the bill of materials object in different CAD software can be publicly utilized and can be secondarily edited, further improving the user experience.
[0048] In summary, the CAD file conversion method provided by the embodiments of the present application reads the target file object of the preset CAD software in the target CAD software; if the target file object is a bill of materials object, reads the display data corresponding to the bill of materials object, where the display data is the data used to describe the bill of materials object; processes the display data to obtain the target original data; and generates the target bill of materials according to the target original data. This solves the problem of low editing efficiency of CAD software in the related art. By processing the display data to obtain the target original data and generating the target bill of materials according to the target original data, the effect of improving the editing efficiency of the CAD software is achieved.
[0049] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0050] The embodiments of the present application also provide a CAD file conversion device. It should be noted that the CAD file conversion device of the embodiments of the present application can be used to execute the CAD file conversion method provided by the embodiments of the present application. The CAD file conversion device provided by the embodiments of the present application is introduced below.
[0051] Figure 4 is a schematic diagram of the CAD file conversion device according to the embodiments of the present application. As Figure 4 shown, the device includes: a first reading unit 401, a second reading unit 402, a processing unit 403, and a generating unit 404.
[0052] Specifically, the first reading unit 401 reads the target file object of the preset CAD software in the target CAD software;
[0053] The second reading unit 402 reads the display data corresponding to the bill of materials object if the target file object is a bill of materials object, where the display data is the data used to describe the bill of materials object;
[0054] The processing unit 403 processes the display data to obtain the target original data;
[0055] The generating unit 404 generates a target detailed list according to the target original data.
[0056] The CAD file conversion device provided by the embodiment of the present application reads a target file object of a preset CAD software in a target CAD software through a first reading unit 401; if the target file object is a detailed list object, a second reading unit 402 reads display data corresponding to the detailed list object, where the display data is data used to describe the detailed list object; the processing unit 403 processes the display data to obtain the target original data; the generating unit 404 generates a target detailed list according to the target original data, solving the problem of low editing efficiency of CAD software in the related art. By processing the display data to obtain the target original data and generating a target detailed list according to the target original data, the effect of improving the editing efficiency of CAD software is achieved.
[0057] Optionally, in the CAD file conversion device provided by the embodiment of the present application, the device further includes: a first obtaining unit, configured to obtain identification information of the target file object after reading the target file object of the preset CAD software, where the identification information includes at least one of the following: class name information of the target file object, data block name information of the target file object; a first judging unit, configured to judge whether the target file object is a detailed list object according to the identification information.
[0058] Optionally, in the CAD file conversion device provided by the embodiment of the present application, the device further includes: a grouping unit, configured to randomly group the display data after reading the display data corresponding to the detailed list object to obtain the grouped display data; a second judging unit, configured to judge whether there is text object data in the grouped display data; a second obtaining unit, configured to obtain the text object data if there is text object data in the grouped display data.
[0059] Optionally, in the CAD file conversion device provided by the embodiment of the present application, the device further includes: a calculating unit, configured to calculate the bounding box of the text object data before processing the display data to obtain the target original data; a constructing unit, configured to construct target cell information according to the bounding box, where the target cell information at least includes the number of rows information of the target cell and the number of columns information of the target cell.
[0060] Optionally, in the CAD file conversion device provided by the embodiment of the present application, the processing unit 403 includes: a first determining module, configured to determine the data information of each row in the text object data according to the target cell information; a second determining module, configured to determine the target original data according to the data information.
[0061] Optionally, in the CAD file conversion device provided in the embodiments of the present application, the second determination module includes: an acquisition sub-module for acquiring non-text object data in the display data; a determination sub-module for determining target original data according to the data information and the non-text object data.
[0062] The CAD file conversion device includes a processor and a memory. The above-mentioned first reading unit 401, second reading unit 402, processing unit 403, generating unit 404, etc. are all stored in the memory as program units, and the corresponding functions are implemented by the processor executing the above program units stored in the memory.
[0063] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and the conversion of CAD files is performed by adjusting the kernel parameters.
[0064] The memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0065] The embodiments of the present invention provide a storage medium on which a program is stored, and the program, when executed by a processor, implements a CAD file conversion method.
[0066] The embodiments of the present invention provide a processor, and the processor is used to run a program. When the program runs, it executes a CAD file conversion method.
[0067] The embodiments of the present invention provide a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, the following steps are implemented: in the target CAD software, read the target file object of the preset CAD software; if the target file object is a bill of materials object, read the display data corresponding to the bill of materials object, where the display data is data used to describe the bill of materials object; process the display data to obtain target original data; generate a target bill of materials according to the target original data.
[0068] When the processor executes the program, the following steps are further implemented: after reading the target file object of the preset CAD software, obtain the identification information of the target file object, where the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; determine whether the target file object is a bill of materials object according to the identification information.
[0069] When the processor executes the program, the following steps are also implemented: after reading the display data corresponding to the bill of materials object, randomly group the display data to obtain the grouped display data; determine whether there is text object data in the grouped display data; if there is text object data in the grouped display data, obtain the text object data.
[0070] When the processor executes the program, the following steps are also implemented: before processing the display data to obtain the target original data, calculate the bounding box of the text object data; construct the target cell information according to the bounding box, where the target cell information at least includes the row number information of the target cell and the column number information of the target cell.
[0071] When the processor executes the program, the following steps are also implemented: determine the data information of each row in the text object data according to the target cell information; determine the target original data according to the data information.
[0072] When the processor executes the program, the following steps are also implemented: obtain the non-text object data in the display data; determine the target original data according to the data information and the non-text object data.
[0073] The device in this article can be a server, PC, PAD, mobile phone, etc.
[0074] This application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the following method steps: in the target CAD software, read the target file object of the preset CAD software; if the target file object is a bill of materials object, read the display data corresponding to the bill of materials object, where the display data is the data used to describe the bill of materials object; process the display data to obtain the target original data; generate a target bill of materials according to the target original data.
[0075] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: after reading the target file object of the preset CAD software, obtain the identification information of the target file object, where the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; determine whether the target file object is a bill of materials object according to the identification information.
[0076] When executed on a data processing device, it is also adapted to execute a program initialized with the following method steps: after reading the display data corresponding to the bill of materials object, randomly group the display data to obtain the grouped display data; determine whether there is text object data in the grouped display data; if there is text object data in the grouped display data, obtain the text object data.
[0077] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: Before processing the display data to obtain the target original data, calculate the bounding box of the text object data; construct the target cell information according to the bounding box, where the target cell information at least includes the number of rows information of the target cell and the number of columns information of the target cell.
[0078] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: Determine the data information of each row in the text object data according to the target cell information; determine the target original data according to the data information.
[0079] When executed on a data processing device, it is also suitable for executing a program initialized with the following method steps: Obtain the non-text object data in the display data; determine the target original data according to the data information and the non-text object data.
[0080] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0082] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the functions specified in one block or multiple blocks.
[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0084] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0085] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0086] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
[0087] It should also be noted that the term "including", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the presence of another identical element in the process, method, commodity or device including the element.
[0088] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0089] The above are only the embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A conversion method for CAD files, characterized in that, Including: In the target CAD software, read the target file object of the preset CAD software; If the target file object is a bill of materials object, read the display data corresponding to the bill of materials object, where the display data is data used to describe the bill of materials object; Process the display data to obtain target raw data; Generate a target bill of materials according to the target raw data; Among them, processing the display data to obtain target raw data includes: if there is text object data in the display data, obtain the text object data; calculate the bounding box of the text object data; construct target cell information according to the bounding box; determine the data information of each row in the text object data according to the target cell information; determine the target raw data according to the data information.
2. The method according to claim 1, wherein After reading the target file object of the preset CAD software, the method further includes: Obtain the identification information of the target file object, where the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; Judge whether the target file object is a bill of materials object according to the identification information.
3. The method according to claim 1, characterized in that After reading the display data corresponding to the bill of materials object, the method further includes: Randomly group the display data to obtain the grouped display data; Judge whether there is text object data in the grouped display data; If there is text object data in the grouped display data, obtain the text object data.
4. The method according to claim 3, wherein Before processing the display data to obtain target raw data, the method further includes: Calculate the bounding box of the text object data; Construct target cell information according to the bounding box, where the target cell information at least includes the row number information of the target cell and the column number information of the target cell.
5. The method according to claim 4, wherein Processing the display data to obtain target raw data includes: Determine the data information of each row in the text object data according to the target cell information; Determine the target raw data according to the data information.
6. The method according to claim 5, wherein Determining the target raw data according to the data information includes: Obtain the non-text object data in the display data; Determine the target raw data according to the data information and the non-text object data.
7. A conversion device for CAD files, characterized in that, Including: A first reading unit, configured to read the target file object of the preset CAD software in the target CAD software; A second reading unit, configured to read the display data corresponding to the bill of materials object if the target file object is a bill of materials object, where the display data is data used to describe the bill of materials object; A processing unit, configured to process the display data to obtain target raw data; A generating unit, configured to generate a target bill of materials according to the target raw data; Wherein, the processing unit is further configured to: if there is text object data in the display data, obtain the text object data; calculate the bounding box of the text object data; construct target cell information according to the bounding box; determine the data information of each row in the text object data according to the target cell information; and determine target original data according to the data information.
8. The device according to claim 7, characterized in that, The apparatus further includes: A first obtaining unit, configured to obtain the identification information of the target file object after reading the target file object of the preset CAD software, wherein the identification information includes at least one of the following: the class name information of the target file object, the data block name information of the target file object; A first judging unit, configured to judge whether the target file object is a bill of materials object according to the identification information.
9. A processor, characterized in that, The processor is configured to run a program, wherein when the program runs, it executes the CAD file conversion method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that The storage medium includes a stored program, wherein the program executes the CAD file conversion method according to any one of claims 1 to 6.
Citation Information
Patent Citations
GIS and AutoCAD data exchange method and intermediate file
CN105512235A
Drawing segmentation method and electronic equipment used in architectural design
CN112581476A