System and method for quickly changing drawing unit

By identifying and batch converting the dimension markings, text annotations and element attribute parameters in mining drawings, the problems of inefficiency and high error risk caused by the differences in drawing units between the design institute and coal mine enterprises are solved, and the automatic rapid switching of drawing units and accuracy guarantee is achieved.

CN120579356AActive Publication Date: 2025-09-02CHINA COAL (TIANJIN) UNDERGROUND ENG INTELLIGENCE RES INST CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511079736.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-09-02
Estimated Expiration
2045-08-04

AI Technical Summary

Technical Problem

In the field of mining engineering, design institutes and coal mine enterprises lack batch processing capabilities and synchronous update functions during drawing handover due to the use of different drawing units (mm and meters).

Method used

Read drawing files through the CAD underlying interface, identify dimension annotations, text annotations and element attribute parameters, build a standardized conversion rule library, set conversion rules and exception processing rules for dimension annotations, text annotations and element attribute parameters, batch convert drawing units, and perform proportional consistency verification to generate new drawing files that meet the target units.

Benefits of technology

It realizes automatic and rapid switching of drawing units, reduces human error, improves drawing coordination efficiency, shortens conversion time, and ensures the accuracy and standardization of drawings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579356A_ABST
    Figure CN120579356A_ABST
Patent Text Reader

Abstract

The invention discloses a system and a method for quickly changing drawing units in the technical field of mining engineering design and computer aided design. The method comprises the following steps of: reading a drawing file through a CAD (Computer Aided Design) underlying interface, and identifying coordinate values and text contents of size marks, text annotations and primitive attribute parameters; constructing a standardized conversion rule base, and setting conversion rules and exception processing rules of size marks, character annotations and primitive attribute parameters; according to a conversion rule and an exception processing rule, carrying out batch conversion on the identified coordinate values of the size marks, the character annotations and the primitive attribute parameters and the text content, and synchronously adjusting primitive coordinates and scale factors; and performing proportion consistency verification on the converted drawing to generate a new drawing file conforming to the target unit. According to the method, batch conversion of mining drawings from millimeter units to meter units is realized through programmed processing, the drawing cooperation efficiency of design and production units is improved, and the accuracy and normalization of engineering drawings are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a system and method for quickly changing drawing units, belonging to the technical field of mining engineering design and computer-aided design. Background Art

[0002] In the field of mining engineering, design institutes typically use millimeters (mm) as the unit of measurement for design drawings, while coal mining companies, for ease of on-site construction management, are accustomed to using meters (m) as the unit of measurement. This difference in unit system leads to inefficient manual conversion, inconsistent standards, extended collaboration cycles, and a high risk of errors when handing over drawings.

[0003] Existing CAD software offers unit modification capabilities for single dimension annotations, but these capabilities lack batch processing capabilities and prevent simultaneous updates of geometric parameters and text annotations. For mining drawings containing specialized symbols (such as anchor bolt spacing and tunnel cross-sectional dimensions), traditional methods struggle to meet automated conversion requirements, necessitating an efficient and rapid unit change solution. Summary of the Invention

[0004] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a system and method for quickly changing drawing units. Through programmed processing, batch conversion of mining drawings from millimeters to meters can be realized, solving the problems of low efficiency and large errors in traditional manual conversion, improving the drawing collaboration efficiency between design and production units, and ensuring the accuracy and standardization of engineering drawings.

[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions: In a first aspect, the present invention provides a method for quickly changing drawing units, comprising: Read drawing files through the CAD underlying interface and identify the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and element attribute parameters; According to the conversion rules and exception processing rules, the coordinate values ​​and text contents of the recognized dimension annotations, text annotations and element attribute parameters are batch converted, and the element coordinates and scale factors are adjusted synchronously; Perform scale consistency check on the converted drawings and generate new drawing files that conform to the target units; The dimension chain coordinator is used to dynamically compensate the drawing file for the dimension chain and automatically update the dimension entity. The dynamic compensation formula of the dimension chain is: Where, is the corrected size value; The initial conversion value for a single dimension; It is the sum of the initial conversion values ​​of all dimensions in the current dimension chain; It is the sum of the original dimension values ​​of the current dimension chain.

[0006] Furthermore, the recognition of dimension annotations includes: obtaining the annotation values ​​and unit suffixes of linear annotations, angular annotations and radius annotations through DXF / DWG file format parsing; the unit conversion of text annotations includes: automatically identifying unit keywords, replacing text content according to rules and adjusting the font display ratio; the graphic element attribute parameters include: line length, arc radius and fill area, and the geometric relationship remains unchanged during the conversion of graphic element attribute parameters, and only the numerical unit is changed.

[0007] Furthermore, the conversion rules and exception handling rules for dimension annotations, text annotations and graphic attribute parameters include: numerical conversion rules, text replacement rules and exception handling rules; the numerical conversion rules include: conversion of millimeters to 1000 times of meters, supporting customized decimal places; the text replacement rules include: replacing "mm" with "m" and adjusting the unit description in the text annotations; the exception handling rules include: setting a unit conversion whitelist for special graphics, and the special graphics include legend descriptions and non-dimension text.

[0008] Furthermore, based on the conversion rules and exception handling rules, the coordinate values ​​and text contents of the recognized dimension annotations, text annotations, and primitive attribute parameters are batch converted, and the primitive coordinates and scale factors are adjusted synchronously, including: For dimension annotations, the measurement values ​​are obtained, converted, and the annotation text and associated geometric coordinates are updated; For text annotations, regular expressions are used to match unit keywords, replace the text content, and adjust the font height proportionally; For the attribute parameters of graphic elements, the values ​​are updated synchronously and the graphic proportions are kept unchanged.

[0009] Furthermore, the converted drawings are checked for scale consistency to generate new drawing files that conform to the target units. This includes checking the closure of the dimension chain of the converted drawings, comparing the deviations of key node coordinates before and after conversion, and generating new drawing files only when the deviations do not exceed the allowable error. The original layer structure and naming rules are retained, and a "unit conversion completed" version mark is added.

[0010] Furthermore, it also includes: Use a word processor to perform text adaptive scaling on the drawing file and directly control the display properties of the text entity. The formula is: Where, The height of the text after processing; is the original text height; is the unit conversion ratio; The geometric coordinates of the drawing file are quickly corrected through the geometric verification engine to generate the coordinate data that is finally written into the file. The formula is: Where, is the final effective coordinate value; is the original coordinate value; is the coordinate after direct conversion; is the tolerance threshold; is the curvature constraint compensation; is the local curvature.

[0011] In a second aspect, the present invention provides a system for quickly changing drawing units, comprising: Drawing parsing module: reads drawing files through the CAD underlying interface and identifies the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Unit mapping module: Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and primitive attribute parameters; Parameter conversion module: Batch convert the coordinate values ​​and text contents of recognized dimension annotations, text annotations, and primitive attribute parameters according to conversion rules and exception processing rules, and synchronously adjust primitive coordinates and scale factors; Verification output module: performs scale consistency verification on the converted drawing and generates a new drawing file that conforms to the target unit. The verification output module performs dynamic dimensional chain compensation on the drawing file through the dimensional chain coordinator and automatically updates it to the annotation entity. The dynamic dimensional chain compensation formula is: Where, is the corrected size value; The initial conversion value for a single dimension; It is the sum of the initial conversion values ​​of all dimensions in the current dimension chain; It is the sum of the original dimension values ​​of the current dimension chain.

[0012] In a third aspect, the present invention provides a device for rapidly changing drawing units, comprising a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of any of the above methods.

[0013] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. This solution addresses the need for conversion of drawing units between mining design institutes and coal mining enterprises. By parsing drawing elements, establishing unit mapping relationships, batch parameter conversion, and implementing a dynamic verification mechanism, it enables automated and rapid switching of drawing units. It can automatically identify elements such as dimension annotations, text annotations, and primitive attribute parameters in drawings, complete unit conversions according to preset rules, and maintain consistent drawing proportions. This method can reduce the time required for traditional manual unit conversion from several hours to minutes, significantly reducing human error and improving the efficiency of collaborative mining engineering drawing work. Second, this solution utilizes a dimensional chain proportional distribution model, requiring only a single cumulative calculation to complete closed-loop correction. This significantly improves efficiency compared to traditional manual verification, eliminates the risk of progressive errors, and provides dynamic compensation while balancing efficiency. Text scaling rules are intelligently implemented through simple logical branching, avoiding complex parameter configuration while ensuring the readability of key information and enabling rule-driven text processing. A threshold trigger mechanism concentrates the computational load on key outlier points, eliminating the need for additional calculations for most coordinate points. This supports millisecond-level response and enables lightweight geometric correction. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which constitute part of the present invention, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings: Figure 1 This is a flowchart of a method for quickly changing drawing units provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0016] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other.

[0017] The following detailed description is an exemplary description and is intended to provide further detailed description of the present invention. Unless otherwise indicated, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention.

[0018] Example 1: See also Figure 1 This embodiment provides a method for quickly changing drawing units, including the following core technical solutions: S1. Drawing element analysis. Read the drawing file through the CAD underlying interface and identify the coordinate values ​​and text content of elements such as dimension annotations, text annotations, and element attribute parameters, including: Read DWG / DXF format drawings through CAD secondary development interfaces (such as ObjectARX), traverse all graphic entities, identify dimension annotations (linear, angular, radial, etc.), text annotations (including unit descriptions), and primitive attribute parameters (such as line segment length and arc radius), and create an element parameter list containing coordinate values ​​and text content; It should be noted that the recognition of dimension annotations includes linear annotations, angular annotations, radius annotations and other types, and the annotation values ​​and unit suffixes are obtained through parsing the DXF / DWG file format; the unit conversion of text annotations includes automatic recognition of unit keywords such as "mm" and "meter", replacing text content according to rules and adjusting the font display ratio; graphic attribute parameters include line length, arc radius, fill area, etc. The geometric relationship remains unchanged during conversion, and only the numerical unit is changed.

[0019] S2. Unit mapping definition. Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and element attribute parameters, including: (1) Numerical conversion rules: millimeters → meters times 1000, support for custom decimal places (such as 3 decimal places by default); (2) Text replacement rules: automatically replace "mm" with "m" and adjust the unit description in the text annotation (e.g. "500mm" is converted to "0.5m"); (3) Exception handling rules: Set a unit conversion whitelist for special graphics elements (such as legends and non-dimension text).

[0020] S3. Parameter batch conversion. Based on the conversion rules and exception handling rules, batch convert the coordinate values ​​and text content of the recognized dimension annotations, text annotations, and primitive attribute parameters, and simultaneously adjust the primitive coordinates and scale factors, including: For dimension annotations, the measurement values ​​are obtained, converted, and the annotation text and associated geometric coordinates are updated; For text annotations, regular expressions are used to match unit keywords, replace the text content, and proportionally adjust the font height (for example, if the original font height is 3.5mm, the font height will be proportionally enlarged when it is displayed as 3.5m after conversion); For element attribute parameters, such as polyline length, circle area, etc., the values ​​are updated synchronously and the graphic proportions are kept unchanged.

[0021] S4. Verification and output. Perform a scale consistency check on the converted drawing and generate a new drawing file that conforms to the target unit (meter / mm), including: Automatically check the closure of the dimension chain of the converted drawing and compare the deviation of the key node coordinates before and after conversion (allowable error ≤ 0.001m); Generate a new drawing file, retain the original layer structure and naming rules, and add a "Unit conversion completed" version mark.

[0022] This example uses a coal mine pit parking lot layout drawing as an example. The original drawing is a millimeter-based DWG file provided by a design institute. It contains 2,376 dimension annotations, 158 text annotations, and 429 graphic objects. It needs to be converted to meters for enterprise construction use. The system operation process is as follows: Rule configuration: In the system interface, set the conversion rule to "millimeter → meter", the text replacement rule to "mm replaced by m, the value divided by 1000", and the exception processing setting to "Legend text is not converted".

[0023] Batch conversion: After clicking the "Start Conversion" button, the system processes in parallel: Dimension annotation: For example, the original dimension value "500" is converted to "0.500", and the dimension text "500mm" becomes "0.500m"; Text annotation: For example, "lane net width 5000mm" is converted to "lane net width 5.000m", and the font height is enlarged proportionally; Element attribute parameters: For example, for a line segment with a length of 10000mm, the coordinate value is automatically divided by 1000 to keep the relative position of the endpoints unchanged.

[0024] Verify output: Generate a new DWG file after converting units.

[0025] This solution has the following improvements: Improved efficiency: Unit conversion time is shortened from the traditional 4 hours / sheet to 0.5 minutes / sheet, increasing efficiency by 480 times; Error reduction: The manual conversion error rate is reduced from 15% to below 0.3%, and the accuracy of key dimension conversion reaches 100%; Standardization and unification: Ensure that all drawings are converted to the same standard through a rule library, eliminating human differences; Collaboration acceleration: The drawing handover cycle is shortened by 50%, supporting real-time feedback between design and production; Strong compatibility: supports unit conversion of special mining graphics (such as tunnel sections and support structures).

[0026] In the description of this invention, the element types used for drawing parsing and the configuration of unit conversion rules are not to be construed as limitations of this invention. The specific implementation language of the system module (e.g., C#) and drawing format compatibility (DWG / DXF / ZWCAD) also do not limit the scope of protection.

[0027] During the unit conversion process, there are also problems such as the cumulative errors of multiple dimension annotations that destroy the design closure, the distortion of engineering semantics and readability after unit conversion, and the breakage of geometric topological relationships caused by discrete coordinate conversion. This solution further proposes dynamic compensation of dimensional chains, adaptive text scaling, and rapid correction of geometric coordinates to solve these problems. Specifically, it includes: 1. Use the dimensional chain coordinator to perform dynamic dimensional chain compensation (linear weighted model) on the drawing file and automatically update it to the dimension entity. The formula is: Where, is the corrected size value; The initial conversion value of a single dimension (unit: m); The sum of the initial conversion values ​​of all dimensions in the current dimension chain (unit: m); The sum of the original dimension values ​​of the current dimension chain (unit: mm). For example, if the original total of the axis dimension chain is 60,000 mm, the converted theoretical value is 60 m. If the initial cumulative value is 60.015 m, then "24.000 m" is corrected to 24.000 ÷ 60.015 × 60 = 23.998 m.

[0028] Second, use a word processor to perform adaptive text scaling (piecewise linear function) on the drawing file to directly control the display properties of the text entity. The formula is: Where, The height of the text after processing; is the original text height; Unit conversion ratio; for example: key dimension "3500mm" (dimension mark text) → height is enlarged to 1.2 times the original; legend "Do not scale" (legend description text) → height is reduced to 0.8 times.

[0029] 3. Use the geometry verification engine to quickly correct the geometric coordinates of the drawing file (threshold trigger mechanism) to generate the coordinate data that is finally written into the file. The formula is: Where, is the final effective coordinate value; is the original coordinate value (unit: mm); P conv is the coordinate after direct conversion (unit: m); is the tolerance threshold (default 0.0005m); is the curvature constraint compensation; This is the local curvature (calculated from adjacent primitives, unitless). For example, the original coordinates of an arc control point (12,500mm,8,430mm) are directly converted to (12.500m,8.430m). If the detection deviation is greater than 0.0005m, a ±0.001m compensation is added based on the curvature.

[0030] This solution utilizes the dimensional chain proportional distribution model to complete closed-loop correction with only a single cumulative calculation. Compared with traditional manual verification, this solution significantly improves efficiency and eliminates the risk of progressive errors, while also providing dynamic compensation that balances efficiency. The text scaling rule is made intelligent through simple logical branching, avoiding complex parameter configuration while ensuring the readability of key information and implementing rule-driven text processing. The threshold trigger mechanism concentrates the computational load on key outlier points, eliminating the need for additional calculations for most coordinate points, supporting millisecond-level response, and enabling lightweight geometric correction.

[0031] Example 2: A system for quickly changing drawing units can implement the method for quickly changing drawing units described in embodiment 1, including: Drawing parsing module: used to read drawing files and identify various graphic elements and parameters. The drawing parsing module is developed based on the CAD underlying API to realize the reading of drawing files and element identification, and output element parameter sets containing coordinates, values, and text, including: reading drawing files through the CAD underlying interface, and identifying the coordinate values ​​and text content of dimension annotations, text annotations, and graphic attribute parameters.

[0032] Unit mapping module: used to store unit conversion rules and exception handling logic. The unit mapping module uses JSON format to store conversion rules, supports importing user-defined rules, and provides rule testing and preview functions, including: building a standardized conversion rule library, setting conversion rules and exception handling rules for dimension annotations, text annotations, and element attribute parameters.

[0033] Parameter conversion module: used to perform numerical conversion, text replacement and primitive scale adjustment. The parameter conversion module includes a numerical calculation engine, a text processing engine, and a primitive operation engine to realize parallel conversion processing of three types of elements, including: batch conversion of the coordinate values ​​and text content of recognized dimension annotations, text annotations and primitive attribute parameters according to conversion rules and exception processing rules, and synchronous adjustment of primitive coordinates and scale factors.

[0034] Verification Output Module: Used to verify conversion accuracy and generate new drawing files. The Verification Output Module integrates geometric verification algorithms and drawing export functions, supports PDF / DWG dual-format output and conversion log generation, including: proportional consistency verification of converted drawings and generation of new drawing files that conform to the target units.

[0035] It should be noted that the drawing parsing module is developed based on ObjectARX and obtains the geometric data and attribute information of CAD entities through the AcDbObject class interface; the unit mapping module supports custom conversion rules, allowing users to add unit conversion exceptions for special entities.

[0036] Example 3: An embodiment of the present invention further provides a device for quickly changing drawing units, which can implement the method for quickly changing drawing units described in the first embodiment, including a processor and a storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the following method: Read drawing files through the CAD underlying interface and identify the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and element attribute parameters; According to the conversion rules and exception processing rules, the coordinate values ​​and text contents of the recognized dimension annotations, text annotations and element attribute parameters are batch converted, and the element coordinates and scale factors are adjusted synchronously; Perform scale consistency check on the converted drawings and generate new drawing files that conform to the target units.

[0037] Example 4: An embodiment of the present invention further provides a computer-readable storage medium that can implement the method for quickly changing drawing units described in embodiment 1. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the following steps: Read drawing files through the CAD underlying interface and identify the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and element attribute parameters; According to the conversion rules and exception processing rules, the coordinate values ​​and text contents of the recognized dimension annotations, text annotations and element attribute parameters are batch converted, and the element coordinates and scale factors are adjusted synchronously; Perform scale consistency check on the converted drawings and generate new drawing files that conform to the target units.

[0038] It is understood from common technical knowledge that the present invention may be implemented by other embodiments that do not depart from its spirit or essential features. Therefore, the embodiments disclosed above are, in all respects, merely illustrative and not exclusive. All modifications within the scope of the present invention or equivalent to the scope of the present invention are intended to be encompassed by the present invention.

[0039] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0040] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0041] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0042] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0043] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A method for quickly changing drawing units, characterized in that: include: Read drawing files through the CAD underlying interface and identify the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and element attribute parameters; According to the conversion rules and exception processing rules, the coordinate values ​​and text contents of the recognized dimension annotations, text annotations and element attribute parameters are batch converted, and the element coordinates and scale factors are adjusted synchronously; Perform scale consistency check on the converted drawings and generate new drawing files that conform to the target units; The dimension chain coordinator is used to dynamically compensate the drawing file for the dimension chain and automatically update the dimension entity. The dynamic compensation formula of the dimension chain is: Where, is the corrected size value; The initial conversion value for a single dimension; It is the sum of the initial conversion values ​​of all dimensions in the current dimension chain; It is the sum of the original dimension values ​​of the current dimension chain.

2. The method for quickly changing drawing units according to claim 1, characterized in that: The recognition of dimension annotations includes: obtaining the annotation values ​​and unit suffixes of linear annotations, angular annotations and radius annotations through DXF / DWG file format parsing; the unit conversion of text annotations includes: automatically identifying unit keywords, replacing text content according to rules and adjusting the font display ratio; the graphic element attribute parameters include: line length, arc radius and fill area, and the geometric relationship remains unchanged during the conversion of graphic element attribute parameters, only the numerical unit is changed.

3. The method for quickly changing drawing units according to claim 1, wherein: The conversion rules and exception handling rules for dimension annotations, text annotations and graphic element attribute parameters include: numerical conversion rules, text replacement rules and exception handling rules; the numerical conversion rules include: conversion of millimeters to 1000 times of meters, supporting customized decimal places; the text replacement rules include: replacing "mm" with "m" and adjusting the unit description in the text annotation; the exception handling rules include: setting a unit conversion whitelist for special graphics elements, and the special graphics elements include legend descriptions and non-dimension text.

4. The method for quickly changing drawing units according to claim 1, wherein: Based on the conversion rules and exception handling rules, the coordinate values ​​and text contents of recognized dimension annotations, text annotations, and entity attribute parameters are batch converted, and the entity coordinates and scale factors are adjusted synchronously, including: For dimension annotations, the measurement values ​​are obtained, converted, and the annotation text and associated geometric coordinates are updated; For text annotations, regular expressions are used to match unit keywords, replace the text content, and adjust the font height proportionally; For the attribute parameters of graphic elements, the values ​​are updated synchronously and the graphic proportions are kept unchanged.

5. The method for quickly changing drawing units according to claim 1, wherein: Perform a scale consistency check on the converted drawing and generate a new drawing file that conforms to the target units. This includes checking the closure of the dimension chain of the converted drawing, comparing the deviations of key node coordinates before and after conversion, and only generating a new drawing file when the deviation does not exceed the allowable error. The original layer structure and naming rules are retained, and a "Unit Conversion Completed" version indicator is added.

6. The method for quickly changing drawing units according to claim 1, characterized in that: include: Use a word processor to perform text adaptive scaling on the drawing file and directly control the display properties of the text entity. The formula is: Where, The height of the text after processing; is the original text height; is the unit conversion ratio; The geometric coordinates of the drawing file are quickly corrected through the geometric verification engine to generate the coordinate data that is finally written into the file. The formula is: Where, is the final effective coordinate value; is the original coordinate value; is the coordinate after direct conversion; is the tolerance threshold; is the curvature constraint compensation; is the local curvature.

7. A system for rapidly changing drawing units, characterized in that: include: Drawing parsing module: reads drawing files through the CAD underlying interface and identifies the coordinate values ​​and text content of dimension annotations, text annotations, and element attribute parameters; Unit mapping module: Build a standardized conversion rule library to set conversion rules and exception handling rules for dimensioning, text annotations, and primitive attribute parameters; Parameter conversion module: Batch convert the coordinate values ​​and text contents of recognized dimension annotations, text annotations, and primitive attribute parameters according to conversion rules and exception processing rules, and synchronously adjust primitive coordinates and scale factors; Verification output module: performs scale consistency verification on the converted drawing and generates a new drawing file that conforms to the target unit. The verification output module performs dynamic dimensional chain compensation on the drawing file through the dimensional chain coordinator and automatically updates it to the annotation entity. The dynamic dimensional chain compensation formula is: Where, is the corrected size value; The initial conversion value for a single dimension; It is the sum of the initial conversion values ​​of all dimensions in the current dimension chain; It is the sum of the original dimension values ​​of the current dimension chain.

8. A device for quickly changing drawing units, characterized in that: including processors and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 6.

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

Citation Information

Patent Citations

  • Dimension chain checking method based on three-dimensional model

    CN103310058A

  • Vertical graph identification method for converting architectural drawing into three-dimensional BIM model

    CN109993827A

  • Parameterization process compiling method

    CN114386125A

  • Water conservancy project CAD drawing examination method and system based on ezdxf library

    CN118965507A

  • Intelligent labeling method and plug-in for CAD (Computer Aided Design) drawing

    CN120235989A