Cutter compensation track generation method and device, computer equipment and storage medium

By generating tool compensation trajectory methods, combining tool radius, trajectory and tool axis vector information, the problem of tool radius compensation difficulty in traditional five-axis CNC machining is solved, and efficient tool compensation trajectory generation is achieved.

CN120386282AActive Publication Date: 2025-07-29DONG GUAN GOOGOL AUTOMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510484590.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-29
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

In traditional five-axis CNC machining, tool radius compensation cannot be performed in space, resulting in frequent modification of cutting trajectory, cumbersome process debugging steps, long debugging cycle, which affects the efficiency of tool compensation trajectory generation.

Method used

By determining the compensation vector and the compensation trajectory based on the tool radius information, the current trajectory, the tool axis vector and the tool compensation mode information, the compensation trajectory is generated, and the debugging process is simplified.

Benefits of technology

There is no need to frequently modify the cutting trajectory, which improves the generation efficiency of tool compensation trajectory and simplifies the process debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386282A_ABST
    Figure CN120386282A_ABST
Patent Text Reader

Abstract

The invention relates to a cutter compensation track generation method and device, computer equipment and a storage medium. The method comprises the following steps: determining a compensation vector corresponding to a current track and a compensation vector corresponding to a next track according to a cutter radius, the current track, a cutter axis vector and a cutter compensation mode; determining a compensated track corresponding to the current track according to the compensation vector and determining a compensated track corresponding to the next track according to the next track; determining a transition point plane corresponding to the current track and a transition point plane corresponding to the next track according to the compensation vector and the compensated track; determining an intersection line between a transition point plane corresponding to the current track and a transition point plane corresponding to the next track, and determining a target point according to an intersection point between the current track and the intersection line and an intersection point between the next track and the intersection line; and generating a tool compensation track according to the target point and the compensated track. By adopting the method, the cutting track does not need to be modified frequently, the debugging process is simplified, and the generation efficiency of the cutter compensation track is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of numerical control technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating a tool compensation trajectory. Background Art

[0002] As people have higher and higher requirements for the appearance of consumer products, a large number of products adopt streamlined designs, which brings great challenges to product processing and manufacturing. Traditional three-axis machining is difficult to meet the needs. Five-axis CNC machining has two more rotation axes than three-axis, which can realize cutting posture changes. Therefore, it is widely used for complex spatial surface processing.

[0003] When five-axis machining a spatial surface, the cutting posture changes along the trajectory, and traditional tool radius compensation can only perform radius compensation within a specified plane, which is not suitable for five-axis CNC machining. At the same time, in order to ensure that the cut product size is compliant, traditional technology requires frequent modification of the cutting trajectory and regeneration of the machining code file, resulting in cumbersome process debugging steps and a long debugging cycle, which is not conducive to improving the efficiency of tool compensation trajectory generation. Summary of the Invention

[0004] Based on this, it is necessary to provide a tool compensation trajectory generation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of tool compensation trajectory generation in order to address the above technical problems.

[0005] In a first aspect, the present application provides a method for generating a tool compensation trajectory, comprising:

[0006] Determining compensation vector information corresponding to the current trajectory based on tool radius information, current trajectory, tool axis vector information, and tool compensation modal information of the current trajectory; determining compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and tool compensation modal information of the next trajectory; the tool compensation modal information represents a direction of tool radius compensation;

[0007] determining a compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and determining a compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory;

[0008] determining a transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determining a transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory;

[0009] Determining an intersection line between a transition point plane corresponding to the current trajectory and a transition point plane corresponding to the next trajectory, and determining a target point based on an intersection point between the current trajectory and the intersection line and an intersection point between the next trajectory and the intersection line;

[0010] A tool compensation trajectory is generated according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.

[0011] In one embodiment, determining the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation modal information of the current trajectory includes:

[0012] Determining first vector information according to the starting point and the end point of the current trajectory;

[0013] Compensation vector information corresponding to the current trajectory is determined according to the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation modal information of the current trajectory.

[0014] In one embodiment, determining the compensation vector information corresponding to the current trajectory according to the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation modal information of the current trajectory includes:

[0015] Obtaining a ratio between the vector product and the modulus of the vector product;

[0016] Obtaining the product of the ratio and the tool radius information;

[0017] Compensation vector information corresponding to the current trajectory is determined according to the product and the tool compensation modal information of the current trajectory.

[0018] In one embodiment, the method further comprises:

[0019] Determining first vector information according to the starting point and the end point of the current trajectory;

[0020] An intersection point between the current trajectory and the intersection line is determined according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.

[0021] In one embodiment, determining the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information includes:

[0022] Obtaining a vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory as a first vector product;

[0023] Obtaining a ratio between the first vector information and the modulus of the first vector information as unit vector information of the current trajectory;

[0024] Obtaining a difference between the tool radius information and the first vector product;

[0025] Obtaining a vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory as a second vector product;

[0026] Obtaining a ratio between the unit vector information of the current trajectory and the second vector product, and obtaining a product between the ratio and the difference;

[0027] An intersection point between the current trajectory and the intersection line is determined according to an end point of the current trajectory, compensation vector information corresponding to the current trajectory, and the product.

[0028] In one embodiment, the method further comprises:

[0029] Obtaining the rotary axis position information from the machine tool control instructions;

[0030] The tool axis vector information is determined according to the rotation axis position information and the machine tool structure information.

[0031] In a second aspect, the present application further provides a tool compensation trajectory generating device, comprising:

[0032] a compensation vector determination module, configured to determine compensation vector information corresponding to a current trajectory based on tool radius information, a current trajectory, tool axis vector information, and tool compensation modal information of the current trajectory; and to determine compensation vector information corresponding to a next trajectory based on the tool radius information, a next trajectory corresponding to the current trajectory, the tool axis vector information, and tool compensation modal information of the next trajectory; the tool compensation modal information represents a direction of tool radius compensation;

[0033] a trajectory compensation module, configured to determine a compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and determine a compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory;

[0034] A plane determination module, configured to determine an over-point plane corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine an over-point plane corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory;

[0035] A target point determination module, configured to determine an intersection line between the over-point plane corresponding to the current trajectory and the over-point plane corresponding to the next trajectory, and determine a target point according to an intersection point between the current trajectory and the intersection line and an intersection point between the next trajectory and the intersection line;

[0036] A trajectory generation module, configured to generate a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.

[0037] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0038] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0039] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0040] The above-mentioned tool compensation trajectory generation method, device, computer equipment, computer-readable storage medium and computer program product can accurately obtain the compensation vector information corresponding to the current trajectory according to the tool radius information, current trajectory, tool axis vector information and tool compensation mode information of the current trajectory, and accurately obtain the compensation vector information corresponding to the next trajectory according to the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information and the tool compensation mode information of the next trajectory. Then, according to the compensation vector information corresponding to the current trajectory and the current trajectory, the compensated trajectory corresponding to the current trajectory can be accurately obtained, and according to the compensation vector information corresponding to the next trajectory and the next trajectory, the compensated trajectory corresponding to the next trajectory can be accurately obtained. After that, according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, the transition point plane corresponding to the current trajectory can be accurately analyzed, and according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory, the transition point plane corresponding to the next trajectory can be accurately analyzed. Based on the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory and the intersection points between the current trajectory and the next trajectory respectively, the target point is determined. According to the target point, the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory, the tool compensation trajectory can be accurately generated. It can combine the tool radius, trajectory, tool axis vector and tool compensation mode to first determine the trajectory after tool radius compensation, and then analyze the target point for connecting the compensated trajectories from the perspective of the plane, so as to generate the tool compensation trajectory, without frequently modifying the cutting trajectory, simplifying the debugging process, and thus improving the generation efficiency of the tool compensation trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is a schematic flow chart of a tool compensation trajectory generation method in an embodiment;

[0043] Figure 2 It is a schematic diagram of a tool compensation mode conversion in an embodiment;

[0044] Figure 3 It is a schematic diagram of a tool compensation state in an embodiment;

[0045] Figure 4 It is a schematic diagram of a tool radius compensation model in an embodiment;

[0046] Figure 5It is a structural block diagram of a tool compensation trajectory generation device in an embodiment;

[0047] Figure 6 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0048] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] In one embodiment, as Figure 1 shown, a tool compensation trajectory generation method is provided. In this embodiment, the method is described by taking its application to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0050] Step S102, determine the compensation vector information corresponding to the current trajectory according to the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory, and determine the compensation vector information corresponding to the next trajectory according to the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation.

[0051] Among them, the tool radius information may refer to the radius of the circular part of the tool. In practical applications, the tool radius may include the distance from the rotation center of the tool to its cutting edge.

[0052] Among them, the current trajectory may refer to the path that the tool is about to cut currently. In practical applications, the current trajectory may include at least two trajectory points (such as a starting point and an ending point).

[0053] Among them, the next trajectory corresponding to the current trajectory may refer to the path that the tool needs to cut after finishing cutting the current trajectory. For example: assuming that edge a among the three edges a, b, and c extending from a certain vertex of a cube is the current trajectory, then edge b / edge c can be used as the next trajectory corresponding to the current trajectory.

[0054] Among them, the tool axis vector information may refer to the information representing the direction of the rotation axis of the tool.

[0055] Among them, the tool compensation modal information can refer to the information that characterizes the direction of tool radius compensation. In actual applications, the tool compensation modal information can be obtained from the machine tool control instructions. The tool compensation modal information can include canceling tool compensation, left tool compensation and right tool compensation, etc. Among them, canceling tool compensation can represent not performing tool radius compensation, left tool compensation can represent performing tool radius compensation along the left side of the trajectory forward direction, and right tool compensation can represent performing tool radius compensation along the right side of the trajectory forward direction.

[0056] Among them, the compensation vector information corresponding to the current trajectory can refer to information that characterizes the degree of difference between the trajectory after tool radius compensation for the current trajectory and the current trajectory. Similarly, the compensation vector information corresponding to the next trajectory can refer to information that characterizes the degree of difference between the trajectory after tool radius compensation for the next trajectory and the next trajectory.

[0057] As an example, the terminal can first obtain tool radius information, the trajectory the tool needs to cut, tool axis vector information, and tool compensation modal information for each trajectory. Then, for each trajectory (such as the current trajectory), the terminal can determine the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, tool axis vector information, and tool compensation modal information for the current trajectory. Similarly, the terminal can determine the compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, tool axis vector information, and tool compensation modal information for the next trajectory.

[0058] Step S104 , determining a compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and determining a compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory.

[0059] Among them, the compensated trajectory corresponding to the current trajectory may refer to the trajectory obtained after the tool radius compensation is performed on the current trajectory according to the compensation vector information corresponding to the current trajectory. In actual applications, the compensated trajectory corresponding to the current trajectory may include at least two trajectory points (such as the starting point and the end point). Similarly, the compensated trajectory corresponding to the next trajectory may refer to the trajectory obtained after the tool radius compensation is performed on the next trajectory according to the compensation vector information corresponding to the next trajectory. In actual applications, the compensated trajectory corresponding to the next trajectory may include at least two trajectory points (such as the starting point and the end point).

[0060] As an example, since the compensation vector information can characterize the degree of difference between the trajectory after tool radius compensation and the original trajectory, for each trajectory (such as the current trajectory), the terminal can determine the compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory. Similarly, the terminal can determine the compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory. For example: The compensated trajectory corresponding to the current trajectory can be obtained by translating the current trajectory along the direction of the compensation vector information corresponding to the current trajectory by the length of the modulus of the compensation vector information corresponding to the current trajectory.

[0061] Step S106: Determine the transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine the transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory.

[0062] Among them, the transition point plane can refer to the plane used to determine the connection point between the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory. In practical applications, the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory are skew lines in space, and a certain point in the transition point plane can be used to connect the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory.

[0063] As an example, since the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory are skew lines in space, it is necessary to find a point as the transition point to connect the compensated trajectories. To determine the transition point, the terminal can first determine the transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine the transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory. Then, the terminal can determine the position of the transition point in the transition point planes corresponding to each trajectory (or compensated trajectory).

[0064] Step S108: Determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine the target point based on the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line.

[0065] Among them, the target point can refer to the point in the transition point plane used to connect the compensated trajectory corresponding to the current trajectory and the compensated trajectory corresponding to the next trajectory. In practical applications, the target point can be used as a transition point.

[0066] As an example, to determine the transition point, the terminal may first analyze the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and then determine the target point based on the intersection point between the current trajectory and the intersection line, as well as the intersection point between the next trajectory and the intersection line. In actual applications, the terminal may determine a line segment based on the intersection point between the current trajectory and the intersection line, as well as the intersection point between the next trajectory and the intersection line, and use a point on the line segment (such as the midpoint) as the target point.

[0067] Step S110 , generating a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.

[0068] The tool compensation trajectory may refer to a path obtained after tool radius compensation is performed on the cutting path of the tool.

[0069] As an example, the terminal can generate a tool compensation trajectory based on the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory. For example, the terminal can connect the end point of the compensated trajectory corresponding to the current trajectory with the target point, and connect the target point with the starting point of the compensated trajectory corresponding to the next trajectory to obtain the tool compensation trajectory. It can be understood that the terminal can first determine the target point corresponding to each trajectory, and then determine the tool compensation trajectory based on the starting point of the compensated trajectory corresponding to the first segment of the tool trajectory and the target point corresponding to each segment of the trajectory. For example, the terminal can start from the starting point of the compensated trajectory corresponding to the first segment of the tool trajectory, and sequentially connect the target points corresponding to each segment of the trajectory to obtain the tool compensation trajectory.

[0070] In the above tool compensation trajectory generation method, by obtaining the compensation vector information corresponding to the current trajectory accurately according to the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory, obtaining the compensation vector information corresponding to the next trajectory accurately according to the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory, then obtaining the compensated trajectory corresponding to the current trajectory accurately according to the compensation vector information corresponding to the current trajectory and the current trajectory, obtaining the compensated trajectory corresponding to the next trajectory accurately according to the compensation vector information corresponding to the next trajectory and the next trajectory, then analyzing the transition point plane corresponding to the current trajectory accurately according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, analyzing the transition point plane corresponding to the next trajectory accurately according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory, determining the target point based on the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory and the intersection points between the current trajectory and the next trajectory respectively, and generating the tool compensation trajectory accurately according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory. It is possible to combine the tool radius, the trajectory, the tool axis vector, and the tool compensation mode, first determine the trajectory after tool radius compensation, and then analyze the target point for connecting the compensated trajectories from the perspective of the plane, so as to generate the tool compensation trajectory, without frequently modifying the cutting trajectory, simplifying the debugging process, and thus improving the generation efficiency of the tool compensation trajectory.

[0071] In an exemplary embodiment, determining the compensation vector information corresponding to the current trajectory according to the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory includes: determining the first vector information according to the start point and the end point of the current trajectory; determining the compensation vector information corresponding to the current trajectory according to the cross product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.

[0072] Wherein, the direction of the first vector information can be the direction from the start point of the current trajectory to the end point of the current trajectory, and the magnitude of the first vector information can include the length from the start point of the current trajectory to the end point of the current trajectory.

[0073] As an example, the terminal can determine the first vector information (such as vector P1P2) based on the starting point P1 and the ending point P2 of the current trajectory. Then, the terminal can calculate the magnitude of the compensation vector information corresponding to the current trajectory and determine the direction of the compensation vector information corresponding to the current trajectory according to the vector product between the first vector information and the tool axis vector information (such as vector v), the tool radius information R, and the tool compensation mode information of the current trajectory according to a preset calculation expression. Similarly, the terminal can determine vector P2P3 based on the starting point P2 and the ending point P3 of the next trajectory. Then, the terminal can calculate the magnitude of the compensation vector information corresponding to the next trajectory and determine the direction of the compensation vector information corresponding to the next trajectory according to the vector product between vector P2P3 and the tool axis vector information (such as vector v), the tool radius information R, and the tool compensation mode information of the next trajectory according to a preset calculation expression.

[0074] In this embodiment, by determining the first vector information based on the starting point and the ending point of the current trajectory, and determining the compensation vector information corresponding to the current trajectory according to the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory, the compensation vector corresponding to the trajectory can be accurately calculated, so as to quickly and accurately determine the compensated trajectory by using the compensation vector, providing a data basis for generating the tool compensation trajectory, thereby improving the generation efficiency of the tool compensation trajectory.

[0075] In some embodiments, determining the compensation vector information corresponding to the current trajectory according to the vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory includes: obtaining the ratio between the vector product and the magnitude of the vector product; obtaining the product of the ratio and the tool radius information; and determining the compensation vector information corresponding to the current trajectory according to the product and the tool compensation mode information of the current trajectory.

[0076] As an example, taking the starting point of the current trajectory as P1, the ending point as P2, the tool axis vector information as vector v, and the tool radius information as R for illustration, the terminal can first calculate the vector product between vector PIP2 and vector v and the magnitude of this vector product. Then, the terminal can calculate the ratio between this vector product and the magnitude of this vector product (this ratio can be used as the unit vector of the vector product between vector PIP2 and vector v), and calculate the product of this ratio and the tool radius information R (a kind of vector information). Since the tool compensation mode information can represent the direction of tool radius compensation, the terminal can determine the direction of the above product (a kind of vector information) according to the tool compensation mode information of the current trajectory to obtain the compensation vector information corresponding to the current trajectory. For example: when the tool compensation mode information of the current trajectory is right tool compensation, the compensation vector information corresponding to the current trajectory (such as vector w) can be expressed as:

[0077] 。

[0078] When the tool compensation modal information of the current trajectory is left tool compensation, the compensation vector information (such as vector w) corresponding to the current trajectory can be expressed as:

[0079] .

[0080] Similarly, let's take the following trajectory as an example, where the starting point is represented as P2, the end point is represented as P3, the tool axis vector information is represented as vector v, and the tool radius information is represented as R. When the tool compensation modal information of the next trajectory is right tool compensation, the compensation vector information (such as vector u) corresponding to the next trajectory can be expressed as:

[0081] .

[0082] When the tool compensation modal information of the next trajectory is left tool compensation, the compensation vector information (such as vector u) corresponding to the next trajectory can be expressed as:

[0083] .

[0084] In this embodiment, by obtaining the ratio between the vector product and the modulus of the vector product; obtaining the product of the ratio and the tool radius information; and determining the compensation vector information corresponding to the current trajectory based on the product and the tool compensation modal information of the current trajectory, the modulus and length of the compensation vector can be accurately calculated, thereby improving the accuracy of the compensation vector information and thus improving the accuracy of the tool compensation trajectory.

[0085] In some embodiments, the above method also includes: determining the first vector information based on the starting point and end point of the current trajectory; determining the intersection between the current trajectory and the intersection line based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory and the first vector information.

[0086] As an example, to determine the intersection point of a trajectory (such as the current trajectory) and the intersection line between two transition point planes, the terminal may determine first vector information based on the start and end points of the current trajectory, and then determine the position / coordinates of the intersection point between the current trajectory and the intersection line based on the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information. Similarly, to determine the intersection point of the next trajectory and the intersection line between the two transition point planes, the terminal may determine second vector information based on the start and end points of the next trajectory, and then determine the position / coordinates of the intersection point between the next trajectory and the intersection line based on the end point of the next trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the second vector information.

[0087] In this embodiment, by determining the first vector information according to the start point and end point of the current trajectory, and determining the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information, the intersection point between the trajectory and the intersection line between the two transition point planes can be accurately analyzed, so as to quickly determine the accurate target point / transition point, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.

[0088] In some embodiments, determining the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information includes: obtaining the cross product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory as the first cross product; obtaining the ratio between the first vector information and the modulus of the first vector information as the unit vector information of the current trajectory; obtaining the difference between the tool radius information and the first cross product; obtaining the cross product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory as the second cross product; obtaining the ratio between the unit vector information of the current trajectory and the second cross product, and obtaining the product between the ratio and the difference; and determining the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product.

[0089] Wherein, the direction of the first vector information can be the direction from the start point to the end point of the current trajectory, and the modulus of the first vector information can include the length from the start point to the end point of the current trajectory.

[0090] As an example, taking the starting point of the current trajectory as P1, the ending point as P2, the tool radius information as R, the compensation vector information corresponding to the current trajectory as vector w, and the compensation vector information corresponding to the next trajectory as vector u, the terminal can calculate the cross product between the compensation vector information corresponding to the current trajectory (such as vector w) and the compensation vector information corresponding to the next trajectory (such as vector u) as the first cross product. Then, the terminal can calculate the ratio between the first vector information (such as vector P1P2) and the magnitude of the first vector information as the unit vector information of the current trajectory (such as vector l1). Then, the terminal can calculate the difference between the tool radius information R and the first cross product, calculate the cross product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory (such as vector u) as the second cross product. Then, the terminal can calculate the ratio between the unit vector information of the current trajectory (such as vector l1) and the second cross product, and obtain the product between the ratio and the difference. Then, the terminal can determine the position / coordinates of the intersection point between the current trajectory and the intersection line according to the ending point of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product. For example: The position / coordinates of the intersection point A between the current trajectory and the intersection line can be expressed as:

[0091] ,

[0092] .

[0093] Similarly, taking the starting point of the next trajectory as P2, the ending point as P3, the tool radius information as R, the compensation vector information corresponding to the current trajectory as vector w, and the compensation vector information corresponding to the next trajectory as vector u, the position / coordinates of the intersection point B between the next trajectory and the intersection line can be expressed as:

[0094] ,

[0095] .

[0096] In this embodiment, the vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as the first vector product; the ratio between the first vector information and the modulus of the first vector information is obtained as the unit vector information of the current trajectory; the difference between the tool radius information and the first vector product is obtained; the vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory is obtained as the second vector product; the ratio between the unit vector information of the current trajectory and the second vector product is obtained, and the product between the ratio and the difference is obtained; according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory and the product, the intersection point between the current trajectory and the intersection line is determined, and the intersection point of the trajectory and the intersection line between the two transition point planes can be accurately determined, so as to quickly determine the accurate target point / transition point, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.

[0097] In some embodiments, the above method further includes: acquiring rotation axis position information from a machine tool control instruction; and determining tool axis vector information based on the rotation axis position information and machine tool structure information.

[0098] The machine tool control instructions may refer to instructions for controlling a machine tool to process raw materials to generate workpieces.

[0099] The rotary axis position information refers to the position of the tool's rotary axis. In practice, this position is specified in the machine tool control instructions and is part of the command position information. For example, the command position information might be expressed as G01X100.0 Y100.0 Z200.0 A15.0 C30.0, where X represents the position of the tool center point on the machine's X-axis, Y represents the position of the tool center point on the Y-axis, and Z represents the position of the tool center point on the Z-axis. A represents the angle of rotation about the X-axis, and C represents the angle of rotation about the Z-axis. A / C describes the tool's spatial posture. The X-axis represents the direction of lateral movement along the machine's worktable, i.e., from left to right. The Y-axis represents the direction of movement perpendicular to the X-axis, moving forward and backward along the worktable, i.e., from front to back. The Z-axis represents the direction of vertical movement, perpendicular to the X and Y axes, controlling the tool's height relative to the workpiece to adjust the focus and cutting depth. Through the combined motion of these three axes, a laser cutting machine can freely move in two dimensions (the XY plane) or three dimensions, enabling the cutting of complex patterns.

[0100] The machine tool structure information may refer to information representing the model, structure, etc. of the machine tool.

[0101] As an example, to determine the tool axis vector, the terminal can obtain the rotational axis position information from the machine tool control instruction. Since the calculation process of the tool axis vector is related to the machine tool structure, the terminal can obtain the machine tool structure information and determine the tool axis vector information based on the rotational axis position information and the machine tool structure information. In practical applications, the tool axis vector information can be obtained by any one or more methods in the prior art, which will not be elaborated here.

[0102] In this embodiment, by obtaining the rotational axis position information from the machine tool control instruction and determining the tool axis vector information based on the rotational axis position information and the machine tool structure information, it is possible to accurately calculate the tool axis vector by combining the rotational axis position in the machine tool control instruction and the machine tool structure, so as to quickly and accurately obtain the tool compensation trajectory using the tool axis vector, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.

[0103] In some embodiments, to avoid the influence of the tool radius on the machining effect of the workpiece, tool radius compensation is required. First, the terminal (such as a controller) can read the instruction from the machine tool control instruction, such as the numerical control programming code, and obtain the instruction position information (such as the position information of each point on the current trajectory and the next trajectory) and the tool compensation mode information. The terminal can also calculate the tool axis vector according to the rotational axis position and the machine tool structure. In practical applications, the terminal can update the state of the current tool compensation (tool radius compensation) process of the machine tool according to the tool radius compensation mode information (such as the tool compensation mode information) in the machine tool control instruction, such as Figure 2 As shown, a schematic diagram of tool compensation mode conversion is provided. The tool compensation process can include four states: TRC_OFF: Tool compensation is off, and the system defaults to this state; TRC_SETUP: Establish tool compensation, which is converted to this state when encountering G41 / G42 instructions in the TRC_OFF state; TRC_RUN: Tool compensation is running; TRC_CANCEL: Cancel tool compensation, which is converted to this state when encountering G40 instructions in the TRC_RUN state. The tool compensation mode can include three types: G40: Cancel tool compensation; G41: Left tool compensation, that is, compensation is performed on the left side along the forward direction of the trajectory; G42: Right tool compensation, that is, compensation is performed on the right side along the forward direction of the trajectory. When changing from G40 to G41 / G42, the tool compensation state changes from TRC_OFF to TRC_SETUP, indicating that the first interpolation instruction of the machine tool needs to perform tool compensation establishment later, and it will become TRC_RUN after the tool compensation establishment is completed.

[0104] In practical applications, such as Figure 3As shown in the figure, a schematic diagram of the tool compensation status is provided. First, the tool compensation module is TRC_OFF. After encountering the first motion instruction with tool compensation mode of G41 / G42, it becomes TRC_SETUP. From this section, it means that the tool compensation function starts to take effect. After the tool compensation is established, it enters the TRC_RUN state and maintains this state until it encounters the G40 motion instruction. The tool compensation state changes to TRC_CANCEL and cancels the tool compensation at the same time. After the tool compensation is canceled, the tool compensation module enters the TRC_OFF state again.

[0105] like Figure 4 As shown in the figure, a schematic diagram of the tool radius compensation model is provided. (P1, P2) is the first segment of the trajectory (such as the current trajectory), and (P2, P3) is the second segment of the trajectory (such as the next trajectory corresponding to the current trajectory). The vector v at point P2 can be the tool axis vector at the end point of the first segment of the trajectory. The compensation vector of the first segment of the trajectory is vector w, and the compensation vector of the first segment of the trajectory is vector u. In the specific implementation, when the tool compensation mode is G42, the vector w can be expressed as:

[0106] .

[0107] When the tool compensation mode is G41, vector w can be expressed as:

[0108] .

[0109] When the tool compensation mode is G42, vector u can be expressed as:

[0110] .

[0111] When the tool compensation mode is G41, vector u can be expressed as:

[0112] .

[0113] (Q1, C1) can be the trajectory of the first segment (P1, P2) after compensation, and (C2, Q3) can be the trajectory of the second segment (P2, P3) after compensation, where:

[0114] .

[0115] The two trajectories (Q1, C1) and (C2, Q3) are skew spatial lines and do not intersect at one point. This will cause the two original continuous spatial trajectories to become discontinuous after tool compensation. To solve this problem, it is necessary to add an intermediate transition point D between the two trajectories (Q1, C1) and (C2, Q3). The transition point D is calculated in the following way: the plane passing through point C1 with vector w as the normal vector is S1, and the plane passing through point C2 with vector u as the normal vector is S2; the intersection line of plane S1 and plane S2 is L, the trajectory (Q1, C1) intersects with L at point A, and the trajectory (C2, Q3) intersects with L at point B. Then the transition point D can include the midpoint of line segment AB, and the relationship between the position of point A and point P2 can be expressed as:

[0116]

[0117] .

[0118] The relationship between the position of point B and point P2 can be expressed as:

[0119]

[0120] .

[0121] At this point, the compensated trajectory (Q1, D) of (P1, P2) can be obtained. Similarly, for the next trajectory (the second trajectory), the transition point E corresponding to the next trajectory can be determined according to the above process, and the compensated trajectory of the second trajectory can be expressed as (D, E).

[0122] In this embodiment, the plane formed by the trajectory and the tool axis vector is regarded as the machining surface, and then the tool radius compensation is performed in the direction perpendicular to the machining surface. After compensation, two non-planar spatial straight lines are calculated. Then, according to the trajectory angle, different radius compensation conversion models are selected to calculate the middle transition point of the two non-planar spatial straight lines. In this way, the end point of the first segment can be determined. The end point of the second segment is calculated using the second and third segments in the same way. This operation is repeated to obtain the radius compensation trajectory of all trajectories. The trajectory after tool radius compensation can be obtained quickly and accurately, thereby improving the accuracy and generation efficiency of the tool compensation trajectory.

[0123] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0124] Based on the same inventive concept, embodiments of the present application also provide a tool compensation trajectory generation device for implementing the aforementioned tool compensation trajectory generation method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more tool compensation trajectory generation device embodiments provided below can be found in the limitations of the tool compensation trajectory generation method described above and will not be further elaborated here.

[0125] In an exemplary embodiment, Figure 5 As shown, a tool compensation trajectory generation device is provided, comprising: a compensation vector determination module 502, a trajectory compensation module 504, a plane determination module 506, a target point determination module 508 and a trajectory generation module 510, wherein:

[0126] The compensation vector determination module 502 is used to determine the compensation vector information corresponding to the current trajectory based on the tool radius information, the current trajectory, the tool axis vector information and the tool compensation modal information of the current trajectory, and to determine the compensation vector information corresponding to the next trajectory based on the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information and the tool compensation modal information of the next trajectory; the tool compensation modal information represents the direction of tool radius compensation.

[0127] The trajectory compensation module 504 is configured to determine a compensated trajectory corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the current trajectory, and to determine a compensated trajectory corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the next trajectory.

[0128] The plane determination module 506 is configured to determine a transition point plane corresponding to the current trajectory based on the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and to determine a transition point plane corresponding to the next trajectory based on the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory.

[0129] A target point determination module 508, configured to determine an intersection line between an over-point plane corresponding to the current trajectory and an over-point plane corresponding to the next trajectory, and determine a target point according to an intersection point between the current trajectory and the intersection line and an intersection point between the next trajectory and the intersection line;

[0130] A trajectory generation module 510, configured to generate a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory;

[0131] In one exemplary embodiment, the compensation vector determination module 502 is further specifically configured to determine first vector information according to a start point and an end point of the current trajectory; determine the compensation vector information corresponding to the current trajectory according to a vector product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.

[0132] In one exemplary embodiment, the compensation vector determination module 502 is further specifically configured to obtain a ratio between the vector product and the modulus of the vector product; obtain a product of the ratio and the tool radius information; determine the compensation vector information corresponding to the current trajectory according to the product and the tool compensation mode information of the current trajectory.

[0133] In one exemplary embodiment, the apparatus further includes an intersection point determination module, which is specifically configured to determine first vector information according to a start point and an end point of the current trajectory; determine an intersection point between the current trajectory and the intersection line according to an end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.

[0134] In one exemplary embodiment, the intersection point determination module is further specifically configured to obtain a first vector product, which is a vector product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory; obtain a ratio between the first vector information and the modulus of the first vector information as the unit vector information of the current trajectory; obtain a difference between the tool radius information and the first vector product; obtain a second vector product, which is a vector product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory; obtain a ratio between the unit vector information of the current trajectory and the second vector product, and obtain a product of the ratio and the difference; determine an intersection point between the current trajectory and the intersection line according to an end point of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product.

[0135] In one exemplary embodiment, the device further includes a cutter axis vector determination module, which is specifically configured to obtain the rotational axis position information from the machine tool control instruction; and determine the cutter axis vector information according to the rotational axis position information and the machine tool structure information.

[0136] Each module in the above tool compensation trajectory generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.

[0137] In one exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. The computer program, when executed by the processor, implements a tool compensation trajectory generation method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.

[0138] Those skilled in the art can understand that Figure 6 the structure shown in

[0139] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the foregoing method embodiments are implemented.

[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0141] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.

[0142] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0143] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., without limitation.

[0144] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope recorded in this application.

[0145] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A tool compensation trajectory generation method, characterized in that, The method includes: Determine the compensation vector information corresponding to the current trajectory according to the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory, and determine the compensation vector information corresponding to the next trajectory according to the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool compensation mode information of the next trajectory; the tool compensation mode information represents the direction of tool radius compensation. Determine the compensated trajectory corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the current trajectory, and determine the compensated trajectory corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the next trajectory. Determine the transition point plane corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine the transition point plane corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory. Determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine the target point according to the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line. Generate the tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory.

2. The method according to claim 1, characterized in that, The step of determining the compensation vector information corresponding to the current trajectory according to the tool radius information, the current trajectory, the tool axis vector information, and the tool compensation mode information of the current trajectory includes: Determine the first vector information according to the start point and the end point of the current trajectory. Determine the compensation vector information corresponding to the current trajectory according to the cross product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory.

3. The method according to claim 2, wherein The step of determining the compensation vector information corresponding to the current trajectory according to the cross product between the first vector information and the tool axis vector information, the tool radius information, and the tool compensation mode information of the current trajectory includes: Obtain the ratio between the cross product and the modulus of the cross product. Obtain the product of the ratio and the tool radius information. Determine the compensation vector information corresponding to the current trajectory according to the product and the tool compensation mode information of the current trajectory.

4. The method according to claim 1, characterized in that The method further includes: Determine the first vector information according to the start point and the end point of the current trajectory. Determine the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information.

5. The method according to claim 4, wherein The step of determining the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, the tool radius information, the compensation vector information corresponding to the next trajectory, and the first vector information includes: Obtain the cross product between the compensation vector information corresponding to the current trajectory and the compensation vector information corresponding to the next trajectory as the first cross product; Obtain the ratio between the first vector information and the magnitude of the first vector information as the unit vector information of the current trajectory; Obtain the difference between the tool radius information and the first cross product; Obtain the cross product between the unit vector information of the current trajectory and the compensation vector information corresponding to the next trajectory as the second cross product; Obtain the ratio between the unit vector information of the current trajectory and the second cross product, and obtain the product between the ratio and the difference; Determine the intersection point between the current trajectory and the intersection line according to the end point of the current trajectory, the compensation vector information corresponding to the current trajectory, and the product; 6. The method according to claim 1, wherein The method further includes: Obtain the rotation axis position information from the machine tool control instruction; Determine the tool axis vector information according to the rotation axis position information and the machine tool structure information; 7. A tool compensation trajectory generation device, characterized in that, The device includes: A compensation vector determination module, configured to determine the compensation vector information corresponding to the current trajectory according to the tool radius information, the current trajectory, the tool axis vector information, and the tool radius compensation mode information of the current trajectory, and determine the compensation vector information corresponding to the next trajectory according to the tool radius information, the next trajectory corresponding to the current trajectory, the tool axis vector information, and the tool radius compensation mode information of the next trajectory; the tool radius compensation mode information characterizes the direction of tool radius compensation; A trajectory compensation module, configured to determine the compensated trajectory corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the current trajectory, and determine the compensated trajectory corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the next trajectory; A plane determination module, configured to determine the transition point plane corresponding to the current trajectory according to the compensation vector information corresponding to the current trajectory and the compensated trajectory corresponding to the current trajectory, and determine the transition point plane corresponding to the next trajectory according to the compensation vector information corresponding to the next trajectory and the compensated trajectory corresponding to the next trajectory; A target point determination module, configured to determine the intersection line between the transition point plane corresponding to the current trajectory and the transition point plane corresponding to the next trajectory, and determine the target point according to the intersection point between the current trajectory and the intersection line and the intersection point between the next trajectory and the intersection line; A trajectory generation module, configured to generate a tool compensation trajectory according to the target point, the compensated trajectory corresponding to the current trajectory, and the compensated trajectory corresponding to the next trajectory; 8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6; 9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6; 10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6;

Citation Information

Patent Citations

  • Compensation method of radius of tool for triaxial numerical control machine based on curve surface reconstruction

    CN101615022A

  • Numerical control system-based tool radius compensation vector calculating method

    CN103076761A

  • Real-time monitoring method of track error of five-axis linkage processing machine tool

    CN108459559A

  • Detection method for offline programming track of industrial robot

    CN109571479A

  • Method for achieving cutter radius compensation control for arc cutter path in numerical control system

    CN110908332A