A deep learning-based subtractive manufacturing real-time tool path planning method

By using a deep learning-based B-spline reparameterization network, the problems of long computation time and path asymmetry in traditional toolpath planning are solved, enabling real-time, direction-independent, and efficient toolpath generation, thereby improving the economic competitiveness and machining quality of the manufacturing industry.

CN115859519BActive Publication Date: 2026-04-21UNIV OF CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF CHINESE ACAD OF SCI
Filing Date
2022-12-09
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies take a long time to generate toolpaths and produce asymmetrical or redundant paths, making it difficult to achieve efficient toolpath planning that is independent of direction in real time.

Method used

A deep learning-based approach is adopted to construct a B-spline reparameterization network by pre-acquiring the relationship between the B-spline surface and the tool path, and to generate the tool path using the adaptive equal residual height method. The network is then trained with loss terms, and the output reparameterized inference is used to reconstruct the tool path.

Benefits of technology

It enables real-time generation of orientation-independent short toolpaths with high computational efficiency, is suitable for CAD/CAM software, and improves the productivity and machining quality of the manufacturing industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115859519B_ABST
    Figure CN115859519B_ABST
Patent Text Reader

Abstract

This invention provides a deep learning-based real-time toolpath planning method for subtractive manufacturing, comprising: pre-acquiring the relationship between a B-spline surface and the toolpath; constructing a B-spline reparameterization network; training the B-spline reparameterization network using the relationship between the B-spline surface and the toolpath as training samples, and combining loss terms with different weights into a final loss; training the B-spline reparameterization network based on the final loss to obtain a toolpath generation network; inputting the B-spline surface into the toolpath generation network and outputting the reparameterized inference; and reconstructing the toolpath based on the reparameterized inference. This invention uses a neural network to reparameterize the workpiece surface according to residual height constraints; the obtained isoparameter lines can be directly used as toolpaths that satisfy residual height constraints, and the entire process takes only a few microseconds; the method has a simple structure, low computational cost, and is easily applied to CAD / CAM software.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of toolpath planning technology, and particularly relates to a real-time toolpath planning method for subtractive manufacturing based on deep learning. Background Technology

[0002] Toolpath planning is a critical issue in computer-aided design and manufacturing (CAD / CAM). Traditional methods for generating suitable toolpaths often transform the problem into a local or global optimization approach, leading to long computation times. However, when dealing with geometrically complex models, the efficiency of toolpath generation is particularly important for improving productivity and thus enhancing the economic competitiveness of the manufacturing industry. While traditional methods generate toolpaths that satisfy residual height constraints, each method has drawbacks that are detrimental to machining. For example, ISSH toolpaths are asymmetric, meaning that the generated toolpaths depend on the chosen orientation. ISP methods satisfy orientation independence requirements but construct redundant toolpaths.

[0003] Therefore, how to achieve real-time planning and construction of the shortest possible direction-independent toolpath has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a real-time toolpath planning method for subtractive manufacturing based on deep learning, which solves the problems existing in the prior art.

[0005] To achieve the above-mentioned technical objectives, the present invention discloses the following technical contents:

[0006] A deep learning-based real-time toolpath planning method for subtractive manufacturing includes:

[0007] Pre-obtain the relationship between the B-spline surface and the toolpath;

[0008] Construct a B-spline reparameterized network;

[0009] The relationship between the B-spline surface and the toolpath is used as training samples to train the B-spline reparameterization network, and loss terms with different weights are combined into a final loss; the B-spline reparameterization network is trained based on the final loss to obtain the toolpath generation network;

[0010] Input the B-spline surface into the toolpath generation network and output the reparameterized inference;

[0011] The toolpath is reconstructed based on the reparameterization.

[0012] Preferably, the reparameterization inference is a reparameterization function;

[0013] The constraint expression for the reparameterized function is:

[0014]

[0015] Among them, (u i,j ,v i,j ) represents the intersection point of each two toolpaths; BR(s,t) represents the control point; Represents the basis functions adapted to the control points; This indicates the sampling position in the parameter domain.

[0016] Preferably, the pre-acquisition of the relationship between the B-spline surface and the toolpath specifically includes:

[0017] For different types of surfaces, different methods are used to generate control meshes, and the B-spline surface is generated based on the control meshes;

[0018] The toolpath is generated on the B-spline surface using an adaptive equal residual height method;

[0019] The relationship between the B-spline surface and the toolpath is obtained based on the generated toolpath.

[0020] Preferably, different methods are used to generate control meshes for different types of surfaces, specifically including:

[0021] For a random surface, four points are randomly selected as the corners of the control grid, and the four points are set in the four quadrants in sequence. An iterative subdivision algorithm is used to subdivide the surface where the four points are located to generate a random control grid.

[0022] For a flat boundary surface, a random surface-based method for generating control grids is used to generate the random control grids and calculate the average height of the two neighboring control points of the boundary. The height of the boundary control points in the random control grids is set to the average height of the two neighboring control points to obtain a flat control grid.

[0023] For ruled surfaces, a pre-constructed moving curve is used, and a straight line is created using linear interpolation. Based on the moving curve, control points of the control grid boundary are obtained, and based on the straight line, the remaining control points on the control grid are obtained, thus obtaining the ruled control grid.

[0024] Preferably, the toolpath is generated on the B-spline surface using an adaptive equal residual height method, specifically including:

[0025] The preliminary toolpath generated on the B-spline surface is obtained based on the isoparametric method;

[0026] Points on the initial toolpath are resampled, with the number of sampling points being the maximum, and the residual height of the sampling points remaining unchanged; wherein the resampled sampling points satisfy the following conditions:

[0027] Points on the initial toolpath Interpolate using the Pchip interpolator h(x);

[0028] The toolpath is obtained based on the interpolation results;

[0029] in, Indicates the residual height of the resampled sampling point; This represents a function obtained based on the interpolation result.

[0030] Preferably, the step of obtaining the preliminary toolpath generated on the B-spline surface based on the isoparametric method specifically includes:

[0031] For a given parametric surface, calculate the i-th point P in the parametric domain. 0,i The maximum step size Δv within a given residual height Δh along axis v 0,i ;

[0032] Choose Δv0 as the minimum Δv 0,i The value of the value is determined, and all points are moved Δv0 along the axis v to obtain a new point P. 1,i ;

[0033] Repeat the movement operation for all points until all points reach the boundary;

[0034] All points P in step k k,i Construct the k-th line L v k ;

[0035] Based on obtaining L v k The principle of obtaining L u k

[0036] Among them, P 0,i Let k be k points sampled along line S(u,0); u is an axis in the parameter domain, and u≠v; L u k and L v k The initial toolpaths are indicated in different axes.

[0037] Preferably, the calculation expressions for the residual height are as follows:

[0038] Based on the surface curvature, the residual height expression has three types:

[0039]

[0040]

[0041]

[0042] Alternatively, replace the local step size with the parameter field step size, and the residual height expression is:

[0043]

[0044]

[0045] Wherein, Δu represents the offset on the u-axis; Δv represents the offset on the v-axis; l represents the distances du and dv in three-dimensional space; E, F, and G all represent the first basic form of the parametric surface, which is a surface and the value defined by its derivative; R represents the radius of curvature of the surface currently in use; and r represents the radius of the ball end mill.

[0046] Preferably, the acquisition of reparameterization inference in the B-spline reparameterization network specifically includes:

[0047] Get n items and m

[0048] Get the i-th line and the j-th straight line Construct a mapping of key points from all intersections;

[0049] Optimize the control points on the B-spline surface to fit the initial toolpath;

[0050] In a straight line and parameter toolpath or Construct a bijection between them;

[0051] Based on the bijection, the toolpath is generated on the B-spline surface;

[0052] Wherein, the dual-shot and the control point satisfy and The constraints; the preliminary path is represented as discrete points; the intersection point is a solution of a third-order polynomial.

[0053] Preferably, loss terms with different weights include:

[0054] Surface loss, weighted boundary loss, vertical loss, and path number loss.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] The neural network reparameterizes the workpiece surface based on the residual height constraint; the resulting isoparametric lines can be directly used as toolpaths that satisfy the residual height constraint, and the entire process takes only a few microseconds; in order to train the network using deep learning, this invention establishes a new toolpath dataset with constrained residual height; experimental results illustrate and clarify our method; the method has a simple structure, low computational cost, and is easy to apply to CAD / CAM software. Attached Figure Description

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

[0058] Figures 1(a)-(b) are visualization examples of three types of toolpaths on the same surface;

[0059] Figures 2(a)-(c) are schematic diagrams of three different types of surfaces;

[0060] Figures 3(a)-(c) are schematic diagrams of key steps in the process of generating control meshes for three different types of surfaces;

[0061] Figures 4(a)-(c) are schematic diagrams of control mesh generation for three different types of surfaces;

[0062] Figures 5(a)-(c) show schematic diagrams of tool path acquisition using the equal parametric method and the equal residual height method, as well as comparison diagrams of their effects;

[0063] Figures 6(a)(a')-(c)(c') show the toolpath diagrams generated by the three methods and their corresponding enlarged views;

[0064] Figure 7 This is a mapping from the standard straight line to the toolpath;

[0065] Figure 8 This is a schematic diagram of the intersection of two toolpaths in different axial directions;

[0066] Figures 9(a)-(b) are visualizations of the reparameterization;

[0067] Figure 10 This is a schematic diagram of the B-spline reparameterized network structure;

[0068] Figures 11(a)-(c) are schematic diagrams of residual height based on curvature;

[0069] Figure 12 This is a flowchart of the method of the present invention. Detailed Implementation

[0070] The technical solutions provided by the present invention will be described in detail below with reference to the embodiments, but they should not be construed as limiting the scope of protection of the present invention.

[0071] Example 1:

[0072] This embodiment discloses a real-time toolpath planning method for subtractive manufacturing based on deep learning, including:

[0073] Pre-obtain the relationship between the B-spline surface and the toolpath;

[0074] Construct a B-spline reparameterized network;

[0075] The relationship between B-spline surfaces and toolpaths is used as training samples to train the B-spline reparameterization network, and loss terms with different weights are combined into the final loss. The B-spline reparameterization network is trained based on the final loss to obtain the toolpath generation network.

[0076] Input the B-spline surface into the toolpath generation network and output the reparameterized inference;

[0077] Toolpath reconstruction is based on reparameterization inference.

[0078] Specifically:

[0079] In this embodiment, to obtain the relationship between the B-spline surface and the toolpath, two parts are disclosed: B-spline surface generation and toolpath generation. Specifically, the pre-obtaining of the relationship between the B-spline surface and the toolpath includes:

[0080] For different types of surfaces, control meshes are generated using different methods, and B-spline surfaces are generated based on the control meshes. Tool paths are generated on the B-spline surfaces using an adaptive equal residual height method. The relationship between the B-spline surfaces and the tool paths is obtained based on the generated tool paths.

[0081] It should be noted that this embodiment proposes a toolpath for a B-spline surface dataset for CNC, referred to as the B-spline CNC (b-cnc) dataset, to achieve the technical objective. Based on existing technology, the B-CNC dataset is the first CNC toolpath for the B-Spline dataset. The dataset contains three types of surfaces: random surfaces, flat boundary surfaces, and ruled surfaces. Three different toolpaths are provided for each surface. The surface generation section details the B-spline surface generation process. The toolpath generation section briefly introduces traditional spline toolpath generation methods: the isoparametric method and the equal residual height method, and proposes an adaptive equal residual height method suitable for deep learning.

[0082] Surface generation:

[0083] In the dataset used in this invention, three types of B-spline surfaces are widely used in industry, as shown in Figures 2(a)-(c). Random surfaces mean that we sample control points in a random manner, and these control points have various shapes and rich surface variations. It represents a variety of freeform surfaces in practical applications. Flat boundary surfaces randomly sample internal control points while sharing a common plane on the boundary surfaces. Smoothness is crucial in connected surfaces because continuity is often required in practical models. Ruled surfaces are defined in a special form and are widely used in CAD and CAM. Ruled surfaces play an important role in CAD design and follow strict requirements; therefore, we consider them a separate category from random surfaces.

[0084] In this embodiment, different methods are used to generate control meshes for different types of surfaces, and the specific steps for generating B-spline surfaces based on the control meshes include: For random surfaces, an iterative subdivision algorithm is proposed in this embodiment to generate control meshes, referred to as subdivision; four points are randomly selected as the corners of the control mesh. Since distorted surfaces rarely occur in actual production, the four points are set in the four quadrants in sequence; the iterative subdivision algorithm is used to subdivide the surfaces where the four points are located to generate random control meshes; wherein, the surfaces where the four points are located are all quadrilateral surfaces, as shown in Figure 3(a). First, a linear combination V of vertices is created. i i = 0, 1, 2, 3;

[0085] Among them, E i =αV i +(1-α)V (i+1)mod4 , Calculate the face point F using the equation, and then connect face point F with edge point E. i Connect them.

[0086] F=αβV0+α(1-β)V1+(1-α)(1-β)V2+(1-α)βV3,α,β∈[-d h ,1+d h ].

[0087] For smooth surfaces, the real model has a regular mesh on the x and y axes and varies on the z axis. Therefore, we set d h =0.1 on the x, y and z axes d h =0.6. And perform a subdivision process in the four-point control grid shown in Figure 3(a) to obtain a (1+2) n 1+2 n The control mesh is defined by n, where n is the number of subdivisions. Figure 4(a) shows the control mesh and corresponding spline surface shapes of the random B-spline surfaces in the dataset in the real model.

[0088] For a flat boundary surface, a flat boundary B-spline surface is similar to a random B-spline surface, and the normal to the boundary is formed by two neighboring control points P. i Therefore, in this embodiment, only the boundary control points (yellow dots) need to be moved to process the surface boundary, as shown in Figure 3(b). Specifically: Based on the random surface generation control mesh method, a random control mesh is generated, and the average height of the boundary two-neighbor control points is calculated. The height of the boundary control points in the random control mesh is set to the average height of the boundary two-neighbor control points to obtain a flat control mesh; as shown in Figure 4(b), the surface shows that the boundary of the planar border B-spline surface is a common plane, while the generated surface is not limited by the border.

[0089] For a ruled surface, in this embodiment, the ruled surface can be described as a set of points swept by a moving straight line. Therefore, in this embodiment, the ruled surface can be written as S(t,u)=p(t)+ur(t); where p(t) is a point on the surface and r(t) is the direction; specifically: a moving curve is pre-constructed, and a straight line is created using linear interpolation as shown in Figure 3(c); two cubic polynomial curves are constructed as the moving surface, and the points on the polynomial curves are uniformly sampled as control points (yellow) on the boundary of the control grid; the remaining control points (red) on the control grid are obtained based on the straight line, resulting in a ruled control grid, as shown in Figure 4(c).

[0090] In this embodiment, the control mesh volume is m×n with a surface degree of d, where m = n = 9 and d = 3. The node spacing of the control mesh is equal. By normalizing the points, the control points are set to [-1, 1] without loss of generality. 3 To expand the control mesh size while maintaining the surface, this invention repeatedly performs node refinement, i.e., simultaneously inserting multiple nodes into the original surface. Multiple nodes are repeatedly inserted into the 9×9 control mesh to expand its size. Finally, we obtain control meshes of different sizes with the same surface. It should be noted that the size of the control mesh volume in practical applications should be determined according to the specific application requirements.

[0091] Toolpath generation:

[0092] It should be noted that, because the isoparametric method requires a consistent step size, the residual height of the surface is almost always less than the threshold. Therefore, the toolpath will cover unnecessary areas, resulting in excessively long paths. The isoparametric method constructs a toolpath that reaches the maximum residual height everywhere, as shown in Figure 5(b). Similar to the isoparametric method, the isoparametric method moves the sampling points independently, rather than moving the minimum step size. Figure 5(c) shows that the toolpath generated by the isoparametric method reaches the boundary faster and shorter than that of the isoparametric method. However, the isoparametric method does not consider surface boundaries. As shown in Figure 6(b), there are many breakpoints in the last row. This can degrade the quality of the machined surface at the boundary, and the machine needs to lift the tool at the breakpoints, consuming machining time.

[0093] Based on this, this embodiment proposes to generate toolpaths on B-spline surfaces using an adaptive equal residual height method, specifically including:

[0094] The preliminary toolpath generated on the B-spline surface is obtained based on the isoparametric method; specifically: obtaining the preliminary toolpath generated on the B-spline surface based on the isoparametric method includes:

[0095] For a given parametric surface, calculate the i-th point P in the parametric domain. 0,i The maximum step size Δv within a given residual height Δh along axis v 0,i ;

[0096] Choose Δv0 as the minimum Δv 0,i The value of the value is determined, and all points are moved Δv0 along the axis v to obtain a new point P. 1,i ;

[0097] Repeat the operation of moving all points until all points reach the boundary; obviously, the residual height between two adjacent lines is less than the given residual height;

[0098] All points P in step k k,i Construct the k-th line As shown in Figure 5;

[0099] Based on acquisition The principle of obtaining

[0100] Among them, P 0,i Let k be the points sampled along line S(u,0); u is an axis in the parameter domain, and u≠v; and This represents the initial toolpaths along different axes. Because the toolpath lines move forward with minimal steps, the toolpaths can be very dense even if only a small portion of the surface changes drastically. As shown in Figure 6(a), the generated toolpaths are closed to other paths within the surface boundaries, requiring a longer machining time.

[0101] Points on the initial toolpath are resampled, with the number of sampling points being the maximum, while keeping the residual height of the sampling points unchanged; the resampled points must satisfy the following conditions:

[0102] Points on the initial toolpath Interpolate using the Pchip interpolator h(x);

[0103] Based on the interpolation results, the toolpath is obtained;

[0104] in, Indicates the residual height of the resampled sampling point; This represents a function obtained based on the interpolation result. It should be noted that in this embodiment, there are originally `hat{n}` points P, which are treated as a mapping `h`. `k / hat{n}` corresponds to `P_k`; this is to uniformly resample `n` points from this mapping. Therefore, this embodiment needs to calculate `hat{P} = h(k / n)`; this `h` is calculated using Pchip (piecewise cubic Hermite interpolation polynomial) based on the mapping of `k / hat{n}` to `P_k`; it is a function of (k / hat{n}, P). In this embodiment, the A-ISSH method does not enforce a maximum residual height everywhere. For a set of toolpaths, and The residual height remains constant along any given line S(u0,v), and the residual heights are not equal for different u values. Furthermore, since the step size and residual height can be locally considered linear, the residual height at a new point... The results in Figure 6(c) show that A-ISSH is smoother and has a shorter toolpath length than other methods. A-ISSH not only improves machining quality but also makes toolpath representation easier.

[0105] In addition, in this embodiment, the residual height is the remaining material of two adjacent paths, and several expressions for calculating the residual height are as follows:

[0106] As shown in Figures 11(a)-(c), there are three types of expressions for residual height based on surface curvature:

[0107]

[0108]

[0109]

[0110] Alternatively, replace the local step size with the parameter field step size, and the residual height expression is:

[0111]

[0112]

[0113] Wherein, Δu represents the offset on the u-axis; Δv represents the offset on the v-axis; l represents the distances du and dv in three-dimensional space; E, F, and G all represent the first basic form of the parametric surface, which is a surface and the value defined by its derivative; R represents the radius of curvature of the surface currently in use; and r represents the radius of the ball end mill.

[0114] B-spline reparameterized networks:

[0115] Toolpath parameterization:

[0116] To simplify the discrete representation of toolpaths and make them continuous, we fit toolpath segments to B-spline surfaces. This embodiment discloses the following:

[0117] The acquisition of reparameterization inference in the B-spline reparameterization network specifically includes:

[0118] Get n L v k and m L v k ;

[0119] Get the i-th line and the j-th straight line Construct a mapping of key points from all intersections;

[0120] Optimize the initial toolpath by fitting control points on the B-spline surface; or and parameter toolpath or Construct a bijection between )};

[0121] Based on bijection, toolpaths are generated on B-spline surfaces;

[0122] Among them, the bijection and the control point satisfy... and Constraints; the initial path is represented as discrete points; the intersection points are solutions to a third-order polynomial; and in this embodiment, only the intersection points of lines are constrained by L. u L v Explicitly defined. Therefore, assume a straight line. Harmony Intersection S(u) i,j ,v i,j ),have like Figure 8 Each pair of lines in the diagram shown and L u They intersect at a point (u) i,j ,v i,j ), where Lu L v Represents the toolpath in two directions on a surface; reparameterization inference results in a reparameterization function;

[0123] The constraint expression for the reparameterized function is:

[0124]

[0125] Among them, (u i,j ,v i,j ) represents the intersection point of each two toolpaths; BR(s,t) represents the control point; Represents the basis functions adapted to the control points; This indicates the sampling position in the parameter domain. Because... m and n can be pre-calculated in a given manner, therefore reparameterization is required to satisfy the linear constraints. This is achieved by solving the linear equations and obtaining the control points BR(s,t) in the parameterized control mesh. The visualization of the reparameterization is shown in Figures 9(a)-(b); where Figure 9(a) shows the parameterized control mesh; and Figure 9(b) shows the toolpath.

[0126] Additionally, the straight line [0,1] in the standard domain 2 The toolpath can be mapped to the parameter domain, as shown in Figure 7.

[0127] B-spline reparameterized networks:

[0128] like Figure 10 The diagram shows the B-spline reparameterization network structure; the network takes a B-spline surface as input and infers the reparameterization as output. Both input and output data are control grids represented as matrices of regular meshes. These meshes, like images, are suitable for convolution operations. The network can predict the reparameterization from the input surface. The input matrix is ​​convolved and pooled in multiple layers to extract surface information, and then the network uses a transposed convolution operation to upsample the matrix to the size of the reparameterized matrix.

[0129] Because constructing toolpaths requires not only knowing the reparameterization function but also the number of toolpaths, the network uses B-spline features to regress the number of toolpaths through a multilayer perceptron.

[0130] Network training:

[0131] In this embodiment, our network is trained end-to-end to learn how to generate toolpaths from B-spline surfaces. A loss term is set to learn the reparameterization of a given surface and the number of toolpaths. For a given control mesh, the corresponding surface is set as S(u,v), with n rows L... v and m line L u Find key mapping point pairs Real reparameterization is defined as M gt Predict it as M pred BR pred It is the reparameterized function for prediction.

[0132] The loss terms with different weights include:

[0133] Surface loss, weighted boundary loss, vertical loss, and path number loss.

[0134] Surface loss: A mapping of key points to a directly constrained network. All points should fall on a surface given parameters. Surface loss is used to make predictions conform to the mapping.

[0135]

[0136] Weighted Boundary Loss: Since the values ​​of a B-spline surface are controlled by its neighboring control points, the values ​​at the boundaries are less affected by these control points, which can lead to unstable predictions. Therefore, a weighted boundary loss is used to force the network to focus on the boundaries.

[0137]

[0138] The weight of the boundary control points is set to 4, and the weight of the second outermost boundary control points is set to 2. The weights of the others are set to 1.0.

[0139] Vertical Loss: Most reparameterized regions are not defined by key mapping point pairs. It is recommended to use cross loss to regularize the mapping for smoother toolpaths. This assumes that toolpaths in two directions should have minimal interference. This means that at the same point, the machining directions of two toolpaths are nearly perpendicular. During training, random sampling points (s) are used. i ,t i )∈[0,1] 2 And calculate the tangents to the surface.

[0140]

[0141] Toolpath number loss: Regress the number of toolpaths in both directions to n. pred ,m pred Digital loss is used to help the network learn the number of toolpath lines.

[0142]

[0143] Finally, all loss terms with different weights are combined into a final loss to train the network. Since the scale of the digital loss differs from the others, a hyperparameter β is used to control the balance. Furthermore, α can be used to adjust the network to learn the entire region without over-smoothing. In the experiments, α = 0.01 and β = 0.1 were set.

[0144] L: = L s +L g +αL c +βL n

[0145] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A real-time toolpath planning method for subtractive manufacturing based on deep learning, characterized in that, include: Pre-obtain the relationship between the B-spline surface and the toolpath; Construct a B-spline reparameterized network; The relationship between the B-spline surface and the toolpath is used as training samples to train the B-spline reparameterization network, and loss terms with different weights are combined into a final loss; the B-spline reparameterization network is trained based on the final loss to obtain the toolpath generation network; Input the B-spline surface into the toolpath generation network and output the reparameterized inference; Based on the reparameterization, the toolpath is reconstructed; The reparameterization inference is a reparameterization function; The constraint expression for the reparameterized function is: ; in, This indicates the intersection point of every two toolpaths; Indicate control points; Represents the basis functions adapted to the control points; Indicates the sampling position in the parameter domain; The pre-acquisition of the relationship between the B-spline surface and the toolpath specifically includes: For different types of surfaces, different methods are used to generate control meshes, and the B-spline surface is generated based on the control meshes; The toolpath is generated on the B-spline surface using an adaptive equal residual height method; The relationship between the B-spline surface and the toolpath is obtained based on the generated toolpath. The acquisition of reparameterization inference in the B-spline reparameterization network specifically includes: Get n items and m ; Get the straight line and the straight line Construct a mapping of key points from all intersections; Optimize the control points on the B-spline surface to fit the initial toolpath; In the line { or } and parameter toolpath { or Construct a bijection between )}; Based on the bijection, the toolpath is generated on the B-spline surface; Wherein, the dual-shot and the control point satisfy and The constraints; the preliminary path is represented as discrete points; the intersection point is a solution of a third-order polynomial.

2. The real-time toolpath planning method for subtractive manufacturing based on deep learning according to claim 1, characterized in that, Different methods are used to generate control meshes for different types of surfaces, specifically including: For a random surface, four points are randomly selected as the corners of the control grid, and the four points are set in the four quadrants in sequence. An iterative subdivision algorithm is used to subdivide the surface where the four points are located to generate a random control grid. For a flat boundary surface, a random surface-based method for generating control grids is used to generate the random control grids and calculate the average height of the two neighboring control points of the boundary. The height of the boundary control points in the random control grids is set to the average height of the two neighboring control points to obtain a flat control grid. For ruled surfaces, a pre-constructed moving curve is used, and a straight line is created using linear interpolation. Based on the moving curve, control points of the control grid boundary are obtained, and based on the straight line, the remaining control points on the control grid are obtained, thus obtaining the ruled control grid.

3. The real-time toolpath planning method for subtractive manufacturing based on deep learning according to claim 1, characterized in that, The toolpath is generated on the B-spline surface using an adaptive constant residual height method, specifically including: The preliminary toolpath generated on the B-spline surface is obtained based on the isoparametric method; Points on the initial toolpath are resampled, with the number of sampling points being the maximum number of machining paths, while keeping the residual height of the sampling points unchanged; wherein the resampled points satisfy the following conditions: ; Points on the initial toolpath Pchip interpolator Perform interpolation; The toolpath is obtained based on the interpolation results; in, Indicates the residual height of the resampled sampling point; This represents a function obtained based on the interpolation result.

4. The real-time toolpath planning method for subtractive manufacturing based on deep learning according to claim 3, characterized in that, The preliminary toolpath generated on the B-spline surface based on the isoparametric method specifically includes: For a given parametric surface, compute the first... point Along axis Given residual height Maximum step size within ; choose As the smallest The value, and all points along the axis Directional movement , to obtain new points ; Repeat the movement operation for all points until all points reach the boundary; All points in step k Construct the k-th line ; Based on acquisition The principle of obtaining in, For the route Sample k points; For an axis in the parameter domain; and The initial toolpaths are indicated in different axes.

5. The real-time toolpath planning method for subtractive manufacturing based on deep learning according to claim 4, characterized in that, The calculation expressions for the residual height are as follows: Based on the surface curvature, the residual height expression has three types: ; ; ; Alternatively, replace the local step size with the parameter field step size, and the residual height expression is: ; ; in, Indicates in Offset on the axis; Indicates in Offset on the axis; In three-dimensional space , The corresponding distance; express, as well as Both represent the first basic form of a parametric surface, which is a surface and the value defined by its derivative; Indicates the radius of curvature of the surface currently in which the surface is located; This indicates the radius of the ball end mill cutter head.

6. The real-time toolpath planning method for subtractive manufacturing based on deep learning according to claim 1, characterized in that, Loss terms with different weights include: Surface loss, weighted boundary loss, vertical loss, and path number loss.