Drawing format conversion method and device, computer equipment and storage medium

By obtaining the drawing source of the current drawing opened by the drawing editing software, determining and applying format conversion rules, and converting the drawings, the problem of editing different versions of drawing files in the same software is solved, and efficient drawing reuse and cost reduction are achieved.

CN119722873AActive Publication Date: 2025-03-28ZWCAD SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510239734.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-03-28
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

It is difficult for the prior art to open different versions of drawing files in the same software for editing, resulting in cumbersome reuse of CAD drawings.

Method used

By obtaining the drawing source of the current drawing opened by the drawing editing software, determine the format conversion rules of the primitive object to be converted, and use these rules to convert the primitive object to be converted to generate converted drawings that are compatible with the file format.

Benefits of technology

It realizes the editing ability of different versions of drawing files in the same software, improves the efficiency of drawing reuse and reduces the cost of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722873A_ABST
    Figure CN119722873A_ABST
Patent Text Reader

Abstract

The invention relates to a drawing format conversion method and device, computer equipment, a storage medium and a computer program product. The method comprises the steps of obtaining a drawing source of a current drawing opened by drawing editing software; the current drawing comprises a to-be-converted primitive object incompatible with drawing editing software; according to drawing format conversion configuration information corresponding to the drawing source, determining a format conversion rule of each to-be-converted primitive object; the format conversion rules corresponding to the to-be-converted primitive objects are adopted to convert the to-be-converted primitive objects, and converted primitive objects corresponding to the to-be-converted primitive objects are obtained; generating a converted drawing corresponding to the current drawing according to the primitive information corresponding to each converted primitive object; the file format of the converted drawing is a compatible file format of drawing editing software. By means of the method, drawing files of different versions can be opened on the same software to be edited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of drawing format conversion, and in particular to a drawing format conversion method, device, computer equipment, storage medium and computer program product. Background Art

[0002] AutoCAD software is a drawing editing software that emerged along with the digitalization of the industrial industry. It can parse CAD drawings by reading drawing exchange files such as DXF, DWT and DWG.

[0003] At present, there are many design softwares on the market, but the files are closed source and need to be opened with corresponding software to edit and modify the properties, which makes the reuse of CAD drawings cumbersome. At the same time, as time goes by, the design software has been iterated, and the historical files of older versions can only be viewed and edited in lower versions of the program. The large number of historical drawings accumulated by enterprises are difficult to interact with using other design software.

[0004] Therefore, there is a problem in traditional technology that different versions of drawing files cannot be opened and edited in the same software. Summary of the invention

[0005] Based on this, it is necessary to provide a drawing format conversion method, device, computer equipment, computer-readable storage medium and computer program product that can open different versions of drawing files for editing in the same software to address the above technical problems.

[0006] A drawing format conversion method, comprising:

[0007] Get the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the graphic element objects to be converted that are incompatible with the drawing editing software;

[0008] According to the drawing format conversion configuration information corresponding to the drawing source, the format conversion rules of each graphic element object to be converted are determined;

[0009] Using the format conversion rules corresponding to each primitive object to be converted, convert each primitive object to be converted to obtain a converted primitive object corresponding to each primitive object to be converted;

[0010] A converted drawing corresponding to the current drawing is generated according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

[0011] In one embodiment, obtaining the drawing source of the current drawing opened by the drawing editing software includes:

[0012] In the case that the current drawing has a drawing frame object to be converted, the file group code information of the drawing frame object is determined, and the field information of the drawing source field is determined in the file group code information;

[0013] Determine the drawing source of the current drawing based on the field information of the drawing source field.

[0014] In one embodiment, according to the drawing format conversion configuration information corresponding to the drawing source, the format conversion rules of each graphic element object to be converted are determined, including:

[0015] When the drawing source corresponds to a standard drawing, obtain the drawing format conversion configuration information corresponding to the standard drawing;

[0016] According to the format conversion parameters in the drawing format conversion configuration information, the format conversion rules of each graphic element object to be converted are determined.

[0017] In one embodiment, the graphic primitive objects to be converted include title bar objects to be converted, and according to the drawing format conversion configuration information corresponding to the drawing source, the format conversion rules of each graphic primitive object to be converted are determined, including:

[0018] In the case where the drawing source corresponds to multiple standard drawings, determining a target standard drawing that matches the title block information of the title block object to be converted in each standard drawing;

[0019] The drawing format conversion configuration information corresponding to the target standard drawing is obtained, and the format conversion rules of each graphic element object to be converted are determined according to the format conversion parameters in the drawing format conversion configuration information corresponding to the target standard drawing.

[0020] In one embodiment, determining a target standard drawing that matches the title block information of the title block object to be converted from each standard drawing includes:

[0021] For any standard drawing of each standard drawing, obtain the title bar information of the title bar object of any standard drawing;

[0022] When the title block information of the title block object to be converted matches the title block information of the title block object of any standard drawing, any standard drawing is used as the target standard drawing.

[0023] In one embodiment, the title bar information of the title bar object to be converted includes the title bar size, the title bar table structure and the title bar custom area of ​​the title bar object to be converted, and the method further includes:

[0024] Based on whether the title bar size of the title bar object to be converted is the same as the title bar size of any standard drawing, a first matching result is obtained;

[0025] When the first matching result indicates a successful match, a second matching result is obtained based on whether the title block table structure of the title block object to be converted is the same as the title block table structure of any standard drawing;

[0026] When the second matching result indicates a successful match, a third matching result is obtained by matching the title block custom area of ​​the title block object to be converted with the title block custom area corresponding to any standard drawing based on whether the title block custom area is the same.

[0027] When the third matching result indicates that the match is successful, it is determined that any standard drawing matches the title block information of the title block object to be converted.

[0028] In one embodiment, the primitive object to be converted includes a sequence number object to be converted; the sequence number object to be converted is a block object including at least one sequence number text; the primitive information of the sequence number object to be converted includes the sequence number text and the sequence number stacking state; and each primitive object to be converted is converted using a format conversion rule corresponding to each primitive object to be converted to obtain a converted primitive object corresponding to each primitive object to be converted, including:

[0029] In the case where the stacking mode of the stacked sequence texts included in the sequence object to be converted is represented by the sequence stacking state as an overall mode, the first sequence text of the sequence object to be converted is determined according to the sequence text of the sequence object to be converted; the overall mode represents that each stacked sequence text belongs to the same block object;

[0030] The first sequence text is used as the basic sequence text, and other sequence texts in the sequence object to be converted are sequentially merged into the basic sequence text to generate a converted sequence object; other sequence texts are sequence texts in the sequence object to be converted except the first sequence text.

[0031] In one embodiment, the method further comprises:

[0032] In the case where the stacking mode of the stacked sequence number text included in the sequence number object to be converted is a separation mode, any stacked sequence number text is generated, and the preceding sequence number text of the stacked sequence number text is searched according to the position coordinates of the sequence number mark point of the stacked sequence number text; the separation mode represents that each stacked sequence number text is an independent block object;

[0033] When the preceding sequence number text is found, the stacked sequence number text is merged and stacked onto the preceding sequence number text to generate a converted sequence number object.

[0034] In one embodiment, the method further comprises:

[0035] If the preceding sequence number text is not found, the generation of the stacking sequence number text is canceled, and the stacking sequence number text is placed at the end of the stacking sequence number text traversal set;

[0036] The stacking sequence number texts in the traversal set are traversed, and the step of generating the stacking sequence number texts is returned until each stacking sequence number text is merged into the preceding sequence number text corresponding to each stacking sequence number text to generate a converted sequence number object.

[0037] In one embodiment, the graphic primitive objects to be converted include a detailed list object to be converted; according to the drawing source, determining the format conversion rules for each graphic primitive object to be converted in the drawing frame object to be converted includes:

[0038] According to the drawing source, determine the block object properties of all row data of each column in the detail list object to be converted;

[0039] When the block object attribute indicates that all row data of any column of the detail list belong to the same overall block object, a splitting method of the detail list object to be converted is determined according to the number of overall block objects in the detail list object to be converted and target point information of each overall block object in the detail list object to be converted;

[0040] When the block object attribute indicates that all row data of any column detail list are single-row block objects, the splitting method of the detail list object to be converted is determined according to the target point information of each single-row block object in the detail list object to be converted.

[0041] A drawing format conversion device, comprising:

[0042] A source determination module is used to obtain the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the graphic element objects to be converted which are incompatible with the drawing editing software;

[0043] A rule determination module is used to determine the format conversion rules of each graphic element object to be converted according to the drawing format conversion configuration information corresponding to the drawing source;

[0044] A graphic primitive conversion module, used to convert each graphic primitive object to be converted by using a format conversion rule corresponding to each graphic primitive object to be converted, and obtain a converted graphic primitive object corresponding to each graphic primitive object to be converted;

[0045] The drawing conversion module is used to generate a converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

[0046] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0047] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0048] A computer program product comprises a computer program, which implements the steps of the above method when executed by a processor.

[0049] The above-mentioned drawing format conversion method, device, computer equipment, storage medium and computer program product obtain the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the to-be-converted graphic primitive objects that are incompatible with the drawing editing software; according to the drawing format conversion configuration information corresponding to the drawing source, the format conversion rules of each graphic primitive object to be converted are determined; the format conversion rules corresponding to each graphic primitive object to be converted are adopted to convert each graphic primitive object to be converted, and the converted graphic primitive objects corresponding to each graphic primitive object to be converted are obtained; according to the graphic primitive information corresponding to each converted graphic primitive object, the converted graphic primitive objects corresponding to the current drawing are generated. paper; the file format of the converted drawing is a compatible file format of the drawing editing software; in this way, according to the drawing source of the current drawing opened by the drawing editing software, the format conversion rules for each graphic element object to be converted in the current drawing can be quickly determined, and according to the format conversion rules of each graphic element object to be converted, each graphic element object to be converted is converted into each converted graphic element object, so as to quickly perform the drawing format conversion. Overall, it is possible to flexibly perform accurate and rapid conversion of multi-source drawings and historical drawings, unify the drawing parameters corresponding to the converted drawings into the required design software, improve the use efficiency, and reduce the use cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are 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.

[0051] Figure 1 A diagram of an application environment of a drawing format conversion method in an embodiment;

[0052] Figure 2 A schematic diagram of a process of converting a drawing format in one embodiment;

[0053] Figure 3 A flowchart of a drawing conversion method in one embodiment;

[0054] Figure 4 is a schematic diagram of a horizontal stacking state in one embodiment;

[0055] Figure 5 is a schematic diagram of a vertical stacking state in one embodiment;

[0056] Figure 6 A schematic diagram of the graphic element information of a sequence number object to be converted in one embodiment;

[0057] Figure 7 A schematic diagram of a schedule object in an implementation;

[0058] Figure 8 A schematic diagram of a flow chart of a drawing format conversion method in another embodiment;

[0059] Fig. 9 It is a structural block diagram of a drawing format conversion device in one embodiment;

[0060] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] The drawing format conversion method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the to-be-converted graphic element objects that are incompatible with the drawing editing software; the server 104 determines the format conversion rules of each to-be-converted graphic element object according to the drawing format conversion configuration information corresponding to the drawing source; the server 104 adopts the format conversion rules corresponding to each to-be-converted graphic element object to convert each to-be-converted graphic element object to obtain the converted graphic element object corresponding to each to-be-converted graphic element object; the server 104 generates the converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is the compatible file format of the drawing editing software. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0063] In an exemplary embodiment, Figure 2As shown, a drawing format conversion method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:

[0064] Step S202, obtaining the drawing source of the current drawing opened by the drawing editing software; the current drawing includes graphic primitive objects to be converted that are incompatible with the drawing editing software.

[0065] Among them, the drawing editing software may refer to AutoCAD (Autodesk Computer Aided Design, automatic computer-aided design) software.

[0066] The current drawing may refer to a DWG drawing currently opened by the drawing editing software, the current drawing may be a historical version drawing of the drawing editing software, or may be a drawing of other image editing software.

[0067] The drawing source may refer to the drawing editing software to which the current drawing belongs, for example, Design Star, Yao Chuang, CAXA and other software.

[0068] The graphic element objects to be converted may refer to graphic element objects whose properties cannot be edited and modified in the drawing editing software in the current drawing. In a drawing, graphic element objects may be drawing frame objects, title bar objects, detail list objects and serial number objects.

[0069] Optionally, the server determines whether the current version of the DWG drawing opened by the drawing editing software contains a frame object that needs to be converted. If it contains a frame object that needs to be converted, the server determines the drawing source of the current version of the DWG drawing opened by the drawing editing software. For different drawing sources, different drawing format conversion configuration texts are pre-configured in the server.

[0070] Step S204: determining the format conversion rules of each graphic element object to be converted according to the drawing format conversion configuration information corresponding to the drawing source.

[0071] Among them, the drawing format conversion configuration information can be information pre-written in the drawing format conversion program, or it can be information in the drawing format conversion configuration file. The drawing format conversion configuration file can refer to a configuration file used to convert the drawing format of the current drawing into a drawing format compatible with the drawing editing software, and the pre-configured information in the configuration file is used to convert the graphic element objects of the current drawing into graphic element objects compatible with the drawing editing software. Different writing methods of drawing format conversion configuration information have different advantages. Writing the drawing format conversion configuration information into the drawing format conversion program can improve the convenience of data acquisition, while writing the drawing format conversion configuration information into the drawing format conversion configuration file can improve the flexibility and adaptability of drawing format conversion.

[0072] The format conversion rule of the graphic primitive object to be converted may refer to a corresponding graphic primitive object parameter conversion method when converting the graphic primitive object to be converted in the current drawing into a graphic primitive object compatible with the drawing editing software.

[0073] Optionally, when the graphic objects to be converted in the current version of the DWG drawing include frame objects to be converted, title bar objects to be converted, detail list objects to be converted and serial number objects to be converted, the server determines the format conversion rules corresponding to the frame objects to be converted, the title bar objects to be converted, the detail list objects to be converted and the serial number objects to be converted according to the drawing format conversion configuration information corresponding to the drawing source.

[0074] Step S206 , using the format conversion rules corresponding to each primitive object to be converted, convert each primitive object to be converted to obtain a converted primitive object corresponding to each primitive object to be converted.

[0075] The converted graphic primitive object refers to a graphic primitive object that is compatible with image editing software.

[0076] Optionally, when the graphic objects to be converted in the current version of the DWG drawing include a frame object to be converted, a title bar object to be converted, a detail list object to be converted and a serial number object to be converted, the server adopts the format conversion rules corresponding to the frame object to be converted, the title bar object to be converted, the detail list object to be converted and the serial number object to be converted, respectively, and performs format conversion on the frame object to be converted, the title bar object to be converted, the detail list object to be converted and the serial number object to be converted, respectively, to obtain the converted frame object corresponding to the frame object to be converted, the converted title bar object corresponding to the title bar object to be converted, the converted detail list object corresponding to the detail list object to be converted, and the converted serial number object corresponding to the serial number object to be converted.

[0077] Step S208, generating a converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

[0078] The graphic element information of the converted graphic element object may include frame parameter information, title bar parameter information, detail list parameter information and sequence number parameter information of the converted graphic element object.

[0079] The converted drawings may be drawings compatible with image editing software.

[0080] Optionally, after obtaining the converted frame object corresponding to the frame object to be converted, the converted title bar object corresponding to the title bar object to be converted, the converted detail list object corresponding to the detail list object to be converted, and the converted sequence number object corresponding to the sequence number object to be converted, the server generates a converted drawing corresponding to the current drawing according to the graphic element information of the converted frame object, the converted title bar object, the converted detail list object and the converted sequence number object.

[0081] In the above-mentioned drawing format conversion method, by obtaining the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the to-be-converted graphic primitive objects that are incompatible with the drawing editing software; according to the drawing format conversion configuration information corresponding to the drawing source, the format conversion rules of each graphic primitive object to be converted are determined; the format conversion rules corresponding to each graphic primitive object to be converted are adopted to convert each graphic primitive object to be converted, and the converted graphic primitive objects corresponding to each graphic primitive object to be converted are obtained; according to the graphic primitive information corresponding to each converted graphic primitive object, the converted drawing corresponding to the current drawing is generated; the file format of the converted drawing is the compatible file format of the drawing editing software; in this way, according to the drawing source of the current drawing opened by the drawing editing software, the format conversion rules for each graphic primitive object to be converted in the current drawing can be quickly determined, and according to the format conversion rules of each graphic primitive object to be converted, each graphic primitive object to be converted is converted into each converted graphic primitive object, so as to quickly perform the drawing format conversion. From the overall point of view, it is possible to flexibly and accurately convert multi-source drawings and historical drawings, unify the drawing parameters corresponding to the converted drawings to the required design software, improve the use efficiency, and reduce the use cost.

[0082] In an exemplary embodiment, obtaining the drawing source of the current drawing opened by drawing editing software includes: when there is a drawing frame object to be converted in the current drawing, determining the file group code information of the drawing frame object, determining the field information of the drawing source field in the file group code information; and determining the drawing source of the current drawing according to the field information of the drawing source field.

[0083] The drawing frame object to be converted may refer to a drawing frame that needs to be format converted in a DWG drawing currently opened by the drawing editing software.

[0084] The file group code information may refer to the dxf group code information of the block object in the currently opened DWG drawing. In actual applications, the file group code information may be composed of various fields and field values ​​corresponding to the various fields.

[0085] The drawing source field may refer to a field in which the file group code information identifies the drawing source.

[0086] The field information of the drawing source field may refer to the field value corresponding to the field identifying the drawing source in the file group code information, and the field value may indicate the manufacturer from which the currently opened DWG drawing originates.

[0087] Optionally, when the server determines that the currently opened DWG drawing contains a frame object that needs to be converted, it determines the dxf group code information of the frame object, determines the field value of the drawing source field in the dxf group code information, and determines the drawing source of the currently opened DWG drawing based on the field value of the drawing source field.

[0088] In this embodiment, when there is a frame object to be converted in the current drawing, the file group code information of the frame object is determined, and the field information of the drawing source field is determined in the file group code information; the drawing source of the current drawing is determined according to the field information of the drawing source field; in this way, the drawing source of the current drawing can be determined quickly and accurately.

[0089] In this application, a drawing source may correspond to one standard drawing or multiple standard drawings. It can be understood that the same drawing manufacturer may have one standard drawing or multiple standard drawings. The next embodiment corresponds to a specific method for determining the format conversion rules of each graphic element object to be converted when a drawing source corresponds to only one standard drawing.

[0090] In an exemplary embodiment, format conversion rules for each graphic object to be converted are determined based on drawing format conversion configuration information corresponding to the drawing source, including: when the drawing source corresponds to a standard drawing, obtaining drawing format conversion configuration information corresponding to the standard drawing; and determining format conversion rules for each graphic object to be converted based on format conversion parameters configured in the drawing format conversion configuration information.

[0091] Among them, the standard drawing may be a drawing with a standard format.

[0092] The format conversion parameter may refer to a conversion parameter used to convert a graphic primitive object to be converted that is incompatible with the image editing software into a graphic primitive object that is compatible with the image editing software.

[0093] Optionally, when the drawing source of the currently opened DWG drawing corresponds to only one standard drawing, the server obtains the drawing format conversion configuration information corresponding to the standard drawing, and determines the format conversion rules for each graphic object to be converted according to the format conversion parameters configured in the drawing format conversion configuration information.

[0094] In this embodiment, when there is only one standard drawing as the drawing source, the drawing format conversion configuration information of the standard drawing can be quickly acquired, so as to quickly and accurately determine the format conversion rules for each graphic primitive object to be converted.

[0095] The previous embodiment corresponds to a specific method for determining the format conversion rules of each graphic object to be converted when one drawing source corresponds to only one standard drawing. The next embodiment corresponds to a specific method for determining the format conversion rules of each graphic object to be converted when one drawing source corresponds to multiple standard drawings. Different from the previous embodiment, the next embodiment needs to first determine the target standard drawing among multiple standard drawings before determining the format conversion rules of each graphic object to be converted.

[0096] In an exemplary embodiment, the graphic primitive objects to be converted include title bar objects to be converted, and the format conversion rules for each graphic primitive object to be converted are determined according to the drawing format conversion configuration information corresponding to the drawing source, including: when the drawing source corresponds to multiple standard drawings, determining a target standard drawing that matches the title bar information of the title bar object to be converted in each standard drawing; obtaining the drawing format conversion configuration information corresponding to the target standard drawing, and determining the format conversion rules for each graphic primitive object to be converted according to the format conversion parameters configured in the drawing format conversion configuration information corresponding to the target standard drawing.

[0097] The title bar object to be converted may refer to a title bar object that is incompatible with the image editing software.

[0098] The title bar information may refer to the title bar size, the title bar table structure, and the information corresponding to the title bar custom area of ​​the title bar object to be converted.

[0099] The target standard drawing may refer to a standard drawing among multiple standard drawings that matches the title bar information of the title bar object to be converted.

[0100] Optionally, when the drawing source corresponds to multiple standard drawings, the server determines the target standard drawing that matches the title bar information of the title bar object to be converted in each standard drawing based on the title bar information of the title bar object to be converted. Then, the server obtains the drawing format conversion configuration information corresponding to the target standard drawing, and determines the format conversion rules corresponding to the drawing frame object to be converted, the title bar object to be converted, the detailed list object to be converted and the serial number object to be converted according to the format conversion parameters configured in the drawing format conversion configuration information corresponding to the target standard drawing.

[0101] In this embodiment, when the drawing source corresponds to multiple standard drawings, the target standard drawing that matches the title bar information of the title bar object to be converted can be first determined in each standard drawing, and then the drawing format conversion configuration information corresponding to the target standard drawing is obtained. According to the format conversion parameters configured in the drawing format conversion configuration information corresponding to the target standard drawing, the format conversion rules of each graphic object to be converted can be quickly and accurately determined.

[0102] The next embodiment provides a specific method for matching according to the title block information of the title block object to determine a target standard drawing among multiple standard drawings.

[0103] In an exemplary embodiment, a target standard drawing that matches the title bar information of the title bar object to be converted is determined in each standard drawing, including: for any standard drawing of each standard drawing, obtaining the title bar information of the title bar object of any standard drawing; when the title bar information of the title bar object to be converted matches the title bar information of the title bar object of any standard drawing, taking any standard drawing as the target standard drawing.

[0104] Optionally, when it is determined that there are multiple standard drawings corresponding to the drawing source, it is necessary to distinguish the standard drawings of the drawing source. For any standard drawing of each standard drawing, the server obtains the title bar information of the title bar object of any standard drawing. When the title bar information of the title bar object to be converted matches the title bar information of the title bar object of any standard drawing, any standard drawing is used as the target standard drawing.

[0105] In this embodiment, when there are multiple standard drawings corresponding to the drawing source, the drawing format conversion configuration information of each standard drawing can be traversed, and the title bar information of the title bar object in the drawing format conversion configuration information of each standard drawing is matched with the title bar information of the title bar object to be converted to determine the target standard drawing. The target standard drawing can be accurately determined, thereby ensuring the correctness of the drawing conversion.

[0106] The next embodiment provides a specific method for performing triple verification according to the title block information of the title block object to determine a target standard drawing among multiple standard drawings.

[0107] In an exemplary embodiment, the title bar information of the title bar object to be converted includes the title bar size, title bar table structure and title bar custom area of ​​the title bar object to be converted, and the method also includes: matching based on whether the title bar size of the title bar object to be converted is the same as the title bar size of any standard drawing to obtain a first matching result; when the first matching result indicates a successful match, matching based on whether the title bar table structure of the title bar object to be converted is the same as the title bar table structure of any standard drawing to obtain a second matching result; when the second matching result indicates a successful match, matching based on whether the title bar custom area of ​​the title bar object to be converted is the same as the title bar custom area corresponding to any standard drawing to obtain a third matching result; when the third matching result indicates a successful match, determining that any standard drawing matches the title bar information of the title bar object to be converted.

[0108] The title bar size may include the length and height of the title bar object to be converted.

[0109] The title bar table structure may be represented by the line object parameters contained in the title bar object to be converted.

[0110] Among them, the title bar custom area can refer to an area in the title bar object to be converted that is pre-specified by the user. In actual applications, for a drawing source, the information in the title bar custom area corresponding to its multiple standard drawings should be different, so the information in the title bar custom area can be used to determine the target standard drawing among multiple standard drawings.

[0111] Optionally, a triple check is required based on the title bar size of the title bar object to be converted and the title bar size of any standard drawing, the title bar table structure of the title bar object to be converted and the title bar table structure of any standard drawing, and the title bar custom area of ​​the title bar object to be converted and the title bar custom area of ​​any standard drawing in order to determine the target standard drawing. Specifically, it is necessary to traverse the drawing format conversion configuration information corresponding to each standard drawing, and compare the title bar length and title bar height with the title bar standard length and title bar standard height in the drawing format conversion configuration information corresponding to the current standard drawing to preliminarily determine whether the title bar size matches successfully. If the matching with the drawing format conversion configuration information of the current standard drawing fails, the drawing format conversion configuration information of the next standard drawing is traversed for matching until the match is successful and the next check is entered. If the matching fails, a user prompt is given that the relevant parameters fail to match. After the title bar size matches successfully, the straight line object parameters contained in the title bar block object are compared with the current standard The standard parameters of the straight line objects in the drawing format conversion configuration information of the standard drawing are compared to further determine whether the internal structure of the title block table matches successfully. If the matching with the drawing format conversion configuration information of the current standard drawing fails, the drawing format conversion configuration information of the next standard drawing is traversed for matching until the matching is successful and the next step of verification is entered. If the matching fails, a user prompt is given that the relevant parameters fail to match. After the internal structure of the title block table matches successfully, a comparison is performed according to the information of the user-defined title block area. After obtaining the information of the user-specified title block area, it is compared with the user-defined standard information content in the drawing format conversion configuration information of the current standard drawing. If the matching fails, the drawing format conversion configuration information of the next current standard drawing is traversed for matching until the matching is successful. The correct drawing format conversion configuration information can be determined. The next step is to convert according to the format conversion parameters in the drawing format conversion configuration information. If the matching fails, a user prompt is given that the relevant parameters fail to match.

[0112] In order to facilitate the understanding of those skilled in the art, Figure 3A flowchart of a drawing conversion method is exemplarily provided, and the process specifically includes: when it is detected that a DWG drawing opened by an image editing software contains a frame object to be converted, obtaining the drawing area primitive information in the DWG drawing, including the frame object primitive information, the title bar object primitive information, the sequence number object primitive information and the detail list object primitive information, and verifying the primitive information to determine the source of the drawing; obtaining the primitive information of the frame object in the drawing area, calculating the frame data and frame range of the new frame object, obtaining the primitive information of the new frame object, and searching for the primitive information of the title bar object within the frame range to calculate the new drawing scale and obtain the primitive information of the new title bar object; performing conversion based on the title bar object Perform triple verification. After the triple verification passes, based on the frame range of the frame object, obtain the graphic element information of the serial number object within the frame range and generate the graphic element information of the new serial number object. The graphic element information of the new serial number object includes the new serial number object text, the new serial number object mark point, the new serial number object placement point, and the new serial number object stacking state. Based on the frame range of the image object, obtain the graphic element information of the detail list object within the frame range and generate the graphic element information of the new detail list object. The graphic element information of the new detail list object includes the text information of the new detail list object and the multi-column detail list splitting information. Generate a conversion compatible format file based on the graphic element information of the new frame object, the new title bar object, the new serial number object, and the new detail list object.

[0113] Figure 3The triple verification part shown generally selects different matching rules based on the complexity of the customer's historical drawings. Among them, the first match is for the simplest and highly standardized enterprises. Since the historical drawings are relatively standard, only the first match can be used to verify the length and height of the title bar. The length and height set in the configuration file and the length and height obtained from the actual drawing are restored to a 1:1 ratio and then compared to match the correct historical drawing; the second match is for enterprises with a certain degree of complexity and a general degree of standardization, that is, there are multiple types of standard drawings with the same title bar length and height but different internal structures. At this time, the second match can be used to distinguish them, and the number of straight line objects in the title bar is compared. The standard number set in the configuration file and the number of straight line objects obtained from the actual drawing are compared to match the correct historical drawing; the third match is for enterprises with a high degree of complexity and a low degree of standardization of historical drawings, that is, when the length and height of the title bar are consistent and the internal structure is consistent (the number of straight lines in the title bar is the same), it is necessary to distinguish them based on user-defined key information. At this time, the user needs to identify them according to the uniqueness of the specific drawing. For example, if the text in a certain area of ​​the title bar is "process", the drawing is a process drawing, that is, it needs to be converted according to the drawing conversion method of process drawings. Therefore, users are required to edit the corresponding text content into the corresponding user-defined field in the configuration file, and extract the text content at the corresponding position of the title bar to achieve customization. The correct historical drawing can be matched by comparing whether the text content at the actual drawing position completely matches the custom text content corresponding to the configuration file.

[0114] In this embodiment, a first matching result is obtained by matching based on whether the title bar size of the title bar object to be converted is the same as the title bar size of any standard drawing; when the first matching result indicates a successful match, a second matching result is obtained by matching based on whether the title bar table structure of the title bar object to be converted is the same as the title bar table structure of any standard drawing; when the second matching result indicates a successful match, a third matching result is obtained by matching based on whether the title bar custom area of ​​the title bar object to be converted is the same as the title bar custom area corresponding to any standard drawing; when the third matching result indicates a successful match, it is determined that the title bar information of any standard drawing matches that of the title bar object to be converted; in this way, accurate matching and fast matching can be achieved in scenarios where the standardization degree of historical drawings is high, and detailed matching can be performed in scenarios where the standardization degree of historical drawings is low through the final title bar custom area check to ensure the correctness of the drawing conversion.

[0115] In an exemplary embodiment, the graphic element object to be converted includes a serial number object to be converted; the serial number object to be converted is a block object including at least one serial number text; the graphic element information of the serial number object to be converted includes the serial number text and the serial number stacking state; each graphic element object to be converted is converted using the format conversion rule corresponding to each graphic element object to be converted to obtain a converted graphic element object corresponding to each graphic element object to be converted, including: when the serial number stacking state represents that the stacking mode of the stacked serial number text included in the serial number object to be converted is an overall mode, the first serial number text of the serial number object to be converted is determined according to the serial number text of the serial number object to be converted; the overall mode represents that each stacked serial number text belongs to the same block object; taking the first serial number text as the basic serial number text, the other serial number texts in the serial number object to be converted are sequentially merged into the basic serial number text to generate a converted serial number object; the other serial number texts are the serial number texts in the serial number object to be converted except the first serial number text.

[0116] The serial number object to be converted may refer to a serial number object that is incompatible with the image editing software. In actual applications, the DWG drawing currently opened by the image editing software may not contain the serial number object to be converted, or may contain the serial number object to be converted. In the case where the serial number object to be converted is contained, the technical solution of this embodiment needs to be used to convert the serial number object. The technical solution of this embodiment corresponds to the case where the serial number object to be converted contains stacked text serial numbers, see Figure 4 and Figure 5 In actual applications, there are also cases where the sequence number object to be converted does not contain the stacking sequence number text, see Figure 6 . Figure 6 The graphic element information of the serial number object to be converted is exemplarily identified, including the serial number object text, the serial number object marking point, the serial number object placement point and the serial number object stacking state.

[0117] The serial number text may refer to the text corresponding to the serial number in the serial number object to be converted. For example, see Figure 4 , Figure 4 Contains the sequence number object to be converted, where "4", "5" and "6" are all sequence number texts, see Figure 5 , Figure 5 Contains the sequence number object to be converted, where "1", "2" and "3" are all sequence number texts.

[0118] The serial number stacking state may refer to whether the serial number text is stacked vertically or horizontally, such as Figure 4 The sequence number stacking state shown is horizontal stacking, such as Figure 5 The stacking state of the serial numbers shown is vertical stacking.

[0119] Among them, the stacking sequence number text can refer to Figure 4In the sequence number texts "5" and "6", the stacked sequence number text "5" is stacked horizontally on the ordinary sequence number text "4", and the stacked sequence number text "6" is stacked horizontally on the stacked sequence number text "5"; Figure 5 The stacked number text "2" is stacked vertically on the ordinary number text "1", and the stacked number text "3" is stacked vertically on the stacked number text "2". The stacked number text "5" and the stacked number text "6" are non-leading number texts. In addition to the underline style and the ball mark style, the stacked number text has other styles.

[0120] Among them, the stacking mode can include an overall mode and a separate mode. The overall mode means that the stacked n serial number texts are an overall block object, and the separate mode means that the stacked n serial number texts are independent n block objects.

[0121] Among them, the first sequence number text can refer to Figure 4 The normal serial number text "4" in .

[0122] The converted serial number object may refer to Figure 4 The serial number object obtained after the format conversion of the serial number object to be converted in .

[0123] Optionally, for DWG drawings containing stacked serial number texts, it is first necessary to determine whether the style of the stacked text serial number is an overall mode or a separate mode. For the serial number objects to be converted in the overall mode, when generating a new serial number object, determine the first serial number text based on the serial number text of the serial number object to be converted, create a new serial number object with the first serial number as the basic serial number, and merge other serial number texts except the first serial number text into the basic serial number in sequence to generate a converted serial number object.

[0124] The judgment basis for judging the stacking sequence number style is: overall mode, that is, the stacked n sequence numbers are a whole block object, and the judgment basis is that the sequence number object found according to the dxf group code contains >1 text object; separate mode, that is, the stacked n sequence numbers are independent n block objects. Here, since there is only one text object contained in the stacked sequence number and the ordinary sequence number, what needs to be judged in the separate mode is whether the current sequence number object is a stacked sequence number or an ordinary sequence number. The judgment basis is to find that the horizontal coordinates of the position coordinates of the sequence number object mark point and the placement point position coordinates are the same according to the dxf group code (for vertical stacking) or the vertical coordinates are the same (for horizontal stacking). By comparing the coordinate relationship between the sequence number object mark point information and the sequence number object placement point information to determine the stacking sequence number, the recognition of complex stacking sequence number objects is greatly improved, and the loss of sequence number objects after conversion caused by stacking sequence number text recognition errors is effectively avoided.

[0125] In the present embodiment, when the sequence stacking state represents that the stacking mode of the stacked sequence texts included in the sequence object to be converted is an overall mode, the first sequence text of the sequence object to be converted is determined according to the sequence text of the sequence object to be converted; the overall mode represents that each stacked sequence text belongs to the same block object; taking the first sequence text as the basic sequence text, the other sequence texts in the sequence object to be converted are merged into the basic sequence text in sequence to generate a converted sequence object; the other sequence texts are the sequence texts in the sequence object to be converted except the first sequence text; in this way, when the stacking mode of the stacked sequence texts in the sequence object to be converted is the overall mode, the sequence text stacking can be performed quickly and accurately, thereby ensuring the efficiency and accuracy of the sequence conversion.

[0126] In an exemplary embodiment, the method also includes: when the sequence stacking state represents that the stacking mode of the stacked sequence text included in the sequence object to be converted is a separation mode, generating any stacked sequence text, and searching for the preceding sequence text of the stacked sequence text according to the position coordinates of the sequence mark point of the stacked sequence text; the separation mode represents that each stacked sequence text is an independent block object; when the preceding sequence text is found, the stacked sequence text is merged and stacked onto the preceding sequence text to generate a converted sequence object.

[0127] The serial number points can be found in Figure 6 , Figure 6 Also shown are the serial number text "7" and the serial number placement point.

[0128] Among them, for Figure 4 For the stacking sequence number text "5", its preceding sequence number text can refer to Figure 4 For the ordinary serial number text "4" in Figure 4 For the stacking sequence number text "6", its preceding sequence number text can refer to Figure 4 The stacking number text "5" in.

[0129] Optionally, for DWG drawings containing stacking sequence number text, it is first necessary to determine whether the style of the stacking sequence number text is an overall mode or a separate mode. For the sequence number objects to be converted in the separate mode, the stacking sequence number text is generated first when generating a new sequence number object, and then the generated preceding sequence number text is searched according to the sequence number mark point position coordinates. If the preceding sequence number text is found, the newly generated stacking sequence number text is automatically merged and stacked onto the preceding sequence number text to generate a merged stacking sequence number.

[0130] In the present embodiment, when the sequence stacking state represents that the stacking mode of the stacked sequence number text included in the sequence object to be converted is a separation mode, any stacked sequence number text is generated, and the preceding sequence number text of the stacked sequence number text is searched for according to the position coordinates of the sequence mark point of the stacked sequence number text; the separation mode represents that each stacked sequence number text is an independent block object; when the preceding sequence number text is found, the stacked sequence number text is merged and stacked to the preceding sequence number text to generate a converted sequence object; in this way, when the stacking mode of the stacked sequence number text in the sequence object to be converted is a separation mode, the stacked sequence number text is first generated, and then the corresponding preceding sequence number text is searched, and when the preceding sequence number text is found, the sequence number text stacking can be performed quickly and accurately, thereby ensuring the efficiency and accuracy of sequence object conversion.

[0131] In an exemplary embodiment, the method also includes: if no preceding sequence number text is found, canceling the generation of the stacking sequence number text and placing the stacking sequence number text at the end of the stacking sequence number text traversal set; traversing the stacking sequence number text in the stacking sequence number text traversal set, and returning to the step of generating the stacking sequence number text until each stacking sequence number text is merged into the preceding sequence number text corresponding to each stacking sequence number text to generate a converted sequence number object.

[0132] Among them, the stacking sequence number text traversal set can be a set including multiple stacking sequence number texts.

[0133] Optionally, if the preceding sequence number text is not found, the generation of the stacking sequence number text is canceled, the stacking sequence number text is placed at the end of the stacking sequence number traversal set, and other stacking sequence number texts are continued to be traversed and generated until all stacking text sequences find the preceding sequence number text to generate the converted sequence number object.

[0134] In the present embodiment, when the preceding sequence number text is not found, the generation of the stacked sequence number text is canceled, and the stacked sequence number text is placed at the end of the stacked sequence number text traversal set; the stacked sequence number texts in the stacked sequence number text traversal set are traversed, and the step of generating the stacked sequence number text is returned until each stacked sequence number text is merged into the preceding sequence number text corresponding to each stacked sequence number text to generate a converted sequence number object; in this way, when the stacking mode of the stacked sequence number text in the sequence number object to be converted is a separation mode, the stacked sequence number text is first generated, and then the corresponding preceding sequence number text is searched for; when the preceding sequence number text cannot be found, the generation of the stacked sequence number text is canceled, and the stacked sequence number text is placed at the end of the stacked sequence number text traversal set; sequence number text stacking is achieved by traversing other stacked sequence number texts in the stacked sequence number text traversal set, effectively avoiding the loss of sequence number text during sequence number object conversion due to stacked sequence number text recognition errors, thereby ensuring the efficiency and accuracy of sequence number object conversion.

[0135] In an exemplary embodiment, the graphic primitive objects to be converted include detailed list objects to be converted; according to the drawing source, the format conversion rules for each graphic primitive object to be converted in the drawing frame object to be converted are determined, including: according to the drawing source, the block object attributes of all row data of each column detailed list in the detailed list object to be converted are determined; when the block object attributes represent that all row data of any column detailed list belong to the same overall block object, the splitting method of the detailed list object to be converted is determined according to the number of overall block objects in the detailed list object to be converted and the target point information of each overall block object in the detailed list object to be converted; when the block object attributes represent that all row data of any column detailed list are single-row block objects, the splitting method of the detailed list object to be converted is determined according to the target point information of each single-row block object in the detailed list object to be converted.

[0136] The detail list object to be converted may refer to a detail list that is incompatible with the image editing software.

[0137] The block object attribute can indicate whether the n rows of data in each detail list are one whole block object or n single-row block objects. Figure 7 A schematic diagram of a detail list object is exemplarily provided. The detail list object is split into two columns. All row data of each column of the detail list belongs to an overall block object. Therefore, the detail list object is split into 2 columns, and the number of splits is 1.

[0138] The target point information of the whole block object may refer to any positioning point information of the whole block object. For example, the target point information of the whole block object may refer to Figure 7 The coordinate information corresponding to the upper right corner point shown may also be the coordinate information corresponding to other positioning points not shown. In practical applications, as long as the selected points are consistent, such as uniformly taking the upper right corner point or the lower left corner point, the splitting method can be accurately determined.

[0139] Optionally, the server obtains the graphic element information of the detail list object to be converted. For drawing scenarios with multi-column detail list splits, it is necessary to first determine the drawing source and distinguish whether the n rows of data in each column of the detail list are 1 whole block object or n single-row block objects. For the whole block object, it is determined whether there is a detail list split by counting the number of detail list block objects, and the number of rows of each detail list object and the target point information of the detail list object are obtained to finally determine the number of detail list splits and the number of rows generated by each split. For the single-row block object, it is determined whether there is a detail list split by calculating the target point information of each detail list object and determining whether the horizontal coordinate of the point is the same value. The number of detail list splits and the number of rows generated by each split are finally determined by calculating the number of different horizontal coordinates and the number of detail list rows with the same horizontal coordinate.

[0140] In this embodiment, the block object attributes of all the row data of each column of the detail list in the detail list object to be converted are determined according to the source of the drawing; when the block object attributes represent that all the row data of any column of the detail list belong to the same overall block object, the splitting method of the detail list object to be converted is determined according to the number of overall block objects in the detail list object to be converted and the target point information of each overall block object in the detail list object to be converted; when the block object attributes represent that all the row data of any column of the detail list are single-row block objects, the splitting method of the detail list object to be converted is determined according to the target point information of each single-row block object in the detail list object to be converted; in this way, it can be clearly determined whether the detail list object to be converted has been split and the splitting information, and the new detail list object in the same position can be completely restored in the converted drawing, avoiding the inefficient operation of only generating a new detail list object according to a single column when the splitting information cannot be determined, and then manually splitting the detail list again.

[0141] In another embodiment, Figure 8 As shown, a drawing format conversion method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0142] Step S802: when there is a drawing frame object to be converted in the current drawing, determine the file group code information of the drawing frame object, and determine the field information of the drawing source field in the file group code information.

[0143] Step S804, determining the drawing source of the current drawing according to the field information of the drawing source field; the current drawing includes graphic primitive objects to be converted that are incompatible with the drawing editing software.

[0144] Step S806: determining the format conversion rules of each graphic element object to be converted according to the drawing format conversion configuration information corresponding to the drawing source.

[0145] Step S808 , converting each primitive object to be converted using the format conversion rule corresponding to each primitive object to be converted, and obtaining a converted primitive object corresponding to each primitive object to be converted.

[0146] Step S810, generating a converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

[0147] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a drawing format conversion method mentioned above.

[0148] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0149] Based on the same inventive concept, the embodiment of the present application also provides a drawing format conversion device for implementing the drawing format conversion method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more drawing format conversion device embodiments provided below can refer to the limitations of the drawing format conversion method above, and will not be repeated here.

[0150] In an exemplary embodiment, Fig. 9 As shown, a drawing format conversion device is provided, including: a source determination module 902, a rule determination module 904, a graphic element conversion module 906 and a drawing conversion module 908, wherein:

[0151] The source determination module 902 is used to obtain the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the graphic primitive objects to be converted which are incompatible with the drawing editing software;

[0152] A rule determination module 904 is used to determine the format conversion rule of each graphic element object to be converted according to the drawing format conversion configuration information corresponding to the drawing source;

[0153] The primitive conversion module 906 is used to convert each primitive object to be converted by using the format conversion rule corresponding to each primitive object to be converted, and obtain a converted primitive object corresponding to each primitive object to be converted;

[0154] The drawing conversion module 908 is used to generate a converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

[0155] In an exemplary embodiment, the source determination module 902 is specifically used to determine the file group code information of the frame object when there is a frame object to be converted in the current drawing, and to determine the field information of the drawing source field in the file group code information; based on the field information of the drawing source field, determine the drawing source of the current drawing.

[0156] In an exemplary embodiment, the rule determination module 904 is specifically used to obtain the drawing format conversion configuration information corresponding to the standard drawing when the drawing source corresponds to a standard drawing; and determine the format conversion rules of each graphic object to be converted according to the format conversion parameters in the drawing format conversion configuration information.

[0157] In an exemplary embodiment, the graphic element objects to be converted include title bar objects to be converted, and the rule determination module 904 is specifically used to determine, in the case where the drawing source corresponds to multiple standard drawings, a target standard drawing that matches the graphic element information of the title bar object to be converted in each standard drawing; obtain the drawing format conversion configuration information corresponding to the target standard drawing, and determine the format conversion rules for each graphic element object to be converted according to the format conversion parameters in the drawing format conversion configuration information corresponding to the target standard drawing.

[0158] In an exemplary embodiment, the rule determination module 904 is specifically used to include: for any standard drawing of each standard drawing, obtaining the title bar information of the title bar object of any standard drawing; when the title bar information of the title bar object to be converted matches the title bar information of the title bar object of any standard drawing, taking any standard drawing as the target standard drawing.

[0159] In an exemplary embodiment, the title bar information of the title bar object to be converted includes the title bar size, title bar table structure and title bar custom area of ​​the title bar object to be converted, and the device also includes: a verification module, which is specifically used to match the title bar size of the title bar object to be converted with the title bar size of any standard drawing to obtain a first matching result; when the first matching result indicates a successful match, matching is performed based on whether the title bar table structure of the title bar object to be converted is the same as the title bar table structure of any standard drawing to obtain a second matching result; when the second matching result indicates a successful match, matching is performed based on whether the title bar custom area of ​​the title bar object to be converted is the same as the title bar custom area corresponding to any standard drawing to obtain a third matching result; when the third matching result indicates a successful match, it is determined that any standard drawing matches the title bar information of the title bar object to be converted.

[0160] In an exemplary embodiment, the graphic element object to be converted includes a serial number object to be converted; the serial number object to be converted is a block object including at least one serial number text; the graphic element information of the serial number object to be converted includes the serial number text and the serial number stacking state; the graphic element conversion module 906 is specifically used to determine the first serial number text of the serial number object to be converted according to the serial number text of the serial number object to be converted when the stacking mode of the stacked serial number text included in the serial number object to be converted represented by the serial number stacking state is an overall mode; the overall mode represents that each stacked serial number text belongs to the same block object; taking the first serial number text as the basic serial number text, the other serial number texts in the serial number object to be converted are sequentially merged into the basic serial number text to generate a converted serial number object; the other serial number texts are the serial number texts in the serial number object to be converted except the first serial number text.

[0161] In an exemplary embodiment, the device also includes: an object generation module, which is used to generate any stacked sequence number text when the stacking mode of the stacked sequence number text included in the sequence number object to be converted is a separation mode, and search for the preceding sequence number text of the stacked sequence number text according to the position coordinates of the sequence mark point of the stacked sequence number text; the separation mode represents that each stacked sequence number text is an independent block object; when the preceding sequence number text is found, the stacked sequence number text is merged and stacked to the preceding sequence number text to generate a converted sequence number object.

[0162] In an exemplary embodiment, the object generation module is also used to cancel the generation of the stacking sequence number text if the preceding sequence number text is not found, and place the stacking sequence number text at the end of the stacking sequence number text traversal set; traverse the stacking sequence number text in the stacking sequence number text traversal set, and return to the step of generating the stacking sequence number text until each stacking sequence number text is merged into the preceding sequence number text corresponding to each stacking sequence number text to generate a converted sequence number object.

[0163] In an exemplary embodiment, the graphic element object to be converted includes a detailed list object to be converted; the rule determination module 904 is specifically used to determine the block object attributes of all row data of each column detailed list in the detailed list object to be converted according to the drawing source; when the block object attribute represents that all row data of any column detailed list belongs to the same overall block object, the splitting method of the detailed list object to be converted is determined according to the number of overall block objects in the detailed list object to be converted and the target point information of each overall block object in the detailed list object to be converted; when the block object attribute represents that all row data of any column detailed list is a single-row block object, the splitting method of the detailed list object to be converted is determined according to the target point information of each single-row block object in the detailed list object to be converted.

[0164] Each module in the above-mentioned drawing format conversion device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0165] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store drawing format conversion data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a drawing format conversion method is implemented.

[0166] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0167] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned drawing format conversion method. The steps of the drawing format conversion method here may be the steps of the drawing format conversion method in each of the above-mentioned embodiments.

[0168] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned drawing format conversion method. The steps of the drawing format conversion method here can be the steps of the drawing format conversion method in each of the above-mentioned embodiments.

[0169] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, causes the processor to execute the steps of the above-mentioned drawing format conversion method. The steps of the drawing format conversion method here may be the steps of the drawing format conversion method in each of the above-mentioned embodiments.

[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A drawing format conversion method, characterized in that: The method comprises: Acquire the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the graphic primitive objects to be converted which are incompatible with the drawing editing software; Determining format conversion rules for each of the graphic primitive objects to be converted according to the drawing format conversion configuration information corresponding to the drawing source; Using the format conversion rules corresponding to the graphic primitive objects to be converted, converting the graphic primitive objects to be converted, and obtaining converted graphic primitive objects corresponding to the graphic primitive objects to be converted; A converted drawing corresponding to the current drawing is generated according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

2. The method according to claim 1, characterized in that The drawing source of the current drawing opened by the drawing editing software is obtained, including: In the case that the current drawing has a drawing frame object to be converted, determining the file group code information of the drawing frame object, and determining the field information of the drawing source field in the file group code information; The drawing source of the current drawing is determined according to the field information of the drawing source field.

3. The method according to claim 1, characterized in that The step of determining the format conversion rules of each of the graphic primitive objects to be converted according to the drawing format conversion configuration information corresponding to the drawing source includes: In the case where the drawing source corresponds to a standard drawing, obtaining drawing format conversion configuration information corresponding to the standard drawing; According to the format conversion parameters in the drawing format conversion configuration information, the format conversion rules of each of the graphic primitive objects to be converted are determined.

4. The method according to claim 1, characterized in that: The graphic primitive objects to be converted include title bar objects to be converted, and the format conversion rules of the graphic primitive objects to be converted are determined according to the drawing format conversion configuration information corresponding to the drawing source, including: In the case where the drawing source corresponds to multiple standard drawings, determining a target standard drawing that matches the title block information of the title block object to be converted from each of the standard drawings; The drawing format conversion configuration information corresponding to the target standard drawing is obtained, and the format conversion rule of each of the graphic primitive objects to be converted is determined according to the format conversion parameters in the drawing format conversion configuration information corresponding to the target standard drawing.

5. The method according to claim 4, characterized in that The step of determining a target standard drawing that matches the title block information of the title block object to be converted from each of the standard drawings includes: For any standard drawing of each of the standard drawings, obtain the title bar information of the title bar object of the any standard drawing; In the case where the title block information of the title block object to be converted matches the title block information of the title block object of any standard drawing, the any standard drawing is used as the target standard drawing.

6. The method according to claim 5, characterized in that The title bar information of the title bar object to be converted includes the title bar size, the title bar table structure and the title bar custom area of ​​the title bar object to be converted, and the method further includes: Based on whether the title bar size of the title bar object to be converted is the same as the title bar size of any standard drawing, a first matching result is obtained; When the first matching result indicates a successful match, matching is performed based on whether the title block table structure of the title block object to be converted is the same as the title block table structure of any standard drawing to obtain a second matching result; When the second matching result indicates a successful match, matching is performed based on whether the title block custom area of ​​the title block object to be converted is the same as the title block custom area corresponding to any one of the standard drawings to obtain a third matching result; When the third matching result indicates a successful match, it is determined that any one of the standard drawings matches the title block information of the title block object to be converted.

7. The method according to claim 1, characterized in that The to-be-converted primitive object includes a to-be-converted serial number object; the to-be-converted serial number object is a block object including at least one serial number text; the primitive information of the to-be-converted serial number object includes the serial number text and the serial number stacking state; the format conversion rule corresponding to each of the to-be-converted primitive objects is used to convert each of the to-be-converted primitive objects to obtain the converted primitive objects corresponding to each of the to-be-converted primitive objects, including: In the case where the sequence stacking state represents that the stacking mode of the stacked sequence texts included in the sequence object to be converted is an overall mode, the first sequence text of the sequence object to be converted is determined according to the sequence text of the sequence object to be converted; the overall mode represents that each of the stacked sequence texts belongs to the same block object; Taking the first sequence text as the basic sequence text, the other sequence texts in the sequence object to be converted are sequentially merged into the basic sequence text to generate a converted sequence object; the other sequence texts are the sequence texts in the sequence object to be converted except the first sequence text.

8. The method according to claim 7, characterized in that The method further comprises: In the case where the stacking mode of the stacked sequence number text included in the sequence number object to be converted is a separation mode, any stacked sequence number text is generated, and the preceding sequence number text of the stacked sequence number text is searched according to the position coordinates of the sequence number mark point of the stacked sequence number text; the separation mode represents that each stacked sequence number text is an independent block object; When the preceding sequence number text is found, the stacked sequence number text is merged and stacked onto the preceding sequence number text to generate the converted sequence number object.

9. The method according to claim 8, characterized in that The method further comprises: If the preceding sequence number text is not found, cancel the generation of the stacking sequence number text, and place the stacking sequence number text at the end of the stacking sequence number text traversal set; Traverse the stacking sequence number texts in the stacking sequence number text traversal set, and return to the step of generating the stacking sequence number texts, until each of the stacking sequence number texts is merged into the preceding sequence number text corresponding to each of the stacking sequence number texts, so as to generate the converted sequence number object.

10. The method according to claim 1, characterized in that The graphic primitive objects to be converted include detailed list objects to be converted; and determining, according to the drawing source, format conversion rules for each graphic primitive object to be converted in the drawing frame object to be converted, includes: According to the drawing source, determining the block object attributes of all row data of each column of the detail list object to be converted; In the case where the block object attribute indicates that all row data of any column list belong to the same overall block object, determining a splitting method of the detail list object to be converted according to the number of the overall block objects in the detail list object to be converted and target point information of each of the overall block objects in the detail list object to be converted; When the block object attribute indicates that all row data of any column list are single-row block objects, the splitting method of the detail list object to be converted is determined according to the target point information of each single-row block object in the detail list object to be converted.

11. A drawing format conversion device, characterized in that: The device comprises: A source determination module, used for obtaining the drawing source of the current drawing opened by the drawing editing software; the current drawing includes the graphic primitive objects to be converted which are incompatible with the drawing editing software; A rule determination module, used to determine the format conversion rule of each of the to-be-converted graphic primitive objects according to the drawing format conversion configuration information corresponding to the drawing source; A primitive conversion module, used to convert each primitive object to be converted by using a format conversion rule corresponding to each primitive object to be converted, to obtain a converted primitive object corresponding to each primitive object to be converted; The drawing conversion module is used to generate a converted drawing corresponding to the current drawing according to the graphic element information corresponding to each converted graphic element object; the file format of the converted drawing is a compatible file format of the drawing editing software.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Management method of graphs based on dwg and dxf file formats

    CN104679814A

  • Method and device for converting various graphic model file formats into uniform format, and equipment

    CN113536739A

  • Method, system and device for converting format of DWG drawing

    CN116166630A

  • Layering program of CAD drawing data, recording medium and device therefor, and layering system therefor, and CAD drawing reference data checking device

    JP2008033875A

  • DXF / KXF data format translation method

    KR1019980068226A