A five-axis machining tool path planning method for complex curved surfaces

By optimizing tool trajectory planning through Gaussian curvature clustering and region fitting, the problem of insufficient curvature features in the machining of complex curved surfaces is solved, realizing high-precision and highly adaptable five-axis machining, and improving machining accuracy and surface quality.

CN120928774BActive Publication Date: 2026-03-27信阳星原智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies lack efficient curvature feature mining and clustering strategies in the machining of complex curved surfaces, resulting in low surface fitting accuracy and uneven tool path planning, which affects machining accuracy and surface quality.

Method used

The Gaussian curvature is calculated and the region is divided by clustering of discrete surfaces. Sub-region sets are generated by region growing and convex hull calculation. The surface equation is fitted by cubic NURBS algorithm, the intersection curve is calculated by setting the cutting plane, the parameter step size is planned based on Simpson's formula, the spiral equation is constructed and the tool axis angle is optimized, and the machining pose sequence is integrated to generate the machining pose sequence.

Benefits of technology

It improves the accuracy and adaptability of five-axis machining of complex curved surfaces, enhances machining accuracy and surface quality, and reduces tool wear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120928774B_ABST
    Figure CN120928774B_ABST
Patent Text Reader

Abstract

The application discloses a five-axis machining tool path planning method for complex curved surfaces, and relates to the technical field of numerical control machining.The method comprises the following steps: dividing a sub-region based on a Gaussian curvature of a curved surface model and fitting a regional equation; projecting the sub-region and screening to obtain a boundary point set; fitting a curved surface equation by adopting a cubic NURBS; optimizing splicing into an optimal curved surface equation through a normal vector and curvature constraint; setting a cutting plane and calculating a cross curve; calculating an arc length based on a Simpson formula and planning a coordinate sequence of a trajectory point according to the curvature; constructing a helical equation of adjacent cutting planes, solving coefficients according to position and tangent continuous constraint, calculating a helical step length based on the Simpson formula, and generating a cross-surface trajectory point sequence; in the cutting plane, based on lossless and cutting direction constraint, optimizing an optimal angle sequence by a genetic algorithm, and generating a cross-surface angle sequence through cosine interpolation; and integrating a machining pose sequence to realize high-precision machining of the complex curved surface.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of numerical control machining, in particular to a five-axis machining tool path planning method for complex surfaces. BACKGROUND

[0002] In the field of complex surface machining, five-axis machining is of great significance to the aerospace, mold manufacturing and other industries because it can achieve more complex and high-precision surface machining. Precise tool path planning can improve surface machining precision, surface quality, shorten machining time, reduce tool wear, and help high-end equipment manufacturing to develop more precisely and efficiently, meeting the stringent requirements of complex products for surface quality.

[0003] The prior art lacks sufficient exploration of the curvature characteristics of complex surface discrete points, and lacks an efficient clustering strategy to distinguish curvature clusters, which affects the subsequent surface fitting accuracy due to regional division errors. Traditional surface fitting relies on the basic NURBS algorithm, and geometric discontinuities often occur at the junctions of different sub-regions, leading to sudden changes in tool load during machining and affecting surface quality and tool life. In existing trajectory generation algorithms, parameter step planning relies on experience or simple equidistant strategies, without dynamic adjustment of curvature, resulting in unreasonable distribution of trajectory points and making tool motion not smooth, affecting machining precision. SUMMARY

[0004] The present application proposes a five-axis machining tool path planning method for complex surfaces to address the shortcomings of existing technologies. For complex surface five-axis machining, the method calculates curvature clustering and divides regions, and fits equations, generates trajectory points through cross-section planes, constructs spiral equations to generate cross-surface trajectories, optimizes tool axis angles using genetic algorithms and interpolates cross-surface angles, and finally integrates all process data to generate machining pose sequences, achieving high-precision and strong adaptability tool path planning.

[0005] The technical solution to achieve the present application is as follows:

[0006] A five-axis machining tool path planning method for complex surfaces includes the following steps:

[0007] Discrete surface model and calculation of Gaussian curvature of discrete points to obtain a set of discrete points Cluster to determine curvature clusters, use region growing and convex hull calculation to obtain a set of sub-regions for each curvature cluster, resample each sub-region and fit a regional equation for each sub-region, p m And κ m are the coordinates and Gaussian curvature of the mth discrete point, and M is the total number of discrete points;

[0008] Projecting each sub-region to a plane and identifying the boundary point set of each sub-region, fitting the region surface equation of each sub-region using cubic NURBS algorithm and optimizing the splicing based on normal vector constraint and curvature constraint to generate the optimal surface equation u and v are transverse parameter and longitudinal parameter respectively;

[0009] Setting N tangent planes and calculating the tangent curve equation of each tangent plane with the optimal surface equation , calculating the curve arc length of each tangent plane based on Simpson formula and planning the parameter step of each tangent plane based on curvature to generate the trajectory point coordinate sequence of each tangent plane;

[0010] Constructing the helix equation of adjacent tangent planes and solving the helix coefficient based on position constraint and tangent line continuity constraint, calculating the helix step based on Simpson formula combined with the maximum moving distance d max and generating the cross-surface trajectory point coordinate sequence of adjacent tangent planes;

[0011] Constructing the tool axis vector g to in each tangent plane, setting the lossless constraint and cutting direction constraint to maximize the satisfaction degree, and obtaining the optimal angle sequence of each tangent plane through genetic algorithm optimization and generating the optimal cross-surface angle sequence of adjacent tangent planes through cosine interpolation;

[0012] Integrating the trajectory point coordinate sequence and the optimal angle sequence of each tangent plane, the cross-surface trajectory point coordinate sequence and the optimal cross-surface angle sequence of adjacent tangent planes, constructing the machining pose sequence and forwarding the five-axis machining machine tool.

[0013] Further, M discrete points are generated on the surface model, the neighborhood N(p m ) of the mth discrete point is determined according to K-D tree search, p m is the coordinate of the mth discrete point, the local tangent plane equation of the mth discrete point is fitted by using least square method based on the neighborhood N(p m ) and the normal vector of the mth discrete point is determined based on the coefficient of the first order term The direction vector of the vertical axis is calculated and the angle between the normal vector of the mth discrete point is calculated, and the coordinates of the points in the neighborhood N(p m ) in the world coordinate system are converted to the local coordinates in the local coordinate system with the normal vector of the mth discrete point as the vertical axis, the local surface function of any point in the neighborhood N(p m ) in the local coordinate system is fitted by using quadratic polynomial, and the Hessian matrix is constructed based on the coefficients of the quadratic terms, the maximum principal curvature and the minimum principal curvature of the mth discrete point are obtained by eigenvalue decomposition of the Hessian matrix, and the Gaussian curvature κ of the mth discrete point is obtained by multiplying the maximum principal curvature and the minimum principal curvaturem calculating the Gaussian curvature of the M discrete points to obtain a discrete point set

[0014] Further, the sub-region set of each curvature cluster is obtained by region growing and convex hull calculation, including the following steps:

[0015] selecting a discrete point with the maximum Gaussian curvature in the i-th curvature cluster as a seed point of the growing queue and marking, wherein the i-th curvature cluster is obtained by clustering the discrete points according to the Gaussian curvature by Kmeans++, and i e {1, 2, 3};

[0016] determining all neighborhood points of the seed point by K-D tree search, calculating the Gaussian curvature difference between each neighborhood point and the seed point, and comparing the Gaussian curvature difference with a curvature threshold value, wherein the curvature threshold value is equal to the Gaussian curvature of the seed point multiplied by a proportionality coefficient;

[0017] adding the neighborhood points less than or equal to the curvature threshold value and not marked to the growing queue as new seed points and marking, and performing neighborhood search on the new seed points, ignoring the neighborhood points greater than the curvature threshold value or marked;

[0018] repeating until no new seed point can be searched to stop, obtaining a growing queue, and deciding to reselect a seed point of a new growing queue based on whether there is an unmarked discrete point in the i-th curvature cluster or constructing a sub-region point set based on each growing queue;

[0019] constructing a minimum bounding box of each sub-region point set in the i-th curvature cluster and calculating a corresponding sub-region of each sub-region point set by a convex hull generation algorithm to generate a sub-region set of the i-th curvature cluster.

[0020] Specifically, setting the density p of the sub-region in the third curvature cluster as a density initial value p0, calculating the Gaussian curvature mean value of each sub-region in the first curvature cluster and the second curvature cluster setting the density p of each sub-region in the first curvature cluster and the second curvature cluster as a linear product of the density initial value p0 and the Gaussian curvature mean value using Poisson disc sampling, calculating a minimum sampling radius r based on the density p of the sub-region, randomly selecting a discrete point in the j-th sub-region in the i-th curvature cluster with a minimum distance to the sub-region boundary greater than or equal to the minimum sampling radius r and adding the discrete point to an active list, randomly selecting a center point of the active list when the active list is not empty and randomly sampling within a sampling radius r, putting the points not exceeding the sub-region boundary into the sub-region point set, putting the points with a minimum distance to the sub-region boundary greater than or equal to the minimum sampling radius r into the active list and removing the selected center point, and iteratively executing until the active list is empty, obtaining the sub-region point set of the j-th sub-region in the i-th curvature cluster and using a quadratic polynomial fitting to obtain a corresponding region equation

[0021] Specifically, the j-th sub-region in the i-th curvature cluster is projected onto the xoy plane and meshed. Mesh grids with no discrete points inside and discrete points in adjacent grids, or grids with fewer than a threshold number of discrete points inside, are marked as boundary grids. A candidate boundary point set for the j-th sub-region in the i-th curvature cluster is constructed based on the discrete points in all boundary grids and filtered using a recursive partitioning algorithm. The starting and ending points of the candidate boundary point set are connected to form line segments. The candidate boundary points located in the middle of the two endpoints of the line segment are taken as the midpoints of the line segments, and the distance from the midpoint to the line segment is calculated. If the distance is greater than the distance threshold, the line segment is split and the midpoint of each line segment is reselected. If the distance is less than or equal to the distance threshold, the midpoint of the line segment is removed and reselected. This process is repeated recursively until all candidate boundary points are traversed, resulting in the boundary point set for the j-th sub-region in the i-th curvature cluster.

[0022] Furthermore, a cubic NURBS algorithm is used to fit the regional surface equation of each sub-region, and the splicing is optimized based on normal vector constraints and curvature constraints to generate the optimal surface equation. Includes the following steps:

[0023] We select cubic B-spline basis functions to fit the boundary point set of the j-th sub-region in the i-th curvature cluster, and iteratively adjust the control points to minimize the region surface equation s of the j-th sub-region in the i-th curvature cluster. i,j (u,v) and the region equation The error is used to generate the region surface equation s of the j-th sub-region in the i-th curvature cluster. i,j (u,v);

[0024] Define a normal vector constraint that requires the angle between the normal vectors of any two spatially adjacent sub-regions to be less than or equal to an angle threshold, and define a curvature constraint that requires the curvature deviation between any two spatially adjacent sub-regions to be less than or equal to a dynamic curvature threshold.

[0025] The optimization objective is to minimize the weighted sum of the angles between the normal vectors of any two spatially adjacent sub-regions and the sum of their curvature deviations. A gradient descent algorithm is used to optimize the control points until the optimization objective converges, yielding the optimal region surface equations for all sub-regions. These optimal surface equations are then concatenated.

[0026] Furthermore, N cutting planes are set up and their equations with the optimal surface are calculated respectively. The equation of the intersection curve is obtained, and the arc length of the curve at each intersection plane is calculated based on Simpson's formula, including the following steps:

[0027] Set N equally spaced cutting planes and solve the optimal surface equations simultaneously. The equation of the intersecting plane with the nth intersecting plane is z = z n The equation F of the intersection curve of the nth intersecting plane is obtained.n (u,v) = 0, where, z n is the vertical axis value of the nth section plane in the world coordinate system;

[0028] The intersection curve equation F of the nth section plane is determined according to the ray method n The first solution of (u,v) = 0 corresponds to the transverse parameter The longitudinal parameter is substituted into the optimal transverse axis mapping and the optimal longitudinal axis mapping to obtain the first solution coordinate

[0029] The intersection curve equation F of the nth section plane is determined according to the nth section plane n The Jacobian matrix J of the nth section plane is constructed according to (u,v) = 0 n Newton's iterative method is used, and in the a-th iteration, the a+1-th approximate solution is equal to the a-th approximate solution minus the inverse matrix of the Jacobian matrix J n , multiplied by the a-th approximate solution, substituted into the intersection curve function F n (u,v) to obtain the approximate value;

[0030] The approximate value corresponding to the a+1-th approximate solution is calculated and it is determined whether it is less than the minimum threshold value. If it is less than the minimum threshold value, the solution coordinate of the a+1-th approximate solution is calculated, and if it is greater than or equal to the minimum threshold value, it is discarded.

[0031] The iteration is repeated until Q solution coordinates in the nth section plane are obtained. Using the polar coordinate sorting method, the solution line segment length d(q,q+1) between the q+1-th solution coordinate and the q-th solution coordinate is calculated, and the Q solution coordinates in the nth section plane are parameterized with respect to the parameter t n according to the statistics of the solution line segment length. The intersection curve equation F of the nth section plane and the optimal surface equation is fitted by the B-spline algorithm to obtain n (x n (t n ),y n (t n ),z n ) = 0, where x n (t n ) and y n (t n ) are the transverse axis parameter function x n (t n ) and the longitudinal axis parameter function y n (t n ) of the nth section plane, respectively.

[0032] Further, the curve arc length of each section plane is calculated based on Simpson formula, and the parameter step of each section plane is planned based on curvature, to generate the coordinate sequence of the trajectory points of each section plane, including the following steps:

[0033] In the nth section plane, the first derivative of the horizontal axis x'(t) n (t n ) and the first derivative of the vertical axis x'(t) n (t n ) are defined as the arc length element f(t) n (t n ) of the intersection curve of the nth section plane, and Simpson formula is used to calculate the curve arc length L n of the intersection curve of the nth section plane;

[0034] Based on the first derivative x'(t) n , the second derivative x'(t) n , the first derivative y'(t) n , and the second derivative y'(t) n , the curvature parameter formula K(t) n of the intersection curve of the nth section plane is constructed, and the corresponding parameter is substituted into the qth solution coordinate to calculate the corresponding curvature value , and compared with a fixed threshold value, which is the reciprocal of the size R of the surface model;

[0035] If greater than or equal to the fixed threshold value, the parameter step in the parameter interval is set to the product of the initial parameter step and the fixed threshold value divided by the corresponding curvature value of the parameter ; if less than the fixed threshold value, the parameter step in the parameter interval is set to the initial parameter step , and the trajectory parameter is added in the parameter interval with the parameter step , wherein the initial parameter step in the parameter interval is equal to the maximum moving distance d of the tool divided by the corresponding arc length element of the parameter

[0036] Based on the intersection curve equation F(x(t) n , y(t n )), the first derivative x'(t) n , the second derivative x'(t) n , the first derivative y'(t) n , and the second derivative y'(t) n , the curvature parameter formula K(t) n of the intersection curve of the nth section plane is constructed, and the corresponding parameter is substituted into the qth solution coordinate to calculate the corresponding curvature value , and compared with a fixed threshold value, which is the reciprocal of the size R of the surface model;n ),y n (t n ),z n The formula ) = 0 converts the trajectory parameters on the intersection curve of the nth cutting plane into the corresponding trajectory point coordinates, generating the trajectory point coordinate sequence P of the nth cutting plane. n W n The total number of trajectory points on the nth cutting plane.

[0037] Furthermore, the helical equations for adjacent cross-sections are constructed, and the helical coefficients are solved based on positional constraints and tangent continuity constraints, including the following steps:

[0038] Let the number of spiral turns be h, and calculate the W-th spiral of the nth cross-section. n coordinates of trajectory points Intersecting tangent vector The coordinates of the first trajectory point on the (n+1)th cross-section plane Intersecting tangent vector

[0039] Set the spiral equation from the nth cutting plane to the (n+1)th cutting plane. Let be the helical parameters from the nth cutting plane to the (n+1)th cutting plane.

[0040] Set positional constraints, requiring the coordinates F of the first cross-plane trajectory point to be... n,n+1 (0) and the coordinates of the last cross-plane trajectory point F n,n+1 (1) The Wth segment of the nth intersecting plane respectively n coordinates of trajectory points The coordinates of the first trajectory point on the (n+1)th cross-section plane coincide;

[0041] Set a tangent continuity constraint, requiring the W-th tangent of the nth cutting plane to be continuous. n coordinates of trajectory points The coordinates of the first trajectory point on the (n+1)th cross-section plane The direction of the tangent at the intersection is consistent with the direction of the intersecting tangent vector;

[0042] Solving the spiral equations simultaneously from the nth to the (n+1)th cutting plane Calculate the helix equation based on positional constraints and tangent continuity constraints. Horizontal axis helical coefficient and vertical axis helical coefficient

[0043] Specifically, the spiral equations from the nth to the (n+1)th cross-sections are calculated based on Simpson's formula. first-order spiral derivative of the horizontal axis and the first derivative of the vertical axis spiral Calculate the infinitesimal element of the spiral arc length Starting from the coordinates of the first cross-plane trajectory point, substitute the spiral parameters corresponding to the coordinates of the first cross-plane trajectory point into the infinitesimal element of the spiral arc length. Take the reciprocal and then divide it by the maximum moving distance d. max Multiply to obtain the first spiral step size Determine the coordinates of the second cross-plane trajectory point and the corresponding spiral parameters, and repeat this process until the second cross-plane trajectory point is reached. When the helical parameter corresponding to the coordinates of the first cross-plane trajectory point is greater than or equal to 1, the first... The coordinates of each cross-plane trajectory point are set as the coordinates of the last cross-plane trajectory point, generating a sequence P of cross-plane trajectory point coordinates from the nth to the (n+1)th cross-plane. n,n+1 , This represents the total number of cross-plane trajectory points from the nth cutting plane to the (n+1)th cutting plane.

[0044] Specifically, the angle θ of the cutting tool is defined as including the deflection angle θ. ob With the tilt angle θ in Construct the tool axis vector g to Within the nth cutting plane, a non-destructive constraint is set requiring that the cosine value of the angle between the tool axis vector and the normal vector at each trajectory point in the nth cutting plane is less than or equal to a cosine threshold. A cutting direction constraint is set requiring that the tool axis vector at each trajectory point in the nth cutting plane (z = z) ≤ z n The projection direction vector at the nth cutting plane is in the same direction as the intersection tangent vector. The dot product of the tool axis vector and the normal vector at all trajectory points within the nth cutting plane is defined as the lossless satisfaction. The negative cosine of the angle between the projection direction vector and the intersection tangent vector at all trajectory points within the nth cutting plane, plus 1, is defined as the cutting satisfaction. A genetic algorithm is used to iteratively update the angles at all trajectory points with the goal of maximizing the lossless satisfaction and the cutting satisfaction, thus obtaining the optimal angle sequence for the nth cutting plane.

[0045] Specifically, the optimal angle sequence from the nth intercept plane The optimal angle sequence of the (n+1)th intercept plane Obtain the Wth from each n coordinates of trajectory points Optimal angle and the coordinates of the first trajectory point Optimal angle The optimal span angle sequence from the nth to the (n+1)th cross-section is generated using cosine interpolation. That is, the first The optimal cross-plane angle Equal to the Wth digit in the nth intersecting planen coordinates of trajectory points The optimal angle at point n plus the optimal angle sequence of the (n+1)th intercept plane Coordinates of the first trajectory point With the Wth segment in the nth intersecting plane n coordinates of trajectory points The optimal angle difference is linearly extrapolated, and the extrapolation coefficients are linearly related to the optimal span angle. order Multiply by π to get the total number of points on the cross-plane trajectory from the nth to the (n+1)th cross-plane. The cosine value of the ratio.

[0046] Compared with existing technologies, this invention calculates Gaussian curvature using a discrete surface model and clusters it to determine curvature clusters. Sub-regions are generated through region growing and equation fitting. Boundary points are identified by projecting sub-regions, and the surface equations are fitted and optimized using a cubic NU RBS algorithm. Intersection planes are set to calculate intersection curves, and trajectory points are generated based on Simpson's formula and parameter step size planning. Spiral equations for adjacent intersection planes are constructed, coefficients are solved, and step size is calculated to generate cross-plane trajectories. Tool axis vectors are constructed within the intersection planes, and angle sequences are optimized using a genetic algorithm and cosine interpolation is applied to cross-plane angles. Finally, the machining pose sequence is integrated to generate a complete machining pose sequence. From sub-region division, surface fitting, trajectory generation to tool axis optimization, this invention innovatively improves the accuracy and adaptability of five-axis machining trajectory planning for complex surfaces. Attached Figure Description

[0047] Figure 1 This is a flowchart of a five-axis tool path planning method for machining complex curved surfaces.

[0048] Figure 2 This is a flowchart of the region growth process in this invention;

[0049] Figure 3 The flowchart for generating the optimal surface equation in this invention is shown below;

[0050] Figure 4 This is a flowchart of the Newton iteration method in this invention. Detailed Implementation

[0051] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0052] like Figure 1 As shown, this invention discloses a five-axis tool path planning method for machining complex curved surfaces, comprising the following steps:

[0053] The surface model is uniformly discretized and the Gaussian curvature of each discrete point is calculated to obtain the discrete point set. Determine curvature clusters by curvature clustering and obtain a set of sub-regions in each curvature cluster by region growing and convex hull calculation, resample each sub-region based on density p and fit a region equation for each sub-region by least square method, p m and κ m are the coordinates and Gaussian curvature of the mth discrete point respectively, and M is the total number of discrete points;

[0054] Project each sub-region to a two-dimensional plane, identify candidate boundary points in the discrete points in each sub-region and filter to obtain a set of boundary points for each sub-region, fit a region surface equation for each sub-region by cubic NURBS algorithm and optimize splicing based on normal vector constraint and curvature constraint to generate an optimal surface equation where u and v are the transverse parameter and longitudinal parameter in the cubic NURBS algorithm respectively;

[0055] Set N section planes along the vertical axis of the world coordinate system at a preset height, and the optimal surface equation Solve the intersection curve equations of the N section planes simultaneously, calculate the curve arc length of each section plane based on Simpson formula and plan the parameter step of each section plane based on curvature adaptation to generate the coordinate sequence of the trajectory points of each section plane;

[0056] Construct a helix equation between adjacent section planes, set position constraints and tangent continuity constraints and solve the helix coefficients, gradually deduce the helix step between the trajectory points based on Simpson formula combined with the maximum moving distance of the tool to generate the coordinate sequence of the cross-surface trajectory points between adjacent section planes;

[0057] In each section plane, construct the tool axis vector g ob according to the tool rake angle θ in and the tool inclination angle θ to , establish non-destructive constraints and cutting direction constraints, maximize the non-destructive satisfaction and cutting satisfaction as the goal, and optimize the optimal angle sequence of each section plane by genetic algorithm, and generate the optimal cross-surface angle sequence between each section plane and the next section plane by cosine interpolation;

[0058] Concatenate the trajectory point coordinates and the optimal angles of the same trajectory points in the optimal angle sequence to generate the plane machining pose sequence of the N section planes, concatenate the cross-surface trajectory point coordinates and the optimal cross-surface angles of the same cross-surface trajectory points in the optimal cross-surface angle sequence to generate the cross-surface machining pose sequence of N-1, arrange the plane machining pose sequence of the N section planes from low to high according to the section plane height, insert the cross-surface machining pose sequence into the machining pose sequence of the two connected section planes, generate the machining pose sequence and forward it to the five-axis machining machine tool.

[0059] Furthermore, M uniformly distributed discrete points are generated on the surface model, starting from the coordinates p of the m-th discrete point. m Starting from this point, a neighborhood search is performed using a KD-tree to determine the neighborhood N(p) of the m-th discrete point. m Based on neighborhood N(p) m For discrete points in the array, the equation of the local tangent plane at the m-th discrete point is fitted using the least squares method. The normal vector of the m-th discrete point is then determined based on the coefficients of the first-order terms of the local tangent plane equation. Calculate the direction vector of the vertical axis of the world coordinate system The normal vector of the m-th discrete point The included angle and based on the geometric transformation formula, the neighborhood N(p) of the m-th discrete point. m The coordinates (x, y, z) of any point within the array are transformed to the normal vector of the m-th discrete point. The local coordinates (x) in the local coordinate system of the vertical axis lo ,y lo ,z lo ), where x, y, and z are the horizontal, vertical, and triangular values ​​of the world coordinate system, respectively. lo y lo and z lo Let N(p) represent the x, y, and y axes of the local coordinate system, respectively. Then, in the local coordinate system of the m-th discrete point, a quadratic polynomial is used to fit the neighborhood N(p) of the m-th discrete point. m The vertical axis value z at any point within the range lo Regarding the x-axis value lo and the vertical axis value y lo The local surface function is obtained, and a 2×2 Hessian matrix is ​​constructed based on the quadratic coefficients of the local surface function. The maximum principal curvature at the m-th discrete point is obtained by eigenvalue decomposition of the Hessian matrix. and minimum principal curvature Multiplying yields the Gaussian curvature at the m-th discrete point. Wherein, the maximum principal curvature of the m-th discrete point and minimum principal curvature Let κ represent the curvature of the local surface at the m-th discrete point, reflecting the directions of most severe and gentlest curvature, respectively. m This reflects the curvature type of the local surface at the m-th discrete point. The Gaussian curvature of the M discrete points is calculated using the same method to obtain the discrete point set.

[0060] Furthermore, curvature clusters are determined through curvature clustering, and a set of sub-regions within each curvature cluster is obtained through region growing and convex hull calculation, including the following steps:

[0061] Set the cluster number to 3, and use Kmeans++ to cluster the discrete point set according to the Gaussian curvature Iterative clustering is performed to obtain a first curvature cluster, a second curvature cluster and a third curvature cluster, which respectively correspond to high-curvature, medium-curvature and low-curvature discrete points.

[0062] As shown in Figure 2 , a discrete point in the ith curvature cluster that is not marked and has the maximum Gaussian curvature is selected as a seed point of a growth queue and is marked as "grown", i∈{1, 2, 3}.

[0063] The seed point is subjected to neighborhood searching through a K-D tree to determine all neighborhood points of the seed point.

[0064] The Gaussian curvature of the seed point is multiplied by a proportionality coefficient to obtain a curvature threshold, the Gaussian curvature difference between each neighborhood point and the seed point is calculated and compared with the curvature threshold for determination.

[0065] A neighborhood point that is less than or equal to the curvature threshold and is not marked is added to the growth queue, the neighborhood point added to the growth queue is taken as a new seed point and is marked as "grown", and the new seed point is subjected to neighborhood searching, while neighborhood points that are greater than the curvature threshold or are marked are ignored.

[0066] The process is repeated until no new seed point can be searched, a growth queue is obtained, and it is determined whether there is a discrete point in the ith curvature cluster that is not marked.

[0067] If there is, a discrete point in the ith curvature cluster that is not marked and has the maximum Gaussian curvature is reselected as a seed point of a new growth queue and is subjected to neighborhood searching and comparison determination.

[0068] If there is not, the discrete points in each growth queue in the ith curvature cluster are respectively taken to construct a sub-region point set, and all sub-region point sets of the ith curvature cluster are obtained.

[0069] A minimum bounding box is constructed according to the discrete points in each sub-region point set of the ith curvature cluster, and a convex hull generation algorithm is used to calculate the convex hull of each sub-region point set to obtain a sub-region corresponding to each sub-region point set of the ith curvature cluster, and a sub-region set of the ith curvature cluster is generated by combination, wherein the convex hull generation algorithm is an existing algorithm and will not be described in detail.

[0070] Specifically, the density p is set based on the curvature cluster type to which a sub-region belongs, for a sub-region in the third curvature cluster, the density p is set as a density initial value p0, and for a sub-region in the first curvature cluster and the second curvature cluster, the Gaussian curvature mean value of the discrete points in the sub-region is calculated , and the density p is set as the linear product of the density initial value p0 and the Gaussian curvature mean value . Specifically as follows:

[0071]

[0072] Where α is a correction coefficient pre-set based on the dimensions of the surface model, Poisson disk sampling is used, and the minimum sampling radius is calculated based on the sphere volume formula and density ρ. In the j-th sub-region of the i-th curvature cluster, randomly select a discrete point whose minimum distance to the sub-region boundary is greater than or equal to the minimum sampling radius r and add it to the active list. If the active list is not empty, randomly select a point from the active list as the center point. Randomly sample M0 points within a sphere of sampling radius r. Add points that do not exceed the sub-region boundary to the sub-region point set. Add points whose minimum distance to the sub-region boundary is greater than or equal to the minimum sampling radius r to the active list and remove the center point from the active list. Iterate until the active list is empty, thus obtaining the sub-region point set of the j-th sub-region in the i-th curvature cluster. Use a quadratic polynomial basis function Φ = [1, x, y, x...]. 2 ,xy,y 2 ] T Construct the system of equations z = βΦ, and solve for the coefficient vector β = [β1, β2, β3, β4, β5]. T The region equation of the j-th sub-region in the i-th curvature cluster is obtained by fitting. The region equation of the j-th subregion in the i-th curvature cluster It reflects the distribution trend of discrete points in the j-th sub-region of the i-th curvature cluster.

[0073] Specifically, the j-th sub-region in the i-th curvature cluster is projected onto the xoy plane of the world coordinate system, and the xoy plane is meshed. Based on the boundary point identification rule, meshes with zero internal discrete points and whose adjacent meshes contain discrete points of the j-th sub-region in the i-th curvature cluster, or meshes with fewer internal discrete points than a threshold, are marked as boundary meshes. The discrete points within the boundary meshes are used as candidate boundary points to form the candidate boundary point set for the j-th sub-region in the i-th curvature cluster. A recursive partitioning algorithm is used to filter the candidate boundary point set. The first and last candidate boundary points in the set are used as the start and end points, respectively, and connected to form a line segment. The candidate boundary points located between the start and end points are selected. Candidate boundary points are selected and used as the midpoints of line segments. The distance from the midpoint to the line segment is calculated. If the distance is greater than the distance threshold, the line segment is split and the midpoint is used as the end point of the first line segment and the starting point of the second line segment. The midpoint is selected again for each line segment. If the distance is less than or equal to the distance threshold, the midpoint selected this time is removed and the midpoint of the line segment is selected again. This process is repeated recursively until all candidate boundary points in the candidate boundary point set are processed, resulting in the boundary point set of the j-th sub-region in the i-th curvature cluster. The quantity threshold is set to one-third of the average density of the j-th sub-region in the i-th curvature cluster. The average density of the j-th sub-region in the i-th curvature cluster is equal to the total number of discrete points in the j-th sub-region in the i-th curvature cluster divided by the projected area.

[0074] like Figure 3 As shown, further, the cubic NURBS algorithm is used to fit the regional surface equation of each sub-region, and the splicing is optimized based on normal vector constraints and curvature constraints to generate the optimal surface equation. Includes the following steps:

[0075] A cubic B-spline basis function is selected to perform NURBS fitting on the boundary point set of the j-th sub-region in the i-th curvature cluster, in order to minimize the region surface equation s of the j-th sub-region in the i-th curvature cluster. i,j (u,v) and the region equation of the j-th subregion in the i-th curvature cluster Using the error as the objective, the control points of the cubic NURBS algorithm are iteratively adjusted to generate the region surface equation s of the j-th sub-region in the i-th curvature cluster. i,j (u,v) uses the same method to calculate the regional surface equation of each sub-region in the three curvature clusters in turn. Here, u and v are the horizontal and vertical parameters in the cubic NURBS algorithm, respectively. They can be converted into coordinates (x,y,z) in world coordinates by mapping x(u,v), y(u,v) on the horizontal axis, and z(u,v) on the vertical axis. u,v∈[0,1]. The cubic NURBS algorithm is an existing algorithm and will not be elaborated on in detail.

[0076] Define a normal vector constraint that requires the angle between the normal vectors of any two spatially adjacent sub-regions to be less than or equal to an angle threshold, where the region surface equation s of the sub-region is... i,j The product of the partial derivatives of (u,v) with respect to the horizontal parameter u and the vertical parameter v is the normal vector of the subregion.

[0077] The curvature constraint is defined to require that the curvature deviation between any two spatially adjacent sub-regions is less than or equal to the dynamic curvature threshold. The dynamic region threshold is equal to 0.01 times the mean curvature of the two spatially adjacent sub-regions. The curvature is calculated by numerical differentiation approximation, which is an existing algorithm and will not be elaborated on further.

[0078] The optimization objective is to minimize the weighted sum of the angles between the normal vectors of any two spatially adjacent sub-regions and the sum of their curvature deviations. A gradient descent algorithm is used to optimize the control points of all sub-regions in three NURBS iterations. In each iteration, the partial derivative of the optimization objective with respect to the control points is calculated, and the control points are updated along the negative gradient direction with a fixed learning rate until the optimization objective converges. This process yields the optimal region surface equations for all sub-regions. The optimized optimal region surface equations for all sub-regions in the three curvature families are then concatenated. Optimal surface equations for generating surface models in, and The optimal horizontal axis mapping, the optimal vertical axis mapping and the optimal vertical axis mapping are respectively, since the least square method and the cubic NURBS algorithm are both for a single sub-region, the joint splicing of adjacent sub-regions is not considered, and the direct splicing is prone to problems such as concave, convex and staggered, so that the adjacent sub-regions cannot be smoothly connected, through the optimization adjustment of the normal vector constraint and the curvature constraint, the continuity of the adjacent sub-regions at the joint is ensured, so that the adjacent sub-regions can be smoothly spliced.

[0079] Further, N section planes are set along the vertical axis of the world coordinate system at a preset height, and the optimal surface equation is solved together with the section intersection curve equation of the N section planes, including the following steps:

[0080] Based on the size R of the surface model, N section planes are set along the vertical axis of the world coordinate system at a preset height R / N, wherein the section plane equation of the nth section plane is z=z n , z n is the vertical axis value of the nth section plane in the world coordinate system, and z n =nR / N.

[0081] The optimal surface equation is solved together with the section plane equation z=z n of the nth section plane, to obtain the section intersection curve equation F of the nth section plane, and the section intersection curve equation F n (u,v)=0 of the nth section plane is directly calculated when the surface model is complex, and the complexity is extremely high or even cannot be solved.

[0082] According to the ray method, the first solution of the section intersection curve equation F n (u,v)=0 of the nth section plane corresponds to the horizontal parameter and the vertical parameter , and the optimal horizontal axis mapping and the optimal vertical axis mapping are substituted to obtain the first solution coordinate in the nth section plane. The ray method is an existing algorithm, and will not be described in detail.

[0083] The partial derivatives of the section intersection curve equation F n (u,v)=0 of the nth section plane with respect to the horizontal parameter u and the vertical parameter v are calculated, and the Jacobian matrix J n of the nth section plane is constructed.

[0084] As shown in Figure 4 , the Newton iteration method is adopted, the solution recursive formula of the section intersection curve equation F n (u,v)=0 at the a-th iteration is established according to the Jacobian matrix J n , and the specific process is as follows:

[0085]

[0086] in, and The equations of the intersection curves are F n The horizontal and vertical parameters corresponding to the a-th approximate solution of (u,v)=0 are the same as the horizontal and vertical parameters corresponding to the (a+1)-th approximate solution obtained by iterative recursion in the a-th round.

[0087] The lateral parameters corresponding to the (a+1)th approximate solution and longitudinal parameters Substitute into the intersection curve function F n (u,v) yields the approximate value corresponding to the (a+1)th approximate solution. If the approximate value corresponding to the (a+1)th approximate solution If the value is less than the minimum threshold, then the (a+1)th approximate solution is taken as the intersection curve equation F. n Find the solution to (u,v)=0 and calculate the corresponding solution coordinates. If the approximate value corresponding to the (a+1)th approximate solution is... If the value is greater than or equal to the minimum threshold, it is discarded.

[0088] Repeat the iteration until the coordinates of Q solutions within the nth intercept plane are obtained. Using the polar coordinate sorting method, with the first solution coordinate... Using the origin of the polar coordinate system, calculate the coordinates of the remaining Q-1 solutions relative to the coordinates of the first solution in sequence. The coordinates are sorted by angle, and Q is the total number of preset solution coordinates;

[0089] Calculate the coordinates of the (q+1)th solution. Coordinates of the qth solution The length of the solution segment d(q, q+1) is determined by statistically analyzing the lengths of the solution segments. The coordinates of the Q solutions within the nth intersecting plane are then calculated. Regarding parameter t n Perform parametric equations, where t n ∈[0,1], coordinates of the (q+1)th solution Corresponding parameters Equal to the coordinates of the first solution coordinates up to the (q+1)th solution The sum of the lengths of all solution segments divided by the coordinates of Q solutions The total length of the line segment is calculated as follows:

[0090]

[0091] Where b∈{1,…,q}, c∈{1,…,Q-1}, the coordinates of the (q+1)th solution are... Corresponding conversion to the q+1th solution parameter coordinate The intersection curve equation F of the nth tangent plane and the optimal surface equation fitted by B-spline algorithm n (x n (t n ),y n (t n ),z n )=0, wherein x n (t n ) and y n (t n ) are the horizontal axis parameter function x n (t n ) and the vertical axis parameter function y n (t n ) of any point on the intersection curve of the nth tangent plane, respectively, and are the calculated values obtained by substituting the horizontal axis parameter function x n (t n ) and the vertical axis parameter function y n (t n ) into the parameter

[0092] Further, the curve arc length L n of the nth tangent plane is calculated based on the Simpson formula, and the parameter step Δt n of the nth tangent plane is planned based on curvature adaptation, to generate the trajectory point coordinate sequence of the nth tangent plane, including the following steps:

[0093] Based on the arithmetic square root of the horizontal axis first derivative x′ n (t n ) and the vertical axis first derivative x′ n (t n ) of the horizontal axis parameter function x n (t n ) and the vertical axis parameter function y n (t n ) with respect to the parameter t n , the arc length infinitesimal of the intersection curve of the nth tangent plane is defined

[0094] The curve arc length L n of the intersection curve of the nth tangent plane is calculated by the Simpson formula, specifically as follows:

[0095]

[0096] wherein Z odd and Z even represent the odd set and the even set, respectively; ​​

[0097] Based on the first derivative of the horizontal axis x n ′(t n ), second derivative x′ on the horizontal axis n ′(t n ), first derivative of the vertical axis y n ′(t n ), the second derivative of the vertical axis y′ n The curvature parameter κ of the intersection curve of the nth intersecting plane is constructed using the formula ′(t). n (t n The details are as follows:

[0098]

[0099] The coordinates of the q-th solution Corresponding parameters Substitute the curvature parameter κ of the intersection curve of the nth intersecting plane into the formula. n (t n ) Calculated parameters Corresponding curvature value

[0100] If parameter Corresponding curvature value The parameter range is greater than or equal to the reciprocal of the surface model size R. Inner parameter step size Set as initial parameter step size The product of the surface model dimension R and the reciprocal divided by the parameter Corresponding curvature value If parameter Corresponding curvature value Less than the reciprocal of the surface model size R, the parameter range Inner parameter step size Set as initial parameter step size With parameter step size In the parameter range Internal trajectory parameters are added, including the parameter range. Initial parameter step size Equal to the maximum travel distance d of the tool max Divide by parameter Corresponding arc length micro-element

[0101] Obtain all trajectory parameters on the intersection curve of the nth intersecting plane and substitute them into the intersection curve equation F. n (x n (t n ),y n (t n ),z nIf ) = 0, calculate W within the nth cutting plane. n Given the coordinates of several trajectory points, generate the sequence of trajectory point coordinates for the nth intercept plane. in, For the wth n The coordinates of the trajectory points, W n Let be the total number of trajectory points on the nth cross-section, and let the coordinates of the 1st trajectory point be... With W n coordinates of trajectory points The coordinates of the first solution are respectively and the coordinates of the Qth solution Essentially, the trajectory point coordinate sequence P n It is obtained by adaptively adding Q solution coordinates based on the curvature changes between adjacent solution coordinates, on the basis of the original Q solution coordinates.

[0102] Furthermore, construct the spiral equation from the nth cutting plane to the (n+1)th cutting plane. Setting positional constraints and tangent continuity constraints, and solving for the helix coefficient, includes the following steps:

[0103] With the nth cross-section plane, the Wth n coordinates of trajectory points The coordinates of the first trajectory point across the first cross plane are given by the coordinates of the first trajectory point on the (n+1)th cross plane. For the last cross-plane trajectory point, set the number of spiral turns to h, based on the nth cutting plane and the optimal surface equation. The equation of the intersection curve F n (x n (t n ),y n (t n ),z n ) = 0 and the (n+1)th cutting plane and the optimal surface equation The equation of the intersection curve F n+1 (x n+1 (t n+1 ),y n+1 (t n+1 ),z n+1 ) = 0 Calculate the W-th th cross-section of the nth cross-section respectively n coordinates of trajectory points Intersection tangent vector at the point The coordinates of the first trajectory point on the (n+1)th cross-section plane Intersection tangent vector at the point This is because the parameter corresponding to the coordinates of the first trajectory point in each cross-section is 0, and the parameter corresponding to the coordinates of the last trajectory point is 1;

[0104] Set the spiral equation from the nth cutting plane to the (n+1)th cutting plane. Specifically as follows:

[0105]

[0106] in, and The W-th of the nth cross-section n coordinates of trajectory points The horizontal and vertical axis values, and The coordinates of the first trajectory point on the (n+1)th cross-section are respectively The horizontal and vertical axis values, and Spiral equations The horizontal axis helical coefficient and the vertical axis helical coefficient, Let be the helical parameters from the nth cutting plane to the (n+1)th cutting plane.

[0107] Set positional constraints to require the coordinates F of the first cross-plane trajectory point of the spiral trajectory from the nth cross-plane to the (n+1)th cross-plane. n,n+1 (0) and the coordinates of the last cross-plane trajectory point F n,n+1 (1) The Wth segment of the nth intersecting plane respectively n coordinates of trajectory points The coordinates of the first trajectory point on the (n+1)th cross-section plane Overlap, that is

[0108] Set a tangent continuity constraint, requiring the helical trajectory to be at the W-th tangent position on the nth cross-section. n coordinates of trajectory points The tangent direction at point W is the same as that at point n. n coordinates of trajectory points Intersection tangent vector at the point The coordinates of the first trajectory point on the (n+1)th cross-section are consistent in direction. The tangent direction at point n and the coordinates of the first trajectory point on the (n+1)th intersecting plane Intersection tangent vector at the point The direction is consistent, that is, solving the spiral equation. Regarding the helical parameters from the nth to the (n+1)th cross-section. First-order spiral derivative Substituting 0 and 1 into the first-order spiral derivative vectors, they are respectively equal to the W-th vector of the nth intersecting plane. n coordinates of trajectory points Intersection tangent vector at the point The coordinates of the first trajectory point on the (n+1)th cross-section plane Intersection tangent vector at the point Right now

[0109] By solving the helix equation of the nth section plane to the n+1th section plane The position requirement constraint and the tangent continuity constraint can be calculated by algebraic elimination The horizontal helix coefficient of the helix equation And the vertical helix coefficient Specifically as follows:

[0110]

[0111] Specifically, based on the Simpson formula, the helix arc length element of the nth section plane to the n+1th section plane Wherein, And And The horizontal first-order helix derivative and the vertical helix first-order derivative in the first-order helix derivative From the first cross-section trajectory point coordinate of the helix trajectory, the helix parameter corresponding to the first cross-section trajectory point coordinate is substituted into the helix arc length element And multiplied by the maximum movement distance d of the tool max To obtain the first helix step Since the helix parameter corresponding to the first cross-section trajectory point coordinate is 0, the helix parameter corresponding to the second cross-section trajectory point coordinate is equal to the first helix step And the helix arc length element is substituted again To calculate the third cross-section trajectory point coordinate, until the helix parameter corresponding to the Cross-section trajectory point coordinate is greater than or equal to 1, the Cross-section trajectory point coordinate is set as the last cross-section trajectory point coordinate, and the cross-section trajectory point coordinates are respectively marked as The cross-section trajectory point coordinate sequence P of the nth section plane to the n+1th section plane is generated n,n+1 , The total number of cross-section trajectory points of the nth section plane to the n+1th section plane.

[0112] Specifically, the angle of the tool θ = [θ ob , θ in ] is defined, wherein θ ob And θ in The deflection angle and the inclination angle of the tool, respectively, then the tool axis vector g to = [sinθ in cosθ ob , sinθ in sinθ ob , cosθ inWithin the nth cutting plane, a lossless constraint is set to require the trajectory point coordinate sequence P of the nth cutting plane. n The cosine of the angle between the tool axis vector and the normal vector at each trajectory point is less than or equal to the cosine threshold. The normal vector at each trajectory point is obtained by substituting the horizontal parameter u and vertical parameter v corresponding to the coordinates of each trajectory point into the optimal surface equation. The partial derivatives of the transverse parameter u and the longitudinal parameter v are multiplied together to obtain the coordinate sequence P of the trajectory points of the nth cutting plane, which is required by the cutting direction constraint. n The tool axis vector at each trajectory point is on the nth cutting plane z = z n The projection direction vector at point P is in the same direction as the intersection tangent vector at each trajectory point. The trajectory point coordinate sequence P... n The dot product of the tool axis vector and the normal vector at all trajectory point coordinates is defined as the lossless satisfaction degree. The larger the lossless satisfaction degree, the less likely the tool is to cut into the curved surface and cause damage. The trajectory point coordinate sequence P n The cutting satisfaction score is defined as the negative of the cosine of the angle between the projected direction vector and the intersecting tangent vector at all trajectory point coordinates, plus 1. The closer the cutting satisfaction score is to 1, the more consistent the directions of the projected direction vector and the intersecting tangent vector are. A genetic algorithm is used to process the trajectory point coordinate sequence P. n The angles at all trajectory points are used as optimization variables. The optimization is performed iteratively to maximize both lossless satisfaction and cutting satisfaction, ultimately yielding the optimal angle sequence for the nth cutting plane. Among them, the genetic algorithm is an existing algorithm and will not be elaborated on further.

[0113] Specifically, the optimal angle sequence from the nth intercept plane Obtain the Wth n coordinates of trajectory points Optimal angle The optimal angle sequence from the (n+1)th cutting plane Obtain the coordinates of the first trajectory point. Optimal angle The optimal span angle sequence from the nth to the (n+1)th cross-section is generated using cosine interpolation. Among them, the The optimal cross-plane angle The specific formula for cosine interpolation is as follows:

[0114]

[0115] in, and The optimal angle sequence for the nth cutting plane. W in the middle n coordinates of trajectory points Optimal angle at the position and optimal angle sequence of the n+1th section plane 1st trajectory point coordinate in the middle of the first trajectory Optimal angle at the position, Total number of cross-surface trajectory points from the n th section plane to the n+1th section plane.

[0116] The application discloses a five-axis machining tool path planning method for a complex surface, aiming at five-axis machining tool path planning for a complex surface, through multi-key step cooperation, the following beneficial effects are brought: first, discretize the surface model and calculate the Gaussian curvature, divide and fit the sub-regions through clustering, region growing and other operations, accurate region processing lays a foundation for subsequent trajectory planning, makes the surface feature recognition more accurate, and guarantees the reliability of the processing basic data; project the sub-regions and splice them through cubic NURBS algorithm fitting optimization, generate the optimal surface equation, improve the surface fitting precision and smoothness, and make the processing surface quality better; set the section plane to calculate the intersection curve, plan the parameter step length to generate the trajectory points based on the Simpson formula, combine the helical equation solving and step length calculation to construct the cross-surface trajectory, make the trajectory point distribution reasonable, the cross-surface movement smooth, avoid processing vibration and error; construct the tool axis vector in the section plane, optimize the angle sequence through the genetic algorithm and interpolate the cross-surface angle, fully consider the processing constraints, optimize the tool axis posture, and improve the processing efficiency and surface quality; finally, integrate all kinds of sequences to generate the processing pose sequence, realize high-precision and high-adaptability planning of the five-axis machining trajectory of the complex surface, and effectively improve the processing precision.

[0117] The above only describes the preferred embodiments of the application, and the protection scope of the application is not limited to the above-mentioned embodiments only, and any technical scheme falling within the idea of the application belongs to the protection scope of the application. It should be noted that, for ordinary skilled persons in the technical field, some improvements and decorations without departing from the principles of the application are also considered as the protection scope of the application.

Claims

1. A method for five-axis machining tool path planning for complex curved surfaces, characterized in that, The method comprises the following steps: Discrete surface model and Gaussian curvature calculation of discrete points, discrete point set and clustering to determine curvature cluster, sub-region set of each curvature cluster obtained by region growing and convex hull calculation, resampling of each sub-region and fitting of region equation of each sub-region; Projecting each sub-region to a plane and identifying and screening the corresponding boundary point set, fitting the region surface equation of each sub-region by using a cubic NURBS algorithm and optimizing splicing based on normal vector constraint and curvature constraint to generate an optimal surface equation; Setting a section plane and respectively calculating the intersection curve equation of the optimal surface equation, calculating the curve arc length of each section plane based on Simpson formula and planning the parameter step length of each section plane based on curvature to generate the coordinate sequence of the trajectory points of each section plane; Constructing the helix equation of adjacent section planes and solving the helix coefficient based on position constraint and tangent continuity constraint, gradually calculating the helix step length based on Simpson formula to generate the cross-surface trajectory point coordinate sequence of adjacent section planes; Constructing the tool axis vector in each section plane, setting the lossless constraint and the cutting direction constraint, and optimizing the optimal angle sequence of each section plane by genetic algorithm to maximize the satisfaction degree, and generating the optimal cross-surface angle sequence of adjacent section planes by cosine interpolation; Integrating the trajectory point coordinate sequence of each section plane and the optimal angle sequence, and the cross-surface trajectory point coordinate sequence of adjacent section planes and the optimal cross-surface angle sequence to generate the machining pose sequence; The method comprises the following steps: setting the number of spiral turns, calculating the intersection tangent vector of the first track point coordinate of the first section plane and the intersection tangent vector of the first track point coordinate of the second section plane, setting the spiral equation of the first section plane to the second section plane, setting the position requirement constraint, requiring the first cross-section track point coordinate and the last cross-section track point coordinate to coincide with the first track point coordinate of the first section plane and the first track point coordinate of the second section plane respectively, setting the tangent continuous constraint, requiring the tangent direction of the first track point coordinate of the first section plane and the first track point coordinate of the second section plane to be consistent with the direction of the intersection tangent vector, and simultaneously solving the spiral equation of the first section plane to the second section plane, the position requirement constraint and the tangent continuous constraint to calculate the horizontal spiral coefficient and the vertical spiral coefficient of the spiral equation. ​​​​​​​​​​​​​ The spiral step is calculated based on the Simpson formula, including: calculating the horizontal axis first spiral derivative and the vertical axis spiral first derivative of the spiral equation from the first cross-section plane to the nth cross-section plane based on the Simpson formula, and calculating a spiral arc length element; starting from the first cross-section trajectory point coordinate, substituting the spiral parameter corresponding to the first cross-section trajectory point coordinate into the spiral arc length element, multiplying the reciprocal by the maximum moving distance to obtain the first spiral step; determining the second cross-section trajectory point coordinate and the corresponding spiral parameter based on the first spiral step; recursively until the spiral parameter corresponding to the nth cross-section trajectory point coordinate is greater than or equal to 1; setting the nth cross-section trajectory point coordinate as the last cross-section trajectory point coordinate; and generating the cross-section trajectory point coordinate sequence from the first cross-section plane to the nth cross-section plane. ​​​​​​​​​ 2. A five-axis machining tool path planning method for complex curved surfaces as claimed in claim 1, wherein, Fitting the region surface equation of each sub-region by using a cubic NURBS algorithm and optimizing splicing based on normal vector constraint and curvature constraint to generate an optimal surface equation, comprising the following steps: selecting a cubic B-spline basis function to fit the first boundary point set of the first sub-region in the curvature cluster, iteratively adjusting the control points to minimize the error between the region surface equation of the first sub-region in the curvature cluster and the region equation, generating the region surface equation of the first sub-region in the curvature cluster; and the second sub-region in the curvature cluster. Defining the normal vector constraint to require that the included angle of the normal vectors of any two spatially adjacent sub-regions is less than or equal to an included angle threshold, and defining the curvature constraint to require that the curvature deviation of any two spatially adjacent sub-regions is less than or equal to a dynamic curvature threshold; Taking the weighted value of the total sum of the included angle and the total sum of the curvature deviation of any two spatially adjacent sub-regions as the optimization objective, and optimizing the control points by using the gradient descent algorithm until the optimal region surface equation of all sub-regions is obtained when the optimization objective converges, and splicing the optimal surface equation.

3. A five-axis machining tool path planning method for complex curved surfaces as claimed in claim 1, wherein, The setting of the section plane and the calculation of the intersection curve equation of the optimal surface equation, the calculation of the curve arc length of each section plane based on Simpson formula, comprises the following steps: Setting a tangent plane equation of the first tangent plane, and a tangent curve equation of the first tangent plane is obtained. a tangent plane equation of the first tangent plane, and a tangent curve equation of the first tangent plane is obtained. a tangent plane equation of the first tangent plane, and a tangent curve equation of the first tangent plane is obtained. Determining the first based on the X-ray method The first solution of the intersection curve equation of each plane is given by substituting the horizontal and vertical parameters corresponding to the first solution into the optimal horizontal and vertical axis mappings to obtain the coordinates of the first solution. According to the intersection curve equation of the first cutting plane, the Jacobian matrix of the first cutting plane is constructed, and the Newton iteration method is adopted to recursively derive the first approximate solution based on the first approximate solution in the first iteration. Calculate the first The approximate value corresponding to the nth approximate solution is checked and it is determined whether it is less than the minimum threshold. If it is less than the minimum threshold, the nth approximate value is calculated. The coordinates of an approximate solution are discarded if they are greater than or equal to the minimum threshold. repeat iteration until the th solution coordinate in the th tangent plane is obtained th solution coordinate and the th solution coordinate is calculated by polar coordinate ordering method, and the th solution coordinate in the th tangent plane is parameterized according to the parameter based on the statistics of the solution segment length, and the intersection curve equation of the th tangent plane and the optimal surface equation is obtained by B-spline algorithm fitting.

4. A five-axis machining tool path planning method for complex curved surfaces as claimed in claim 1, wherein, The calculation of the curve arc length of each section plane based on Simpson formula and the planning of the parameter step length of each section plane based on curvature to generate the coordinate sequence of the trajectory points of each section plane, comprises the following steps: In the first sectional plane, the arc length element of the intersection curve of the first sectional plane is calculated and the curve arc length of the intersection curve of the first sectional plane is calculated by using Simpson formula. Determination of the curvature parameter formula of the intersection curve of the first tangent plane, the corresponding curvature value is calculated by substituting the parameter corresponding to the first solution coordinate into the parameter, and compared with the fixed threshold value, the parameter interval is defined as the parameter corresponding to the first solution coordinate to the parameter corresponding to the first solution coordinate; If greater than or equal to the fixed threshold, set the parameter step length in the parameter interval as the product of the initial parameter step length and the fixed threshold divided by the curvature value of the first solution coordinate, if less than the fixed threshold, set the parameter step length in the parameter interval as the initial parameter step length, and add the trajectory parameters in the parameter interval with the parameter step length, wherein the initial parameter step length is equal to the maximum moving distance divided by the arc length infinitesimal corresponding to the parameter of the first solution coordinate. If greater than or equal to the fixed threshold, set the parameter step length in the parameter interval as the product of the initial parameter step length and the fixed threshold divided by the curvature value of the first solution coordinate, if less than the fixed threshold, set the parameter step length in the parameter interval as the initial parameter step length, and add the trajectory parameters in the parameter interval with the parameter step length, wherein the initial parameter step length is equal to the maximum moving distance divided by the arc length infinitesimal corresponding to the parameter of the first solution coordinate. If greater than or equal to the fixed threshold, set the parameter step length in the parameter interval as the product of the initial parameter step length The trajectory parameter on the intersection curve of the first section plane is converted into the corresponding trajectory point coordinate based on the intersection curve equation of the first section plane, and a trajectory point coordinate sequence of the first section plane is generated. The trajectory parameter on the intersection curve of the first section plane is converted into the corresponding trajectory point coordinate based on the intersection curve equation of the first section plane, and a trajectory point coordinate sequence of the first section plane is generated. The trajectory parameter on the intersection curve of the first section plane is converted into the corresponding trajectory point coordinate based on the intersection 5. A five-axis machining tool path planning method for complex curved surfaces as claimed in claim 1, wherein, The region growing and convex hull calculation to obtain the sub-region set of each curvature cluster, comprises the following steps: Selecting a seed point in the curvature cluster, marking and constructing a growth queue; Searching for the neighborhood points of the seed point, calculating the Gaussian curvature difference between each neighborhood point and the seed point, and comparing with the curvature threshold; Joining the neighborhood points less than or equal to the curvature threshold and not marked into the growth queue as new seed points and marking, and continuing to search for the neighborhood of the new seed points; Repeat until no new seed point can be searched, get the growth queue, based on whether there is an unmarked discrete point in each curvature cluster, decide to reselect the seed point of new growth queue or construct sub-region point set respectively based on the discrete point of each growth queue; Construct the minimum bounding box of each sub-region point set in the curvature cluster and calculate the corresponding sub-region of each sub-region point set by using the convex hull generation algorithm to generate the sub-region set of the curvature cluster.

6. The method of claim 1, wherein, Generate on the surface model The nth discrete point is determined by KD-tree search. The neighborhood of the i-th discrete point is fitted using the least squares method. The neighborhood of the i-th discrete point is obtained The equations of the local tangent planes at discrete points are determined based on the coefficients of the first term. The normal vector of the nth discrete point is used to calculate the direction vector of the vertical axis and the nth discrete point. The angle between the normal vectors of the nth discrete point and the nth... The coordinates of points within the neighborhood of a discrete point in the world coordinate system are transformed to the coordinates of the points in the world coordinate system. The normal vector of each discrete point is its local coordinate in the local coordinate system of the vertical axis. The second point is fitted using a quadratic polynomial. The local surface function of any point in the local coordinate system within the neighborhood of each discrete point is obtained, and the Hessian matrix is ​​constructed based on the coefficients of the quadratic terms. The eigenvalue decomposition of the Hessian matrix yields the th... Multiplying the maximum and minimum principal curvatures at the n discrete points yields the result of the nth... Gaussian curvature at discrete points.

7. The method of claim 1, wherein, Poisson disc sampling is adopted, the minimum sampling radius is calculated based on the density of sub-region, and a discrete point with a minimum distance to the sub-region boundary greater than or equal to the minimum sampling radius is randomly selected in the first sub-region of the curvature cluster and added to the active list. When the active list is not empty, a ball center point in the active list is randomly selected and randomly sampled within the sampling radius, the point not exceeding the sub-region boundary is put into the sub-region point set, the point with a minimum distance to the sub-region boundary greater than or equal to the minimum sampling radius is put into the active list and the selected ball center point is removed, and the iteration is performed until the active list is empty, thereby obtaining the sub-region point set of the first sub-region of the curvature cluster and adopting quadratic polynomial fitting to obtain a corresponding region equation. .​ 8. The method of claim 1, wherein, Setting the non-loss constraint requires that the cosine value of the angle between the tool axis vector and the normal vector at each trajectory point in the first sectional plane be less than or equal to the cosine threshold value, setting the cutting direction constraint requires that the tool axis vector at each trajectory point in the first sectional plane be in the same direction as the projection direction vector of the tool axis vector at the first sectional plane, defining the non-loss satisfaction degree as the dot product of the tool axis vector and the normal vector at all trajectory point coordinates in the first sectional plane, defining the cutting satisfaction degree as the reciprocal of the cosine value of the angle between the projection direction vector and the sectional intersection tangent vector at all trajectory point coordinates in the first sectional plane plus 1, and using a genetic algorithm to maximize the non-loss satisfaction degree and the cutting satisfaction degree as the target to iteratively update the angle at all trajectory point coordinates to obtain the optimal angle sequence of the first sectional plane.

Citation Information

Patent Citations

  • Tool path planning method for five-axis machine tool machining based on three-section type horn curve

    CN113433889A

  • Automatic machining method, device and equipment for arc-shaped workpiece and storage medium

    CN118938805A