US20260115862A1
2026-04-30
19/156,404
2025-01-15
Smart Summary: An off-line programming method allows for efficient preparation of CNC machines used for rough machining and grinding. First, a 3D model of the product is imported into specialized software, where users can set up necessary details like coordinate systems and tool paths. Next, the software simplifies the tool path data and adjusts it for better accuracy. The method also includes simulating the tool's operation to check for any potential collisions. Finally, it generates a standard NC program for the CNC machine, improving the efficiency of programming complex products. π TL;DR
Provided is an off-line programming method for full 6-axis CNC rough machining and grinding equipment, which includes: importing a three-dimensional model of a product into CAM software, interactively setting information, such as a workpiece coordinate system and a tool coordinate system, selecting a required tool path, and generating trajectory data; importing the three-dimensional model and the trajectory data into off-line programming software, and simplifying the trajectory data; implementing an overall offset function, a single-point offset function and posture adjustment for the trajectory data in the tool coordinate system; implementing the simulated operation of a tool and collision detection; generating, according to the trajectory data and tool data, an NC program conforming to a program standard; creating, by the 6-axis equipment, a workpiece coordinate system on the product; and monitoring an operating state. The provided solves the problems of low programming efficiency for grinding complex-structured products.
Get notified when new applications in this technology area are published.
B24B51/00 » CPC main
Arrangements for automatic control of a series of individual steps in grinding a workpiece
This application is the national phase entry of International Application No. PCT/CN2025/072543, filed on Jan. 15, 2025, which is based upon and claims priority to Chinese Patent Application No. 202410060743.1, filed on Jan. 16, 2024, the entire contents of which are incorporated herein by reference.
The present disclosure relates to the technical field of casting, and in particular, to an off-line programming method for full 6-axis CNC rough machining and grinding equipment.
Casting is an important basic process in the mechanical industry, and it is essential to the development of the equipment manufacturing industry, the automobile industry, the rail transit industry and the aerospace industry. However, due to the constraints of production equipment and process, and in order to meet the requirements of product appearance and surface quality, deburring and surface grinding have become one of the inevitable operations in the subsequent machining of casting products. Traditional cleaning and grinding operations mainly rely on manual work, which involves high labor intensity, harsh working environment, and long-term exposure that can easily lead to occupational health hazards. These operations also pose serious safety risks. Moreover, the quality of the finished product depends heavily on the skill level of workers, making it difficult to ensure quality consistency. Currently, the grinding equipment on the market is inefficient for programming and debugging when grinding complex-structured products, and mainly relies on manual point-to-point teaching programming. In addition, using traditional CAM software often results in excessive machining trajectory data points, leading to oversized program files that are cumbersome to read. When path adjustments are needed for products in subsequent running, effective location and modification are difficult. There is also a notable discrepancy between a model-generated path and an actual running path of equipment.
Based on the aforementioned technical problems, the applicant proposes a technical solution of the present application.
In view of the aforementioned defects in the existing technology, the present disclosure provides an off-line programming method for full 6-axis CNC rough machining and grinding equipment, which solves the problem of low programming efficiency for grinding complex-structured products, excessive trajectory data exported by CAM software which makes subsequent reading, modification and location time-consuming, and a discrepancy between a model-generated path and an actual running path of the equipment. This method effectively reduces the number of trajectory data points by half and shortens the debugging time for a new product by half without compromising the machining or grinding effect.
In order to achieve the aforementioned objective, the present disclosure discloses an off-line programming method for full 6-axis CNC rough machining and grinding equipment, which includes the following steps:
Preferably, the simplifying, by the fitting algorithm, the trajectory data includes:
Preferably, the control of inner and outer thresholds set in the feeding direction of the tool includes:
Preferably, when the required tool path is a plain milling path, the inner and outer thresholds are set to 50% to 60% of the radius length of the tool; when the required tool path is a side milling path and the path plane is parallel to the tool direction, the inner and outer thresholds are set to 50% to 60% of the edge length; and when the required tool path is a side milling path and the path plane is perpendicular to the tool direction, the inner and outer thresholds are set to an allowable residual error value for grinding.
Preferably, the control of a threshold for a relative angle change between a normal direction and the feeding direction of the tool includes:
Preferably, the least square method is adopted to control errors during straight line fitting and the spatial arc fitting, and the short line segments are changed into long straight lines or spatial arc segments.
Preferably, the CAM software specifically refers to MasterCam software, and the trajectory data is an NCI file exported from the MasterCam software.
Preferably, the equipment, the tool, the product and the program file are loaded into the off-line programming software before the simulated operation of the tool is implemented.
Preferably, the method is applied to the full 6-axis CNC rough machining equipment which includes a machine tool mounted on a base, where the machine tool is provided with linear motion axes, rotational motion axes, a rotary cutterhead, and a workpiece mounting chuck, the linear motion axes include an X axis, a Y axis, and a Z axis, the rotational motion axes include an A axis, a B axis, and a C axis, the X axis is located on the machine tool, the Y axis is located on the base, the Z axis is located in front of the X axis, the A axis is located above the Y axis, the B axis is located in front of the Z axis, the C axis is located below the A axis, the workpiece mounting chuck is located on the C axis, and the rotary cutterhead is located on the B axis.
Preferably, the X axis is provided with an X axis lead screw, and an X axis motor is arranged at an end of the X axis lead screw; the Y axis is provided with a Y axis lead screw, and a Y axis motor is arranged at an end of the Y axis lead screw; and the Z axis is provided with a Z axis lead screw, and a Z axis motor is arranged at an end of the Z axis lead screw.
Compared with the existing technology, the present disclosure has the following advantages:
In order to fully understand the purpose, features and effects of the present disclosure, the concept, specific structure and produced technical effects of the present disclosure will be further described with reference to the drawings.
FIG. 1 is a schematic flowchart of an off-line programming method for full 6-axis CNC rough machining and grinding equipment according to the present disclosure.
FIG. 2 is a schematic front structural diagram of full 6-axis CNC rough machining and grinding equipment used in the method according to the present disclosure.
FIG. 3 is a schematic side structural diagram of full 6-axis CNC rough machining and grinding equipment used in the method according to the present disclosure.
FIG. 4 is a schematic diagram of kinematic forward and inverse solution transformations employed in the method according to the present disclosure.
To facilitate the understanding of the technical means, creative features, objectives and effects achieved by the present disclosure, the present disclosure will be further elaborated below with reference to accompanying drawings. However, the present disclosure is not limited to the following examples presented below.
It should be noted that the structure, scale, size and so on depicted in the accompanying drawings of the present specification are merely intended to match the content disclosed in the present specification for understanding and reading by those familiar with the art rather than to define conditions implemented by the present disclosure, and therefore do not have substantive technical significance. Any modification to the structure, changes in scale relationships or adjustments in size shall fall within the scope covered by the technical content disclosed in the present disclosure without affecting the effect and objective achieved by the present disclosure.
The invention discloses an off-line programming method for full 6-axis CNC rough machining and grinding equipment, which includes the following steps:
At Step S1, a three-dimensional model of a product is imported into CAM software, information, such as a workpiece coordinate system and a tool coordinate system, is interactively set, a required tool path is selected, and trajectory data is generated.
Specifically, the three-dimensional model of the product is imported into the CAM software, and information, such as the workpiece coordinate system (WorkCoord) and the tool coordinate system (ToolCoord), is interactively set, the required tool path is selected, trajectory data (PathList) is generated. Thus, the method can make use of the editing advantage of CAM without being limited to certain CAM software, and can support trajectory data exported by various CAM software. The CAM software described in the present embodiment specifically refers to MasterCam software, and the trajectory data is an NCI file exported from the MasterCam software.
At Step S2, the three-dimensional model and the trajectory data are imported into off-line programming software, and the trajectory data is simplified by a fitting algorithm.
Specifically, the simplifying, by the fitting algorithm, the trajectory data includes the following steps:
At Step 2.1, field analysis is performed on the trajectory data, field data is extracted, and coordinate transformation is performed to obtain trajectory segment information in the workpiece coordinate system, where the field data at least includes instruction mode, points, coordinates, normal vector, and velocity.
Specifically, field analysis is performed on the trajectory data produced by the CAM software, and the field data (instruction mode, points, coordinates, normal vector, velocity, tool, etc.) are extracted, coordinate transformation is performed to obtain the trajectory segment information (fast, straight line, arc, etc.) in the specified workpiece coordinate system, and the trajectory segment information and process information are automatically converted into a standard G code instruction file, enabling visualization and editing operations (including creating, modifying, deleting, copying and pasting instructions) of the G code instruction file and the path, as well as supporting file import and export functions.
At Step 2.2, a curvature value of each point is calculated according to the trajectory segment information, abnormal points are deleted according to a threshold judgment result of the curvature value of each point, and the curvature values of normal points are kept.
Specifically, the curvature value of each point is calculated using continuous discrete points. For example, if the coordinates of three discrete points are: (x1, y1), (x2, y2), (x3, y3), the curvature value of the point with coordinates (x2, y2) is calculated as follows:
Assuming that a curve parameter t is given, there is
{ x = a 1 + a 2 β’ t + a 3 β’ t 2 y = b 1 + b 2 β’ t + b 3 β’ t 2
where x represents an x-axis coordinate value of a curve obtained through quadratic polynomial fitting according to values of x1, x2, x3 in the three discrete points, y represents a y-axis coordinate value of a curve obtained through quadratic polynomial fitting according to values of y1, y2, y3 in the three discrete points, a1, a2 and a3 represent the parameters used for quadratic polynomial fitting of the x-axis coordinate respectively, and b1, b2 and b3 represent the parameters used for quadratic polynomial fitting of the y-axis coordinate respectively.
There is:
t a = ( x 2 - x 1 ) 2 + ( y 2 - y 1 ) 2 β’ t b = ( x 3 - x 2 ) 2 + ( y 3 - y 2 ) 2
where ta represents a distance between the two points (x1, y1), (x2, y2), and to represents a distance between the two points (x2, y2), (x3, y3).
If the following conditions are met:
( x , y ) | β t = - t a = ( x 1 , y 1 ) β’ ( x , y ) | β t = 0 = ( x 2 , y 2 ) β’ ( x , y ) | β t = t b = ( x 3 , y 3 )
then there is:
( x 1 x 2 x 3 ) = ( 1 - t a t a 2 1 0 0 1 t b t b 2 ) β’ ( a 1 a 2 a 3 ) β’ ( y 1 y 2 y 3 ) = ( 1 - t a t a 2 1 0 0 1 t b t b 2 ) β’ ( b 1 b 2 b 3 )
Therefore, (a1, a2, a3) and (b1, b2, b3) can be obtained by solving the inverse matrices, so the curvature value k at the point (x2, y2) is:
ΞΊ = x β³ β’ y β² - x β² β’ y β³ ( ( x β² ) 2 + ( y β² ) 2 ) 3 / 2 = 2 β’ ( a 3 β’ b 2 - a 2 β’ b 3 ) ( a 2 2 + b 2 2 ) 3 / 2
After the curvature value of each point is calculated according to the aforementioned method, a reasonable curvature threshold range is set according to an actual condition to identify abnormal points, points with the curvature value exceeding the curvature threshold range are regarded as the abnormal points, and these abnormal points in the trajectory segment information are deleted, ensuring that only normal points are kept in the trajectory segment information.
At Step 2.3, according to control of inner and outer thresholds set in a feeding direction of the tool and control of a threshold for a relative angle change between a normal direction and the feeding direction of the tool, linear fitting and spatial arc fitting are performed on the normal points in the trajectory segment information after global adaptive segmentation, thereby simplifying the trajectory data.
Specifically, the least square method is adopted to control errors during straight line fitting and spatial arc fitting, and the short line segments are changed into long straight lines or spatial arc segments.
The control of inner and outer thresholds set in the feeding direction of the tool includes the following steps:
At Step 3.1, an empty point set S1 is created.
At Step 3.2, in a trajectory region composed of short line segments, any point is added as a first starting point into the point set S1.
At Step 3.3, a next point ahead is taken as a subsequent point along a trajectory direction of the first starting point, whether the curvature of the subsequent point approximates the curvature of the previous point is judged, and if the curvatures of the two points approximate each other, the subsequent point is added into the point set S1.
At Step 3.4, points in the point set S1 are fitted by adopting a straight line segment or an arc segment on the tool plane, and an error value between each point in the point set S1 and a fitted line segment is calculated; if the error value does not exceed the preset inner and outer thresholds, moving forward is continuous along the trajectory direction, and Step 3.3 is returned to be repeated, and the point is added into the point set S1; and if the error value exceeds the inner and outer thresholds, fitting is stopped, a last point is deleted from the point set S1, and the line segment fitted based on the points in the point set S1 is used as a new trajectory to replace the short line segment where the point in the point set S1 is located.
The similarity between curvatures of two points refers to comparing the calculated curvature values of the two points., If the difference between the curvature values falls within a preset error range, the two points are deemed to have similar curvature. The preset error range may be set according to an actual condition.
Fitting and simplifying the trajectory data involves replacing short line segments with long straight lines and substituting short polygonal lines with spatial arc lines, which aims to increase the grinding speed of the equipment, reduce the transformation of posture and velocity in the trajectory and improve the stability of grinding. Inner and outer thresholds are required to be preset before fitting, and the inner and outer thresholds are differently set depending on selected paths. Preferably, when the required tool path is a plain milling path, the inner and outer thresholds are set to 50% to 60% of the radius length of the tool; when the required tool path is a side milling path and the path plane is parallel to the tool direction, the inner and outer thresholds are set to 50% to 60% of the edge length; and when the required tool path is a side milling path and the path plane is perpendicular to the tool direction, the inner and outer thresholds are set to an allowable residual error value for grinding.
The control of a threshold for a relative angle change between a normal direction and the feeding direction of the tool includes the following steps:
At Step 5.1, when continuous points in the trajectory segment information are detected to lie on the same plane with height variation in a Z direction of the tool, the continuous points are marked as a point set S2, and included angles between the normal direction of the tool and the feeding direction are calculated for all points in the point set S2.
At Step 5.2, any point in the point set S2 is taken as a second starting point.
At Step 5.3, another point in the point set S2 is taken as a comparative point, and an included angle change rate between the second starting point and the comparative point is compared, where the included angle change rate is defined as a difference between two included angles divided by a distance between the two points.
At Step 5.4, if the included angle change rate is greater than a change threshold, the comparative point is taken as the second starting point, and Step 5.3 is repeated until all the points in the point set S2 are traversed. And
At Step 5.5, if the included angle change rate is not greater than the change threshold, the comparative point is deleted from the point set S2, and Step 5.3 is returned to select the next point as a comparative point until all the points in the point set S2 are traversed.
At Step S3, an overall offset function, a single-point or multi-point offset function, re-matching generation of an arc trajectory after offset and single-point or multi-point posture adjustment are implemented for the trajectory data in the tool coordinate system.
Specifically, the trajectory data are generated in a theoretical coordinate system. When there is a deviation between the theoretical coordinate system and an actual coordinate system, the entire trajectory data is multiplied by a rigid transformation matrix derived from this deviation, thereby making an overall correction to the trajectory data based on the deviation The correction includes overall offset, single-point offset, multi-point offset, posture adjustment and so on.
At Step S4, the simulated operation of a tool and collision detection are implemented.
Specifically, after the trajectory data is optimized and before the simulated operation of the tool is implemented, the equipment, the compatible tool, the 3D model of the product and the processed G code program file may be loaded into the off-line programming software. Afterwards, the simulated operation of the tool and collision detection are implemented.
At Step S5, an NC program conforming to a program standard of the full 6-axis CNC rough machining and grinding equipment is generated according to the trajectory data and tool data, and the NC program is uploaded to an equipment controller.
Specifically, the NC program is an automatically generated standardized program, which is automatically or manually uploaded to the equipment controller of the full 6-axis CNC rough machining and grinding equipment, allowing the equipment to begin rough machining and grinding.
At Step S6, the full 6-axis CNC rough machining and grinding equipment sets workpiece coordinates according to an actual state of the product, and starts to run a program file. And
At Step S7, the off-line programming software monitors an operating state of the equipment in real time.
Specifically, the off-line programming software is dedicated for 6-axis CNC rough machining and grinding equipment and monitors the operating state of the equipment during the its operation. Monitoring parameters include the operating state of the equipment (normal, warning, etc.), the real-time position of each axis, the status of the IO signal of the equipment, etc.
The method disclosed by the present disclosure is applied to full 6-axis CNC rough machining equipment. As shown in FIG. 2 and FIG. 3, the full 6-axis CNC rough machining equipment includes a machine tool mounted on a base, where the machine tool is provided with linear motion axes, rotational motion axes, a rotary cutterhead 8, and a workpiece mounting chuck 10, the linear motion axes include an X axis 2, a Y axis 3, and a Z axis 4, the rotational motion axes include an A axis 5, a B axis 6, and a C axis 7, the X axis 2 is located on the machine tool 1, the Y axis 3 is located on the base 11, the Z axis 4 is located in front of the X axis 2, the A axis 5 is located above the Y axis 3, the B axis 6 is located in front of the Z axis 4, the C axis 7 is located below the A axis 5, the workpiece mounting chuck 10 is located on the C axis 7, and the rotary cutterhead 8 is located on the B axis 6. The X axis 2 is provided with an X axis lead screw 12, and an X axis motor 13 is arranged at an end of the X axis lead screw 12; the Y axis 3 is provided with a Y axis lead screw 14, and a Y axis motor 15 is arranged at an end of the Y axis lead screw 14; and the Z axis 4 is provided with a Z axis lead screw 16, and a Z axis motor 17 is arranged at an end of the Z axis lead screw 16. The X axis is driven by the X axis motor to perform left-right horizontal reciprocating motion, the Y axis is driven by the Y axis motor to perform forward-backward longitudinal reciprocating motion, and the Z axis is driven by the Z axis motor to perform up-down vertical reciprocating motion.
The A axis 5 is connected with an A axis motor 18, and an A axis RV reducer 19 is arranged between the A axis motor 18 and the A axis 5; a B axis motor 20 is arranged in the B axis 6, and a B axis RV reducer 21 is arranged between the B axis motor 20 and the B axis 6; and the C axis 9 is connected with a C axis motor 22, and a C axis RV reducer 23 is arranged between the C axis motor 22 and the C axis 9. In other words, the linear motion axes are driven by servo motors through lead screw drive mechanisms moving along linear guide rails, where the X axis 2 moves left and right, the Y axis 3 moves forward and backward, and the Z axis 4 moves up and down. The rotational motion axes are driven by servo motors through the RV reducers with high precision and high rigidity to perform rotational motion.
A Y axis assembly including the Y axis also includes a Y axis base connected with the Y axis, the Y axis assembly is connected with the base via the Y axis base, and the base is provided with a longitudinal accommodating space for installing the Y axis assembly. The Y axis assembly is provided with a first linear guide rail and a first slider sliding along the first linear guide rail, and an AC axis assembly including the A axis and the C axis is arranged on the first slider of the first linear guide rail. The AC assembly is provided with an A axis base with a concave accommodating space, a cradle is suspended on two side frames of the A axis base, dividing the concave accommodating space into an upper portion and a lower portion. The A axis is located at a joint between the cradle and the A axis base, the C axis vertically runs through the center of the cradle, the workpiece mounting chuck is arranged at the end of the C axis, and the workpiece mounting chuck is provided with workpiece positioning grooves.
An X axis assembly including the X axis is mounted on columns of the machine tool. The X axis assembly also includes a second linear guide rail and a second slider sliding along the second linear guide rail, and a Z axis assembly including the Z axis is mounted on the second slider. The Z axis assembly also includes a third linear guide rail and a third slider sliding along the third linear guide rail, and a B axis assembly including the B axis is mounted on the third slider.
The rotary cutterhead 8 is provided with a rough machining tool. The rough machining tool includes motorized spindles and/or a floating spindle 27. The motorized spindles include a first motorized spindle 24, a second motorized spindle 25, and a third motorized spindle 26, the second motorized spindle 25 and the third motorized spindle 26 are located on the same straight line, the first motorized spindle 24 is located above the second motorized spindle 25 and the third motorized spindle 26, and the floating spindle 27 is located below the third motorized spindle 26. The rotary cutterhead 8 is a multi-station cutterhead, such as a four-station cutterhead or a six-station cutterhead. By rotating and controlling the position of the B axis 6, the tool can be quickly switched.
An adjustable micro-spray device 28 is arranged on a seat of the Z axis 4 (on the back of the machining tool) and serves as a cooling and lubricating device for cooling the tool operating at a high speed. The workpiece mounting chuck 10 is provided with positioning positions (workpiece positioning slots 29) for a fixture, ensuring the consistency during multi-product manufacturing after fixture removal and installation; The product on the fixture is fixed using a multi-cylinder system, with each cylinder separately controlled. When an operating path interferes with a cylinder fixture, the cylinder can be turned on or off via a program to avoid collision and ensure the continuity of the operating trajectory. Chip outlets 7 with sloped surfaces are symmetrically distributed on both sides of the base 11, and aluminum chips produced during machining are guided through these outlets into chip collection carts for collection and recycling.
Full 6-axis spatial interpolation linkage control is a function that involves all six axes in the rotation tool center point (RTCP) interpolation linkage. Based on five axes XYZAB, a rotational axis (the B axis) of the cutterhead is also included in RTCP linkage interpolation calculation, allowing the tool center point to move along a specified trajectory and posture in a workpiece coordinate space.
As shown in FIG. 4, the postures of (X, Y, Z, A, B, C) in the workpiece coordinate space are transformed into a homogeneous transformation matrix M in real time by an algorithm, and real-time positions (A1, A2, A3, A4, A5, A6) corresponding to each motorized spindle are then calculated by this matrix according to the equipment structure and the relative positions of the motion axes, thereby implementing forward and inverse solution algorithms of the equipment, and thus, controlling the tool center point to move along the specified trajectory and posture in the workpiece coordinate space
According to the present disclosure, the problem of low programming efficiency for grinding complex-structured products is solved by using an automatic trajectory generation program, the problem of excessive trajectory data exported by CAM software which makes subsequent reading, modification and location time-consuming is solved by one-click threshold simplification, and the problem of a discrepancy between a model-generated trajectory and an actual running trajectory of the equipment is solved by adjustment and local fine-tuning. The NC program for grinding operation is quickly generated by a software algorithm based on the three-dimensional model of the product, enabling processes such as deburring, edge trimming, rough milling and plane grinding for the complex-structured products using different working tools.
The full 6-axis CNC rough machining equipment in the real-time method adopts a casting body (serving as the machine tool 1) with low the structural weight and high rigidity, enabling rapid and precise position changes. The machine tool 1 implements the rotation tool center point (RTCP) interpolation linkage function with full six-axis participation. Based on the five axes XYZAB, the rotational axis (the B axis) of the cutterhead is also included in the RTCP linkage interpolation calculation, allowing a tool tip to move along a specified trajectory and posture in the workpiece coordinate space. The inclusion of the B axis 6 in an interpolation algorithm can increase the redundancy of posture transformation, reducing the rotation positions of the A axis 5 and the C axis 9 in the process of change, thereby improving the efficiency of the machining process. In addition, the addition of the B axis 6 makes it possible to machine positions and postures that are difficult for a standard 5-axis linkage system.
The preferred specific embodiments of the present disclosure are described in details above. It should be understood that many modifications and changes can be made by those of ordinary skill in the art without creative labor based on the concept of the present disclosure. Therefore, any technical solutions derived by those skilled in the art through logical analysis, reasoning or limited experiments on the basis of the existing technology according to the concept of the present disclosure shall fall within the protection scope defined by the claims.
1. An off-line programming method for full 6-axis CNC rough machining and grinding equipment, comprising:
1) importing a three-dimensional model of a product into CAM software, interactively setting information, such as a workpiece coordinate system and a tool coordinate system, selecting a required tool path, and generating trajectory data;
2) importing the three-dimensional model and the trajectory data into off-line programming software, and simplifying, by a fitting algorithm, the trajectory data;
3) implementing an overall offset function, a single-point or multi-point offset function, re-matching generation of an arc trajectory after offset and single-point or multi-point posture adjustment for the trajectory data in the tool coordinate system;
4) implementing a simulated operation of a tool and collision detection;
5) generating, according to the trajectory data and tool data, an NC program conforming to a program standard of the full 6-axis CNC rough machining and grinding equipment, and uploading the NC program to an equipment controller;
6) setting, by the full 6-axis CNC rough machining and grinding equipment, workpiece coordinates according to an actual state of the product, and starting to run a program file; and
7) monitoring, by the off-line programming software, an operating state of the equipment in real time.
2. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 1, wherein simplifying, by the fitting algorithm, the trajectory data comprises:
performing field analysis on the trajectory data, extracting field data, and performing coordinate transformation to obtain trajectory segment information in the workpiece coordinate system, where the field data at least comprises instruction mode, points, coordinates, normal vector, and velocity;
calculating a curvature value of each point according to the trajectory segment information, deleting, according to a threshold judgment result of the curvature value of each point, abnormal points, and retaining curvature values of normal points; and
performing, according to control of inner and outer thresholds set in a feeding direction of the tool and control of a threshold for a relative angle change between a normal direction and the feeding direction of the tool, linear fitting and spatial arc fitting on the normal points in the trajectory segment information after global adaptive segmentation, thereby simplifying the trajectory data.
3. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 2, wherein the control of inner and outer thresholds set in the feeding direction of the tool comprises:
step 3.1: creating an empty point set S1;
step 3.2: in a trajectory region composed of short line segments, adding any point as a first starting point into the point set S1;
step 3.3: taking a next point ahead as a subsequent point along a trajectory direction from the first starting point, judging whether a curvature of the subsequent point approximates a curvature of a previous point or not, and if curvatures of two points approximate each other, adding the subsequent point into the point set S1; and
step 3.4: fitting points in the point set S1 by adopting a straight line segment or an arc segment on a tool plane, and calculating an error value between each point in the point set S1 and a fitted line segment; if the error value does not exceed the preset inner and outer thresholds, continuing to move forward along the trajectory direction, returning to step 3.3 to repeat the process, and adding the points into the point set S1; and if the error value exceeds the inner and outer thresholds, stopping fitting, deleting a last point from the point set S1, and using the line segment fitted based on the points in the point set S1 as a new trajectory to replace the short line segment where the point in the point set S1 is located.
4. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 3, wherein when the required tool path is a plain milling path, the inner and outer thresholds are set to 50% to 60% of a radius length of the tool; when the required tool path is a side milling path and a path plane is parallel to a tool direction, the inner and outer thresholds are set to 50% to 60% of the edge length; and when the required tool path is a side milling path and the path plane is perpendicular to the tool direction, the inner and outer thresholds are set to an allowable residual error value for grinding.
5. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 2, wherein the control of the threshold for the relative angle change between the normal direction and the feeding direction of the tool comprises:
step 5.1: when continuous points in the trajectory segment information are detected to lie on the same plane with height variation in a Z direction of the tool, marking the continuous points as a point set S2, and calculating included angles between the normal direction of the tool and the feeding direction for all points in the point set S2;
step 5.2: taking any point in the point set S2 as a second starting point;
step 5.3: taking another point in the point set S2 as a comparative point, and comparing an included angle change rate between the second starting point and the comparative point, where the included angle change rate is defined as a difference between two included angles divided by a distance between two points;
step 5.4: if the included angle change rate is greater than a change threshold, taking the comparative point as the second starting point, and repeating step 5.3 until all the points in the point set S2 are traversed; and
step 5.5: if the included angle change rate is not greater than the change threshold, deleting the comparative point from the point set S2, and returning to step 5.3 to select a next point as a comparative point until all the points in the point set S2 are traversed.
6. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 2, wherein the least square method is adopted to control errors during straight line fitting and spatial arc fitting, and short line segments are changed into long straight lines or spatial arc segments.
7. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 1, wherein the CAM software refers to MasterCam software, and the trajectory data is an NCI file exported from the MasterCam software.
8. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 1, wherein the equipment, the tool, the product and the program file are loaded into the off-line programming software before the simulated operation of the tool is implemented.
9. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 1, wherein the method is applied to the full 6-axis CNC rough machining equipment which comprises a machine tool mounted on a base, where the machine tool is provided with linear motion axes, rotational motion axes, a rotary cutterhead, and a workpiece mounting chuck, the linear motion axes comprise an X axis, a Y axis, and a Z axis, the rotational motion axes comprise an A axis, a B axis, and a C axis, the X axis is located on the machine tool, the Y axis is located on the base, the Z axis is located in front of the X axis, the A axis is located above the Y axis, the B axis is located in front of the Z axis, the C axis is located below the A axis, the workpiece mounting chuck is located on the C axis, and the rotary cutterhead is located on the B axis.
10. The off-line programming method for the full 6-axis CNC rough machining and grinding equipment according to claim 9, wherein the X axis is provided with an X axis lead screw, and an X axis motor is arranged at an end of the X axis lead screw; the Y axis is provided with a Y axis lead screw, and a Y axis motor is arranged at an end of the Y axis lead screw; and the Z axis is provided with a Z axis lead screw, and a Z axis motor is arranged at an end of the Z axis lead screw.