Method and device for correcting deviation of machining track on workpiece

By generating calibrated straight lines on the machining coordinate system of the workpiece and calculating the intersection coordinates, the problem of reduced machining trajectory accuracy caused by the movement of the workpiece is solved, and the precise correction of the machining trajectory on the workpiece is achieved and the machining accuracy is improved.

CN119739099APending Publication Date: 2025-04-01SHEN ZHEN QIAN HAI RUI JI TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411831423.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

During the workpiece processing, the movement of the workpiece causes the accuracy of the processing trajectory to be reduced, resulting in large machining errors, and the expected machining effect cannot be achieved.

Method used

By generating calibration straight lines on the machining coordinate system of the workpiece, and in response to calibration instructions and deviation correction instructions, the coordinates of the intersection point between the straight lines on the workpiece plane and the calibrated straight line are controlled as calibration coordinates and offset coordinates, and the coordinate information of the machining trajectory of the workpiece in the machining coordinate system has been offset.

Benefits of technology

Accurate correction of the machining trajectory on the workpiece is achieved, processing errors caused by the movement of the workpiece are avoided, and machining accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739099A_ABST
    Figure CN119739099A_ABST
Patent Text Reader

Abstract

The present application provides a method for correcting the processing trajectory on a workpiece, the method comprising: generating a calibration line on the processing coordinate system where the workpiece is located, responding to the calibration instruction, controlling the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, obtaining the coordinates of the intersections between the fourth straight line and the fifth straight line and the calibration line respectively, and using them as calibration coordinates; responding to the correction instruction, obtaining the coordinates of the intersections between the fourth straight line and the fifth straight line and the calibration line respectively, as offset coordinates; according to the calibration coordinates and the offset coordinates, calculating the coordinate information of the processing trajectory of the workpiece in the processing coordinate system after the offset. The present application realizes the correction of the processing trajectory on the workpiece.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technical field of the present application is the field of workpiece processing, and specifically relates to a method and device for correcting a processing trajectory on a workpiece. Background Art

[0002] When processing a workpiece, it is usually necessary to process the workpiece according to a preset processing trajectory. When there is a transfer or movement of the workpiece between the determination time of the processing trajectory and the processing time, for example, when the workpiece needs to be processed according to the processing trajectory, the workpiece with the determined processing trajectory is moved to the processing table, and then the processing table obtains the coordinate information of the processing trajectory on the workpiece. If the workpiece has moved, if you want to accurately process the workpiece according to the processing trajectory, you need to move the workpiece to a specific position so that the processing table can accurately process the workpiece according to the coordinate information of the processing trajectory. Otherwise, when the processing table processes the workpiece according to the processing trajectory, since the position of the workpiece is no longer the position determined when the processing trajectory is determined, it will be processed at a position on the workpiece that does not originally belong to the processing trajectory. This results in a significant reduction in the processing accuracy of the workpiece.

[0003] However, after the workpiece is transferred or moved, it is almost impossible to perfectly move the workpiece to a specific position, which results in large processing errors when the workpiece is processed according to a preset processing trajectory, and the expected processing effect cannot be achieved.

[0004] Therefore, how to correct the processing trajectory on the workpiece so that the workpiece can be processed accurately is a technical problem that urgently needs to be solved. Summary of the invention

[0005] The present application aims to solve the technical problem of correcting the machining trajectory on a workpiece.

[0006] According to one aspect of an embodiment of the present application, the present application provides a method for correcting a machining trajectory on a workpiece, the method comprising:

[0007] Generate calibration lines on a machining coordinate system where the workpiece is located, wherein the calibration lines include a first straight line, a second straight line, and a third straight line, wherein the first straight line and the second straight line are parallel to a first axis of the machining coordinate system, and the third straight line is parallel to a second axis of the machining coordinate system;

[0008] In response to the calibration instruction, a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located are controlled to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset;

[0009] In response to the correction instruction, obtaining the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates;

[0010] The coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset is calculated according to the calibration coordinates and the offset coordinates.

[0011] According to one aspect of an embodiment of the present application, before controlling a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively in response to a calibration instruction, the method further includes:

[0012] The straight lines on which two mutually perpendicular edges of the workpiece are located are taken as the fourth straight line and the fifth straight line.

[0013] According to one aspect of an embodiment of the present application, in response to a calibration instruction, controlling a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively includes:

[0014] In response to the calibration instruction, determining any straight line parallel to the second axis on the plane where the workpiece is located as a fourth straight line;

[0015] On the plane where the workpiece is located, any straight line parallel to the first axis is determined as the fifth straight line.

[0016] According to one aspect of an embodiment of the present application, the calibration coordinates include a first calibration point coordinate, a second calibration point coordinate, and a third calibration point coordinate. During the execution of the calibration instruction, the intersection points of the first straight line, the second straight line, and the fourth straight line are respectively the first calibration point and the second calibration point, and the intersection point of the third straight line and the fifth straight line is the third calibration point.

[0017] The offset coordinates include the first offset point coordinates, the second offset point coordinates, and the third offset point coordinates. During the execution of the correction instruction, the intersection points of the first straight line, the second straight line, and the fourth straight line are the first offset point and the second offset point, respectively, and the intersection point of the third straight line and the fifth straight line is the third offset point.

[0018] Calculating coordinate information of the offset machining trajectory on the workpiece according to the calibrated coordinates and the offset coordinates, including:

[0019] Determine a rotation angle of the workpiece around the third calibration point according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates;

[0020] Calculating a first translation amount of the trajectory point on the first axis and the second axis as the workpiece rotates according to the rotation angle and the coordinates of the trajectory point indicating the processing trajectory;

[0021] Calculate the second translation amount of the trajectory point on the first axis and the second axis as the workpiece translates according to the rotation angle, the second calibration point coordinates, the third calibration point coordinates, the second offset point coordinates, and the third offset point coordinates;

[0022] Calculating the coordinates of the trajectory point after the offset according to the first translation amount and the second translation amount and the coordinates of the trajectory point;

[0023] The offset coordinate information of the processing trajectory is calculated according to the offset coordinates of the trajectory points.

[0024] According to one aspect of an embodiment of the present application, determining a rotation angle of the workpiece around a third calibration point according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates includes:

[0025] Substituting the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates into the following formula to determine the rotation angle of the workpiece around the third calibration point;

[0026]

[0027] Wherein, θ is the rotation angle of the workpiece around the third calibration point, x A is the coordinate value of the first calibration point on the first axis, y A is the coordinate value of the first calibration point on the second axis, x A3 is the coordinate value of the first offset point on the first axis, x B is the coordinate value of the second calibration point on the first axis, y B is the coordinate value of the second calibration point on the second axis, x B3 is the coordinate value of the second offset point on the first axis.

[0028] According to one aspect of the embodiment of the present application, if it is impossible to make the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located parallel to the second number axis and the first number axis respectively, the method further includes:

[0029] Calculate a rotation and translation matrix and apply it to the processing coordinate system to obtain a temporary processing coordinate system, so that the fourth straight line and the fifth straight line are respectively parallel to the temporary second axis and the temporary first axis of the temporary processing coordinate system, and the first straight line, the second straight line and the third straight line are offset as the processing coordinate system is offset;

[0030] Obtaining the coordinates of the intersection of the fourth straight line, the fifth straight line and the calibration straight line as calibration coordinates;

[0031] In response to the deviation correction instruction, the coordinates of the intersections of the fourth straight line, the fifth straight line and the calibration straight line are obtained as offset coordinates;

[0032] Calculating temporary coordinate information of the machining trajectory after the offset according to the calibration coordinates and the offset coordinates, and the temporary coordinate information of the machining trajectory;

[0033] The coordinate information of the machining trajectory after the offset is calculated according to the temporary coordinate information of the machining trajectory after the offset and the rotation and translation matrix.

[0034] According to one aspect of an embodiment of the present application, before obtaining the offset coordinates in response to the correction instruction, the method further includes:

[0035] If the trajectory coordinate system used by the processing trajectory is different from the processing coordinate system, the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system is calculated;

[0036] According to the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system, the coordinate information of the processing trajectory is converted into the processing coordinate system.

[0037] According to one aspect of an embodiment of the present application, before obtaining the offset coordinates in response to the correction instruction, the method further includes:

[0038] A machining trajectory of the workpiece is determined in the machining coordinate system.

[0039] According to one aspect of an embodiment of the present application, the present application provides a device for correcting a machining trajectory on a workpiece, the device comprising:

[0040] A generating module is configured to generate calibration lines on a processing coordinate system where the workpiece is located, wherein the calibration lines include a first straight line, a second straight line, and a third straight line, wherein the first straight line and the second straight line are parallel to a first axis of the processing coordinate system, and the third straight line is parallel to a second axis of the processing coordinate system;

[0041] A calibration module is configured to, in response to a calibration instruction, control a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset;

[0042] A correction module is configured to obtain, in response to the correction instruction, the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates;

[0043] The correction module is configured to calculate the coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates.

[0044] According to one aspect of an embodiment of the present application, the present application provides a computer, including:

[0045] processor;

[0046] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, any of the methods described above is implemented.

[0047] In the present application, a calibration line is generated on the processing coordinate system where the workpiece is located, and a fourth line and a fifth line that are offset as the workpiece is offset are generated on the plane where the workpiece is located. The coordinates of the intersection of the calibration line with the fourth line and the fifth line are used as calibration coordinates during calibration. After responding to the correction instruction, the coordinates of the intersection of the calibration line with the fourth line and the fifth line are used as offset coordinates. The offset of the workpiece is calculated based on the difference between the calibration coordinates and the offset coordinates. The coordinate information of the offset processing trajectory is calculated based on the offset of the workpiece, thereby realizing the correction of the processing trajectory on the workpiece. This avoids large errors caused by the movement of the workpiece when the workpiece is processed according to the processing trajectory.

[0048] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0049] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.

[0051] Figure 1 A flow chart of a method for correcting a machining trajectory on a workpiece according to an embodiment of the present application is shown.

[0052] Figure 2 A flow chart for determining a fourth straight line and a fifth straight line according to an embodiment of the present application is shown.

[0053] Figure 3 A flow chart is shown for calculating coordinate information of a machining trajectory of a workpiece in a machining coordinate system after an offset based on calibration coordinates and offset coordinates according to an embodiment of the present application.

[0054] Figure 4 A schematic diagram of workpiece calibration according to an embodiment of the present application is shown.

[0055] Figure 5 A schematic diagram showing a workpiece rotating around a third calibration point according to an implementation of the present application is shown.

[0056] Figure 6 A schematic diagram showing a workpiece translating in a first axis direction after rotation according to an embodiment of the present application is shown.

[0057] Figure 7 A schematic diagram showing a workpiece translating in the direction of a second axis after rotation according to an embodiment of the present application is shown.

[0058] Figure 8 A flow chart of a method for correcting a machining trajectory on another workpiece according to an embodiment of the present application is shown.

[0059] Fig. 9 A flow chart of transforming a machining trajectory into a machining coordinate system according to an embodiment of the present application is shown.

[0060] Fig.10 A schematic diagram of a deviation correction device for a machining trajectory on a workpiece according to an embodiment of the present application is shown.

[0061] Fig.11 A hardware structure diagram of a method for correcting a machining trajectory on a workpiece according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0062] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0063] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.

[0064] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0065] See also Figure 1 , Figure 1 A flowchart of a method for correcting a machining track on a workpiece according to an embodiment of the present application is shown. The present application embodiment provides a method for correcting a machining track on a workpiece, including:

[0066] Step S110, generating calibration lines on the machining coordinate system where the workpiece is located, the calibration lines comprising a first straight line, a second straight line and a third straight line, the first straight line and the second straight line are parallel to a first axis of the machining coordinate system, and the third straight line is parallel to a second axis of the machining coordinate system;

[0067] Step S120, in response to the calibration instruction, controlling the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as the calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset;

[0068] Step S130, in response to the correction instruction, obtaining the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates;

[0069] Step S140, calculating coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates.

[0070] The above four steps are described in detail below.

[0071] In step S110, a calibration line is generated on the processing coordinate system where the workpiece is located. In some embodiments, the calibration line is generated according to the first axis and the second axis in the processing coordinate system, and the first line and the second line are determined according to the second axis, and the first line and the second line are both perpendicular to the second axis. The third line is determined according to the first axis, and the third line is perpendicular to the first axis. The first axis and the second axis are perpendicular to each other. That is, the first line and the second line are parallel to the first axis, and the third line is parallel to the second axis.

[0072] In step S120, in response to the calibration instruction, the fourth straight line is parallel to the second axis and the fifth straight line is parallel to the first axis in the plane where the workpiece is located. It should be clear that the fourth straight line and the fifth straight line are perpendicular to each other and shift with the shift of the workpiece.

[0073] The calibration coordinates are obtained, and the calibration coordinates include the coordinates of the intersection points of the fourth straight line with the first straight line and the second straight line, and the coordinates of the intersection point of the fifth straight line with the third straight line.

[0074] It should be clarified that, in some embodiments, the fourth straight line and the fifth straight line are determined before executing the calibration instruction, and the workpiece offset is controlled during calibration so that the fourth straight line and the fifth straight line are parallel to the second axis and the first axis respectively.

[0075] In other embodiments, the fourth straight line and the fifth straight line are determined when executing the calibration instruction. That is, after responding to the calibration instruction, a fourth straight line parallel to the second number axis and a fifth straight line parallel to the first number axis are generated, so that the fourth straight line and the fifth straight line are necessarily parallel to the second number axis and the first number axis, respectively.

[0076] It should be further clarified that, in some embodiments, the first straight line, the second straight line, the third straight line, the fourth straight line, and the fifth straight line are located in the same plane. The processing coordinate system can be a two-dimensional coordinate system or a three-dimensional coordinate system.

[0077] In some embodiments, when the machining coordinate system is a two-dimensional coordinate system, the plane where the machining coordinate system is located is the plane where the workpiece is located.

[0078] In some embodiments, when the machining coordinate system is a three-dimensional coordinate system, two axes are determined as axes to be used, and the plane where the axes to be used are located is the plane where the workpiece is located.

[0079] That is, all the straight lines and intersections appearing in the present application are in the same plane, that is, when executing the method described in the present application, only two-dimensional coordinates are used, that is, only the coordinate values ​​represented on two number axes are used.

[0080] In another embodiment of the present application, the first straight line, the second straight line, the third straight line, the fourth straight line, and the fifth straight line can also be obtained in the following manner: the first initial straight line, the second initial straight line, and the third initial straight line are determined in a three-dimensional processing coordinate system, and the fourth initial straight line and the fifth initial straight line are determined with reference to any point on the workpiece, and these five initial straight lines are not located in the same plane. The first initial straight line and the second initial straight line are parallel to the first axis of the processing coordinate system, and the third initial straight line is parallel to the second axis of the processing coordinate system. The first axis and the second axis are located in the same plane and are perpendicular to each other.

[0081] The fourth initial straight line is parallel to the second number axis, the fifth initial straight line is parallel to the first number axis, and the fourth initial straight line and the fifth initial straight line are offset as the workpiece is offset.

[0082] The first initial straight line, the second initial straight line, the third initial straight line, the fourth initial straight line, and the fifth initial straight line are projected onto the plane where the first number axis and the second number axis are located to obtain the first straight line, the second straight line, the third straight line, the fourth straight line, and the fifth straight line.

[0083] In one embodiment of the present application, the first straight line, the second straight line, the third straight line, the fourth straight line, and the fifth straight line may not be located in the same plane, and the calibration coordinates may be obtained in the following manner: determine the fourth plane according to the fourth straight line, the fourth plane is perpendicular to the plane where the first axis and the second axis are located, obtain the point-to-plane intersection of the first straight line, the second straight line and the fourth plane, and use the coordinate values ​​of the point-to-plane intersection coordinates on the first axis and the second axis as the intersection coordinates of the first straight line, the second straight line and the fourth straight line. Determine the fifth plane according to the fifth straight line, the fifth plane is perpendicular to the plane where the first axis and the second axis are located, obtain the point-to-plane intersection of the third straight line and the fifth plane, and use the coordinate values ​​of the point-to-plane intersection coordinates on the first axis and the second axis as the intersection coordinates of the fifth straight line and the third straight line. Obtain the intersection coordinates.

[0084] Similarly, the above method can also be used to obtain offset coordinates.

[0085] In some embodiments, straight lines on which two mutually perpendicular edges of the workpiece are located are used as the fourth straight line and the fifth straight line.

[0086] In some embodiments, a straight line where any two points on the workpiece are located is taken as the fourth straight line, and any straight line perpendicular to the fourth straight line is taken as the fifth straight line.

[0087] See also Figure 2 , Figure 2 A flow chart of determining the fourth straight line and the fifth straight line according to an embodiment of the present application is shown. The embodiment of the present application provides steps of determining the fourth straight line and the fifth straight line, including:

[0088] Step S201, responding to the calibration instruction, determining any straight line parallel to the second axis on the plane where the workpiece is located as the fourth straight line;

[0089] Step S202, determining any straight line parallel to the first axis on the plane where the workpiece is located as the fifth straight line.

[0090] The above two steps are described in detail below.

[0091] In step S201, in response to the calibration instruction, any straight line parallel to the second axis is determined on the plane where the workpiece is located as the fourth straight line.

[0092] In step S202, any straight line parallel to the first axis is determined on the plane where the workpiece is located as the fifth straight line.

[0093] In some embodiments, the calibration instruction does not exist independently, but exists as an auxiliary instruction. For example, when a user performs a certain operation, the operation is used as a trigger event of the calibration instruction, and the calibration instruction is automatically generated. For example, when the user determines the processing trajectory, the calibration instruction is automatically generated.

[0094] It should be clear that before executing step S130 , when the workpiece does not move, the coordinate information of the machining trajectory on the workpiece in the machining coordinate system needs to be obtained.

[0095] In step S130, it should be made clear that there may be transportation and position change of the workpiece between the correction instruction and the calibration instruction, or the current position of the workpiece may no longer be the position where it was when the calibration instruction was executed, that is, the coordinate information of the processing trajectory on the workpiece is not accurate enough.

[0096] In response to the correction instruction, the coordinates of the intersection of the first straight line, the second straight line and the fourth straight line, and the coordinates of the intersection of the third straight line and the fifth straight line are obtained again as correction coordinates. , due to the offset of the fourth straight line and the fifth straight line, if the workpiece does not offset, the offset coordinates and the calibration coordinates are consistent, and there is no need to correct the processing trajectory on the workpiece. If the workpiece offsets, the offset coordinates and the calibration coordinates must be inconsistent, and the processing trajectory on the workpiece needs to be corrected.

[0097] It should be clear that in some embodiments, the correction instruction does not exist independently, but exists as an auxiliary instruction. For example, when a user performs a certain operation, the operation is used as a trigger event of the correction instruction, and the correction instruction is automatically generated. Exemplarily, when a processing instruction is generated, the correction instruction is automatically generated, and the processing trajectory on the workpiece is corrected before the workpiece is processed.

[0098] In step S140, according to the difference between the calibrated coordinates and the offset coordinates, the calibrated coordinates and the offset coordinates are substituted into a preset formula to calculate the coordinate information of the machining trajectory after the workpiece is offset, so as to realize more accurate machining of the workpiece according to the machining trajectory.

[0099] See also Figure 3 , Figure 3 A flowchart of calculating the coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates according to one embodiment of the present application is shown. The embodiment of the present application provides a step S140 of calculating the coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates, including:

[0100] Step S141, determining a rotation angle of the workpiece around a third calibration point according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates;

[0101] Step S142, calculating a first translation amount of the trajectory point on the first axis and the second axis as the workpiece rotates according to the rotation angle and the coordinates of the trajectory point used to indicate the processing trajectory;

[0102] Step S143, calculating a second translation amount of the trajectory point on the first axis and the second axis as the workpiece translates according to the rotation angle, the second calibration point coordinates, the third calibration point coordinates, the second offset point coordinates, and the third offset point coordinates;

[0103] Step S144, calculating the coordinates of the trajectory point after the offset according to the first translation amount, the second translation amount and the coordinates of the trajectory point;

[0104] Step S145, calculating the offset coordinate information of the processing trajectory according to the offset coordinates of the trajectory points.

[0105] The above five steps are described in detail below.

[0106] Before describing the above five steps in detail, it should be made clear that the calibration coordinates include the first calibration point coordinates, the second calibration point coordinates, and the third calibration point coordinates. During the execution of the calibration instruction, the intersection points of the first straight line, the second straight line, and the fourth straight line are the first calibration point and the second calibration point, respectively, and the intersection point of the third straight line and the fifth straight line is the third calibration point.

[0107] The offset coordinates include the first offset point coordinates, the second offset point coordinates, and the third offset point coordinates. During the execution of the correction instruction, the intersection points of the first straight line, the second straight line and the fourth straight line are the first offset point and the second offset point respectively, and the intersection point of the third straight line and the fifth straight line is the third offset point.

[0108] Before calculating the coordinate information of the offset machining trajectory based on the calibrated coordinates and the offset coordinates, the calculation principle is explained first: any offset (rotation, translation) of each point in the machining trajectory of the workpiece can be regarded as three variables: rotation around an arbitrary point at a certain angle, translation along the first axis, and translation along the second axis. Then, the rotation around an arbitrary point at a certain angle can be decomposed into the translation of the workpiece along the first axis and the second axis. Finally, the translation of the workpiece on the first axis and the second axis can be obtained, and then the coordinate information of the previously determined machining trajectory can be translated accordingly. That is, the offset process of each point on the machining trajectory is decomposed into the translation along the first axis and the second axis, and then the coordinate information of the machining trajectory after the offset is obtained.

[0109] The method for obtaining the coordinates of the first calibration point, the second calibration point, the third calibration point, the first offset point, the second offset point, and the third offset point is not limited in this application.

[0110] To facilitate calculation, the present application first analyzes various offset conditions of the workpiece, establishes a corresponding relationship between the offset of the workpiece on the first axis and the second axis and the calibration coordinates and the offset coordinates, and obtains a formula that can be used at any time, so that when the method described in the present application is subsequently executed, calculations can be performed directly based on the calibration point coordinates and the offset point coordinates.

[0111] In this process, the rotation angle is calculated first, and then the first axis translation caused by the workpiece offset in various situations is associated with the second axis translation through the rotation angle. The specific construction process is as follows:

[0112] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram showing a workpiece calibration process according to an embodiment of the present application. Figure 5 , Figure 5 A schematic diagram showing a workpiece rotating around a third calibration point according to an implementation of the present application is shown.

[0113] (1) Based on Figure 4 As shown in the figure, determine the coordinates of the first calibration point (A), the second calibration point (B), and the third calibration point (C), select the third calibration point (C) as the rotation point, and rotate the workpiece at any angle. Figure 5 As shown, the intersection points A1 and B1 of the first straight line, the second straight line and the fourth straight line, and the intersection point C1 of the third straight line and the fifth straight line are obtained.

[0114]

[0115] Where x represents the coordinate value on the first axis, y represents the coordinate value on the second axis, and Δx B =x B1 -x B With Δx A =x A1 -x A .x A is the coordinate value of point A on the first axis, x A1 is the coordinate value of point A1 on the first axis. B is the coordinate value of point B on the first axis, x B1 is the coordinate value of point B1 on the first axis. A is the coordinate value of point A on the second axis, y B is the coordinate value of point B on the second axis. θ represents the rotation angle.

[0116] (2) The coordinates of the intersection of the first straight line and the fourth straight line are used as the first reference point, and the rotation angle is used to represent the change in the coordinate value of the first reference point on the first axis due to the rotation of the workpiece (i.e., the length of AA1). It should be clarified that in the embodiment of the present application, the coordinates of the intersection of the first straight line and the fourth straight line or the coordinates of the intersection of the second straight line and the fourth straight line can be used as the first reference point. In the embodiment of the present application, the coordinates of the intersection of the first straight line and the fourth straight line are used as the first reference point arbitrarily.

[0117] It should be clarified that since the first straight line, the second straight line and the first number axis are parallel to each other, and the first reference point is a point on the first straight line or the second straight line, the first reference point only moves on the first number axis, and thus this application only calculates the relationship between the moving distance of the first reference point on the first number axis and the rotation angle.

[0118]

[0119] Where Δx 转 This is the length of AA1, which is the distance the first reference point moves on the first axis due to the rotation of the workpiece. C is the coordinate value of point C on the first axis, x C is the coordinate value of point C on the first number axis.

[0120] See also Figure 6 , Figure 6 A schematic diagram showing a workpiece translating in a first axis direction after rotation according to an embodiment of the present application is shown.

[0121] (3) Based on Figure 6 As shown, the rotated workpiece is translated along the first axis, and the intersection points of the first straight line, the second straight line and the fourth straight line are obtained as A2 and B2, and the intersection point of the third straight line and the fifth straight line is obtained as C2. The intersection point of the third straight line and the fifth straight line is used as the second reference point to obtain the translation distance of the workpiece along the first axis, the coordinate change of the second reference point caused by the translation distance of the workpiece along the first axis, and the relationship between the rotation angle.

[0122] It should be clarified that since the third straight line and the second axis are parallel to each other and the second reference point is a point on the third straight line, the second reference point only moves on the second axis, and thus this application only calculates the relationship between the moving distance of the second reference point on the second axis and the rotation angle.

[0123] Δy x = -Δx tan(θ)

[0124] Its, Δy xΔx is the change in the coordinate value of the second reference point on the second axis caused by the translation of the workpiece along the first axis, that is, the length of CC2. 平 is the distance the workpiece moves along the first axis, that is, A1A2.

[0125] See also Figure 7 , Figure 7 A schematic diagram showing a workpiece translating in the direction of a second axis after rotation according to an embodiment of the present application is shown.

[0126] (4) Based on Figure 7 As shown, after translating the workpiece along the first axis, the workpiece continues to translate along the second axis, and the intersection points of the first straight line, the second straight line and the fourth straight line are obtained as A3 and B3, and the intersection point of the third straight line and the fifth straight line is obtained as C3. The translation distance of the workpiece along the second axis, the change in the coordinates of the intersection point of the first straight line and the fourth straight line caused by the translation distance of the workpiece along the second axis, and the relationship between the rotation angle are obtained.

[0127] Δx y =Δy flat·tan(θ)

[0128] Where Δx y Δy is the change in the coordinate value of the first reference point on the first axis caused by the translation of the workpiece along the second axis, that is, the length of A2A3. 平 is the distance that the workpiece moves along the second axis, that is, the length of C2C3.

[0129] (5) According to the above four steps, the relationship between Δx-square, Δy-square and the rotation angle can be calculated.

[0130] First, according to the above 4 steps, we can get the following equation:

[0131]

[0132] Wherein, Δx is the total distance moved by the first reference point on the first axis (the length of AA3), and Δy is the total distance moved by the second reference point on the second axis (the length of CC3). In specific applications, these two parameters can be calculated by the coordinates of the calibration point and the offset point.

[0133] According to the formulas in steps (1)-(4), solving the above equation yields:

[0134]

[0135] That is, according to the above formula, the translation distance of the workpiece on the first axis and the second axis can be obtained by substituting the rotation angle of the workpiece and the coordinate changes of the first reference point and the second reference point into the above formula.

[0136] (6) According to the known formula in the above steps, calculate the coordinates of P3. P3 is the point after P is rotated and translated by the workpiece.

[0137] First, find the offset of point P on the first and second axes after it rotates around point C, that is, to solve With vector The difference, and projected on the number axis, can be obtained from the rotation relationship:

[0138]

[0139] Among them, x pc =x p -x C ,x p3c =x P3 -x C .y pc =y P -y C ,y p3c =y P3 -y C .x P is the coordinate of point P on the first axis, y P is the coordinate of point P on the second axis. C is the coordinate of point C on the first axis. C is the coordinate of point C on the second axis. P3 is the coordinate of point P3 on the first axis, y P3 is the coordinate of point P3 on the second axis. The left side of the equal sign is the rotation matrix and vector The product of, the right side of the equal sign is a vector

[0140] Based on this, the offset caused by the rotation of the workpiece can be obtained as follows: Right now:

[0141]

[0142] Where Δx P3 Δy is the offset of point P on the first axis as the workpiece rotates. P3 It is the offset of point P on the second axis as the workpiece rotates.

[0143] Secondly, for any point P, after rotating around point A, translating along the x-axis and translating along the y-axis, we get P3. Now we need to solve the coordinates of P3. According to the above derivation, we can get:

[0144]

[0145] Among them, x P With y PAs the known quantity (the coordinates of point P), Δx and Δy can be calculated through steps (1)-(5), thus the coordinates of point P3 can be obtained.

[0146] In summary, this application has been verified to be able to calculate the coordinate information of a point after offset through the calibration point coordinates and the offset point coordinates. Under the premise of knowing the coordinate information of the processing trajectory, the processing trajectory can be regarded as consisting of several points, or there are several trajectory points, and adjacent trajectory points are connected to each other by straight lines to form a processing trajectory. Through the above method, the coordinate information of each trajectory point after offset can be calculated to obtain the coordinate information of the processing trajectory after offset.

[0147] Please continue reading Figure 4 and Figure 7 , Figure 7 It can also be a schematic diagram after the workpiece is offset. A3, B3, C3 are the first offset point, the second offset point, and the third offset point, respectively, and P3 is the trajectory point after the offset. The first calibration point is A, the second calibration point is B, and the third calibration point is C. P is the trajectory point when it is not offset.

[0148] In step S141, the rotation angle of the workpiece around the third calibration point is determined according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates.

[0149] Specifically, first obtain the coordinates of the first calibration point, the second calibration point, the first offset point, and the second offset point. Substitute the coordinates of the first calibration point, the second calibration point, the first offset point, and the second offset point into the following formula to calculate the rotation angle around the third calibration point:

[0150]

[0151] Where θ is the rotation angle of the workpiece around the third calibration point, x A is the coordinate value of the first calibration point on the first axis, y A is the coordinate value of the first calibration point on the second axis, x A3 is the coordinate value of the first offset point on the first axis, x B is the coordinate value of the second calibration point on the first axis, y B is the coordinate value of the second calibration point on the second axis, x B3 is the coordinate value of the second offset point on the first axis.

[0152] In step S142, a first translation amount of the trajectory point on the first axis and the second axis as the workpiece rotates is calculated based on the rotation angle and the coordinates of the trajectory point indicating the machining trajectory.

[0153] Specifically, the coordinates of the third calibration point and the third offset point are obtained.

[0154] Find the offset of point P on the first and second axes after rotating around point C, that is, With vector The difference, and projected on the number axis, can be obtained from the rotation relationship:

[0155]

[0156] Among them, x pc =x P -x C ,x p3c =x p3 -x C .y pc =y P -y C ,y p3c =y P3 -y C .x P is the coordinate of point P on the first axis, y P is the coordinate of point P on the second axis. C is the coordinate of point C on the first axis. C is the coordinate of point C on the second axis. P3 is the coordinate of point P3 on the first axis, y P3 is the coordinate of point P3 on the second axis. The left side of the equal sign is the rotation matrix and vector The product of, the right side of the equal sign is a vector Therefore, the offset is Right now:

[0157]

[0158] Where Δx P3 Δy is the offset of point P on the first axis as the workpiece rotates. P3 It is the offset of point P on the second axis as the workpiece rotates, also known as the first translation.

[0159] In step S143, the second translation amount of the trajectory point on the first axis and the second axis as the workpiece is translated is calculated based on the rotation angle, the second calibration point coordinates, the third calibration point coordinates, the second offset point coordinates, and the third offset point coordinates. 平 and Δy 平 .

[0160]

[0161] In step S144, the coordinates of the trajectory point after the offset are calculated according to the first translation amount, the second translation amount and the coordinates of the trajectory point.

[0162] The following equation is obtained:

[0163]

[0164] in:

[0165]

[0166] x A3 is the coordinate value of the first offset point on the first axis, x A is the coordinate value of the first calibration point on the first axis, y A is the coordinate value of the first calibration point on the second axis, y C3 is the coordinate value of the third offset point on the second axis, x C is the coordinate value of the third calibration point on the first axis, y C is the coordinate value of the third calibration point on the second axis.

[0167] Solving the above equation, we can get Δx P3 and Δy P3 , where x P3 =x P +Δx P3 ,y P3 =y P +Δy P3 .x P3 is the coordinate of the trajectory point on the first axis. P3 is the coordinate of the trajectory point on the second axis. Get the coordinate information of the trajectory point after offset.

[0168] In step S145, the coordinate information of the processing trajectory after the offset is calculated according to the coordinates of the trajectory points after the offset. Under the premise of knowing the coordinate information of the processing trajectory, the processing trajectory can be regarded as consisting of a number of points, or there are a number of trajectory points, and the adjacent trajectory points are connected to each other by straight lines to form a processing trajectory. Through the above method, the coordinate information of each trajectory point after the offset can be calculated to obtain the coordinate information of the processing trajectory after the offset.

[0169] See also Figure 8 , Figure 8 A flowchart of a method for correcting a machining track on another workpiece according to an embodiment of the present application is shown. The present application embodiment provides steps of a method for correcting a machining track on another workpiece, including:

[0170] Step S301, responding to the calibration instruction, calculating the rotation and translation matrix and applying it to the processing coordinate system to obtain a temporary processing coordinate system, so that the fourth straight line and the fifth straight line are respectively parallel to the temporary second axis and the temporary first axis of the temporary processing coordinate system, and the first straight line, the second straight line and the third straight line are offset as the processing coordinate system is offset;

[0171] Step S302, obtaining the coordinates of the intersection of the fourth straight line, the fifth straight line and the calibration straight line as calibration coordinates;

[0172] Step S303, responding to the correction instruction, obtaining the coordinates of the intersection of the fourth straight line, the fifth straight line and the calibration straight line as offset coordinates;

[0173] Step S304, calculating temporary coordinate information of the processing trajectory after the offset according to the calibration coordinates and the offset coordinates, as well as the temporary coordinate information of the processing trajectory;

[0174] Step S305, calculating the coordinate information of the machining trajectory after the offset according to the temporary coordinate information of the machining trajectory and the rotation and translation matrix.

[0175] The above five steps are described in detail below.

[0176] In step S301, for the case where the fourth straight line and the fifth straight line are determined in advance, such as when two perpendicular sides of the workpiece are the fourth straight line and the fifth straight line, when the workpiece is moved to the processing table, it may be impossible to make the fourth straight line and the fifth straight line perpendicular to each other on the plane of the workpiece parallel to the second number axis and the first number axis respectively.

[0177] For the above situation, first calculate the rotation and translation matrix and apply it to the processing coordinate system to obtain a temporary processing coordinate system, so that the fourth straight line and the fifth straight line are respectively parallel to the temporary second axis and the temporary first axis of the temporary processing coordinate system, and the first straight line, the second straight line, and the third straight line are offset as the processing coordinate system is offset. That is, first construct a temporary processing coordinate system so that the fourth straight line and the fifth straight line are respectively parallel to the temporary second axis and the temporary first axis of the temporary processing coordinate system. After the temporary coordinate information after the offset of the processing trajectory is calculated in the temporary processing coordinate system, the rotation and translation matrix is ​​reversely applied to the temporary coordinate information after the offset of the processing trajectory. The coordinate information after the offset of the processing trajectory can be obtained. The technical problem that the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located cannot be parallel to the second axis and the first axis respectively is perfectly solved. This makes the present application more universal.

[0178] In step S302 to step S304, the temporary coordinate information after the processing trajectory is offset can be obtained using the method described in step S141 to step S145.

[0179] In step S305, the rotation and translation matrix is ​​reversely applied to the temporary coordinate information after the machining trajectory is shifted, so that the coordinate information after the machining trajectory is shifted can be obtained.

[0180] In some embodiments, the processing trajectory can be directly set in the processing coordinate system or in other coordinate systems.

[0181] See also Fig. 9 , Fig. 9 A flowchart of transforming a machining trajectory into a machining coordinate system according to an embodiment of the present application is shown. The embodiment of the present application provides steps of transforming a machining trajectory into a machining coordinate system, including:

[0182] Step S401, if the trajectory coordinate system used by the processing trajectory is different from the processing coordinate system, then the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system is calculated;

[0183] Step S402 : converting the coordinate information of the machining trajectory into the machining coordinate system according to the rotation and translation relationship between the trajectory coordinate system and the machining coordinate system.

[0184] The above two steps are described in detail below.

[0185] In step S401 , if the trajectory coordinate system used for the processing trajectory is different from the processing coordinate system, the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system is calculated.

[0186] In step S402 , the coordinate information of the processing trajectory is converted into the processing coordinate system according to the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system.

[0187] See also Fig.10 , Fig.10 A schematic diagram of a deviation correction device for a machining track on a workpiece according to an embodiment of the present application is shown, and the deviation correction device comprises:

[0188] A generating module 510 is configured to generate calibration lines on a machining coordinate system where the workpiece is located, the calibration lines comprising a first straight line, a second straight line and a third straight line, the first straight line and the second straight line are parallel to a first axis of the machining coordinate system, and the third straight line is parallel to a second axis of the machining coordinate system;

[0189] The calibration module 520 is configured to, in response to the calibration instruction, control a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as the calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset;

[0190] The correction module 530 is configured to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates in response to the correction instruction;

[0191] The correction module 540 is configured to calculate the coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates.

[0192] The method for correcting the machining trajectory on the workpiece in the embodiment of the present application can be performed by Fig.11 The hardware device shown is implemented. Fig.11 To describe the hardware device according to the embodiment of the present application. Fig.11 The hardware device shown is only an example and should not bring any limitation to the functions and scope of application of the embodiments of the present application.

[0193] like Fig.11 As shown, the hardware device may be in the form of a general computing device. The components of the hardware device may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).

[0194] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 810 can perform the following steps: Figure 1 The steps shown in .

[0195] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .

[0196] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0197] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0198] The hardware device may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the hardware device, and / or may communicate with any device that enables the hardware device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the hardware device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the hardware device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0199] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0200] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method described in the above method embodiment.

[0201] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0202] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0203] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0204] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0205] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0206] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0207] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0208] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0209] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions applied for herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that the present application does not apply for. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.

Claims

1. A method for correcting a machining trajectory on a workpiece, characterized in that: The method comprises: Generate calibration lines on a machining coordinate system where the workpiece is located, wherein the calibration lines include a first straight line, a second straight line, and a third straight line, wherein the first straight line and the second straight line are parallel to a first axis of the machining coordinate system, and the third straight line is parallel to a second axis of the machining coordinate system; In response to the calibration instruction, a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located are controlled to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset; In response to the correction instruction, obtaining the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates; The coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset is calculated according to the calibration coordinates and the offset coordinates.

2. The method according to claim 1, characterized in that Before responding to the calibration instruction and controlling the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, the method further includes: The straight lines on which two mutually perpendicular edges of the workpiece are located are taken as the fourth straight line and the fifth straight line.

3. The method according to claim 1, characterized in that In response to the calibration instruction, controlling a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, comprising: In response to the calibration instruction, determining any straight line parallel to the second axis on the plane where the workpiece is located as a fourth straight line; On the plane where the workpiece is located, any straight line parallel to the first axis is determined as the fifth straight line.

4. The method according to claim 1, characterized in that The calibration coordinates include the coordinates of the first calibration point, the coordinates of the second calibration point, and the coordinates of the third calibration point. During the execution of the calibration instruction, the intersection points of the first straight line, the second straight line and the fourth straight line are the first calibration point and the second calibration point respectively, and the intersection point of the third straight line and the fifth straight line is the third calibration point. The offset coordinates include the first offset point coordinates, the second offset point coordinates, and the third offset point coordinates. During the execution of the correction instruction, the intersection points of the first straight line, the second straight line, and the fourth straight line are the first offset point and the second offset point, respectively, and the intersection point of the third straight line and the fifth straight line is the third offset point. Calculating coordinate information of the offset machining trajectory on the workpiece according to the calibrated coordinates and the offset coordinates, including: Determine a rotation angle of the workpiece around the third calibration point according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates; Calculating a first translation amount of the trajectory point on the first axis and the second axis as the workpiece rotates according to the rotation angle and the coordinates of the trajectory point indicating the processing trajectory; Calculate the second translation amount of the trajectory point on the first axis and the second axis as the workpiece translates according to the rotation angle, the second calibration point coordinates, the third calibration point coordinates, the second offset point coordinates, and the third offset point coordinates; Calculating the coordinates of the trajectory point after the offset according to the first translation amount and the second translation amount and the coordinates of the trajectory point; The offset coordinate information of the processing trajectory is calculated according to the offset coordinates of the trajectory points.

5. The method according to claim 4, characterized in that Determining a rotation angle of the workpiece around a third calibration point according to the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates includes: Substituting the first calibration point coordinates, the second calibration point coordinates, the first offset point coordinates, and the second offset point coordinates into the following formula to determine the rotation angle of the workpiece around the third calibration point; Wherein, θ is the rotation angle of the workpiece around the third calibration point, x A is the coordinate value of the first calibration point on the first axis, y A is the coordinate value of the first calibration point on the second axis, x A3 is the coordinate value of the first offset point on the first axis, x B is the coordinate value of the second calibration point on the first axis, y B is the coordinate value of the second calibration point on the second axis, x B3 is the coordinate value of the second offset point on the first axis.

6. The method according to claim 2, characterized in that If it is not possible to make the fourth straight line and the fifth straight line perpendicular to each other on the plane where the workpiece is located parallel to the second number axis and the first number axis respectively, the method further includes: Calculate a rotation and translation matrix and apply it to the processing coordinate system to obtain a temporary processing coordinate system, so that the fourth straight line and the fifth straight line are respectively parallel to the temporary second axis and the temporary first axis of the temporary processing coordinate system, and the first straight line, the second straight line and the third straight line are offset as the processing coordinate system is offset; Obtaining the coordinates of the intersection of the fourth straight line, the fifth straight line and the calibration straight line as calibration coordinates; In response to the deviation correction instruction, the coordinates of the intersections of the fourth straight line, the fifth straight line and the calibration straight line are obtained as offset coordinates; Calculating temporary coordinate information of the machining trajectory after the offset according to the calibration coordinates and the offset coordinates, and the temporary coordinate information of the machining trajectory; The coordinate information of the machining trajectory after the offset is calculated according to the temporary coordinate information of the machining trajectory after the offset and the rotation and translation matrix.

7. The method according to claim 1, characterized in that Before obtaining the offset coordinates in response to the correction instruction, the method further includes: If the trajectory coordinate system used by the processing trajectory is different from the processing coordinate system, the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system is calculated; According to the rotation and translation relationship between the trajectory coordinate system and the processing coordinate system, the coordinate information of the processing trajectory is converted into the processing coordinate system.

8. The method according to claim 1, characterized in that Before obtaining the offset coordinates in response to the correction instruction, the method further includes: A machining trajectory of the workpiece is determined in the machining coordinate system.

9. A device for correcting the deviation of a machining track on a workpiece, characterized in that: The device comprises: A generating module is configured to generate calibration lines on a processing coordinate system where the workpiece is located, wherein the calibration lines include a first straight line, a second straight line, and a third straight line, wherein the first straight line and the second straight line are parallel to a first axis of the processing coordinate system, and the third straight line is parallel to a second axis of the processing coordinate system; A calibration module is configured to, in response to a calibration instruction, control a fourth straight line and a fifth straight line perpendicular to each other on the plane where the workpiece is located to be parallel to the second axis and the first axis respectively, so as to obtain the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively, and use them as calibration coordinates; wherein the fourth straight line and the fifth straight line can be offset as the workpiece is offset; A correction module is configured to obtain, in response to the correction instruction, the coordinates of the intersections between the fourth straight line, the fifth straight line and the calibration straight line respectively as offset coordinates; The correction module is configured to calculate the coordinate information of the machining trajectory of the workpiece in the machining coordinate system after the offset according to the calibration coordinates and the offset coordinates.

10. A computer, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.