CN-120010391-B - Numerical control industrial processing method and device based on trajectory curve fitting
Abstract
The invention discloses a numerical control industrial processing method and a device thereof based on track curve fitting, wherein the method comprises the steps of obtaining a track to be fitted and a processing mode based on the product type of a product to be processed, and obtaining a first track coordinate of the track to be fitted; dividing a track to be fitted into a plurality of sub-line segments based on a machining mode and first track coordinates, fitting the plurality of sub-line segments to obtain a target fitted track, determining the type of the target fitted track based on second track coordinates of the target fitted track, and carrying out numerical control machining on a product to be machined based on the type of the target fitted track. The invention changes the point-to-point processing mode in the track into the processing mode from line segment to line segment in the track, thereby reducing the suspension times in the operation process of the processing cutter as much as possible, improving the integral processing efficiency, reducing the frequent start and stop times of the servo motor as much as possible, reducing the vibration problem of equipment caused by frequent start and stop, and prolonging the service life of the equipment.
Inventors
- LI XUZHENG
- ZHENG JIAN
Assignees
- 广州市鑫特自动化技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250214
Claims (8)
- 1. The numerical control industrial processing method based on the track curve fitting is characterized by comprising the following steps of: acquiring a track to be fitted and a processing mode based on the product type of a product to be processed, and acquiring a first track coordinate of the track to be fitted; Dividing the track to be fitted into a plurality of sub-line segments based on the processing mode and the first track coordinate; fitting a plurality of sub-line segments to obtain a target fitting track; determining the type of the target fitting track based on the second track coordinates of the target fitting track; performing numerical control processing on the product to be processed based on the type of the target fitting track; The machining modes comprise a first machining mode, wherein the first machining mode represents tool path planning along contour lines with the same height on a workpiece; the dividing the trajectory to be fitted into a plurality of sub-line segments based on the processing mode and the first trajectory coordinates includes: if the processing mode is the first processing mode, determining an equation line corresponding to the ordinate of a first target track coordinate point in the first track coordinate as a contour line, wherein the first target track coordinate point is any track coordinate point in the first track coordinate; Determining a vertical distance between each track coordinate point in the first track coordinates and the contour line; Dividing the track to be fitted into a plurality of sub-line segments based on Euclidean distance and vertical distance between two adjacent track coordinate points in the first track coordinate; The machining modes include a second machining mode that characterizes a tool path equidistant from a part profile; the dividing the trajectory to be fitted into a plurality of sub-line segments based on the processing mode and the first trajectory coordinates includes: If the processing mode is the second processing mode, a first track coordinate point in the first track coordinate is taken as a first reference track coordinate point, and a second target track coordinate point in the first track coordinate is determined; constructing a first sub-line segment based on the track coordinate points between the first track coordinate point and the second target track coordinate point, wherein the coordinate point distance between the second target track coordinate point and the first track coordinate point is equal to a preset interval value; And constructing a second sub-line segment based on the track coordinate points between the second target track coordinate point and the third target track coordinate point until all the track coordinate points in the first track coordinate point are constructed as sub-line segments to obtain the plurality of sub-line segments, wherein the coordinate point distance between the third target track coordinate point and the second target track coordinate point is equal to the preset distance value.
- 2. The method for numerically controlled industrial processing based on trajectory curve fitting according to claim 1, wherein said fitting the plurality of sub-line segments to obtain the target fitted trajectory comprises: Connecting the starting point coordinates of a first target sub-line segment in the sub-line segments with the two end point coordinates of a second target sub-line segment in the sub-line segments to obtain a first included angle, wherein the first target sub-line segment is a first sub-line segment in the sub-line segments, and the second target sub-line segment is any sub-line segment except the first sub-line segment in the sub-line segments; Connecting the starting point coordinates of the first target sub-line segment in the sub-line segments with the coordinates of two end points of a third target sub-line segment in the sub-line segments to obtain a second included angle, wherein the third target sub-line segment is any sub-line segment except the first sub-line segment and the second sub-line segment in the sub-line segments, and the third target sub-line segment is continuous with the second target sub-line segment and is positioned behind the second target sub-line segment; Obtaining an angle difference value based on the first included angle and the second included angle; and fitting the plurality of sub-line segments based on the angle difference value to obtain the target fitting track.
- 3. The numerical control industrial processing method based on trajectory curve fitting according to claim 2, wherein the fitting the plurality of sub-line segments based on the angle difference values to obtain the target fitted trajectory comprises: If the angle difference value is smaller than or equal to a preset threshold value, determining a first trend direction result of a current target sub-line segment and a fourth target sub-line segment and a second trend direction result of the current target sub-line segment and a fifth target sub-line segment, wherein the current target sub-line segment is any one sub-line segment except the first sub-line segment and the second sub-line segment in the plurality of sub-line segments, the fourth target sub-line segment is an adjacent sub-line segment of the current target sub-line segment, and the fifth target sub-line segment is an alternate sub-line segment of the current target sub-line segment; And if the first trend direction result is trend direction consistency and the second trend direction result is trend direction consistency, connecting the current target sub-line segment, the fourth target sub-line segment and the fifth target sub-line segment until at least one of the first trend direction result and the second trend direction result is trend direction inconsistency, stopping continuing fitting, and obtaining the target fitting track.
- 4. The method for numerical control industrial processing based on trajectory curve fitting according to claim 2, wherein connecting the coordinates of the start point of a first target sub-line segment of the plurality of sub-line segments with the coordinates of two end points of a second target sub-line segment of the plurality of sub-line segments to obtain a first included angle comprises: based on the starting point coordinates of the first target sub-line segment An ith sub-line segment of the second target sub-line segment The (i+1) th sub-line segment in the second target sub-line segment Determining the first included angle; the calculation formula of the first included angle is as follows: ; Wherein, the Expressed as coordinates of the end point of the ith sub-line segment in the second target sub-line segment and the start point in the first target sub-line segment Length between (a), Represented as the end point and the start point of the (i+1) th sub-line segment in the second target sub-line segment The length of the two-way valve is equal to the length of the two-way valve, Represented as the length of the (i+1) th sub-line segment in the second target sub-line segment.
- 5. The method of claim 1, wherein determining the type of the target-fitted trajectory based on the second trajectory coordinates of the target-fitted trajectory comprises: Obtaining a slope change result of the target fitting track based on first coordinate information, second coordinate information and third coordinate information in the second track coordinate, wherein the first coordinate information, the second coordinate information and the third coordinate information are coordinate information of different track coordinate positions in the second track coordinate; if the slope change result is a preset value, determining that the type of the target fitting track is a linear track; And if the slope change result is not the preset value, determining that the type of the target fitting track is an arc track.
- 6. Numerical control industrial processing device based on track curve fitting, characterized by comprising: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a track to be fitted and a processing mode based on the product type of a product to be processed and acquiring a first track coordinate of the track to be fitted; The first processing unit is used for dividing the track to be fitted into a plurality of sub-line segments based on the processing mode and the first track coordinates; the second processing unit is used for fitting the plurality of sub-line segments to obtain a target fitting track; The third processing unit is used for determining the type of the target fitting track based on the second track coordinates of the target fitting track; the output unit is used for carrying out numerical control processing on the product to be processed based on the type of the target fitting track; The machining modes comprise a first machining mode, wherein the first machining mode represents tool path planning along contour lines with the same height on a workpiece; the dividing the trajectory to be fitted into a plurality of sub-line segments based on the processing mode and the first trajectory coordinates includes: if the processing mode is the first processing mode, determining an equation line corresponding to the ordinate of a first target track coordinate point in the first track coordinate as a contour line, wherein the first target track coordinate point is any track coordinate point in the first track coordinate; Determining a vertical distance between each track coordinate point in the first track coordinates and the contour line; Dividing the track to be fitted into a plurality of sub-line segments based on Euclidean distance and vertical distance between two adjacent track coordinate points in the first track coordinate; The machining modes include a second machining mode that characterizes a tool path equidistant from a part profile; the dividing the trajectory to be fitted into a plurality of sub-line segments based on the processing mode and the first trajectory coordinates includes: If the processing mode is the second processing mode, a first track coordinate point in the first track coordinate is taken as a first reference track coordinate point, and a second target track coordinate point in the first track coordinate is determined; constructing a first sub-line segment based on the track coordinate points between the first track coordinate point and the second target track coordinate point, wherein the coordinate point distance between the second target track coordinate point and the first track coordinate point is equal to a preset interval value; And constructing a second sub-line segment based on the track coordinate points between the second target track coordinate point and the third target track coordinate point until all the track coordinate points in the first track coordinate point are constructed as sub-line segments to obtain the plurality of sub-line segments, wherein the coordinate point distance between the third target track coordinate point and the second target track coordinate point is equal to the preset distance value.
- 7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of a numerical control industrial process method based on trajectory curve fitting as claimed in any one of claims 1 to 5.
- 8. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of a numerical control industrial processing method based on trajectory curve fitting as claimed in any one of claims 1 to 5.
Description
Numerical control industrial processing method and device based on trajectory curve fitting Technical Field The invention relates to the technical field of numerical control industrial processing, in particular to a numerical control industrial processing method and a device based on track curve fitting. Background With the upgrade of the automation degree of industrial equipment, in order to adapt to various free shape processing, more and more industrial products are more prone to realize contour processing by using a numerical control processing method. In the numerical control machining process, a numerical control industrial controller is mainly used for controlling a machining tool to machine an industrial product along a preset track. Custom processing of CNC files is adopted in the current numerical control industrial controller processing mode to form standard. Because CNC files are generally generated by design software in the corresponding field, under the condition of controllable precision, in order to ensure that a numerical control industrial controller which cannot execute circular arcs and spline tracks at the lower end can smoothly execute the files, the tracks which are originally circular arcs, multi-section lines, splines and the like can be split into fine continuous dense sub-line segment tracks, so that the track points of the CNC processing files are very many and short. Therefore, in the point-to-point original track running of CNC machining files, the number of times of suspending running of the machining tool is increased, the machining speed is reduced, and frequent changing of the track in the machining process also causes frequent start and stop of the servo motor, so that equipment vibration is caused under the condition of frequent start and stop, and the service life of the whole equipment is influenced. Disclosure of Invention The invention aims to solve the problems in the prior art, and provides a numerical control industrial processing method and a device thereof based on track curve fitting. In order to achieve the above purpose, the present invention adopts the following technical scheme: A numerical control industrial processing method based on track curve fitting, The method comprises the following steps: acquiring a track to be fitted and a processing mode based on the product type of a product to be processed, and acquiring a first track coordinate of the track to be fitted; Dividing the track to be fitted into a plurality of sub-line segments based on the processing mode and the first track coordinate; fitting a plurality of sub-line segments to obtain a target fitting track; determining the type of the target fitting track based on the second track coordinates of the target fitting track; and carrying out numerical control processing on the product to be processed based on the type of the target fitting track. According to the numerical control industrial processing method based on track curve fitting provided by the invention, a plurality of sub-line segments are fitted to obtain a target fitting track, and the method comprises the following steps: Connecting the starting point coordinates of a first target sub-line segment in the sub-line segments with the two end point coordinates of a second target sub-line segment in the sub-line segments to obtain a first included angle, wherein the first target sub-line segment is a first sub-line segment in the sub-line segments, and the second target sub-line segment is any sub-line segment except the first sub-line segment in the sub-line segments; Connecting the starting point coordinates of the first target sub-line segment in the sub-line segments with the coordinates of two end points of a third target sub-line segment in the sub-line segments to obtain a second included angle, wherein the third target sub-line segment is any sub-line segment except the first sub-line segment and the second sub-line segment in the sub-line segments, and the third target sub-line segment is continuous with the second target sub-line segment and is positioned behind the second target sub-line segment; Obtaining an angle difference value based on the first included angle and the second included angle; and fitting the plurality of sub-line segments based on the angle difference value to obtain the target fitting track. According to the numerical control industrial processing method based on track curve fitting provided by the invention, the fitting is carried out on the plurality of sub-line segments based on the angle difference value to obtain the target fitting track, and the method comprises the following steps: If the angle difference value is smaller than or equal to a preset threshold value, determining a first trend direction result of a current target sub-line segment and a fourth target sub-line segment and a second trend direction result of the current target sub-line segment and a fifth target sub-line segment, wherein the