A method, device and storage medium for generating tool paths for ruled surface side edge machining
By constructing a unary iterative function and an iterative solution method, the problem of low efficiency and insufficient precision in the calculation of ruled surface generatrix in the existing technology is solved, and efficient and accurate side edge machining tool path generation is achieved, which is suitable for various ruled surface types.
Patent Information
- Application Number
- CN202311801705.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The existing ruled surface generatrix calculation method has deficiencies in efficiency and accuracy, especially for non-analytical surfaces, making it difficult to achieve efficient and accurate side edge machining tool path generation.
A unary iterative function is constructed and the generatrix direction of the ruled surface is obtained by iteratively solving the root of the function. The specific steps include constructing the iterative function, iteratively solving the root, determining the iteration interval and initial value, repeating the iteration and obtaining the generatrix direction. It is applicable to various types of ruled surfaces.
It achieves efficient and accurate calculation of ruled surface generatrix, improves the efficiency and accuracy of side edge processing, and can reach an accuracy of 10-6 to 10-8 after 10 iterations, and more than 10-10 after 15 iterations.
Smart Images

Figure CN117742234B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of side edge processing, and in particular to a method, device and storage medium for generating a tool path for side edge processing of a ruled surface. Background Art
[0002] Swarf machining is a commonly used cutting method, suitable for applications requiring cutting, grooving, or incising on the side of a workpiece. By selecting appropriate tools and reasonable machining parameters, efficient and precise machining operations can be achieved. Compared to other types of surfaces, ruled surfaces possess naturally ruled grain characteristics, making them more suitable for swarf machining. During swarf machining, the tool axis must always align with the ruling line of the ruled surface. Calculating the ruling line of the ruled surface is crucial for toolpath generation. However, existing ruling line calculation methods are less than ideal in terms of efficiency and accuracy.
[0003] There are two common methods for obtaining the generatrix of a ruled surface: algebraic and geometric. The algebraic method: Substituting the coordinate points of a ruled surface into a geometric representation yields the generatrix of that surface. The geometric method, also known as the cut method, intersects the tangent plane at that point with the surface, and the resulting line is the generatrix at that point. The cut method is currently the most commonly used method for obtaining the generatrix of a ruled surface.
[0004] The shortcomings of the two existing methods are as follows:
[0005] Algebraic methods require converting the surface representation into a generatrix cluster. Each ruled surface has a different analytical expression for ruled lines, and some analytical expressions are very complex, making encoding difficult. Furthermore, they cannot handle non-analytic surfaces such as splines and Nurb surfaces.
[0006] Geometric method: The intersection algorithm relies on the geometric kernel. Since it involves surface intersection, its efficiency is not ideal. Summary of the Invention
[0007] The purpose of the present invention is to solve the deficiencies of the prior art and to provide a tool path forming method with fast calculation speed and high precision.
[0008] To achieve the above-mentioned purpose, the present invention provides a method for generating a tool path for machining a ruled surface side edge, the specific steps of which are as follows:
[0009] S1. Specify or calculate the processing line according to the target ruled surface;
[0010] S2. performing a discretization operation on the processing line to form a discrete processing line;
[0011] S3. Obtain the tool head coordinates according to the discrete processing line;
[0012] S4. Calculate the ruled surface generatrix and determine the tool axis direction;
[0013] S5. Generate a machining tool path based on the tool axis direction and tool head coordinates.
[0014] Preferably, the step S4 further includes a step S41, and the details of the step S41 are as follows:
[0015] S41. Construct a univariate iterative function f(θ): Construct a coordinate system based on the target surface and determine the required point and iteration point.
[0016] Preferably, the step S4 further includes a step S42, and the details of the step S42 are as follows:
[0017] S42. Iterate and find the root of the function f(θ) in step S41: specifically, when solving f(θ)=0, when f(θ)=0 is established within the tolerance range, the iteration converges and the function f(θ) has roots; when the iteration depth is greater than the maximum upper limit, the iteration does not converge and the function f(θ) has no roots.
[0018] Preferably, the step S4 further includes a step S43, and the details of the step S43 are as follows:
[0019] S43. Determine the iteration interval and initial value: determine the parameter range of the surface, and determine the iteration interval and initial value for the lower left vertex, lower right vertex, upper left vertex, upper right vertex, left boundary point, right boundary point, upper boundary point, lower boundary point and internal point in turn.
[0020] Preferably, the step S43 further includes a step S431, and the details of the step S431 are as follows:
[0021] S431. Repeat iteration: Use the result of the previous iteration as the initial value of the current iteration and repeat the iteration. At this time, the result of the previous iteration is within the iteration interval of the current point.
[0022] Preferably, the step S4 further includes a step S432, and the details of the step S432 are as follows:
[0023] S432. Iterate again: When the iteration exceeds the limit, the angle is transformed and iterated again within the iteration range.
[0024] Preferably, the step S4 further includes a step S44, and the details of the step S44 are as follows:
[0025] S44. Obtain the generatrix of the ruled surface: Based on the coordinates of the desired point and the iterative point, the direction of the line connecting the two points is the generatrix direction of the current point.
[0026] The present invention also provides a computer device, comprising:
[0027] memory for storing computer programs;
[0028] A processor is configured to implement the above method when executing the computer program.
[0029] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0030] Compared with existing technologies, the technical solution proposed in this application has the following beneficial effects: Based on the existing side edge machining toolpath generation, this invention proposes a new algorithm for calculating the generatrix of a ruled surface. This algorithm constructs a special iterative function and utilizes an iterative solution approach to efficiently and accurately obtain the generatrix direction at each point. This algorithm is universal and does not require classification processing; it has fast calculation speed and high accuracy; and it is simple and easy to code. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] 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:
[0032] Figure 1 Generate a basic flow chart for the tool path of the textured side edge machining of the present invention;
[0033] Figure 2 The function image constructed by the present invention for a single ruled surface;
[0034] Figure 3 The function image constructed for the double ruled surface by the present invention;
[0035] Figure 4 The function image constructed for the non-ruled surface by the present invention;
[0036] Figure 5 An image of the parameter space value range of the function constructed for the present invention;
[0037] Figure 6 Obtaining a flow chart for the busbar of the present invention;
[0038] Figure 7 For the present invention Figure 6 The iterator implementation flow chart in ;
[0039] Figure 8 Schematic diagram of the tool path result of the present invention. DETAILED DESCRIPTION
[0040] 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.
[0041] 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.
[0042] 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.
[0043] See also Figures 1 to 8 A method for generating tool paths for side edge machining on ruled surfaces is provided. This method constructs a special unary function and uses an iterative method to solve the function's roots. The root of this function can be used to obtain the generatrix direction of the corresponding point. Specifically, the method involves searching for the desired point at an angle (0-2π) and obtaining the direction where the second-order derivative of the point is 0. This direction is the generatrix direction of the point. The specific steps are as follows:
[0044] S1. Specify or calculate the processing line according to the target ruled surface;
[0045] S2. performing a discretization operation on the processing line to form a discrete processing line;
[0046] S3. Obtain the tool head coordinates according to the discrete processing line;
[0047] S4. Calculate the ruled surface generatrix and determine the tool axis direction;
[0048] S4. Obtaining tool head coordinates based on discrete processing lines;
[0049] S5. Generate a machining tool path based on the tool axis direction and tool head coordinates.
[0050] Wherein, step S4 is specifically as follows:
[0051] Step 1. Build a unary iterative function
[0052] Construct a coordinate system based on the surface UV space, where P(u, v) is the point to be found and P'(u, v) is the iteration point. θ is the current search angle and λ is the search step size. At this point, there is:
[0053] p′ u =p u +λcosθ
[0054] p′ v =p v +λsinθ
[0055] Based on the angle, construct a unary iterative function:
[0056]
[0057] Where Normal is the normal direction of point P on the surface, which is also the normal direction of the tangent plane at that point.
[0058] The geometric meaning of this function is: the distance from point P' to the tangent plane of point P. When f(θ) = 0, then P' lies on the tangent plane (which is equivalent to the second-order derivative in the direction of PP' being 0). In this case, the direction of PP' is the generatrix of that point.
[0059] The function image is:
[0060] 1) For a general ruled surface, the graph of this function is Figure 3 : This function is a periodic function between [0, π]. In this interval, f(θ) = 0 has only one root.
[0061] 2) For multiple ruled surfaces (double ruled surfaces), the function graph is Figure 4 : This function is also a periodic function between [0, π]. In this interval, f(θ) = 0 has multiple roots.
[0062] 3) For non-ruled surfaces, the function graph is Figure 5 : This function is a periodic function between [0, 2π]. This function f(θ) = 0 has no roots.
[0063] Step 2. Iterate the function to find the root:
[0064] 1. Theoretical basis
[0065] Now we need to solve f(θ) = 0. Here we use Newton iteration to solve the equation, and the derivation process is:
[0066] Assume that the equation f(x)=0 has an approximate root xk, and perform Taylor expansion of the function f(x) at point xk:
[0067]
[0068] Therefore, the equation f(x)=0 can be approximately expressed as:
[0069] f(x k )+f′(x k )(xx k )=0
[0070] This is a linear equation, and its root is xk+1, then:
[0071]
[0072] This is the famous Newton-Raphson method. Its convergence order is 2. To simplify the calculation, in practice, variations of Newton iteration are often used, such as the Newton chord intercept method or the Newton downhill method.
[0073] 2. Iteration termination condition
[0074] Condition 1: f(θ) = 0 is within the tolerance range
[0075] At this point the iteration converges and has a root.
[0076] Condition 2: The iteration depth is greater than the maximum upper limit (deepMax)
[0077] At this time, the iteration does not converge and has no roots.
[0078] Step 3. Determine the iteration interval and initial value: See Figure 6
[0079] 1. First iteration:
[0080] The parameter range of the surface is: in the U direction [u0,u1], in the V direction [v0,v1]. At this time, the iteration parameter range is:
[0081] 1) Lower left vertex: P = Surface(u0,v0)
[0082] Iteration interval: [0,π / 2]
[0083] Initial value of iteration: θk = 0;
[0084] 2) Lower right vertex: P = Surface(u1,v0)
[0085] Iteration interval: [π / 2,π];
[0086] Initial value of iteration: θk = π;
[0087] 3) Upper left vertex: P = Surface(u0,v1)
[0088] Iteration interval: [3π / 2, 2π];
[0089] Initial value of iteration: θk = 0;
[0090] 4) Upper right vertex: P = Surface(u1,v1)
[0091] Iteration interval: [π,3π / 2];
[0092] Initial value of iteration: θk = π;
[0093] 5) Left boundary point: P = Surface(u0, v)
[0094] Iteration interval: [-π / 2, π / 2];
[0095] Initial value of iteration: θk = 0;
[0096] 6) Right boundary point: P = Surface(u1, v)
[0097] Iteration interval: [π / 2, 3π / 2];
[0098] Initial value of iteration: θk = π;
[0099] 7) Lower boundary point: P = Surface(u, v0)
[0100] Iteration interval: [0, π];
[0101] Initial value of iteration: θk = 0;
[0102] 8) Upper boundary point: P = Surface(u, v1)
[0103] Iteration interval: [π, 2π];
[0104] Initial value of iteration: θk = π;
[0105] 9) Interior point: P = Surface(u, v)
[0106] Iteration interval: [0, π];
[0107] Initial value of iteration: θk = 0;
[0108] The initial iteration value here prioritizes the U or V direction of the surface parameters. This is because, in general, ruled surfaces are parameterized with the generatrix direction as the U or V direction. Preferring the U or V direction allows for early termination and improves iteration efficiency.
[0109] 2. Repeated iteration:
[0110] When multiple iterations are performed and the result of the previous iteration is within the iteration interval of the current point, the result of the previous iteration can be used as the initial value of the current iteration.
[0111] 3. Crossing the line again:
[0112] Since ruled surfaces are all periodic functions of [0, π], when the iteration exceeds the bounds, the angle needs to be transformed back to the iteration interval and iterated again.
[0113] Step 4. Get the ruled surface generatrix:
[0114] Exploiting relationships:
[0115] p′ u =p u +λcosθ
[0116] p′ v =p v +λsinθ
[0117] Points P(u, v) and P'(u, v) are both known. The direction PP' is the direction of the generatrix at the current point.
[0118] For a single ruled surface: the PP' direction is the only generatrix direction of point P; for a multi-ruled surface: the PP' direction is one of the generatrix directions of point P.
[0119] according to Figure 7 The process shown in the figure completes the coding and combines it with the tool path generation process shown in 1 to obtain the side edge machining tool path of the ruled surface. This method is applicable to all ruled surface types and has no upper limit on accuracy. The calculation efficiency is high, and each iteration process only requires single-digit multiplication and division operations. The current test found that the accuracy can reach 10 after 10 iterations. -6 to 10 -8 times, 15 iterations can basically reach 10 -10 Based on this method, the efficiency and accuracy of side edge processing can be significantly improved.
[0120] It should be noted that: During the calculation of ruled surface generatrix:
[0121] Iteration function parameter: This embodiment only provides a unary parameter based on an angle, but the parameter is actually not limited to an angle, nor is it limited to a unary parameter.
[0122] Iterative function form: This embodiment only provides one iterative function, but this form can have many variations.
[0123] Different iterative methods: The iterative methods mentioned in this embodiment include but are not limited to Newton iteration and its variations, and also include equation root-finding iterative methods such as bisection iteration and Jacobi iteration.
[0124] This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet 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 can be interconnected via a system bus.
[0125] In this embodiment, the memory (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), 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 disk, optical disk, 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 device. 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.
[0126] 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 codes stored in the memory or process data.
[0127] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory), 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 storage device, a disk, an optical disk, a server, an app store, etc., storing a computer program that, when executed by a processor, implements a corresponding function. The computer-readable storage medium of this embodiment is used for generating tool paths for ruled surface side edge machining and, when executed by a processor, implements the aforementioned method for generating tool paths for ruled surface side edge machining.
[0128] 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 method for generating a tool path for machining a ruled surface side edge, characterized in that: The specific steps are as follows: S1. Specify or calculate the processing line according to the target ruled surface; S2. performing a discretization operation on the processing line to form a discrete processing line; S3. Obtain the tool head coordinates according to the discrete processing line; S4. Calculate the ruled surface generatrix and determine the tool axis direction; The step S4 further includes a step S41, and the specific details of the step S41 are as follows: S41. Constructing a unary iterative function : Construct a coordinate system based on the target surface and determine the required points and iteration points; Construct a coordinate system based on the surface UV space, where P(u,v) is the point to be found, P'(u,v) is the iteration point, θ is the current search angle, and λ is the search step size. At this time, there is: Based on the angle, construct a unary iterative function: Where Normal is the normal direction of point P on the surface, which is also the normal direction of the tangent plane at that point; The step S4 further includes a step S42, and the specific details of the step S42 are as follows: S42. For the function in step S41 Perform iterative root search: Specifically, when solving ,when When the error is within the tolerance range, the iteration converges and the function There is a root. When the iteration depth is greater than the maximum upper limit, the iteration does not converge. The function rootless; S5. Generate a machining tool path based on the tool axis direction and tool head coordinates.
2. A method for generating a ruled surface side edge machining tool path according to claim 1, characterized in that: The step S4 further includes a step S43, which is specifically as follows: S43. Determine the iteration interval and initial value: determine the parameter range of the surface, and determine the iteration interval and initial value for the lower left vertex, lower right vertex, upper left vertex, upper right vertex, left boundary point, right boundary point, upper boundary point, lower boundary point and internal point in turn.
3. The method for generating a tool path for machining a ruled surface side edge according to claim 2, characterized in that: The step S43 further includes step S431, and the details of step S431 are as follows: S431. Repeat iteration: Use the result of the previous iteration as the initial value of the current iteration and repeat the iteration. At this time, the result of the previous iteration is within the iteration interval of the current point.
4. A method for generating a ruled surface side edge machining tool path according to claim 3, characterized in that: The step S4 further includes step S432, which is specifically as follows: S432. Iterate again: When the iteration exceeds the bounds, transform the angle back to the iteration interval and iterate again.
5. A method for generating a tool path for machining a ruled surface side edge according to claim 4, characterized in that: The step S4 further includes a step S44, which is specifically as follows: S44. Obtain the generatrix of the ruled surface: Based on the coordinates of the desired point and the iterative point, the direction of the line connecting the two points is the generatrix direction of the current point.
6. A computer device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 5 when executing the computer program.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Dynamic programming-based method and device for designing discrete developable surface
CN101964011A
Sample forming device and method for shear test of large-area repairing material
CN114034526A