Programming method of image measurement software
By interpreting elements in CAD files and labeling codes, automatically establishing a database and generating measurement programs, the problem of long manual compilation time and prone to errors in the existing technology is solved, and efficient and accurate image measurement software programming is achieved.
Patent Information
- Application Number
- CN202411889255.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the CAD automatic programming function, existing image measurement software needs to manually compare the control items marked by CAD, select the measurement elements that need to be controlled and enter the tolerance items, resulting in long programming time, prone to errors and high requirements for operator training.
By interpreting elements and labeling codes in CAD/DXF files, filtering redundant items, automatically establishing a database of measurement elements and tolerance definitions, automatically generating measurement programs and tolerance calculation programs, reducing manual compilation and entry steps.
Automatic screening and generation of measurement programs is realized, reducing manual errors, improving programming efficiency and the efficiency of measurement equipment, and reducing the training cost and time of operators.
Smart Images

Figure CN120010820A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image programming, in particular to a programming method for image measurement software. Background Art
[0002] The existing image measurement software for automatic CAD programming functions all import CAD file graphics. Because the control items are usually only part of the entire CAD graphics, it is necessary to manually compare the control items marked in CAD, select the measurement elements that need to be controlled (points, lines, circles, arcs, ellipses, square holes, keyways, polylines, etc.) to generate a measurement program, and at the same time, it is necessary to manually enter the tolerance items that need to be controlled, theoretical values, tolerance bands, etc., in order to complete the compilation of a complete image measurement program. Usually, the compilation time of a program is 10-30 minutes. When the measurement workpiece size is large, the programming time is as high as 60 minutes. The operator training requirements are high, the workload of measurement program compilation is large, the input process is prone to errors, and the efficiency of measurement equipment is low. Summary of the invention
[0003] 1. Technical issues to be solved
[0004] In view of the deficiencies in the prior art, the present invention provides a programming method for image measurement software, which solves the problems raised in the above background technology.
[0005] (II) Technical solution
[0006] The present invention provides the following technical solution: a programming method for image measurement software, the working process of the method is as follows:
[0007] Step 1: Decode all elements in the CAD / DXF file and generate the original element database #DBF1.
[0008] Step 2: Decipher the dimension group codes and dimension styles in the CAD / DXF file.
[0009] Step 3: Filter the redundant items in database #DBF1 by marking the position information in the group code, and retain the measurement elements that need to be controlled in database #DBF2.
[0010] Step 4: Decode the data packet in the annotation group code to obtain the corresponding tolerance type, theoretical value, tolerance zone, establish a corresponding relationship with the measurement elements retained in the database #DBF2, and generate the tolerance definition database #DBTOL.
[0011] Step 5: Automatically generate the measurement program of the control element based on the database #DBF2.
[0012] Step 6: Automatically generate a calculation program for control tolerances based on the tolerance database #DBTOL.
[0013] Preferably, all elements in step 1 include points, straight lines, circles, arcs, ellipses, polylines, and spline curves.
[0014] Preferably, the annotation group codes in step 2 include alignment, linearity, corner, radius, diameter, angle, and coordinates.
[0015] Preferably, the software filters out redundant elements in CAD that are not relevant to the measurement by interpreting and identifying the position information of the annotation items in the CAD.
[0016] Preferably, by interpreting the content of the CAD annotation item, the tolerance definition type, associated elements, theoretical values, and tolerance band definition corresponding to the annotation are obtained, and the program automatically generates the tolerance calculation program that needs to be controlled.
[0017] Compared with the prior art, the present invention provides a programming method for image measurement software, which has the following beneficial effects:
[0018] 1. The programming method of the image measurement software. For projects that require tolerance control, theoretical values and tolerance bands will be marked in CAD drawings. The manual compilation standard of the measurement program is also based on this CAD tolerance marking. The software interprets and identifies the position information of the marked items in CAD, filters out redundant elements in CAD that are not related to measurement, and does not require manual screening. The program automatically selects the measurement elements that need to be controlled.
[0019] 2. The programming method of the image measurement software interprets the content of the CAD annotation item to obtain the tolerance definition type, associated elements, theoretical value, and tolerance zone definition corresponding to the annotation; the program automatically generates the tolerance calculation program that needs to be controlled. Since the tolerance data comes from the original CAD / DXF design document, errors in the manual data entry process are prevented. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 Schematic diagram of the method system of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] See also Figure 1 , a programming method for image measurement software, the workflow is as follows:
[0023] 1. Interpret all elements in CAD / DXF files (including points, lines, circles, arcs, ellipses, polylines, splines) and generate original element database (#DBF1).
[0024] 2. Decode the annotation group codes (including alignment, linear, corner, radius, diameter, angle, coordinate) and annotation styles in CAD / DXF files.
[0025] 3. By marking the position information in the group code, filter the redundant items in the database (#DBF1) and retain the measurement elements that need to be controlled in the database (#DBF2).
[0026] 4. By interpreting the data packet in the annotation group code, obtain the corresponding tolerance type, theoretical value, and tolerance zone. Establish a corresponding relationship with the measurement elements retained in the database (#DBF2) and generate a tolerance definition database (#DBTOL).
[0027] 5. Automatically generate measurement procedures for control elements based on the database (#DBF2).
[0028] 6. Automatically generate calculation procedures for control tolerances based on the tolerance database (#DBTOL).
[0029] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A programming method for image measurement software, characterized in that: The workflow of this method is as follows: Step 1: Decode all elements in the CAD / DXF file and generate the original element database #DBF1; Step 2: Decode the annotation group code and annotation style in the CAD / DXF file; Step 3: Filter the redundant items in database #DBF1 by marking the position information in the group code, and keep the measurement elements that need to be controlled in database #DBF2; Step 4: Obtain the corresponding tolerance type, theoretical value, and tolerance zone by interpreting the data packet in the annotation group code. Establish a corresponding relationship with the measurement elements retained in the database #DBF2, and generate the tolerance definition database #DBTOL; Step 5: Automatically generate the measurement program of the control element according to the database #DBF2; Step 6: Automatically generate a calculation program for control tolerances based on the tolerance database #DBTOL.
2. The method for programming image measurement software according to claim 1, characterized in that: All elements in step 1 include points, straight lines, circles, arcs, ellipses, polylines, and spline curves.
3. The method for programming image measurement software according to claim 1, characterized in that: The annotation group codes in step 2 include alignment, linear, corner, radius, diameter, angle, and coordinate.
4. The method for programming image measurement software according to claim 1, characterized in that: The software interprets and identifies the position information of the annotation items in CAD and filters out the redundant elements in CAD that are not related to the measurement.
5. The method for programming image measurement software according to claim 1, characterized in that: By interpreting the content of the CAD annotation items, the tolerance definition type, associated elements, theoretical values, and tolerance zone definitions corresponding to the annotations are obtained, and the program automatically generates the tolerance calculation program that needs to be controlled.