CAD file analysis and rule judgment method and related device

Through information acquisition, screening, recognition, and analysis of CAD drawings, quickly judging the relationship between the spatial location of the component, solved the problem of complicated time consuming time consuming in existing technologies, and achieved efficient and accurate CAD file analysis and rules judgment.

CN114048539BActive Publication Date: 2025-01-28深圳市万翼数字技术有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111493770.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-01-13
Filing Date
2021-12-08
Publication Date
2025-01-28
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

The prior art is difficult to quickly and efficiently judge the spatial position relationship of components in CAD drawings, resulting in complex and time-consuming manual review, and it is impossible to cover all problems in the drawings.

Method used

By obtaining the drawing information of the CAD drawing, screening the target information, determining the target picture, using the target recognition algorithm to extract the target object, analyzing the graphic meta information, determining multiple target objects, and analyzing the location relationship of the space, and obtaining the results of the drawing.

Benefits of technology

The component spatial relationship in the CAD drawing is realized quickly, saving the time of manual review, and improving the accuracy and efficiency of CAD file analysis and rules judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114048539B_ABST
    Figure CN114048539B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a CAD file parsing and rule judgment method and related device, which are applied to electronic equipment; the method includes: obtaining drawing information of the drawing to be parsed; determining the target information in the drawing information through screening operation; determining the target picture according to the target information; extracting the target object from the target picture according to the target recognition algorithm to obtain the object information of the target object; analyzing and processing the object information to obtain the primitive information; determining multiple target objects from the drawing information according to the primitive information; analyzing the spatial position relationship of the multiple target objects to obtain the drawing judgment result, and the judgment result is used to indicate the target object with a problem in the spatial position relationship. It is conducive to improving the accuracy and efficiency of CAD file parsing and rule judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer-aided design, and in particular to a CAD file parsing and rule judgment method and related devices. Background Art

[0002] CAD drawings are currently a mainstream drawing format, used in various aspects of architectural design and construction. CAD drawings contain information such as coordinates, axis grids, graphics elements, drawing frames, annotations, etc. Using this information, the drawings can express the design structure, size, and location information of the building.

[0003] With the rapid development of the construction industry, CAD drawings are becoming more and more important in projects, and there are more and more ways and types of expression. The complexity and workload of manual review of CAD drawings in large projects are increasing. Manual review cannot cover all the problems that appear in the drawings, and it also slows down the project cycle in time. Summary of the invention

[0004] The embodiment of the present application provides a CAD file parsing and rule judgment method and related devices, in order to improve the efficiency of CAD file parsing and rule judgment.

[0005] In a first aspect, an embodiment of the present application provides a CAD file parsing and rule judgment method, which is applied to an electronic device; the method comprises:

[0006] Get the drawing information of the drawing to be parsed;

[0007] Determine the target information in the drawing information by filtering operation;

[0008] Determine a target image according to the target information;

[0009] Extracting a target object from the target image according to a target recognition algorithm to obtain object information of the target object;

[0010] Analyze and process the object information to obtain graphic element information;

[0011] Determining a plurality of target objects from the drawing information according to the graphic element information;

[0012] The spatial position relationship of the multiple target objects is analyzed to obtain a drawing judgment result, where the judgment result is used to indicate the target objects whose spatial position relationship has problems.

[0013] In a second aspect, an embodiment of the present application provides a CAD file parsing and rule judgment device, which is applied to an electronic device, and the device includes: an acquisition unit, used to acquire drawing information of a drawing to be parsed; a first determination unit, used to determine target information in the drawing information through a screening operation; a second determination unit, used to determine a target image based on the target information; an extraction unit, used to extract a target object from the target image according to a target recognition algorithm, and obtain object information of the target object; a first analysis unit, used to analyze and process the object information, and obtain graphic element information; a third determination unit, used to determine multiple target objects from the drawing information according to the graphic element information; a second analysis unit, used to analyze the spatial position relationship of the multiple target objects, and obtain a drawing judgment result, and the judgment result is used to indicate a target object with a problem in the spatial position relationship.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps of any method in the first aspect of the embodiment of the present application.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product may be a software installation package.

[0017] It can be seen that in the embodiment of the present application, the electronic device first obtains the drawing information of the drawing to be analyzed, and then determines the target information in the drawing information through a screening operation, and then determines the target image according to the target information, and then extracts the target object from the target image according to the target recognition algorithm to obtain the object information of the target object, and then analyzes and processes the object information to obtain the primitive information, and then determines multiple target objects from the drawing information according to the primitive information, and finally analyzes the spatial position relationship of the multiple target objects to obtain the drawing judgment result, and the judgment result is used to indicate the target object with a problem in the spatial position relationship. It can be seen that in this way, the spatial relationship of the components in the CAD drawing can be quickly judged, which is conducive to saving the time of manual review. At the same time, in the process of parsing and rule judgment of the CAD file, machine learning and configuration expansion can be used, which is conducive to improving the accuracy and efficiency of CAD file parsing and rule judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flowchart of a CAD file parsing and rule judgment method provided in an embodiment of the present application;

[0020] Figure 2 It is a flowchart of another CAD file parsing and rule judgment method provided in an embodiment of the present application;

[0021] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0022] Figure 4 It is a functional unit composition block diagram of a CAD file parsing and rule judgment device provided in an embodiment of the present application;

[0023] Figure 5 It is a block diagram of the functional units of another CAD file parsing and rule judgment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0025] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0027] The electronic devices involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, as well as various forms of user equipment (UE), mobile stations (MS), terminal devices, etc.

[0028] The embodiments of the present application are described in detail below.

[0029] See also Figure 1 , Figure 1 The present application provides a flowchart of a CAD file parsing and rule judgment method, which is applied to electronic equipment; the method includes:

[0030] S101, obtaining drawing information of the drawing to be analyzed;

[0031] The drawing information includes layer information, frame information, and graphic element information.

[0032] S102, determining target information in the drawing information through a screening operation;

[0033] The target information includes part of the information in the layer information and / or the frame information that meets the preset conditions. For example, the spatial relationship of a component such as a "door" needs to be judged, so the layer corresponding to the component "door" can be filtered out through a filtering operation. Then the target information is the layer corresponding to the component "door".

[0034] S103, determining a target image according to the target information;

[0035] The target image may be an image that includes only the layers corresponding to the determined component type. For example, if the determined component type is "door", the target image may include only the layers corresponding to "door". Of course, if the layers corresponding to the determined component type are not screened out, the target image may also be an image generated from the entire CAD drawing.

[0036] S104, extracting a target object from the target image according to a target recognition algorithm to obtain object information of the target object;

[0037] Among them, the image can be put into a recognition model corresponding to the determined component type that has been trained in advance for detection to determine the target object and the object information of the target object, that is, the component included in the determined component type is the target object, for example, the target object is a "door", and the object information can be pixel coordinate data of the target object, etc.

[0038] S105, analyzing and processing the object information to obtain graphic element information;

[0039] Among them, primitives are a kind of graphic data, corresponding to the entities that can be seen in the drawings, and are used to describe various graphic elements in the drawings (any graphic expression is composed of a number of different points, lines and other structures, and these points and lines are basic graphic elements). In CAD drawings, the smallest identifiable graphic elements such as straight lines, arcs and annotations can be called primitives. Element information is information that can accurately lock the position of the primitive in the drawing, such as geometric coordinate information or vector information. For example, for the target object "door", the corresponding primitive information can include vector information of two straight lines and one arc.

[0040] S106, determining a plurality of target objects from the drawing information according to the graphic element information;

[0041] Among them, the drawing to be analyzed may include multiple target objects whose spatial position relationships need to be determined, for example, a CAD drawing includes multiple components of the component type "door", and the graphic element information corresponding to each target object is the same, so multiple target objects can be determined based on the graphic element information.

[0042] S107, analyzing the spatial position relationship of the multiple target objects to obtain a drawing judgment result.

[0043] Among them, the judgment result is used to indicate the target object with a problem in the spatial position relationship. The spatial position relationship may include whether there is an intersection between each target object. If a target object has an intersection in the spatial position relationship with any one or more other target objects, it can be determined that the target object with the intersection is a problem object.

[0044] It can be seen that in this example, the electronic device first obtains the drawing information of the drawing to be analyzed, and then determines the target information in the drawing information through a screening operation, and then determines the target image according to the target information, and then extracts the target object from the target image according to the target recognition algorithm to obtain the object information of the target object, and then analyzes and processes the object information to obtain the primitive information, and then determines multiple target objects from the drawing information according to the primitive information, and finally analyzes the spatial position relationship of the multiple target objects to obtain the drawing judgment result, and the judgment result is used to indicate the target object with a problem in the spatial position relationship. It can be seen that in this way, the spatial relationship of the components in the CAD drawings can be quickly judged, which is conducive to saving the time of manual review. At the same time, in the process of parsing and rule judgment of CAD files, machine learning and configuration expansion can be used, which is conducive to improving the accuracy and efficiency of CAD file parsing and rule judgment.

[0045] In a possible example, the electronic device determines the target information in the drawing information through a filtering operation, including: the electronic device determines a filtering strategy, wherein the filtering method includes precise filtering and fuzzy filtering; according to the filtering strategy and the drawing information, determines the layer information corresponding to each drawing, wherein the layer information includes the number of layers and the layer name; obtains the frame information in the drawing information, wherein the frame information includes the frame format, frame parameters and frame size; determines that the target information includes the layer information and the frame information.

[0046] The screening strategies include precise screening and fuzzy screening.

[0047] The layer information includes the number of layers and the layer name. That is, filtering can be performed based on the layer name. Different types of components can use different naming rules. The corresponding component type can be included in the layer name. For example, the layer name corresponding to the component type "door" can be similar to: "%DOOR%", "%door%", etc.

[0048] The frame information includes frame format, frame parameters and frame size.

[0049] In a specific implementation, the electronic device determines that the screening strategy is a fuzzy query, and simultaneously obtains drawing information "AF1" and "AF2". The electronic device determines, based on the screening strategy and the drawing information, that the layer information corresponding to each drawing includes "AF1 layer includes DOOR and ROOM", "DOOR's frame size is 594:1261", "ROOM's frame size is 841:1189"; "AF2 layer includes ROOM", "ROOM's frame size is 841:1189"; the electronic device obtains the frame information in the drawing information, "ROOM's frame size is 841:1189", "ROOM's frame size is 841:1189".

[0050] It can be seen that in this example, the electronic device determines the filtering strategy, and then the electronic device determines the layer information corresponding to each drawing based on the filtering strategy and the drawing information, and then the electronic device obtains the frame information in the drawing information; this is conducive to improving the accuracy of obtaining the frame information, and thus is conducive to improving the accuracy of CAD file parsing and rule judgment.

[0051] In a possible example, the electronic device determines the target image based on the target information, including: the electronic device obtains the drawing range coordinates in the frame information; the electronic device determines the drawing range based on the drawing range coordinates; the electronic device generates the target image based on the drawing range and the layer information.

[0052] In a specific implementation, the drawing range coordinates may be the drawing range coordinates of the component corresponding to the determined component type, or the drawing range coordinates of the entire drawing. The electronic device obtains the drawing range coordinates (x1, y1) in the frame information, and the electronic device determines the range Q of the drawing where the component is located, or the drawing range Q of the entire CAD drawing, based on the drawing range coordinates (x1, y1). The electronic device generates a target image P based on the drawing range and the layer information.

[0053] It can be seen that in this example, the electronic device obtains the drawing range coordinates in the drawing frame information, then the electronic device determines the drawing range according to the drawing range coordinates, and finally the electronic device generates a target image according to the drawing range and the layer information; this is conducive to improving the accuracy of CAD file parsing and rule judgment.

[0054] In one possible example, the analyzing and processing the object information to obtain graphic element information includes: determining the pixel coordinates of the target object in the target image based on the object information; obtaining the drawing coordinates of the target object based on the pixel coordinates; determining the coordinate range of the target object based on the drawing coordinates; and analyzing all graphic elements within the coordinate range to obtain the graphic element information of the graphic element corresponding to the target object.

[0055] Among them, the pixel coordinates and the original CAD coordinates can be converted into drawing coordinates, and the drawing coordinates can be used to indicate the range of a target object in the drawing. For example, it can be represented by a rectangular box according to the range. Since the rectangular box may also include other primitives besides the primitives corresponding to the target object, the primitives in the range can be searched to determine the primitives corresponding to the target object.

[0056] It can be seen that in this example, refining the target object to the primitive level can improve the accuracy of determining the target object and improve the judgment accuracy.

[0057] In a possible example, before extracting the target object from the target image according to the target recognition algorithm to obtain the object information of the target object, the method further includes: the electronic device performing noise reduction and standardization processing on the target image.

[0058] In a possible instance, the method further includes: the electronic device identifies the target object to determine the type of the target object; the electronic device classifies and stores the target objects according to the type to establish a location index; the electronic device analyzes the location index corresponding to each of the multiple target objects to establish a regular relationship between the multiple target objects, and the regular relationship is used to indicate the spatial position relationship between the multiple target objects.

[0059] The noise reduction and standardization processing includes automatically reducing the noise of the objects, deleting the objects that do not meet the standards, and improving the accuracy and speed of subsequent recognition.

[0060] The regular relationships include distance, intersection and tangency.

[0061] In the specific implementation, the electronic device extracts the objects DOOR1, DOOR2 and ROOM1 in the target image, performs noise reduction and standardization processing on the objects DOOR1, DOOR2, DOOR3 and ROOM1, and determines the target objects DOOR1 and ROOM1; the electronic device performs recognition processing on the target objects, and determines the types of the target objects, DOOR1 and DOOR3 belong to "doors" and ROOM1 belongs to "rooms"; the electronic device classifies and stores DOOR1, DOOR3 and ROOM1 according to the types, and establishes the location index "AF1-DOOR1, AF1-DOOR3, AF1-ROOM1"; the electronic device analyzes the location indexes corresponding to DOOR1, DOOR3 and ROOM1, and establishes a regular relationship: DOOR1 and DOOR3 belong to the same category and are 10 meters apart; ROOM1 contains DOOR1. When viewing drawings, users can directly understand the spatial position relationship between components in the drawings based on the regular relationship.

[0062] It can be seen that in this example, the electronic device extracts the object in the target image, then the electronic device performs noise reduction and standardization processing on the object to determine the target object, the electronic device performs recognition processing on the target object to determine the type of the target object, and then the electronic device classifies and stores the target object according to the type to establish a location index, and finally the electronic device analyzes the location index corresponding to each of the multiple target objects to establish a rule relationship between the multiple target objects; performs configurable expansion of rules to match different rule requirements, and quickly configures the growing drawing rule requirements and architectural rules to achieve precise adaptation, which is conducive to improving the accuracy and efficiency of CAD file parsing and rule judgment.

[0063] With the above Figure 1 For details on the embodiments shown in the drawings, please refer to Figure 2 , Figure 2 1 is a flow chart of another CAD file parsing and rule judgment method provided in an embodiment of the present application, which is applied to electronic equipment; as shown in the figure, the CAD file parsing and rule judgment method includes:

[0064] S201, the electronic device obtains drawing information of the drawing to be analyzed;

[0065] S202, the electronic device determines a screening strategy;

[0066] S203, the electronic device determines the layer information corresponding to each drawing according to the screening strategy and the drawing information;

[0067] S204, the electronic device obtains the drawing frame information in the drawing information;

[0068] S205, the electronic device determines a target image according to the layer information and the frame information;

[0069] S206, the electronic device extracts the target object from the target image according to the target recognition algorithm to obtain object information of the target object;

[0070] S207, the electronic device analyzes and processes the object information to obtain graphic element information;

[0071] S208, the electronic device determines a plurality of target objects from the drawing information according to the graphic element information;

[0072] S209, the electronic device analyzes the spatial position relationship of the multiple target objects to obtain a drawing judgment result, where the judgment result is used to indicate the target objects with problematic spatial position relationships.

[0073] It can be seen that a CAD file parsing and rule judgment method and related devices are provided in the embodiment of the present application. The drawings to be analyzed are parsed by the CAD file processing system, which is beneficial to saving time for manual review. At the same time, machine learning and configuration expansion can be used in the process of parsing and rule judgment of CAD files, which is beneficial to improving the accuracy and efficiency of CAD file parsing and rule judgment.

[0074] In addition, the electronic device determines a screening strategy, and then determines the layer information corresponding to each drawing based on the screening strategy and the drawing information, and then the electronic device obtains the frame information in the drawing information; this is conducive to improving the accuracy of obtaining the frame information, and thus is conducive to improving the accuracy of CAD file parsing and rule judgment.

[0075] With the above Figure 1 , Figure 2 For details on the embodiments shown in the drawings, please refer to Figure 3 , Figure 3It is a structural diagram of an electronic device 310 provided in an embodiment of the present application. As shown in the figure, the electronic device 310 includes an application processor 320, a memory 330, a communication interface 340 and one or more programs 331, wherein the one or more programs 331 are stored in the above-mentioned memory 330 and are configured to be executed by the above-mentioned application processor 320, and the one or more programs 331 include instructions for executing any step in the above-mentioned method embodiment. In a specific implementation, the application processor 320 is used to execute any step executed by the electronic device in the above-mentioned method embodiment, and when performing data transmission such as sending, the communication interface 340 can be selectively called to complete the corresponding operation.

[0076] With the above Figure 1 , Figure 2 For details on the embodiments shown in the drawings, please refer to Figure 4 , Figure 4 It is a functional unit composition block diagram of a CAD file parsing and rule judgment device provided in an embodiment of the present application, wherein the device 400 includes an acquisition unit 401, used to acquire drawing information of a drawing to be parsed; a first determination unit 402, used to determine target information in the drawing information through a screening operation; a second determination unit 403, used to determine a target image according to the target information; an extraction unit 404, used to extract a target object from the target image according to a target recognition algorithm to obtain object information of the target object; a first analysis unit 405, used to analyze and process the object information to obtain primitive information; a third determination unit 406, used to determine multiple target objects from the drawing information according to the primitive information; a second analysis unit 407, used to analyze the spatial position relationship of the multiple target objects to obtain a drawing judgment result, wherein the judgment result is used to indicate a target object with a problem in the spatial position relationship.

[0077] In a possible example, in terms of determining the target information in the drawing information through a filtering operation, the first determination unit 402 is specifically used to: determine a filtering strategy, wherein the filtering method includes precise filtering and fuzzy filtering; determine the layer information corresponding to each drawing according to the filtering strategy and the drawing information, wherein the layer information includes the number of layers and the layer name; obtain the frame information in the drawing information, wherein the frame information includes a frame format, frame parameters and a frame size; and determine that the target information includes the layer information and the frame information.

[0078] In a possible example, in terms of determining the target image according to the target information, the second determination unit 403 is specifically used to: obtain the drawing range coordinates in the frame information; determine the drawing range according to the drawing range coordinates; and generate the target image according to the drawing range and the layer information.

[0079] In one possible example, in terms of analyzing and processing the object information to obtain graphic element information, the first analysis unit 405 is specifically used to: determine the pixel coordinates of the target object in the target image based on the object information; obtain the drawing coordinates of the target object based on the pixel coordinates; determine the coordinate range of the target object based on the drawing coordinates; analyze all graphic elements within the coordinate range to obtain the graphic element information of the graphic element corresponding to the target object.

[0080] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0081] In the case of integrated units, such as Figure 5 As shown, Figure 5 This is a functional unit block diagram of another CAD file parsing and rule judgment device provided by an embodiment of the present application. Figure 5 In the embodiment, the CAD file parsing and rule judgment device 500 includes: a processing module 512 and a communication module 511. The processing module 512 is used to control and manage the actions of the CAD file parsing and rule judgment device, for example, to execute the steps of the display acquisition unit 401, the first determination unit 402, the second determination unit 403, the extraction unit 404, the first analysis unit 405, the third determination unit 406 and the second analysis unit 407, and / or to execute other processes of the technology described herein. The communication module 611 is used to support the interaction between the CAD file parsing and rule judgment device and other devices. Figure 5 As shown, the CAD file parsing and rule judging device may further include a storage module 513, and the storage module 513 is used to store program codes and data of the CAD file parsing and rule judging device.

[0082] Among them, the processing module 512 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 511 can be a transceiver, an RF circuit or a communication interface, and the like. The storage module 513 can be a memory.

[0083] Among them, all relevant contents of each scenario involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The above screen management device 500 can execute the above Figure 1 , Figure 2 The CAD file analysis and rule judgment method shown.

[0084] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0085] The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, the computer program is operable to cause a computer to execute some or all of the steps of any method described in the method embodiment. The computer program product may be a software installation package, and the computer includes an electronic device.

[0086] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0087] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0088] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0089] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0090] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0091] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.

[0092] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0093] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A CAD file parsing and rule judgment method, characterized in that: Applied to electronic equipment; the method comprises: Get the drawing information of the drawing to be parsed; Determine a screening strategy, wherein the screening strategy includes precise screening and fuzzy screening; Determine the layer information corresponding to each drawing according to the screening strategy and the drawing information, wherein the layer information includes the number of layers and the layer name; Acquire the drawing frame information in the drawing information, wherein the drawing frame information includes the drawing frame format, drawing frame parameters and drawing frame size; Determine a target image according to target information, wherein the target information includes the layer information and the frame information; Extracting a target object from the target image according to a target recognition algorithm to obtain object information of the target object; Analyze and process the object information to obtain graphic element information; Determining a plurality of target objects from the drawing information according to the graphic element information; The spatial position relationship of the multiple target objects is analyzed to obtain a drawing judgment result, wherein the judgment result is used to indicate the target objects with problems in the spatial position relationship, and the spatial position relationship is used to indicate whether there is an intersection between each target object.

2. The method according to claim 1, characterized in that: Determining the target image according to the target information includes: Obtaining the drawing range coordinates in the drawing frame information; Determine the drawing range according to the drawing range coordinates; A target image is generated according to the drawing range and the layer information.

3. The method according to claim 1, characterized in that: The analyzing and processing the object information to obtain the graphic element information includes: Determine the pixel coordinates of the target object in the target image according to the object information; Acquire the drawing coordinates of the target object according to the pixel coordinates; Determine the coordinate range of the target object according to the drawing coordinates; All graphic elements within the coordinate range are analyzed to obtain the graphic element information of the graphic element corresponding to the target object.

4. A CAD file parsing and rule judgment device, characterized in that: Applicable to electronic equipment; the device comprises: An acquisition unit, used for acquiring drawing information of the drawing to be parsed; A first determining unit is used to determine a screening strategy, wherein the screening strategy includes precise screening and fuzzy screening; and to determine layer information corresponding to each drawing according to the screening strategy and the drawing information, wherein the layer information includes the number of layers and the layer name; and to obtain frame information in the drawing information, wherein the frame information includes frame format, frame parameters and frame size; A second determining unit, configured to determine a target image according to target information, wherein the target information includes the layer information and the frame information; An extraction unit, configured to extract a target object from the target image according to a target recognition algorithm to obtain object information of the target object; A first analysis unit, used for analyzing and processing the object information to obtain primitive information; A third determining unit, configured to determine a plurality of target objects from the drawing information according to the graphic element information; The second analysis unit is used to analyze the spatial position relationship of the multiple target objects to obtain a drawing judgment result, wherein the judgment result is used to indicate the target objects with problems in spatial position relationship, and the spatial position relationship is used to indicate whether there is an intersection between each target object.

5. The device according to claim 4, characterized in that In the aspect of determining the target picture according to the target information, the second determining unit is specifically configured to: Obtaining the drawing range coordinates in the drawing frame information; Determine the drawing range according to the drawing range coordinates; A target image is generated according to the drawing range and the layer information.

6. The device according to claim 5, characterized in that In the aspect of analyzing and processing the object information to obtain the primitive information, the first analyzing unit is specifically used for: Determine the pixel coordinates of the target object in the target image according to the object information; Acquire the drawing coordinates of the target object according to the pixel coordinates; Determine the coordinate range of the target object according to the drawing coordinates; All graphic elements within the coordinate range are analyzed to obtain the graphic element information of the graphic element corresponding to the target object.

7. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the method according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that: A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Drawing review method, device, computer equipment and storage medium

    CN110517223A