A multi-surface surface processing path planning algorithm, device and storage medium

Through the multi-surface machining path planning algorithm, efficient path optimization of complex surfaces is achieved, solving the problem of low computational efficiency in existing technologies and supporting machining path planning for multiple surfaces.

CN119739109BActive Publication Date: 2025-09-30AVICIT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411910157.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-09-30
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

Existing technologies have low computational efficiency in complex surface path planning and lack efficient planning strategies, making it difficult to optimize the machining path of multiple surfaces.

Method used

A multi-surface machining path planning algorithm is adopted to optimize the machining path of multiple surfaces through surface meshing, mesh reconstruction, feature simplification and path expansion algorithms.

Benefits of technology

It improves the calculation efficiency and planning effect of multi-surface machining paths, supports the planarization of single surfaces, curved surfaces, closed surfaces, developable surfaces, non-developable surfaces and multiple continuous surfaces, reduces the amount of calculation and optimizes the tool path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739109B_ABST
    Figure CN119739109B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of numerical control machining technology, and more specifically, to a multi-surface machining path planning algorithm, device, and storage medium. Based on the concept of gridding, the present invention flattens the grid to support the planarization of single curved surfaces, including planes, curved surfaces, closed surfaces, developable surfaces, non-developable surfaces, and multiple continuous surfaces. By rationally simplifying machining features to reduce computational complexity and utilizing a path expansion algorithm, path planning for multi-surface machining toolpaths can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control machining, and in particular to a multi-curved surface machining path planning algorithm, equipment and storage medium. Background Art

[0002] In the processing of text and patterns, the path optimization strategy is generally relatively simple. For some simple text or patterns, unoptimized or simply optimized tool paths will not have a significant impact on processing efficiency. However, when the number of processed text strokes or pattern lines increases, optimizing the processing tool paths becomes meaningful.

[0003] At present, the mainstream idea for complex surface path planning is to planarize (reduce dimensionality) the processing features (processing objects) and then optimize the path based on the planar path planning strategy.

[0004] There are generally two ways to planarize features: planarization based on UV space and planarization based on gridding.

[0005] 1) Planarization based on UV space: Map points and curves on the surface directly to the UV plane, and then sort them based on UV space. This method is simple and fast, and is suitable for scenes with a single developable surface. This method can also be used for non-developable ruled surfaces with very small curvature (large curvature radius).

[0006] 2) Mesh-based planarization: The surface is meshed and flattened appropriately. Points and curves are mapped onto a plane along with the mesh. Path optimization is then achieved based on a planar path planning strategy. This planarization strategy has a wider range of applicability but is computationally less efficient.

[0007] While mesh-based flattening strategies can achieve planarization of machining features, they are computationally expensive and lack efficient planning strategies. Consequently, mainstream CAD / CAM applications currently do not employ this approach, supporting only the machining, path generation, and optimization of text, patterns, and lines on conventional planes or single-curved surfaces. Summary of the Invention

[0008] The purpose of the present invention is to solve the deficiencies of the prior art and provide a surface processing path planning algorithm for curved surfaces and multi-curved surfaces, which can be used for the optimization of processing paths such as engraving or hollowing out various texts and patterns, and cutting of plates after nesting.

[0009] To achieve the above object, the present invention provides a multi-surface machining path planning algorithm, which is characterized by the following specific steps:

[0010] S1. Determine the current machining surface or machining surface set;

[0011] S2. Determine whether the current processing surface is a plane. If the current processing surface is a curved surface, mesh the current processing surface;

[0012] S3. Simplify the machining features of the machining surface in step S2 and the current machining surface as a plane, and transform the feature points into a grid plane coordinate system;

[0013] S4. Perform path planning based on the results of the coordinate transformation and generate an optimized processing path.

[0014] Preferably, the step S2 includes step S21, and the step S21 is specifically as follows:

[0015] S21. Based on the CAD / CAM’s own surface subdivision algorithm, the current processing surface is meshed.

[0016] Preferably, the step S2 includes a step S22, and the step S22 is specifically as follows:

[0017] S22. Reconstruct the mesh of the processing result in step S21, construct a plane coordinate system, flatten the starting face onto the plane, find adjacent faces based on the mesh adjacency relationship and splice the starting plane, and repeat this cycle until all faces are tightly flattened onto the plane.

[0018] Preferably, the step S3 includes step S31, and the step S31 is specifically as follows:

[0019] S31. Simplify the machining features contained in various machining curves and trajectories within the current machining surface, and advance the feature points.

[0020] Preferably, the step S3 includes step S32, and the step S32 is specifically as follows:

[0021] S32. Transform the feature points of the three-dimensional geometry into a plane coordinate system. The transformation formula is as follows:

[0022] P = αA + βB + γC (Formula 1)

[0023] α+β+γ=1 (Formula 2)

[0024] P is any point in the plane. Map the feature point to the three-dimensional grid and locate the patch. Combine Formula 1 and Formula 2, substitute the feature point and patch vertex coordinates (three-dimensional geometric coordinate system) to solve the α, β, and γ values. Substitute the two-dimensional plane coordinates of the patch vertex and the calculated α, β, and γ values ​​into Formula 1 to obtain the coordinates of the feature point on the two-dimensional plane.

[0025] Preferably, the step S4 includes step S41, and the step S41 is specifically as follows:

[0026] S41. Perform path planning for the feature points transformed by S3. Specifically, use the greedy algorithm to expand the path and add the first touched node as a new node to the path. Iterate repeatedly until all nodes are added to the path to obtain a path planning solution.

[0027] Preferably, the step S4 includes step S42, and the step S42 is specifically as follows:

[0028] S42. Repeat S41 multiple times to quickly obtain a set of planning solutions, and select the optimal solution as the final solution of path planning, which is used as the relatively optimal solution of the entire path planning.

[0029] The present invention also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0030] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when the program is executed by a processor.

[0031] Compared with the existing technology, the technical solution proposed in this application has the following beneficial effects: the present invention is based on the idea of ​​gridding, and by flattening the grid, it can support the planarization processing of single curved surfaces including: planes, curved surfaces, closed surfaces, developable surfaces, non-developable surfaces and multiple continuous surfaces; by reasonably simplifying the processing features, reducing the amount of calculation, and using the path expansion algorithm, path planning for multi-surface processing tool paths can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:

[0033] Figure 1 Schematic diagram of the method of the present invention;

[0034] Figure 2 This is a schematic diagram of layer-by-layer splicing of the present invention;

[0035] Figure 3 Schematic diagram of the two-dimensional plane coordinate system of the present invention;

[0036] Figure 4 It is a simplified non-closed line schematic diagram of the present invention;

[0037] Figure 5 It is a simplified closed line schematic diagram of the present invention;

[0038] Figure 6This is a schematic diagram of a point within a triangle according to the present invention;

[0039] Figure 7 It is a schematic diagram of the processing characteristics after the change of the present invention;

[0040] Figure 8 Schematic diagram of the fully connected graph and Hamiltonian path of the present invention;

[0041] Figure 9 is a schematic diagram of the connection method of the straight line features of the present invention;

[0042] Figure 10 A schematic diagram of a connection method for polygonal features of the present invention;

[0043] Figure 11 This is a schematic diagram of the path expansion and final result of the present invention;

[0044] Figure 12 This is a schematic diagram of an example of path planning of the present invention;

[0045] Figure 13 This is a schematic diagram of the final result of the path planning of the present invention. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe and discuss the technical solutions in the embodiments of the present invention in conjunction with the drawings of the present invention. Obviously, what is described here is only a part of the examples of the present invention, not all the examples. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may also be a central component. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may also be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may also be a central component. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0049] Example 1

[0050] See also Figure 1 The present invention provides a multi-surface machining path planning algorithm, the steps are as follows:

[0051] S1. Surface meshing processing;

[0052] S2. Mesh reconstruction;

[0053] S3. Feature simplification and coordinate transformation;

[0054] S4. Expansion algorithm and path planning.

[0055] If the machining surface is a single plane or multiple coplanar planes, the meshing and mesh reconstruction steps can be skipped and feature simplification can be performed directly without the need for coordinate mapping.

[0056] Specifically, when processing the surface mesh, the details are as follows:

[0057] Based on CAD / CAM's own surface subdivision algorithm (function), surface meshing processing is achieved.

[0058] Currently, the surface subdivision algorithm has become mature. In addition, surface / curved surface meshing is also a basic function of the geometry kernel and provides a complete interface.

[0059] See also Figure 2 , Step S2 grid reconstruction and coordinate system are as follows:

[0060] Mesh reconstruction is the process of flattening a 3D mesh. Specifically, it involves constructing a plane coordinate system, flattening the starting facets onto the plane, then finding adjacent faces based on mesh adjacency and joining the starting plane together. This cycle continues until all faces are tightly flattened onto the plane, ultimately reducing the dimensionality of the 3D mesh to a 2D plane.

[0061] It's best to choose a starting face that's at the center of the processing area, such as text, patterns, or curves. When rebuilding faces, use the starting face as the center and piece them together layer by layer until all faces are added to the plane. After mesh reconstruction, all curved surface meshes are mapped to the 2D plane.

[0062] In order to unify the coordinates, a two-dimensional plane coordinate system needs to be created. The coordinate system actually only affects the coordinate values ​​and does not affect the planning results. Therefore, there are no special requirements for the coordinate system. You can use one edge of the initial patch as the x-axis direction and the vertex of the edge as the coordinate origin. The result is as follows Figure 3 shown.

[0063] The feature simplification and feature transformation in step S3 are as follows:

[0064] Whether it's text strokes, pattern lines, or various processing curves and trajectories, the number of processing points is very large, which is not conducive to calculation. Therefore, we simplify the processing features and extract feature points.

[0065] See also Figure 4 and Figure 5 , the simplified rules are as follows:

[0066] 1) Single point

[0067] For a single point, no simplification is required. This point is also a feature point.

[0068] 2) Non-closed line

[0069] A non-closed line can be simplified to a straight line. The feature points are the two endpoints of the line. Figure 4 The processing line (black) and the equivalent straight line (red) in

[0070] 3) Closing line

[0071] The minimum convex hull of a closed line can be used to replace the closed line. In this way, the closed line can be simplified to a polygon, and the feature points are the vertices of the polygon. Figure 5 The processing line (black) and the convex hull of the polygon (red).

[0072] The algorithm for calculating the convex hull is already mature and will not be described in detail in this article.

[0073] Using polygons to replace the original curve will affect the accuracy of the path. The more polygon sides there are, the more feature points will be involved in the calculation, which will affect efficiency. Therefore, the number of polygon sides can be adjusted according to the accuracy requirements.

[0074] For further information, see Figure 6 , any point in the triangle mesh can be expressed as:

[0075] P = αA + βB + γC (Formula 1)

[0076] α+β+γ=1 (Formula 2)

[0077] Through mesh reconstruction, we have obtained a two-dimensional plane. At this point, we need to transform the feature points of the three-dimensional geometry into the plane coordinate system. The coordinate transformation steps of the feature points are as follows:

[0078] 1) Map feature points to a 3D grid and locate the patch

[0079] 2) Combine Formula 1 and Formula 2, substitute the feature points and patch vertex coordinates (3D geometric coordinate system), and solve for the values ​​of α, β, and γ;

[0080] 3) Substitute the vertex coordinates of the patch (two-dimensional plane coordinate system) and the α, β, and γ values ​​calculated in step 2 into formula 1 to obtain the coordinates of the feature points on the two-dimensional plane.

[0081] Through the above steps, the coordinate transformation of features and feature points can be completed. After the transformation, all processing features are located on the grid plane. The changed processing features are as follows Figure 7 shown.

[0082] The expansion algorithm and path planning in step S4 are as follows:

[0083] See also Figure 8 After coordinate transformation, all features and feature points lie in the same plane. For ease of analysis, lines are reduced to their midpoints and polygons to their centroids. The path planning problem then becomes finding the shortest Hamiltonian path in a fully connected graph (a weighted graph where the distance between points is the edge weight). This means finding the shortest path from point s to point e that passes through all nodes. The shortest Hamiltonian path is a classic NPC problem, difficult to solve and verify in polynomial time.

[0084] In real-world problems, the connection point is not a fixed value, but changes with the connection relationship, and the weight (distance) of the path will also change accordingly. Therefore, the concepts of exit and entry points are introduced.

[0085] Entry point: a feature point connected to the previous path

[0086] Exit point: Feature point connected to the next path

[0087] Features can be connected in multiple ways depending on the entry and exit points: a single point has only one connection method; a straight line has two; and a polygon has n connections.

[0088] 1) Single point

[0089] A single point can be connected in only one way: it is both an in point and an out point.

[0090] 2) Straight line

[0091] See also Figure 9 , a straight line has two characteristic points, one as the entry point and the other as the exit point. BC is a straight line, point A is the previous node of the path where BC is located, and point D is the next node of the path where BC is located. Possible connection methods are:

[0092] A--->B----C--->D

[0093] A--->C----B--->D

[0094] The corresponding weights are:

[0095] Dist=AB+CD

[0096] Dist=AC+BD

[0097] 3) Polygon

[0098] A polygon has multiple feature points. When planning a path, any point can be used as a connection point. Since the path is closed, the connection point is both an entry point and an exit point. Figure 10 , as follows:

[0099] Take the above figure as an example, BCDE is a quadrilateral, point A is the first point of the polygon path, and point D is the last point of BC path. Possible connection methods are:

[0100] A--->B----C----D----E----B--->F

[0101] A--->C----D----E----B----C--->F

[0102] A--->D----E----B----C----D--->F

[0103] A--->E----B----C----D----E--->F

[0104] The corresponding weights are:

[0105] Dist=AB+BF

[0106] Dist=AC+CF

[0107] Dist=AD+DF

[0108] Dist=AE+EF

[0109] Because the connection between lines and polygons can vary, and the edge weights change accordingly, the actual problem is more complex than the Hamiltonian problem and cannot be solved in polynomial time. When the number of feature points is relatively small, a brute-force algorithm can be used to obtain the absolute optimal path. When the number of feature points is relatively large, this invention proposes a path expansion algorithm to obtain a relatively optimal path.

[0110] 1) Brute force algorithm

[0111] When the number of feature points is relatively small, the weight values ​​of all connection orders are calculated to obtain the path with the minimum weight. This path is the optimal solution for path planning.

[0112] 2) Expansion algorithm

[0113] The expansion algorithm is a planning algorithm based on the greedy algorithm. The user needs to specify the starting point and the end point of the planning. Figure 11 Points S and E in the figure are used as the initial path. The algorithm expands the path until it touches the first node outside the path and adds it to the path to form a new path. The algorithm then expands the new path again until all nodes are added to the path.

[0114] In addition, considering that there are multiple feature points in lines and polygons, once a point is selected as the entry point, the exit point is also determined at the same time. Therefore, the complete expansion algorithm is as follows Figure 12 As shown:

[0115] As shown in the figure above, A is the starting point and E is the ending point. A feature point is randomly selected as the middle point, such as point C. According to the connection method, once points A and C are determined as entry points, A' and C' must be exit points. In this case, the connection order is:

[0116] A----A'--->C----C'--->E

[0117] Since segments AA' and CC' are internal segments and do not participate in toolpath optimization, only connecting lines A'C and C'E are considered.

[0118] Gradually expand the connecting line and add the first feature point it encounters as a new connecting point (entry point) to the path. After A'C expands, it will first encounter point B. At this time, adding point B to the tool path is:

[0119] A----A'--->B--->C----C'--->E

[0120] The connecting lines of the path are now: A'B, BC, C'E. Expand the connecting lines again until all the feature points of the path are added to the path. The final result is shown in Figure 13 .

[0121] It should be noted that:

[0122] 1) The expansion range can be restricted during implementation; feature points that are not within the expansion range can be added to the path according to certain rules (such as the proximity principle).

[0123] 2) You can add a weight factor to each feature point to prevent certain features from being selected more frequently when selecting random points. For example, the weight of a single point is 1; the weight of each feature point of a line is 0.5; and the weight of each feature point of a polygon is 1 / n.

[0124] 3) The solution obtained by the expansion algorithm is not the optimal solution, but only a mediocre one. However, this algorithm is simple and computationally efficient, and by repeating the calculations multiple times, it can obtain multiple mediocre solutions. From these, the optimal solution is selected as the final solution for the current path.

[0125] Example 2

[0126] This embodiment provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack-mounted server, blade server, tower server, or cabinet-mounted server (including a standalone server or a server cluster consisting of multiple servers), capable of executing programs. The computer device of this embodiment includes at least, but is not limited to, a memory and a processor that are communicatively connected via a system bus.

[0127] In this embodiment, the memory (i.e., readable storage medium) includes flash memory, hard disks, multimedia cards, card-type memories (e.g., SD or DX memories), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, magnetic disks, optical disks, etc. In some embodiments, the memory may be an internal storage unit of a computer device, such as the hard disk or internal memory of the computer device. In other embodiments, the memory may also be an external storage device of the computer device, such as a plug-in hard disk equipped with the computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Of course, the memory may also include both the internal storage unit of the computer device and its external storage devices. In this embodiment, the memory is generally used to store the operating system and various application software installed on the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are about to be output.

[0128] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 22 is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run program code stored in the memory or process data.

[0129] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the corresponding function is realized when the program is executed by a processor.

[0130] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and that one or more of the above embodiments may be combined. Those skilled in the art may make various changes, modifications, or combinations within the scope of the claims, which do not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments may be combined with each other in any manner.

Claims

1. A multi-surface machining path planning algorithm, characterized in that: The specific steps are as follows: S1. Determine the current machining surface or machining surface set; S2. Determine whether the current processing surface is a plane. If the current processing surface is a curved surface, mesh the current processing surface; S3. Simplify the machining features of the machining surface in step S2 and the current machining surface as a plane, and transform the feature points into a grid plane coordinate system; S4. Perform path planning based on the results of the coordinate transformation and generate an optimized processing path; The step S2 includes step S21, and the step S21 is specifically as follows: S21. Based on the CAD / CAM's own surface subdivision algorithm, the current processing surface is meshed; The step S2 includes step S22, and the step S22 is specifically as follows: S22. Reconstruct the mesh of the result of step S21, construct a plane coordinate system, flatten the starting face onto the plane, find adjacent faces based on the mesh adjacency relationship, and splice the starting plane, repeating this process until all faces are tightly flattened onto the plane; The step S3 includes step S31, and the step S31 is specifically as follows: S31. Simplifying the machining features contained in various machining curves and trajectories within the current machining surface and extracting feature points; The step S3 includes step S32, and the step S32 is specifically as follows: S32. Transform the feature points of the 3D geometry into a plane coordinate system. The transformation formula is as follows: (Formula 1) (Formula 2) P is any point in the plane. Map the feature point to the three-dimensional grid and locate the patch. Combine Formula 1 and Formula 2, substitute the coordinates of the feature point and the patch vertex, that is, the three-dimensional geometric coordinate system, and solve the α, β, and γ values. Substitute the two-dimensional plane coordinates of the patch vertex and the calculated α, β, and γ values ​​into Formula 1 to obtain the coordinates of the feature point on the two-dimensional plane.

2. A multi-surface machining path planning algorithm according to claim 1, characterized in that: The step S4 includes step S41, and the step S41 is specifically as follows: S41. Perform path planning on the feature points transformed by S3. Specifically, use the greedy algorithm to expand the path and add the first touched node as a new node to the path. Iterate repeatedly until all nodes are added to the path to obtain a path planning solution.

3. A multi-surface machining path planning algorithm according to claim 2, characterized in that: The step S4 includes step S42, and the step S42 is specifically as follows: S42. Repeat S41 multiple times to quickly obtain a set of planning solutions, and select the optimal solution as the final solution of the path planning, which is used as the relatively optimal solution of the entire path planning.

4. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the algorithm according to any one of claims 1 to 3 are implemented.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the algorithm according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Methods for flattening a 3d surface into a 2d piece

    CN101661626A

  • Free-form surface numerical control machining path planning method based on geodesic line

    CN117250909A