Part processing trajectory correction method, device, storage medium and electronic equipment
By traversing the theoretical program of the part in CNC machining, and using the measurement points to calculate the tool position offset for linear change correction, the problem of local deviation caused by shape differences is solved, and the quality and accuracy of the machining trajectory correction are improved.
Patent Information
- Application Number
- CN202410534735.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-04-30
AI Technical Summary
The existing technology cannot effectively handle the local deviation problem caused by shape differences when correcting the part processing trajectory in CNC machining, resulting in low correction quality.
By traversing the theoretical machining program of the target part, the tool position point array is obtained, and the offset of the tool position point is calculated based on the measurement point closest to the tool position point, and the linear change principle is used for correction to ensure that the overall and local corrections are consistent.
It improves the quality of part processing trajectory correction, makes the corrected contour closer to the target data, and improves the accuracy and effect of correction.
Smart Images

Figure CN118131684B
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital measurement technology, and in particular to a method, device, storage medium and electronic equipment for correcting a part machining trajectory. Background Art
[0002] Correction of machining trajectory based on measurement data is one of the important technologies in the field of CNC machining. At present, the CNC machining industry usually adopts the workflow of offline programming in CAM software, post-processing and then on-site machining. Due to problems such as clamping deviation or deformation of parts, it is necessary to correct the compiled machining trajectory. At present, the existing technology adopts an overall correction mode, taking the trajectory to be corrected as a whole, translating or rotating the trajectory as a whole based on the measurement data, and adjusting it to a posture closest to the target posture, that is, after the deviation calculation, the contour is translated, rotated and corrected as a whole, so that the corrected contour posture is closest to the target contour. Although this method has a high correction efficiency, it is necessary to ensure that the shape of the trajectory to be corrected is consistent with that of the target trajectory during the correction process, and the two are overlapped by adjusting the posture. When there is a certain shape difference between the trajectory to be corrected and the target trajectory, the trajectory cannot be effectively corrected by translation and rotation. No matter how it is adjusted, there will be a phenomenon of local trajectory deviation. While correcting part of the contour, it is often accompanied by the deviation of the contour of other positions, and then new deviations are introduced in other areas, resulting in reduced correction quality of the machining trajectory. Summary of the invention
[0003] The main purpose of the present application is to provide a method, device, storage medium and electronic device for correcting a part processing trajectory, aiming to solve the problem of low quality of correcting the processing trajectory of a part in the prior art.
[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for correcting a part machining trajectory, comprising the following steps:
[0006] Traverse the theoretical machining program of the target part and obtain the tool position point array;
[0007] According to the measurement points and the tool position point array, two target measurement points corresponding to each tool position point in the tool position point array are obtained; wherein the two target measurement points are the measurement points closest to the tool position point on the front and rear sides along the machining trajectory.
[0008] Based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part;
[0009] According to the offset of the tool position point, the theoretical machining program of the target part is corrected.
[0010] In a possible implementation of the first aspect, based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point, including:
[0011] Based on the linear change principle, the offset of the tool position point to the target direction is obtained according to the offset of the target measurement point and the distances from the machining contact point corresponding to the tool position point to the two target measurement points.
[0012] In a possible implementation of the first aspect, based on the linear change principle, before obtaining the offset of the tool position point in the target direction according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position point to the two target measurement points, the part machining trajectory correction method further includes:
[0013] The local coordinate system of the tool position point is established with the machining contact point corresponding to the tool position point as the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis;
[0014] Get the Y-axis direction of the local coordinate system of the tool position point as the target direction.
[0015] In a possible implementation of the first aspect, based on the linear change principle, before obtaining the offset of the tool position point in the target direction according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position point to the two target measurement points, the part machining trajectory correction method further includes:
[0016] Determine whether the machining contact point corresponding to the tool position point is on the line connecting the two target measurement points;
[0017] When the machining contact point corresponding to the tool position point is not on the line connecting the two target measurement points, the machining contact point corresponding to the tool position point is projected onto the line connecting the two target measurement points to obtain the machining contact projection point;
[0018] The distances from the machining contact projection point to the two target measurement points are obtained respectively as the distances from the machining contact point corresponding to the tool position point to the two target measurement points respectively.
[0019] In a possible implementation of the first aspect, obtaining two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array includes:
[0020] Establishing a first vector from the machining contact point corresponding to the tool position point to the measuring point, and calculating the angle between the second vector and the first vector and the first distance from the measuring point to the machining contact point corresponding to the tool position point; wherein the second vector is a vector established at the machining contact point corresponding to the tool position point and parallel to the tool movement direction;
[0021] When the angle is greater than or equal to 90 degrees, the measurement point corresponding to the smallest first distance is obtained as a target measurement point;
[0022] In the case where the included angle is less than 90 degrees, a measurement point corresponding to the smallest first distance is obtained as another target measurement point.
[0023] In a possible implementation of the first aspect, before obtaining two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array, the part machining trajectory correction method further includes:
[0024] The tool axis corresponding to the tool position point is offset toward the target part by the amount of tool radius in a direction perpendicular to the tool movement direction, so that the tool axis intersects with the theoretical contour line of the target part, and the intersection is obtained as the machining contact point corresponding to the tool position point.
[0025] In a possible implementation of the first aspect, based on the linear change principle, before obtaining the offset of the tool position point according to the offset of the target measurement point, the part machining trajectory correction method further includes:
[0026] The measuring points of the target part are measured based on the theoretical measurement program to obtain the measured contour line of the target part;
[0027] According to the deviation between the measured contour line and the theoretical contour line of the target part, the offset of the measuring point is obtained;
[0028] According to the measuring point corresponding to the target measuring point, the offset of the target measuring point is obtained from the offset of the measuring point.
[0029] In a second aspect, an embodiment of the present application provides a part processing trajectory correction device, comprising:
[0030] The traversal module is used to traverse the theoretical machining program of the target part and obtain the tool position point array;
[0031] The measuring point acquisition module is used to obtain two target measuring points corresponding to each tool position point in the tool position point array according to the measuring points and the tool position point array; wherein the two target measuring points are the measuring points closest to the tool position point on the front and rear sides along the machining track direction;
[0032] The offset acquisition module is used to obtain the offset of the tool position point according to the offset of the target measurement point based on the linear change principle; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part;
[0033] Correction module,The correction module is used to correct the theoretical processing program of the target part according to the offset of the tool position point.
[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, a part processing trajectory correction method as provided in any one of the first aspects above is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein:
[0036] The memory is used to store computer programs;
[0037] The processor is used to load and execute a computer program so that the electronic device executes a part processing trajectory correction method as provided in any one of the first aspects above.
[0038] Compared with the prior art, the beneficial effects of this application are:
[0039] The embodiment of the present application proposes a method, device, storage medium and electronic device for correcting a part processing trajectory. The method comprises: traversing a theoretical processing program of a target part to obtain a tool location point array; obtaining two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array; wherein the two target measurement points are respectively the measurement points closest to the tool location point on the front and rear sides of the tool location point along the processing trajectory; based on the linear change principle, obtaining an offset of the tool location point according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part; and correcting the theoretical processing program of the target part according to the offset of the tool location point. The present application traverses the theoretical machining program of the target part to obtain an array of tool location points based on the machining trajectory, and then uses the measurement points closest to the tool location points on both sides to calculate the offset of the tool location points. The offset of the measurement points is derived from the measured contour and theoretical contour of the target part as a whole. The overall deviation can be effectively used as a guide to correct a single tool location point. Different from the overall correction mode, the present application can simultaneously realize the overall and local correction of the machining trajectory, so that the corrected contour is closer to the target data, thereby improving the quality of correction of the part machining trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the structure of an electronic device of a hardware operating environment involved in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a process flow of a method for correcting a part machining trajectory provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a flow chart of a part machining trajectory correction method provided in an embodiment of the present application in one implementation manner;
[0043] Figure 4 A schematic diagram of determining a target measurement point in a part machining trajectory correction method provided in an embodiment of the present application;
[0044] Figure 5 A schematic diagram of the offset of the tool position in the part machining trajectory correction method provided in an embodiment of the present application;
[0045] Figure 6 A schematic diagram of correcting a machining trajectory in a part machining trajectory correction method provided in an embodiment of the present application;
[0046] Figure 7 A schematic diagram of a module of a part machining trajectory correction device provided in an embodiment of the present application;
[0047] Markings in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory. DETAILED DESCRIPTION
[0048] 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] The main solution of the embodiment of the present application is: traverse the theoretical processing program of the target part to obtain the tool location point array; obtain two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array; wherein the two target measurement points are respectively the measurement points closest to the tool location point on the front and rear sides along the processing trajectory; based on the linear change principle, obtain the offset of the tool location point according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part; according to the offset of the tool location point, correct the theoretical processing program of the target part.
[0050] Correction of machining trajectory based on measurement data is one of the important technologies in the field of CNC machining. At present, the CNC machining industry usually adopts the workflow of offline programming in CAM software, post-processing and then on-site machining. During offline programming, a machining coordinate system is established on the theoretical model, and a theoretical program is compiled based on the machining coordinate system. During on-site machining, due to problems such as part clamping deviation and part deformation, it is necessary to first measure the parts to be processed, and then correct the machining trajectory based on the measurement data, and then carry out part processing based on the corrected trajectory.
[0051] At present, the correction of machining trajectory based on measurement data mostly adopts the method of coordinate system correction, that is, by measuring the positioning references such as faces and holes on parts or tooling through the on-machine detection device, and then establishing the transformation matrix of the machining coordinate system in the machine tool coordinate system, the machining trajectory of the part is adjusted by the method of overall translation and rotation, so that it can successfully complete the part processing. This method can complete the detection of parts and the correction of machining trajectory relatively quickly, but it requires parts or tooling to have clear and accurate positioning references. For some parts with complex surfaces or contours and no clear positioning references, it is impossible to complete the detection of part status and trajectory correction. In response to the above problems, some correction methods cancel the detection of positioning references, start directly from the measured data such as part contours, fit the part status through the measured data of parts, and complete the correction of machining trajectory in combination with theoretical programs.
[0052] For example, patent document CN113977359A discloses a method for correcting tool paths for hollow fan blade profile grinding and polishing based on wall thickness constraints. The measured thickness of each position of the hollow fan blade is used as a constraint, and an error model is established in combination with the theoretical thickness in the theoretical model, which is then used to correct the tool path. Compared with conventional methods, this method changes the source of detection data, but its correction method still uses the traditional overall translation and rotation of the machining trajectory for correction. If there is a deviation between the measured part contour and the theoretical model contour, it cannot be corrected locally.
[0053] For example, patent document CN111125839A discloses a tool path correction method for turbine blade tip damage repair processing, which corrects the theoretical blade tip processing program based on the contour measurement data near the position to be repaired of the turbine blade. This method also uses the overall translation and rotation of the processing trajectory to achieve trajectory correction, which is not suitable for working conditions that require local correction or uneven correction amounts of each part.
[0054] To this end, the present application provides a solution, which traverses the theoretical machining program of the target part to obtain an array of tool location points based on the machining trajectory, and then uses the measurement points closest to the tool location points on both sides to calculate the offset of the tool location points. The offset of the measurement point is derived from the measured contour and theoretical contour of the target part as a whole. The overall deviation is effectively used as a guide to correct a single tool location point. Different from the overall correction mode, the present application can simultaneously realize the overall and local correction of the machining trajectory, so that the corrected contour is closer to the measured data, thereby improving the quality of correction of the part machining trajectory.
[0055] See attached Figure 1 , attached Figure 1This is a schematic diagram of the structure of an electronic device of the hardware operating environment involved in the embodiment of the present application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display (Display), an input unit such as a keyboard (Keyboard), and the user interface 104 may also include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 105 may optionally be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) memory, or it may be a stable non-volatile memory (NVM), such as at least one disk storage. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or it may be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
[0056] Those skilled in the art will appreciate that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0057] As attached Figure 1 As shown, the memory 105 as a storage medium may include an operating system, a network communication module, a user interface module, and a part processing trajectory correction device.
[0058] In the attached Figure 1 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in the present application can be set in the electronic device, and the electronic device calls the part processing trajectory correction device stored in the memory 105 through the processor 101, and executes the part processing trajectory correction method provided in the embodiment of the present application.
[0059] See attached Figure 2 Based on the hardware device of the aforementioned embodiment, the embodiment of the present application provides a method for correcting a part machining trajectory, comprising the following steps:
[0060] S10: Traverse the theoretical machining program of the target part to obtain the tool position point array.
[0061] In the specific implementation process, the target parts, such as aircraft parts, the theoretical processing program of the target parts is compiled according to the theoretical model of the target parts. In the absence of deviation, the processing trajectory according to the theoretical processing program should be the ideal trajectory. Traversing the processing program actually moves along the trajectory route, and extracts the tool position points corresponding to each processing position, and establishes an array to store all tool position point information, that is, the tool position point array.
[0062] S20: According to the measurement points and the tool position point array, two target measurement points corresponding to each tool position point in the tool position point array are obtained; wherein the two target measurement points are respectively the measurement points closest to the tool position point on the front and rear sides along the machining trajectory.
[0063] In the specific implementation process, it is necessary to determine the offset of each tool position point in the tool position point array, and the basis for determination comes from the two closest measurement points and their offset values. Select the closest measurement point on both sides of the tool position point in the machining trajectory direction as the target measurement point. Specifically, according to the measurement point and the tool position point array, obtain the two target measurement points corresponding to each tool position point in the tool position point array, including:
[0064] Establishing a first vector from the machining contact point corresponding to the tool position point to the measuring point, and calculating the angle between the second vector and the first vector and the first distance from the measuring point to the machining contact point corresponding to the tool position point; wherein the second vector is a vector established at the machining contact point corresponding to the tool position point and parallel to the tool movement direction;
[0065] When the angle is greater than or equal to 90 degrees, the measurement point corresponding to the smallest first distance is obtained as a target measurement point;
[0066] In the case where the included angle is less than 90 degrees, a measurement point corresponding to the smallest first distance is obtained as another target measurement point.
[0067] In the specific implementation process, the above implementation method takes the second vector as the object, obtains the angle between each first vector and the second vector, and the size of the angle relative to 90 degrees can be regarded as different measurement points on both sides of the processing point. In the combination of angles less than 90 degrees and greater than or equal to 90 degrees, the measurement point corresponding to the smallest first distance is obtained, which is regarded as the measurement point closest to the tool position point on both sides, that is, the target measurement point. The processing contact point is the contact point between the tool and the part. For example, in cutting processing, the processing contact point is the cutting contact point. The processing contact point is obtained by offsetting the tool axis. Specifically:
[0068] Before obtaining two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array, the part machining trajectory correction method further includes:
[0069] The tool axis corresponding to the tool position point is offset toward the target part by the amount of tool radius in a direction perpendicular to the tool movement direction, so that the tool axis intersects with the theoretical contour line of the target part, and the intersection is obtained as the machining contact point corresponding to the tool position point.
[0070] In the specific implementation process, the tool axis corresponding to the tool position point is offset in the direction perpendicular to the tool movement direction and to the side where the part is located. The offset amount is the radius of the tool. After the offset, the tool axis intersects with the theoretical contour line of the part, and the intersection point is the machining contact point.
[0071] S30: Based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part.
[0072] In the specific implementation process, the linear change principle means that for vectors or scalars, after linear transformation, the relationship between them remains unchanged. It can be understood that when the deviation of the two measurement points before and after satisfies a certain linear change, then the deviation of any point in between should also conform to the linear change, which is called the linear change principle. Therefore, the offset of the tool position point in the middle can be calculated. The offset of the target measurement point is actually the deviation between the actual value and the theoretical value of the part, that is: based on the linear change principle, according to the offset of the target measurement point, before obtaining the offset of the tool position point, the part processing trajectory correction method also includes:
[0073] The measuring points of the target part are measured based on the theoretical measurement program to obtain the measured contour line of the target part;
[0074] According to the deviation between the measured contour line and the theoretical contour line of the target part, the offset of the measuring point is obtained;
[0075] According to the measuring point corresponding to the target measuring point, the offset of the target measuring point is obtained from the offset of the measuring point.
[0076] In the specific implementation process, for the target parts, based on professional measuring equipment such as three-dimensional coordinate measuring machines and the compiled theoretical measurement program, the measured contour data of the parts are obtained, and data for storing the theoretical contour and measured contour data of the parts can be established. Each set of data in the array includes the spatial position information of the theoretical measurement point and the actual measurement point, as well as the deviation between the theoretical point and the actual measurement point, that is, the offset of the measurement point. After these are acquired and stored in advance, the corresponding measurement point can be queried after the target measurement point is acquired, and then its offset can be called as the offset of the target measurement point.
[0077] Specifically, based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point, including:
[0078] Based on the linear change principle, the offset of the tool position point to the target direction is obtained according to the offset of the target measurement point and the distances from the machining contact point corresponding to the tool position point to the two target measurement points.
[0079] In the specific implementation process, in conjunction with the calculation of the linear change principle, the distance from the processing contact point to the target measurement point is introduced as the basis for ensuring that the relationship remains unchanged after the linear transformation, and further obtaining the accurate offset situation, that is, the offset amount and offset direction. The target direction, that is, the offset direction, is obtained based on the local coordinate system, specifically:
[0080] Based on the linear change principle, according to the offset of the target measurement point and the distances from the machining contact point corresponding to the tool position point to the two target measurement points, before obtaining the offset of the tool position point in the target direction, the part machining trajectory correction method also includes:
[0081] The local coordinate system of the tool position point is established with the machining contact point corresponding to the tool position point as the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis;
[0082] Get the Y-axis direction of the local coordinate system of the tool position point as the target direction.
[0083] In the specific implementation process, after the local coordinate system of the tool position point is established with the machining contact point corresponding to the tool position point as the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis, the coordinate axis establishment characteristics of the coordinate system can determine the unique Y-axis direction according to the positions of other axes, and the Y-axis direction is the offset direction of the tool position point.
[0084] Based on the linear change principle, according to the offset of the target measurement point and the distances from the machining contact point corresponding to the tool position point to the two target measurement points, before obtaining the offset of the tool position point in the target direction, the part machining trajectory correction method also includes:
[0085] Determine whether the machining contact point corresponding to the tool position point is on the line connecting the two target measurement points;
[0086] When the machining contact point corresponding to the tool position point is not on the line connecting the two target measurement points, the machining contact point corresponding to the tool position point is projected onto the line connecting the two target measurement points to obtain the machining contact projection point;
[0087] The distances from the machining contact projection point to the two target measurement points are obtained respectively as the distances from the machining contact point corresponding to the tool position point to the two target measurement points respectively.
[0088] In the specific implementation process, since the offset direction from the tool position point to the machining contact point is the same as the offset direction from the machining contact point to the actual machining contact point, and the machining contact point is obtained by offsetting the tool position point, the offset also represents the offset of the tool position point. Connect the target measurement points, based on the machining contact point, and there are two situations in which its position relative to the two target measurement points is located on the connection line and not on the connection line.
[0089] When the machining contact point corresponding to the tool locus is on the line connecting the two target measurement points, the distances from the machining contact point to the two target measurement points can be directly obtained. When the machining contact point corresponding to the tool locus is not on the line connecting the two target measurement points, the machining contact point is projected onto the line, and then the distances from the projection point to the two target measurement points are obtained as the distances from the machining contact point corresponding to the tool locus to the two target measurement points.
[0090] S40: According to the offset of the tool position point, the theoretical processing program of the target part is corrected.
[0091] In the specific implementation process, after the offset of all tool position points in the tool point array are obtained, the deviation of a single tool position point can be obtained, and then the local area to be corrected is determined according to the deviation, and the relevant tool position points are corrected accordingly. The theoretical processing program of the part is modified, and the actual processing program is obtained, which can be used for the processing of the target part.
[0092] In this embodiment, the theoretical machining program of the target part is traversed to obtain an array of tool location points based on the machining trajectory, and then the offset of the tool location point is calculated using the measurement points closest to both sides of the tool location point, and the offset of the measurement point is derived from the measured contour and theoretical contour of the target part as a whole. The overall deviation is effectively used as a guide to correct a single tool location point. Different from the overall correction mode, the present application can simultaneously realize the overall and local correction of the machining trajectory, so that the corrected contour is closer to the measured data, thereby improving the quality of correction of the part machining trajectory.
[0093] Refer to the attached Figure 3 , as attached Figure 3 The present application is further described below in the following embodiments:
[0094] First, the measurement point deviation is calculated based on the theoretical model and measured data; Figure 6As shown in the figure, numbers 1, 2, 3, 4, and 5 represent theoretical measurement points P1, P2, P3, P4, and P5, respectively; numbers 6, 7, 8, 9, and 10 represent actual measurement points P1ˊ, P2ˊ, P3ˊ, P4ˊ, and P5ˊ, respectively; numbers 11, 12, 13, 14, and 15 represent theoretical cutting contact points Q1ˊ, Q2ˊ, Q3ˊ, Q4ˊ, and Q5ˊ, respectively; numbers 16, 17, 18, 19, and 20 represent actual cutting contact points Q1〞, Q2〞, Q3〞, Q4〞, and Q5〞, respectively. Based on the theoretical contour, the theoretical measurement points are planned. (i=1-n, n is a positive integer), based on the theoretical measurement program, the actual contour is measured to obtain the actual measurement point , calculate the deviation value of each group of measurement points separately:
[0095] (i=1-n, n is a positive integer);
[0096] Create an array A to store part profile measurement data n .
[0097] Compile theoretical machining programs based on the model.
[0098] Secondly, traverse the tool position points in the machining program and generate a tool position point storage array; traverse all tool position points in the theoretical machining program (i=1-m, m is a positive integer), create an array B to store all tool position information m . B m Each set of data corresponds to a knife point (j=1-m, m is a positive integer), which stores the spatial position of the tool position point and the tool vector direction data.
[0099] According to the order of the machining trajectory, traverse from the first tool position point to the last tool position point to determine whether all tool position point data have been obtained. Therefore, it is necessary to determine whether the current tool position point is the last one.
[0100] Then, if the current tool position is not the last tool position, determine the two closest measurement points and their offset values to the current tool position; for array B m The tool position point in the figure is shown in the attached figure. Figure 4 As shown; based on the knife point For example, the tool axis is offset by the tool radius R in the vertical direction of the tool movement so that it intersects with the theoretical contour line to obtain the cutting contact point (theoretical cutting contact point), that is, the machining contact point. . Draw the first vector ,calculate Angle α with the tool movement direction ji and The length lji , in α ji ≥90°, select l ji The smallest measurement point is calculated as P i , in α ji If the angle is less than 90°, select l ji The smallest measurement point is calculated as P i+1 , in array A n Extraction and P i and P i+1 The corresponding deviation value d i and d i+1 The tool movement direction is expressed by the second vector, that is, a vector parallel to the tool movement direction is established. The second vector .
[0101] The current tool position offset is calculated based on the linear change principle; , calculate its offset to correct the tool position point for contour machining, as shown in the attached Figure 5 As shown, attached Figure 5 Taking five sets of data as an example, first determine the tool position offset direction, and then cut the contact point As the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis, the tool position point local coordinate system is established, and the tool position point offset direction is determined as the Y-axis direction of the local coordinate system; then the offset distance is determined, and the offset distance of the tool position point is calculated based on the deviation data of the two measurement points before and after using the linear change principle. and Distributed in On both sides, the corresponding deviations are and , cutting contact point To the measuring point The distance is l ji , to the measuring point The distance is l ji+1 , based on the principle of linear change, the cutting contact point The corresponding bias D j It can be calculated as:
[0102]
[0103] Cutting contact point Offset distance D along the Y-axis direction of the local coordinate system of the tool position point j , the actual cutting contact point during processing can be obtained .
[0104] Furthermore, due to the knife point To cutting contact point The offset direction and cutting contact point To the actual cutting contact point The offset direction is the same, and the cutting contact point By knife point The offset fixed value (tool radius R) is obtained, so the offset distance D j Also means knife point The offset amount.
[0105] Furthermore, the cutting contact point With measuring point , The distance l ji and l ji+1 There are two situations:
[0106] ① When the cutting contact point At the measuring point and When the connection line is ji and l ji+1 Cutting contact points To the measuring point and distance;
[0107] ② When the cutting contact point Not at measuring point and When the cutting contact point is on the line Projection to measurement point and On the connection line, l ji and l ji+1 Cutting contact points Projection point to measurement point and distance.
[0108] Finally, the offset is calculated for each tool position in the tool position array, that is, the tool position storage array, until the last tool position is calculated in the order of the machining trajectory, and the offset of all tool positions is obtained as the tool position offset result, and then the theoretical machining program is modified.
[0109] Refer to the attached Figure 7 Based on the same inventive concept as in the above-mentioned embodiment, the embodiment of the present application further provides a part processing trajectory correction device, comprising:
[0110] The traversal module is used to traverse the theoretical machining program of the target part and obtain the tool position point array;
[0111] The measuring point acquisition module is used to obtain two target measuring points corresponding to each tool position point in the tool position point array according to the measuring points and the tool position point array; wherein the two target measuring points are the measuring points closest to the tool position point on the front and rear sides along the machining track direction;
[0112] The offset acquisition module is used to obtain the offset of the tool position point according to the offset of the target measurement point based on the linear change principle; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part;
[0113] Correction module,The correction module is used to correct the theoretical processing program of the target part according to the offset of the tool position point.
[0114] Those skilled in the art should understand that the division of the various modules in the embodiment is merely a division of logical functions, and in actual application, all or part of them can be integrated into one or more actual carriers, and these modules can all be implemented in the form of software called through a processing unit, or all in the form of hardware, or in the form of a combination of software and hardware. It should be noted that each module in the part processing trajectory correction device in this embodiment corresponds one-to-one to each step in the part processing trajectory correction method in the aforementioned embodiment. Therefore, the specific implementation method of this embodiment can refer to the implementation method of the aforementioned part processing trajectory correction method, which will not be repeated here.
[0115] Based on the same inventive concept as in the aforementioned embodiment, an embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, a part processing trajectory correction method as provided in the embodiment of the present application is implemented.
[0116] Based on the same inventive concept as in the above-mentioned embodiment, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein:
[0117] The memory is used to store computer programs;
[0118] The processor is used to load and execute a computer program so that the electronic device executes the part processing trajectory correction method provided in the embodiment of the present application.
[0119] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0120] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0121] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0122] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0126] In summary, the present application provides a method, device, storage medium and electronic device for correcting a part processing trajectory, the method comprising: traversing the theoretical processing program of the target part to obtain a tool position point array; obtaining two target measurement points corresponding to each tool position point in the tool position point array according to the measurement points and the tool position point array; wherein the two target measurement points are respectively the measurement points closest to the tool position point on the front and rear sides along the processing trajectory direction; based on the principle of linear change, obtaining the offset of the tool position point according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part; and correcting the theoretical processing program of the target part according to the offset of the tool position point. The present application traverses the theoretical machining program of the target part to obtain an array of tool location points based on the machining trajectory, and then uses the measurement points closest to the tool location points on both sides to calculate the offset of the tool location points. The offset of the measurement points is derived from the measured contour and theoretical contour of the target part as a whole. The overall deviation is effectively used as a guide to correct a single tool location point. Different from the overall correction mode, the present application can simultaneously realize the overall and local correction of the machining trajectory, so that the corrected contour is closer to the measured data, thereby improving the quality of correction of the part machining trajectory.
[0127] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for correcting a part machining trajectory, characterized in that: The following steps are involved: Traverse the theoretical machining program of the target part and obtain the tool position point array; According to the measuring points and the tool position point array, two target measuring points corresponding to each tool position point in the tool position point array are obtained; wherein the two target measuring points are respectively the measuring points closest to the tool position point on the front and rear sides of the tool position point along the machining track direction; Based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part, and the method based on the linear change principle, the offset of the tool position point is obtained according to the offset of the target measurement point, including: Based on the linear change principle, according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the offset of the tool position point in the target direction is obtained; Before obtaining the offset of the tool position point in the target direction based on the linear change principle and according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the part machining trajectory correction method further includes: A local coordinate system of the tool position point is established with the machining contact point corresponding to the tool position point as the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis; Obtaining the Y-axis direction of the local coordinate system of the tool position point as the target direction; Before obtaining the offset of the tool position point in the target direction based on the linear change principle and according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the part machining trajectory correction method further includes: Determine whether the machining contact point corresponding to the tool position point is on the line connecting the two target measurement points; When the machining contact point corresponding to the tool position point is not on the line connecting the two target measurement points, projecting the machining contact point corresponding to the tool position point onto the line connecting the two target measurement points to obtain a machining contact projection point; respectively obtaining the distances from the machining contact projection point to the two target measurement points as the distances from the machining contact point corresponding to the tool position point to the two target measurement points; According to the offset of the tool position point, the theoretical machining program of the target part is corrected.
2. The part processing trajectory correction method according to claim 1 is characterized in that: The step of obtaining two target measurement points corresponding to each tool locus in the tool locus array according to the measurement points and the tool locus array comprises: Establishing a first vector from the machining contact point corresponding to the tool position point to the measuring point, and calculating an angle between a second vector and the first vector and a first distance from the measuring point to the machining contact point corresponding to the tool position point; wherein the second vector is a vector established at the machining contact point corresponding to the tool position point and parallel to the tool movement direction; In the case where the angle is greater than or equal to 90 degrees, obtaining the measurement point corresponding to the smallest first distance as the target measurement point; In the case where the angle is less than 90 degrees, the measurement point corresponding to the smallest first distance is obtained as another target measurement point.
3. The part processing trajectory correction method according to any one of claims 1-2, characterized in that: Before obtaining two target measurement points corresponding to each tool location point in the tool location point array according to the measurement points and the tool location point array, the part machining trajectory correction method further includes: The tool axis corresponding to the tool position point is offset by the tool radius toward the side where the target part is located in a direction perpendicular to the tool movement direction, so that the tool axis intersects with the theoretical contour line of the target part, and the intersection is obtained as the machining contact point corresponding to the tool position point.
4. The part processing trajectory correction method according to claim 1 is characterized in that: Before obtaining the offset of the tool position point based on the linear change principle and according to the offset of the target measurement point, the part machining trajectory correction method further includes: Measuring the measuring points of the target part based on a theoretical measurement program to obtain a measured contour line of the target part; Obtaining an offset of the measuring point according to a deviation between a measured contour line of the target part and a theoretical contour line; According to the measuring point corresponding to the target measuring point, an offset amount of the target measuring point is obtained from the offset amounts of the measuring point.
5. A part processing trajectory correction device, characterized in that: include: A traversal module, wherein the traversal module is used to traverse the theoretical machining program of the target part to obtain a tool position point array; A measuring point acquisition module, the measuring point acquisition module is used to obtain two target measuring points corresponding to each tool position point in the tool position point array according to the measuring points and the tool position point array; wherein the two target measuring points are respectively the measuring points closest to the tool position point on the front and rear sides of the tool position point along the machining track direction; An offset acquisition module, the offset acquisition module is used to obtain the offset of the tool position point according to the offset of the target measurement point based on the linear change principle; wherein the offset of the target measurement point is obtained according to the measured contour line and the theoretical contour line of the target part, and the offset of the tool position point is obtained according to the offset of the target measurement point based on the linear change principle, including: Based on the linear change principle, according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the offset of the tool position point in the target direction is obtained; Before obtaining the offset of the tool position point toward the target direction based on the linear change principle and according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the method further includes: A local coordinate system of the tool position point is established with the machining contact point corresponding to the tool position point as the origin, the tool movement direction as the X-axis, and the tool axis direction as the Z-axis; Obtaining the Y-axis direction of the local coordinate system of the tool position point as the target direction; Before obtaining the offset of the tool position point toward the target direction based on the linear change principle and according to the offset of the target measurement point and the distances from the machining contact points corresponding to the tool position points to the two target measurement points, the method further includes: Determine whether the machining contact point corresponding to the tool position point is on the line connecting the two target measurement points; When the machining contact point corresponding to the tool position point is not on the line connecting the two target measurement points, projecting the machining contact point corresponding to the tool position point onto the line connecting the two target measurement points to obtain a machining contact projection point; respectively obtaining the distances from the machining contact projection point to the two target measurement points as the distances from the machining contact point corresponding to the tool position point to the two target measurement points; A correction module is used to correct the theoretical processing program of the target part according to the offset of the tool position point.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is loaded and executed by the processor, the part processing trajectory correction method according to any one of claims 1 to 4 is implemented.
7. An electronic device, characterized in that: comprising a processor and a memory, wherein: The memory is used to store computer programs; The processor is used to load and execute the computer program so that the electronic device executes the part processing trajectory correction method according to any one of claims 1 to 4.
