A full-automatic image measurement method based on CAD drawing analysis

By parsing CAD drawings and automatically mapping annotation information to 3D models, adjusting the light source of the imaging instrument, and generating measurement templates, the problem of low efficiency in manual modeling is solved, and fully automatic measurement of three-dimensional workpieces is realized, improving measurement efficiency and accuracy.

CN117237976BActive Publication Date: 2025-12-30LANHAI PHOTOELECTRICITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311201760.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-18
Publication Date
2025-12-30
Estimated Expiration
2043-09-18

AI Technical Summary

Technical Problem

In existing technologies, manual modeling of measurement templates is inefficient, especially for parts with complex shapes. Manual modeling time accounts for 85% of the total inspection time. Automatic image measuring instruments require manual selection of edges and time-consuming editing of measurement points, making it difficult to achieve automatic measurement of three-dimensional workpieces.

Method used

By parsing CAD drawings, the system obtains the 3D model and 2D annotation files of the workpiece, automatically maps the annotation information to the 3D model, adjusts the light source of the image instrument, and automatically generates a measurement template to achieve fully automatic measurement.

Benefits of technology

It improves measurement efficiency, saves time on manual modeling, reduces manual operations, and improves measurement accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237976B_ABST
    Figure CN117237976B_ABST
Patent Text Reader

Abstract

The application discloses a kind of full-automatic image measurement methods based on CAD drawing analysis, it is related to precision measurement technical field, specific steps are: specific steps are: the 3D model file and 2D mark file of the workpiece to be measured are obtained;2D mark file is parsed, and the mark information of the workpiece to be measured is obtained;The mark information of the workpiece to be measured is mapped to 3D model, and the 3D model with mark information is obtained;Select the element to be measured on the 3D model with mark information, adjust the light source and illumination intensity of imager according to the position of the element to be measured on 3D model;The contour line of the element to be measured is identified using imager, and measurement is carried out, and workpiece measurement report is generated;The application can quickly complete the measurement of workpiece, to improve measurement efficiency, save labor and time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision measurement technology, and more specifically to a fully automated image measurement method based on CAD drawing analysis. Background Technology

[0002] Traditional manual measurement, such as using calipers, micrometers, plug gauges, gauge blocks, and special measuring tools to measure parts, is often inefficient, time-consuming, and has many unstable factors in terms of measurement results, and the labor cost is high. At the same time, with the improvement of automated measurement requirements and technology, as well as the improvement of workpiece quality control requirements, image measurement is gradually replacing most of the traditional manual measurement and has become one of the commonly used inspection methods.

[0003] However, current image measuring instruments require manual selection of edge templates before subsequent measurements can be taken; this process is called "manual template creation." Taking the Keyence IM-8000 image dimension measuring instrument as an example, when measuring a new workpiece or a group of new workpieces, the lens height, magnification, and lighting must first be adjusted to ensure the final image is high-resolution, easily distinguishable, and has clear edge contours. Then, the edge lines are manually selected; these edge lines represent the inner and outer contours of the part, ultimately reflecting its dimensions. For a group of identical parts, only the first part to be measured needs a manual measurement template. The Keyence IM-8000 image measuring instrument can save the template and apply it to subsequent identical parts, eliminating the need to manually create a measurement template for each part.

[0004] Even so, facing a wide variety of parts within a manufacturing enterprise, with frequent replacements and complex shapes, especially given changing consumer demands and relatively small production volumes but numerous categories, even manually creating a measurement template for the first sample of a set of identical parts requires a significant amount of time and effort. For example, the engine casing of a car has a complex shape and numerous contour lines. Generally, for such parts, manually creating a measurement template accounts for 85% of the total inspection time, while the subsequent measurement time only accounts for 15% of the total time.

[0005] To address the inefficiency of manually creating measurement templates, a new research direction is to automatically convert CAD drawings into measurement templates, replacing manual selection of outlines. By combining powerful algorithms with imaging systems, measurement templates can be automatically generated based on the 3D model and 2D dimensional drawings of the part, thus saving significant time in template creation. Currently, there are some automated measurement solutions for planar CAD drawings, with automatic image scanners greatly facilitating measurement; however, these still require manual editing of measurement points, a process that consumes the majority of the time (90% of manual time is spent creating templates). However, for three-dimensional workpieces, there is currently no solution for automatically generating measurement templates from CAD images.

[0006] Therefore, how to improve the accuracy and efficiency of automatic measurement is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] In view of this, the present invention provides a fully automatic image measurement method based on CAD drawing parsing. This invention parses the CAD file, reads the view edges that constitute the workpiece within the file, identifies the view edges, and through a series of operations such as rotation and scaling, ultimately makes the view correspond to the workpiece pattern in the image, completing the generation of a fully automatic measurement template, thus solving the most time-consuming and labor-intensive part of the measurement process. Simultaneously, this invention can read the dimensions, tolerances, and other information marked in the CAD file, and based on this, determine whether the dimensions of the workpiece being measured are consistent with the marked dimensions, or within their tolerance range.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] A fully automated image measurement method based on CAD drawing analysis, comprising the following steps:

[0010] Obtain the 3D model file and 2D annotation file of the workpiece to be tested;

[0011] The 2D annotation file is parsed to obtain the annotation information of the workpiece to be tested;

[0012] The annotation information of the workpiece to be tested is mapped onto the 3D model to obtain a 3D model with annotation information;

[0013] Select the element to be measured on the 3D model with annotation information, and adjust the light source and illumination intensity of the imager according to the position of the element to be measured on the 3D model.

[0014] The adjusted imager is used to acquire images of the positions of the elements to be measured on the workpiece, and the measurements are taken to generate a workpiece measurement report.

[0015] Preferably, the 3D model file is in STEP format and the 2D annotation file is in DWG format.

[0016] Preferably, the process of parsing the 2D annotation file is as follows: convert the DWG format 2D annotation file into DXF format, scan the DXF format 2D annotation file, parse the Dimension Style table in the 2D annotation file, and extract all annotation information.

[0017] Preferably, the annotation information includes the standard dimensional values ​​and tolerance information of the workpiece to be measured.

[0018] Preferably, the process before mapping the annotation information to the 3D model is as follows:

[0019] Projecting the 3D model in six directions yields six projected views: front view, rear view, left view, right view, top view, and bottom view. Typically, a 2D annotation file contains 1 to 6 2D views.

[0020] The six projected views of the 3D model are matched and compared with several 2D views of the 2D annotation file. The similarity between each projected view and each 2D view is calculated. The 2D view with the highest similarity to each projected view is selected and a mapping relationship is established with the corresponding projected view.

[0021] Based on the mapping relationship, the annotation information in the 2D view is mapped to the corresponding projected view to obtain a 3D model with annotation information.

[0022] Preferably, the process of mapping annotation information from a 2D view to a 3D model is as follows:

[0023] Identify the annotation information on the current 2D view and confirm the edge line corresponding to each annotation information on the 2D view;

[0024] Mapping edges in a 2D view to faces or lines in a 3D model yields the edge mapping relationship; lines in a 2D view correspond to either lines or faces in the 3D model.

[0025] Based on the edge mapping relationship, label all faces or lines of the 3D model with the corresponding annotation information.

[0026] Preferably, the specific process for generating a workpiece measurement report is as follows:

[0027] Select the element to be measured on the 3D model with annotation information, and determine the projection surface according to the position of the element to be measured relative to the 3D model to ensure that the element to be measured can be measured on the projection surface.

[0028] The Ray Tracing algorithm is used to perform lighting analysis on the 3D model. The reflection and refraction of light paths are calculated for each pixel on the surface of the 3D model to obtain the pixel calculation results. All pixel calculation results are merged to obtain the lighting simulation map. Based on the lighting simulation map, the simulated light source information is obtained, including the height position, angle and brightness of the simulated light.

[0029] The light source of the imaging instrument is adjusted according to the simulated light source information. The imaging instrument is used to capture an image of the workpiece to be measured, and a selection box is generated on the image. The elements to be measured are automatically selected, the edges of the elements to be measured are extracted, the edge contours of the elements to be measured are identified, and the edge contours are measured. The measurement results are used to generate a workpiece measurement report.

[0030] Preferably, the size of the selection box is larger than the element to be tested by a certain preset threshold; the position of the selection box is close to the element to be tested, and its size is slightly larger than the element to be tested, so as to encompass the element to be tested.

[0031] Preferably, the imager has three light sources: a parallel light source at the bottom, a coaxial light source in the middle, and a contour light source at the top.

[0032] As can be seen from the above technical solution, compared with the prior art, this invention discloses a fully automatic image measurement method based on CAD drawing analysis. The specific steps are as follows: acquiring the 3D model file and 2D annotation file of the workpiece to be measured; parsing the 2D annotation file to obtain the annotation information of the workpiece to be measured; mapping the annotation information of the workpiece to be measured onto the 3D model to obtain a 3D model with annotation information; selecting the element to be measured on the 3D model with annotation information; adjusting the light source and illumination intensity of the image instrument according to the position of the element to be measured on the 3D model; using the image instrument to identify the contour line of the element to be measured and measuring it to generate a workpiece measurement report. This invention can quickly complete the measurement of the workpiece, thereby improving measurement efficiency and saving labor and time. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0034] Figure 1 The attached figure shows the 3D model file of the workpiece to be tested provided by the present invention. ;

[0035] Figure 2 The attached figure shows the 2D annotation file of the workpiece to be tested provided by the present invention. ;

[0036] Figure 3 The attached figure is a 3D model structure diagram of the workpiece to be tested with labeled information provided by the present invention. ;

[0037] Figure 4 The attached figure is a flowchart of the measurement method provided by the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Example 1

[0040] This invention discloses a fully automated image measurement method based on CAD drawing analysis, the specific steps of which are as follows:

[0041] Obtain the 3D model file and 2D annotation file of the workpiece to be tested; the 3D model file can be in STEP format, and the 2D annotation file can be in DWG format. Figure 1 The 3D model file of the workpiece to be tested. Figure 2 This is a 2D annotation file for the workpiece to be tested.

[0042] The 2D annotation file is parsed to obtain the annotation information of the workpiece to be measured. The process of parsing the 2D annotation file is as follows: convert the DWG format 2D annotation file into DXF format, scan the DXF format 2D annotation file, parse the scanned DXF in the 2D annotation file, parse the Dimension Style table in the DXF, and extract all the annotation information. The annotation information includes the standard dimensional values ​​and tolerance information of the workpiece to be measured.

[0043] The annotation information of the workpiece to be tested is mapped onto the 3D model to obtain a 3D model with annotation information. Figure 3 The process for creating a 3D model structure diagram with annotation information is as follows:

[0044] Projecting the 3D model in six directions yields six projected views: front view, rear view, left view, right view, top view, and bottom view. Typically, a 2D annotation file contains 1 to 6 2D views.

[0045] The six projected views of the 3D model are matched and compared with several 2D views of the 2D annotation file. The similarity between each projected view and each 2D view is calculated. The 2D view with the highest similarity to each projected view is selected and a mapping relationship is established with the corresponding projected view.

[0046] Based on the mapping relationship, the annotation information in the 2D view is mapped to the corresponding projected view to obtain a 3D model with annotation information.

[0047] Specifically, the process of transferring annotation information from the 2D view to the 3D model is as follows:

[0048] Identify the annotation information on the current 2D view and confirm the edge line corresponding to each annotation information on the 2D view;

[0049] Mapping edges in a 2D view to faces or lines in a 3D model yields the edge mapping relationship; lines in a 2D view correspond to either lines or faces in the 3D model.

[0050] Based on the edge mapping relationship, label all faces or lines of the 3D model with the corresponding annotation information.

[0051] Select the element to be measured on the 3D model with annotation information. Adjust the light source and illumination intensity of the image sensor according to the position of the element on the 3D model. Use the image sensor to identify the contour line of the element to be measured, perform the measurement, and generate a workpiece measurement report. The specific process is as follows:

[0052] Select the element to be measured on the 3D model with annotation information, and determine the projection surface according to the position of the element to be measured relative to the 3D model to ensure that the element to be measured can be measured on the projection surface.

[0053] The Ray Tracing algorithm is used to perform lighting analysis on the 3D model. The reflection and refraction of light paths are calculated for each pixel on the surface of the 3D model to obtain the pixel calculation results. All pixel calculation results are merged to obtain the lighting simulation map. Based on the lighting simulation map, the simulated light source information is obtained, including the height position, angle and brightness of the simulated light.

[0054] The light source of the imaging instrument is adjusted according to the simulated light source information. The imaging instrument is used to capture an image of the workpiece to be measured, and a selection box is generated on the image. The elements to be measured are automatically selected, the edges of the elements to be measured are extracted, the edge contours of the elements to be measured are identified, and the edge contours are measured. The measurement results are used to generate a workpiece measurement report.

[0055] Specifically, the Ray Tracing algorithm can effectively simulate the reflection, refraction, and scattering of light during its propagation, resulting in excellent representation of the material properties of objects.

[0056] Specifically, the size of the selection box is a certain preset threshold larger than the element to be tested; the position of the selection box is close to the element to be tested, and its size is slightly larger than the element to be tested, with the purpose of enclosing the element to be tested within it.

[0057] Specifically, the imaging device has three light sources: a parallel light source at the bottom, a coaxial light source in the middle, and a contour light source at the top.

[0058] Traditional image measurement requires manual marking of measurement points, consuming a significant portion of the measurement time and manpower. Manually creating measurement templates also requires considerable time and manpower, often resulting in low efficiency. To improve efficiency and save time and manpower, this invention focuses on the analysis of CAD drawings and automatically generates measurement templates based on the analysis results. This allows for rapid completion of workpiece measurement, thereby improving efficiency and saving time and manpower. Our solution can save both labor and time.

[0059] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A full-automatic image measurement method based on CAD drawing analysis, characterized in that, The specific steps are: Obtain the 3D model and the 2D annotation file of the workpiece to be measured; Parse the 2D annotation file to obtain the annotation information of the workpiece to be measured; Map the annotation information of the workpiece to be measured to the 3D model to obtain a 3D model with annotation information; Select the element to be measured on the 3D model with annotation information, and adjust the light source and light intensity of the image instrument according to the position of the element to be measured on the 3D model; Collect the image of the element to be measured on the workpiece to be measured using the adjusted image instrument, and generate a workpiece measurement report; The specific process of generating a workpiece measurement report is: Select the element to be measured on the 3D model with annotation information, and determine the projection plane according to the position of the element to be measured relative to the 3D model; Use Ray Tracing algorithm to analyze the light of the 3D model to obtain simulated light source information, which includes the height position, angle and brightness of the simulated light; Adjust the light source of the image instrument according to the simulated light source information, take an image of the workpiece to be measured using the image instrument, generate a selection box on the image, automatically frame the element to be measured, extract the edge of the element to be measured, identify the edge profile of the element to be measured, and measure the edge profile to generate a workpiece measurement report.

2. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The 3D model file is in STEP format, and the 2D annotation file is in DWG format.

3. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The process of parsing the 2D annotation file is: convert the 2D annotation file in DWG format to DXF format, scan the 2D annotation file in DXF format, parse the Dimension Style table in the 2D annotation file, and extract all the annotation information.

4. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The annotation information includes the size standard value and tolerance information of the workpiece to be measured.

5. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The process before mapping the annotation information to the 3D model is: Project the 3D model in 6 directions to obtain 6 projection views; Match and compare the 6 projection views of the 3D model with the 2D views of the 2D annotation file respectively, calculate the similarity of each projection view and each 2D view, select the 2D view with the highest similarity for each projection view, and establish a mapping relationship between the corresponding projection view; According to the mapping relationship, map the annotation information in the 2D view to the corresponding projection view to obtain a 3D model with annotation information.

6. The full-automatic image measurement method based on CAD drawing analysis according to claim 5, characterized in that, The process of mapping the annotation information in the 2D view to the 3D model is: Identify the annotation information on the current 2D view, and confirm the corresponding edge line of each annotation information on the 2D view; Map the edge line in the 2D view to the face or line on the 3D model to obtain an edge line mapping relationship; According to the edge line mapping relationship, mark the corresponding annotation information on all faces or lines of the 3D model.

7. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The size of the selection box is larger than the element to be measured by a certain preset threshold.

8. The full-automatic image measurement method based on CAD drawing analysis according to claim 1, characterized in that, The image instrument has three light sources, which are parallel light source at the bottom, coaxial light source in the middle and contour light source at the top.

Citation Information

Patent Citations

  • Method for translating dimensions on two-dimensional engineering drawing to three-dimensional CAD (computer aided design) model

    CN102568038A

  • Drawing feature and number matching method, system, equipment and medium

    CN116206320A