Freeform surface curvature continuation method and system based on boundary differential state and minimum fourth-order change energy, and storage medium
By using the boundary differential state and minimum fourth-order change energy method, the problem of processing the outer surface shape of optical freeform surfaces was solved, the continuity within the surface protection area and the smoothness of axis motion were achieved, and the machining efficiency of three-axis ultra-precision turning was improved.
Patent Information
- Application Number
- CN202611355655.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to effectively process the outer surface shape of optical freeform surfaces on three-axis ultra-precision lathes, leading to increased demands on the machine tool axis motion range and speed, large fluctuations in axis acceleration and axial jump, and difficulty in maintaining the smoothness and machinability of the surface shape at the boundaries.
A free-form surface curvature extension method based on boundary differential states and minimum fourth-order change energy is adopted. By extracting the boundary surface height and the first to third derivative quantities, an extension second derivative function is constructed along the outward extension direction, so that the far-end second and third derivative quantities converge to zero, generating the extension surface shape.
By maintaining the original surface shape within the surface protection area, extending the surface shape to be continuous at the boundary, and reducing the number of far-end guides, the axial motion fluctuations are reduced, thus improving processing efficiency and surface smoothness.
Smart Images

Figure CN123181719A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of freeform surface data processing and ultra-precision machining technology, specifically to a freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy. Background Technology
[0002] Optical freeform surfaces are typically expressed using extended polynomials, XY polynomials, Zernike polynomials, or other parametric forms, and can also be delivered as discrete point clouds. These surface shape data are primarily designed and optimized for the imaging performance of the optically effective region; the surface shape outside the effective region is generally not a major constraint in optical design.
[0003] For analytical freeform surfaces containing higher-order terms, if the original expression is directly calculated beyond the optical effective region, the higher-order terms may continue to increase with the outward distance, causing excessive surface height, slope, curvature, or higher-order undulations in the non-optical region. For discrete point clouds containing only the effective region, the original surface shape outside the effective region may not exist at all, and the extended region must be supplemented and processed based on the boundary data.
[0004] Although the machining extension area typically does not directly participate in imaging, in actual manufacturing processes, the tool needs to pass through the introduction area, exit area, and peripheral region outside the effective area to form a continuous and complete machining toolpath. If the peripheral surface is uneven, the following problems may occur:
[0005] 1. Rapidly increasing height or slope of the outer surface leads to increased demands on the linear axis motion range and speed of the machine tool;
[0006] 2. Excessive curvature or rate of change of curvature causes large fluctuations in the axial acceleration and axial jump corresponding to the toolpath;
[0007] 3. Directly cutting off the original surface shape or simply filling it with a plane can easily cause discontinuities in surface height, slope, or curvature at the connection points;
[0008] 4. When using finite-order Taylor polynomials for extrapolation, the error of higher-order boundary derivatives may be amplified with the extrapolation distance;
[0009] 5. When using target surface fusion, it is necessary to additionally determine the target surface type, fusion width, and fusion weight, and the surrounding trend may change due to improper selection of the target surface;
[0010] 6. Directly filtering the surface height can easily affect the optical effective area that needs to be strictly maintained.
[0011] The aforementioned problems are particularly pronounced on three-axis ultra-precision lathes. , Linear axis and workpiece spindle Taking the turning of free-form surfaces with axis linkage as an example, The shaft drives the workpiece to rotate. The shaft is fed radially. The axis follows the spindle rotation angle according to the freeform surface height. When the second and third order geometric variations of the outer surface shape along the toolpath parameters are large, under given toolpath-time mapping and machine tool kinematics conditions, it may exhibit the following characteristics: Large fluctuations in axial acceleration and axial jerk; neither can be directly equated with the spatial derivative of the surface shape without a parameter-time mapping.
[0012] To ensure that the movement of each axis does not exceed the speed and acceleration limits of the machine tool, actual machining often requires reducing the spindle speed or overall feed rate, thus significantly increasing the machining time for a single freeform surface. Because... The axis motion and spindle rotation angle must be strictly synchronized, and this problem cannot be easily eliminated by simply changing the toolpath locally. Therefore, three-axis ultra-precision turning has particularly high requirements for the smoothness and machinability of the surface outside the optical effective area.
[0013] In some product data delivery scenarios, the available data may only contain discrete point clouds within the effective area, without the corresponding original analytical equations, design coefficients, or the shape of the effective area. In this case, the number of first to third order Taylor extrapolation derivatives at the boundary can only be estimated from the point cloud inside the area protected by the shape. Point cloud sampling intervals, measurement noise, interpolation errors, and incomplete boundary data can all affect the stability of the number of higher-order Taylor extrapolation derivatives. Therefore, an extension method is needed that utilizes only local data inside the boundary while avoiding divergence in long-distance higher-order Taylor extrapolation.
[0014] Furthermore, existing methods still have the following shortcomings in addressing the aforementioned problem of generating outer surface shapes:
[0015] (1) Existing methods are insufficient to strictly maintain the original surface shape within the effective area or protection zone;
[0016] (2) Existing methods are difficult to simultaneously support surface height, slope, curvature and rate of change of curvature at the boundary;
[0017] (3) The problem of the original high-order freeform surface continuing to diverge outside the effective region has not yet been effectively solved;
[0018] (4) Existing extension methods often require specifying the height of the far end face or the far end target face to determine the extension surface shape;
[0019] (5) Existing methods are insufficient to make the distal curvature and rate of change of curvature converge naturally to zero;
[0020] (6) Some methods require manually setting the fading index. The selection of parameters lacks objective basis;
[0021] (7) Existing methods are usually only applicable to a specific type of analytical equation or regular point cloud or regularized discrete point cloud, and lack a unified processing framework;
[0022] (8) The inconsistent extension forms on the upper and lower sides or relative boundaries increase the complexity of implementation;
[0023] (9) Existing methods are difficult to extend one-dimensional extension along a single direction of rectangular coordinates to two-dimensional extension from the closed boundary outwards through coordinate transformation.
[0024] In summary, there is a need for a freeform surface extension method that does not change the optical effective area, does not depend on the external target surface, does not use unreliable original surface shapes outside the effective area, and allows the curvature and rate of curvature change to converge naturally within the processing extension area.
[0025] In the field of trajectory planning, Mellinger and Kumar, in "Minimum Snap Trajectory Generation and Control for Quadrotors," used the square integral of the fourth derivative of the trajectory with respect to time to measure trajectory smoothness and obtained high-order polynomial trajectories through endpoint state constraints. This method targets the time trajectory of aircraft; its variational smoothness concept can provide a mathematical reference for constructing high-order continuous functions, but it cannot directly solve the problem of spatial surface extension outside the boundaries of freeform surfaces. Summary of the Invention
[0026] To address the shortcomings of the existing technologies, this invention provides a freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy. This method, while maintaining the original surface shape within the protected area, inherits the boundary surface height and first to third-order derivative quantities along the outward extension direction, and converges the far-end second and third-order derivative quantities to zero; it eliminates the need to specify the far-end target surface or manually set empirical parameters such as the fading index.
[0027] This invention provides a freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy, comprising:
[0028] S1. Obtain the original surface shape data of the freeform surface, determine the effective area in the original surface shape data, determine the effective area or the area containing the effective area as the surface shape protection area, and determine the processing extension area outside the surface shape protection area;
[0029] S2. Determine the outward extension direction from the boundary of the surface protection area to the processing extension area;
[0030] S3. Along the outward extension direction, extract the boundary surface height, first derivative quantity, second derivative quantity, and third derivative quantity at the boundary of the surface protection area on multiple surface sections respectively; the second derivative quantity is used to characterize the curvature trend of the corresponding section and is referred to as the boundary curvature; the third derivative quantity is the rate of change of the second derivative quantity along the outward distance.
[0031] S4. Determine the available extension length based on the distance from the boundary of the surface protection area to the far boundary of the processing extension area;
[0032] S5. Taking the boundary second derivative quantity and the boundary third derivative quantity as the starting conditions, and the far-end second derivative quantity and the far-end third derivative quantity as the termination conditions, determine the extension second derivative function in the processing extension area according to the principle of minimizing the square integral of the fourth derivative of the surface height with respect to the outward extension direction.
[0033] S6. Integrate the extended second derivative function with the first derivative of the boundary as the initial value to obtain the extended first derivative, and integrate the extended first derivative with the boundary surface height as the initial value to obtain the extended surface height.
[0034] S7. Combine the extended surface height with the original surface data that remains unchanged within the surface protection area to obtain the extended freeform surface.
[0035] Furthermore, the minimum fourth-order change energy Defined as:
[0036] ;
[0037] in, This refers to the non-negative outward distance measured from the boundary of the surface protection area to the processing extension area. For the available extension length, Let be the surface height function along the outward distance of any intercept. Its fourth derivative, is the second derivative quantity used to characterize the curvature trend of the intercept.
[0038] To express the slope, use The second derivative of the surface height along the outward direction is represented by the quantity. This represents the rate of change of the second derivative quantity along the outward distance. The relationship between the three is:
[0039] ;
[0040] The following one-dimensional formulas are all for any surface intersection. and any outward direction When the meaning is clear from the context, the subscript for the cutoff line is omitted. and direction subscript When treated bilaterally, The corresponding extension length can be denoted as .
[0041] The term "curvature" as used in this article refers to... The abbreviation refers to the second derivative quantity of the surface height along the outward distance, which is not the strictly differential geometric curvature, normal curvature, or principal curvature defined according to the curve arc length; when the slope of the intercept is small, the second derivative quantity has a consistent trend with the geometric curvature of the intercept.
[0042] The "minimum fourth-order change energy" refers to the outward spatial distance. The mathematical smoothness functional with respect to the independent variable is used to measure the fourth-order spatial variation of the surface shape and does not represent the physical energy consumption during machine tool machining. Only after establishing a separate mapping between toolpath parameters and machining time can the corresponding time derivative be interpreted as a kinematic quantity.
[0043] In the above variational problem, the boundary ends For fixed starting state; remote end This is a fixed termination state. The distal end face is high. and distal slope It is not specified in advance, but is naturally determined by two integrals of the optimal extended second derivative function, and belongs to the free end state.
[0044] The above construction draws on the variational idea in higher-order trajectory smoothing, which uses the square integral of the fourth derivative at the cost of distinguishing between the fixed-end state and the free-end state, but changes the independent variable from time to the spatial outward distance. Furthermore, it sets boundary zero- to third-order spatial differential states and far-end second- and third-order spatial derivative conditions for the freeform surface shape.
[0045] Furthermore, the extended second derivative function satisfies:
[0046] ;
[0047] ;
[0048] in, Indicates distance along the outward direction The second derivative quantity, Denotes the number of boundary second derivatives. This represents the rate of change of the boundary third derivative quantity, i.e., the boundary second derivative quantity, along the outward distance. The available extension length.
[0049] Furthermore, the extended second-order derivative function adopts a cubic Hermite form that satisfies the above four endpoint conditions:
[0050] ;
[0051] The meanings of each symbol are the same as those defined above.
[0052] The cubic Hermite basis functions are defined as follows:
[0053] ,
[0054] ;
[0055] in, .
[0056] Furthermore, the surface height, first derivative quantity, second derivative quantity, and third derivative quantity of the extended freeform surface at the boundary of the surface protection area are consistent with the corresponding boundary states of the original surface.
[0057] Furthermore, the boundary surface height and the quantities of the first to third derivatives are obtained from the surface shape data inside the surface shape protection area through at least one of analytical differentiation, automatic differentiation, one-sided finite difference, local polynomial fitting, or local spline fitting.
[0058] Furthermore, the extension direction has a first outward direction and a second outward direction, as indicated by the direction label. Distinguish between the first outward direction and the second outward direction, and establish non-negative outward coordinates, determine the available extension length, and perform the curvature extension process in each of the two directions.
[0059] Furthermore, the surface protection area is a protection band defined along the extension direction, and the protection band includes the effective area; the surface height data corresponding to the surface protection area in the extended freeform surface adopts the original surface data.
[0060] Furthermore, the original surface shape data is generated by the analytical equation of a freeform surface, or it is composed of regular discrete point clouds, or a regular mesh surface shape is obtained by interpolation of irregular discrete point clouds.
[0061] Furthermore, the outward extension direction can be a rectangular coordinate direction, a grid direction after coordinate transformation, a local boundary outward normal, or a polar coordinate radial direction.
[0062] Furthermore, a closed outer boundary is established that includes the effective region, and the closed outer boundary has a single-valued radial representation relative to the selected polar coordinate center. Extract the radial surface height and the number of first to third order radial derivatives at the closed outer boundary along multiple polar angle directions, and perform the minimum fourth order variable energy curvature extension process respectively.
[0063] Furthermore, after generating the extended freeform surface, a rotary machining toolpath is generated, and the machining smoothness of the extended freeform surface is evaluated based on the first-order difference, second-order difference, and third-order difference of the axial position under unified toolpath parameters.
[0064] This invention also discloses a freeform surface curvature extension system based on boundary differential states and minimum fourth-order change energy, comprising:
[0065] Memory, used to store computer programs;
[0066] The processor, coupled to the memory, is used to call and execute the computer program to implement the above-mentioned method for free-form surface curvature extension based on boundary differential states and minimum fourth-order change energy.
[0067] Furthermore, the processor is configured to:
[0068] The surface shape acquisition module is used to read the coefficients of the freeform surface equation or the XYZ point cloud;
[0069] The mesh processing module, connected to the surface shape acquisition module, is used to generate or identify rule-based computational meshes;
[0070] The effective area definition module, connected to the mesh processing module, is used to determine the effective area, the surface protection area, the processing extension area, and the outward extension direction; the surface protection area is set as a protective strip that includes the effective area;
[0071] The boundary state extraction module, connected to the effective area definition module, is used to extract the boundary surface height and first to third order outward derivative quantities from the inside of the surface protection area, wherein the second order derivative quantity is used to characterize the curvature trend of the intercept, and the third order derivative quantity is the rate of change of the second order derivative quantity along the outward distance;
[0072] The extension length calculation module is connected to the effective area definition module and is used to calculate the available extension length based on the distance between the boundary of the surface protection area and the output boundary.
[0073] The curvature solving module is connected to the boundary state extraction module and the extension length calculation module, respectively. It is used to solve the extension second derivative function with the boundary second derivative quantity and boundary third derivative quantity as the starting conditions and the far-end second derivative quantity and far-end third derivative quantity being zero as the termination condition, according to the principle of minimizing the square integral of the fourth derivative of the surface height, and then pass it to the integral reconstruction module.
[0074] The integral reconstruction module, connected to the curvature solution module, is used to reconstruct the extension slope and extension surface height by successive integration of the extension second derivative function.
[0075] The dual-sided merging module, connected to the integral reconstruction module, is used to combine the extension surface heights of two relatively outward directions with the original surface data within the surface protection area to obtain complete surface data.
[0076] The effective area protection module is connected to the dual-sided merging module and the surface shape acquisition module respectively, and is used to verify or restore the original surface shape data within the surface shape protection area to ensure that the effective area and the protection zone are not affected by the extension process;
[0077] The output evaluation module, connected to the effective area protection module, is used to output the extended freeform surface shape and generate cross-sectional data or machining toolpath diagnostic results.
[0078] The present invention also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-mentioned method for freeform surface curvature extension based on boundary differential states and minimum fourth-order change energy.
[0079] The beneficial effects of this invention are as follows:
[0080] 1. The original surface shape within the surface shape protection area remains unchanged. This invention generates extended data only outside the surface shape protection area. When outputting, it is combined with the original surface shape data within the surface shape protection area, and the original values can be checked or backfilled point by point, thereby ensuring that the surface shape of the effective area is not affected by the extended process.
[0081] 2. The boundary zero- to third-order differential states are inherited along the outward extension direction. The extended second-order derivative function takes the boundary second- and third-order derivatives as initial conditions, and the boundary first-order derivative and boundary surface height as initial integration values. Therefore, the reconstructed surface height and first to third-order derivatives at the boundary along the outward extension direction are consistent with the extracted boundary states; when the extracted state corresponds to the corresponding derivative of the original surface, the boundary can be reached along this direction. continuous.
[0082] 3. The quantity of the second derivative at the distal end and its rate of change converge to zero simultaneously. The distal end satisfies that both the quantity of the second derivative and the quantity of the third derivative are zero, so that the extension stub enters a linear or tangential continuation state with zero second derivative at the distal end, without requiring it to connect to the preset plane.
[0083] 4. No need to specify the distal surface height, distal slope, or external target surface. This invention only constrains the distal second and third derivative quantities to zero; the distal surface height and slope are naturally determined by the integral of the extended second derivative function.
[0084] 5. No need to set empirical parameters for curvature fading, such as the fading exponent. This method determines the second derivative function of the third-order continuation based on the boundary state, the actual available continuation length, and the far-end conditions; the available continuation length is determined by the geometric distance between the boundary of the surface protection region and the output boundary, and is not an additional fitting parameter.
[0085] 6. The extended second derivative function is uniquely determined by the explicit principle of minimum fourth-order change energy. Within the allowable set of conditions satisfying the four endpoints and where the second derivative function is quadratically differentiable, minimize... Its Euler-Lagrange equation makes the optimal second derivative function a cubic function; therefore, the above cubic Hermite expression can be obtained.
[0086] 7. Preventing the divergence of higher-order terms of the original freeform surface outside the effective region. If the analytical expression of the original freeform surface is directly extended beyond the machining aperture, its polynomial or aspherical higher-order terms may diverge sharply outside the aperture, leading to uncontrolled surface shape. This invention employs independent curvature extension based on the minimum energy criterion outside the effective region, completely isolating the divergence problem of higher-order terms of the original surface shape.
[0087] 8. Applicable to both analytical equations and discrete point clouds as surface data sources. The extraction of boundary differential states can be achieved through analytical differentiation (when the surface is defined by analytical equations) or through numerical methods such as one-sided finite difference, local polynomial fitting, and local spline fitting (when the surface is composed of discrete point clouds or regular meshing). Therefore, this invention is applicable to both continuous analytical models and discrete measurement / design data.
[0088] 9. It can handle regular grid point clouds and regularized discrete point clouds. For irregular discrete point clouds, it can be regularized by interpolation to a regular grid before extension is performed, which reduces the constraints on the input data format in practical engineering applications.
[0089] 10. Supports multiple extension directions, including Cartesian coordinates, mesh transformation direction, local boundary normal, and polar coordinate radial direction. The extension direction is not limited to a single coordinate axis and can be flexibly selected according to the shape of the surface protection area and the geometry of the processing extension area, making it easy to adapt to different types of optical freeform surfaces.
[0090] 11. For a surface protection region with a single-value radial boundary relative to the selected polar coordinate center, the external region can be decomposed into multiple radial sections, and one-dimensional curvature extension can be performed on each. Each radial result also needs to rely on the continuous change of the boundary state with the polar angle direction to form a continuous two-dimensional extension surface.
[0091] 12. Two relative outward directions can be processed separately, which is suitable for asymmetric cases. The surface protection area can have a relative first boundary and a second boundary; when the available extension lengths on both sides are different or the boundary differential states are asymmetric, non-negative outward coordinates are established separately and the same extension process is executed independently.
[0092] 13. Improve the smoothness of axial changes in rotary machining toolpaths. Extending the second and third derivatives converges at the far end, reducing higher-order geometric changes in the outer surface profile along toolpath parameters; given the toolpath-time mapping, feed rate, and machine tool kinematics, this helps to reduce... Axial acceleration and axial jump fluctuations.
[0093] 14. It helps reduce the overall speed reduction required due to machine tool dynamic limitations. Under the conditions allowed by specific equipment, toolpaths, and machining parameters, reduced axis motion fluctuation can provide margin for increasing spindle speed or feed rate; the actual gain is subject to the results of machine tool simulation or machining verification.
[0094] 15. The smoothness of machining in the extended region can be evaluated by discrete difference or derivative estimation under unified toolpath parameters. Only when the toolpath parameters are taken as machining time or their mapping to machining time is known can the corresponding second-order and third-order derivative estimates be interpreted as physical acceleration and axial jerk.
[0095] 16. The extension of each section can be calculated independently, making it suitable for parallel implementation. Since the curvature extension processes of each surface section along the extension direction are independent of each other, all sections can be processed in parallel through multi-threaded or distributed computing, significantly shortening the computation time and providing practical advantages in large-scale freeform surface or dense point cloud scenarios.
[0096] 17. Modular architecture facilitates system integration and engineering deployment. Each functional module is decoupled into ten independent modules according to the data processing flow: surface shape acquisition, mesh processing, effective area definition, boundary state extraction, extension length calculation, curvature solution, integral reconstruction, bilateral merging, effective area protection, and output evaluation. These modules are connected through standardized data interfaces. This architecture allows all modules to be executed serially by a single processor or run in a distributed parallel manner in a multi-processor environment. Furthermore, it facilitates the embedding of this system as a functional component into freeform surface design software, machining data preparation software, CAM software, or machine tool control pre-processing systems, reducing integration and development costs.
[0097] This invention can be used for HUD (Head-Up Display) reflectors, automotive lighting optical components, freeform surface lenses, mold cores, and other freeform surface parts that require expanded processing coverage. It can also be used for data preparation processes in single-point diamond turning, slow tool servo, fast tool servo, and other continuous toolpath machining. Attached Figure Description
[0098] Figure 1 This is a flowchart of the method in the first embodiment.
[0099] Figure 2 This is the single-sided stub reconstruction process of the first implementation method.
[0100] Figure 3 This is the effective processing area for the freeform surface in the third implementation method.
[0101] Figure 4 For the third implementation method, the original equation and the helical toolpath and normalization of the curvature extension surface shape are described. A schematic diagram comparing the continuity of axial acceleration.
[0102] Figure 5 The result is the original equation surface axis motion calculated by ILCAM3D in the third embodiment.
[0103] Figure 6 This is the result of the curvature extension surface axis motion calculated by ILCAM3D in the third embodiment. Detailed Implementation
[0104] To further understand the features, technical means, and specific objectives and functions achieved by the present invention, the present invention will be described in further detail below with reference to specific embodiments and accompanying drawings.
[0105] like Figure 1 As shown, this is the first embodiment.
[0106] S1, obtain the original freeform surface data.
[0107] Read the coefficients of the freeform surface equation or the discrete XYZ point cloud to determine the effective area, the surface protection area, and the predetermined output area.
[0108] S2, Establish a regular computational grid.
[0109] Calculate or interpolate the raw data to a regular grid. The surface height matrix is obtained. The mesh notation is consistent with that of other patents in the same series. For analytical equations, the original surface shape can be calculated only in the surface shape protection area and at the boundary state sampling location; it is not required that the original equation results outside the effective area be used as the final extended surface shape.
[0110] S3 determines the extension direction and relative boundary.
[0111] Preferred along direction The column processing uses the upper and lower boundaries of the surface protection area as two outward extension starting points; directional labels are used. and These represent the first and second outward directions, respectively. Alternatively, they can be along... Direction processing after direction or coordinate transformation.
[0112] S4, extract the boundary differential state from the inside of the surface protection area.
[0113] For any intercept and any outward direction The boundary differential state is obtained by sampling the surface height from the inside of the boundary: Omitted when the context is clear. and Subscript.
[0114] When the original surface shape has an analytical expression, it can be obtained through analytical differentiation, automatic differentiation, or high-precision numerical differentiation; when the input is a point cloud, it can be obtained through one-sided difference, local polynomial fitting, or local spline fitting.
[0115] S5, calculate the available extension length.
[0116] Based on the boundary of the surface protection area and the predetermined output boundary, the actual usable extension length in each direction is directly calculated. The available extension lengths can be different for two directions or different sections.
[0117] S6, construct the extended second derivative function of the minimum fourth-order change energy.
[0118] Based on the boundary second derivative quantity Boundary third derivative quantity Available extension length And the conditions for the number of the second and third derivatives at the far end are constructed as follows: .
[0119] S7, integral reconstruction slope and surface height.
[0120] With boundary slope and boundary surface height Using the initial value, integrate sequentially with respect to the extended second derivative function:
[0121] ;
[0122] ;
[0123] Since the extended second derivative function is a cubic function, the slope of the extension obtained by integration is a function of order no higher than fourth, and the height of the extension surface is a function of order no higher than fifth. Let the normalized distance be:
[0124] ;
[0125] The equivalent closed-form expression for the extension surface height, which is consistent with the optimized code implementation, is as follows:
[0126] ;
[0127] ,
[0128] .
[0129] The above integration can be achieved by analytical integration or by numerical accumulation on a discrete grid with the same sampling interval as the actual sampling interval; both implementations should satisfy the same boundary state and far-end conditions.
[0130] S8 processes the opposite sides separately.
[0131] Perform steps S4 to S7 on the first and second outward sides of the convex shape protection area, respectively. For the lower or reverse side, convert the coordinate direction to a unified outward coordinate and then use the same formula.
[0132] S9 merges the surface protection area and the processing extension area.
[0133] The original surface shape is preserved within the surface shape protection area, while the surface shape is reconstructed in the processing expansion area, merging all areas into a complete output surface shape.
[0134] S10 performs hard protection of the valid area and result verification.
[0135] Within the surface protection area, each node is checked or restored according to its original surface shape. The presence of missing points, duplicate points, and non-finite values is checked. The zero- to third-order boundary continuity relationship along the outward extension direction and the quantity conditions of the far-end second- and third-order derivatives are also verified.
[0136] S11 outputs the surface shape and performs processing evaluation.
[0137] It outputs XYZ point clouds or regular meshes and can generate geometric diagnostic results such as second and third derivative quantities of the cutoff line or first to third order discrete changes of the toolpath axial position; when the mapping between toolpath parameters and machining time is known, it can also calculate axial velocity, axial acceleration or axial jump.
[0138] like Figure 2 As shown, regarding the extraction of boundary differential states:
[0139] In a preferred embodiment, for a regularly spaced point cloud, at least five sampling points are selected from the boundary towards the inside of the surface protection area, and local polynomial fitting is used to obtain first to third derivatives. For example, seven points can be selected and a fifth-order local polynomial fitting can be used.
[0140] Let the inner side of the boundary be the first The sampling locations are: .
[0141] ;
[0142] Each boundary differential state is obtained from the derivative of the local polynomial at the boundary:
[0143] ;
[0144] In this method, local polynomials are used to estimate the first to third derivatives; the boundary surface height directly uses the original boundary node values instead of the fitted values of the local polynomials at the boundary to avoid zero-order errors caused by fitting. The number of sampling points and the fitting order mentioned above are numerical implementation methods, and other algorithms that can stably obtain the boundary differential state are not restricted.
[0145] Regarding the continuity condition
[0146] In the preferred embodiment, the boundary of the surface protection area satisfies the following in the outward direction:
[0147] .
[0148] Therefore, the original surface shape and the extended surface shape reach the desired result along the outward direction. Continuity means that the surface height, slope, second derivative quantity, and rate of change are continuous at the boundary. The far end satisfies:
[0149] .
[0150] Regarding the unified treatment of the top and bottom sides:
[0151] For the upper boundary, the outward coordinates are defined as: .
[0152] For the lower boundary, the outward coordinates are defined as: .
[0153] Therefore, both sides satisfy The same curvature continuation and integral reconstruction formulas can be reused. The first and third derivative quantities on the lower side should be converted with symbols according to the unified outward coordinate direction.
[0154] Regarding the direction of one-dimensional processing: the preferred embodiment is along... direction The column can be extended in one dimension. Depending on the product geometry and processing layout, it can also be:
[0155] 1. Along direction Line processing;
[0156] 2. First, perform a rigid body coordinate transformation to align the main extension direction with the regular mesh axis;
[0157] 3. Select the extension direction for each of the multiple zones;
[0158] 4. First extend along the first direction, then process the uncovered areas along the second direction.
[0159] The second implementation is an extended implementation of the two-dimensional extension to polar coordinates.
[0160] For freeform surfaces that need to extend from the boundary of the closed effective region in multiple directions, the two-dimensional external region can be decomposed into a set of radial sections through polar coordinate transformation, and then the aforementioned one-dimensional curvature extension method can be used on each radial section.
[0161] Let the selected polar coordinate center be (x c ,y c The transformation between rectangular coordinates and polar coordinates is as follows:
[0162] ;
[0163] ;
[0164] Therefore, the original surface shape It can be represented as a polar coordinate surface shape:
[0165] ;
[0166] Establish a closed, smooth outer boundary containing the effective region, making it a single-valued radial boundary relative to the selected polar coordinate center, meaning that every ray emanating from this center intersects the boundary uniquely. This boundary is written as... For each polar angle, the non-negative outward distance is defined with the boundary radius as the starting point for extension:
[0167] ;
[0168] This transformation converts the original two-dimensional external region into a region with a polar angle. A set of parameters This is a radial one-dimensional problem. For each polar direction, the radial boundary differential state is extracted:
[0169] ;
[0170] The outer surface shape of each radial section is generated according to the one-dimensional minimum fourth-order varying energy curvature extension formula of the present invention. When the outer boundary and boundary differential state change continuously with the polar angle, and consistent sampling or interpolation is used for the radial results, each radial result can form a continuous two-dimensional extension surface in the circumferential direction; this polar coordinate implementation is not applicable to regions that cannot be represented as single-value radial boundaries relative to the selected center.
[0171] The two-dimensional extension still focuses on the boundary differential state, the convergence of the second and third derivatives at the far end, and the minimum fourth-order change energy. Its one-dimensional construction, integral reconstruction, and directional boundary continuity conditions are the same as those mentioned above.
[0172] The third implementation method uses a freeform surface product for a head-up display (HUD) as an example. The input data is a freeform surface design file, which includes quadratic surface parameters and information about... , The polynomial freeform surface coefficients are used. After reading the coefficients, the calculation program establishes the original freeform surface expression and calculates the surface height on a regular rectangular coordinate grid.
[0173] The effective optical area of this product is:
[0174] , .
[0175] like Figure 3 As shown, the optically effective processing area of the input freeform surface is illustrated. The colors in the figure represent relative surface height; the displayed orientation is only used to clearly represent the product shape and does not change the subsequent calculated coordinates and surface height data. In the figure, AA represents... BB is .
[0176] This embodiment expands the output area to... The specific conditions are as follows:
[0177]
[0178] All nodes within the protective zone retain their original values. In the calculation results of this embodiment, the maximum surface height change within the protective zone is 0.
[0179] upper side treatment
[0180] 1. Define the outward coordinates as the upper boundary. ;
[0181] 2. For each Cut off the line and select seven sampling points from the boundary towards the inside of the protective zone;
[0182] 3. Estimate the boundary slope, second derivative quantity, and third derivative quantity using a fifth-order local polynomial, and make the boundary surface height equal to the original node value;
[0183] 4. Based on the output boundaries get ;
[0184] 5. Construct the minimum fourth-order energy-extended second derivative function that satisfies the boundary zero to third-order states and the zero second-order and zero third-order derivatives at the far end;
[0185] 6. Integrating the extended second derivative function yields the upper slope and surface height.
[0186] lower side treatment
[0187] 1. Define the lower boundary and define the outward coordinates. ;
[0188] 2. Select sampling points from the lower boundary towards the inside of the protection zone, and convert the odd-order derivative sign according to the outward coordinate direction;
[0189] 3. Based on the output boundary get ;
[0190] 4. Reconstruct the slope and surface height of the lower side using the same minimum fourth-order change energy formula as the upper side;
[0191] 5. Merge the lower side, protective strip, and upper side, and accurately restore the protective strip nodes according to the original values.
[0192] Numerical toolpath comparison
[0193] The same Archimedes spiral toolpath is used for sampling on both the original equation surface shape and the curvature extension surface shape generated by this method. Figure 4 The diagram shows the helical toolpaths on two different surface shapes and the normalized values calculated using the same toolpath parameters. It changes towards second order; this normalized quantity is mainly used to compare geometric continuity and is not directly used as the actual acceleration of the machine tool.
[0194] The process was verified using simulation machining on the Innolite IL300 ultra-precision single-point diamond lathe.
[0195] To verify whether surface shape changes can be reflected in the axis motion characteristics of actual machining equipment, the original equation surface shape and the curvature-extended surface shape were imported into the ILCAM3D software used by the Innolite IL300 ultra-precision machining equipment, and helical toolpath calculations were performed using the same machining parameters. The axis position, velocity, acceleration, and axial jerk (also known as jerk acceleration) results provided by ILCAM3D are as follows: Figure 5 and Figure 6 As shown.
[0196] contrast Figure 5 and Figure 6It can be seen that, when the axis position and overall velocity trends remain consistent, the acceleration fluctuation range corresponding to the curvature extension surface shape is significantly narrowed. Based on the coordinate scale in the figure, the acceleration of the original equation surface shape is approximately... to Between, the maximum absolute value is approximately The curvature extension surface shape is approximately in to Between, the maximum absolute value is approximately The results show that this method can reduce large unidirectional acceleration peaks and make the overall axis motion response smoother.
[0197] With the equipment, toolpath, and machining parameters in this embodiment, the axis movement is smoother, which can reduce the overall speed reduction machining required due to limitations in speed, acceleration, or servo following capability, and provide margin for increasing spindle speed or feed rate; the actual speed that can be used still needs to meet the dynamic capability and machining accuracy requirements of the specific machine tool.
[0198] The above results are used to illustrate the effectiveness of this method in a HUD design example and under Innolite IL300 processing conditions, and do not constitute a limitation on output size, grid spacing, effective area range, number of sampling points, local polynomial order, processing equipment model or processing parameters.
[0199] In a fourth embodiment, another aspect of the present invention provides a freeform surface curvature extension system based on boundary differential states and minimum fourth-order change energy, used to execute the freeform surface curvature extension method described in the above-described method embodiments. The system includes a memory and one or more processors coupled to the memory. The memory stores a computer program, and the processors are configured as the following functional modules by calling and executing the computer program:
[0200] The surface shape acquisition module is used to read the coefficients of the freeform surface equation or point cloud data in XYZ format, which serves as the input interface for the entire extension process.
[0201] The mesh processing module, connected to the surface shape acquisition module, is used to receive raw surface shape data, generate or identify regular computational meshes, and provide a discretized data basis for subsequent differential state extraction.
[0202] The effective area definition module, connected to the mesh processing module, is used to determine the optical effective area, surface protection area, and extension direction on the computational mesh according to the optical design requirements, and to transmit the boundary position information of the surface protection area to the boundary state extraction module and the extension length calculation module.
[0203] The boundary state extraction module, connected to the effective area definition module, is used to extract the boundary surface height and first to third order outward derivative quantities from the inside of the surface protection area, wherein the second order derivative quantity is used to characterize the curvature trend of the cutoff line, and the third order derivative quantity is the rate of change of the second order derivative quantity along the outward distance.
[0204] The extension length calculation module is connected to the effective area definition module. It is used to calculate the available extension length based on the distance between the boundary of the surface protection area and the output boundary, and to pass the length parameter to the curvature solution module.
[0205] The curvature solving module is connected to the boundary state extraction module and the extension length calculation module, respectively. It is used to solve the extension second derivative function with the boundary second derivative quantity and boundary third derivative quantity as the starting condition and the far-end second derivative quantity and far-end third derivative quantity being zero as the termination condition, according to the principle of minimizing the square integral of the fourth derivative of the surface height, and then pass it to the integral reconstruction module.
[0206] The integral reconstruction module, connected to the curvature solution module, is used to integrate the extended second derivative function with the boundary first derivative as the initial value to obtain the extended first derivative, and then integrate with the boundary surface height as the initial value to obtain the extended surface height.
[0207] The dual-sided merging module, connected to the integral reconstruction module, is used to splice and combine the extended surface heights on both sides of the surface protection area with the original surface data within the surface protection area to obtain complete surface data including the optical effective area, the surface protection area, and the processing extension areas on both sides, and then transmits the combined surface data to the effective area protection module.
[0208] The effective area protection module is connected to the dual-sided merging module and the surface shape acquisition module, respectively. It is used to read the original surface shape data of the surface shape protection area from the surface shape acquisition module, restore or verify whether the surface shape data inside the surface shape protection area in the stitching result of the dual-sided merging module is consistent with the original data, so as to ensure that the surface shape of the optical effective area and the surface shape protection area is not affected by the extension process, and transmit the verified surface shape data to the output evaluation module.
[0209] The output evaluation module, connected to the effective area protection module, is used to receive the final surface shape data, output the extended freeform surface shape, and generate cross-sectional data or first-order, second-order, and third-order differences of the machining toolpath as diagnostic results for machining smoothness according to user requirements.
[0210] The above modules can be implemented by one or more processors executing computer programs, or they can be integrated into freeform surface design software, machining data preparation software, computer-aided manufacturing (CAM) software, or machine tool control preprocessing systems.
[0211] In a fifth embodiment, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the steps described in the above method embodiments.
[0212] Technical Boundaries and Alternative Embodiments of the Invention
[0213] I. Technical Boundary Description
[0214] To further clarify the technical content of this invention and distinguish it from the prior art, this invention has the following technical boundaries:
[0215] (1) The present invention does not forcibly connect the outer surface shape to the plane, sphere or rotationally symmetric target surface, and the extended surface shape is naturally generated by the boundary differential state and curvature extension;
[0216] (2) This invention does not rely on the extension calculation of the original freeform surface expression outside the effective region, but only on the differential state at the inner boundary of the surface protection region;
[0217] (3) This invention does not use a high-order Taylor series with a finite distance to directly extrapolate the surface height, so as to avoid oscillation divergence far from the boundary;
[0218] (4) This invention does not replace boundary differential state extension with surface height filtering, thus maintaining the continuity of the first to third derivatives at the boundary;
[0219] (5) This invention does not introduce a fading exponent or a preset weight parameter; the extended second derivative function is uniquely determined by the boundary second derivative quantity, the boundary third derivative quantity, the available extension length determined by the geometric boundary, and the far-end conditions;
[0220] (6) In this invention, the boundary differential state and the extended second derivative function are used as the control core, and the height of the far end face is not used as a pre-given independent constraint condition;
[0221] (7) The slope of the extended region is obtained by integrating the extended second derivative function and is not used as an independent far-end target constraint.
[0222] II. Alternative Implementation Methods
[0223] Within the scope of the inventive concept, the above preferred embodiments may also have the following alternative implementations:
[0224] (1) The input data of the surface shape acquisition module can be freeform surface expression coefficients, regular point clouds, or regular grid surface shapes obtained by interpolation;
[0225] (2) The surface protection area can be a rectangle, a strip, or any shape containing the actual optically effective area;
[0226] (3) The extension direction can be a global coordinate system. direction, Direction, rotational mesh direction, local boundary normal direction, or radial direction;
[0227] (4) The boundary differential state can be obtained by analytical differentiation, automatic differentiation, finite difference, local polynomial fitting or spline interpolation methods;
[0228] (5) The upper and lower sides or the left and right sides of the surface protection area may have different effective boundary positions and available extension lengths;
[0229] (6) The quantities of the second and third derivatives at the far end are preferably strictly set to zero, and in numerical implementation, they can also approach zero within a predetermined error tolerance.
[0230] (7) For outliers in point cloud data, robust local fitting can be performed before the boundary differential state is extracted, but the original surface data inside the surface protection area is not changed.
[0231] (8) After the surface is output, the nodes of the surface protection area covered during the extension process can be restored point by point according to the original data;
[0232] (9) When the surface has multiple cross-sectional directions, each cross-section can be calculated in parallel;
[0233] (10) After generating the extended surface shape, the first-order difference, second-order difference and third-order difference of the machining toolpath can be calculated as quality verification indicators of smoothness;
[0234] (11) The one-dimensional secant extension method can be extended to the radial two-dimensional extension of closed boundaries by polar coordinate transformation;
[0235] (12) The method described in this invention can be integrated into optical design software, computer-aided manufacturing (CAM) software, machining data preparation software or machine tool control preprocessing software.
[0236] The embodiments described above merely illustrate the optimal implementation of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A free-form surface curvature extension method based on boundary differential states and minimum fourth-order change energy, characterized in that, include: S1. Obtain the original surface shape data of the freeform surface, determine the effective area in the original surface shape data, determine the effective area or the area containing the effective area as the surface shape protection area, and determine the processing extension area outside the surface shape protection area; S2. Determine the outward extension direction from the boundary of the surface protection area to the processing extension area; S3. Along the outward extension direction, extract the boundary surface height, first derivative quantity, second derivative quantity and third derivative quantity at the boundary of the surface protection area on multiple surface sections respectively. The second derivative quantity is used to characterize the curvature trend of the corresponding section and is referred to as the boundary curvature. The third derivative quantity is the rate of change of the second derivative quantity along the outward distance. S4. Determine the available extension length based on the distance from the boundary of the surface protection area to the far boundary of the processing extension area; S5. Taking the boundary second derivative quantity and the boundary third derivative quantity as the starting conditions, and the far-end second derivative quantity and the far-end third derivative quantity as the termination conditions, determine the extension second derivative function in the processing extension area according to the principle of minimizing the square integral of the fourth derivative of the surface height with respect to the outward extension direction. S6. Integrate the extended second derivative function with the first derivative of the boundary as the initial value to obtain the extended first derivative, and integrate the extended first derivative with the boundary surface height as the initial value to obtain the extended surface height. S7. Combine the extended surface height with the original surface data that remains unchanged within the surface protection area to obtain the extended freeform surface.
2. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, Minimum fourth-order change energy for: ; in, This refers to the non-negative outward distance measured from the boundary of the surface protection area to the processing extension area. For the available extension length, Let be the surface height function along the outward distance of any intercept. Its fourth derivative, is the number of the second derivative used to characterize the curvature trend of the intercept.
3. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 2, characterized in that, The extended second derivative function satisfies: ; ; in, Indicates distance along the outward direction The second derivative quantity, Denotes the number of boundary second derivatives. This represents the rate of change of the boundary third derivative quantity, i.e., the boundary second derivative quantity, along the outward distance. The available extension length.
4. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 3, characterized in that, The extended second derivative function is expressed by cubic Hermite interpolation as follows: ; in, Indicates distance along the outward direction The second derivative quantity, Denotes the number of boundary second derivatives. This represents the rate of change of the boundary third derivative quantity, i.e., the boundary second derivative quantity, along the outward distance. The available extension length; The cubic Hermite basis functions are defined as follows: ; ; in, .
5. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 4, characterized in that, The extended freeform surface at the boundary of the surface protection area has surface height, first derivative quantity, second derivative quantity, and third derivative quantity along the outward extension direction that are consistent with the corresponding boundary state of the original surface.
6. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, The boundary surface height and the quantities of the first to third derivatives are obtained from the surface shape data inside the surface shape protection area through at least one of analytical differentiation, automatic differentiation, one-sided finite difference, local polynomial fitting, or local spline fitting.
7. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, The extension direction has a first outward direction and a second outward direction, indicated by a direction label. Distinguish between the first outward direction and the second outward direction, and establish non-negative outward coordinates, determine the available extension length, and perform the curvature extension process in each of the two directions.
8. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, The surface protection area is a protection band defined along the extension direction, and the protection band includes the effective area; the surface height data corresponding to the surface protection area in the extended freeform surface adopts the original surface data.
9. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, The original surface data is generated by the analytical equation of a freeform surface, or it is composed of regular discrete point clouds, or it is obtained by interpolation of irregular discrete point clouds to obtain a regular grid surface.
10. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, The outward extension direction can be the rectangular coordinate direction, the mesh direction after coordinate transformation, the local boundary outward normal, or the polar coordinate radial direction.
11. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, Establish a closed outer boundary encompassing the effective region, wherein the closed outer boundary has a single-valued radial representation relative to the selected polar coordinate center. The radial surface height and the number of first to third order radial derivatives at the closed outer boundary are extracted along multiple polar angle directions, and the minimum fourth order variable energy curvature extension process is performed respectively.
12. The freeform surface curvature extension method based on boundary differential states and minimum fourth-order change energy according to claim 1, characterized in that, After generating the extended freeform surface, a rotary machining toolpath is generated, and the machining smoothness of the extended freeform surface is evaluated by discretizing the first-order difference, second-order difference, and third-order difference based on the axial position under unified toolpath parameters.
13. A freeform surface curvature extension system based on boundary differential states and minimum fourth-order change energy, characterized in that, include: Memory, used to store computer programs; A processor, coupled to the memory, is configured to invoke and execute the computer program to implement the method of any one of claims 1 to 12.
14. The freeform surface curvature extension system based on boundary differential states and minimum fourth-order change energy according to claim 13, characterized in that, The processor is configured to invoke and execute the computer program as follows: The surface shape acquisition module is used to read the coefficients of the freeform surface equation or the XYZ point cloud; The mesh processing module, connected to the surface shape acquisition module, is used to generate or identify rule-based computational meshes; The effective area definition module, connected to the mesh processing module, is used to determine the effective area, the surface protection area, the processing extension area, and the outward extension direction; the surface protection area is set as a protective strip that includes the effective area; The boundary state extraction module, connected to the effective area definition module, is used to extract the boundary surface height and first to third order outward derivative quantities from the inside of the surface protection area, wherein the second order derivative quantity is used to characterize the curvature trend of the intercept, and the third order derivative quantity is the rate of change of the second order derivative quantity along the outward distance; The extension length calculation module is connected to the effective area definition module and is used to calculate the available extension length based on the distance between the boundary of the surface protection area and the output boundary. The curvature solving module is connected to the boundary state extraction module and the extension length calculation module, respectively, and is used to generate the extension second derivative function based on the boundary second derivative quantity, the boundary third derivative quantity, the far-end second derivative quantity, the far-end third derivative quantity, and the principle of minimum fourth-order change energy. The integral reconstruction module, connected to the curvature solution module, is used to reconstruct the extension slope and extension surface height by successive integration of the extension second derivative function. The dual-sided merging module, connected to the integral reconstruction module, is used to combine the extension surface heights of two relatively outward directions with the original surface data within the surface protection area to obtain complete surface data. The effective area protection module is connected to the dual-sided merging module and the surface shape acquisition module respectively, and is used to verify or restore the original surface shape data within the surface shape protection area to ensure that the effective area and the protection zone are not affected by the extension process; The output evaluation module, connected to the effective area protection module, is used to output the extended freeform surface shape and generate cross-sectional data or machining toolpath diagnostic results.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 12.
