Method for planning a finishing path on a curved surface based on double-vector local hyperdistance dynamic detection

By using dual-vector local over-distance dynamic detection and improved genetic algorithm optimization, the problems of line spacing dependence on experience and multi-curve connection in traditional CNC milling are solved, and efficient and high-quality path planning for machining complex curved surfaces is realized.

CN123177345APending Publication Date: 2026-11-27GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611119612.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In CNC milling and mill-turn machining, the traditional parallel cutting method relies on manual experience to set the line spacing, which leads to uneven toolpaths in complex curved surfaces. The sudden change in curvature in some areas affects the machining quality. Furthermore, when connecting multiple curves, the empty cutting stroke is long, making it difficult to optimize the machining path.

Method used

A surface finishing path planning method based on dual-vector local over-distance dynamic detection is adopted. The three-dimensional model is selected through CAD/CAM environment interaction, machining parameters are input, the row spacing is automatically calculated, the cross-sectional curve is generated, the over-distance interval is identified and the curve is interpolated, and the machining sequence is optimized using an improved genetic algorithm to generate the tool skip path.

Benefits of technology

It improves the quality and efficiency of machining complex curved surfaces, reduces redundant toolpaths and idle strokes, and achieves automated path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123177345A_ABST
    Figure CN123177345A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent numerical control machining, in particular to a curved surface finishing path planning method based on double-vector local over-distance dynamic detection, which comprises the following steps: after a target curved surface and machining parameters are acquired, a basic row distance is determined according to a residual height, and a cross-section curve is generated according to a cross-section angle; a continuous over-distance interval and an effective range thereof are identified through double-vector identification, a local cross-section plane is constructed in the over-distance interval to generate an interpolation curve, and the newly-added curve is recursively detected until a preset over-distance threshold is met; a machining sequence of multiple curves is modeled as a double-end traveling salesman problem, and an improved genetic algorithm with a greedy initial population, an endpoint distance cache, adaptive mutation, elite reservation and local search is used to optimize the connection sequence. A curved surface fitting or a three-segment safety tool jump is adaptively generated when the distance is less than or equal to 20 times the row distance threshold, a tool position is generated by combining a curved surface normal and a tool tip radius, and various machining trajectories are classified and output. The application improves the automation degree of complex curved surface finishing path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent numerical control machining technology, specifically to a method for planning the finishing path of curved surfaces based on dual-vector local over-distance dynamic detection. Background Technology

[0002] In CNC milling and mill-turn machining, the planning quality of the finishing path for free-form surfaces directly determines the surface roughness, machining efficiency, and tool life of the part. The row spacing of the traditional parallel strip method is set by the engineer based on experience: if the setting is too large, it will produce excessive residual height in areas with large curvature, causing undercutting; if the setting is too small, the number of rows will increase sharply, and the machining efficiency will decrease significantly.

[0003] The existing technology has the following specific defects: First, the line spacing mainly relies on manual experience to set, lacking quantitative constraints with residual height and tool tip radius, resulting in overly dense toolpaths in gentle areas within the same surface while steep areas may still be undercut; Second, the traditional cutting plane method usually generates toolpaths according to a globally fixed line spacing, lacking the ability to identify continuous over-distance segments and perform local interpolation for local high curvature areas such as pits, steep walls, and transition fillets. If the quality is improved by reducing the overall line spacing, it will increase the number of toolpaths, idle travel, and calculation time; Third, existing multi-curve connections mostly adopt a fixed sequence or a simple Z-shaped sequence, without simultaneously considering curve double-end entry, curve direction reversal, and endpoint combination distance, making it difficult to obtain a shorter non-cutting motion distance when there are many curves. Summary of the Invention

[0004] The purpose of this invention is to provide a surface finishing path planning method based on dual-vector local over-distance dynamic detection, which aims to solve the problems of line spacing relying on manual experience in complex surface finishing, excessive toolpath spacing affecting machining quality in local curvature change areas, and long air cutting stroke in multi-curve machining.

[0005] To achieve the above objectives, this invention provides a surface finishing path planning method based on dual-vector local over-range dynamic detection, comprising the following steps:

[0006] Step 1: Interactively select the target 3D model in the CAD / CAM environment. The target 3D model includes single-surface objects, multi-surface objects, or mesh models that have been preprocessed to be converted into Brep surfaces and participate in intersection and normal calculations. The system filters invalid objects and obtains the target model's geometric data, object identifiers, and spatial bounding boxes.

[0007] Step 2: The user enters the machining process parameters sequentially through the human-computer interaction interface, including depth of cut, tool lift-off height, infeed and outfeed height, feed rate, tool entry speed, tool number, spindle speed, step distance, infeed and outfeed length, residual height h, tool tip radius r, section angle θ, and transverse machining line spacing L;

[0008] Step 3: When the user inputs the residual height h, the transverse machining distance L is automatically calculated based on the residual height h and the tool tip radius r; and the normal vector of the cutting plane is constructed in the XY plane based on the cross-sectional angle θ. and the horizontal guiding vector perpendicular to it Project each corner point of the bounding box of the target 3D model along the normal vector normal of the cutting plane and the horizontal guiding vector along_h, respectively. Use the extreme values ​​of the projection to determine the cutting start and end range, width, height and number of the cutting plane, thereby generating an ordered set of equally spaced cross-sectional curves covering the target 3D surface.

[0009] Further, the spatial bounding box of the target 3D model is obtained, and its eight corner points are extracted. These eight corner points are then projected onto the normal vector (normal) and the horizontal guiding vector (along_h) of the cut-off plane, respectively, to obtain the normal projection range and the horizontal projection range. Based on the normal projection range and the final determined row spacing L, the number of cut-off planes and the cutting position of each plane are calculated. The lateral coverage width of the cut-off plane is determined based on the horizontal projection range, and the longitudinal coverage range of the cut-off plane is determined by combining this with the height of the target model in the Z direction.

[0010] To prevent the target model's edge regions from being truncated due to numerical errors or irregular surface boundaries, a coverage magnification factor, preferably 1.05, is introduced when determining the dimensions of the cross-section planes. This ensures that each cross-section plane appropriately exceeds the bounding box of the target model in both horizontal width and height. Finally, multiple equidistant cross-section planes are constructed sequentially according to the cross-sectional angle, row spacing, and projection range. The intersection of each cross-section plane with the target 3D model is then performed to obtain an ordered set of cross-sectional plane trajectory curves.

[0011] Step 4: Using the first cross-sectional curve as the reference curve, calculate the starting and ending point direction relationship between the remaining cross-sectional curves and the reference curve; when a cross-sectional curve is opposite to the reference curve, perform reverse processing on the cross-sectional curve to make the direction of each cross-sectional curve consistent; then extend the preset entry and exit lengths outward from both ends of each cross-sectional curve to reserve the allowance for tool entry and exit; then, according to the normal vector and horizontal guiding vector corresponding to the cross-sectional angle, project and sort the spatial positions of each cross-sectional curve, and adjust the connection order of adjacent curves based on the principle of closest endpoints, so that the set of cross-sectional curves forms an initial processing sequence with continuous beginning and end;

[0012] In step 4, the set of cross-sectional curves obtained in step 3 is initially ordered. First, the first cross-sectional curve is selected as the reference curve, and the starting and ending directions of the remaining cross-sectional curves are compared with those of the reference curve. If a cross-sectional curve is opposite to the direction of the reference curve, it is reversed to ensure that all cross-sectional curves have a consistent direction. Subsequently, according to the preset entry and exit lengths, the starting and ending ends of each cross-sectional curve are extended to generate smooth entry and exit paths.

[0013] After unifying the direction and extending the curves, the center of the bounding box of each cross-sectional curve is projected based on the normal vector `normal` and the horizontal guiding vector `along_h` constructed from the cross-sectional angle. The curves are prioritized for sorting by normal projection values; when the normal projection values ​​of two curves are close, they are then sorted by horizontal projection values. Next, using the endpoint of the current curve in the sorted curves as a reference, the curve whose start or end point is closest to the endpoint of the current curve in the unsorted curves is selected as the next curve. This curve is then processed in reverse as needed, thus forming an initial sequence of processed curves with shorter beginning-to-end distances and better spatial continuity.

[0014] Step 5: Perform multi-round depth adaptive interpolation on adjacent cross-sectional curve pairs: Using a preset overshoot ratio threshold as the judgment condition, select 1.3 times the line spacing, call the curve far point detection and connection algorithm, and adopt a detection mechanism of sorting by projection along the horizontal guiding vector, binary matching, and merging of continuous overshoot intervals; if there is an overshoot region, project and insert the interpolation curve in between; recursively perform the same judgment on the newly generated interpolation curve pairs until there is no overshoot region in the entire domain or the maximum interpolation round limit is reached;

[0015] In step 5, a distance threshold of 1.3 times the line spacing is used to perform multiple rounds of depth adaptive interpolation on adjacent cross-sectional curve pairs, recursively until there are no distance threshold regions in the entire domain, and the one that satisfies the condition first is selected.

[0016] The newly generated interpolation curve and its left and right adjacent curves continue to be subjected to the same distance detection. If the local distance still exceeds the threshold, interpolation continues; if the maximum number of interpolation rounds, the maximum number of curve pairs processed per round, or the maximum number of interpolation curves is reached, recursion stops and a prompt is output, thus ensuring the stability and controllable computation time of the algorithm in the interactive CAD / CAM environment.

[0017] Furthermore, the local interpolation does not involve global densification of the entire adjacent curve, but rather constructs a controlled local cross-section only within a continuous superdistance interval; the normal position of the local cross-section is determined by the normal projection coordinates of the superdistance interval, the lateral range is determined by the projection range of the horizontal guiding vector, and the height range is determined by the bounding box of the target model.

[0018] Furthermore, the 1.3 times line spacing threshold is the over-distance ratio threshold in the preferred embodiment, which is used to trigger local interpolation when the three-dimensional spatial distance between adjacent curves is significantly increased relative to the nominal line spacing. By generating interpolated curves for continuous over-distance intervals and continuing to perform the same threshold detection on the newly generated interpolated curves and their adjacent original curves, the residual height control effect in steep regions and curvature abrupt change regions can be improved while maintaining a controllable number of toolpaths.

[0019] Optionally, the continuous overrange interval merging detection in step 5 includes: projecting and sorting the sampling points of an adjacent curve along the horizontal guiding vector along_h; using binary search to determine the nearest matching point in the projection direction for the sampling points of another adjacent curve; when the three-dimensional spatial distance between matching points is greater than 1.3 times the row spacing, recording the matching position as an overrange point, and merging continuous or intervals less than the preset tolerance overrange points into a continuous overrange interval, while recording the start and end projection coordinates of the interval in the direction of the normal vector of the cutting plane, as well as the minimum and maximum projection coordinates in the direction of the horizontal guiding vector along_h.

[0020] Optionally, in step 5, when generating the interpolation curve within the continuous overdistance interval, local cutting planes are constructed at the start, midpoint, and end of the continuous overdistance interval, respectively. The cutting position of the local cutting plane is determined by the normal direction of the cutting plane, the lateral range is determined by the horizontal guiding vector along_h, and the height range is determined by the Z-direction range of the target model bounding box. After each local cutting plane intersects with the target Brep surface, an effective intersection line with a high degree of overlap with the continuous overdistance interval is selected, and the direction of the intersection line is unified.

[0021] Optionally, when generating the tool jump path between adjacent machining curves, the tool jump strategy is selected based on the spatial distance between the exit point of the previous machining curve and the entry point of the next machining curve: when the spatial distance is less than or equal to 20 times the machining line spacing, the surface fitting tool jump method is adopted; when the spatial distance is greater than 20 times the machining line spacing, the safe height tool jump method is adopted, generating a three-segment safe tool jump path that rises from the exit point to the safe height, moves to above the entry point from the safe height, and then descends to the entry point; the safe height is determined by the maximum Z value of the target model bounding box, the tool lift height, the tool tip radius, and the cutting depth.

[0022] Optionally, the closure process of the continuous overdistance interval includes: forming a continuous interval based on the projected coordinates of adjacent overdistance points, expanding the start and end positions of the interval by a preset tolerance, and restricting the expanded interval to the effective projection range of the adjacent cross-sectional curves; when the length of the expanded interval is less than the preset minimum length, the interval is discarded to avoid generating invalid interpolation curves due to discrete sampling noise.

[0023] Furthermore, the genetic algorithm sorting model transforms the multi-section curve processing order problem into a double-ended Traveling Salesman Problem (TSP). The start and end points of each curve can serve as processing entry points, and the curve traversal direction is marked by a FirstFlag flag. When calculating the skip distance between adjacent curves, the system pre-caches four possible endpoint combinations of distance between the exit point of the previous curve and the entry point of the next curve, thus converting distance calculations in fitness evaluation into array readings. This approach reduces redundant distance calculations while maintaining the bidirectional processing selection space, thereby improving the efficiency of multi-curve sorting.

[0024] After sorting, the system generates the tool jump path between adjacent curves in the optimal order, as well as the tool entry path at the first curve and the tool retraction path at the last curve; the tool entry and retraction directions are determined along the normal of the corresponding surface to ensure that the tool smoothly enters and exits the cutting area.

[0025] Let the sampling points at the start, midpoint, and end points be Ps, Pm, and Pe, respectively, and the sampling ratio be u (where... Then the mixing point The calculation formula is:

[0026] The weights of each item are allocated as follows:

[0027] Starting point weight:

[0028] Midpoint weight:

[0029] Endpoint weight:

[0030] This formula enables the generated point set to form a continuous, smooth, and consistent transition between the start point, midpoint, and end point, avoiding problems such as self-intersection, overshoot, or local oscillation during curve interpolation fitting caused by overlapping sampling points, local penetration, or abrupt changes in point order. This improves the stability of the processing trajectory generation and the quality of curve forming.

[0031] Step 6: Summarize the cross-sectional curves and all interpolated curves, construct a curve information array, call the improved genetic algorithm to arrange the optimal processing order of all curves, model the multi-curve connection order as a two-ended traveling salesman problem, and use a genetic algorithm with greedy seed, endpoint combination distance buffer, adaptive mutation, elite preservation and local search to solve the processing order;

[0032] The improved genetic algorithm described in step 6 uses a greedy path as the elite seed in the first generation population, and injects sequential, reverse, and multiple greedy arrangements with different starting points into the initial population. The fitness function takes the total non-cutting tool jump distance between machining curves as the optimization objective, and converts the distance calculation into array reading through the endpoint combination distance cache matrix.

[0033] The improved genetic algorithm increases the mutation rate to enhance global search capability when the population stagnates, and decreases the mutation rate to enhance local development capability after fitness is improved. When the number of stagnant generations reaches a preset threshold, elite individuals are retained and low-quality individuals are reset. After the algorithm ends, 2-Opt and Or-Opt local searches are performed on the best individual.

[0034] Step 7: Generate the tool entry path before the first curve, the tool jump path between adjacent curves, and the tool retraction path after the last curve based on the sorting results; when the distance between adjacent endpoints is less than or equal to 20 times the line spacing, generate a surface-fitting tool jump path; when the distance between adjacent endpoints is greater than 20 times the line spacing, generate a three-segment safe height tool jump path that raises to a safe height, moves horizontally, and descends to the next entry point.

[0035] Step 8: Discretely sample each machining curve according to the sorted curve order, generate the center trajectory of the tool tip arc based on the normal of the nearest point of the target surface and the radius of the tool tip arc, and convert it into the actual tool position trajectory according to the machine tool tool position definition; when the cutting depth is not zero, apply a Z-axis cutting depth offset to the tool position uniformly; classify, store, draw and output the paths according to cutting path, tool jump path, tool infeed path and tool retraction path.

[0036] This invention provides a surface finishing path planning method based on dual-vector local over-distance dynamic detection. After obtaining the target surface and machining parameters, the basic row spacing is determined according to the residual height, and a cross-sectional curve is generated according to the cross-sectional angle. Continuous over-distance intervals and their effective ranges are identified through dual-vector identification, and local cross-sectional planes are constructed within these intervals to generate interpolation curves. Newly added curves are recursively detected until a preset over-distance threshold is met. The multi-curve machining sequence is modeled as a two-terminal traveling salesman problem, and an improved genetic algorithm with greedy initial population, endpoint distance buffering, adaptive mutation, elite retention, and local search is used to optimize the connection order. For a row spacing threshold less than or equal to 20 times the linear spacing threshold, surface fitting or a three-segment safe tool jump is adaptively generated. Tool positions are generated by combining the surface normal and the tool tip radius, and various machining trajectories are output in categories. This invention can ensure machining path quality while reducing redundant toolpaths and non-cutting idle strokes, improving the automation level of complex surface finishing path planning.

[0037] The beneficial effects of this invention are as follows:

[0038] (1) Threshold-driven recursive depth interpolation: This invention uses 1.3 times the line spacing as the distance threshold and retains a 30% tolerance on the basis of the nominal line spacing, which can filter out numerical errors and slight deviations caused by curve extension; when the actual distance between adjacent curves exceeds the threshold, projection interpolation and re-detection are only performed on the continuous distance interval. The interpolated curves automatically gather in steep, concave or curvature change areas, and no additional toolpath is added in flat areas, thus taking into account both surface quality and processing efficiency.

[0039] (2) Global Sorting Using Double-Ended TSP Genetic Algorithm: This invention models the multi-curve sorting problem as a double-ended Traveling Salesman Problem (TSP), allowing each curve to enter from either the starting point or the ending point. Four types of connection distances between adjacent curves are pre-calculated using an endpoint combination distance cache matrix. The improved genetic algorithm uses sequential, reverse, greedy, and random arrangements from multiple different starting points to form the initial population. Adaptive mutation, elite retention, and 2-Opt and Or-Opt local searches are employed to improve convergence quality. This sorting method can significantly shorten the non-cutting idle travel, and is particularly suitable for surface finishing scenarios with a large number of curves and complex spatial distribution.

[0040] (3) Safety of the jump cutter: The present invention automatically selects the short-distance curved surface fitting jump cutter and the long-distance safe height jump cutter according to the distance between adjacent endpoints. The short-distance transition maintains the continuity of the curved surface normal and retains the entry and exit offset. The long-distance crossing determines the safe height based on the maximum Z value of the model bounding box, the lift-off height, the radius of the cutter tip arc and the cutting depth. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a schematic diagram of the overall process of a surface finishing path planning method based on dual-vector local over-distance dynamic detection according to the present invention.

[0043] Figure 2 This is a schematic diagram of constructing the normal vector normal and the horizontal guiding vector along_h of the cutting plane based on the cross-sectional angle θ in an embodiment of the present invention.

[0044] Figure 3 This is a schematic diagram of the intersection of the cutting plane and the target surface model to generate the cross-sectional curve in an embodiment of the present invention.

[0045] Figure 4This is a schematic diagram of the machining trajectory using the traditional cross-sectional plane method.

[0046] Figure 5 This is a schematic diagram illustrating the uniformity and sorting of the cross-sectional plane trajectory curves in an embodiment of the present invention.

[0047] Figure 6 This is a schematic diagram of the local overrange interval detection and interpolation curve process in an embodiment of the present invention.

[0048] Figure 7 This is a schematic diagram showing the relationship between the blade tip radius, row spacing, and residual height under inclined plane conditions in an embodiment of the present invention.

[0049] Figure 8 This is a schematic diagram illustrating the effect of local long-range interval detection and local toolpath densification in an embodiment of the present invention.

[0050] Figure 9 This is a schematic diagram of the trajectory optimization for surface finishing path in an embodiment of the present invention.

[0051] Figure 10 This is a schematic diagram comparing the improved genetic algorithm and the greedy algorithm in an embodiment of the present invention.

[0052] Figure 11 This is a schematic diagram of the CIMCO Edit software G-code simulation in an embodiment of the present invention.

[0053] Figure 12 This is a schematic diagram illustrating the generation effect of an interpolation method example in an embodiment of the present invention.

[0054] Figure 13 This is a schematic diagram showing the actual generation effect of the interpolation method in an embodiment of the present invention. Detailed Implementation

[0055] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0056] This invention provides a method for planning the finishing path of curved surfaces based on dual-vector local long-range dynamic detection, comprising the following steps:

[0057] Step 1: Interactively select the target 3D model in the CAD / CAM environment. The target 3D model includes single-surface objects, multi-surface objects, or mesh models that have been preprocessed to be converted into Brep surfaces and participate in intersection and normal calculations. The system filters invalid objects and obtains the target model's geometric data, object identifiers, and spatial bounding boxes.

[0058] Step 2: The user enters the machining process parameters sequentially through the human-computer interaction interface, including depth of cut, tool lift-off height, infeed and outfeed height, feed rate, tool entry speed, tool number, spindle speed, step distance, infeed and outfeed length, residual height h, tool tip radius r, section angle θ, and transverse machining line spacing L;

[0059] Step 3: When the user inputs the residual height h, the transverse machining distance L is automatically calculated based on the residual height h and the tool tip radius r; and the normal vector of the cutting plane is constructed in the XY plane based on the cross-sectional angle θ. and the horizontal guiding vector perpendicular to it Project each corner point of the bounding box of the target 3D model along the normal vector normal of the cutting plane and the horizontal guiding vector along_h, respectively. Use the extreme values ​​of the projection to determine the cutting start and end range, width, height and number of the cutting plane, thereby generating an ordered set of equally spaced cross-sectional curves covering the target 3D surface.

[0060] Step 4: Using the first cross-sectional curve as the reference curve, calculate the starting and ending point direction relationship between the remaining cross-sectional curves and the reference curve; when a cross-sectional curve is opposite to the reference curve, perform reverse processing on the cross-sectional curve to make the direction of each cross-sectional curve consistent; then extend the preset entry and exit lengths outward from both ends of each cross-sectional curve to reserve the allowance for tool entry and exit; then, according to the normal vector and horizontal guiding vector corresponding to the cross-sectional angle, project and sort the spatial positions of each cross-sectional curve, and adjust the connection order of adjacent curves based on the principle of closest endpoints, so that the set of cross-sectional curves forms an initial processing sequence with continuous beginning and end;

[0061] Step 5: Perform multi-round depth adaptive interpolation on adjacent cross-sectional curve pairs: Using a preset overshoot ratio threshold as the judgment condition, select 1.3 times the line spacing, call the curve far point detection and connection algorithm, and adopt a detection mechanism of sorting by projection along the horizontal guiding vector, binary matching, and merging of continuous overshoot intervals; if there is an overshoot region, project and insert the interpolation curve in between; recursively perform the same judgment on the newly generated interpolation curve pairs until there is no overshoot region in the entire domain or the maximum interpolation round limit is reached;

[0062] Step 6: Summarize the cross-sectional curves and all interpolated curves, construct a curve information array, call the improved genetic algorithm to arrange the optimal processing order of all curves, model the multi-curve connection order as a two-ended traveling salesman problem, and use a genetic algorithm with greedy seed, endpoint combination distance buffer, adaptive mutation, elite preservation and local search to solve the processing order;

[0063] Step 7: Generate the tool entry path before the first curve, the tool jump path between adjacent curves, and the tool retraction path after the last curve based on the sorting results; when the distance between adjacent endpoints is less than or equal to 20 times the line spacing, generate a surface-fitting tool jump path; when the distance between adjacent endpoints is greater than 20 times the line spacing, generate a three-segment safe height tool jump path that raises to a safe height, moves horizontally, and descends to the next entry point.

[0064] Step 8: Discretely sample each machining curve according to the sorted curve order, generate the center trajectory of the tool tip arc based on the normal of the nearest point of the target surface and the radius of the tool tip arc, and convert it into the actual tool position trajectory according to the machine tool tool position definition; when the cutting depth is not zero, apply a Z-axis cutting depth offset to the tool position uniformly; classify, store, draw and output the paths according to cutting path, tool jump path, tool infeed path and tool retraction path.

[0065] The overall process is illustrated as follows: Figure 1 As shown, the present invention will be further described below with reference to the actual operation of specific embodiments:

[0066] The execution steps of this embodiment are broken down into 9 steps, including the following steps:

[0067] S1: Select the target 3D surface model and input the machining parameters, as follows:

[0068] S101. In this embodiment, the system selects a target 3D model through interactive commands. The target 3D model includes curved surfaces, multi-surfaces, and mesh models. After filtering invalid objects, the system reads the geometric data and bounding box of the target model, and inputs parameters such as cutting depth, tool lift-off height, cut-in and cut-out height, feed rate, tool entry speed, tool number, spindle speed, stepover, tool tip radius, cut-in and cut-out length, cross-section angle, residual height, and line spacing through the human-computer interaction interface.

[0069] S102. When the user-input residual height h is greater than zero tolerance, the system automatically calculates the transverse machining line spacing L based on the relationship between the tool tip radius R and the residual height. When the residual height h is not enabled, the line spacing L directly input by the user is used. This ensures compatibility between empirical line spacing settings and residual height constraint settings within the same parameter framework.

[0070] S2: Construct a local coordinate system for the cutting plane based on the cross-sectional angle and generate the basic cross-sectional curve. The specific steps are as follows:

[0071] S201, such as Figure 2 As shown, the system converts the cross-sectional angle into radians, constructs a normal vector for the cross-sectional plane in the XY plane, and constructs a horizontal guiding vector perpendicular to it. Then, it extracts the eight corner points of the target model's bounding box and projects them along the normal vector (normal) and the horizontal guiding vector (along_h) to obtain the normal projection range and the horizontal projection range.

[0072] S202. Determine the number of cutting planes and the cutting position of each cutting plane based on the normal projection range and the final line spacing L; determine the width of the cutting plane based on the horizontal projection range, and determine the coverage height of the cutting plane based on the height of the target model in the Z direction. To avoid the boundary surface being truncated due to numerical errors or irregular model edges, a coverage magnification factor of 1.05 is preferably introduced into the width and height of the cutting plane, so that the generated cutting plane can completely cover the surface to be processed.

[0073] S203, such as Figure 3 As shown, the system calls the cutting plane trajectory generation module to intersect each equidistant cutting plane with the target 3D model, obtaining a set of basic cross-section curves. This set constitutes the initial toolpath for subsequent direction unification, local interpolation, and sorting optimization; the basic trajectory directly generated by the traditional cutting plane method can be found in [reference needed]. Figure 4 .

[0074] S3: Unify the direction of the cross-section curve and add infeed and outfeed extensions. The specific operation is as follows:

[0075] S301, such as Figure 5 As shown, to avoid tool back-and-forth movement caused by inconsistent directions between adjacent curves, the system uses the first cross-sectional curve as the reference curve and compares the starting-to-ending direction of each of the remaining cross-sectional curves with that of the reference curve. When a cross-sectional curve is determined to be in the opposite direction to the reference curve, it is reversed to ensure that all basic cross-sectional curves have a consistent direction.

[0076] S302. After unifying the direction, the system extends the parameter domain of each cross-sectional curve towards the starting and ending points according to the preset entry and exit lengths. The extension process is also described in the same way. Figure 5 The extension section is used to provide allowance for tool advance, retraction, and transition between adjacent paths.

[0077] S4: Perform projection sorting and endpoint nearest initial sorting on the basic cross-section curves. The specific operations are as follows:

[0078] S401. The system performs a two-stage projection sorting of the bounding box centers of each cross-sectional curve based on the normal vector (normal direction) and the horizontal guiding vector (along_h direction). First, the projection values ​​of the curve centers in the normal vector (normal direction) are compared to determine the order of the curves along the cross-sectional plane. When the normal projection values ​​of two curves are close, their projection values ​​in the horizontal guiding vector (along_h direction) are then compared.

[0079] S402. After completing the spatial projection sorting, the system further adjusts the initial sequence using the principle of closest endpoints. Specifically, starting from the endpoint of the current curve, the distances from the current endpoint to the starting and ending points of candidate curves are calculated in the unsorted curve set. If the distance to the endpoint of a candidate curve is shorter, the candidate curve is added to the sequence in reverse order. Through this process, an initial processed sequence with better spatial continuity can be obtained before proceeding to subsequent interpolation and genetic algorithm sorting.

[0080] S5: Employs a continuous over-range detection mechanism to locate the local area requiring interpolation (e.g., Figure 6 As shown in the image, the specific steps are as follows:

[0081] S501, such as Figure 6 As shown, for adjacent cross-sectional curve pairs, the system uses 1.3 times the row spacing as the distance threshold and a preset sampling step size to perform discrete detection on the curves. During detection, the sampling points of one curve are projected and sorted along the horizontal guiding vector along_h. For the sampling points of the other curve, a binary search is used to find the nearest matching point in the projection direction, and then the three-dimensional spatial distance between the matching points is calculated.

[0082] S502. When the three-dimensional spatial distance is greater than 1.3 times the line spacing, the matching position is recorded as an overshoot point; when multiple overshoot points appear consecutively or the interval is less than the preset tolerance, they are merged into a continuous overshoot interval. The system also records the start and end projection coordinates of the interval in the normal vector direction, as well as the minimum and maximum projection coordinates in the horizontal guide vector direction, thereby forming a controlled local interpolation boundary.

[0083] S503, such as Figure 7 As shown, the 1.3 times line spacing threshold retains a 30% tolerance on the basis of the nominal line spacing. On the one hand, it can filter out slight deviations caused by sampling errors, curve extension and surface boundary disturbances. On the other hand, it can trigger supplementary toolpaths in time when the actual adjacent toolpath spacing is significantly amplified due to steep surfaces or sudden curvature changes.

[0084] Theoretical basis and interpolation effect of 1.3 times line spacing threshold:

[0085] The basic model for the residual height of the inclined plane is as follows. Let the nominal row spacing between two adjacent toolpaths in the XY projection plane be L, and the normal angle of the machining surface relative to the XY plane be θ. The measured distance between the two paths along the slope is:

[0086] when When d = 0°, i.e., the horizontal plane, surface = L; with the tilt angle As the spacing increases, the actual sloping plane spacing expands relative to the nominal row spacing.

[0087] For the ball end mill radius R, the residual height h between two adjacent paths is:

[0088]

[0089] Substituting the inclined plane step distance, we get:

[0090]

[0091] Compared to the residual height on the horizontal plane The magnification factor of the residual height on the inclined plane is The 1.3x line spacing threshold determines the 3D point spacing. The ratio between the nominal line spacing L and the nominal line spacing L:

[0092]

[0093] When the critical ratio k = 1.3, the solution can be obtained by inverse problem:

[0094]

[0095] The magnification factor for the residual height at this time is:

[0096]

[0097] In other words, when the three-dimensional distance between adjacent toolpaths reaches 1.3 times the nominal row spacing, the residual height of the corresponding inclined surface region is approximately 1.69 times that of the horizontal plane, which is already a region prone to surface quality risks. Therefore, in this embodiment, 1.3L is used as the geometric compensation threshold for inclined surface step expansion; when d ≥ 1.3L is detected, it indicates that the surface roughness of this region may not meet the set requirements, and a transition toolpath needs to be dynamically generated and inserted between the two tools.

[0098] Its meaning can be summarized as follows:

[0099]

[0100] Inserting an intermediate curve essentially involves locally bisecting the row spacing of the target slope region in three-dimensional space. If the original, expanded actual slope row spacing is... Then, after inserting the intermediate curve, the local row spacing between the newly formed adjacent curve pairs is:

[0101]

[0102] Since the residual height is approximately proportional to the square of the step size, when the local step size is reduced by half, the new residual height is approximately one-quarter of the original out-of-tolerance residual height.

[0103]

[0104] At the critical point of 1.3 times the threshold, 0. After inserting an intermediate curve, the new residual height is approximately:

[0105]

[0106] It can be seen that local interpolation can significantly reduce the residual height of the out-of-range region and bring it back below the residual height of the nominal plane, thus helping to meet the surface finishing quality requirements.

[0107] If the threshold is set to 1.4, the corresponding tilt angle is approximately 44.4°, and the residual height magnification factor is... The threshold value is approximately twice the nominal residual height on the horizontal plane. If the threshold is too low, such as 1.1, the corresponding critical angle is about 24.6°. Although surface quality control is more stringent, with a maximum error of about 1.21 times the nominal value, the triggering condition is too sensitive. Even on gently curved surfaces, frequent interpolation may occur, leading to overly dense toolpaths, increased idle travel, prolonged machining time, and potential heat buildup. If the threshold is too high, such as 1.4 or 1.5, the corresponding critical angle is about 44° to 48°. Although there are fewer toolpaths and shorter machining times, it easily creates quality blind spots, causing the residual height of the slope peaks to approach twice or even 2.25 times the nominal value. This reduces the ability to guarantee line spacing accuracy and increases the risk of subsequent manual grinding. Therefore, a line spacing threshold of 1.3 times offers a good compromise between machining efficiency and residual height control.

[0108] In terms of algorithmic effect, for the newly generated interpolated curve, the system forms new curve pairs with the original curves on the left and right, respectively, and recursively performs detection with the same threshold. After inserting the first curve, if a steeper region is encountered, such as when α = 75°, the original stretching ratio is adjusted. After inserting a cut, the local line spacing may still be about 1.93L, which is still greater than 1.3 times the line spacing threshold. At this time, the recursive mechanism continues to be triggered, and the center insertion is performed again on the two newly generated pairs of curves to form local encryption effects such as quartering and octet.

[0109] This mechanism implicitly drives toolpath density based on the three-dimensional physical deformation of the surface. Steeper areas or areas with significant curvature abrupt changes are more likely to continuously trigger the 1.3 times line spacing threshold, thus automatically and densely interpolating toolpaths; flat areas do not require additional interpolation. Without the need for additional Gaussian curvature or principal curvature calculations, it achieves near-constant residual height machining effects in engineering implementation.

[0110] S6: Generate interpolation curves within the local overrange interval and perform multiple rounds of depth interpolation (e.g., Figure 8 As shown in the image, the specific steps are as follows:

[0111] S601. For continuous over-distance intervals, the system does not perform global interpolation on the entire adjacent cross-sectional curve. Instead, it selects the start, midpoint, and end point of the over-distance interval within the local interpolation boundary, constructs corresponding local cutting planes, and intersects these local cutting planes with the target surface to obtain local intersection lines. The relationship between the local cutting planes and the intersection lines is described in [reference needed]. Figure 3 .

[0112] S602. To ensure a smooth interpolation trajectory and prevent backtracking, the system performs direction unification and sampling matching on the local intersection lines, and generates the interpolation point sequence using a secondary weighted hybrid method. Let the sampling points corresponding to the start point, midpoint, and end point be Ps, Pm, and Pe, respectively, with a sampling ratio of u, and... Then the mixing point P blend It can be represented as The interpolation curve obtained by fitting this point sequence can smoothly connect the toolpaths on both sides within the controlled boundary.

[0113] S603, such as Figure 8 As shown, when the newly generated interpolated curve still has a local gap of more than 1.3 times the line spacing with the original curve to its left or right after the first interpolation, the system continues to form a new curve pair with the adjacent curve and recursively performs the same distance detection and local interpolation.

[0114] S604. Through the above multiple rounds of depth interpolation, the interpolation curve automatically converges in areas of steep walls, depressions, transition fillets, and abrupt curvature changes, while flat areas do not require additional toolpaths. Figure 4 Compared to the traditional fixed-section-plane trajectory shown, this method reduces redundant trajectories; the trajectory generated by the interpolation method is as follows: Figure 9 As shown.

[0115] S7: Summarize the original curves and interpolated curves and perform global sorting using an improved genetic algorithm (e.g., ...). Figure 10 As shown in the image, the specific steps are as follows:

[0116] S701. The system summarizes the basic cross-section curves after unifying and extending their directions with all interpolation curves to construct a curve information array. Each curve records the start point, end point, curve object, and direction indicator.

[0117] S702. The sorting problem is modeled as a two-ended traveling salesman problem. For any two curves, the exit point of the preceding curve and the entry point of the following curve may both originate from their respective starting or ending points. Therefore, the system pre-calculates and caches the distances for four possible endpoint combinations. During fitness evaluation, spatial distance calculations are no longer repeatedly called; instead, endpoint combination distances are read from an array, thereby improving computational efficiency when sorting a large number of curves.

[0118] S703. The initial population of the improved genetic algorithm consists of sequential arrangement, reverse arrangement, greedy arrangement with multiple different starting points, and random arrangement. Among them, the greedy solution is used as an elite seed to enter the first generation population to improve the quality of the initial solution and speed up convergence. During the evolution process, sequential crossover or partial mapping crossover is used to generate offspring, and 2-Opt, Or-Opt, and 3-Opt mutation operators are combined to expand the search range.

[0119] S704. When the population shows no improvement over multiple generations, the system increases mutation perturbation or resets low-quality individuals to escape local optima; when fitness improves, it reduces perturbation and retains elite individuals to enhance local exploitation capabilities. After genetic iteration, the system continues to perform deterministic 2-Opt and Or-Opt local searches on the current best individual to further shorten the total non-cutting tool jump distance. The path comparison before and after sorting is as follows: Figure 10 As shown.

[0120] S8: Generate surface-fitting jump tool path and safe height jump tool path. The specific operation is as follows:

[0121] S801. After sorting, the system generates the feed, cutting, tool skip, and retraction trajectories sequentially according to the optimal machining order. For adjacent machining curves, the system reads the exit point of the previous curve and the entry point of the next curve, and offsets the tool tip radius according to the nearest point normal on the target surface to obtain a continuous tool tip arc center trajectory.

[0122] S802. When the distance between adjacent endpoints is less than or equal to 20 times the line spacing, the system preferably adopts the curved surface fitting skip tool method. In this method, the system inserts transition sampling points along the path from the exit point to the entry point, projects each sampling point to the nearest point on the target curved surface, reads the surface normal at the nearest point and offsets it according to the radius of the tool tip arc, forming a short transition path that fits the curved surface.

[0123] S803. When there is an entry / exit extension length, the system first obtains the nearest tool position points on the corresponding machining curves for the exit point and entry point, calculates the starting offset vector and the ending offset vector, and linearly mixes the two offset vectors along the transition path parameters. This generates a surface-fitting tool jump path with entry / exit offset compensation, avoiding the destruction of the tool advance / retreat allowance after the short jump tool directly returns to the surface.

[0124] S804. When the distance between adjacent endpoints is greater than 20 times the row spacing, the system adopts a safe height tool jump method. The safe height is determined by the maximum Z value of the target model bounding box, the user-set tool lift-off height, the tool tip radius, and the depth of cut. The tool jump trajectory includes a three-segment path: lifting from the exit point to the safe height, translating from the safe height to above the entry point, and then descending to the entry point, to avoid interference with the target model or fixture when crossing a large idle area.

[0125] S9: Generate tool position trajectory and classify and output (see...) Figure 9 , Figure 11 and Figure 13 The specific steps are as follows:

[0126] S901. The system samples each machining curve according to the sorting results. Based on the normal of the nearest point of the target surface and the radius of the tool tip arc, it generates the trajectory of the center of the tool tip arc and converts the trajectory of the center of the tool tip arc into the actual tool position trajectory.

[0127] S902. The system stores the trajectories according to type, including cutting paths, tool jump paths, tool approach paths, and tool retraction paths. When a cutting depth is set, the system uniformly superimposes a Z-axis depth offset onto the above paths. Finally, the system displays the original cross-section trajectory, interpolation trajectory, sorted cutting trajectory, surface-fitting tool jump path, safety height tool jump path, tool approach line, tool retraction line, and tool position trajectory in different colors in the CAD / CAM interface, and can output data for subsequent G-code generation; the interpolation trajectory generation effect is as follows. Figure 9 As shown, the CIMCO Edit software G-code simulation is as follows: Figure 11 As shown.

[0128] In one specific embodiment, a complex freeform surface model is first selected, and the residual height, tool tip radius, cross-section angle, and cutting-in / cut-out length are input. The system obtains the basic row spacing according to the residual height formula and generates equidistant cross-section curves covering the surface according to the cross-section angle. Subsequently, the system unifies the curve direction and extends both ends, and then performs 1.3 times row spacing over-distance detection on adjacent cross-section curves. For the detected local over-distance intervals, the system generates one or more short interpolation curves only in that local area; if over-distance still exists after interpolation, the next round of local interpolation is continued until the threshold condition is met or the maximum number of rounds is reached. The actual generation effect of the interpolation method can be seen in [reference needed]. Figure 12 and Figure 13 .

[0129] After interpolation is completed, the system inputs both the original cross-sectional curve and the interpolated curve into the dual-end genetic sorting module. The sorting module uses endpoint combination distance buffering and a greedy seed to quickly obtain a better initial solution, and then uses genetic evolution and local search to obtain a machining sequence with shorter non-cutting idle strokes. Finally, the system automatically selects surface-fitting tool jumper or safe height tool jumper based on the distance between the endpoints of adjacent curves, and generates a complete tool position sequence for infeed, cutting, tool jumper, and tool retraction.

[0130] Compared with the prior art, the present invention has at least the following beneficial effects:

[0131] First, this invention unifies the residual height h, the tool tip radius r, and the row spacing L into the same parameter system. When the user inputs the residual height, the row spacing can be automatically calculated. When the user needs process experience control, the manual row spacing can also be retained, thereby improving the accuracy and flexibility of parameter setting.

[0132] Second, the present invention constructs a local coordinate system for the cross-section plane by using the normal vector in the normal direction and the horizontal guiding vector along_h direction, and determines the number, width and coverage of the cross-section plane by using the extreme value of the bounding box projection, so that the cross-section plane trajectory generation can adapt to arbitrary cross-section angles and complex curved surface boundaries.

[0133] Third, the present invention employs dual-vector local over-distance dynamic detection, generating interpolation curves only in local areas where the spacing between adjacent toolpaths increases abnormally, avoiding toolpath redundancy caused by global reduction of line spacing, and providing more stable residual height control in curvature abrupt change regions.

[0134] Fourth, this invention models the multi-curve connection sequence as a two-terminal traveling salesman problem and adopts a sorting method that combines greedy seed, endpoint combination distance buffer, genetic search and local search, which can significantly compress non-cutting idle travel when the number of curves is large.

[0135] Sixth, the present invention adaptively selects between curved surface fitting jump cutter or safe height jump cutter based on the distance between adjacent endpoints. Short-distance transitions maintain the continuity of the curved surface normal, long-distance crossings ensure the safety of lifting the cutter, and can retain the offset compensation of the cutting-in and cutting-out extension segments.

[0136] The above description discloses only one or more preferred embodiments of the present invention, and should not be construed as limiting the scope of the present invention. Those skilled in the art will understand that all or part of the processes of the above embodiments can be implemented, and equivalent changes made in accordance with the claims of the present invention are still within the scope of the invention.

Claims

1. A method for planning the finishing path of a curved surface based on dual-vector local hyper-distance dynamic detection, characterized in that, Includes the following steps: Step 1: Interactively select the target 3D model in the CAD / CAM environment. The target 3D model includes single-surface objects, multi-surface objects, or mesh models that have been preprocessed to be converted into Brep surfaces and participate in intersection and normal calculations. The system filters invalid objects and obtains the target model's geometric data, object identifiers, and spatial bounding boxes. Step 2: The user enters the machining process parameters sequentially through the human-computer interaction interface, including depth of cut, tool lift-off height, infeed and outfeed height, feed rate, tool entry speed, tool number, spindle speed, step distance, infeed and outfeed length, residual height h, tool tip radius r, section angle θ, and transverse machining line spacing L; Step 3: When the user inputs the residual height h, the transverse machining distance L is automatically calculated based on the residual height h and the tool tip radius r; and the normal vector of the cutting plane is constructed in the XY plane based on the cross-sectional angle θ. and the horizontal guiding vector perpendicular to it Project each corner point of the bounding box of the target 3D model along the normal vector normal of the cutting plane and the horizontal guiding vector along_h, respectively. Use the extreme values ​​of the projection to determine the cutting start and end range, width, height and number of the cutting plane, thereby generating an ordered set of equally spaced cross-sectional curves covering the target 3D surface. Step 4: Using the first cross-sectional curve as the reference curve, calculate the starting and ending point direction relationship between the remaining cross-sectional curves and the reference curve; when a cross-sectional curve is opposite to the reference curve, perform reverse processing on the cross-sectional curve to make the direction of each cross-sectional curve consistent; then extend the preset entry and exit lengths outward from both ends of each cross-sectional curve to reserve the allowance for tool entry and exit; then, according to the normal vector and horizontal guiding vector corresponding to the cross-sectional angle, project and sort the spatial positions of each cross-sectional curve, and adjust the connection order of adjacent curves based on the principle of closest endpoints, so that the set of cross-sectional curves forms an initial processing sequence with continuous beginning and end; Step 5: Perform multi-round depth adaptive interpolation on adjacent cross-sectional curve pairs: Using a preset overshoot ratio threshold as the judgment condition, select 1.3 times the line spacing, call the curve far point detection and connection algorithm, and adopt a detection mechanism of sorting by projection along the horizontal guiding vector, binary matching, and merging of continuous overshoot intervals; if there is an overshoot region, project and insert the interpolation curve in between; recursively perform the same judgment on the newly generated interpolation curve pairs until there is no overshoot region in the entire domain or the maximum interpolation round limit is reached; Step 6: Summarize the cross-sectional curves and all interpolated curves, construct a curve information array, call the improved genetic algorithm to arrange the optimal processing order of all curves, model the multi-curve connection order as a two-ended traveling salesman problem, and use a genetic algorithm with greedy seed, endpoint combination distance buffer, adaptive mutation, elite preservation and local search to solve the processing order; Step 7: Generate the tool entry path before the first curve, the tool jump path between adjacent curves, and the tool retraction path after the last curve based on the sorting results; when the distance between adjacent endpoints is less than or equal to 20 times the line spacing, generate a surface-fitting tool jump path; when the distance between adjacent endpoints is greater than 20 times the line spacing, generate a three-segment safe height tool jump path that raises to a safe height, moves horizontally, and descends to the next entry point. Step 8: Discretely sample each machining curve according to the sorted curve order, generate the center trajectory of the tool tip arc based on the normal of the nearest point of the target surface and the radius of the tool tip arc, and convert it into the actual tool position trajectory according to the machine tool tool position definition; when the cutting depth is not zero, apply a Z-axis cutting depth offset to the tool position uniformly; classify, store, draw and output the paths according to cutting path, tool jump path, tool infeed path and tool retraction path.

2. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 1, characterized in that, Step 5, the continuous overrange interval merging detection, includes: projecting and sorting the sampling points of an adjacent curve along the horizontal guiding vector along_h; using binary search to determine the nearest matching point in the projection direction for the sampling points of another adjacent curve; when the three-dimensional spatial distance between matching points is greater than 1.3 times the row spacing, the matching position is recorded as an overrange point, and continuous or intervals less than the preset tolerance overrange points are merged into a continuous overrange interval. At the same time, the start and end projection coordinates of the interval in the direction of the normal vector of the cutting plane, as well as the minimum and maximum projection coordinates in the direction of the horizontal guiding vector along_h, are recorded.

3. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 1, characterized in that, In step 5, when generating interpolation curves within the continuous overdistance interval, local cutting planes are constructed at the start, midpoint, and end of the continuous overdistance interval. The cutting position of each local cutting plane is determined by the normal vector of the cutting plane, the lateral range is determined by the horizontal guiding vector along_h, and the height range is determined by the Z-direction range of the target model's bounding box. After each local cutting plane intersects with the target Brep surface, the effective intersection line with a high degree of overlap with the continuous overdistance interval is selected, and the direction of the intersection line is unified.

4. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 1, characterized in that, When generating tool jump paths between adjacent machining curves, the tool jump strategy is selected based on the spatial distance between the exit point of the previous machining curve and the entry point of the next machining curve: when the spatial distance is less than or equal to 20 times the machining line spacing, the surface fitting tool jump method is adopted; when the spatial distance is greater than 20 times the machining line spacing, the safe height tool jump method is adopted, generating a three-segment safe tool jump path that rises from the exit point to the safe height, moves to above the entry point from the safe height, and then descends to the entry point; the safe height is determined by the maximum Z value of the target model bounding box, the tool lift height, the tool tip radius, and the depth of cut.

5. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 2, characterized in that, The closure process of the continuous overdistance interval includes: forming a continuous interval based on the projected coordinates of adjacent overdistance points, expanding the start and end positions of the interval according to a preset tolerance, and restricting the expanded interval to the effective projection range of the adjacent cross-sectional curves; when the length of the expanded interval is less than the preset minimum length, the interval is discarded to avoid generating invalid interpolation curves due to discrete sampling noise.

6. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 1, characterized in that, The improved genetic algorithm described in step 6 uses a greedy path as the elite seed in the first generation population, and injects sequential, reverse, and multiple greedy arrangements with different starting points into the initial population. The fitness function takes the total non-cutting tool jump distance between machining curves as the optimization objective, and converts the distance calculation into array reading through the endpoint combination distance cache matrix.

7. The surface finishing path planning method based on dual-vector local long-range dynamic detection as described in claim 6, characterized in that, The improved genetic algorithm increases the mutation rate to enhance global search capability when the population stagnates, and decreases the mutation rate to enhance local development capability after fitness is improved. When the number of stagnant generations reaches a preset threshold, elite individuals are retained and low-quality individuals are reset. After the algorithm ends, 2-Opt and Or-Opt local searches are performed on the best individual.