Five-axis numerical control machining track fairing optimization method and five-axis numerical control machining system
By constructing spatial polyline paths and spherical arc paths and adding transition curves, the position and attitude changes of five-axis CNC machining are optimized, solving the problem of trajectory discontinuity in existing technologies and improving machining accuracy and the stability of rotary axes.
Patent Information
- Application Number
- CN202511239159.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-18
AI Technical Summary
Existing five-axis CNC machining technology suffers from redundancy at small angles and insufficient transition at large angles, leading to abrupt curvature changes and increased machining errors, which affect machining accuracy and the smoothness of rotary axis movement.
By constructing spatial polygonal paths and spherical arc paths for CNC cutting tools, and adding transition curves respectively, the position and posture changes of the tool are optimized, and machining control commands are generated.
It improves the trajectory smoothness of five-axis CNC machining, reduces machining errors caused by curvature abrupt changes and nonlinear fluctuations of rotary axes, and enhances machining accuracy and machine tool stability.
Smart Images

Figure CN120972761A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of numerical control, and particularly relates to a five-axis numerical control machining trajectory smoothing optimization method and device, equipment, a storage medium and a five-axis numerical control machining system. BACKGROUND
[0002] In the manufacturing process of high-precision complex curved surface parts, five-axis numerical control machining technology is widely used in the fields of aerospace, automobile molds, medical devices and the like due to its multi-degree-of-freedom linkage capability. Such machining tasks usually require the tool to move in a continuous and smooth trajectory in space to ensure the quality of the machined surface and the stability of the machine tool operation. Especially in the high-speed machining scenario, the smoothness of the trajectory directly affects the machining efficiency, surface roughness and tool life.
[0003] The existing generation method of the five-axis numerical control machining path is usually based on a linear interpolation strategy, that is, a polyline trajectory is formed by connecting a series of tool posture points. In order to improve the continuity of the trajectory, some methods insert transition curves at the corners of the tool tip point path, which improves the continuity and stability of the machining path to a certain extent.
[0004] However, the existing technology is redundant in the transition at a small angle and insufficient in the transition at a large angle, which may cause curvature mutation and increase machining error; at the same time, the nonlinear fluctuation existing between the path arc length and the rotation angle also affects the motion stability of the rotation axis and the machining precision. SUMMARY
[0005] The application aims to provide a five-axis numerical control machining trajectory smoothing optimization method and device, equipment, a storage medium and a five-axis numerical control machining system, which at least solve the problem of insufficient machining precision of five-axis numerical control machining.
[0006] In a first aspect, the embodiments of the application disclose a five-axis numerical control machining trajectory smoothing optimization method, comprising: According to a plurality of target postures of a numerical control tool specified in space, a space polyline path formed by a tool tip point of a tool axis of the numerical control tool in space and a spherical arc path formed by a tool axis direction vector of the numerical control tool in space are determined respectively; the spherical arc path is located on a spherical surface formed by the tool tip point as a spherical center; By adding transition curves on the space polyline path and the spherical arc path respectively, an updated polyline path of the space polyline path and an updated arc path of the spherical arc path are obtained; According to the updated polyline path and the updated arc path, a machining control instruction for the numerical control tool is determined.
[0007] In a second aspect, the embodiments of the application further disclose a five-axis numerical control machining system, comprising: An initial pose obtainer, a numerical control machining controller, and a numerical control tool; The initial pose obtainer is configured to obtain or generate a plurality of target poses of the numerical control tool in space. The numerical control machining controller is configured to determine a space polyline path formed by a tool tip point of a tool axis of the numerical control tool in space and a spherical surface arc path formed by a tool axis direction vector of the numerical control tool in space according to the plurality of target poses, respectively, to obtain an updated polyline path of the space polyline path and an updated arc path of the spherical surface arc path by adding transition curves on the space polyline path and the spherical surface arc path, respectively, and to determine a machining control instruction for the numerical control tool according to the updated polyline path and the updated arc path; and the spherical surface arc path is located on a spherical surface formed by the tool tip point as a spherical center. The numerical control tool is configured to execute the machining control instruction to machine a workpiece.
[0008] In a third aspect, the embodiments of the present application further disclose a five-axis numerical control machining trajectory smoothing optimization device, which comprises: The acquisition module is configured to determine a space polyline path formed by a tool tip point of a tool axis of the numerical control tool in space and a spherical surface arc path formed by a tool axis direction vector of the numerical control tool in space according to a plurality of target poses of the numerical control tool specified in space, respectively; and the spherical surface arc path is located on a spherical surface formed by the tool tip point as a spherical center. The adjustment module is configured to obtain an updated polyline path of the space polyline path and an updated arc path of the spherical surface arc path by adding transition curves on the space polyline path and the spherical surface arc path, respectively. The control module is configured to determine a machining control instruction for the numerical control tool according to the updated polyline path and the updated arc path.
[0009] In a fourth aspect, the embodiments of the present application further disclose an electronic device, which comprises a processor and a memory, and the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to the first aspect.
[0010] In a fifth aspect, the embodiments of the present application further disclose a readable storage medium, which stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the method according to the first aspect.
[0011] In summary, in the embodiment of the present application, by analyzing the multiple target poses of the tool in space, the spatial polyline path formed by the tool tip point and the spherical arc path formed by the tool axis direction vector are constructed respectively, realizing the dual modeling of the tool position and attitude change, not only improving the geometric accuracy of the trajectory expression, but also providing a more targeted optimization basis for subsequent smoothing processing; and then by adding transition curves on the spatial polyline path and the spherical arc path respectively, the path is significantly improved in terms of geometric continuity, on the one hand, the polyline update path of the spatial polyline path avoids redundant interpolation at small angles and enhances the curvature buffer characteristics at large angles, effectively reducing the machining error caused by sudden change of curvature, on the other hand, the arc line update path of the spherical arc line path ensures that the motion trajectory of the rotating shaft is smoother, and the nonlinear fluctuation between the path arc length and the rotation angle is weakened, thereby improving the control stability of the rotating shaft; finally, by using the polyline update path and the arc line update path together to generate the machining control instructions of the numerical control tool, the whole machining process is optimized in both position control and attitude control dimensions. This dual-path collaborative optimization mechanism not only improves the machining precision, but also effectively reduces the negative effects such as tool impact, machine tool vibration and surface roughness, thereby enhancing the overall performance and reliability of the five-axis numerical control machining system in the complex curved surface machining scene. Therefore, based on the method of the embodiment of the present application, by constructing the spatial polyline path and the spherical arc path and performing smoothing processing respectively, the limitations of the prior art in transition curve insertion strategy and direction vector continuity control are broken through, while improving the trajectory smoothing, the machining error and motion instability problems are effectively alleviated. BRIEF DESCRIPTION OF DRAWINGS
[0012] In the drawings: Figure 1 is a step flow chart of a five-axis numerical control machining trajectory smoothing optimization method provided by an embodiment of the present application; Figure 2 is a step flow chart of another five-axis numerical control machining trajectory smoothing optimization method provided by an embodiment of the present application; Figure 3 is a schematic diagram of a spherical B-spline inserted at the corner of the tool axis direction vector path in the embodiment of the present application; Figure 4 is a schematic diagram of a B-spline inserted at the corner of the tool tip point path in the embodiment of the present application; Figure 5 is a block diagram of a five-axis numerical control machining system provided by an embodiment of the present application; Figure 6 is a block diagram of a five-axis numerical control machining trajectory smoothing optimization device provided by an embodiment of the present application; Figure 7 is a block diagram of an electronic device of an embodiment provided by the present application. DETAILED DESCRIPTION
[0013] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0014] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.
[0015] As shown in Figure 1 is a five-axis NC machining trajectory smoothing optimization method provided by the embodiments of the present application, which can include the following steps: Step 101, according to the plurality of target poses of the NC tool specified in the space, respectively determine the space polyline path formed by the tool tip point of the tool axis of the NC tool in the space, and the spherical arc path formed by the tool axis direction vector of the NC tool in the space.
[0016] Among them, the spherical arc path is located on the spherical surface formed by the tool tip point as the spherical center.
[0017] In some embodiments of the present application, in order to accurately model the position and attitude changes of the numerical control tool in the machining process, a spatial polyline path formed by the tool tip points and a spherical arc path formed by the tool axis direction vectors are respectively constructed by analyzing a plurality of target poses. Specifically, according to a plurality of target poses set in the numerical control program, the spatial coordinate sequence of the tool tip points can be extracted, and the spatial polyline path is formed by connecting the straight line segments. At the same time, the unit sphere is constructed with each tool tip point as the center, the corresponding tool axis direction vector is mapped to the intersection point on the spherical surface, and the spherical arc path is formed by connecting each intersection point with the spherical great circle. The spatial polyline path is used to describe the change trajectory of the tool position, and the spherical arc path is used to describe the direction change path of the tool attitude. The tool axis direction vector refers to the unit direction vector of the tool axis in the three-dimensional space, and its projection on the spherical surface constitutes the geometric expression of the attitude change. Through the path construction method, a continuous trajectory model can be established in the position and direction dimensions respectively, which provides a structured basis for subsequent smoothing processing and improves the geometric precision and controllability of the trajectory expression.
[0018] In one specific example, in the process of machining an aero-engine blade, a plurality of target pose points of the tool on the surface of the blade are extracted from the numerical control program, including the spatial coordinates of the tool tip points and the tool axis direction vectors. Then, the tool tip points are connected by straight line segments to generate a spatial polyline path, and the unit sphere is constructed with each tool tip point as the center, the corresponding direction vector is mapped to the point on the spherical surface, and the spherical arc path is generated by connecting these points with the spherical great circle. Finally, the dual-path model is used for subsequent trajectory smoothing processing, so that the tool can maintain a continuous motion trajectory and stable attitude change in the machining process, thereby effectively improving the machining precision of the blade surface and the smoothness of the tool operation.
[0019] Step 102, by adding transition curves on the spatial polyline path and the spherical arc path respectively, the polyline update path of the spatial polyline path and the arc line update path of the spherical arc path are obtained.
[0020] In some embodiments of the present application, in order to improve the performance of five-axis NC machining trajectory in terms of geometric continuity, transition curves are inserted into the constructed spatial polyline path and spherical arc path respectively to achieve the fairing optimization of the path. Specifically, in the spatial polyline path, a spatial transition curve with buffer curvature characteristics is inserted according to the angle relationship between adjacent straight line segments; in the spherical arc path, a spherical transition curve with continuous tangent properties on the spherical surface is inserted according to the direction change between adjacent spherical great circle arcs. The polyline update path of the spatial polyline path refers to the continuous spatial trajectory formed after introducing the transition segment on the basis of the original polyline, and the arc update path of the spherical arc path refers to the continuous attitude trajectory formed by connecting the direction vectors on the spherical surface through the transition segment. Among them, the transition curve refers to the interpolation curve used to connect the discrete path segments, which has a certain continuity order (such as G1 or G2 continuity) in geometry and can be used to alleviate the machining error and motion instability problem caused by path mutation. In this way, trajectory fairing can be realized simultaneously in two dimensions of position control and attitude control, thereby improving the machining precision and control stability.
[0021] In a specific example, when planning a five-axis machining path for a complex curved surface part, it is found that the spatial polyline path composed of original tool tip points has a large angle at some positions, which may cause tool motion mutation. Therefore, a cubic spline curve is inserted as a spatial transition segment at these angles, so that the polyline update path has continuous curvature change in geometry; at the same time, in the spherical arc path, the user inserts a spherical Bezier curve as a transition segment on the spherical surface according to the mutation between adjacent direction vectors, forming an arc update path. Finally, the two types of update paths are used to generate machining control instructions, so that the tool can realize smooth transition during machining, effectively reducing the tool impact and surface roughness problem caused by discontinuous trajectory.
[0022] Step 103, determining the machining control instructions of the numerical control tool according to the polyline update path and the arc update path.
[0023] In some embodiments of the present application, in order to convert the optimized trajectory information into executable machining actions, the machining control instructions of the numerical control tool will be generated according to the polyline updated path and the arc line updated path. Specifically, the position coordinate sequence in the polyline updated path and the direction vector sequence in the arc line updated path can be extracted and mapped into the position control parameters and the attitude control parameters in the numerical control system respectively, and then the machining instruction set containing the feed speed, the tool pose, the interpolation mode and the like can be generated. The machining control instruction refers to the instruction set for driving the numerical control tool to execute specific machining actions, which usually includes position instructions and attitude adjustment instructions, and its role is to ensure that the tool moves according to the predetermined trajectory and attitude during the machining process. In this way, the accurate reproduction of the smoothed trajectory can be realized in the numerical control system, thereby improving the stability of the machining process and the surface quality.
[0024] In a specific example, after completing the trajectory smoothing process of a certain complex curved surface part, the trajectory data containing the spatial polyline updated path and the spherical arc line updated path are obtained. Then, each spatial point in the polyline updated path is converted into a position instruction in the numerical control program, and the direction vector in the arc line updated path is converted into an attitude control instruction of the rotation axis. Finally, a set of machining instructions containing dual control information of position and attitude is generated, and is imported into a five-axis numerical control system for machining. During the machining process, the tool moves continuously and adjusts the attitude according to the instruction set, effectively avoiding the impact and error caused by the trajectory mutation, and finally obtaining the machining result with good surface continuity and precision meeting the design requirements.
[0025] In summary, in the embodiment of the present application, by analyzing the multiple target poses of the tool in space, the space polyline path formed by the tool tip point and the spherical arc path formed by the tool axis direction vector are constructed respectively, realizing the dual modeling of the tool position and attitude change, not only improving the geometric accuracy of the trajectory expression, but also providing a more targeted optimization basis for subsequent smoothing processing; and then by adding transition curves on the space polyline path and the spherical arc path respectively, the path is significantly improved in terms of geometric continuity, on the one hand, the polyline update path of the space polyline path avoids redundant interpolation at small angles and enhances the curvature buffer characteristics at large angles, effectively reducing the machining error caused by sudden change of curvature, on the other hand, the arc line update path of the spherical arc line path ensures that the motion trajectory of the rotating shaft is smoother, and the nonlinear fluctuation between the path arc length and the rotation angle is weakened, thereby improving the control stability of the rotating shaft; finally, by using the polyline update path and the arc line update path together to generate the machining control instructions of the numerical control tool, the entire machining process is optimized in both position control and attitude control dimensions. This dual-path collaborative optimization mechanism not only improves the machining precision, but also effectively reduces the negative effects such as tool impact, machine tool vibration and surface roughness, thereby enhancing the overall performance and reliability of the five-axis numerical control machining system in the complex curved surface machining scene. Therefore, based on the method of the embodiment of the present application, by constructing the space polyline path and the spherical arc path and performing smoothing processing respectively, the limitations of the prior art in the transition curve insertion strategy and the direction vector continuity control are broken through, while improving the trajectory smoothing, the machining error and motion instability problems are effectively alleviated.
[0026] Figure 2 is another five-axis numerical control machining trajectory smoothing optimization method provided by the embodiment of the present application, comprising the following steps: Step 201, analyzing the tool position data in the numerical control program to obtain multiple target space points of the tool tip point and multiple target tool axis direction vectors of the numerical control tool.
[0027] In some embodiments of the present application, in order to establish the spatial trajectory and posture change model of the numerical control tool in the machining process, the key geometric information of the tool is extracted by analyzing the tool position data in the numerical control program. Specifically, each tool position instruction in the numerical control program can be analyzed to extract the tool tip point coordinate information and the tool axis direction vector information, which form a plurality of target space point sequence and a plurality of target direction vector sequence, respectively. The tool tip point refers to the machining point at the front end of the tool, and its spatial coordinates are used to describe the position of the tool on the machining path. The tool axis direction vector refers to the unit direction vector of the tool axis in the three-dimensional space, which is used to describe the orientation of the tool in the machining process. Through this data analysis process, the discrete instructions in the numerical control program can be converted into continuous geometric data that can be used for trajectory modeling, providing a basis for subsequent path construction and smoothing processing.
[0028] In a specific example, when optimizing the machining path of the impeller passage, a machining section containing hundreds of tool position instructions is extracted from an existing five-axis numerical control program. By writing an analysis script, the tool tip point coordinates (such as X, Y, Z values in Cartesian coordinates) and the tool axis direction vector (such as I, J, K values in spherical coordinates) in each instruction are extracted and arranged in the machining order to form the target space point sequence and the direction vector sequence. These data are then used to construct the spatial polyline path and the spherical arc path, so that the subsequent trajectory smoothing processing can be optimized based on the real machining data, thereby improving the geometric rationality of the machining path and the continuity of the posture control.
[0029] Step 202, connecting the plurality of target space points by straight line segments to obtain a spatial polyline path.
[0030] In some embodiments of the present application, in order to construct the position change trajectory of the numerical control tool in space, a plurality of target space points are sequentially connected by straight line segments to form a spatial polyline path. Specifically, according to the plurality of tool tip point coordinates arranged in the machining order, the adjacent points are connected in turn by linear interpolation to generate a polyline trajectory composed of a plurality of straight line segments. The spatial polyline path refers to the spatial geometric path composed of tool tip points, which is used to describe the position movement trend of the tool in the machining process. This path has a clear segment structure in geometry, which can reflect the direction change and position jump characteristics in the machining trajectory. By constructing the spatial polyline path, an explicit geometric boundary can be provided for subsequent smoothing processing, and it can be used as a basic data source for position instructions in machining control, thereby improving the structural degree and controllability of trajectory modeling.
[0031] In one specific example, when designing a five-axis machining path for a turbine blade, a sequence of spatial coordinates of the tool tip point has been extracted from the numerical control program. Subsequently, these coordinate points are sequentially connected in the machining order, forming a spatial polyline path composed of dozens of straight line segments. This path clearly shows the movement trajectory of the tool on the surface of the blade, including the spatial distribution of the stages of tool entry, cutting, and tool exit. This polyline path is used for subsequent transition curve insertion and trajectory smoothing processing, so that the machining path realizes continuity optimization on the basis of maintaining the original geometric characteristics, ultimately improving the machining precision and surface quality.
[0032] In step 203, a unit sphere is constructed with the tool tip point as the center, to obtain the spherical intersection point of each target tool axis direction vector on the unit sphere, and the plurality of spherical intersection points are connected by a spherical great circle arc on the unit sphere to obtain a spherical arc path.
[0033] In some embodiments of the present application, in order to construct a continuous direction trajectory of the numerical control tool during attitude change, a unit sphere is constructed with the tool tip point as the center, and the corresponding tool axis direction vector is mapped to the intersection point on the sphere, and then the intersection points are connected by a spherical great circle arc to form a spherical arc path. Specifically, for the tool tip point, a sphere with the point as the center and a unit length as the radius is established, and the tool axis direction vector corresponding to the point is extended to the surface of the sphere to obtain a spherical intersection point. Subsequently, the spherical intersection points are connected by a spherical great circle arc in the machining order to form a continuous direction change path. The unit sphere refers to a sphere with a certain spatial point as the center and a radius of 1, which is used to standardize the spatial distribution of the direction vector; the spherical great circle arc refers to the shortest path connecting two points on the sphere, which has the property of continuous tangent and is suitable for describing the geometric trajectory of direction change. Through this path construction method, continuous modeling of the tool attitude on the sphere can be realized, providing a geometric basis for subsequent smoothing processing and attitude control instruction generation, and improving the smoothness and controllability of direction change.
[0034] As shown in FIG. 1, Figure 3 In one specific example, when designing a machining path for a complex curved surface, a plurality of tool tip points and their corresponding tool axis direction vectors R have been obtained. The points , , , represent different tool axis direction vectors on the unit sphere O with the tool tip point as the center. Subsequently, the plurality of points are connected by a great circle arc on the sphere to form the spherical arc path , , shown in the figure. This path shows the continuous change trend of the tool attitude on the sphere, and is used for subsequent attitude smoothing processing and rotation axis control instruction generation, thereby improving the direction stability and trajectory continuity during machining.
[0035] In the above embodiment, for the two tool axis direction vectors An intermediate tool axis direction vector is calculated using a spherical linear interpolation function Slerp (Spherical Linear Interpolation, Slerp) between the two tool axis direction vectors, and the curve parameter The tool axis direction vector at the curve parameter is calculated as follows: , wherein is the direction vector of the key point, is the angle between the two direction vectors, is the path parameter of the great circle arc segment.
[0036] In some embodiments of the present application, in order to achieve continuous interpolation of the tool axis direction vector in the spherical arc path, an intermediate tool axis direction vector is calculated using Slerp interpolation. Specifically, for two key point direction vectors , first calculate the included angle between them , and then at the position corresponding to the path parameter , generate an intermediate direction vector using the Slerp function. Spherical linear interpolation is a method of interpolating direction vectors on a unit sphere, which can maintain the unit length constraint of the interpolation result and ensure the geometric consistency of the direction change. In this way, the tool can accurately represent the change in posture during machining, thereby improving the continuity of the machining path and the stability of the control.
[0037] Step 204, by adding transition curves on the spatial polyline path and the spherical arc path respectively, obtaining a polyline update path of the spatial polyline path and an arc update path of the spherical arc path.
[0038] The method shown in this step has been described in step 102, and will not be repeated here.
[0039] Optionally, step 204 includes the following sub-steps: Sub-step 2041, adding a first transition curve on the spatial polyline path in the form of quasi-uniform B-spline to obtain a polyline update path of the spatial polyline path.
[0040] In some embodiments of the present application, in order to improve the smoothness and controllability of the spatial polyline path during the posture change process, a first transition curve is added to the spatial polyline path in the form of quasi-uniform B-spline to obtain an updated polyline path of the spatial polyline path. Specifically, based on the spatial polyline segments between multiple tool tip points, a quasi-uniform B-spline curve is constructed, and the original polyline segment is replaced by the curve to realize the continuity and smoothing of the path. Quasi-uniform B-spline is a parametric curve form with local control and continuity advantages, which can realize flexible adjustment and error control of the path while maintaining the geometric trend of the original polyline segment. The polyline update path generated in this way has higher geometric continuity and posture change smoothness, which is beneficial to subsequent tool axis direction interpolation and multi-axis linkage control instruction generation, and reduces the risk of posture mutation in the machining process.
[0041] In a specific example, during the design of the spatial polyline path, the spatial polyline segments between multiple tool tip points have been obtained, and an initial posture change path has been constructed. Then, according to the form of quasi-uniform B-spline, a first transition curve is inserted between these polyline segments, so that the original polyline segment is replaced by a continuous spatial curve. The curve maintains the geometric trend of the original path while eliminating the direction mutation at the breakpoints, so that the tool can realize continuous transition during the posture change. Finally, the user obtains the updated polyline path shown in the figure, which exhibits higher smoothness and direction consistency in space, providing a stable geometric basis for subsequent spherical path construction and posture control instruction generation.
[0042] Optionally, the quasi-uniform B-spline on the spatial polyline path is is obtained according to the following formula: ; wherein, is the degree of the quasi-uniform B-spline, is the B-spline control point, n is the preset number of polyline control points, is the basis function of the k-degree quasi-uniform B-spline, and is obtained according to the following recursive formula: .
[0043] In some embodiments of the present application, in order to realize the smoothing fitting process of the spatial polyline path so that the subsequent machining path has continuity and controllability, the quasi-uniform B-spline (Basis spline, B-spline) on the spatial polyline path is solved according to a preset formula. The process includes: based on the control point set of the polyline path, constructing a quasi-uniform node vector , and calculating the basis function and finally a fitting curve is generated in the form of weighted summation . Wherein, B-spline is a kind of curve expression method with local controllability and high-order continuity, which is widely used in path fitting and trajectory planning, and can accurately control the local shape while maintaining the overall smoothness. In this way, the discrete polyline control points can be converted into a continuous curve expression form, providing a stable geometric basis for subsequent transition spline construction and machining instruction generation. The formula realizes the fair fitting of the polyline path through the construction method of quasi-uniform B-spline, while preserving the key geometric features. The formula realizes the fitting of the curve segment by segment through the local recursive construction method, which has good numerical stability and geometric control ability.
[0044] As shown in Figure 4 , based on the method of the embodiments of the present application, by inserting the control points Q1, Q2, Q3, Q4, Q5 of the quasi-uniform B-spline in the spatial polyline path P1P2P3P4, the quasi-uniform B-spline Y1, Y2 is finally obtained, and then the quasi-uniform B-spline is connected with the straight line segments X1, X2, X3 in the original spatial polyline path in turn, and the final polyline update path X1Y1X2Y2X3 is obtained. It can be seen that the obtained polyline update path has good smoothness, and the transition length at the corner P2 is greater than half of the length (l2) of the straight line segment path, which can reduce the maximum curvature and improve the machining efficiency.
[0045] Sub-step 2042, adding a second transition curve on the spherical arc path in the form of a spherical B-spline to obtain an arc update path of the spherical arc path.
[0046] In some embodiments of the present application, in order to improve the continuity and smoothness of the spherical arc path during the change of the tool posture, a second transition curve is added on the spherical arc path in the form of a spherical B-spline to obtain an arc update path of the spherical arc path. Specifically, based on the great circle arc segment between multiple spherical intersection points, a spherical B-spline curve is constructed, and the original spherical arc segment is replaced by the curve to realize continuous modeling of the direction change trajectory on the spherical surface. The spherical B-spline is a kind of parameterized curve defined on the spherical surface, which has local controllability and high-order continuity under spherical constraint, and can realize flexible interpolation of posture change while maintaining the original direction trend. The arc update path generated in this way exhibits higher tangential continuity and direction consistency on the spherical surface, which is beneficial to subsequent tool axis posture interpolation and multi-axis linkage control instruction generation, and reduces the machining error and mechanical impact caused by direction mutation.
[0047] As shown in Figure 3 , in a specific example, during the construction of the spherical arc path, multiple spherical intersection points , , , which correspond to a tool axis direction vector R respectively, and form a plurality of great circle arc segments S to form an initial spherical direction trajectory. Subsequently, a second transition curve is inserted between the great circle arc segments in the form of a spherical B-spline, so that the original spherical arc segments are replaced by a continuous spherical curve C. The curve maintains the geometric trend of direction change on the sphere while eliminating the tangential discontinuity at the arc segment junctions, making the change process of the tool posture on the sphere smoother. Finally, the user obtains the arc line updated path shown in the figure, which exhibits higher direction continuity and posture consistency on the unit sphere, providing a stable spherical geometric basis for subsequent posture smoothing processing and control instruction generation.
[0048] Optional spherical B-spline added to the spherical arc line path is defined as follows: ; wherein, is the degree of the spherical B-spline, is the spherical B-spline control point, the number of control points is m+1, is the spherical node vector, the number of nodes is q+m+1, is the index of the node vector support interval of the curve parameter v, is an intermediate parameter for iteration.
[0049] In some embodiments of the present application, in order to achieve continuous posture fitting of the spherical arc line path so that the direction change of the tool on the spherical path remains smooth and controllable, the spherical B-spline (Spherical Basis spline) on the spherical arc line path is solved according to a recursive formula. The process includes: based on a preset set of arc line control points, constructing a spherical node vector and in each support interval , calculating each order intermediate point by Slerp recursion, and finally obtaining a spherical B-spline curve . The spherical B-spline is a curve construction method for direction vector interpolation on the sphere, which can realize continuous change of posture while maintaining the constraint of unit vector. In this way, discrete direction control points can be converted into continuous direction curves on the sphere, thereby improving the stability of tool posture control and the smoothness of the machining path. The formula realizes continuous fitting of the direction vector on the spherical path by spherical interpolation, avoiding the normalization error caused by Euclidean space interpolation.
[0050] Step 205, determining the machining control instruction of the numerical control tool according to the polyline updated path and the arc line updated path.
[0051] The method shown in this step has been described in step 103, and will not be repeated here.
[0052] Optionally, step 205 includes the following sub-steps: Sub-step 2051, according to the preset error constraint and length constraint, determine the transition spline parameters of the transition spline of the spatial polyline path and the spherical arc path respectively.
[0053] Wherein, the transition spline parameters are used to constrain the spatial position of the numerical control tool when passing through the transition curve.
[0054] In some embodiments of the present application, in order to ensure that the spatial position of the numerical control tool on the transition curve segment meets the machining precision and path continuity requirements, the transition spline parameters of the transition spline of the spatial polyline path and the spherical arc path will be determined according to the preset error constraint and length constraint. Specifically, the maximum allowable position error and the minimum curve segment length will be set for each transition curve corresponding to the spatial polyline and the spherical arc, and the parameter set for controlling the shape of the spline will be calculated based on these constraints. The error constraint is used to limit the spatial deviation of the tool on the transition segment, ensuring that the machining trajectory geometrically fits the target path; the length constraint is used to avoid abrupt changes in posture or frequent switching of control instructions caused by too short transition segments. The transition spline parameters include but are not limited to control point position, node spacing, curvature limit, etc., which are used to define the geometric shape and interpolation accuracy of the spline curve. By setting these parameters, the path smoothness and control stability can be optimized under the premise of meeting the machining precision, providing adjustable geometric basis for subsequent posture interpolation and control instruction generation.
[0055] In one specific example, when designing a multi-axis machining path, the initial transition curves of the spatial polyline path and the spherical arc path have been obtained. Then the maximum position error is set to 0.02mm and the minimum transition segment length is set to 5mm, and the spline control parameters required for each transition curve are calculated based on these constraints, including the number of control points, node distribution and curvature variation range. In the spatial path, the user adjusts the control point position of the quasi-uniform B-spline to make the curve smooth while meeting the error constraint; in the spherical path, the user optimizes the node spacing of the spherical B-spline to make the direction change continuous on the sphere. Finally, the user obtains a set of transition spline parameters that meet the machining precision requirements, providing a stable geometric input for subsequent machining control instruction generation.
[0056] Optionally, sub-step 2051 includes the following sub-steps: Sub-step 20511, according to the distance error constraint on the tool tip and the adaptive transition length constraint on the first transition curve on the polyline update path, determine the first transition spline parameters of the tool tip on the first transition curve path.
[0057] In some embodiments of the present application, in order to ensure that the transition of the tool tip point on the polyline update path has reasonable smoothness and machining precision, the first transition spline parameters of the tool tip point on the first transition curve path are determined according to the distance error constraint of the tool tip point and the adaptive transition length constraint of the first transition curve on the polyline update path. Specifically, in the polyline update path, for the connection area between each polyline, according to the distance error constraint of the tool tip point between the ideal path and the fitted path, combined with the adaptive adjustment mechanism of the transition length, a spline curve for describing the motion trajectory of the tool tip point is constructed, and the control points, node distribution and curvature variation parameters are extracted. The spline parameters refer to a set of numerical values for defining the shape and smoothness of the spline curve, usually including control point position, node spacing, curvature constraint factor, etc., for guiding subsequent interpolation and posture adjustment. Through this step, dynamic adjustment of the transition length can be realized while maintaining the continuity of the tool tip path, thereby improving the smoothness and machining stability of the overall path.
[0058] In a specific example, when a user is processing the path smoothing of a complex curved surface part, it is found that there are multiple high-curvature connection segments in the polyline update path, and direct interpolation will lead to discontinuous machining trajectory. Therefore, the user sets the maximum distance error threshold of the tool tip point to 0.02 mm in the system, and enables the adaptive transition length adjustment function. The system constructs the first transition curve on each polyline connection segment according to these constraint conditions, and extracts the control points and node distribution using the spline fitting algorithm, and finally generates the first transition spline parameter set. In the subsequent machining control instruction generation process, the tool realizes smooth interpolation and stable operation on these transition segments, and the machining result meets the design requirements in terms of path continuity and surface quality.
[0059] Optionally, the first transition spline parameters are obtained by the following formula: , The adaptive transition length constraint is represented as: , The distance error constraint is represented as: , is the length of the adjacent two straight line segments of the added first transition curve, are the included angles of the original machining paths on both sides of the key point, is the maximum allowable error constraint of the first transition curve.
[0060] In some embodiments of the present application, in order to construct the first transition curve in the polyline update path to meet the requirements of machining accuracy and fairness, the first transition spline parameter is determined by jointly calculating the distance error constraint of the tool tip point and the adaptive transition length constraint . Specifically, the included angle of the adjacent two straight line segments at the key point is calculated , and the adaptive transition length constraint term is constructed in combination with the corresponding straight line segment length . At the same time, the error constraint term is constructed according to the maximum allowed distance error and the included angle , and the minimum value of the three is finally taken as the first transition spline parameter. The first transition spline parameter refers to the key length index used to control the shape of the transition curve and the interpolation range, and its value directly affects the fairness of the transition segment and the machining error control ability. In this way, the dynamic adjustment of the transition segment length can be realized under the premise of meeting the error constraint, thereby improving the path continuity and machining stability. The formula constructs an adjustable transition length model by jointly considering the geometric included angle and error tolerance to adapt to the fairness requirements under different path structures.
[0061] In sub-step 20512, the second transition spline parameter of the tool axis direction vector on the second transition curve path is determined according to the direction error constraint of the tool axis and the transition length constraint of the second transition curve on the spherical arc line path.
[0062] In some embodiments of the present application, in order to ensure stable posture control of the tool on the transition segment of the spherical arc line path, the second transition spline parameter of the tool axis direction vector on the second transition curve path is determined according to the direction error constraint of the tool axis and the transition length constraint of the second transition curve on the spherical arc line path. Specifically, for the connection region with large tool posture change in the spherical arc line path, the spline curve for describing the tool axis direction change is constructed according to the direction error constraint between the ideal posture and the fitted posture of the tool axis direction vector, in combination with the adjustment mechanism of the transition segment length, and the control points, node distribution and rotation constraint parameters are extracted. The tool axis direction vector refers to a set of unit vectors used to represent the spatial posture of the tool, which is used to describe the posture continuity and direction change trend in spline fitting. Through this step, the posture change rate and transition segment length can be controlled coordinately while maintaining the continuity of the tool posture, thereby improving the posture stability and surface consistency in the machining process.
[0063] In a specific example, when a user is processing a path smoothing of a multi-axis linkage part, it is found that there are multiple posture mutation segments in the spherical arc path, and if direct interpolation is used, the tool direction will jump. Therefore, the user sets the tool axis direction error threshold to 0.5 degrees in the system, and enables the transition length adjustment function. The system constructs a second transition curve on each spherical arc connection segment according to these constraint conditions, and extracts the control point and node distribution using the direction spline fitting algorithm, and finally generates a second transition spline parameter set. In the subsequent machining control instruction generation process, the tool realizes smooth transition of posture and continuous control of direction on these transition segments, and the machining result meets the design requirements in terms of posture stability and surface consistency.
[0064] The second transition spline parameter is obtained by the following formula: , wherein the intermediate parameter is determined by the following formula: , wherein, is the maximum allowable error constraint of the second transition curve, and m1, m2, k1, k2, △ are intermediate parameters.
[0065] In some embodiments of the present application, in order to construct a second transition curve that meets the requirements of posture continuity and error control in the spherical arc path, the variation trend of the tool axis direction vector and the maximum allowable direction error constraint are jointly calculated to determine the second transition spline parameter . Specifically, the unit difference vector between the direction vectors is first calculated, and the curvature related parameter is constructed therefrom, and the direction error constraint is combined, and the intermediate variable is derived using a discriminant, and finally is obtained. The second transition spline parameter is a key length index for controlling the posture interpolation range on the spherical path, and its value determines the variation rate of the direction vector on the transition segment and the interpolation stability. In this way, the dynamic adjustment of the posture variation interval can be realized under the premise of meeting the direction error constraint, thereby improving the continuity of tool posture control and the stability of the machining process. The formula constructs an adjustable posture transition length model by analyzing the variation trend between the direction vectors and the error tolerance, to adapt to the interpolation requirements under different direction variation structures.
[0066] Sub-step 2052, determining the machining control instruction according to all the transition spline parameters.
[0067] In some embodiments of the present application, in order to convert the optimized trajectory information into executable numerical control machining actions, machining control instructions will be determined according to all the transition spline parameters. Specifically, based on the control points, node distribution, curvature constraints and other parameters of each segment of the transition spline in the spatial polyline path and the spherical arc path, a control instruction set for driving the numerical control tool movement will be generated. The machining control instruction refers to a set of instructions for guiding the numerical control system to execute a specific machining path, which usually includes position interpolation instructions, posture adjustment instructions, feed speed settings and other contents. The transition spline parameters play a role in path constraint and posture adjustment in the control instruction generation, ensuring that the tool can maintain trajectory continuity on the transition segment and meet the machining precision requirements. Through this instruction generation method, closed-loop conversion from geometric modeling to control execution can be achieved, so that the numerical control system can accurately reproduce the smoothed path during the machining process, improving the overall machining stability and surface quality.
[0068] In a specific example, after completing the path smoothing process of a certain complex curved surface part, the transition spline parameter set of the spatial polyline path and the spherical arc path has been obtained. Then, the user inputs these parameters into the machining control module, and the system generates a machining control instruction sequence containing position coordinates, direction vectors and feed speed according to the control points and node information of each segment of the spline. In the actual machining process, the numerical control tool moves continuously and adjusts its posture according to the instruction set, so that smooth interpolation and stable control are achieved on the transition segment. Finally, the machining result meets the design requirements in terms of surface roughness, contour accuracy and tool running stability, verifying the effectiveness and practicality of the transition spline parameters in the control instruction generation.
[0069] In summary, in the embodiment of the present application, by analyzing the multiple target poses of the tool in space, a spatial polyline path formed by the tool tip point and a spherical arc path formed by the tool axis direction vector are respectively constructed, realizing the dual modeling of the tool position and attitude change, not only improving the geometric accuracy of the trajectory expression, but also providing a more targeted optimization basis for subsequent smoothing processing; and then by adding transition curves on the spatial polyline path and the spherical arc path respectively, the path is significantly improved in terms of geometric continuity, on the one hand, the polyline update path using the spatial polyline path avoids redundant interpolation at small angles and enhances the curvature buffer characteristics at large angles, effectively reducing the machining error caused by sudden change of curvature, on the other hand, the arc line update path using the spherical arc line path ensures that the motion trajectory of the rotating shaft is smoother, and the non-linear fluctuation between the path arc length and the rotation angle is weakened, thereby improving the control stability of the rotating shaft; finally, by using the polyline update path and the arc line update path together to generate the machining control instructions of the numerical control tool, the entire machining process is optimized in both position control and attitude control dimensions. This dual-path collaborative optimization mechanism not only improves the machining accuracy, but also effectively reduces the negative effects such as tool impact, machine tool vibration and surface roughness, thereby enhancing the overall performance and reliability of the five-axis numerical control machining system in complex curved surface machining scenarios. Therefore, based on the method of the embodiment of the present application, by constructing the spatial polyline path and the spherical arc path and respectively performing smoothing processing, the limitations of the prior art in transition curve insertion strategy and direction vector continuity control are broken through, while improving the trajectory smoothing, the machining error and motion instability problems are effectively alleviated.
[0070] Reference Figure 5 It shows a five-axis numerical control machining system 30 provided by an embodiment of the present application, comprising: an initial pose obtainer 301, a numerical control machining controller 302, and a numerical control tool 303; The initial pose obtainer 301 is configured to obtain or generate multiple target poses of the numerical control tool in space. The numerical control machining controller 302 is configured to determine a spatial polyline path formed by a tool tip point of a tool axis of the numerical control tool in space and a spherical arc path formed by a tool axis direction vector of the numerical control tool in space according to the multiple target poses, and obtain a polyline update path of the spatial polyline path and an arc line update path of the spherical arc path by adding transition curves on the spatial polyline path and the spherical arc path respectively, and determine a machining control instruction of the numerical control tool according to the polyline update path and the arc line update path; the spherical arc path is located on a spherical surface formed by the tool tip point as the center of the sphere; The numerical control tool 303 is configured to execute the machining control instruction to machine a workpiece.
[0071] ReferenceFigure 6 It shows a five-axis NC machining trajectory smoothing optimization device 40 provided by the embodiment of the application, comprising: The collection module 401 is configured to determine a space polyline path formed by a tool tip point of a tool axis of the NC tool in space and a spherical arc path formed by a tool axis direction vector of the NC tool in space according to a plurality of target poses of the NC tool specified in space; the spherical arc path is located on a spherical surface formed by the tool tip point as a spherical center; The adjustment module 402 is configured to obtain an updated polyline path of the space polyline path and an updated arc path of the spherical arc path by adding transition curves on the space polyline path and the spherical arc path respectively; The control module 403 is configured to determine a machining control instruction for the NC tool according to the updated polyline path and the updated arc path.
[0072] Optionally, the collection module 401 comprises: The analysis sub-module is configured to analyze tool position data in the NC program to obtain a plurality of target space points of the tool tip point and a plurality of target tool axis direction vectors of the NC tool; The polyline sub-module is configured to connect the plurality of target space points by straight line segments to obtain the space polyline path; The arc line sub-module is configured to construct a unit spherical surface with the tool tip point as the spherical center to obtain a spherical intersection point of each target tool axis direction vector on the unit spherical surface, and connect the plurality of spherical intersection points by a spherical great circle on the unit spherical surface to obtain the spherical arc path.
[0073] Optionally, the adjustment module 402 comprises: The polyline updating sub-module is configured to add a first transition curve on the space polyline path in the form of quasi-uniform B-spline to obtain the updated polyline path of the space polyline path; The arc line updating sub-module is configured to add a second transition curve on the spherical arc path in the form of spherical B-spline to obtain the updated arc path of the spherical arc path.
[0074] Optionally, the control module 403 comprises: The parameter calculation sub-module is configured to determine transition spline parameters of transition splines of the space polyline path and the spherical arc path respectively according to preset error constraints and length constraints; the transition spline parameters are used to constrain the spatial position of the NC tool when passing through the transition curves; The control instruction sub-module is configured to determine the machining control instruction according to all the transition spline parameters.
[0075] Optionally, the parameter calculation sub-module comprises: The first parameter unit is configured to determine first transition spline parameters of the tool tip point on the first transition curve path according to a distance error constraint on the tool tip point and an adaptive transition length constraint on the first transition curve on the line segment updated path. The second parameter unit is configured to determine second transition spline parameters of the tool axis direction vector on the second transition curve path according to a direction error constraint on the tool axis and a transition length constraint on the second transition curve on the spherical arc path.
[0076] In summary, in the embodiments of the present application, by analyzing the tool in multiple target poses in space, the space line segment path formed by the tool tip point and the spherical arc path formed by the tool axis direction vector are constructed respectively, which realizes the dual modeling of the tool position and attitude change, not only improves the geometric accuracy of the trajectory expression, but also provides a more targeted optimization basis for subsequent fairing processing; and then by adding transition curves on the space line segment path and the spherical arc path respectively, the path is significantly improved in terms of geometric continuity, on the one hand, the line segment updated path of the space line segment path avoids redundant interpolation at small angles and enhances the curvature buffer characteristics at large angles, effectively reducing the machining error caused by sudden change of curvature, on the other hand, the arc line updated path of the spherical arc path ensures that the motion trajectory of the rotating shaft is smoother, and the nonlinear fluctuation between the path arc length and the rotation angle is weakened, thereby improving the control stability of the rotating shaft; finally, by using the line segment updated path and the arc line updated path together to generate the machining control instructions of the numerical control tool, the entire machining process is optimized in both position control and attitude control dimensions. This dual-path collaborative optimization mechanism not only improves the machining accuracy, but also effectively reduces the negative effects such as tool impact, machine tool vibration and surface roughness, thereby enhancing the overall performance and reliability of the five-axis numerical control machining system in complex curved surface machining scenarios. Therefore, based on the method of the embodiments of the present application, by constructing the space line segment path and the spherical arc path and performing fairing processing respectively, the limitations of the prior art in transition curve insertion strategy and direction vector continuity control are broken through, while improving the trajectory fairness, the machining error and motion instability problems are effectively alleviated.
[0077] Referring to Figure 7 The electronic device 500 can include one or more of the following components: a processing component 502, a memory 504, a power supply component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.
[0078] The processing component 502 generally controls the overall operations of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 can include one or more processors 520 to execute instructions and to complete the steps of the methods described above, in whole or in part. Moreover, the processing component 502 can include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0079] The memory 504 is used to store various types of data to support operations of the electronic device 500. Examples of these data include instructions for any application or method operating on the electronic device 500, contact data, phonebook data, messages, pictures, multimedia, and the like. The memory 504 can be implemented by any type of volatile or non-volatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage devices, flash memory, magnetic disks, or optical disks.
[0080] The power component 506 provides power to the various components of the electronic device 500. The power component 506 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 500.
[0081] The multimedia component 508 includes an interface for outputting various types of media content to a user. In some embodiments, the interface can include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes the touch panel, the interface can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense the boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 508 includes a front-facing camera and / or a rear-facing camera. The front-facing camera and / or the rear-facing camera can receive external multimedia data when the electronic device 500 is in an operation mode, such as a shooting mode or a multimedia mode. Each of the front-facing camera and the rear-facing camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0082] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) for receiving an external audio signal when the electronic device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0083] The input / output (I / O) interface 512 provides an interface between the processing component 502 and peripheral interface modules, which can include a keypad, a click wheel, buttons, and so on. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0084] The sensor component 514 includes one or more sensors for providing status assessments of various aspects of the electronic device 500. For example, the sensor component 514 can detect an open / closed position of the electronic device 500, relative positioning of components, such as a display and a keypad of the electronic device 500, a change of position of the electronic device 500 or a component of the electronic device 500, presence or absence of user contact with the electronic device 500, orientation or acceleration / deceleration of the electronic device 500, and a temperature change of the electronic device 500. The sensor component 514 can include an orientation sensor, an acceleration sensor, a proximity sensor, a gesture sensor, a biometric sensor, a temperature / humidity sensor, an illumination sensor, and / or an interaction sensor. The sensor component 514 can further include an electronic component, for example, a camera, a microphone, and / or a user input interface, to measure a physical quantity or to generate a user interface.
[0085] The communication component 516 facilitates wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a corresponding communication standard, such as WiFi, a cellular network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof. In an example embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcasting management system via a broadcast channel. In an example embodiment, the communication component 516 further includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technology.
[0086] In exemplary embodiments, the electronic device 500 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic elements, for implementing the methods provided by the embodiments of the present application.
[0087] In exemplary embodiments, a non-transitory computer readable storage medium including instructions, such as the memory 504 including instructions, is also provided, which can be executed by the processor 520 of the electronic device 500 to complete the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0088] In exemplary embodiments, the electronic device 500 can also be provided as a server, including a processing component 502 further comprising one or more processors, and a memory resource represented by the memory 504, for storing instructions executable by the processing component 502, such as an application program. The application program stored in the memory 504 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 502 is configured to execute the instructions to perform the methods provided by the embodiments of the present application.
[0089] The electronic device 500 can also include a power supply component 506 configured to perform power management of the electronic device 500, a wired or wireless communication component 516 configured to connect the electronic device 500 to a network, and an input / output (I / O) interface 512. The electronic device 500 can operate based on an operating system stored in the memory 504, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0090] It should be noted that, for the method embodiments of the present application, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited to the order of the described actions, because according to the embodiments of the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present application.
[0091] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the application be construed as including any patern, process, method, technique, composition of matter, or device directly or indirectly
[0092] It is to be understood that the application is not limited to the precise construction hereinafter described and as shown in the attached drawings, and that various changes in shape, size and materials can be made without departing from the scope of the application. The application is defined only by the claims that follow.
Claims
1. A method for optimizing the smoothness of a five-axis CNC machining trajectory, characterized in that, include: Based on multiple target poses specified for the CNC tool in space, the spatial polygonal path formed by the tool tip of the CNC tool axis and the spherical arc path formed by the tool axis direction vector of the CNC tool in space are determined respectively; the spherical arc path is located on the sphere formed with the tool tip as the center of the sphere; By adding transition curves to the spatial polyline path and the spherical arc path respectively, the polyline update path of the spatial polyline path and the arc update path of the spherical arc path are obtained. The machining control commands for the CNC tool are determined based on the polyline update path and the arc update path.
2. The five-axis CNC machining trajectory smoothing optimization method as described in claim 1, characterized in that, The step of determining, based on multiple target poses specified for the CNC tool in space, the spatial polygonal path formed by the tool tip of the CNC tool axis and the spherical arc path formed by the tool axis direction vector of the CNC tool in space, includes: The tool position data in the CNC program is parsed to obtain multiple target spatial points of the tool tip and multiple target tool axis direction vectors of the CNC tool; Connect multiple target spatial points with straight line segments to obtain the spatial polyline path; A unit sphere is constructed with the cutting tip as the center to obtain the spherical intersection point of each target cutting axis direction vector on the unit sphere, and multiple spherical intersection points are connected by a spherical great circle arc on the unit sphere to obtain the spherical arc path.
3. The five-axis CNC machining trajectory smoothing optimization method as described in claim 1, characterized in that, The step of obtaining the polyline update path of the spatial polyline path and the arc update path of the spherical arc path by adding transition curves to the spatial polyline path and the spherical arc path respectively includes: A first transition curve is added to the spatial polyline path in the form of a quasi-uniform B-spline to obtain the polyline update path of the spatial polyline path; A second transition curve is added to the spherical arc path in the form of a spherical B-spline to obtain the arc update path of the spherical arc path.
4. The five-axis CNC machining trajectory smoothing optimization method as described in claim 3, characterized in that, Spherical B-spline added to the spherical arc path The definition is as follows: ; in, The degree of the spherical B-spline. Let m+1 be the control points for the spherical B-spline. Let be a spherical nodal vector with q+m+1 nodes. , where i is the index of the node vector support interval where the curve parameter v is located. These are intermediate parameters used for iteration.
5. The five-axis CNC machining trajectory smoothing optimization method as described in claim 1, characterized in that, The step of determining the machining control command for the CNC tool based on the polyline update path and the arc update path includes: Based on preset error constraints and length constraints, the transition spline parameters of the transition splines for the spatial polygonal path and the spherical arc path are determined; the transition spline parameters are used to constrain the spatial position of the CNC tool when it passes through the transition curve. The machining control command is determined based on all the transition spline parameters.
6. The five-axis CNC machining trajectory smoothing optimization method as described in claim 5, characterized in that, The step of determining the transition spline parameters of the transition splines for the spatial polyline path and the spherical arc path according to preset error constraints and length constraints includes: Based on the distance error constraint of the tool tip and the adaptive transition length constraint of the first transition curve on the polyline update path, the first transition spline parameter of the tool tip on the first transition curve path is determined. Based on the directional error constraint of the tool axis and the transition length constraint of the second transition curve on the spherical arc path, the second transition spline parameter of the tool axis direction vector on the second transition curve path is determined.
7. A five-axis CNC machining system, characterized in that, include: Initial pose acquisition unit, CNC machining controller, CNC cutting tool; The initial pose acquirer is used to acquire or generate multiple target poses of CNC tools in space; The CNC machining controller is used to determine, based on multiple target poses, the spatial polygonal path formed by the tip of the CNC tool axis in space and the spherical arc path formed by the direction vector of the CNC tool axis in space, and to obtain the polygonal update path of the spatial polygonal path and the arc update path of the spherical arc path by adding transition curves to the spatial polygonal path and the spherical arc path, respectively, and to determine the machining control command for the CNC tool based on the polygonal update path and the arc update path. The spherical arc path lies on the spherical surface formed by the blade tip as the center of the sphere; The CNC cutting tool is used to execute the machining control commands to machine the workpiece.
8. A five-axis CNC machining trajectory smoothing optimization device, characterized in that, include: The acquisition module is used to determine, based on multiple target poses specified in space for the CNC tool, the spatial polygonal path formed by the tip of the tool axis in space, and the spherical arc path formed by the direction vector of the tool axis in space; the spherical arc path is located on a sphere formed with the tip as the center. The adjustment module is used to obtain the polyline update path of the spatial polyline path and the arc update path of the spherical arc path by adding transition curves to the spatial polyline path and the spherical arc path respectively. The control module is used to determine the machining control commands for the CNC tool based on the polyline update path and the arc update path.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the five-axis CNC machining trajectory smoothing optimization method as described in any one of claims 1 to 6.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the five-axis CNC machining trajectory smoothing optimization method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Hybrid robot C3 continuous five-axis path switching fairing method
CN114002996A
Five-axis machining continuous tool posture fairing method with optimal machine tool rotating shaft jump
CN116203894A
Cutter attitude path fairing error control method and device
CN118426403A
Numerical control machining track fairing optimization and interpolation method and device
CN119689987A
Cited By
Five-axis numerical control machine tool cutter positioning method and system for machining engine cylinder cover
CN121979097A
A method and system for positioning cutting tools on a 5-axis CNC machine tool for machining engine cylinder heads.
CN121979097B
