Method and system for virtual metrology of machining surface quality and roughness based on point cloud

By constructing a three-dimensional discrete element model and using KDTree analysis, the problem of the disconnect between simulation and surface quality assessment in CNC machining was solved, enabling accurate prediction of surface roughness and process optimization before machining, thereby improving production efficiency and precision.

CN121615288BActive Publication Date: 2026-07-07SHANGHAI JIAOTONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI JIAOTONG UNIV
Filing Date
2026-02-03
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies in CNC machining suffer from problems such as a disconnect between simulation and surface quality assessment, the lag of traditional detection methods, and insufficient accuracy of prediction models, making it difficult to achieve accurate prediction of surface roughness and process optimization before machining.

Method used

By constructing a three-dimensional discrete element model, simulating the material removal process, extracting three-dimensional point cloud data, using the KDTree structure for spatial index analysis, and combining the processing parameters to calculate the surface roughness, virtual measurement based on point cloud is realized.

Benefits of technology

It enables seamless quantitative evaluation of surface roughness in a virtual environment, reduces the lag of actual machine trial cutting and physical inspection, improves prediction accuracy and guidance for process optimization, and reduces production costs and cycle time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121615288B_ABST
    Figure CN121615288B_ABST
Patent Text Reader

Abstract

The application provides a point cloud-based machining surface quality and roughness virtual measurement method and system, and belongs to the technical field of numerical control machining simulation and digital detection. The method comprises the following steps: obtaining a geometric model of the workpiece appearance after machining through machining process simulation; extracting three-dimensional point cloud data of the workpiece surface from the geometric model; performing spatial structure analysis on the point cloud data to determine the surface forming quality state; and calculating the surface roughness based on the forming quality state and the machining process parameters. The application adopts a three-dimensional discrete element model to perform high-precision material removal simulation, realizes efficient point cloud analysis through a KDTree structure, and establishes a roughness calculation model in combination with the tool geometry and motion parameters, thereby realizing accurate prediction of the surface quality before machining. The application solves the problem of disconnection between simulation and quality evaluation, can replace traditional post-detection, reduces the trial cutting cost, and provides data support for process optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining simulation and digital inspection technology, and in particular to a virtual measurement method and system for machining surface quality and roughness based on point cloud. Background Technology

[0002] With the continuous development of CNC machining technology towards digitalization and intelligence, machine tool process simulation has become a key link in optimizing process parameters, predicting machining results, and improving the success rate of first-pass machining. Advanced simulation systems, based on input CNC code, can perform high-fidelity simulations of material removal, cutting forces, thermal deformation, and other effects during machining through multiphysics coupling modeling, generating high-density 3D point cloud data to describe the final morphology of the workpiece. This lays a solid foundation for realizing virtual measurement, with the core vision of replacing or reducing physical trial cuts and inspections by analyzing simulation data, thereby comprehensively predicting and optimizing machining results before processing.

[0003] However, existing technologies still face significant technical bottlenecks and challenges in achieving accurate prediction and evaluation of processed surface quality, specifically manifested in the following ways:

[0004] (1) Disconnect between simulation and quality assessment: Current machining simulation technology mainly focuses on the verification of the macroscopic geometric contour and size of the workpiece. For the prediction and assessment of the microscopic quality of the machined surface, especially the surface roughness, there is a lack of mature, efficient, and seamlessly integrated quantitative algorithms in the simulation environment. As a result, the virtual simulation link cannot effectively guide the surface quality control in the physical world, and it is difficult to achieve closed-loop optimization of process parameters.

[0005] (2) Lag of traditional detection methods: Traditional detection methods that rely on physical entities (such as contact profilometers, optical interferometers, etc.) provide reliable measurement results, but they are post-processing inspections. These methods can only be implemented after the actual processing is completed, which is time-consuming and labor-intensive. They cannot provide forward-looking surface quality feedback during the process planning stage, which restricts the improvement of production efficiency and flexibility.

[0006] (3) Limitations of existing prediction models: Some technical solutions that attempt to make predictions before machining are usually based on simplified geometric models or grid models with insufficient discretization accuracy, which make it difficult to accurately describe the surface features formed by the tool at the microscale. More importantly, many models fail to deeply integrate real physical factors such as cutting mechanics and tool deformation, resulting in a large deviation between the predicted surface morphology and the actual situation, thus limiting the prediction accuracy and practicality.

[0007] Therefore, there is an urgent need in this field for a virtual surface quality measurement technology that can make full use of high-precision simulation data and deeply integrate processing physical mechanisms to fill the technological gap from macroscopic geometric simulation to microscopic quality prediction. Summary of the Invention

[0008] The purpose of this invention is to provide a virtual measurement method and system for the surface quality and roughness of a machined surface based on point cloud, so as to solve the problems of disconnect between machining simulation and surface quality assessment, lag of traditional detection methods, and insufficient accuracy of prediction models in the prior art, and to achieve accurate prediction of surface roughness and process optimization before machining.

[0009] To achieve the above objectives, this invention provides a virtual measurement method for the surface quality and roughness of machined surfaces based on point clouds, comprising the following steps:

[0010] Step S1: Obtain a geometric model representing the shape of the workpiece after machining through machining process simulation;

[0011] Step S2: Extract three-dimensional point cloud data representing the workpiece surface from the geometric model;

[0012] Step S3: Perform spatial structure analysis on the three-dimensional point cloud data to determine the forming quality status of the processed surface;

[0013] Step S4: Calculate the surface roughness based on the forming quality status and processing parameters.

[0014] Preferably, step S1 specifically includes:

[0015] Step S11: Construct a three-dimensional discrete element model of the workpiece. The three-dimensional discrete element model represents the material distribution of the workpiece by discretizing it into an array of line segments in multiple directions.

[0016] Step S12: Construct a sweeping body model of the tool during its movement;

[0017] Step S13: Perform Boolean operations between the swept volume model and the three-dimensional discrete element model to simulate the material removal process and update the geometric model representing the shape of the workpiece after processing.

[0018] Preferably, in step S2, the system samples the geometric elements on the surface of the geometric model to generate three-dimensional point cloud data containing three-dimensional coordinates and normal vector information.

[0019] Preferably, step S3 specifically includes:

[0020] Step S31: Construct a spatial index structure from the 3D point cloud data;

[0021] Step S32: Based on the preset tolerance, perform neighborhood search on the points in the point cloud using the spatial index structure;

[0022] Step S33: Based on the results of the neighborhood search, determine whether each point meets the geometric accuracy requirements and mark its forming quality status.

[0023] Preferably, the spatial index structure is the KDTree structure.

[0024] Preferably, in step S33, if there is a data point from the target model in the preset tolerance neighborhood of the current point, then the current point is determined to be a qualified point; otherwise, it is an unqualified point.

[0025] Preferably, in step S4, the machining process parameters include at least one of the following: tool geometry parameters, feed rate, spindle speed, and tool spatial orientation.

[0026] Preferably, in step S4, the roughness is quantified by calculating the height of surface micro-undulations based on the relationship between the geometric model and the tool movement trajectory.

[0027] Preferably, the arithmetic mean roughness at a point on the machined surface is calculated using the following formula:

[0028] ;

[0029] in, This indicates the surface roughness at a certain point on the machined surface. Indicates the radius of the ball end mill. This indicates the distance from the point to the plane formed by the ball end mill's feed direction and spindle direction. This indicates the feed per tooth.

[0030] This invention also provides a point cloud-based virtual measurement system for machined surface quality and roughness, used to perform the point cloud-based virtual measurement method for machined surface quality and roughness as described above, including:

[0031] The simulation module is used to obtain a geometric model representing the shape of the workpiece after machining by simulating the machining process;

[0032] The point cloud extraction module is used to extract three-dimensional point cloud data representing the surface of the workpiece from the geometric model;

[0033] The spatial analysis module is used to perform spatial structure analysis on three-dimensional point cloud data in order to determine the forming quality status of the processed surface;

[0034] The surface roughness calculation module is used to calculate the surface roughness of the machined surface based on the forming quality status and processing parameters.

[0035] Therefore, the present invention employs the above-described point cloud-based virtual measurement method and system for the quality and roughness of machined surfaces, and the beneficial technical effects are as follows:

[0036] (1) This invention establishes a seamless virtual measurement process by directly extracting and analyzing surface micro-features from high-fidelity processing simulation point cloud data. This method overcomes the limitation of existing simulation technology that can only verify macroscopic contours, and for the first time realizes the quantitative evaluation of key quality indicators such as surface roughness in a virtual environment, thereby extending process simulation to the quality prediction stage and laying the foundation for true digital closed-loop quality control.

[0037] (2) By predicting surface roughness in the virtual environment before processing according to the present invention, the quality effectiveness of different process schemes can be predicted and optimized before the solid blank is cut. This effectively avoids the lag of traditional physical inspection, and can greatly reduce or even replace the expensive trial cutting and repeated mold repair process, thereby reducing production costs and shortening the product development and manufacturing preparation cycle.

[0038] (3) This invention is not based on a simplified model, but directly uses high-density simulated point clouds as the data basis, ensuring the accuracy of the micro-morphology description. At the same time, by deeply integrating key process parameters such as spindle speed, tool posture, and feed rate to construct a local roughness calculation model, the prediction results fully reflect the influence of the real machining physical mechanism, thereby obtaining prediction accuracy and engineering guidance value far higher than that of traditional geometric simulation models. Attached Figure Description

[0039] Figure 1 A three-dimensional discrete element representation model of the target workpiece;

[0040] Figure 2 This is a triangular mesh representation model of the cutting tool and a point cloud representation model of the cutting edge;

[0041] Figure 3 This is a 3D point cloud model extracted from the surface of the target workpiece.

[0042] Figure 4 These are the results of workpiece surface quality analysis performed using KDTree during normal and abnormal machining processes. Figure 4 (a) in the figure represents the surface quality analysis results under normal processing conditions. Figure 4 (b) shows the results of the abnormal processing surface quality analysis. Detailed Implementation

[0043] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0044] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0045] Example 1

[0046] This embodiment uses an 8mm diameter ball end mill to perform semi-finish milling on a Gaussian surface, requiring the surface geometric profile error to be less than 0.1mm, and predicts the surface geometric accuracy and roughness of the workpiece under two different processes.

[0047] Step 1: Construct a workpiece representation model based on three-dimensional discrete elements.

[0048] First, an initial geometric model of the workpiece is constructed. In this embodiment, a three-dimensional discrete element model (tri-dexel) is used to model the workpiece, such as... Figure 1 As shown, after modeling the workpiece using three-directional discretization elements, the workpiece is discretized into an array of line segments in three directions. Specifically, in the X, Y, and Z directions of the Cartesian coordinate system, the bounding box of the workpiece is discretized into an array of parallel line segments with a spacing of 0.1 mm. Each line segment records the coordinates of its endpoints and the normal vector of the workpiece surface at that location, thereby accurately representing the distribution range of the material in space. This model can flexibly handle complex geometries and construct an initial blank through Boolean operations with a larger tri-dexel model.

[0049] Secondly, construct the tool model. For example... Figure 2 As shown, the tool model is divided into two parts: one is the tool rotation body shape described based on triangular mesh (STL format), which is used to efficiently calculate the sweep body; the other is the cutting edge defined by a discrete point sequence, each point containing coordinates, tangential, normal and axial vectors to accurately express the complex cutting edge shape with variable helix angle and number of grooves.

[0050] Finally, the material removal process is simulated. A high-fidelity tool sweep model is generated by interpolating the start and end positions of the tool between two adjacent CNC code segments and performing several triangular mesh interpolations. Specifically, the number of interpolations is calculated using the following formula:

[0051] ;

[0052] in, Indicates the number of triangular mesh interpolation operations. This indicates the feed distance between two adjacent CNC code segments. This indicates the number of samples per revolution of the cutting tool (set in this embodiment). ), This indicates the feed rate per tooth of the tool during the feeding process.

[0053] The swept body is a closed triangular mesh. Subsequently, a Boolean subtraction operation is performed between the swept body and the workpiece's tri-dexel model: by calculating the intersection points of the swept body's triangular mesh and the workpiece's line segments, the line segments located inside the swept body are identified and removed, while the outer line segments are retained, thereby dynamically updating the workpiece's geometric state and obtaining a geometric model representing the workpiece's morphology after machining.

[0054] This step employs a fine-grained tri-dexel model with a spacing of 0.1 mm to characterize the workpiece, and combines this with a high-fidelity interpolation generation technique based on 10 samplings per revolution to generate the tool sweep volume. This achieves accurate simulation of the material removal process at the microscale (0.1 mm level). Compared to traditional voxel or coarse mesh models, this method improves the geometric accuracy of the simulation results while maintaining efficient Boolean operations, laying the foundation for subsequent extraction of high-quality point cloud data that reflects the microscopic undulations of the real surface.

[0055] Step 2: Extract the 3D point cloud data of the workpiece surface.

[0056] After the material removal simulation is completed, 3D point cloud data of the workpiece surface is extracted from the updated 3D discrete element model. The extraction process is achieved by systematically sampling the endpoints of all tri-dexel segments and the intersections with the tool sweep body. The sampled point cloud uniformly covers the entire machining area, and each data point contains its 3D coordinates and the corresponding surface normal vector. This process completely captures the microscopic geometric features of the workpiece surface. Figure 3 As shown, all line segment vertices in the tri-dexel model of the virtual machined workpiece are extracted to form a point cloud on the workpiece surface.

[0057] Step 3: Use KDTree to analyze the surface quality of the workpiece.

[0058] First, the 3D point cloud data obtained in step two is used to construct a spatial index structure. This embodiment employs the KDTree (k-dimensional tree) data structure, implemented using the KDTree class from Python's Scikit-learn library. This structure recursively partitions the point cloud space to form a balanced binary tree, thereby significantly improving spatial query efficiency.

[0059] Subsequently, a preset tolerance (0.1 mm in this embodiment) is set, and the constructed KDTree is used to perform a radius search for each point in the point cloud. Specifically, a search sphere is constructed with the current point P as the center and a radius of 0.1 mm. The corresponding target point from the ideal CAD model is searched within this sphere.

[0060] The system makes a judgment based on the neighborhood search results: if the target point is found within the sphere, it indicates that the positional deviation of point P is within the allowable tolerance, and it is judged as a qualified point; if it is not found, point P is judged as a non-qualified point. After marking all points, the system calculates the surface forming pass rate and visualizes the out-of-tolerance areas, providing an intuitive basis for process adjustment. Figure 4 As shown, where, Figure 4 (a) in the figure represents the surface finish result after processing with a qualified process. Figure 4(b) shows the surface accuracy result after non-conforming processing, and all points exceeding the geometric accuracy tolerance are marked in red.

[0061] By constructing a KDTree spatial index structure, efficient organization and rapid querying of hundreds of thousands or even millions of point cloud data points are achieved, significantly improving the speed of neighborhood search and analysis, achieving millisecond-level response. Based on a preset tolerance radius of 0.1mm, the system can rigorously and efficiently determine whether each simulation point meets the geometric accuracy requirements and automatically identify out-of-tolerance areas. This method transforms abstract geometric accuracy requirements into intuitive, visualized quality maps (such as...). Figure 4 This enables process engineers to quickly locate areas of quality problems, providing real-time and quantitative decision-making basis for targeted adjustments to process parameters (such as toolpaths and cutting parameters).

[0062] Step 4: Analyze the surface roughness of the workpiece based on the process.

[0063] Based on the qualified point cloud data corresponding to the forming quality state determined in step three, and combined with the machining process parameters, the surface roughness is calculated. The roughness calculation is based on the relationship between the geometric model and the tool movement trajectory. For each point on the machining toolpath, the roughness is quantified by calculating the height of its surface micro-undulations. Specifically, the arithmetic mean roughness of that point is calculated using the following formula:

[0064] ;

[0065] in, This indicates the surface roughness at a certain point on the machined surface. Indicates the radius of the ball end mill. This indicates the distance from the point to the plane formed by the ball end mill's feed direction and spindle direction. This indicates the feed per tooth. In this embodiment, the ball end mill radius... The distance from a point on the workpiece surface to the plane formed by the ball end mill's feed direction and spindle direction. The range of values ​​is Feed per tooth during cutting By traversing all qualified point cloud data, the system calculates the roughness distribution map of the entire processed surface, achieving accurate and quantitative prediction of surface quality before physical processing.

[0066] Based on the point cloud data of the workpiece surface deemed acceptable in step three, specific process parameters such as the ball end mill radius, feed per tooth, and distance from the point to the feed-spindle plane are integrated. A geometric-physical fusion roughness analytical model is applied for point-by-point calculation. By traversing all acceptable points, a predicted map reflecting the roughness distribution of the entire machining area is generated, achieving a quantitative and visual assessment of surface roughness before machining. This method can be directly used to compare different process parameters (such as adjusting the feed rate). The surface quality is determined by the surface quality, thereby selecting the optimal process scheme that meets the requirements of geometric accuracy and surface finish before physical processing.

[0067] This embodiment verifies that the method of the present invention can effectively solve the problem of the disconnect between simulation and quality assessment, and provides key data support for the optimization of process parameters.

[0068] Example 2

[0069] A virtual measurement system for the surface quality and roughness of machined surfaces based on point clouds includes:

[0070] The simulation module is used to obtain a geometric model representing the shape of the workpiece after machining by simulating the machining process;

[0071] The point cloud extraction module is used to extract three-dimensional point cloud data representing the surface of the workpiece from the geometric model;

[0072] The spatial analysis module is used to perform spatial structure analysis on three-dimensional point cloud data in order to determine the forming quality status of the processed surface;

[0073] The surface roughness calculation module is used to calculate the surface roughness of the machined surface based on the forming quality status and processing parameters.

[0074] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.

[0075] Therefore, the present invention adopts the above-mentioned virtual measurement method and system for surface quality and roughness based on point cloud, which can accurately and efficiently predict the surface roughness before processing based on the point cloud data generated by processing simulation. It effectively solves the problem of the disconnect between virtual simulation and physical detection, provides forward-looking guidance for process parameter optimization, and reduces trial cutting costs and production cycle.

[0076] 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 them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A virtual measurement method for surface quality and roughness based on point clouds, characterized in that, Includes the following steps: Step S1: Obtain a geometric model representing the shape of the workpiece after machining through machining process simulation; Step S11: Construct a three-dimensional discrete element model of the workpiece. The three-dimensional discrete element model represents the material distribution of the workpiece by discretizing it into an array of line segments in multiple directions. Step S12: Construct a sweeping body model of the tool during its movement; Step S13: Perform Boolean operations between the swept volume model and the three-dimensional discrete element model to simulate the material removal process and update the geometric model representing the shape of the workpiece after processing. The process involves interpolating the start and end positions of the tool between two adjacent CNC code segments and performing several triangular mesh interpolations to generate a high-fidelity tool sweep model. The number of interpolations is calculated using the following formula: ; in, Indicates the number of triangular mesh interpolation operations. This indicates the feed distance between two adjacent CNC code segments. This indicates the number of samples taken per revolution of the cutting tool. This indicates the feed rate per tooth of the tool during the feeding process; Step S2: Extract three-dimensional point cloud data representing the workpiece surface from the geometric model; Step S3: Perform spatial structure analysis on the three-dimensional point cloud data to determine the forming quality status of the processed surface; Step S31: Construct a spatial index structure from the 3D point cloud data; Step S32: Based on the preset tolerance, perform neighborhood search on the points in the point cloud using the spatial index structure; Step S33: Based on the results of the neighborhood search, determine whether each point meets the geometric accuracy requirements and mark its forming quality status; Step S4: Calculate the surface roughness based on the forming quality status and processing parameters; The arithmetic mean roughness of a point on a machined surface is calculated using the following formula: ; in, This indicates the surface roughness at a certain point on the machined surface. Indicates the radius of the ball end mill. This indicates the distance from the point to the plane formed by the ball end mill's feed direction and spindle direction. This indicates the feed per tooth.

2. The virtual measurement method for surface quality and roughness based on point clouds according to claim 1, characterized in that, In step S2, the system samples the geometric elements on the surface of the geometric model to generate three-dimensional point cloud data containing three-dimensional coordinates and normal vector information.

3. The virtual measurement method for surface quality and roughness based on point clouds according to claim 1, characterized in that, The spatial index structure is a KDTree structure.

4. The virtual measurement method for surface quality and roughness based on point clouds according to claim 1, characterized in that, In step S33, if there is a data point from the target model in the preset tolerance neighborhood of the current point, the current point is determined to be a qualified point; otherwise, it is an unqualified point.

5. The virtual measurement method for surface quality and roughness based on point clouds according to claim 1, characterized in that, In step S4, the machining process parameters include at least one of the following: tool geometry parameters, feed rate, spindle speed, and tool spatial orientation.

6. The virtual measurement method for surface quality and roughness based on point clouds according to claim 5, characterized in that, In step S4, the roughness is quantified by calculating the height of surface micro-undulations based on the relationship between the geometric model and the tool movement trajectory.

7. A virtual measurement system for machined surface quality and roughness based on point clouds, used to execute the virtual measurement method for machined surface quality and roughness based on point clouds as described in any one of claims 1-6, characterized in that, include: The simulation module is used to obtain a geometric model representing the shape of the workpiece after machining by simulating the machining process. The point cloud extraction module is used to extract three-dimensional point cloud data representing the surface of the workpiece from the geometric model; The spatial analysis module is used to perform spatial structure analysis on three-dimensional point cloud data in order to determine the forming quality status of the processed surface; The surface roughness calculation module is used to calculate the surface roughness of the machined surface based on the forming quality status and processing parameters.