Part defect self-adaptive machining path planning method based on point cloud
By using a point cloud-based adaptive machining path planning method, 3D laser scanning and graph neural networks are used to identify defect areas. Guided reinforcement learning is then combined to adjust the path, solving the problem of insufficient defect adaptability in traditional CNC machining and achieving high-precision and stable machining results.
Patent Information
- Application Number
- CN202510975820.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-10-28
AI Technical Summary
Traditional CNC machining paths rely on CAD models and cannot adapt in real time to surface defects of parts caused by transportation, forming or storage processes, resulting in decreased machining accuracy and equipment damage. Moreover, existing methods are inefficient and have unstable accuracy, making it difficult to meet the needs of flexible manufacturing and intelligent machining.
An adaptive processing path planning method based on point cloud data dynamically identifies defect areas and adaptively adjusts the processing path through 3D laser scanning, point cloud reconstruction, graph neural networks, and guided reinforcement learning, generating an obstacle avoidance optimized path.
It significantly improves machining accuracy and system robustness, reduces the error rate, enhances machining quality and equipment safety, and is particularly suitable for manufacturing complex curved surface parts.
Smart Images

Figure CN120852872A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machining path planning technology, specifically to a point cloud-based adaptive machining path planning method for component defects. Background Technology
[0002] With the continuous development of manufacturing technology, the demand for high-precision machining of complex parts is increasing. Traditional CNC machining paths mostly rely on preset paths in CAD models, which cannot adapt in real time to surface defects or geometric deviations of parts caused by transportation, forming, or storage processes. When the workpiece has defects such as wear, scratches, and dents, if it is still machined along a fixed path, it may not only cause interference between the tool and the workpiece and a decrease in machining accuracy, but may even damage the equipment or cause scrap.
[0003] Currently, although some studies have attempted to introduce 3D scanning and point cloud reconstruction technologies to assist in machining path adjustment, they still mainly rely on manual intervention to determine defect locations and manually adjust paths. This approach is inefficient and lacks consistent accuracy, making it difficult to meet the needs of flexible manufacturing and intelligent processing. Therefore, there is an urgent need for a method that can automatically identify component defects and adaptively adjust machining paths based on point cloud data to improve the intelligence and stability of machining. Summary of the Invention
[0004] The purpose of this invention is to provide an adaptive processing path planning method for component defects based on point cloud, so as to solve the shortcomings of the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a point cloud-based adaptive machining path planning method for component defects, comprising:
[0006] S100. Obtain the initial point cloud data of the part to be processed, and establish a three-dimensional surface model of the part based on the point cloud data.
[0007] S200. Perform defect identification on the three-dimensional surface model, determine the location, type and size information of the defect area, and form a defect feature dataset;
[0008] S300. Based on the defect feature dataset, construct a processing risk model to determine the positional relationship between the original processing path and the defect area;
[0009] S400: Based on the positional relationship between the original processing path and the defect area, a path replanning algorithm is used to adaptively adjust the processing path and generate an obstacle avoidance optimized processing path.
[0010] S500: Based on the updated machining path, output the machining instruction file for CNC equipment to execute.
[0011] Preferably, S100 includes:
[0012] S101. Use a 3D laser scanner or structured light sensor to perform a full-surface scan of the part to be processed to obtain raw point cloud data containing high-density spatial coordinate information.
[0013] S102. Preprocess the original point cloud data, including denoising, filtering out isolated points, resampling, and point cloud registration.
[0014] S103. Based on the preprocessed point cloud data, a high-precision three-dimensional surface model of the component is generated using the Delaunay triangulation reconstruction method.
[0015] Preferably, S200 includes:
[0016] S201. The three-dimensional surface model is meshed to construct a uniformly distributed triangular mesh;
[0017] S202. Based on the normal vector change rate, curvature anomaly, and concave-convex offset characteristic parameters, potential defect areas are identified using the set threshold rules.
[0018] S203. Combining spatial scale analysis and voxel segmentation technology, calculate the center position, occupied area, depth or protrusion value of the defect area, and classify the identification results into scratches, pits and cracks to form a structured defect feature dataset.
[0019] Preferably, S300 includes:
[0020] S301. Map the defect feature dataset to the local mesh nodes of the 3D surface model to construct a defect heatmap, which is used to quantify the risk level distribution of each path region;
[0021] S302. Introduce a spatial risk assessment model based on graph neural networks, using three-dimensional path nodes as vertices in the graph and defect area features as edge weights, and train the model to predict the potential interference probability of path nodes.
[0022] S303. Discretize the original processing path into continuous path segments, use a spatial risk assessment model to make interactive judgments on each path segment, and mark the path segments with potential interference or processing hazards.
[0023] S304. Based on the degree of spatial overlap between the path segment and the defect area, the change of the normal angle, and the tool posture constraints, a machining risk index matrix is generated in a quantitative manner.
[0024] Preferably, after generating the processing risk index matrix, the following steps are also included:
[0025] S305. An improved multi-scale attention mechanism Transformer model is introduced to deeply model the interaction features between the processing path segment and the defect region. By fusing local geometric structure, normal distribution and defect type semantic information, high-dimensional risk feature representation is adaptively extracted.
[0026] S306. The trained Transformer model is used to perform point-by-point risk scoring on the entire path segment, and the dynamic time warping algorithm is combined to perform sequence clustering analysis on high-risk path segments to identify continuous high-risk area clusters that affect processing stability.
[0027] Preferably, S400 includes:
[0028] S401. Based on the generated processing risk index matrix, construct a processing path feasibility map, treat the path segments as nodes in the graph, and set the edge weights as the risk weights and processing cost functions of the corresponding segments.
[0029] S402. An improved guided reinforcement learning path replanning algorithm is introduced, aiming to minimize processing risk and maximize path smoothness. The algorithm predicts node jumping behavior through a policy network and dynamically generates candidate sequences of obstacle avoidance paths.
[0030] S403. Perform B-spline curve fitting and attitude optimization on the candidate path sequence to ensure that the path has a continuous and smooth motion trajectory on the basis of obstacle avoidance and meets the motion constraints of the processing equipment.
[0031] S404. Combining process requirements and equipment constraints, the accessibility of the path sequence is verified and locally corrected, and finally an adaptive processing path that meets the obstacle avoidance optimization requirements is output.
[0032] Preferably, the guided reinforcement learning path replanning algorithm includes:
[0033] S402-1. Based on the constructed processing risk index matrix and path feasibility map, the initial state space is the processing path segment set, and the action space is the reachable adjacent path segment of each node.
[0034] S402-2. Construct a policy network that integrates graph structure embedding and risk features. The input is the local geometric features, risk value and historical trajectory of the current path node, and the output is the probability distribution of the optimal jump path segment.
[0035] S402-3. Introduce a multi-objective reward function, and combine processing risk minimization, path smoothness and posture stability for dynamic feedback to train the reinforcement learning agent to achieve effective obstacle avoidance and jumping in high-risk areas.
[0036] S402-4. The exploration process is adjusted using a Bayesian guidance mechanism. The sampling strategy is dynamically adjusted based on the prediction error and strategy uncertainty in the path candidate sequence to improve the global optimal probability of obstacle avoidance path generation.
[0037] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0038] 1. This invention, by introducing key technologies such as point cloud reconstruction, defect identification, graph neural network modeling, and guided reinforcement learning path replanning, achieves intelligent obstacle avoidance and adaptive adjustment of the processing path for complex parts with surface defects. Compared with the traditional fixed path method relying on CAD models, this invention can dynamically identify and avoid defect areas such as cracks, dents, and scratches, significantly reducing the error rate and equipment risk during processing, and effectively improving processing accuracy and system robustness.
[0039] 2. This invention integrates multi-dimensional geometric features and processing constraints, and achieves synergistic optimization of path safety, smoothness, and executability through a risk index matrix and a multi-objective reinforcement learning strategy. Experimental results show that this method has significant advantages in improving path intelligence and processing quality, and is particularly suitable for manufacturing scenarios with extremely high requirements for processing complex curved surface parts, such as aerospace and mold making, demonstrating good engineering application value and promising prospects for industrial promotion. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0041] Figure 1 This is a mind map of the method of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0043] Example 1, please refer to Figure 1 As shown in this embodiment, the adaptive machining path planning method for component defects based on point clouds includes:
[0044] S100. Obtain the initial point cloud data of the part to be processed, and establish a three-dimensional surface model of the part based on the point cloud data.
[0045] S200. Perform defect identification on the three-dimensional surface model, determine the location, type and size information of the defect area, and form a defect feature dataset;
[0046] S300. Based on the defect feature dataset, construct a processing risk model to determine the positional relationship between the original processing path and the defect area;
[0047] S400: Based on the positional relationship between the original processing path and the defect area, a path replanning algorithm is used to adaptively adjust the processing path and generate an obstacle avoidance optimized processing path.
[0048] S500: Based on the updated machining path, output the machining instruction file for CNC equipment to execute.
[0049] In this embodiment, a method for adaptive machining path planning of component defects based on point cloud is provided. The first step is to obtain a 3D model of the component to be machined, which includes the following sub-steps:
[0050] First, a high-precision 3D laser scanner is used to perform a full-surface coverage scan of the part to be processed, collecting the laser signals reflected from the workpiece surface. The scanner's built-in processing module converts these signals into raw point cloud data with spatial coordinates (x, y, z). To accommodate complex parts with varying shapes and curvatures, a multi-view stitching mode is employed during the scanning process, along with a rotating platform to achieve multi-angle data fusion, thereby improving point cloud coverage and density. The resulting point cloud data has sub-millimeter spatial resolution, meeting the requirements for subsequent geometric reconstruction.
[0051] Subsequently, the acquired raw point cloud data is preprocessed. First, a statistical outlier filtering method is used to filter out abnormal discrete points and isolated points. Then, the point cloud is uniformly resampled using the Voxel Grid voxel downsampling algorithm to reduce data redundancy and computational complexity. Finally, the iterative nearest point (ICP) algorithm based on feature point matching is used to register the point cloud data from multiple perspectives to obtain a complete and continuous point cloud model.
[0052] After point cloud preprocessing, a surface reconstruction algorithm based on Delaunay triangulation is used to mesh the 3D discrete point set. By constructing minimal triangular elements, high-quality reconstruction of the component surface continuity is achieved while maintaining geometric feature accuracy. The reconstruction result is a high-density triangular mesh patch model, which serves as the basic input data for subsequent defect identification and path planning.
[0053] Through the above steps, the system can achieve high-precision and robust 3D modeling of complex parts surfaces, providing accurate geometric data support for subsequent adaptive machining path generation.
[0054] In the point cloud-based adaptive machining path planning method for component defects, to achieve efficient identification and accurate classification of surface defects, the following defect identification steps are implemented after obtaining a high-precision three-dimensional surface model:
[0055] First, the high-precision 3D surface model obtained in step S100 is meshed. This 3D model is an unstructured point cloud reconstruction result generated by the Delaunay triangulation method. To facilitate subsequent geometric feature analysis and defect extraction, this step transforms the model into a uniformly distributed regular triangular mesh structure. Specifically, the reconstructed surface is first divided into regions according to a preset resolution. A mesh resampling algorithm is then used to ensure that the side length, number of vertices, and topological relationships of each unit mesh remain consistent, ensuring comparability and consistency during geometric analysis.
[0056] To further improve the meshing quality and defect representation capability, this implementation introduces the Laplacian smoothing algorithm to optimize the triangular mesh, reducing mesh wrinkles and pseudo-boundary points that may be introduced during reconstruction, thereby improving the stability of local normal calculation and the accuracy of defect boundary identification. The meshed surface model will serve as the input basis for the defect identification algorithm.
[0057] Based on the meshed model, a multi-feature fusion method based on geometric anomaly detection is used to initially identify potential defect areas. This implementation selects three key geometric feature parameters: normal vector change rate, curvature anomaly value, and concavity / convexity offset, to comprehensively reflect the local abnormal morphology of the component surface.
[0058] Normal vector change rate (ΔN) calculation: For each triangular mesh element, calculate the angle difference between its normal vector and the normal vector of its neighboring meshes, which serves as a measure of surface continuity. An empirical threshold θ1 is set; when ΔN exceeds θ1, it is marked as a suspected defect point.
[0059] Gaussian curvature and mean curvature analysis: The Gaussian curvature K and mean curvature H of each vertex are calculated using a discrete surface curvature estimation algorithm. These two values are then combined to construct a curvature distribution map, and a statistical outlier detection method is used to identify curvature anomaly regions. The anomaly threshold is dynamically adjusted by setting multiples of the standard deviations of K and H to accommodate different surface morphology characteristics.
[0060] Concavity / convexity offset calculation: A local envelope surface fitting method is introduced to calculate the normal distance D between the current grid point and the fitted smooth surface, which serves as a quantitative indicator of the degree of concavity or convexity. Regions where D exceeds the upper and lower thresholds δ are marked as abnormal regions.
[0061] After normalizing the three types of feature parameters, a linear combination with weighting factors is performed to obtain a comprehensive defect confidence score map. Threshold segmentation is then applied to the score map to extract a preliminary set of suspected defect regions.
[0062] To improve the structuring of defect data, the identified defect areas are further subjected to three-dimensional quantization and type classification:
[0063] Spatial scale analysis: For each suspected defect area, the bounding box size in three-dimensional space is statistically analyzed, and its projected area, volume, and normal deviation distribution are calculated to form a defect morphology parameter set.
[0064] Voxel segmentation and center localization: The defect region is represented in a voxel format within the 3D model. A 3D voxel grid is constructed at a fixed resolution, and a region growing algorithm is used to cluster and segment the connected voxel regions. The centroid position of each cluster is calculated as the center point of the defect region, and its maximum depth or protrusion height is recorded.
[0065] Defect type classification: Based on the above parameters, classification samples containing feature vectors such as area, depth (or protrusion value), edge normal gradient, and aspect ratio are constructed. A pre-trained decision tree model is used to classify the defects. The classification rules are as follows:
[0066] If the defective area extends linearly, the normal changes smoothly, and the depth is less than the set threshold δ1, it is judged as a "scratch".
[0067] If the area is elliptical or circular, with a significant central depth and large changes in edge curvature, it is identified as a "pit".
[0068] If a region has multiple branches, irregular boundary contours, and significant abrupt changes in normals, it is identified as a "crack".
[0069] Finally, the center location, geometric dimensions, type identifier, and characteristic parameters of each defect are encoded into structured data items to form a unified defect feature dataset, which can be called by the subsequent processing risk modeling and path reconstruction modules.
[0070] In this embodiment, to achieve adaptive adjustment of the processing path based on defect information, it is necessary to intelligently model and quantify the spatial relationship between the original processing path and the identified defect area. Therefore, this embodiment proposes a processing risk assessment method that integrates graph neural networks and multi-scale Transformer models, specifically including the following steps:
[0071] First, the structured defect feature dataset generated in step S203 is mapped to the local mesh nodes of the 3D surface model. This mapping is based on the principle of spatial proximity and uses a KD-Tree accelerated nearest neighbor search algorithm to quickly map each defect record to its corresponding mesh region.
[0072] For each mapping node, a risk weight is assigned based on the defect type, size, depth, and normal anomaly. A continuous defect heatmap is then generated by applying a Gaussian kernel diffusion to this weight across the entire surface model. The heatmap uses color gradients to visualize the potential processing risk level of different regions, with values normalized to [0,1], where higher values indicate higher risk. This heatmap guides spatial perception of path risk areas and serves as the foundational input for subsequent neural network modeling.
[0073] To accurately model the nonlinear spatial interaction between paths and defect regions, this embodiment introduces a spatial risk assessment model based on graph neural networks (GNNs). The model is constructed as follows:
[0074] Discrete processing path nodes are used as vertices of the graph, and the path direction is defined as the connection direction of the edge.
[0075] Defect feature data, as additional attributes of edges in the graph, includes defect type, normal deviation, region density, etc.
[0076] Vertex features include: path node positions, local curvature, heatmap values, tool posture, etc.
[0077] A graph convolutional neural network is used to propagate information through a graph structure, and the model is trained to predict the potential processing interference probability of each node.
[0078] During the model training phase, path segments that have experienced interference or failure in historical processing cases are used as supervision labels. The network parameters are optimized through the cross-entropy loss function, and the final model is able to predict the distribution of high-risk nodes in the new 3D model.
[0079] The original machining path is a continuous spatial curve. To facilitate modeling and judgment, it is discretized into a set of equally spaced path segments. Each segment contains information such as the start point, end point, local surface normal, tangent vector, and machining direction.
[0080] By calling the aforementioned graph neural network model, the interference probability score of each path node is obtained. Then, the risk scores of each node within the path segment are aggregated using a sliding window method to calculate the average risk value and risk fluctuation value of the path segment. When this value exceeds a preset threshold ρ, the path segment is marked as a potential processing hazard segment and enters the path reconstruction module for processing.
[0081] To further quantify the degree of danger and the correlation between defects in each path segment, this step calculates the processing risk index matrix R based on three types of spatial factors:
[0082] Spatial overlap D1: Calculated by the overlap rate between the spatial voxel where the path segment is located and the defect voxel;
[0083] Normal angle Δθ: The change in the angle between the tangent vector of the path segment and the principal normal of the defect region, used to measure the sensitivity of tool attitude changes;
[0084] Attitude constraint deviation C: Based on the machine tool motion parameters, determine whether the path segment is at the limit boundary of the equipment attitude.
[0085] By combining D1, Δθ, and C, a multidimensional risk indicator vector is constructed, forming a risk indicator matrix R = [D1, Δθ, C] for the processing path segment, which serves as the input for subsequent deep modeling.
[0086] To enhance the model's ability to model the interaction between complex spatial paths and defective regions, an improved multi-scale attention mechanism, the Transformer model, is introduced.
[0087] The model takes as input a multidimensional risk index vector sequence of processing path segments and their spatial topological relationships, combined with the following features:
[0088] Local triangular mesh geometry (e.g., vertex curvature, edge length distribution);
[0089] Normal variation chart;
[0090] Defect semantic features (encoded by the aforementioned defect classification model);
[0091] The model adopts a hierarchical encoding approach, introduces spatial location encoding and semantic embedding in the self-attention module, and uses a multi-scale window partitioning strategy to extract path-defect coupling patterns at different scales.
[0092] During training, the Transformer model uses high-risk path segments as labels and enhances its ability to distinguish subtle geometric differences between different risk levels through a contrastive learning mechanism, thereby extracting a high-dimensional risk representation vector.
[0093] Using the trained Transformer model, risk scores are assigned to each processing path segment to obtain a risk distribution sequence at the path segment level.
[0094] To identify potential "continuous processing instability regions," a Dynamic Time Warping (DTW) algorithm is introduced to perform pattern clustering analysis on path risk sequences. This algorithm identifies clusters of continuous high-risk regions within a path by minimizing the temporal deformation distance of risk patterns between path segments.
[0095] The clustering results not only provide the start and end indexes of specific high-risk areas, but also output the average risk value, trend of change, and corresponding defect type of the area, providing a clear target for subsequent path adjustment.
[0096] In this embodiment, to achieve obstacle avoidance and optimization of the path on the surface of a defective component, an adaptive path replanning method based on guided reinforcement learning is proposed. This method comprehensively considers factors such as path risk indicators, machining costs, tool posture continuity, and machine tool motion constraints to generate an optimized machining path. Its key steps include: machining risk graph construction, reinforcement learning path replanning, curve fitting and posture optimization, and path reachability verification.
[0097] First, after generating the processing risk index matrix in step S300, a processing path feasibility map is constructed using path segments as the basic unit. This map is a weighted directed graph, where each node represents a discrete processing path segment, and edges represent the jumpable relationships between adjacent path segments.
[0098] The weight of each edge is set as a combination of the following two parts:
[0099] Risk weight w_r: derived from the risk value of the path segment in the risk index matrix (such as spatial overlap, normal angle, attitude deviation, etc.), used to characterize the degree of impact of defects on the path segment;
[0100] Processing cost w_c includes path length, curvature, attitude switching cost, equipment energy consumption, etc.
[0101] The total edge weight w = α·w_r + β·w_c, where α and β are adjustable weight factors that can be set according to the priority of specific processing techniques. The graph structure is stored in the form of an adjacency matrix, providing a basic path structure representation for the reinforcement learning module.
[0102] To automatically plan obstacle avoidance paths in high-risk areas, a guided reinforcement learning path replanning algorithm is introduced. Its training objective is to minimize path processing risk while maintaining path continuity and equipment accessibility.
[0103] The set of path segments is defined as the state space S of the reinforcement learning agent, where each state represents the current path segment. The action space A is the set of adjacent path segments that the current path segment can jump to, taken from the neighboring nodes connected to the current node in the feasibility graph.
[0104] The initial state is the starting segment of the original processing path, and the ending state is the ending segment of the target processing area. The jumps between path segments constitute the behavioral trajectory of the path planning strategy.
[0105] Construct a deep policy network that integrates graph structure embeddings and risk features. Its inputs include:
[0106] The spatial coordinates, local curvature, and risk indicator vector (from matrix R) of the current path node;
[0107] Historical trajectory (sequence of jumped path segments);
[0108] Geometric and risk characteristics of jumpable candidate paths;
[0109] Graph embedding representation of adjacency structure (encoded via GraphSAGE or GAT mechanism);
[0110] The network employs an architecture combining a multilayer perceptron (MLP) and an attention mechanism, outputting a jump probability distribution of candidate path segments. The agent selects the optimal action based on this distribution, dynamically generating a path jump sequence.
[0111] To simultaneously consider obstacle avoidance, safety, and path quality, the following multi-objective reward function R_t is designed:
[0112] If the redirection path avoids high-risk areas, the reward value increases by r1;
[0113] If the curvature of the jump path segment is low (i.e., the path is smoother), the reward value is increased by r2;
[0114] If the attitude change is stable (i.e., the angle between adjacent tool attitude segments is less than the set threshold), the reward value is +r3;
[0115] If a path segment enters a high-risk area or causes a sudden change in attitude, the penalty value is -p1, -p2.
[0116] The overall reward function is: R_t = λ1·r1 + λ2·r2 + λ3·r3 - μ1·p1 - μ2·p2;
[0117] Here, λ and μ are hyperparameters used to balance the weights of different objectives. The agent is trained using the Proximal Policy Optimization (PPO) algorithm to improve the policy's obstacle avoidance ability and path smoothness in complex environments.
[0118] To address the issues of low exploration efficiency and local optima in the early stages of reinforcement learning, a Bayesian guidance mechanism is incorporated. This mechanism dynamically adjusts the exploration strategy by utilizing the prediction error distribution and policy uncertainty during path transitions.
[0119] For nodes with high uncertainty, increase the sampling probability to guide the exploration of more potential optimal solutions;
[0120] For converged path segments, reduce unnecessary sampling to speed up the convergence process.
[0121] This strategy incorporates the high confidence upper bound (UCB) concept from Bayesian optimization, enabling the model to stably search for globally suboptimal paths even in complex defect scenarios.
[0122] After obtaining the candidate path sequence, a B-spline curve fitting algorithm is used for path reconstruction to improve the execution smoothness and attitude continuity of the path:
[0123] Select path jump points as control points and use cubic B-spline functions to generate continuous curves;
[0124] Insert attitude constraint values (such as tool axis direction and normal angle) at each control point to construct a curve-attitude coupling model;
[0125] The gradient descent method is used to optimize the control point position and attitude change function to ensure that the path curve meets the equipment attitude change tolerance on the basis of smoothness.
[0126] The generated curves not only avoid path breakage, but also ensure the continuity, stability and machining stability of the tool trajectory in complex spaces.
[0127] The generated fitted path is then validated for device reachability. This process includes:
[0128] Simulate path execution using the machine tool kinematics model and check whether each path point is within the workspace.
[0129] Verify that the tool orientation is within the allowable range of the equipment (such as the rotation axis angle limit);
[0130] Calculate whether the velocity and acceleration of the trajectory points meet the response capability of the control system.
[0131] If a local path segment is found to be out of bounds or exceeds the attitude constraints, the local path correction module is invoked for fine-tuning. The gradient iteration method is used to locally adjust the control point position and attitude parameters until the accessibility and stability requirements of the machining system are met.
[0132] The final output path is an adaptive optimized processing path that avoids defective areas while satisfying smoothness and equipment performance requirements.
[0133] In summary, this implementation method constructs a graph-structured processing model, introduces guided reinforcement learning algorithms and Bayesian optimization strategies, and achieves efficient obstacle avoidance path planning for defective regions. Furthermore, it enhances path continuity and executability through B-spline fitting and attitude control. This method overcomes the technical bottlenecks of traditional path planning, such as weak adaptability to defects, discontinuous path curvature, and unstable processing execution, and has wide practical applications in intelligent manufacturing scenarios.
[0134] After completing path optimization and reachability verification, the system generates a corresponding CNC machining instruction file based on the updated adaptive machining path. This instruction file is formatted according to process parameters (including tool type, feed rate, spindle speed, depth of cut, etc.) and pose information in the machining path, and outputs as standard G-code or a custom NC program file that supports multi-axis linkage, adapted to the target CNC system.
[0135] During instruction generation, the system automatically embeds attitude adjustment points, obstacle avoidance motion segments, and speed buffer segments in the path, and performs interpolation optimization and instruction compression on the trajectory data based on machine tool controller parameters (such as interpolation frequency and trajectory smoothing strategy) to ensure that the generated machining program not only accurately reflects the obstacle avoidance optimization path, but also has good dynamic stability and machining efficiency in actual execution.
[0136] Example 2: To verify the effectiveness of the "point cloud-based adaptive machining path planning method for component defects" described in this invention, the following experiment was designed to compare and verify the machining accuracy and path adaptability of this method with the traditional CAD path method in a defect environment.
[0137] A certain type of aerospace titanium alloy blade was selected as the processing object, and three typical defects were artificially introduced into the blade surface:
[0138] Scratches (approximately 18mm in length and 0.2mm in depth);
[0139] A pit (approximately 5mm in diameter and 0.5mm in depth);
[0140] Microcracks (approximately 12 mm in length);
[0141] The FARO 3D laser scanner was used to collect point cloud data of the blade to be processed, generating an original point cloud of approximately 1.2 million points. After preprocessing, the 3D surface model was reconstructed.
[0142] The same defective blade was processed using both simulation and actual machining methods based on the following two path planning approaches:
[0143] Comparison Group A: CNC machining is performed using preset paths from traditional CAD models, without considering defect adaptation;
[0144] Experimental Group B: Using the method described in this invention, defects are identified based on point clouds and path reconstruction is performed through guided reinforcement learning.
[0145] The machining was completed using a five-axis machining center (Mazak Variaxis i-600), and the machining process parameters and final results were collected.
[0146] Evaluation metrics include: machining accuracy deviation: point cloud deviation (RMSE) between the CAD model and the scanned model of the physical part; defect area miscut rate: the percentage of the area in the defect area that is miscut by the tool (%); machining path smoothness index: the average value of the rate of change of the first derivative of the path segment; single-piece machining time: including path planning and total machining time (min).
[0147] The experimental results are shown in the table below:
[0148]
[0149] The comparison results show that experimental group B significantly outperforms the traditional path method in terms of machining accuracy, defect avoidance capability, and path continuity. Particularly in terms of defect error rate, the error area decreased by over 94%, effectively preventing the tool from entering crack and pit areas, and significantly improving machining quality and safety.
[0150] Although the method of the present invention adds a certain time overhead (about 3 minutes) in the path planning stage, the resulting improvement in path safety and tool life is significant, thus it has outstanding comprehensive application value.
[0151] This embodiment verifies that the point cloud-based path reconstruction method has significant beneficial effects in real processing scenarios, effectively solves the problem that traditional methods cannot adapt to defect areas, and has broad engineering applicability and promotion prospects.
[0152] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A point cloud-based adaptive machining path planning method for component defects, characterized in that: include: S100. Obtain the initial point cloud data of the part to be processed, and establish a three-dimensional surface model of the part based on the point cloud data. S200. Perform defect identification on the three-dimensional surface model, determine the location, type and size information of the defect area, and form a defect feature dataset; S300. Based on the defect feature dataset, construct a processing risk model to determine the positional relationship between the original processing path and the defect area; S400: Based on the positional relationship between the original processing path and the defect area, a path replanning algorithm is used to adaptively adjust the processing path and generate an obstacle avoidance optimized processing path. S500: Based on the updated machining path, output the machining instruction file for CNC equipment to execute.
2. The adaptive machining path planning method for component defects based on point cloud as described in claim 1, characterized in that: S100 includes: S101. Use a 3D laser scanner or structured light sensor to perform a full-surface scan of the part to be processed to obtain raw point cloud data containing high-density spatial coordinate information. S102. Preprocess the original point cloud data, including denoising, filtering out isolated points, resampling, and point cloud registration. S103. Based on the preprocessed point cloud data, a high-precision three-dimensional surface model of the component is generated using the Delaunay triangulation reconstruction method.
3. The adaptive machining path planning method for component defects based on point cloud as described in claim 1, characterized in that: S200 includes: S201. The three-dimensional surface model is meshed to construct a uniformly distributed triangular mesh; S202. Based on the normal vector change rate, curvature anomaly, and concave-convex offset characteristic parameters, potential defect areas are identified using the set threshold rules. S203. Combining spatial scale analysis and voxel segmentation technology, calculate the center position, occupied area, depth or protrusion value of the defect area, and classify the identification results into scratches, pits and cracks to form a structured defect feature dataset.
4. The adaptive machining path planning method for component defects based on point cloud as described in claim 1, characterized in that: The S300 includes: S301. Map the defect feature dataset to the local mesh nodes of the 3D surface model to construct a defect heatmap, which is used to quantify the risk level distribution of each path region; S302. Introduce a spatial risk assessment model based on graph neural networks, using three-dimensional path nodes as vertices in the graph and defect area features as edge weights, and train the model to predict the potential interference probability of path nodes. S303. Discretize the original processing path into continuous path segments, use a spatial risk assessment model to make interactive judgments on each path segment, and mark the path segments with potential interference or processing hazards. S304. Based on the degree of spatial overlap between the path segment and the defect area, the change of the normal angle, and the tool posture constraints, a machining risk index matrix is generated in a quantitative manner.
5. The adaptive machining path planning method for component defects based on point cloud as described in claim 4, characterized in that: After generating the processing risk index matrix, the following is also included: S305. An improved multi-scale attention mechanism Transformer model is introduced to deeply model the interaction features between the processing path segment and the defect region. By fusing local geometric structure, normal distribution and defect type semantic information, high-dimensional risk feature representation is adaptively extracted. S306. The trained Transformer model is used to perform point-by-point risk scoring on the entire path segment, and the dynamic time warping algorithm is combined to perform sequence clustering analysis on high-risk path segments to identify continuous high-risk area clusters that affect processing stability.
6. The adaptive machining path planning method for component defects based on point cloud as described in claim 1, characterized in that: The S400 includes: S401. Based on the generated processing risk index matrix, construct a processing path feasibility map, treat the path segments as nodes in the graph, and set the edge weights as the risk weights and processing cost functions of the corresponding segments. S402. An improved guided reinforcement learning path replanning algorithm is introduced, aiming to minimize processing risk and maximize path smoothness. The algorithm predicts node jumping behavior through a policy network and dynamically generates candidate sequences of obstacle avoidance paths. S403. Perform B-spline curve fitting and attitude optimization on the candidate path sequence to ensure that the path has a continuous and smooth motion trajectory on the basis of obstacle avoidance, and meets the motion constraints of the processing equipment. S404. Combining process requirements and equipment constraints, the accessibility of the path sequence is verified and locally corrected, and finally an adaptive processing path that meets the obstacle avoidance optimization requirements is output.
7. The adaptive machining path planning method for component defects based on point cloud as described in claim 6, characterized in that: The guided reinforcement learning path replanning algorithm includes: S402-1. Based on the constructed processing risk index matrix and path feasibility map, the initial state space is the processing path segment set, and the action space is the reachable adjacent path segment of each node. S402-2. Construct a policy network that integrates graph structure embedding and risk features. The input is the local geometric features, risk value and historical trajectory of the current path node, and the output is the probability distribution of the optimal jump path segment. S402-3. Introduce a multi-objective reward function, and combine processing risk minimization, path smoothness and posture stability for dynamic feedback to train the reinforcement learning agent to achieve effective obstacle avoidance and jumping in high-risk areas. S402-4. The exploration process is adjusted using a Bayesian guidance mechanism. The sampling strategy is dynamically adjusted based on the prediction error and strategy uncertainty in the path candidate sequence to improve the global optimal probability of obstacle avoidance path generation.
Citation Information
Cited By
Constraint programming-based one-time penetration method for steel bars to penetrate through cross-shaped steel column through holes
CN121480057A
Motor shell machining method and system based on information analysis
CN121635081A
Method for detecting and quantifying concave-convex anomaly of surface contour line of workpiece
CN121705972A
Workpiece surface profile line convex-concave anomaly detection and quantification method
CN121705972B
Jewelry defect detection method and device based on image processing
CN122199476A