Workpiece machining deviation obtaining method based on point cloud
By selecting measurement points and recording normal vectors on the 3D digital model of the workpiece, a 3D bounding box is established. Triangular facets are extracted using a triangular mesh model and projected for comparison. This solves the problem of high difficulty and low accuracy in obtaining machining deviations caused by incomplete point cloud acquisition, and realizes high-precision machining error acquisition under complex topographic conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies often suffer from incomplete point cloud acquisition when processing irregular workpiece surfaces and areas with high reflectivity and curvature, leading to difficulties in obtaining processing deviations and low accuracy.
By selecting measurement points and recording normal vectors on the 3D digital model of the workpiece, a 3D bounding box is established. Triangular facets of the candidate region are extracted using a triangular mesh model and compared with the point cloud projection to obtain the machining deviation.
It improves the accuracy and comprehensiveness of obtaining machining deviations under complex morphological conditions, and enhances the accuracy and speed of obtaining machining errors.
Smart Images

Figure CN121685490A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more specifically to a method for obtaining workpiece processing deviations based on point clouds. Background Technology
[0002] After the workpiece is machined, it needs to be inspected to obtain the machining deviation. With the development of three-dimensional optical measurement technology, the method of using three-dimensional scanning sensors to collect point clouds on the surface of the workpiece and then comparing the collected point clouds with the digital model of the workpiece to obtain the machining error is becoming increasingly popular.
[0003] In existing technologies, the method of comparing the acquired point cloud with the workpiece digital model is limited to regular geometric features (such as round holes, square holes, etc. on the workpiece). It uses point cloud fitting to obtain the geometric center coordinates (hole center coordinates), and then compares them with the coordinates on the digital model to obtain the machining deviation of the geometric feature. However, for irregular features on the workpiece, such as curved surfaces and edges, it is difficult to find the corresponding measured points in the point cloud. Furthermore, when the object to be measured is a metal workpiece, such as… Figure 7 Due to the highly reflective properties of the workpiece, point cloud defects are easily caused by overexposure in reflective areas. In areas with high curvature (such as grooves and wrinkles), the point cloud acquired by the point cloud sensor is sparse and may contain voids. If there are protrusions on the workpiece surface, point cloud defects will appear around the protruding parts due to the limitations of the point cloud sensor's acquisition pose. These defective point cloud areas cannot provide strong data support. Therefore, existing methods are difficult and have low accuracy in obtaining processing deviations in the face of the above situations. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a point cloud-based method for obtaining workpiece machining deviations. This method is not constrained by the workpiece's geometry and can be effectively implemented in complex situations such as complex curved surfaces and multi-layered topography. Furthermore, the comparison information between the measured point cloud and the digital model is more comprehensive, ensuring the accuracy of machining error acquisition. It features high accuracy, high speed, and strong versatility.
[0005] The technical solution is as follows:
[0006] A method for obtaining workpiece machining deviation based on point cloud involves pre-selecting measurement points on the three-dimensional digital model of the workpiece and recording the normal vector A of the measurement points;
[0007] The point cloud of the workpiece surface is obtained, and the point cloud and the three-dimensional digital model of the workpiece are transformed to the same coordinate system. The point cloud is then triangulated to obtain a continuous triangular mesh model, which contains the vertex coordinates of each triangular facet.
[0008] The following steps are used to evaluate the machining accuracy of a workpiece at the measuring point:
[0009] ① Construct a three-dimensional bounding box with the measuring point as the center, wherein the three-dimensional bounding box is a cylinder, a sphere, or a regular prism;
[0010] Using a 3D bounding box as a candidate region, a portion of triangular faces is extracted from the triangular mesh model and denoted as the face to be processed;
[0011] The face to be processed includes a triangular face I with all three vertices located inside the bounding box of the solid, and a triangular face II that intersects with the bounding box of the solid.
[0012] ② Record the intersection points between each vertex of triangle I and the line segments corresponding to the edges of triangle II and the bounding box of the solid as candidate points;
[0013] The points on the intersection line of triangular facet II and the 3D bounding box are recorded as contour points;
[0014] ③ Project each candidate point and each contour point onto the direction of the normal vector A to obtain each projection point. Calculate the directed distance between the projection point and the measuring point, and record the maximum value of the directed distance as the machining deviation at that measuring point.
[0015] Furthermore, in step ①, the method for cropping the face to be processed is as follows: calculate the distance between each vertex and the measuring point. If the distance component along the direction of normal vector A is less than the preset value I, and the distance component along the direction perpendicular to normal vector A is less than the preset value II, then the vertex is recorded as an internal point.
[0016] All triangular facets containing internal points are designated as facets to be processed.
[0017] If all three vertices of the face to be processed are internal points, then it is denoted as triangle face I; otherwise, it is denoted as triangle face II.
[0018] Furthermore, when the 3D bounding box is a sphere, the radius R is taken as 1mm~5mm; both preset value I and preset value II are equal to the radius R;
[0019] When the 3D bounding box is a cylinder, let the radius of the cylinder's base be r and the height be h, where r takes a value of 1mm to 5mm, and 1.5r < h < 5r; preset value I = r, preset value II = h / 2;
[0020] When the bounding box of the solid is a regular prism, let d be the distance between the center point of the base and the vertex of the regular prism, and p be the height. Here, d takes the value of 1mm~5mm, 1.5d<p<5d, preset value I=d, preset value II=p / 2.
[0021] Preferably, if an edge consists of two vertices located outside the bounding box of the solid and intersects with the bounding box of the solid, then the other triangular facet containing that edge is also denoted as triangular facet II.
[0022] Furthermore, in step ②, the intersection line between the triangular facet II and the 3D bounding box is obtained, as follows;
[0023] First, combine the plane equation of triangle II with the equation of the solid bounding box to obtain the intersecting contour line;
[0024] Then, the intersecting contour line between the intersection of the edge of triangle II and the bounding box of the solid is recorded as the intersection line.
[0025] Preferably, step ① further includes calculating the angle between the normal vector of each facet to be processed and the normal vector A, and filtering out the facet to be processed if the angle is greater than a threshold.
[0026] Further threshold values are set between 5° and 30°.
[0027] This method has the following characteristics:
[0028] This method not only projects and compares the discrete point cloud (vertices) inside the 3D bounding box with the measurement points, but also projects and compares the intersection points and lines of the triangular facets with the 3D bounding box with the measurement points, providing more comprehensive comparison information and improving the accuracy of obtaining processing errors.
[0029] This method is not constrained by the geometry of the workpiece and can still be effectively implemented in complex situations such as curved surfaces, complex topography with shading and reflection, and multi-layered topography. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of a 3D bounding box that is a cylinder;
[0031] Figure 2 To utilize Figure 1 Obtain a schematic diagram of the surface to be processed using a 3D bounding box;
[0032] Figure 3 A schematic diagram of a triangular facet I whose three vertices are all located inside the bounding box of a solid.
[0033] Figure 4 A schematic diagram of triangular facet II intersecting with the 3D bounding box;
[0034] Figure 5 This is a schematic diagram showing the intersection of the edges of triangle II with the upper base of the cylinder;
[0035] Figure 6 This is a schematic diagram showing that the edge of triangle II intersects the cylinder at two points.
[0036] Figure 7 A schematic diagram of the point cloud on the workpiece surface (with incomplete point cloud data);
[0037] Figure 8This is a schematic diagram showing the results when calculating machining deviations using only the vertices of triangular facets;
[0038] Figure 9 This is a schematic diagram showing the results of calculating processing deviations using the method of the present invention. Detailed Implementation
[0039] The technical solution of the present invention will be described in detail below with reference to specific embodiments.
[0040] A method for obtaining workpiece machining deviation based on point cloud involves pre-selecting measurement points on the three-dimensional digital model of the workpiece and recording the normal vector A of the measurement points;
[0041] The point cloud of the workpiece surface is obtained, and the point cloud and the three-dimensional digital model of the workpiece are transformed to the same coordinate system. The point cloud is triangulated to obtain a continuous triangular mesh model, which contains the vertex coordinates of each triangular facet. Measurement points are selected in advance on the three-dimensional digital model and the normal vector A of the measurement points is recorded.
[0042] The following steps are used to evaluate the machining accuracy of a workpiece at the measuring point:
[0043] ① Construct a three-dimensional bounding box with the measuring point as the center, wherein the three-dimensional bounding box is a cylinder, a sphere, or a regular prism;
[0044] like Figure 1 , 2 When the 3D bounding box is a cylinder, a schematic diagram of the surface to be processed is extracted.
[0045] Using a 3D bounding box as a candidate region, a portion of triangular faces is extracted from the triangular mesh model and denoted as the face to be processed;
[0046] The face to be processed includes a triangular face I whose three vertices are all located inside the bounding box of the solid (e.g., Figure 3 ), and also includes triangular facets II that intersect with the bounding box of the solid (such as Figure 4 );
[0047] ② Record the intersection points between each vertex of triangle I and the line segments corresponding to the edges of triangle II and the bounding box of the solid as candidate points;
[0048] The points on the intersection line of triangular facet II and the 3D bounding box are recorded as contour points;
[0049] ③ Project each candidate point and each contour point onto the direction of the normal vector A to obtain each projected point. Calculate the directed distance between the projected point and the measured point, and record the maximum value of the directed distance as the processing deviation at that measured point. For example, if the vector from the measured point to the projected point is in the same direction as the normal vector A, the distance value is positive; otherwise, it is negative.
[0050] Specifically, such as Figure 2 As shown, in step ①, the method for cropping the face to be processed is as follows: calculate the distance between each vertex and the measuring point. If the distance component along the direction of normal vector A is less than the preset value I, and the distance component along the direction perpendicular to normal vector A is less than the preset value II, then the vertex is recorded as an internal point.
[0051] All triangular facets containing internal points are designated as facets to be processed.
[0052] If all three vertices of the face to be processed are internal points, then it is denoted as triangle face I; otherwise, it is denoted as triangle face II.
[0053] More specifically, when the 3D bounding box is a sphere, the radius R is 1mm to 5mm; preset values I and II are both equal to the radius R;
[0054] When the 3D bounding box is a cylinder, let the radius of the cylinder's base be r and the height be h, where r takes a value of 1mm to 5mm, and 1.5r < h < 5r; preset value I = r, preset value II = h / 2;
[0055] When the bounding box of the solid is a regular prism, let d be the distance between the center point of the base and the vertex of the regular prism, and p be the height. Here, d takes the value of 1mm~5mm, 1.5d<p<5d, preset value I=d, preset value II=p / 2.
[0056] In practice, vertices other than internal points in the face to be processed are recorded as external points.
[0057] In step ②, if the edge of triangle II contains an external point, then calculate the intersection point between that edge and the bounding box of the solid.
[0058] For example, taking a cylinder as the bounding box of a 3D structure, the specific steps are as follows: the equation of the line is obtained by using two vertices on the edge of the triangular facet.
[0059] Combine the equations of the straight line and the cylindrical surface (the model is known) to obtain the intersection points of the edge and the side surface of the cylinder;
[0060] like Figure 5 The edges of the triangular facet intersect the upper base of the cylinder. By combining the equation of the straight line with the upper and lower bases of the cylinder (known in the model), we can obtain the intersection points of the edges with the upper and lower bases of the cylinder.
[0061] When the bounding box of the solid is a regular prism, the equation of the line is combined with the equations of each side surface and the bottom surface (known in the model) to obtain the intersection points of the edges and the regular prism.
[0062] Special, such as Figure 6If an edge consists of two vertices (two external points) located outside the bounding box of a solid, and intersects with the bounding box (indicating that part of the edge is inside the bounding box of the solid), then the other triangular facet containing that edge is also denoted as triangular facet II.
[0063] Explanatory: If an edge consists of two interior points, it means that it is located inside the bounding box of the 3D and that the edge does not intersect with the bounding box of the 3D.
[0064] If an edge consists of one internal point and one external point, it means that it intersects with the 3D bounding box at only one point.
[0065] If an edge consists of two external points, it intersects the bounding box of the 3D at two points (e.g., ...). Figure 6 (or no intersection)
[0066] In this scheme, the intersection line refers to the local line segment where the triangular facet intersects with the 3D bounding box. Specifically, in step ②, the intersection line between triangular facet II and the 3D bounding box is obtained, and the steps are as follows;
[0067] First, combine the plane equation of triangle II (obtained by fitting the three vertices) with the equation of the solid bounding box (the equation of the sphere, the equation of the lateral surface and the top and bottom surfaces of the cylinder, and the equation of the lateral surface and the top and bottom surfaces of the regular prism) to obtain the intersecting contour line;
[0068] Then, the intersecting contour line between the intersection of the edge of triangle II and the bounding box of the solid is recorded as the intersection line.
[0069] For example, the intersection contour of the plane and the side of the cylinder is an ellipse, which can be obtained based on the Dandelion double-sphere model. Then, based on the intersection points of the two sides of the triangular facet II with the bounding box of the solid, the partial curve segment between the two intersection points is extracted.
[0070] The intersection contour of the plane and the side of the regular prism is a polygon. Based on the intersection of the two sides of the triangular facet II with the bounding box of the solid, the part of the polyline segment between the two intersection points is extracted.
[0071] If the measuring point is located in a fold or multi-layered structure, the point cloud collected around the measuring point is more complex and may involve multiple planes. Therefore, step ① also includes calculating the angle between the normal vector of each surface to be processed and the normal vector A. If the angle is greater than the threshold (indicating that the surface does not belong to the plane where the measuring point is located), the surface to be processed is filtered out.
[0072] The threshold value ranges from 5° to 30°.
[0073] When the object to be tested is a sheet metal part, such as Figure 7In areas of overexposure due to reflection, obstruction, and high curvature, the point cloud acquired from the workpiece surface is incomplete. When the measurement point is located in these areas, existing methods cannot obtain effective processing deviations. This method triangulates the point cloud and calculates the processing deviation based on the spatial relationship between the triangular facets and the 3D bounding box. It can still be effectively implemented even in areas with incomplete point clouds.
[0074] Furthermore, in the process of acquiring machining deviations, this method provides more comprehensive information on the triangular facets, thus improving the accuracy of machining deviation acquisition; for example... Figure 8 If only the vertices of the triangular facets are used to calculate the machining deviation, the calculated result is 4.396mm, which is less than the actual deviation value. Figure 9 This method not only projects and compares the discrete point cloud (vertices) inside the 3D bounding box with the measurement points, but also projects and compares the intersection points and lines of the triangular facets with the 3D bounding box with the measurement points. The comparison information is more comprehensive, and the deviation calculation result is 5.878mm, which is closer to the actual deviation value.
[0075] The foregoing description of specific exemplary embodiments of the present invention is for illustrative and descriptive purposes. It is not intended to be exhaustive, nor to limit the invention to the precise forms disclosed; obviously, many changes and variations are possible in accordance with the foregoing teachings. The exemplary embodiments were chosen and described to explain the specific principles of the invention and its practical application, thereby enabling others skilled in the art to implement and utilize various exemplary embodiments of the invention, as well as their different alternatives and modifications. The scope of the invention is intended to be defined by the appended claims and their equivalents.
Claims
1. A point cloud-based workpiece machining deviation acquisition method, characterized in that, Selecting a measuring point on a three-dimensional model of a workpiece in advance and recording a normal vector A of the measuring point; Obtaining a point cloud of the surface of the workpiece, converting the point cloud and the three-dimensional model of the workpiece to the same coordinate system, and triangulating the point cloud to obtain a continuous triangular mesh model, wherein the triangular mesh model contains vertex coordinates of each triangular facet; The machining precision of the workpiece at the measuring point is evaluated by the following steps: ①A solid enclosing frame is constructed with the measuring point as the center, and the solid enclosing frame is a cylinder, a sphere or a regular prism; A part of the triangular facets is cut out from the triangular mesh model by using the solid enclosing frame as a candidate region, and the part of the triangular facets is recorded as a to-be-processed facet; The to-be-processed facet includes a triangular facet I in which all the three vertices are located inside the solid enclosing frame, and a triangular facet II intersecting the solid enclosing frame; ②Each vertex of the triangular facet I and a line segment corresponding to an edge of the triangular facet II are recorded as candidate points, and each point on the intersection line between the triangular facet II and the solid enclosing frame is recorded as an outline point. ③Each candidate point and each outline point are projected onto a direction of the normal vector A to obtain each projection point, a directed distance between each projection point and the measuring point is calculated, and a maximum value of the directed distances is recorded as a machining deviation at the measuring point. In step ①, the to-be-processed facet is cut out in the following manner: distances between each vertex and the measuring point are calculated, if a distance component in the direction of the normal vector A is less than a preset value I, and a distance component in a direction perpendicular to the direction of the normal vector A is less than a preset value II, the vertex is recorded as an internal point; 2.The method of claim 1, wherein: Each triangular facet in which the internal point is located is recorded as the to-be-processed facet; If the three vertices of the to-be-processed facet are all internal points, the to-be-processed facet is recorded as the triangular facet I, otherwise, the to-be-processed facet is recorded as the triangular facet II. When the solid enclosing frame is a sphere, a radius R is 1 mm to 5 mm, and the preset value I and the preset value II are equal to the radius R; 3.The method of claim 2, wherein: When the solid enclosing frame is a cylinder, a radius of a bottom surface of the cylinder is r, a height of the cylinder is h, r is 1 mm to 5 mm, 1.5r < h < 5r, the preset value I is r, and the preset value II is h / 2; When the solid enclosing frame is a regular prism, a distance between a center point of a bottom surface of the regular prism and a vertex of the regular prism is d, a height of the regular prism is p, d is 1 mm to 5 mm, 1.5d < p < 5d, the preset value I is d, and the preset value II is p / 2. If an edge is composed of two vertices located outside the solid enclosing frame and has an intersection point with the solid enclosing frame, another triangular facet in which the edge is located is also recorded as the triangular facet II. 4.The method of claim 1, wherein: In step ②, an intersection line between the triangular facet II and the solid enclosing frame is obtained in the following steps: 5.The method of claim 1 or 4, wherein: First, the plane equation of the triangular facet II and the equation of the solid enclosing frame are combined to obtain an intersection outline; Then, the intersection outline between the intersection points of the edge of the triangular facet II and the solid enclosing frame is recorded as the intersection line. Step ① further includes calculating an included angle between a normal vector of each to-be-processed facet and the normal vector A, and filtering out the to-be-processed facet if the included angle is greater than a threshold value. 6.The method of claim 1, wherein: The threshold value is 5° to 30°. 7.The method of claim 6, wherein: